<feed xmlns='http://www.w3.org/2005/Atom'>
<title>drakx/tools/gencryptofiles, branch V10_2_19mdk</title>
<subtitle>Mageia Installer and base platform for many utilities</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag 'V10_2_19mdk'.</title>
<updated>2005-04-04T19:00:13+00:00</updated>
<author>
<name>Mystery Man</name>
<email>unknown@mandriva.org</email>
</author>
<published>2005-04-04T19:00:13+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=ff340ae492915a1723450c148641b594326c5fd8'/>
<id>ff340ae492915a1723450c148641b594326c5fd8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MandrakeSoft -&gt; Mandrakesoft</title>
<updated>2004-07-20T02:42:12+00:00</updated>
<author>
<name>Pascal Rigaux</name>
<email>pixel@mandriva.com</email>
</author>
<published>2004-07-20T02:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=94dd872cad528c27940c746ad75391fd099aa845'/>
<id>94dd872cad528c27940c746ad75391fd099aa845</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>*** empty log message ***</title>
<updated>2000-05-09T16:06:10+00:00</updated>
<author>
<name>Francois Pons</name>
<email>fpons@mandriva.com</email>
</author>
<published>2000-05-09T16:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=0ee11e471095e7390839eac7ff95bddd13651ffa'/>
<id>0ee11e471095e7390839eac7ff95bddd13651ffa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
ption value='distro/mga8'>distro/mga8</option>
<option value='distro/mga9'>distro/mga9</option>
<option value='master'>master</option>
<option value='topic/Corpo_2_1'>topic/Corpo_2_1</option>
<option value='topic/KA9_0'>topic/KA9_0</option>
<option value='topic/MDK-10-update'>topic/MDK-10-update</option>
<option value='topic/MDK-10_1-update'>topic/MDK-10_1-update</option>
<option value='topic/MDK-10_2-update'>topic/MDK-10_2-update</option>
<option value='topic/MDK-2006_0-update'>topic/MDK-2006_0-update</option>
<option value='topic/MDK92-branch'>topic/MDK92-branch</option>
<option value='topic/MDKC_1_0'>topic/MDKC_1_0</option>
<option value='topic/PCMCIA_CS_DISTRO'>topic/PCMCIA_CS_DISTRO</option>
<option value='topic/R9_0-64bit-branch'>topic/R9_0-64bit-branch</option>
<option value='topic/R9_1_HP-branch'>topic/R9_1_HP-branch</option>
<option value='topic/a'>topic/a</option>
<option value='topic/before_matchbox_wm'>topic/before_matchbox_wm</option>
<option value='topic/bug-13680'>topic/bug-13680</option>
<option value='topic/dietlibc'>topic/dietlibc</option>
<option value='topic/efi'>topic/efi</option>
<option value='topic/extlinux'>topic/extlinux</option>
<option value='topic/firewall'>topic/firewall</option>
<option value='topic/gdk-pixbuf-0-branch'>topic/gdk-pixbuf-0-branch</option>
<option value='topic/gi-ppc'>topic/gi-ppc</option>
<option value='topic/ia64-8_1'>topic/ia64-8_1</option>
<option value='topic/mandrakesoft'>topic/mandrakesoft</option>
<option value='topic/mlcd4'>topic/mlcd4</option>
<option value='topic/ppp'>topic/ppp</option>
<option value='topic/rp-pppoe'>topic/rp-pppoe</option>
<option value='topic/switching_to_dnf'>topic/switching_to_dnf</option>
<option value='topic/switching_to_urpmi'>topic/switching_to_urpmi</option>
<option value='topic/unlabeled-1.1.1'>topic/unlabeled-1.1.1</option>
<option value='topic/v_webmin_0_87'>topic/v_webmin_0_87</option>
<option value='topic/x86_64-branch'>topic/x86_64-branch</option>
<option value='user/animtim/designWork'>user/animtim/designWork</option>
<option value='user/bcornec/fixntp'>user/bcornec/fixntp</option>
<option value='user/colin/rescue-systemd'>user/colin/rescue-systemd</option>
<option value='user/ennael/mga6'>user/ennael/mga6</option>
<option value='user/erwan/bug-13680'>user/erwan/bug-13680</option>
<option value='user/jibz/aarch64'>user/jibz/aarch64</option>
<option value='user/martinw/mga6'>user/martinw/mga6</option>
<option value='user/pterjan/arm64'>user/pterjan/arm64</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Mageia Installer and base platform for many utilities</td><td class='sub right'>Thierry Vignaud [tv]</td></tr></table>
<table class='tabs'><tr><td>
<a href='/software/drakx/?h=V1_1_9_54mdk'>summary</a><a href='/software/drakx/refs/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>refs</a><a href='/software/drakx/log/?h=V1_1_9_54mdk'>log</a><a href='/software/drakx/tree/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tree</a><a class='active' href='/software/drakx/commit/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>commit</a><a href='/software/drakx/diff/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>diff</a><a href='/software/drakx/stats/?h=V1_1_9_54mdk'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/'>
<input type='hidden' name='h' value='V1_1_9_54mdk'/><input type='hidden' name='id' value='3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='V1_1_9_54mdk'/><input type='hidden' name='id' value='3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Mystery Man &lt;unknown@mandriva.org&gt;</td><td class='right'>2003-04-14 13:30:58 +0000</td></tr>
<tr><th>committer</th><td>Mystery Man &lt;unknown@mandriva.org&gt;</td><td class='right'>2003-04-14 13:30:58 +0000</td></tr>
<tr><th>commit</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f</a> (<a href='/software/drakx/patch/?id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='sha1'><a href='/software/drakx/tree/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>3bf68e0d5ad6d2fca6c769c4e4e7218f2e0e6db3</a></td></tr>
<tr><th>parent</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>327bd24f8e4291bd1882de1990dd7339f781a9cb</a> (<a href='/software/drakx/diff/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f&amp;id2=327bd24f8e4291bd1882de1990dd7339f781a9cb'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='sha1'><a href='/software/drakx/snapshot/drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar'>drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar</a><br/><a href='/software/drakx/snapshot/drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.gz'>drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.gz</a><br/><a href='/software/drakx/snapshot/drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.bz2'>drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.bz2</a><br/><a href='/software/drakx/snapshot/drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.xz'>drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.tar.xz</a><br/><a href='/software/drakx/snapshot/drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.zip'>drakx-3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f.zip</a><br/></td></tr></table>
<div class='commit-subject'>This commit was manufactured by cvs2svn to create tag 'V1_1_9_54mdk'.<span class='decoration'><a class='tag-annotated-deco' href='/software/drakx/tag/?h=V1_1_9_54mdk'>V1_1_9_54mdk</a></span></div><div class='commit-msg'></div><div class='diffstat-header'><a href='/software/drakx/diff/?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>Diffstat</a></div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>.cvsignore</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>Makefile</a></td><td class='right'>111</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/BUGS?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/BUGS</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/COPYING?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/COPYING</a></td><td class='right'>340</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/HACKING?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/HACKING</a></td><td class='right'>126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/Partition-ends-after-end-of-disk.txt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/Partition-ends-after-end-of-disk.txt</a></td><td class='right'>66</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/README</a></td><td class='right'>377</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.9%;'/><td class='none' style='width: 97.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/README.devel?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/README.devel</a></td><td class='right'>252</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/README.pxe?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/README.pxe</a></td><td class='right'>133</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/SHORTCUTS?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/SHORTCUTS</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/TODO?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/TODO</a></td><td class='right'>515</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.0%;'/><td class='none' style='width: 96.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/advocacy?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/advocacy</a></td><td class='right'>87</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/advocacy-interactive?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/advocacy-interactive</a></td><td class='right'>60</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/comparisons?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/comparisons</a></td><td class='right'>180</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/diskdrake.TODO?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/diskdrake.TODO</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/Makefile</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/dia_srcs/drakfont.dia?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/dia_srcs/drakfont.dia</a></td><td class='right'>bin</td><td class='graph'>4599 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/dia_srcs/drakfont_install.dia?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/dia_srcs/drakfont_install.dia</a></td><td class='right'>bin</td><td class='graph'>3662 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/dia_srcs/drakfont_uninstall.dia?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/dia_srcs/drakfont_uninstall.dia</a></td><td class='right'>bin</td><td class='graph'>1908 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/drakfont.jpg?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/drakfont.jpg</a></td><td class='right'>bin</td><td class='graph'>134044 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/drakfont.tex?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/drakfont.tex</a></td><td class='right'>152</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/drakfont_install.jpg?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/drakfont_install.jpg</a></td><td class='right'>bin</td><td class='graph'>86455 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/drakfont_uninstall.jpg?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/drakfont_uninstall.jpg</a></td><td class='right'>bin</td><td class='graph'>42291 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/drakfont/mandrake.ps?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/drakfont/mandrake.ps</a></td><td class='right'>534</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.2%;'/><td class='none' style='width: 95.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/draknet_advanced_doc.txt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/draknet_advanced_doc.txt</a></td><td class='right'>165</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/docs/interactive/ask_from?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/interactive/ask_from</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/docs/interactive/ask_from_list?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/interactive/ask_from_list</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/docs/interactive/ask_from_listf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/interactive/ask_from_listf</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/docs/interactive/ask_from_treelist?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/interactive/ask_from_treelist</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/docs/interactive/wait_message?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/interactive/wait_message</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/mdk-vs-redhat?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/mdk-vs-redhat</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/net_object_class.fig?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/net_object_class.fig</a></td><td class='right'>73</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/object_class.fig?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/object_class.fig</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/spec-DrakX-8.0.html?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/spec-DrakX-8.0.html</a></td><td class='right'>405</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.2%;'/><td class='none' style='width: 96.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/docs/wizard.doc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>docs/wizard.doc</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/isolinux-graphic.bmp?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>isolinux-graphic.bmp</a></td><td class='right'>bin</td><td class='graph'>480566 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/kernel/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/.cvsignore</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/kernel/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/Makefile</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/kernel/check_mar.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/check_mar.pl</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/kernel/list_modules.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/list_modules.pm</a></td><td class='right'>202</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/kernel/modules.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/modules.pl</a></td><td class='right'>166</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/kernel/update_kernel?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>kernel/update_kernel</a></td><td class='right'>100</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/live_update?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>live_update</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/make_boot_img?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>make_boot_img</a></td><td class='right'>571</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.5%;'/><td class='none' style='width: 95.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/.cvsignore</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/Makefile</a></td><td class='right'>260</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/Makefile.common?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/Makefile.common</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/Makefile.mkinitrd_helper?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/Makefile.mkinitrd_helper</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/adsl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/adsl.c</a></td><td class='right'>172</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/adsl.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/adsl.h</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/automatic.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/automatic.c</a></td><td class='right'>161</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/automatic.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/automatic.h</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/Makefile</a></td><td class='right'>55</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/blocksort.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/blocksort.c</a></td><td class='right'>1138</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.9%;'/><td class='none' style='width: 91.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/bzlib.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/bzlib.c</a></td><td class='right'>1567</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.2%;'/><td class='none' style='width: 87.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/bzlib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/bzlib.h</a></td><td class='right'>319</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.5%;'/><td class='none' style='width: 97.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/bzlib_private.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/bzlib_private.h</a></td><td class='right'>530</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.1%;'/><td class='none' style='width: 95.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/compress.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/compress.c</a></td><td class='right'>720</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.6%;'/><td class='none' style='width: 94.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/crctable.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/crctable.c</a></td><td class='right'>148</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/decompress.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/decompress.c</a></td><td class='right'>664</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.2%;'/><td class='none' style='width: 94.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/huffman.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/huffman.c</a></td><td class='right'>232</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/bzlib/randtable.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/bzlib/randtable.c</a></td><td class='right'>128</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/cdrom.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/cdrom.c</a></td><td class='right'>209</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/cdrom.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/cdrom.h</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/config-stage1.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/config-stage1.h</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dhcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dhcp.c</a></td><td class='right'>679</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.3%;'/><td class='none' style='width: 94.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dhcp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dhcp.h</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/.cvsignore</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/AUTHOR?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/AUTHOR</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/Makefile</a></td><td class='right'>146</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/README</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/Makefile.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/Makefile.add</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/__longjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/__longjmp.S</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/__time.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/__time.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/accept.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/accept.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/bind.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/bind.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/clone.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/clone.S</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/connect.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/connect.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/divl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/divl.S</a></td><td class='right'>101</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/divq.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/divq.S</a></td><td class='right'>102</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getegid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getegid.S</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/geteuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/geteuid.S</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getgid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getpeername.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getpeername.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getpid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getpid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getppid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getppid.S</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getsockname.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getsockname.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getsockopt.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getsockopt.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/getuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/getuid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/listen.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/listen.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/mmap.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/mmap.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/msgctl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/msgctl.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/msgget.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/msgget.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/msgrcv.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/msgrcv.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/msgsnd.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/msgsnd.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/pipe.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/pipe.S</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/recv.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/recv.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/recvfrom.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/recvfrom.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/recvmsg.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/recvmsg.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/reml.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/reml.S</a></td><td class='right'>101</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/remq.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/remq.S</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/semctl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/semctl.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/semget.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/semget.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/semop.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/semop.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/send.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/send.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/sendmsg.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/sendmsg.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/sendto.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/sendto.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/seteuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/seteuid.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/setjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/setjmp.S</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/setsockopt.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/setsockopt.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/shmat.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/shmat.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/shmctl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/shmctl.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/shmdt.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/shmdt.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/shmget.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/shmget.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/shutdown.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/shutdown.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/signal.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/signal.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/sigprocmask.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/sigprocmask.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/socket.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/socket.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/socketcall.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/socketcall.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/start.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/start.S</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/strlen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/strlen.c</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/time.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/time.S</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/unified.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/unified.S</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/utime.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/utime.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/alpha/waitpid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/alpha/waitpid.S</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/diet.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/diet.c</a></td><td class='right'>112</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dietdirent.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dietdirent.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dietfeatures.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dietfeatures.h</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dietstdarg.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dietstdarg.h</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dietstdio.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dietstdio.h</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dietwarning.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dietwarning.h</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/dirstream.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/dirstream.h</a></td><td class='right'>78</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/Makefile.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/Makefile.add</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/__longjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/__longjmp.S</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/__testandset.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/__testandset.S</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/clone.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/clone.S</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/mmap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/mmap.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/select.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/select.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/setjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/setjmp.S</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/start.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/start.S</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/i386/unified.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/i386/unified.S</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/alloca.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/alloca.h</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/arpa/inet.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/arpa/inet.h</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/arpa/nameser.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/arpa/nameser.h</a></td><td class='right'>217</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/assert.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/assert.h</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/ctype.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/ctype.h</a></td><td class='right'>28</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/daemon.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/daemon.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/dirent.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/dirent.h</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/dlfcn.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/dlfcn.h</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/elf.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/elf.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/endian.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/endian.h</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/errno.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/errno.h</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/fcntl.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/fcntl.h</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/features.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/features.h</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/fnmatch.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/fnmatch.h</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/ftw.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/ftw.h</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/getopt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/getopt.h</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/glob.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/glob.h</a></td><td class='right'>55</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/grp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/grp.h</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/inttypes.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/inttypes.h</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/limits.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/limits.h</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/locale.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/locale.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/malloc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/malloc.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/math.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/math.h</a></td><td class='right'>61</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/memory.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/memory.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/mntent.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/mntent.h</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/net/if.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/net/if.h</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/net/if_arp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/net/if_arp.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/net/route.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/net/route.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/netdb.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/netdb.h</a></td><td class='right'>90</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/netinet/in.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/netinet/in.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/netinet/in_systm.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/netinet/in_systm.h</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/netinet/ip.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/netinet/ip.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/paths.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/paths.h</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/pthread.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/pthread.h</a></td><td class='right'>227</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/pwd.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/pwd.h</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/regex.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/regex.h</a></td><td class='right'>67</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/resolv.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/resolv.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/auth.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/auth.h</a></td><td class='right'>213</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/auth_des.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/auth_des.h</a></td><td class='right'>112</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/auth_unix.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/auth_unix.h</a></td><td class='right'>90</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/clnt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/clnt.h</a></td><td class='right'>421</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.3%;'/><td class='none' style='width: 96.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/des_crypt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/des_crypt.h</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/key_prot.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/key_prot.h</a></td><td class='right'>346</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/netdb.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/netdb.h</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/pmap_clnt.h</a></td><td class='right'>98</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/pmap_prot.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/pmap_prot.h</a></td><td class='right'>108</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/pmap_rmt.h</a></td><td class='right'>68</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/rpc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/rpc.h</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/rpc_des.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/rpc_des.h</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/rpc_msg.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/rpc_msg.h</a></td><td class='right'>202</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/svc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/svc.h</a></td><td class='right'>316</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.5%;'/><td class='none' style='width: 97.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/svc_auth.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/svc_auth.h</a></td><td class='right'>54</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/types.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/types.h</a></td><td class='right'>78</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/rpc/xdr.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/rpc/xdr.h</a></td><td class='right'>379</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.0%;'/><td class='none' style='width: 97.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sched.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sched.h</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/scsi/scsi.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/scsi/scsi.h</a></td><td class='right'>224</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/scsi/sg.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/scsi/sg.h</a></td><td class='right'>274</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.1%;'/><td class='none' style='width: 97.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/setjmp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/setjmp.h</a></td><td class='right'>123</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/shadow.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/shadow.h</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/signal.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/signal.h</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/stdint.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/stdint.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/stdio.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/stdio.h</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/stdlib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/stdlib.h</a></td><td class='right'>67</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/string.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/string.h</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/strings.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/strings.h</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/cdefs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/cdefs.h</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/file.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/file.h</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/io.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/io.h</a></td><td class='right'>41</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/ioctl.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/ioctl.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/ipc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/ipc.h</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/kd.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/kd.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/mman.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/mman.h</a></td><td class='right'>33</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/mount.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/mount.h</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/msg.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/msg.h</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/mtio.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/mtio.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/param.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/param.h</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/poll.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/poll.h</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/ptrace.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/ptrace.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/reboot.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/reboot.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/resource.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/resource.h</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/select.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/select.h</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/sem.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/sem.h</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/sendfile.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/sendfile.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/shm.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/shm.h</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/signal.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/signal.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/socket.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/socket.h</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/stat.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/stat.h</a></td><td class='right'>52</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/syscall.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/syscall.h</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/sysinfo.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/sysinfo.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/syslog.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/syslog.h</a></td><td class='right'>102</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/time.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/time.h</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/times.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/times.h</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/types.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/types.h</a></td><td class='right'>33</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/uio.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/uio.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/un.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/un.h</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/utsname.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/utsname.h</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/vfs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/vfs.h</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/sys/wait.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/sys/wait.h</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/syslog.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/syslog.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/termios.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/termios.h</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/time.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/time.h</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/unistd.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/unistd.h</a></td><td class='right'>168</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/utime.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/utime.h</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/include/utmp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/include/utmp.h</a></td><td class='right'>73</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__dtostr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__dtostr.c</a></td><td class='right'>104</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__fstat64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__fstat64.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__getcwd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__getcwd.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__isnan.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__isnan.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__lltostr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__lltostr.c</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__lstat64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__lstat64.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__ltostr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__ltostr.c</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__stat64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__stat64.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__stat64_cvt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__stat64_cvt.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/__xmknod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/__xmknod.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/_brk.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/_brk.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/abort.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/abort.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/abs.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/abs.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/accept.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/accept.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/alarm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/alarm.c</a></td><td class='right'>47</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/alloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/alloc.c</a></td><td class='right'>243</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/assert_fail.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/assert_fail.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/atexit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/atexit.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/atof.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/atof.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/atoi.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/atoi.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/atol.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/atol.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/bind.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/bind.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/bsearch.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/bsearch.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/cfmakeraw.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/cfmakeraw.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/closedir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/closedir.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/connect.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/connect.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/creat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/creat.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/creat64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/creat64.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/errlist.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/errlist.c</a></td><td class='right'>132</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/errno_location.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/errno_location.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/exec_lib.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/exec_lib.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/exec_lib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/exec_lib.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/execl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/execl.c</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/execlp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/execlp.c</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/execv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/execv.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/execvp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/execvp.c</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/ftw.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/ftw.c</a></td><td class='right'>52</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getdomainname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getdomainname.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getenv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getenv.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/gethostname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/gethostname.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getopt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getopt.c</a></td><td class='right'>118</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getpeername.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getpeername.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getpgrp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getpgrp.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getservent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getservent.c</a></td><td class='right'>137</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getsockname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getsockname.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/getsockopt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/getsockopt.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/htonl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/htonl.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/htons.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/htons.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/if_indextoname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/if_indextoname.c</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/if_nametoindex.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/if_nametoindex.c</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isalnum.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isalnum.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isalpha.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isalpha.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isascii.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isascii.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isatty.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isatty.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isblank.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isblank.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/iscntrl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/iscntrl.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isdigit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isdigit.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isgraph.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isgraph.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/islower.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/islower.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isprint.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isprint.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/ispunct.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/ispunct.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isspace.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isspace.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isupper.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isupper.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/isxdigit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/isxdigit.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/listen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/listen.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/lockf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/lockf.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/longjmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/longjmp.c</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/lseek64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/lseek64.c</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memccmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memccmp.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memccpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memccpy.c</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memchr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memchr.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memcmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memcmp.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memcpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memcpy.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memmove.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memmove.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/memset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/memset.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/mkfifo.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/mkfifo.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/msgctl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/msgctl.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/msgget.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/msgget.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/msgrcv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/msgrcv.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/msgsnd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/msgsnd.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/nop.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/nop.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/open64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/open64.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/opendir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/opendir.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/perror.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/perror.c</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/pread.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/pread.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/pread64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/pread64.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/putenv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/putenv.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/puts.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/puts.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/qsort.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/qsort.c</a></td><td class='right'>125</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/raise.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/raise.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/rand.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/rand.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/random.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/random.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/readdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/readdir.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/reboot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/reboot.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/recv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/recv.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/recvfrom.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/recvfrom.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/recvmsg.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/recvmsg.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/remove.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/remove.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/rewind.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/rewind.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/rewinddir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/rewinddir.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sbrk.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sbrk.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/seekdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/seekdir.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/semctl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/semctl.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/semget.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/semget.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/semop.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/semop.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/send.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/send.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sendmsg.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sendmsg.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sendto.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sendto.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/set_errno.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/set_errno.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/setpgrp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/setpgrp.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/setsockopt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/setsockopt.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/shmat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/shmat.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/shmctl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/shmctl.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/shmdt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/shmdt.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/shmget.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/shmget.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/shutdown.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/shutdown.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigaddset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigaddset.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigdelset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigdelset.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigemptyset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigemptyset.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigfillset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigfillset.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigismember.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigismember.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sigjmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sigjmp.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sleep.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sleep.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/snprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/snprintf.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/socket.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/socket.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/speed.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/speed.c</a></td><td class='right'>67</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sprintf.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sscanf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sscanf.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strcasecmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strcasecmp.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strcat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strcat.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strchr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strchr.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strcmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strcmp.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strcpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strcpy.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strcspn.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strcspn.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strdup.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strdup.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strerror.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strerror.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strlcat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strlcat.c</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strlcpy.3?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strlcpy.3</a></td><td class='right'>169</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strlcpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strlcpy.c</a></td><td class='right'>68</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strlen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strlen.c</a></td><td class='right'>47</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strncasecmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strncasecmp.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strncat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strncat.c</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strncmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strncmp.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strncpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strncpy.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strpbrk.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strpbrk.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strrchr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strrchr.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strsep.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strsep.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strspn.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strspn.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strstr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strstr.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtod.c</a></td><td class='right'>52</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtok.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtok.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtok_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtok_r.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtol.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtol.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtoll.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtoll.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtoul.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtoul.c</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/strtoull.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/strtoull.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/sys_siglist.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/sys_siglist.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcdrain.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcdrain.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcflush.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcflush.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcgetattr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcgetattr.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcgetpgrp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcgetpgrp.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcsetattr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcsetattr.c</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tcsetpgrp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tcsetpgrp.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/telldir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/telldir.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/tolower.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/tolower.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/toupper.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/toupper.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/ttyname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/ttyname.c</a></td><td class='right'>59</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/usleep.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/usleep.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vfork.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vfork.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vfprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vfprintf.c</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vprintf.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vsnprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vsnprintf.c</a></td><td class='right'>238</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vsprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vsprintf.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/vsscanf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/vsscanf.c</a></td><td class='right'>304</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/wait.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/wait.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/lib/wait3.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/lib/wait3.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/___div.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/___div.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/dnscruft.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/dnscruft.c</a></td><td class='right'>115</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/dnscruft2.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/dnscruft2.c</a></td><td class='right'>185</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/entlib.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/entlib.c</a></td><td class='right'>153</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/entlib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/entlib.h</a></td><td class='right'>44</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getdtablesize.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getdtablesize.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getgrgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getgrgid.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getgrnam.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getgrnam.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyaddr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyaddr.c</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyname.c</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyname2.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyname2.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/gethostbyname_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/gethostbyname_r.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getlogin.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getlogin.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getpagesize.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getpagesize.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getpass.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getpass.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getpwnam.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getpwnam.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getpwuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getpwuid.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/getspnam.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/getspnam.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/grent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/grent.c</a></td><td class='right'>54</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/h_errno.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/h_errno.c</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/herrno_location.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/herrno_location.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_addr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_addr.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_aton.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_aton.c</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_ntoa.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_ntoa.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_ntop.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_ntop.c</a></td><td class='right'>75</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/inet_pton.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/inet_pton.c</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/initgroups.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/initgroups.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/mkstemp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/mkstemp.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/pwent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/pwent.c</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/res_init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/res_init.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcruft/spent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcruft/spent.c</a></td><td class='right'>45</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libcrypt/crypt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libcrypt/crypt.c</a></td><td class='right'>309</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/Makefile</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/README</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/_dl_int.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/_dl_int.h</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/_dl_jump.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/_dl_jump.S</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/_dl_open.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/_dl_open.c</a></td><td class='right'>207</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/_dl_search.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/_dl_search.c</a></td><td class='right'>84</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/dlclose.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/dlclose.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/dlerror.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/dlerror.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/dlopen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/dlopen.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/dlsym.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/dlsym.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libdl/elf_hash.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libdl/elf_hash.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/liblatin1/latin1-islower.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/liblatin1/latin1-islower.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/liblatin1/latin1-isprint.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/liblatin1/latin1-isprint.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/liblatin1/latin1-isupper.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/liblatin1/latin1-isupper.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/CHANGES?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/CHANGES</a></td><td class='right'>45</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/Makefile</a></td><td class='right'>139</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/README</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_atfork.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_atfork.c</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_init.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cancel.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cancel.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_init.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_condattr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_condattr.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_create.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_create.c</a></td><td class='right'>76</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_detach.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_detach.c</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_exit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_exit.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_getspecific.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_getspecific.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_join.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_join.c</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_key_create.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_key_create.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_key_delete.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_key_delete.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c</a></td><td class='right'>33</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c</a></td><td class='right'>15</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_once.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_once.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_self.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_self.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_setspecific.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_setspecific.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_spinlock.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_spinlock.c</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_close.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_close.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_create.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_create.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_open.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_open.c</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_read.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_read.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_sys_write.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_sys_write.c</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/pthread_testcancel.c</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/test.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/test.c</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/thread_internal.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/thread_internal.c</a></td><td class='right'>344</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/thread_internal.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/thread_internal.h</a></td><td class='right'>131</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libpthread/thread_key.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libpthread/thread_key.c</a></td><td class='right'>41</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libregex/rx.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libregex/rx.c</a></td><td class='right'>434</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/auth_none.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/auth_none.c</a></td><td class='right'>128</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/auth_unix.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/auth_unix.c</a></td><td class='right'>313</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/authunix_prot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/authunix_prot.c</a></td><td class='right'>69</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/bindresvport.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/bindresvport.c</a></td><td class='right'>79</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_generic.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_generic.c</a></td><td class='right'>112</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_perror.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_perror.c</a></td><td class='right'>302</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_raw.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_raw.c</a></td><td class='right'>230</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_simple.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_simple.c</a></td><td class='right'>116</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_tcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_tcp.c</a></td><td class='right'>463</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/clnt_udp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/clnt_udp.c</a></td><td class='right'>437</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/get_myaddress.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/get_myaddress.c</a></td><td class='right'>69</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/getrpcent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/getrpcent.c</a></td><td class='right'>274</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.1%;'/><td class='none' style='width: 97.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/getrpcport.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/getrpcport.c</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_clnt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_clnt.c</a></td><td class='right'>118</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_getmaps.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_getmaps.c</a></td><td class='right'>85</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_getport.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_getport.c</a></td><td class='right'>90</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_prot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_prot.c</a></td><td class='right'>58</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_prot2.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_prot2.c</a></td><td class='right'>116</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/pmap_rmt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/pmap_rmt.c</a></td><td class='right'>403</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.1%;'/><td class='none' style='width: 96.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/rpc_callmsg.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/rpc_callmsg.c</a></td><td class='right'>189</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/rpc_commondata.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/rpc_commondata.c</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/rpc_dtablesize.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/rpc_dtablesize.c</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/rpc_prot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/rpc_prot.c</a></td><td class='right'>281</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.2%;'/><td class='none' style='width: 97.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc.c</a></td><td class='right'>479</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.7%;'/><td class='none' style='width: 96.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_auth.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_auth.c</a></td><td class='right'>115</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_auth_unix.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_auth_unix.c</a></td><td class='right'>136</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_raw.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_raw.c</a></td><td class='right'>159</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_run.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_run.c</a></td><td class='right'>71</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_simple.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_simple.c</a></td><td class='right'>144</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_tcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_tcp.c</a></td><td class='right'>406</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.2%;'/><td class='none' style='width: 96.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/svc_udp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/svc_udp.c</a></td><td class='right'>467</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr.c</a></td><td class='right'>536</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.2%;'/><td class='none' style='width: 95.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_array.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_array.c</a></td><td class='right'>152</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_float.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_float.c</a></td><td class='right'>284</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.2%;'/><td class='none' style='width: 97.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_mem.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_mem.c</a></td><td class='right'>180</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_rec.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_rec.c</a></td><td class='right'>573</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.5%;'/><td class='none' style='width: 95.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_reference.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_reference.c</a></td><td class='right'>130</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/librpc/xdr_stdio.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/librpc/xdr_stdio.c</a></td><td class='right'>187</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libshell/fnmatch.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libshell/fnmatch.c</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libshell/glob.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libshell/glob.c</a></td><td class='right'>350</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libshell/realpath.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libshell/realpath.c</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/clearerr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/clearerr.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fclose.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fclose.c</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fdglue.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fdglue.c</a></td><td class='right'>52</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fdopen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fdopen.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/feof.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/feof.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/ferror.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/ferror.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fflush.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fflush.c</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fgetc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fgetc.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fgets.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fgets.c</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fileno.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fileno.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fopen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fopen.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fprintf.c</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fputc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fputc.c</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fputs.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fputs.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fread.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fread.c</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/freopen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/freopen.c</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fseek.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fseek.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/ftell.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/ftell.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/fwrite.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/fwrite.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/printf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/printf.c</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/putchar.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/putchar.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/setvbuf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/setvbuf.c</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/stderr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/stderr.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/stdin.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/stdin.c</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/stdout.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/stdout.c</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libstdio/ungetc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libstdio/ungetc.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/asctime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/asctime.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/asctime_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/asctime_r.c</a></td><td class='right'>29</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/asprintf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/asprintf.c</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/ctime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/ctime.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/daemon.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/daemon.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/endmntent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/endmntent.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/facilitynames.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/facilitynames.c</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/getmntent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/getmntent.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/getprotoent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/getprotoent.c</a></td><td class='right'>130</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/gmtime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/gmtime.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/gmtime_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/gmtime_r.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/isleap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/isleap.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/localtime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/localtime.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/localtime_r.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/localtime_r.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/logging.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/logging.c</a></td><td class='right'>211</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/mktime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/mktime.c</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/pclose.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/pclose.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/popen.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/popen.c</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/prioritynames.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/prioritynames.c</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/setenv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/setenv.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/setmntent.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/setmntent.c</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/strftime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/strftime.c</a></td><td class='right'>182</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/strsignal.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/strsignal.c</a></td><td class='right'>92</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/system.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/system.c</a></td><td class='right'>69</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/time_table_spd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/time_table_spd.c</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/tzfile.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/tzfile.c</a></td><td class='right'>86</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/libugly/unsetenv.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/libugly/unsetenv.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/Makefile.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/Makefile.add</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/__longjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/__longjmp.S</a></td><td class='right'>59</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/__testandset.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/__testandset.S</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/mmap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/mmap.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/setjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/setjmp.S</a></td><td class='right'>56</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/start.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/start.S</a></td><td class='right'>44</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/ppc/unified.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/ppc/unified.S</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/Makefile.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/Makefile.add</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/__longjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/__longjmp.S</a></td><td class='right'>67</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/__testandset.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/__testandset.S</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/clone.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/clone.S</a></td><td class='right'>45</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/fork.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/fork.S</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/mmap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/mmap.c</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/pipe.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/pipe.S</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/setjmp.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/setjmp.S</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/shmat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/shmat.c</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/start.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/start.S</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/udiv.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/udiv.S</a></td><td class='right'>363</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/umul.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/umul.S</a></td><td class='right'>170</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/unified.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/unified.S</a></td><td class='right'>28</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/sparc/urem.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/sparc/urem.S</a></td><td class='right'>362</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/start.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/start.h</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/_llseek.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/_llseek.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/_newselect.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/_newselect.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/access.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/access.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/chdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/chdir.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/chmod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/chmod.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/chown.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/chown.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/chroot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/chroot.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/clone.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/clone.c</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/close.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/close.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/dup.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/dup.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/dup2.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/dup2.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/execve.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/execve.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/exit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/exit.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fchdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fchdir.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fchmod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fchmod.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fchown.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fchown.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fcntl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fcntl.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/flock.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/flock.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fork.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fork.c</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/fsync.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/fsync.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/ftruncate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/ftruncate.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getcwd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getcwd.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getdents.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getdents.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getegid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getegid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/geteuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/geteuid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getgid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getgroups.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getgroups.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getpgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getpgid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getpid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getpid.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getppid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getppid.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getpriority.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getpriority.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getresgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getresgid.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getresuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getresuid.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getrlimit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getrlimit.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getrusage.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getrusage.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getsid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getsid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/gettimeofday.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/getuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/getuid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/ioctl.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/ioctl.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/kill.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/kill.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/lchown.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/lchown.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/link.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/link.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/lseek.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/lseek.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/mkdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/mkdir.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/mknod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/mknod.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/mount.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/mount.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/mprotect.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/mprotect.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/mremap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/mremap.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/munmap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/munmap.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/nanosleep.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/nanosleep.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/open.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/open.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/pipe.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/pipe.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/poll.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/poll.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/read.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/read.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/readlink.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/readlink.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/reboot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/reboot.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/rename.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/rename.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/rmdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/rmdir.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setdomainname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setdomainname.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setgid.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setgroups.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setgroups.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sethostname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sethostname.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setitimer.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setitimer.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setpgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setpgid.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setpriority.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setpriority.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setregid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setregid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setresgid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setresgid.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setresuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setresuid.c</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setreuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setreuid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setrlimit.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setrlimit.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setsid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setsid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/setuid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/setuid.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sigaction.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sigaction.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/signal.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/signal.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sigpending.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sigpending.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sigprocmask.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sigsuspend.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/socketcall.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/socketcall.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/swapoff.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/swapoff.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/swapon.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/swapon.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/symlink.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/symlink.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/sync.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/sync.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/syslog.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/syslog.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/time.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/time.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/truncate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/truncate.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/umask.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/umask.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/umount.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/umount.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/uname.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/uname.c</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/unlink.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/unlink.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/utime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/utime.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/vhangup.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/vhangup.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/wait4.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/wait4.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/waitpid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/waitpid.c</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.c/write.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.c/write.c</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.h</a></td><td class='right'>142</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/__getpagesize.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/__getpagesize.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/__pread.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/__pread.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/__reboot.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/__reboot.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/_llseek.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/_llseek.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/access.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/access.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/brk.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/brk.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/chdir.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/chdir.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/chmod.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/chmod.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/chown.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/chown.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/chroot.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/chroot.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/close.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/close.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/dup.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/dup.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/dup2.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/dup2.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/execve.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/execve.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/exit.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/exit.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fchdir.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fchdir.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fchmod.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fchmod.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fchown.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fchown.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fcntl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fcntl.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/flock.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/flock.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fork.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fork.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fstat.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fstat.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fstat64.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fstat64.S</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fstatfs.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fstatfs.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/fsync.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/fsync.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/ftruncate.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/ftruncate.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getcwd.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getcwd.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getdents.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getdents.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getdents64.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getdents64.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getegid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getegid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/geteuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/geteuid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getgid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getgroups.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getgroups.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getitimer.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getitimer.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getpgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getpgid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getpid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getpid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getppid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getppid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getpriority.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getpriority.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getresgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getresgid.S</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getresuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getresuid.S</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getrlimit.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getrlimit.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getrusage.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getrusage.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getsid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getsid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/gettimeofday.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/gettimeofday.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/getuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/getuid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/ioctl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/ioctl.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/ioperm.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/ioperm.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/iopl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/iopl.S</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/ipc.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/ipc.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/kill.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/kill.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/lchown.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/lchown.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/link.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/link.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/llseek.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/llseek.S</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/lseek.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/lseek.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/lstat.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/lstat.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/lstat64.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/lstat64.S</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mkdir.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mkdir.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mknod.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mknod.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mlockall.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mlockall.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mount.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mount.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mprotect.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mprotect.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/mremap.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/mremap.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/munlockall.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/munlockall.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/munmap.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/munmap.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/nanosleep.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/nanosleep.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/nice.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/nice.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/open.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/open.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/pause.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/pause.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/personality.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/personality.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/pipe.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/pipe.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/poll.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/poll.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/ptrace.s?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/ptrace.s</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/pwrite.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/pwrite.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/query_module.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/query_module.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/read.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/read.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/readlink.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/readlink.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/readv.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/readv.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/rename.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/rename.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/rmdir.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/rmdir.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_getparam.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_getparam.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_setparam.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_setparam.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sched_yield.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sched_yield.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/select.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/select.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sendfile.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sendfile.S</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setdomainname.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setdomainname.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setgid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setgroups.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setgroups.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sethostname.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sethostname.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setitimer.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setitimer.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setpgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setpgid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setpriority.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setpriority.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setregid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setregid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setresgid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setresgid.S</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setresuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setresuid.S</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setreuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setreuid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setrlimit.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setrlimit.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setsid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setsid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/setuid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/setuid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sigaction.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sigaction.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sigaltstack.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sigaltstack.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/signal.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/signal.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sigpending.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sigpending.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sigprocmask.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sigsuspend.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/socketcall.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/socketcall.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/stat.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/stat.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/stat64.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/stat64.S</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/statfs.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/statfs.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/stime.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/stime.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/swapoff.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/swapoff.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/swapon.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/swapon.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/symlink.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/symlink.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sync.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sync.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sysctl.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sysctl.S</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/sysinfo.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/sysinfo.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/syslog.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/syslog.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/time.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/time.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/times.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/times.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/truncate.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/truncate.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/umask.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/umask.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/umount.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/umount.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/umount2.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/umount2.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/uname.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/uname.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/unlink.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/unlink.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/utime.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/utime.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/vhangup.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/vhangup.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/wait4.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/wait4.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/waitpid.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/waitpid.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/write.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/write.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dietlibc/syscalls.s/writev.S?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dietlibc/syscalls.s/writev.S</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/disk.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/disk.c</a></td><td class='right'>343</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/disk.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/disk.h</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dns.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dns.c</a></td><td class='right'>213</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/dns.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/dns.h</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/HACKING?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/HACKING</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/README</a></td><td class='right'>185</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/TECH-INFOS?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/TECH-INFOS</a></td><td class='right'>91</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/UPDATEMODULES?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/UPDATEMODULES</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/WHY-DIETLIBC?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/WHY-DIETLIBC</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/doc/documented..frontend.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/doc/documented..frontend.h</a></td><td class='right'>69</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/frontend-common.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/frontend-common.c</a></td><td class='right'>47</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/frontend.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/frontend.h</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-data/emptyboot.img.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-data/emptyboot.img.bz2</a></td><td class='right'>bin</td><td class='graph'>6342 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-data/msgboot-blank.img.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-data/msgboot-blank.img.bz2</a></td><td class='right'>bin</td><td class='graph'>14592 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2</a></td><td class='right'>bin</td><td class='graph'>30301 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-data/msgboot-graphicallogo.img.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-data/msgboot-graphicallogo.img.bz2</a></td><td class='right'>bin</td><td class='graph'>33777 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-data/msgboot.img.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-data/msgboot.img.bz2</a></td><td class='right'>bin</td><td class='graph'>30881 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init-libc-headers.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init-libc-headers.h</a></td><td class='right'>44</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/init.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/init.c</a></td><td class='right'>468</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/.cvsignore</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/Config.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/Config.h</a></td><td class='right'>132</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/Makefile</a></td><td class='right'>65</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/README</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/busybox.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/busybox.h</a></td><td class='right'>467</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/insmod-frontend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/insmod-frontend.c</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/insmod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/insmod.c</a></td><td class='right'>2951</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 23.0%;'/><td class='none' style='width: 77.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/loop.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/loop.h</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/messages.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/messages.c</a></td><td class='right'>90</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-busybox/utility.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-busybox/utility.c</a></td><td class='right'>1759</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 13.7%;'/><td class='none' style='width: 86.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/Makefile</a></td><td class='right'>63</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/config.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/config.h</a></td><td class='right'>105</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_alpha.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_alpha.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_arm.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_arm.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_hppa.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_hppa.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_hppa64.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_hppa64.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_i386.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_i386.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_ia64.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_ia64.h</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_m68k.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_m68k.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_mips.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_mips.h</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_ppc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_ppc.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_s390.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_s390.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_sparc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_sparc.h</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/elf_sparc64.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/elf_sparc64.h</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/kallsyms.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/kallsyms.h</a></td><td class='right'>131</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/kerneld.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/kerneld.h</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/modstat.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/modstat.h</a></td><td class='right'>55</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/module.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/module.h</a></td><td class='right'>210</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/obj.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/obj.h</a></td><td class='right'>275</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.1%;'/><td class='none' style='width: 97.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/util.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/util.h</a></td><td class='right'>101</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/include/version.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/include/version.h</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/insmod-frontend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/insmod-frontend.c</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/insmod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/insmod.c</a></td><td class='right'>1964</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 15.3%;'/><td class='none' style='width: 84.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/Makefile</a></td><td class='right'>33</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_alpha.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_alpha.c</a></td><td class='right'>305</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_arm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_arm.c</a></td><td class='right'>318</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.5%;'/><td class='none' style='width: 97.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_common.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_common.c</a></td><td class='right'>399</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.1%;'/><td class='none' style='width: 96.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_hppa.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_hppa.c</a></td><td class='right'>668</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.2%;'/><td class='none' style='width: 94.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_hppa64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_hppa64.c</a></td><td class='right'>686</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.3%;'/><td class='none' style='width: 94.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_i386.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_i386.c</a></td><td class='right'>245</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_ia64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_ia64.c</a></td><td class='right'>1065</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.3%;'/><td class='none' style='width: 91.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_kallsyms.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_kallsyms.c</a></td><td class='right'>292</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_load.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_load.c</a></td><td class='right'>354</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_m68k.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_m68k.c</a></td><td class='right'>147</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_mips.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_mips.c</a></td><td class='right'>238</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_ppc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_ppc.c</a></td><td class='right'>255</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_reloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_reloc.c</a></td><td class='right'>435</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_s390.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_s390.c</a></td><td class='right'>245</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_sparc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_sparc.c</a></td><td class='right'>226</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/obj/obj_sparc64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/obj/obj_sparc64.c</a></td><td class='right'>352</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/Makefile</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/alias.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/alias.h</a></td><td class='right'>244</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/arch64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/arch64.c</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/config.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/config.c</a></td><td class='right'>1591</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.4%;'/><td class='none' style='width: 87.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/gzfiles.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/gzfiles.c</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/logger.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/logger.c</a></td><td class='right'>163</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/meta_expand.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/meta_expand.c</a></td><td class='right'>339</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/modstat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/modstat.c</a></td><td class='right'>419</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.3%;'/><td class='none' style='width: 96.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/snap_shot.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/snap_shot.c</a></td><td class='right'>154</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_cm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_cm.c</a></td><td class='right'>88</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_dm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_dm.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_gks.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_gks.c</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_nim.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_nim.c</a></td><td class='right'>53</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_oim.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_oim.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/sys_qm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/sys_qm.c</a></td><td class='right'>56</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xftw.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xftw.c</a></td><td class='right'>422</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.3%;'/><td class='none' style='width: 96.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xmalloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xmalloc.c</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xrealloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xrealloc.c</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xstrcat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xstrcat.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xstrdup.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xstrdup.c</a></td><td class='right'>41</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod-modutils/util/xsystem.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod-modutils/util/xsystem.c</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/insmod.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/insmod.h</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/linux-2.2/nfs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/linux-2.2/nfs.h</a></td><td class='right'>226</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/linux-2.2/nfs_mount.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/linux-2.2/nfs_mount.h</a></td><td class='right'>53</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/log.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/log.c</a></td><td class='right'>89</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/log.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/log.h</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/lomount.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/lomount.c</a></td><td class='right'>171</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/lomount.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/lomount.h</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/Makefile</a></td><td class='right'>61</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/mar-extract-only.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/mar-extract-only.c</a></td><td class='right'>208</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/mar-extract-only.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/mar-extract-only.h</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/mar-frontend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/mar-frontend.c</a></td><td class='right'>199</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mar/mar.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mar/mar.h</a></td><td class='right'>70</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/minilibc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/minilibc.c</a></td><td class='right'>251</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/minilibc.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/minilibc.h</a></td><td class='right'>144</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mkinitrd_helper/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mkinitrd_helper/Makefile</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mkinitrd_helper/mkinitrd_helper.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mkinitrd_helper/mkinitrd_helper.c</a></td><td class='right'>308</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/modules.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/modules.c</a></td><td class='right'>437</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/modules.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/modules.h</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/modules_descr.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/modules_descr.h</a></td><td class='right'>66</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mount.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mount.c</a></td><td class='right'>189</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mount.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mount.h</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/mount_rpcgen.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/mount_rpcgen.h</a></td><td class='right'>208</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/network.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/network.c</a></td><td class='right'>833</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.5%;'/><td class='none' style='width: 93.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/network.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/network.h</a></td><td class='right'>61</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt-frontend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt-frontend.c</a></td><td class='right'>406</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.2%;'/><td class='none' style='width: 96.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/Makefile</a></td><td class='right'>56</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/button.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/button.c</a></td><td class='right'>190</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/buttonbar.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/buttonbar.c</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/checkbox.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/checkbox.c</a></td><td class='right'>290</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/checkboxtree.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/checkboxtree.c</a></td><td class='right'>714</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.6%;'/><td class='none' style='width: 94.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/entry.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/entry.c</a></td><td class='right'>376</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.9%;'/><td class='none' style='width: 97.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/form.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/form.c</a></td><td class='right'>712</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.5%;'/><td class='none' style='width: 94.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/grid.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/grid.c</a></td><td class='right'>389</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.0%;'/><td class='none' style='width: 97.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/label.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/label.c</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/listbox.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/listbox.c</a></td><td class='right'>752</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.9%;'/><td class='none' style='width: 94.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/newt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/newt.c</a></td><td class='right'>672</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.2%;'/><td class='none' style='width: 94.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/newt.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/newt.h</a></td><td class='right'>362</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/newt_pr.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/newt_pr.h</a></td><td class='right'>82</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/scale.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/scale.c</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/scrollbar.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/scrollbar.c</a></td><td class='right'>124</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/textbox.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/textbox.c</a></td><td class='right'>409</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.2%;'/><td class='none' style='width: 96.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/newt/windows.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/newt/windows.c</a></td><td class='right'>275</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.1%;'/><td class='none' style='width: 97.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/nfsmount.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/nfsmount.c</a></td><td class='right'>294</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/nfsmount.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/nfsmount.h</a></td><td class='right'>328</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pci-resource/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pci-resource/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pci-resource/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pci-resource/Makefile</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pci-resource/update-pci-ids.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pci-resource/update-pci-ids.pl</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/Makefile</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/bulkmem.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/bulkmem.h</a></td><td class='right'>195</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cardmgr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cardmgr.c</a></td><td class='right'>1652</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.9%;'/><td class='none' style='width: 87.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cardmgr.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cardmgr.h</a></td><td class='right'>112</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cirrus.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cirrus.h</a></td><td class='right'>182</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cistpl.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cistpl.h</a></td><td class='right'>604</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.7%;'/><td class='none' style='width: 95.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cs.h</a></td><td class='right'>465</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/cs_types.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/cs_types.h</a></td><td class='right'>65</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/driver_ops.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/driver_ops.h</a></td><td class='right'>82</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/ds.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/ds.h</a></td><td class='right'>163</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/i82365.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/i82365.h</a></td><td class='right'>154</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/lex_config.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/lex_config.c</a></td><td class='right'>2053</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 16.0%;'/><td class='none' style='width: 84.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/merge_from_pcitable?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/merge_from_pcitable</a></td><td class='right'>51</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/pcmcia.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/pcmcia.h</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/probe.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/probe.c</a></td><td class='right'>509</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.0%;'/><td class='none' style='width: 96.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/tcic.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/tcic.h</a></td><td class='right'>266</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.1%;'/><td class='none' style='width: 97.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/version.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/version.h</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/vg468.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/vg468.h</a></td><td class='right'>112</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/yacc_config.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/yacc_config.c</a></td><td class='right'>1015</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.9%;'/><td class='none' style='width: 92.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/pcmcia_/yacc_config.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/pcmcia_/yacc_config.h</a></td><td class='right'>37</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/Changes-2.3?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/Changes-2.3</a></td><td class='right'>441</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/FAQ?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/FAQ</a></td><td class='right'>634</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.9%;'/><td class='none' style='width: 95.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/PLUGINS?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/PLUGINS</a></td><td class='right'>131</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README</a></td><td class='right'>168</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README.MSCHAP80?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README.MSCHAP80</a></td><td class='right'>284</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.2%;'/><td class='none' style='width: 97.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README.cbcp?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README.cbcp</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README.linux</a></td><td class='right'>297</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README.sol2</a></td><td class='right'>220</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/README.sunos4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/README.sunos4</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/SETUP?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/SETUP</a></td><td class='right'>111</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/Makefile.linux</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/Makefile.linux.makeopt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/Makefile.linux.makeopt</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/Makefile.sol2</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/Makefile.sunos4</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/chat.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/chat.8</a></td><td class='right'>515</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.0%;'/><td class='none' style='width: 96.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/chat/chat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/chat/chat.c</a></td><td class='right'>1756</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 13.7%;'/><td class='none' style='width: 86.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/common/zlib.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/common/zlib.c</a></td><td class='right'>5376</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 41.9%;'/><td class='none' style='width: 58.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/common/zlib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/common/zlib.h</a></td><td class='right'>1010</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.9%;'/><td class='none' style='width: 92.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/configure?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/configure</a></td><td class='right'>141</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c</a></td><td class='right'>92</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c</a></td><td class='right'>218</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/etc.ppp/chap-secrets?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/etc.ppp/chap-secrets</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/etc.ppp/options?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/etc.ppp/options</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/etc.ppp/options.options?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/etc.ppp/options.options</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/etc.ppp/pap-secrets?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/etc.ppp/pap-secrets</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/linux/if_ppp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/linux/if_ppp.h</a></td><td class='right'>155</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/linux/if_pppvar.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/linux/if_pppvar.h</a></td><td class='right'>138</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/linux/ppp-comp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/linux/ppp-comp.h</a></td><td class='right'>203</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.6%;'/><td class='none' style='width: 98.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/linux/ppp_defs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/linux/ppp_defs.h</a></td><td class='right'>185</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/if_ppp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/if_ppp.h</a></td><td class='right'>133</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/ppp-comp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/ppp-comp.h</a></td><td class='right'>165</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/ppp_defs.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/ppp_defs.h</a></td><td class='right'>184</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/pppio.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/pppio.h</a></td><td class='right'>99</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/slcompress.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/slcompress.h</a></td><td class='right'>148</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/net/vjcompress.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/net/vjcompress.h</a></td><td class='right'>144</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/include/pcap-int.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/include/pcap-int.h</a></td><td class='right'>117</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/linux/Makefile.top?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/linux/Makefile.top</a></td><td class='right'>55</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/bsd-comp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/bsd-comp.c</a></td><td class='right'>1116</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.7%;'/><td class='none' style='width: 91.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/deflate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/deflate.c</a></td><td class='right'>760</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.9%;'/><td class='none' style='width: 94.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/if_ppp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/if_ppp.c</a></td><td class='right'>865</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.7%;'/><td class='none' style='width: 93.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/ppp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/ppp.c</a></td><td class='right'>2486</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 19.4%;'/><td class='none' style='width: 80.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/ppp_ahdlc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/ppp_ahdlc.c</a></td><td class='right'>878</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.8%;'/><td class='none' style='width: 93.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/ppp_comp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/ppp_comp.c</a></td><td class='right'>1126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.8%;'/><td class='none' style='width: 91.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/ppp_mod.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/ppp_mod.h</a></td><td class='right'>190</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/modules/vjcompress.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/modules/vjcompress.c</a></td><td class='right'>587</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.6%;'/><td class='none' style='width: 95.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/.cvsignore</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile</a></td><td class='right'>59</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile.linux</a></td><td class='right'>129</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile.linux.make?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile.linux.make</a></td><td class='right'>131</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile.linux.makeopt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile.linux.makeopt</a></td><td class='right'>129</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile.sol2</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/Makefile.sunos4</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/auth.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/auth.c</a></td><td class='right'>1939</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 15.1%;'/><td class='none' style='width: 84.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/cbcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/cbcp.c</a></td><td class='right'>456</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/cbcp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/cbcp.h</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ccp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ccp.c</a></td><td class='right'>1257</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 9.8%;'/><td class='none' style='width: 90.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ccp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ccp.h</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/chap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/chap.c</a></td><td class='right'>860</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.7%;'/><td class='none' style='width: 93.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/chap.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/chap.h</a></td><td class='right'>124</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/chap_ms.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/chap_ms.c</a></td><td class='right'>338</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/chap_ms.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/chap_ms.h</a></td><td class='right'>33</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/demand.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/demand.c</a></td><td class='right'>351</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/eui64.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/eui64.c</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/eui64.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/eui64.h</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/fsm.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/fsm.c</a></td><td class='right'>762</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.9%;'/><td class='none' style='width: 94.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/fsm.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/fsm.h</a></td><td class='right'>144</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipcp.c</a></td><td class='right'>2054</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 16.0%;'/><td class='none' style='width: 84.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipcp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipcp.h</a></td><td class='right'>73</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipv6cp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipv6cp.c</a></td><td class='right'>1512</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 11.8%;'/><td class='none' style='width: 88.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipv6cp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipv6cp.h</a></td><td class='right'>126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipxcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipxcp.c</a></td><td class='right'>1570</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.2%;'/><td class='none' style='width: 87.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ipxcp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ipxcp.h</a></td><td class='right'>71</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/lcp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/lcp.c</a></td><td class='right'>2224</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 17.3%;'/><td class='none' style='width: 82.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/lcp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/lcp.h</a></td><td class='right'>95</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/magic.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/magic.c</a></td><td class='right'>88</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/magic.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/magic.h</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/main.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/main.c</a></td><td class='right'>1846</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 14.4%;'/><td class='none' style='width: 85.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/md4.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/md4.c</a></td><td class='right'>298</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/md4.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/md4.h</a></td><td class='right'>64</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/md5.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/md5.c</a></td><td class='right'>309</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/md5.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/md5.h</a></td><td class='right'>58</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/multilink.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/multilink.c</a></td><td class='right'>397</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.1%;'/><td class='none' style='width: 96.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/options.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/options.c</a></td><td class='right'>1513</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 11.8%;'/><td class='none' style='width: 88.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/patchlevel.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/patchlevel.h</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/pathnames.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/pathnames.h</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/plugins/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/plugins/Makefile.linux</a></td><td class='right'>19</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/plugins/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/plugins/Makefile.sol2</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/plugins/minconn.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/plugins/minconn.c</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/plugins/passprompt.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/plugins/passprompt.c</a></td><td class='right'>108</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/ppp.pam?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/ppp.pam</a></td><td class='right'>6</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/pppd.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/pppd.8</a></td><td class='right'>1591</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.4%;'/><td class='none' style='width: 87.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/pppd.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/pppd.h</a></td><td class='right'>787</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.1%;'/><td class='none' style='width: 93.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/pppd.h.wtmp?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/pppd.h.wtmp</a></td><td class='right'>789</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.1%;'/><td class='none' style='width: 93.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/sys-linux.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/sys-linux.c</a></td><td class='right'>2672</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 20.8%;'/><td class='none' style='width: 79.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/sys-linux.c.wtmp?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/sys-linux.c.wtmp</a></td><td class='right'>2750</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 21.4%;'/><td class='none' style='width: 78.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/sys-solaris.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/sys-solaris.c</a></td><td class='right'>2737</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 21.3%;'/><td class='none' style='width: 78.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/sys-sunos4.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/sys-sunos4.c</a></td><td class='right'>1559</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.2%;'/><td class='none' style='width: 87.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/tdb.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/tdb.c</a></td><td class='right'>1282</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 10.0%;'/><td class='none' style='width: 90.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/tdb.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/tdb.h</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/tty.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/tty.c</a></td><td class='right'>1164</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 9.1%;'/><td class='none' style='width: 90.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/upap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/upap.c</a></td><td class='right'>640</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.0%;'/><td class='none' style='width: 95.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/upap.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/upap.h</a></td><td class='right'>87</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppd/utils.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppd/utils.c</a></td><td class='right'>949</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.4%;'/><td class='none' style='width: 92.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/Makefile.linux</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/Makefile.linux.makeopt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/Makefile.linux.makeopt</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/Makefile.linux.pppdump-Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/Makefile.linux.pppdump-Makefile</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/Makefile.sol2</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/Makefile.sunos4</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/bsd-comp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/bsd-comp.c</a></td><td class='right'>750</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.8%;'/><td class='none' style='width: 94.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/deflate.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/deflate.c</a></td><td class='right'>344</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/ppp-comp.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/ppp-comp.h</a></td><td class='right'>150</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/pppdump.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/pppdump.8</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/pppdump.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/pppdump.c</a></td><td class='right'>502</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.9%;'/><td class='none' style='width: 96.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/zlib.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/zlib.c</a></td><td class='right'>4614</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 36.0%;'/><td class='none' style='width: 64.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppdump/zlib.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppdump/zlib.h</a></td><td class='right'>631</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.9%;'/><td class='none' style='width: 95.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppstats/Makefile.linux?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppstats/Makefile.linux</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppstats/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppstats/Makefile.sol2</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppstats/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppstats/Makefile.sunos4</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppstats/pppstats.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppstats/pppstats.8</a></td><td class='right'>217</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/pppstats/pppstats.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/pppstats/pppstats.c</a></td><td class='right'>557</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.3%;'/><td class='none' style='width: 95.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/auth-down?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/auth-down</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/auth-up?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/auth-up</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/ip-down?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/ip-down</a></td><td class='right'>22</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/ip-up?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/ip-up</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/options?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/options</a></td><td class='right'>153</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/options.ttyXX?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/options.ttyXX</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sample/pap-secrets?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sample/pap-secrets</a></td><td class='right'>28</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/README</a></td><td class='right'>143</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/callback?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/callback</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/chat-callback?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/chat-callback</a></td><td class='right'>98</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/chatchat/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/chatchat/README</a></td><td class='right'>134</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/chatchat/chatchat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/chatchat/chatchat.c</a></td><td class='right'>409</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.2%;'/><td class='none' style='width: 96.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ip-down.local.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ip-down.local.add</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ip-up.local.add?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ip-up.local.add</a></td><td class='right'>24</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/options-rsh-loc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/options-rsh-loc</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/options-rsh-rem?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/options-rsh-rem</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/options-ssh-loc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/options-ssh-loc</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/options-ssh-rem?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/options-ssh-rem</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ppp-off?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ppp-off</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ppp-on?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ppp-on</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ppp-on-dialer?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ppp-on-dialer</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ppp-on-rsh?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ppp-on-rsh</a></td><td class='right'>72</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/ppp-on-ssh?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/ppp-on-ssh</a></td><td class='right'>76</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/redialer?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/redialer</a></td><td class='right'>96</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/scripts/secure-card?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/scripts/secure-card</a></td><td class='right'>111</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/Makedefs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/Makedefs</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/Makedefs.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/Makedefs.sol2</a></td><td class='right'>59</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/Makefile.sol2</a></td><td class='right'>66</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/Makefile.sol2-64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/Makefile.sol2-64</a></td><td class='right'>85</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/Makefile.top?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/Makefile.top</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp.c</a></td><td class='right'>2486</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 19.4%;'/><td class='none' style='width: 80.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp.conf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp.conf</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_ahdlc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_ahdlc.c</a></td><td class='right'>878</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.8%;'/><td class='none' style='width: 93.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_ahdlc_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_ahdlc_mod.c</a></td><td class='right'>49</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_comp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_comp.c</a></td><td class='right'>1126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.8%;'/><td class='none' style='width: 91.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_comp_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_comp_mod.c</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_mod.c</a></td><td class='right'>174</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/solaris/ppp_mod.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/solaris/ppp_mod.h</a></td><td class='right'>190</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/Makedefs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/Makedefs</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/Makefile</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/Makefile.top?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/Makefile.top</a></td><td class='right'>46</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/if_ppp_vdcmd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/if_ppp_vdcmd.c</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/ppp.INSTALL?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/ppp.INSTALL</a></td><td class='right'>104</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/ppp_ahdlc_vdcmd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/ppp_ahdlc_vdcmd.c</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/ppp_comp_vdcmd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/ppp_comp_vdcmd.c</a></td><td class='right'>57</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/sunos4/ppp_vdcmd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/sunos4/ppp_vdcmd.c</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makedefs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makedefs</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makedefs.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makedefs.sol2</a></td><td class='right'>59</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makefile.sol2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makefile.sol2</a></td><td class='right'>66</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makefile.sol2-64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makefile.sol2-64</a></td><td class='right'>85</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makefile.svr4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makefile.svr4</a></td><td class='right'>60</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/Makefile.top?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/Makefile.top</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp.Master?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp.Master</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp.Node?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp.Node</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp.System?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp.System</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp.conf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp.conf</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_ahdl.Master?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_ahdl.Master</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_ahdl.System?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_ahdl.System</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_ahdlc_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_ahdlc_mod.c</a></td><td class='right'>49</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_comp.Master?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_comp.Master</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_comp.System?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_comp.System</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_comp_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_comp_mod.c</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/ppp/svr4/ppp_mod.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/ppp/svr4/ppp_mod.c</a></td><td class='right'>174</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/probing.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/probing.c</a></td><td class='right'>671</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.2%;'/><td class='none' style='width: 94.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/probing.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/probing.h</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rescue-gui.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rescue-gui.c</a></td><td class='right'>226</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/README</a></td><td class='right'>87</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/configs/firewall-masq?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/configs/firewall-masq</a></td><td class='right'>35</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/configs/firewall-standalone?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/configs/firewall-standalone</a></td><td class='right'>32</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/configs/pap-secrets?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/configs/pap-secrets</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/configs/pppoe-server-options?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/configs/pppoe-server-options</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/configs/pppoe.conf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/configs/pppoe.conf</a></td><td class='right'>126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/doc/CHANGES?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/doc/CHANGES</a></td><td class='right'>177</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/doc/HOW-TO-CONNECT?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/doc/HOW-TO-CONNECT</a></td><td class='right'>295</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/doc/KERNEL-MODE-PPPOE?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/doc/KERNEL-MODE-PPPOE</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/doc/LICENSE?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/doc/LICENSE</a></td><td class='right'>339</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/doc/PROBLEMS?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/doc/PROBLEMS</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/go?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/go</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/go-gui?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/go-gui</a></td><td class='right'>92</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/Makefile.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/Makefile.in</a></td><td class='right'>64</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/html/tkpppoe.html?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/html/tkpppoe.html</a></td><td class='right'>181</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/pppoe-wrapper.1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/pppoe-wrapper.1</a></td><td class='right'>45</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/tkpppoe.1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/tkpppoe.1</a></td><td class='right'>36</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/tkpppoe.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/tkpppoe.in</a></td><td class='right'>2891</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 22.5%;'/><td class='none' style='width: 77.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/gui/wrapper.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/gui/wrapper.c</a></td><td class='right'>234</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/adsl-connect.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/adsl-connect.8</a></td><td class='right'>66</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/adsl-setup.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/adsl-setup.8</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/adsl-start.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/adsl-start.8</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/adsl-status.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/adsl-status.8</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/adsl-stop.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/adsl-stop.8</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/pppoe-relay.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/pppoe-relay.8</a></td><td class='right'>124</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/pppoe-server.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/pppoe-server.8</a></td><td class='right'>123</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/pppoe-sniff.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/pppoe-sniff.8</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/pppoe.8?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/pppoe.8</a></td><td class='right'>236</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/man/pppoe.conf.5?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/man/pppoe.conf.5</a></td><td class='right'>168</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/rp-pppoe-gui.spec?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/rp-pppoe-gui.spec</a></td><td class='right'>98</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/rp-pppoe.spec?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/rp-pppoe.spec</a></td><td class='right'>71</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-connect.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-connect.in</a></td><td class='right'>278</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.2%;'/><td class='none' style='width: 97.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-init-suse.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-init-suse.in</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-init-turbolinux.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-init-turbolinux.in</a></td><td class='right'>62</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-init.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-init.in</a></td><td class='right'>64</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-setup.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-setup.in</a></td><td class='right'>346</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-start.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-start.in</a></td><td class='right'>186</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-status?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-status</a></td><td class='right'>82</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/scripts/adsl-stop.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/scripts/adsl-stop.in</a></td><td class='right'>84</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/.cvsignore</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/Makefile</a></td><td class='right'>58</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/Makefile.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/Makefile.in</a></td><td class='right'>257</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/common.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/common.c</a></td><td class='right'>485</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.8%;'/><td class='none' style='width: 96.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/config.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/config.h</a></td><td class='right'>135</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/config.h.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/config.h.in</a></td><td class='right'>134</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/configure?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/configure</a></td><td class='right'>2356</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 18.4%;'/><td class='none' style='width: 81.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/configure.in?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/configure.in</a></td><td class='right'>231</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/debug.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/debug.c</a></td><td class='right'>143</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/discovery.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/discovery.c</a></td><td class='right'>629</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.9%;'/><td class='none' style='width: 95.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/if.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/if.c</a></td><td class='right'>1092</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.5%;'/><td class='none' style='width: 91.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/install-sh?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/install-sh</a></td><td class='right'>238</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/md5.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/md5.c</a></td><td class='right'>246</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/md5.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/md5.h</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/plugin.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/plugin.c</a></td><td class='right'>397</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.1%;'/><td class='none' style='width: 96.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/ppp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/ppp.c</a></td><td class='right'>258</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/pppoe-server.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/pppoe-server.c</a></td><td class='right'>1247</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 9.7%;'/><td class='none' style='width: 90.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/pppoe-sniff.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/pppoe-sniff.c</a></td><td class='right'>258</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/pppoe.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/pppoe.c</a></td><td class='right'>834</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.5%;'/><td class='none' style='width: 93.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/pppoe.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/pppoe.h</a></td><td class='right'>331</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/relay.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/relay.c</a></td><td class='right'>1541</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.0%;'/><td class='none' style='width: 88.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/rp-pppoe/src/relay.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/rp-pppoe/src/relay.h</a></td><td class='right'>97</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/Makefile</a></td><td class='right'>56</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/_slang.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/_slang.h</a></td><td class='right'>743</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.8%;'/><td class='none' style='width: 94.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/config.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/config.h</a></td><td class='right'>163</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/jdmacros.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/jdmacros.h</a></td><td class='right'>53</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/keywhash.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/keywhash.c</a></td><td class='right'>190</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.5%;'/><td class='none' style='width: 98.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sl-feat.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sl-feat.h</a></td><td class='right'>60</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slang.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slang.c</a></td><td class='right'>5547</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 43.2%;'/><td class='none' style='width: 56.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slang.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slang.h</a></td><td class='right'>1930</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 15.0%;'/><td class='none' style='width: 85.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarith.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarith.c</a></td><td class='right'>1656</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.9%;'/><td class='none' style='width: 87.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarith.inc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarith.inc</a></td><td class='right'>783</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.1%;'/><td class='none' style='width: 93.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarray.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarray.c</a></td><td class='right'>3139</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 24.5%;'/><td class='none' style='width: 75.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarrfun.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarrfun.c</a></td><td class='right'>464</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarrfun.inc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarrfun.inc</a></td><td class='right'>257</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slarrmis.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slarrmis.c</a></td><td class='right'>38</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slassoc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slassoc.c</a></td><td class='right'>713</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.6%;'/><td class='none' style='width: 94.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slbstr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slbstr.c</a></td><td class='right'>615</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.8%;'/><td class='none' style='width: 95.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slclass.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slclass.c</a></td><td class='right'>1391</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 10.8%;'/><td class='none' style='width: 89.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slcmd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slcmd.c</a></td><td class='right'>351</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slcmplex.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slcmplex.c</a></td><td class='right'>1142</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.9%;'/><td class='none' style='width: 91.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slcompat.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slcompat.c</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slcurses.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slcurses.c</a></td><td class='right'>972</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.6%;'/><td class='none' style='width: 92.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slcurses.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slcurses.h</a></td><td class='right'>353</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sldisply.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sldisply.c</a></td><td class='right'>2596</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 20.2%;'/><td class='none' style='width: 79.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slerr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slerr.c</a></td><td class='right'>181</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.4%;'/><td class='none' style='width: 98.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slerrno.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slerrno.c</a></td><td class='right'>219</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slgetkey.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slgetkey.c</a></td><td class='right'>306</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slimport.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slimport.c</a></td><td class='right'>281</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.2%;'/><td class='none' style='width: 97.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slinclud.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slinclud.h</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slintall.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slintall.c</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slistruc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slistruc.c</a></td><td class='right'>218</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.7%;'/><td class='none' style='width: 98.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slkeymap.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slkeymap.c</a></td><td class='right'>596</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.6%;'/><td class='none' style='width: 95.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slkeypad.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slkeypad.c</a></td><td class='right'>163</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sllimits.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sllimits.h</a></td><td class='right'>64</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmalloc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmalloc.c</a></td><td class='right'>165</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.3%;'/><td class='none' style='width: 98.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmath.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmath.c</a></td><td class='right'>565</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.4%;'/><td class='none' style='width: 95.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmemchr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmemchr.c</a></td><td class='right'>47</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmemcmp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmemcmp.c</a></td><td class='right'>76</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmemcpy.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmemcpy.c</a></td><td class='right'>49</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmemset.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmemset.c</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slmisc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slmisc.c</a></td><td class='right'>330</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slnspace.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slnspace.c</a></td><td class='right'>242</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slospath.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slospath.c</a></td><td class='right'>73</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slpack.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slpack.c</a></td><td class='right'>785</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.1%;'/><td class='none' style='width: 93.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slparse.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slparse.c</a></td><td class='right'>1970</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 15.4%;'/><td class='none' style='width: 84.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slpath.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slpath.c</a></td><td class='right'>344</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.7%;'/><td class='none' style='width: 97.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slposdir.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slposdir.c</a></td><td class='right'>1057</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.2%;'/><td class='none' style='width: 91.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slposio.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slposio.c</a></td><td class='right'>568</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.4%;'/><td class='none' style='width: 95.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slprepr.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slprepr.c</a></td><td class='right'>427</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.3%;'/><td class='none' style='width: 96.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slproc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slproc.c</a></td><td class='right'>155</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.2%;'/><td class='none' style='width: 98.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slregexp.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slregexp.c</a></td><td class='right'>935</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.3%;'/><td class='none' style='width: 92.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slrline.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slrline.c</a></td><td class='right'>836</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 6.5%;'/><td class='none' style='width: 93.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slscanf.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slscanf.c</a></td><td class='right'>718</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.6%;'/><td class='none' style='width: 94.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slscroll.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slscroll.c</a></td><td class='right'>450</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.5%;'/><td class='none' style='width: 96.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slsearch.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slsearch.c</a></td><td class='right'>239</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.9%;'/><td class='none' style='width: 98.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slsignal.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slsignal.c</a></td><td class='right'>336</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.6%;'/><td class='none' style='width: 97.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slsmg.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slsmg.c</a></td><td class='right'>1584</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 12.3%;'/><td class='none' style='width: 87.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slstd.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slstd.c</a></td><td class='right'>724</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 5.6%;'/><td class='none' style='width: 94.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slstdio.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slstdio.c</a></td><td class='right'>1050</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 8.2%;'/><td class='none' style='width: 91.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slstring.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slstring.c</a></td><td class='right'>546</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.3%;'/><td class='none' style='width: 95.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slstrops.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slstrops.c</a></td><td class='right'>1686</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 13.1%;'/><td class='none' style='width: 86.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slstruct.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slstruct.c</a></td><td class='right'>932</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.3%;'/><td class='none' style='width: 92.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sltermin.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sltermin.c</a></td><td class='right'>1155</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 9.0%;'/><td class='none' style='width: 91.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sltime.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sltime.c</a></td><td class='right'>310</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.4%;'/><td class='none' style='width: 97.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sltoken.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sltoken.c</a></td><td class='right'>1702</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 13.3%;'/><td class='none' style='width: 86.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/sltypes.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/sltypes.c</a></td><td class='right'>966</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.5%;'/><td class='none' style='width: 92.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slutty.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slutty.c</a></td><td class='right'>596</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 4.6%;'/><td class='none' style='width: 95.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/slang/slxstrng.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/slang/slxstrng.c</a></td><td class='right'>43</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stage1-data/stage1-with-busybox.tar.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stage1-data/stage1-with-busybox.tar.bz2</a></td><td class='right'>bin</td><td class='graph'>92142 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stage1-data/stage1-with-sash.tar.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stage1-data/stage1-with-sash.tar.bz2</a></td><td class='right'>bin</td><td class='graph'>345030 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stage1-data/stage1.tar.bz2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stage1-data/stage1.tar.bz2</a></td><td class='right'>bin</td><td class='graph'>1957 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stage1.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stage1.c</a></td><td class='right'>468</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.6%;'/><td class='none' style='width: 96.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stage1.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stage1.h</a></td><td class='right'>61</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/stdio-frontend.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/stdio-frontend.c</a></td><td class='right'>375</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.9%;'/><td class='none' style='width: 97.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/tools.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/tools.c</a></td><td class='right'>435</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.4%;'/><td class='none' style='width: 96.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/tools.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/tools.h</a></td><td class='right'>53</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/url.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/url.c</a></td><td class='right'>501</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.9%;'/><td class='none' style='width: 96.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/url.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/url.h</a></td><td class='right'>44</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/usb-resource/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/usb-resource/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/usb-resource/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/usb-resource/Makefile</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/mdk-stage1/usb-resource/update-usb-ids.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>mdk-stage1/usb-resource/update-usb-ids.pl</a></td><td class='right'>52</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/Makefile</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/Xconfig/card.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/Xconfig/card.pm</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/any.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/any.pm</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/bootloader.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/bootloader.pm</a></td><td class='right'>126</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.9%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/detect_devices.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/detect_devices.pm</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/drakxtools.spec?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/drakxtools.spec</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/fs.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/fs.pm</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/fsedit.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/fsedit.pm</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/harddrake/data.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/harddrake/data.pm</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/install_any.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/install_any.pm</a></td><td class='right'>23</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/install_gtk.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/install_gtk.pm</a></td><td class='right'>12</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/install_steps_gtk.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/install_steps_gtk.pm</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/perl-install/list.sparc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/list.sparc</a></td><td class='right'>74</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/partition_table.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/partition_table.pm</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/printerdrake.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/printerdrake.pm</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.1%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/proxy.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/proxy.pm</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/perl-install/share/compssList?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/share/compssList</a></td><td class='right'>1665</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 13.0%;'/><td class='none' style='width: 87.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/share/list?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/share/list</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/share/list.ia64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/share/list.ia64</a></td><td class='right'>7</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/share/list.x86_64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/share/list.x86_64</a></td><td class='right'>235</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 1.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 98.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/perl-install/share/po/br.po?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/share/po/br.po</a></td><td class='right'>12831</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 100.0%;'/><td class='none' style='width: 0.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='upd'><a href='/software/drakx/diff/perl-install/steps.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>perl-install/steps.pm</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/.cvsignore</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/Makefile</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/aliases?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/aliases</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/devices.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/devices.pl</a></td><td class='right'>54</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/dirs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/dirs</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/drvinst?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/drvinst</a></td><td class='right'>87</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/guessmounts?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/guessmounts</a></td><td class='right'>102</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/install_bootloader?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/install_bootloader</a></td><td class='right'>47</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/kernel_read_part.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/kernel_read_part.c</a></td><td class='right'>26</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list</a></td><td class='right'>138</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.alpha?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.alpha</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.i386?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.i386</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.ia64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.ia64</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.ppc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.ppc</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.sparc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.sparc</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/list.x86_64?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/list.x86_64</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/lsparts?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/lsparts</a></td><td class='right'>127</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/make_rescue_img?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/make_rescue_img</a></td><td class='right'>133</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/rescue-doc?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/rescue-doc</a></td><td class='right'>61</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.5%;'/><td class='none' style='width: 99.5%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/restore_ms_boot?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/restore_ms_boot</a></td><td class='right'>108</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/bin/insmod?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/bin/insmod</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/bin/login?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/bin/login</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/boot/grub/menu.lst?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/boot/grub/menu.lst</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/fstab?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/fstab</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/group?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/group</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/host.conf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/host.conf</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/hosts?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/hosts</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/inittab?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/inittab</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/issue?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/issue</a></td><td class='right'>27</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/oem?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/oem</a></td><td class='right'>991</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 7.7%;'/><td class='none' style='width: 92.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/passwd?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/passwd</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/profile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/profile</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/rc.reboot?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/rc.reboot</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/rc.sysinit?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/rc.sysinit</a></td><td class='right'>48</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/etc/resolv.conf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/etc/resolv.conf</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/sbin/fakeshutdown?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/sbin/fakeshutdown</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/rescue/tree/sbin/modprobe?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/sbin/modprobe</a></td><td class='right'>42</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/rescue/tree/usr/lib/CVS.?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>rescue/tree/usr/lib/CVS.</a></td><td class='right'>0</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/.cvsignore</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/2adsldb.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/2adsldb.pm</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/2isdndb.pm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/2isdndb.pm</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/Makefile</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/addchangelog.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/addchangelog.pl</a></td><td class='right'>18</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/.cvsignore</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/Makefile</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/README</a></td><td class='right'>53</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/aewm-drakx.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/aewm-drakx.c</a></td><td class='right'>50</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.4%;'/><td class='none' style='width: 99.6%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/aewm.h?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/aewm.h</a></td><td class='right'>34</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/client.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/client.c</a></td><td class='right'>122</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.0%;'/><td class='none' style='width: 99.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/events.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/events.c</a></td><td class='right'>106</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/aewm-drakx/misc.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/aewm-drakx/misc.c</a></td><td class='right'>30</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/Makefile?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/Makefile</a></td><td class='right'>8</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/README</a></td><td class='right'>40</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/README.milo?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/README.milo</a></td><td class='right'>13</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/aboot.cnf?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/aboot.cnf</a></td><td class='right'>3</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/5100440A.txt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/5100440A.txt</a></td><td class='right'>25</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/README.txt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/README.txt</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/apb.cfg?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/apb.cfg</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/apb.exe?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/apb.exe</a></td><td class='right'>bin</td><td class='graph'>120832 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/install.txt?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/install.txt</a></td><td class='right'>356</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.8%;'/><td class='none' style='width: 97.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/alpha/cd/up1000/up1000.pal?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/cd/up1000/up1000.pal</a></td><td class='right'>bin</td><td class='graph'>30464 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/alpha/e2fsck.shared?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/alpha/e2fsck.shared</a></td><td class='right'>bin</td><td class='graph'>111080 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/closurepkgs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/closurepkgs</a></td><td class='right'>108</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.8%;'/><td class='none' style='width: 99.2%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/cvslog2changelog.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/cvslog2changelog.pl</a></td><td class='right'>84</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.7%;'/><td class='none' style='width: 99.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/extractchangelog?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/extractchangelog</a></td><td class='right'>2</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/gencompss?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/gencompss</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/gencryptofiles?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/gencryptofiles</a></td><td class='right'>115</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.9%;'/><td class='none' style='width: 99.1%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/genmodparm?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/genmodparm</a></td><td class='right'>145</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 1.1%;'/><td class='none' style='width: 98.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/busybox?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/busybox</a></td><td class='right'>bin</td><td class='graph'>55508 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/e2fsck.shared?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/e2fsck.shared</a></td><td class='right'>bin</td><td class='graph'>80308 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/mkreiserfs?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/mkreiserfs</a></td><td class='right'>bin</td><td class='graph'>15868 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/.cvsignore?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/.cvsignore</a></td><td class='right'>4</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c503/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c503/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106660 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c503/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c503/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107684 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c503/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c503/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c503/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c503/stage2</a></td><td class='right'>bin</td><td class='graph'>106660 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c507/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c507/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106208 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c507/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c507/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107232 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c507/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c507/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c507/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c507/stage2</a></td><td class='right'>bin</td><td class='graph'>106272 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c509/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c509/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106712 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c509/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c509/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107736 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c509/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c509/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c509/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c509/stage2</a></td><td class='right'>bin</td><td class='graph'>106744 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c529/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c529/nbgrub</a></td><td class='right'>bin</td><td class='graph'>107592 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c529/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c529/pxegrub</a></td><td class='right'>bin</td><td class='graph'>108616 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c529/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c529/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c529/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c529/stage2</a></td><td class='right'>bin</td><td class='graph'>107624 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c595/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c595/nbgrub</a></td><td class='right'>bin</td><td class='graph'>109440 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c595/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c595/pxegrub</a></td><td class='right'>bin</td><td class='graph'>110464 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c595/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c595/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c595/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c595/stage2</a></td><td class='right'>bin</td><td class='graph'>109440 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c90x/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c90x/nbgrub</a></td><td class='right'>bin</td><td class='graph'>111360 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c90x/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c90x/pxegrub</a></td><td class='right'>bin</td><td class='graph'>112384 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c90x/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c90x/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/3c90x/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/3c90x/stage2</a></td><td class='right'>bin</td><td class='graph'>111360 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/depca/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/depca/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106376 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/depca/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/depca/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107400 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/depca/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/depca/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/depca/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/depca/stage2</a></td><td class='right'>bin</td><td class='graph'>106440 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/device.map?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/device.map</a></td><td class='right'>1</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106472 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107496 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro/stage2</a></td><td class='right'>bin</td><td class='graph'>106504 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro100/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro100/nbgrub</a></td><td class='right'>bin</td><td class='graph'>109408 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro100/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro100/pxegrub</a></td><td class='right'>bin</td><td class='graph'>110432 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro100/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro100/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/eepro100/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/eepro100/stage2</a></td><td class='right'>bin</td><td class='graph'>109472 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/epic100/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/epic100/nbgrub</a></td><td class='right'>bin</td><td class='graph'>108160 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/epic100/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/epic100/pxegrub</a></td><td class='right'>bin</td><td class='graph'>109184 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/epic100/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/epic100/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/epic100/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/epic100/stage2</a></td><td class='right'>bin</td><td class='graph'>108192 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/exos205/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/exos205/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106560 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/exos205/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/exos205/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107584 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/exos205/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/exos205/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/exos205/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/exos205/stage2</a></td><td class='right'>bin</td><td class='graph'>106592 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/grub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/grub</a></td><td class='right'>bin</td><td class='graph'>355291 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/lance/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/lance/nbgrub</a></td><td class='right'>bin</td><td class='graph'>108512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/lance/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/lance/pxegrub</a></td><td class='right'>bin</td><td class='graph'>109536 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/lance/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/lance/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/lance/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/lance/stage2</a></td><td class='right'>bin</td><td class='graph'>108512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/makeImages?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/makeImages</a></td><td class='right'>31</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/make_boot_network?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/make_boot_network</a></td><td class='right'>17</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/menu.lst.example?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/menu.lst.example</a></td><td class='right'>21</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106280 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107304 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne/stage2</a></td><td class='right'>bin</td><td class='graph'>106344 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne2100/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne2100/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106620 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne2100/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne2100/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107644 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne2100/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne2100/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ne2100/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ne2100/stage2</a></td><td class='right'>bin</td><td class='graph'>106652 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5010/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5010/nbgrub</a></td><td class='right'>bin</td><td class='graph'>105608 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5010/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5010/pxegrub</a></td><td class='right'>bin</td><td class='graph'>106632 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5010/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5010/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5010/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5010/stage2</a></td><td class='right'>bin</td><td class='graph'>105640 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5210/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5210/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106336 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5210/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5210/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107360 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5210/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5210/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni5210/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni5210/stage2</a></td><td class='right'>bin</td><td class='graph'>106368 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni6510/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni6510/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106588 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni6510/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni6510/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107612 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni6510/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni6510/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ni6510/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ni6510/stage2</a></td><td class='right'>bin</td><td class='graph'>106620 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ns8390/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ns8390/nbgrub</a></td><td class='right'>bin</td><td class='graph'>108664 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ns8390/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ns8390/pxegrub</a></td><td class='right'>bin</td><td class='graph'>109688 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ns8390/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ns8390/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/ns8390/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/ns8390/stage2</a></td><td class='right'>bin</td><td class='graph'>108696 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/otulip/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/otulip/nbgrub</a></td><td class='right'>bin</td><td class='graph'>108484 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/otulip/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/otulip/pxegrub</a></td><td class='right'>bin</td><td class='graph'>109508 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/otulip/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/otulip/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/otulip/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/otulip/stage2</a></td><td class='right'>bin</td><td class='graph'>108516 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/rtl8139/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/rtl8139/nbgrub</a></td><td class='right'>bin</td><td class='graph'>108000 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/rtl8139/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/rtl8139/pxegrub</a></td><td class='right'>bin</td><td class='graph'>109024 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/rtl8139/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/rtl8139/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/rtl8139/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/rtl8139/stage2</a></td><td class='right'>bin</td><td class='graph'>108000 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sis900/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sis900/nbgrub</a></td><td class='right'>bin</td><td class='graph'>112392 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sis900/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sis900/pxegrub</a></td><td class='right'>bin</td><td class='graph'>113416 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sis900/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sis900/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sis900/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sis900/stage2</a></td><td class='right'>bin</td><td class='graph'>112392 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sk_g16/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sk_g16/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106500 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sk_g16/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sk_g16/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107524 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sk_g16/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sk_g16/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/sk_g16/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/sk_g16/stage2</a></td><td class='right'>bin</td><td class='graph'>106532 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/smc9000/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/smc9000/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106976 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/smc9000/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/smc9000/pxegrub</a></td><td class='right'>bin</td><td class='graph'>108000 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/smc9000/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/smc9000/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/smc9000/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/smc9000/stage2</a></td><td class='right'>bin</td><td class='graph'>106976 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.3c59x?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.3c59x</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.3c90x?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.3c90x</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.eepro100?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.eepro100</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.rtl8139?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.rtl8139</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.tulip?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.tulip</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage1.via-rhine?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage1.via-rhine</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.3c59x?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.3c59x</a></td><td class='right'>bin</td><td class='graph'>80564 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.3c90x?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.3c90x</a></td><td class='right'>bin</td><td class='graph'>111100 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.eepro100?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.eepro100</a></td><td class='right'>bin</td><td class='graph'>107584 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.rtl8139?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.rtl8139</a></td><td class='right'>bin</td><td class='graph'>108028 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.tulip?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.tulip</a></td><td class='right'>bin</td><td class='graph'>94396 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/stage2.via-rhine?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/stage2.via-rhine</a></td><td class='right'>bin</td><td class='graph'>88208 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tiara/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tiara/nbgrub</a></td><td class='right'>bin</td><td class='graph'>105188 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tiara/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tiara/pxegrub</a></td><td class='right'>bin</td><td class='graph'>106212 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tiara/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tiara/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tiara/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tiara/stage2</a></td><td class='right'>bin</td><td class='graph'>105252 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tulip/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tulip/nbgrub</a></td><td class='right'>bin</td><td class='graph'>119404 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tulip/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tulip/pxegrub</a></td><td class='right'>bin</td><td class='graph'>120428 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tulip/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tulip/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/tulip/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/tulip/stage2</a></td><td class='right'>bin</td><td class='graph'>119404 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/w89c840/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/w89c840/nbgrub</a></td><td class='right'>bin</td><td class='graph'>109356 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/w89c840/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/w89c840/pxegrub</a></td><td class='right'>bin</td><td class='graph'>110380 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/w89c840/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/w89c840/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/w89c840/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/w89c840/stage2</a></td><td class='right'>bin</td><td class='graph'>109388 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/wd/nbgrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/wd/nbgrub</a></td><td class='right'>bin</td><td class='graph'>106760 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/wd/pxegrub?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/wd/pxegrub</a></td><td class='right'>bin</td><td class='graph'>107784 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/wd/stage1?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/wd/stage1</a></td><td class='right'>bin</td><td class='graph'>512 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/i386/netboot/wd/stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/netboot/wd/stage2</a></td><td class='right'>bin</td><td class='graph'>106792 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/i386/sh?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/i386/sh</a></td><td class='right'>bin</td><td class='graph'>153752 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ia64/e2fsck.shared?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ia64/e2fsck.shared</a></td><td class='right'>bin</td><td class='graph'>1060504 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ia64/elilo.efi?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ia64/elilo.efi</a></td><td class='right'>bin</td><td class='graph'>315800 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/mailchangelog.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/mailchangelog.pl</a></td><td class='right'>14</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/make_mdkinst_stage2?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/make_mdkinst_stage2</a></td><td class='right'>77</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/mkhdlist?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/mkhdlist</a></td><td class='right'>16</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/ntp_servers.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ntp_servers.pl</a></td><td class='right'>298</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.3%;'/><td class='none' style='width: 97.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/oem-prepare?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/oem-prepare</a></td><td class='right'>477</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 3.7%;'/><td class='none' style='width: 96.3%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/patch_pcmcia_config.pl?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/patch_pcmcia_config.pl</a></td><td class='right'>28</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/ppc/README?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/README</a></td><td class='right'>39</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.3%;'/><td class='none' style='width: 99.7%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/Xpmac?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/Xpmac</a></td><td class='right'>bin</td><td class='graph'>3762427 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/convert?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/convert</a></td><td class='right'>5</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.0%;'/><td class='none' style='width: 100.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/ppc/e2fsck.shared?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/e2fsck.shared</a></td><td class='right'>bin</td><td class='graph'>101469 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/magic?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/magic</a></td><td class='right'>81</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/mapping?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/mapping</a></td><td class='right'>20</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.2%;'/><td class='none' style='width: 99.8%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/mkINSTALLCD?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/mkINSTALLCD</a></td><td class='right'>78</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.6%;'/><td class='none' style='width: 99.4%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/mkhybrid-1.12b5.4?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/mkhybrid-1.12b5.4</a></td><td class='right'>bin</td><td class='graph'>488623 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/ppc/mkhybrid-1.12b5.4-x86?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/mkhybrid-1.12b5.4-x86</a></td><td class='right'>bin</td><td class='graph'>194471 -> 0 bytes<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/ppc/yaboot?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/ppc/yaboot</a></td><td class='right'>bin</td><td class='graph'>58556 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/sparc/e2fsck.shared?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/sparc/e2fsck.shared</a></td><td class='right'>bin</td><td class='graph'>125624 -> 0 bytes<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/specific_arch?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/specific_arch</a></td><td class='right'>9</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/syncrpms?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/syncrpms</a></td><td class='right'>261</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 2.0%;'/><td class='none' style='width: 98.0%;'/></tr></table></td></tr>
<tr><td class='mode'>-rwxr-xr-x</td><td class='del'><a href='/software/drakx/diff/tools/updatehdlist?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/updatehdlist</a></td><td class='right'>10</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
<tr><td class='mode'>-rw-r--r--</td><td class='del'><a href='/software/drakx/diff/tools/xhost+.c?h=V1_1_9_54mdk&amp;id=3c75a78aa006b1f51e6b053f1edbf8f19ccbcb8f'>tools/xhost+.c</a></td><td class='right'>11</td><td class='graph'><table summary='file diffstat' width='100%'><tr><td class='add' style='width: 0.0%;'/><td class='rem' style='width: 0.1%;'/><td class='none' style='width: 99.9%;'/></tr></table></td></tr>
</table><div class='diffstat-summary'>1623 files changed, 333 insertions, 242496 deletions</div><table summary='diff' class='diff'><tr><td><div class='head'>diff --git a/.cvsignore b/.cvsignore<br/>deleted file mode 100644<br/>index 2a8035f11..000000000<br/>--- a/<a href='/software/drakx/tree/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-docs</div><div class='del'>-images</div><div class='del'>-unused</div><div class='del'>-drakxtools.tar.bz2</div><div class='del'>-isolinux</div><div class='head'>diff --git a/Makefile b/Makefile<br/>deleted file mode 100644<br/>index 7d252daa1..000000000<br/>--- a/<a href='/software/drakx/tree/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,111 +0,0 @@</div><div class='del'>-ROOTDEST = /export</div><div class='del'>-</div><div class='del'>-DIRS = tools kernel mdk-stage1 perl-install rescue</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ARCH := $(patsubst i%86,i386,$(shell uname -m))</div><div class='del'>-ARCH := $(patsubst sparc%,sparc,$(ARCH))</div><div class='del'>-</div><div class='del'>-ifeq (i386,$(ARCH))</div><div class='del'>-    BOOT_IMG = cdrom.img hd.img network.img usb.img blank.img pcmcia.img other.img</div><div class='del'>-endif</div><div class='del'>-ifeq (sparc,$(ARCH))</div><div class='del'>-    BOOT_IMG  = cdrom.img   hd.img   network.img   live.img   tftp.img   tftprd.img</div><div class='del'>-    BOOT_IMG += cdrom64.img hd64.img network64.img live64.img tftp64.img tftprd64.img </div><div class='del'>-endif</div><div class='del'>-ifeq (ppc,$(ARCH))</div><div class='del'>-    BOOT_IMG = all.img</div><div class='del'>-endif</div><div class='del'>-ifeq (ia64,$(ARCH))</div><div class='del'>-    BOOT_IMG = all.img</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-FBOOT_IMG = $(BOOT_IMG:%=images/%)</div><div class='del'>-FBOOT_RDZ = $(FBOOT_IMG:%.img=%.rdz) images/all.rdz</div><div class='del'>-</div><div class='del'>-.PHONY: dirs install</div><div class='del'>-</div><div class='del'>-install: dirs images rescue install_only</div><div class='del'>-</div><div class='del'>-dirs:</div><div class='del'>-	@for n in $(DIRS); do $(MAKE) -C $$n all || exit 1 ; done</div><div class='del'>-</div><div class='del'>-images: $(FBOOT_IMG) images/all.rdz # all.rdz is needed to update isolinux</div><div class='del'>-</div><div class='del'>-$(FBOOT_RDZ): kernel/all.modules</div><div class='del'>-	./make_boot_img $@ `basename $(@:%.rdz=%)`</div><div class='del'>-</div><div class='del'>-$(FBOOT_IMG): %.img: %.rdz</div><div class='del'>-	./make_boot_img $@ `basename $(@:%.img=%)`</div><div class='del'>-</div><div class='del'>-tar: clean</div><div class='del'>-	rpm -qa &gt; needed_rpms.lst</div><div class='del'>-	cd .. ; tar cfj gi.tar.bz2 gi</div><div class='del'>-	rm needed_rpms.lst</div><div class='del'>-</div><div class='del'>-install_only:</div><div class='del'>-	for i in images misc Mandrake Mandrake/base Mandrake/share; do install -d $(ROOTDEST)/$$i ; done</div><div class='del'>-    ifneq (ppc,$(ARCH))</div><div class='del'>-	for i in $(FBOOT_IMG); do cp -f $${i}* $(ROOTDEST)/images; done</div><div class='del'>-    endif</div><div class='del'>-    ifeq (alpha,$(ARCH))</div><div class='del'>-	for i in $(FBOOT_RDZ); do cp -f $${i}* $(ROOTDEST)/boot; done</div><div class='del'>-	cp -f vmlinux.gz $(ROOTDEST)/boot/instboot.gz</div><div class='del'>-	make -C tools/$(ARCH)/cd install ROOTDEST=$(ROOTDEST)</div><div class='del'>-    endif</div><div class='del'>-	cd $(ROOTDEST)/images; rm -rf alternatives </div><div class='del'>-	if [ `ls $(ROOTDEST)/images/*.img-* 2&gt;/dev/null | wc -l` -gt 0 ]; then	\</div><div class='del'>-	  cd $(ROOTDEST)/images; mkdir alternatives; cd alternatives; mv ../*.img-* .; md5sum *.img-* &gt; MD5SUM; \</div><div class='del'>-	fi</div><div class='del'>-	cd $(ROOTDEST)/images; md5sum *.img* &gt; MD5SUM</div><div class='del'>-</div><div class='del'>-    ifeq (i386,$(ARCH))</div><div class='del'>-	rm -rf $(ROOTDEST)/isolinux</div><div class='del'>-	cp -af isolinux $(ROOTDEST)</div><div class='del'>-	cp -f images/cdrom-changedisk.img $(ROOTDEST)/images</div><div class='del'>-    endif</div><div class='del'>-</div><div class='del'>-	install live_update $(ROOTDEST)/live_update</div><div class='del'>-	make -C perl-install full_stage2</div><div class='del'>-	make -C perl-install/share/advertising install</div><div class='del'>-	make -C rescue install</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -rf images all.modules all.modules64</div><div class='del'>-	for i in $(DIRS); do make -C $$i clean; done</div><div class='del'>-	find . -name "*~" -o -name ".#*" | xargs rm -f</div><div class='del'>-</div><div class='del'>-check:</div><div class='del'>-	@badrights=`find $(ROOTDEST)/Mandrake/mdkinst | perl -lne 'print if !((stat)[2] &amp; 4)'`; [ -z "$$badrights" ] || { echo "bad rights for files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$badrights" ; echo "bad rights for files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; }</div><div class='del'>-	@missing_kb=`find -name "Entries" | xargs perl -F/ -alne 'print $$ARGV =~ m|(.*)/CVS|, "/$$F[1]" if $$F[1] =~ /\.(png|gif|bmp|xcf|gz|bz2|tar|rdz|so|a|o|mar|img|exe)$$/ &amp;&amp; $$F[4] ne "-kb"'` ; [ -z "$$missing_kb" ] || { echo "missing -kb in CVS for files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$missing_kb" ; echo "missing -kb in CVS for files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; }</div><div class='del'>-	$(MAKE) -C perl-install check</div><div class='del'>-</div><div class='del'>-upload: </div><div class='del'>-	$(MAKE) clean</div><div class='del'>-</div><div class='del'>-#	# done before make install to increment ChangeLog version</div><div class='del'>-	tools/addchangelog.pl tools/cvslog2changelog.pl | tools/mailchangelog.pl &amp;</div><div class='del'>-</div><div class='del'>-	$(MAKE) install</div><div class='del'>-	$(MAKE) check</div><div class='del'>-	$(MAKE) upload_only</div><div class='del'>-</div><div class='del'>-upload_only:</div><div class='del'>-	function upload() { rsync -qSavz --verbose --exclude '*~' -e ssh --delete $(ROOTDEST)/$$1/$$2 mandrake@ken:/c/cooker/$$1; } ;\</div><div class='del'>-	upload Mandrake/mdkinst '' ;\</div><div class='del'>-	upload Mandrake/base compssUsers* ;\</div><div class='del'>-	upload Mandrake/base rpmsrate ;\</div><div class='del'>-	upload Mandrake/base *_stage2.bz2 ;\</div><div class='del'>-	upload Mandrake/share/advertising '' ;\</div><div class='del'>-	upload misc gendistrib ;\</div><div class='del'>-	upload misc make_mdkinst_stage2 ;\</div><div class='del'>-	upload misc packdrake ;\</div><div class='del'>-	upload misc packdrake.pm ;\</div><div class='del'>-	upload misc rpmtools.pm ;\</div><div class='del'>-	upload misc auto ;\</div><div class='del'>-	upload '' live_update ;\</div><div class='del'>-	upload images MD5SUM ;\</div><div class='del'>-	upload images *.img* ;\</div><div class='del'>-	upload images/alternatives '' ;\</div><div class='del'>-	upload isolinux '' ;\</div><div class='del'>-	echo</div><div class='head'>diff --git a/docs/.cvsignore b/docs/.cvsignore<br/>deleted file mode 100644<br/>index a0593a470..000000000<br/>--- a/<a href='/software/drakx/tree/docs/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-pictures</div><div class='head'>diff --git a/docs/BUGS b/docs/BUGS<br/>deleted file mode 100644<br/>index 1d154fcf1..000000000<br/>--- a/<a href='/software/drakx/tree/docs/BUGS?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/BUGS</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-doInstallStep: if there's not enough room, error, but packages are marked installed :(</div><div class='del'>-</div><div class='del'>-when you click directly on setupFilesystems and you have scsi, you're fucked.</div><div class='del'>-Even if you go to setupSCSI, you won't be able to have partitions again.</div><div class='del'>-</div><div class='del'>-bug non reproductible:</div><div class='del'>-- /etc/passwd is empty after `root passwd' stage :(</div><div class='del'>-- reboot at the end of package installation with a lot of error messages from</div><div class='del'>-gtk about the progressbar</div><div class='del'>-</div><div class='head'>diff --git a/docs/COPYING b/docs/COPYING<br/>deleted file mode 100644<br/>index 60549be51..000000000<br/>--- a/<a href='/software/drakx/tree/docs/COPYING?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/COPYING</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,340 +0,0 @@</div><div class='del'>-		    GNU GENERAL PUBLIC LICENSE</div><div class='del'>-		       Version 2, June 1991</div><div class='del'>-</div><div class='del'>- Copyright (C) 1989, 1991 Free Software Foundation, Inc.</div><div class='del'>-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</div><div class='del'>- Everyone is permitted to copy and distribute verbatim copies</div><div class='del'>- of this license document, but changing it is not allowed.</div><div class='del'>-</div><div class='del'>-			    Preamble</div><div class='del'>-</div><div class='del'>-  The licenses for most software are designed to take away your</div><div class='del'>-freedom to share and change it.  By contrast, the GNU General Public</div><div class='del'>-License is intended to guarantee your freedom to share and change free</div><div class='del'>-software--to make sure the software is free for all its users.  This</div><div class='del'>-General Public License applies to most of the Free Software</div><div class='del'>-Foundation's software and to any other program whose authors commit to</div><div class='del'>-using it.  (Some other Free Software Foundation software is covered by</div><div class='del'>-the GNU Library General Public License instead.)  You can apply it to</div><div class='del'>-your programs, too.</div><div class='del'>-</div><div class='del'>-  When we speak of free software, we are referring to freedom, not</div><div class='del'>-price.  Our General Public Licenses are designed to make sure that you</div><div class='del'>-have the freedom to distribute copies of free software (and charge for</div><div class='del'>-this service if you wish), that you receive source code or can get it</div><div class='del'>-if you want it, that you can change the software or use pieces of it</div><div class='del'>-in new free programs; and that you know you can do these things.</div><div class='del'>-</div><div class='del'>-  To protect your rights, we need to make restrictions that forbid</div><div class='del'>-anyone to deny you these rights or to ask you to surrender the rights.</div><div class='del'>-These restrictions translate to certain responsibilities for you if you</div><div class='del'>-distribute copies of the software, or if you modify it.</div><div class='del'>-</div><div class='del'>-  For example, if you distribute copies of such a program, whether</div><div class='del'>-gratis or for a fee, you must give the recipients all the rights that</div><div class='del'>-you have.  You must make sure that they, too, receive or can get the</div><div class='del'>-source code.  And you must show them these terms so they know their</div><div class='del'>-rights.</div><div class='del'>-</div><div class='del'>-  We protect your rights with two steps: (1) copyright the software, and</div><div class='del'>-(2) offer you this license which gives you legal permission to copy,</div><div class='del'>-distribute and/or modify the software.</div><div class='del'>-</div><div class='del'>-  Also, for each author's protection and ours, we want to make certain</div><div class='del'>-that everyone understands that there is no warranty for this free</div><div class='del'>-software.  If the software is modified by someone else and passed on, we</div><div class='del'>-want its recipients to know that what they have is not the original, so</div><div class='del'>-that any problems introduced by others will not reflect on the original</div><div class='del'>-authors' reputations.</div><div class='del'>-</div><div class='del'>-  Finally, any free program is threatened constantly by software</div><div class='del'>-patents.  We wish to avoid the danger that redistributors of a free</div><div class='del'>-program will individually obtain patent licenses, in effect making the</div><div class='del'>-program proprietary.  To prevent this, we have made it clear that any</div><div class='del'>-patent must be licensed for everyone's free use or not licensed at all.</div><div class='del'>-</div><div class='del'>-  The precise terms and conditions for copying, distribution and</div><div class='del'>-modification follow.</div><div class='del'>-</div><div class='del'>-		    GNU GENERAL PUBLIC LICENSE</div><div class='del'>-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</div><div class='del'>-</div><div class='del'>-  0. This License applies to any program or other work which contains</div><div class='del'>-a notice placed by the copyright holder saying it may be distributed</div><div class='del'>-under the terms of this General Public License.  The "Program", below,</div><div class='del'>-refers to any such program or work, and a "work based on the Program"</div><div class='del'>-means either the Program or any derivative work under copyright law:</div><div class='del'>-that is to say, a work containing the Program or a portion of it,</div><div class='del'>-either verbatim or with modifications and/or translated into another</div><div class='del'>-language.  (Hereinafter, translation is included without limitation in</div><div class='del'>-the term "modification".)  Each licensee is addressed as "you".</div><div class='del'>-</div><div class='del'>-Activities other than copying, distribution and modification are not</div><div class='del'>-covered by this License; they are outside its scope.  The act of</div><div class='del'>-running the Program is not restricted, and the output from the Program</div><div class='del'>-is covered only if its contents constitute a work based on the</div><div class='del'>-Program (independent of having been made by running the Program).</div><div class='del'>-Whether that is true depends on what the Program does.</div><div class='del'>-</div><div class='del'>-  1. You may copy and distribute verbatim copies of the Program's</div><div class='del'>-source code as you receive it, in any medium, provided that you</div><div class='del'>-conspicuously and appropriately publish on each copy an appropriate</div><div class='del'>-copyright notice and disclaimer of warranty; keep intact all the</div><div class='del'>-notices that refer to this License and to the absence of any warranty;</div><div class='del'>-and give any other recipients of the Program a copy of this License</div><div class='del'>-along with the Program.</div><div class='del'>-</div><div class='del'>-You may charge a fee for the physical act of transferring a copy, and</div><div class='del'>-you may at your option offer warranty protection in exchange for a fee.</div><div class='del'>-</div><div class='del'>-  2. You may modify your copy or copies of the Program or any portion</div><div class='del'>-of it, thus forming a work based on the Program, and copy and</div><div class='del'>-distribute such modifications or work under the terms of Section 1</div><div class='del'>-above, provided that you also meet all of these conditions:</div><div class='del'>-</div><div class='del'>-    a) You must cause the modified files to carry prominent notices</div><div class='del'>-    stating that you changed the files and the date of any change.</div><div class='del'>-</div><div class='del'>-    b) You must cause any work that you distribute or publish, that in</div><div class='del'>-    whole or in part contains or is derived from the Program or any</div><div class='del'>-    part thereof, to be licensed as a whole at no charge to all third</div><div class='del'>-    parties under the terms of this License.</div><div class='del'>-</div><div class='del'>-    c) If the modified program normally reads commands interactively</div><div class='del'>-    when run, you must cause it, when started running for such</div><div class='del'>-    interactive use in the most ordinary way, to print or display an</div><div class='del'>-    announcement including an appropriate copyright notice and a</div><div class='del'>-    notice that there is no warranty (or else, saying that you provide</div><div class='del'>-    a warranty) and that users may redistribute the program under</div><div class='del'>-    these conditions, and telling the user how to view a copy of this</div><div class='del'>-    License.  (Exception: if the Program itself is interactive but</div><div class='del'>-    does not normally print such an announcement, your work based on</div><div class='del'>-    the Program is not required to print an announcement.)</div><div class='del'>-</div><div class='del'>-These requirements apply to the modified work as a whole.  If</div><div class='del'>-identifiable sections of that work are not derived from the Program,</div><div class='del'>-and can be reasonably considered independent and separate works in</div><div class='del'>-themselves, then this License, and its terms, do not apply to those</div><div class='del'>-sections when you distribute them as separate works.  But when you</div><div class='del'>-distribute the same sections as part of a whole which is a work based</div><div class='del'>-on the Program, the distribution of the whole must be on the terms of</div><div class='del'>-this License, whose permissions for other licensees extend to the</div><div class='del'>-entire whole, and thus to each and every part regardless of who wrote it.</div><div class='del'>-</div><div class='del'>-Thus, it is not the intent of this section to claim rights or contest</div><div class='del'>-your rights to work written entirely by you; rather, the intent is to</div><div class='del'>-exercise the right to control the distribution of derivative or</div><div class='del'>-collective works based on the Program.</div><div class='del'>-</div><div class='del'>-In addition, mere aggregation of another work not based on the Program</div><div class='del'>-with the Program (or with a work based on the Program) on a volume of</div><div class='del'>-a storage or distribution medium does not bring the other work under</div><div class='del'>-the scope of this License.</div><div class='del'>-</div><div class='del'>-  3. You may copy and distribute the Program (or a work based on it,</div><div class='del'>-under Section 2) in object code or executable form under the terms of</div><div class='del'>-Sections 1 and 2 above provided that you also do one of the following:</div><div class='del'>-</div><div class='del'>-    a) Accompany it with the complete corresponding machine-readable</div><div class='del'>-    source code, which must be distributed under the terms of Sections</div><div class='del'>-    1 and 2 above on a medium customarily used for software interchange; or,</div><div class='del'>-</div><div class='del'>-    b) Accompany it with a written offer, valid for at least three</div><div class='del'>-    years, to give any third party, for a charge no more than your</div><div class='del'>-    cost of physically performing source distribution, a complete</div><div class='del'>-    machine-readable copy of the corresponding source code, to be</div><div class='del'>-    distributed under the terms of Sections 1 and 2 above on a medium</div><div class='del'>-    customarily used for software interchange; or,</div><div class='del'>-</div><div class='del'>-    c) Accompany it with the information you received as to the offer</div><div class='del'>-    to distribute corresponding source code.  (This alternative is</div><div class='del'>-    allowed only for noncommercial distribution and only if you</div><div class='del'>-    received the program in object code or executable form with such</div><div class='del'>-    an offer, in accord with Subsection b above.)</div><div class='del'>-</div><div class='del'>-The source code for a work means the preferred form of the work for</div><div class='del'>-making modifications to it.  For an executable work, complete source</div><div class='del'>-code means all the source code for all modules it contains, plus any</div><div class='del'>-associated interface definition files, plus the scripts used to</div><div class='del'>-control compilation and installation of the executable.  However, as a</div><div class='del'>-special exception, the source code distributed need not include</div><div class='del'>-anything that is normally distributed (in either source or binary</div><div class='del'>-form) with the major components (compiler, kernel, and so on) of the</div><div class='del'>-operating system on which the executable runs, unless that component</div><div class='del'>-itself accompanies the executable.</div><div class='del'>-</div><div class='del'>-If distribution of executable or object code is made by offering</div><div class='del'>-access to copy from a designated place, then offering equivalent</div><div class='del'>-access to copy the source code from the same place counts as</div><div class='del'>-distribution of the source code, even though third parties are not</div><div class='del'>-compelled to copy the source along with the object code.</div><div class='del'>-</div><div class='del'>-  4. You may not copy, modify, sublicense, or distribute the Program</div><div class='del'>-except as expressly provided under this License.  Any attempt</div><div class='del'>-otherwise to copy, modify, sublicense or distribute the Program is</div><div class='del'>-void, and will automatically terminate your rights under this License.</div><div class='del'>-However, parties who have received copies, or rights, from you under</div><div class='del'>-this License will not have their licenses terminated so long as such</div><div class='del'>-parties remain in full compliance.</div><div class='del'>-</div><div class='del'>-  5. You are not required to accept this License, since you have not</div><div class='del'>-signed it.  However, nothing else grants you permission to modify or</div><div class='del'>-distribute the Program or its derivative works.  These actions are</div><div class='del'>-prohibited by law if you do not accept this License.  Therefore, by</div><div class='del'>-modifying or distributing the Program (or any work based on the</div><div class='del'>-Program), you indicate your acceptance of this License to do so, and</div><div class='del'>-all its terms and conditions for copying, distributing or modifying</div><div class='del'>-the Program or works based on it.</div><div class='del'>-</div><div class='del'>-  6. Each time you redistribute the Program (or any work based on the</div><div class='del'>-Program), the recipient automatically receives a license from the</div><div class='del'>-original licensor to copy, distribute or modify the Program subject to</div><div class='del'>-these terms and conditions.  You may not impose any further</div><div class='del'>-restrictions on the recipients' exercise of the rights granted herein.</div><div class='del'>-You are not responsible for enforcing compliance by third parties to</div><div class='del'>-this License.</div><div class='del'>-</div><div class='del'>-  7. If, as a consequence of a court judgment or allegation of patent</div><div class='del'>-infringement or for any other reason (not limited to patent issues),</div><div class='del'>-conditions are imposed on you (whether by court order, agreement or</div><div class='del'>-otherwise) that contradict the conditions of this License, they do not</div><div class='del'>-excuse you from the conditions of this License.  If you cannot</div><div class='del'>-distribute so as to satisfy simultaneously your obligations under this</div><div class='del'>-License and any other pertinent obligations, then as a consequence you</div><div class='del'>-may not distribute the Program at all.  For example, if a patent</div><div class='del'>-license would not permit royalty-free redistribution of the Program by</div><div class='del'>-all those who receive copies directly or indirectly through you, then</div><div class='del'>-the only way you could satisfy both it and this License would be to</div><div class='del'>-refrain entirely from distribution of the Program.</div><div class='del'>-</div><div class='del'>-If any portion of this section is held invalid or unenforceable under</div><div class='del'>-any particular circumstance, the balance of the section is intended to</div><div class='del'>-apply and the section as a whole is intended to apply in other</div><div class='del'>-circumstances.</div><div class='del'>-</div><div class='del'>-It is not the purpose of this section to induce you to infringe any</div><div class='del'>-patents or other property right claims or to contest validity of any</div><div class='del'>-such claims; this section has the sole purpose of protecting the</div><div class='del'>-integrity of the free software distribution system, which is</div><div class='del'>-implemented by public license practices.  Many people have made</div><div class='del'>-generous contributions to the wide range of software distributed</div><div class='del'>-through that system in reliance on consistent application of that</div><div class='del'>-system; it is up to the author/donor to decide if he or she is willing</div><div class='del'>-to distribute software through any other system and a licensee cannot</div><div class='del'>-impose that choice.</div><div class='del'>-</div><div class='del'>-This section is intended to make thoroughly clear what is believed to</div><div class='del'>-be a consequence of the rest of this License.</div><div class='del'>-</div><div class='del'>-  8. If the distribution and/or use of the Program is restricted in</div><div class='del'>-certain countries either by patents or by copyrighted interfaces, the</div><div class='del'>-original copyright holder who places the Program under this License</div><div class='del'>-may add an explicit geographical distribution limitation excluding</div><div class='del'>-those countries, so that distribution is permitted only in or among</div><div class='del'>-countries not thus excluded.  In such case, this License incorporates</div><div class='del'>-the limitation as if written in the body of this License.</div><div class='del'>-</div><div class='del'>-  9. The Free Software Foundation may publish revised and/or new versions</div><div class='del'>-of the General Public License from time to time.  Such new versions will</div><div class='del'>-be similar in spirit to the present version, but may differ in detail to</div><div class='del'>-address new problems or concerns.</div><div class='del'>-</div><div class='del'>-Each version is given a distinguishing version number.  If the Program</div><div class='del'>-specifies a version number of this License which applies to it and "any</div><div class='del'>-later version", you have the option of following the terms and conditions</div><div class='del'>-either of that version or of any later version published by the Free</div><div class='del'>-Software Foundation.  If the Program does not specify a version number of</div><div class='del'>-this License, you may choose any version ever published by the Free Software</div><div class='del'>-Foundation.</div><div class='del'>-</div><div class='del'>-  10. If you wish to incorporate parts of the Program into other free</div><div class='del'>-programs whose distribution conditions are different, write to the author</div><div class='del'>-to ask for permission.  For software which is copyrighted by the Free</div><div class='del'>-Software Foundation, write to the Free Software Foundation; we sometimes</div><div class='del'>-make exceptions for this.  Our decision will be guided by the two goals</div><div class='del'>-of preserving the free status of all derivatives of our free software and</div><div class='del'>-of promoting the sharing and reuse of software generally.</div><div class='del'>-</div><div class='del'>-			    NO WARRANTY</div><div class='del'>-</div><div class='del'>-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY</div><div class='del'>-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN</div><div class='del'>-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES</div><div class='del'>-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED</div><div class='del'>-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</div><div class='del'>-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS</div><div class='del'>-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE</div><div class='del'>-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,</div><div class='del'>-REPAIR OR CORRECTION.</div><div class='del'>-</div><div class='del'>-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING</div><div class='del'>-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR</div><div class='del'>-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,</div><div class='del'>-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING</div><div class='del'>-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED</div><div class='del'>-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY</div><div class='del'>-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER</div><div class='del'>-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE</div><div class='del'>-POSSIBILITY OF SUCH DAMAGES.</div><div class='del'>-</div><div class='del'>-		     END OF TERMS AND CONDITIONS</div><div class='del'>-</div><div class='del'>-	    How to Apply These Terms to Your New Programs</div><div class='del'>-</div><div class='del'>-  If you develop a new program, and you want it to be of the greatest</div><div class='del'>-possible use to the public, the best way to achieve this is to make it</div><div class='del'>-free software which everyone can redistribute and change under these terms.</div><div class='del'>-</div><div class='del'>-  To do so, attach the following notices to the program.  It is safest</div><div class='del'>-to attach them to the start of each source file to most effectively</div><div class='del'>-convey the exclusion of warranty; and each file should have at least</div><div class='del'>-the "copyright" line and a pointer to where the full notice is found.</div><div class='del'>-</div><div class='del'>-    &lt;one line to give the program's name and a brief idea of what it does.&gt;</div><div class='del'>-    Copyright (C) 19yy  &lt;name of author&gt;</div><div class='del'>-</div><div class='del'>-    This program is free software; you can redistribute it and/or modify</div><div class='del'>-    it under the terms of the GNU General Public License as published by</div><div class='del'>-    the Free Software Foundation; either version 2 of the License, or</div><div class='del'>-    (at your option) any later version.</div><div class='del'>-</div><div class='del'>-    This program is distributed in the hope that it will be useful,</div><div class='del'>-    but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</div><div class='del'>-    GNU General Public License for more details.</div><div class='del'>-</div><div class='del'>-    You should have received a copy of the GNU General Public License</div><div class='del'>-    along with this program; if not, write to the Free Software</div><div class='del'>-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Also add information on how to contact you by electronic and paper mail.</div><div class='del'>-</div><div class='del'>-If the program is interactive, make it output a short notice like this</div><div class='del'>-when it starts in an interactive mode:</div><div class='del'>-</div><div class='del'>-    Gnomovision version 69, Copyright (C) 19yy name of author</div><div class='del'>-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</div><div class='del'>-    This is free software, and you are welcome to redistribute it</div><div class='del'>-    under certain conditions; type `show c' for details.</div><div class='del'>-</div><div class='del'>-The hypothetical commands `show w' and `show c' should show the appropriate</div><div class='del'>-parts of the General Public License.  Of course, the commands you use may</div><div class='del'>-be called something other than `show w' and `show c'; they could even be</div><div class='del'>-mouse-clicks or menu items--whatever suits your program.</div><div class='del'>-</div><div class='del'>-You should also get your employer (if you work as a programmer) or your</div><div class='del'>-school, if any, to sign a "copyright disclaimer" for the program, if</div><div class='del'>-necessary.  Here is a sample; alter the names:</div><div class='del'>-</div><div class='del'>-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program</div><div class='del'>-  `Gnomovision' (which makes passes at compilers) written by James Hacker.</div><div class='del'>-</div><div class='del'>-  &lt;signature of Ty Coon&gt;, 1 April 1989</div><div class='del'>-  Ty Coon, President of Vice</div><div class='del'>-</div><div class='del'>-This General Public License does not permit incorporating your program into</div><div class='del'>-proprietary programs.  If your program is a subroutine library, you may</div><div class='del'>-consider it more useful to permit linking proprietary applications with the</div><div class='del'>-library.  If this is what you want to do, use the GNU Library General</div><div class='del'>-Public License instead of this License.</div><div class='head'>diff --git a/docs/HACKING b/docs/HACKING<br/>deleted file mode 100644<br/>index b5844c846..000000000<br/>--- a/<a href='/software/drakx/tree/docs/HACKING?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/HACKING</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,126 +0,0 @@</div><div class='del'>--=-=--</div><div class='del'>-DrakX is a very big project, and it needs special setups to work.</div><div class='del'>-The purpose of this file is to explain how you can setup your box to make it</div><div class='del'>-compile and run.</div><div class='del'>--=-=--</div><div class='del'>-</div><div class='del'>-Beware, don't try this on a production machine with important data.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>---------------------------------------------------------------------------</div><div class='del'>-Sources installation:</div><div class='del'>-</div><div class='del'>-  First grab the gi.tar.bz2 archive and untar it in your home directory,</div><div class='del'>-for example from DrakX-*.src.rpm on your Mandrake Linux distribution.</div><div class='del'>-</div><div class='del'>-cd to gi</div><div class='del'>-for i in `du -a | grep CVS/Root | cut -f 2`</div><div class='del'>-do</div><div class='del'>-  sed -e 's/prigaux/anoncvs/' $i &gt; $i.tmp</div><div class='del'>-  mv $i.tmp $i</div><div class='del'>-done</div><div class='del'>-</div><div class='del'>-Then, log yourself into the cvs:</div><div class='del'>-% export CVS_RSH=ssh</div><div class='del'>-% export CVSROOT=:ext:anoncvs@cvs.mandrakesoft.com:/cooker</div><div class='del'>-% cvs checkout gi</div><div class='del'>-	(passwd: 'cvs')</div><div class='del'>-And update the gi package:</div><div class='del'>-cvs update -P -d</div><div class='del'>-</div><div class='del'>-</div><div class='del'>---------------------------------------------------------------------------</div><div class='del'>-Preparing the compilation process:</div><div class='del'>-</div><div class='del'>-(1) target directory</div><div class='del'>-</div><div class='del'>-create a /export directory and copy a recent Mandrake Linux CD in there.</div><div class='del'>-(You don't have to put have all the RPMS...) ; you'll need roughly 1.5</div><div class='del'>-Gbytes for a full install.</div><div class='del'>-</div><div class='del'>-[gc@obiwan ~/cvs/gi] su -c "mkdir /export"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-(2) devel packages</div><div class='del'>-</div><div class='del'>-you need quite a few devel packages to run the stuff; roughly: gcc, make,</div><div class='del'>-glibc-devel, perl-devel, XFree86-devel, libglib-devel, libgtk+-devel,</div><div class='del'>-perl-GTK, ldetect*, libslang-devel, libnewt-devel, e2fsprogs, dosfstools,</div><div class='del'>-rpm-devel, popt-devel, rpmtools, libbzip2*, libncurses*.</div><div class='del'>-</div><div class='del'>-you may need a few others I forgot to mention. if the compilation</div><div class='del'>-fails, try to understand the message and install any necessary</div><div class='del'>-remaining package.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-(3) sudo</div><div class='del'>-</div><div class='del'>-never build or run DrakX as root; install package sudo, and set up</div><div class='del'>-relevant permissions; the following should be enough: (in your</div><div class='del'>-/etc/sudoers)</div><div class='del'>-</div><div class='del'>-gc ALL=(root) NOPASSWD:/usr/bin/patch,NOPASSWD:/bin/rpm,NOPASSWD:/bin/mount,NOPASSWD:/bin/cp,NOPASSWD:/bin/umount,NOPASSWD:/usr/bin/install,NOPASSWD:/bin/rm,NOPASSWD:/bin/mv,NOPASSWD:/bin/tar,NOPASSWD:/bin/cpio,NOPASSWD:/bin/chown,NOPASSWD:/bin/mkdir,NOPASSWD:/usr/bin/strip,NOPASSWD:/bin/mknod</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-(4) boot kernel</div><div class='del'>-</div><div class='del'>-you need one or more kernels and (all?) their modules. it's located in</div><div class='del'>-subdirectory "all.kernels" in DrakX-*.src.rpm ; if you ever grab (or</div><div class='del'>-build) another boot kernel, replace or add an entry in "all.kernels" as:</div><div class='del'>-</div><div class='del'>-	(a) create your modules subdir (useful to describe the</div><div class='del'>-            VERSION_RELEASE) and untar your kernel</div><div class='del'>-</div><div class='del'>-[gc@obiwan ~/cvs/gi/all.kernels] mkdir 2.4.1-BOOTcustom</div><div class='del'>-[gc@obiwan ~/cvs/gi/all.kernels] cd 2.4.1-BOOTcustom</div><div class='del'>-[gc@obiwan ~/cvs/gi/all.kernels/2.4.1-BOOTcustom] tar jxvf ~/mycustomkernel.tar.bz2</div><div class='del'>-[gc@obiwan ~/cvs/gi/all.kernels/2.4.1-BOOTcustom] ls</div><div class='del'>-boot/  cardmgr/  lib/</div><div class='del'>-</div><div class='del'>-	(c) build kernel/modules stuff for stage1 and stage2</div><div class='del'>-[gc@obiwan ~/cvs/gi] ./update_kernel</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-(5) pray</div><div class='del'>-</div><div class='del'>-[gc@obiwan ~/cvs/gi] make</div><div class='del'>-</div><div class='del'>-</div><div class='del'>----------------------------------------------------------------------------</div><div class='del'>-The comments written with #- are automatically stripped out at install.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>----------------------------------------------------------------------------</div><div class='del'>-testing all:</div><div class='del'>-</div><div class='del'>-  go to the perl-install directory and execute ./g_auto_install --test</div><div class='del'>-</div><div class='del'>-  You should be able to test the whole thing in a non-destructive way.</div><div class='del'>-</div><div class='del'>-NEVER compile and/or execute DrakX as root!</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Here is how I (dams) made it work on my computer.</div><div class='del'>--------------------------------------------------</div><div class='del'>-</div><div class='del'>-- get the sources</div><div class='del'>-- install the librairies needed included newt-devel gtk+-devel popt-devel popt gtk-engines</div><div class='del'>-- cd path/to/gi</div><div class='del'>-- make</div><div class='del'>-- mkdir /usr/share/gtk</div><div class='del'>-- ln -s path/to/gi/perl-install/share/themes /usr/share/gtk</div><div class='del'>-- ln -s path/to/gi/perl-install/share/step-* /usr/share</div><div class='del'>-- ln -s path/to/gi/perl-install/share/help.xpm /usr/share</div><div class='del'>-- ln -s path/to/gi/perl-install/share/isdn* /etc/sysconfdir/network-scripts</div><div class='del'>-- have a cd architecture linked on /export</div><div class='del'>-- ln -s /export /tmp/rhimage</div><div class='del'>-- export PERL_INSTALL_TEST=1</div><div class='del'>-- cd path/to/gi/perl-install</div><div class='del'>-- gendistrib --noclean --distrib /export</div><div class='del'>-- ./install2 in root (dangerous) or chmod a+r /dev/hd* and ./install2 in user</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-address all bugreports to dave@null.com</div><div class='head'>diff --git a/docs/Partition-ends-after-end-of-disk.txt b/docs/Partition-ends-after-end-of-disk.txt<br/>deleted file mode 100644<br/>index 3da57d561..000000000<br/>--- a/<a href='/software/drakx/tree/docs/Partition-ends-after-end-of-disk.txt?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/Partition-ends-after-end-of-disk.txt</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,66 +0,0 @@</div><div class='del'>-        Cylinder/Head/Size Hell Is Not Over </div><div class='del'>-</div><div class='del'>-            pixel@mandrakesoft.com </div><div class='del'>-         $Date$</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Nowadays, you can boot Linux without ever relying on CHS</div><div class='del'>-(Cylinder/Head/Size):</div><div class='del'>-</div><div class='del'>-- CHS information on partition table is obsolete and not used anymore.</div><div class='del'>-It was causing the 1024th cylinder limitation:</div><div class='del'>-  - disallowing partitions above 8GiG. Problem overcome using 28bits Linear</div><div class='del'>-  Block Addressing (LBA) in partition table.</div><div class='del'>-  - disallowing to boot on partition above 8GiG (due to int13 limitation used</div><div class='del'>-  in bootloaders). Problem overcome using int13 extensions (EDD)</div><div class='del'>-</div><div class='del'>-Logical CHS (Cylinder/Head/Size) and physical CHS are not related anymore.</div><div class='del'>-Especially the size of a hard drive is not a multiple of the number of</div><div class='del'>-Cylinders.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The problem is that many tools still rely somewhat heavily on CHS information.</div><div class='del'>-- most tools adjust partitions on cylinder boundary</div><div class='del'>-- some tools compute the size of the disk based on CHS (eg: fdisk)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Resulting problems in various tools:</div><div class='del'>-</div><div class='del'>-- last partition not cylinder boundary adjusted, and overrun CHS computed size</div><div class='del'>-  - fdisk</div><div class='del'>-    &gt; Total allocated sectors %d greater than the maximum %d</div><div class='del'>-  - cfdisk (need confirmation)</div><div class='del'>-    &gt; FATAL ERROR: Bad primary partition %d: Partition ends after end-of-disk</div><div class='del'>-    or</div><div class='del'>-    &gt; FATAL ERROR: Bad logical partition %d: Partition ends after end-of-disk</div><div class='del'>-  - Partition Magic (version?)</div><div class='del'>-    &gt; Error #109: Partition ends after end of disk</div><div class='del'>-  - Windows &lt;= 98se, Windows Me</div><div class='del'>-    (doesn't like it, what error message?)</div><div class='del'>-</div><div class='del'>-  Tools handling it correctly:</div><div class='del'>-  - parted and so diskdruid in RedHat &gt;= 7.2 (or is it 7.x?)</div><div class='del'>-  - diskdrake &gt;= Mandrake 8.2</div><div class='del'>-  - Windows XP (need confirmation)</div><div class='del'>-</div><div class='del'>-  Tools using the full size of the disk, and so causing pbs with fdisk/cfdisk/...:</div><div class='del'>-  - diskdrake == Mandrake 8.2</div><div class='del'>-</div><div class='del'>-- disagreement between CHS and linear address</div><div class='del'>-  - parted</div><div class='del'>-    &gt; "Warning: Unable to align partition properly.  This probably means that</div><div class='del'>-    &gt; another partitioning tool generated an</div><div class='del'>-    &gt; incorrect partition table, because it didn't have the correct BIOS</div><div class='del'>-    &gt; geometry.  It is safe to ignore,but</div><div class='del'>-    &gt; ignoring may cause (fixable) problems with some boot loaders.</div><div class='del'>-    &gt; Ignore Cancel ? C</div><div class='del'>-  - lilo</div><div class='del'>-    &gt; Warning: Kernel &amp; BIOS return differing head/sector geometries for device 0x80</div><div class='del'>-    &gt;     Kernel: 38792 cylinders, 16 heads, 63 sectors</div><div class='del'>-    &gt;       BIOS: 1023 cylinders, 255 heads, 63 sectors</div><div class='del'>-    &gt; Device 0x2100: Inconsistent partition table, 2nd entry</div><div class='del'>-    &gt;   CHS address in PT:  48:0:1  --&gt;  LBA (771120)</div><div class='del'>-    &gt;   LBA address in PT:  48384  --&gt;  CHS (3:3:1)</div><div class='del'>-    &gt; The partition table is *NOT* being adjusted.</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/docs/README b/docs/README<br/>deleted file mode 100644<br/>index d35508e66..000000000<br/>--- a/<a href='/software/drakx/tree/docs/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,377 +0,0 @@</div><div class='del'>-Well here is a little description of what DrakX needs to work in comparison</div><div class='del'>-to the RH newt install.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* CVS **************************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-Like all good free software, DrakX is in CVS :)</div><div class='del'>-</div><div class='del'>-You can access it at http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/gi</div><div class='del'>-</div><div class='del'>-or via</div><div class='del'>-</div><div class='del'>-export CVS_RSH=ssh</div><div class='del'>-export CVSROOT=:ext:anoncvs@cvs.mandrakesoft.com:/cooker</div><div class='del'>-cvs checkout gi</div><div class='del'>- (enter password 'cvs')</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-This is only read-only access. If you want more, tell me (pixel@mandrakesoft.com)</div><div class='del'>-</div><div class='del'>-Alas, all is not in CVS as a lot of things are binary files.</div><div class='del'>-</div><div class='del'>-For the boot kernel, see https://kenobi.mandrakesoft.com/~chmou/kernel/BOOT/</div><div class='del'>-or build your own: </div><div class='del'>-- install the kernel-*.src.rpm from</div><div class='del'>-- go to the /usr/src/RPM/SPECS/ (or any others topdir you have configured).</div><div class='del'>-- type rpm -ba --with BOOT kernel-2.4.spec.</div><div class='del'>-Then see function install_kernel() at the end of gi/update_kernel.</div><div class='del'>-</div><div class='del'>-For the other things, take SRPMS/DrakX-*.src.rpm</div><div class='del'>-</div><div class='del'>-Please note that redoing *all* the stuff is not for the faint of heart. I myself</div><div class='del'>-sometimes wonder what the whole make does :-%</div><div class='del'>-Instead, changing some .pm files is quite easy (nice interpreted language)</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Making your custom install ***************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-If you have your own rpms you want to add, or make your own updated cdrom, you</div><div class='del'>-just have to issue:</div><div class='del'>-</div><div class='del'>-% gendistrib --noclean --distrib &lt;DIRS&gt;</div><div class='del'>-</div><div class='del'>-Where &lt;DIRS&gt; is the root of all the media that the install will see, this first</div><div class='del'>-one is the main one :</div><div class='del'>-</div><div class='del'>-(1) network or 1-cdrom installs</div><div class='del'>-	DIRS == the root directory of the Distribution</div><div class='del'>-</div><div class='del'>-(2) multi-cdrom install</div><div class='del'>-	DIRS == the root directories of all the media that the install will see</div><div class='del'>-</div><div class='del'>-``gendistrib'' will scan the file Mandrake/base/hdlists in the main root</div><div class='del'>-directory (the first one in DIRS) to search for all media used. Typically you</div><div class='del'>-use Mandrake/RPMS* for RPM packages repository.</div><div class='del'>-For multi-cd, please use Mandrake/RPMS or Mandrake/RPMS1, Mandrake/RPMS2, etc.</div><div class='del'>-For one CD or a network/hd volume, please use Mandrake/RPMS.</div><div class='del'>-</div><div class='del'>-Optionnally, you can modify ``Mandrake/base/rpmsrate''; this file manages</div><div class='del'>-the relative importance of the files, and thus their installation or not.</div><div class='del'>-</div><div class='del'>-Also, mdkinst_stage2.gz must be remade if you modify files in Mandrake/mdkinst.</div><div class='del'>-See below for information about these files.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* FILES ************************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-First here are the different things needed :</div><div class='del'>-</div><div class='del'>-Mandrake/base/hdlists</div><div class='del'>-	description of the available install media.</div><div class='del'>-	format is one line for one medium as</div><div class='del'>-		&lt;hdlist_name&gt; &lt;rpms_directory&gt; &lt;description&gt;</div><div class='del'>-	&lt;hdlist_name&gt; should be match regexp /hdlist\S*.cz2?/</div><div class='del'>-	for example (two cd install) you get</div><div class='del'>-		hdlist1.cz	Mandrake/RPMS1	Boot CD</div><div class='del'>-		hdlist2.cz	Mandrake/RPMS2	Extension CD</div><div class='del'>-</div><div class='del'>-Mandrake/base/hdlist*.cz</div><div class='del'>-	table of rpm's headers, referred by ``hdlists''</div><div class='del'>-	their contents can be listed using ``packdrake -l &lt;hdlist_file&gt;'' or</div><div class='del'>-	or ``parsehdlist &lt;hdlist_file&gt;''.</div><div class='del'>-	! Need to be remade when Mandrake/RPMS* changes (with ``gendistrib'') !</div><div class='del'>-</div><div class='del'>-Mandrake/base/depslist.ordered</div><div class='del'>-	for each packages, tell which package it depends on. Also contains the</div><div class='del'>-	size for some (obscure) bloody reasons.</div><div class='del'>-	! Need to be remade when Mandrake/RPMS* changes !</div><div class='del'>-	(with ``gendistrib --noclean --distrib .'')</div><div class='del'>-</div><div class='del'>-Mandrake/base/compss</div><div class='del'>-	obsoletes comps. It store packages in different categories, generated</div><div class='del'>-	from the %{GROUP} field</div><div class='del'>-	! Need to be remade when Mandrake/RPMS* changes !</div><div class='del'>-	(with ``gendistrib --noclean --distrib .'')</div><div class='del'>-</div><div class='del'>-Mandrake/base/rpmsrate</div><div class='del'>-	ranks and classify packages, so that the installer will know which</div><div class='del'>-        ones to install. format is :</div><div class='del'>-		&lt;intern_group&gt;</div><div class='del'>-			&lt;level&gt; &lt;packages&gt;</div><div class='del'>-	where &lt;intern_group&gt; is a symbolic name used in Mandrake/base/compssUsers* files,</div><div class='del'>-	and &lt;level&gt; defines importance level as described below :</div><div class='del'>-		5	must have</div><div class='del'>-		4	important</div><div class='del'>-		3	very nice</div><div class='del'>-		2	nice</div><div class='del'>-		1	maybe</div><div class='del'>-	by default (for non expert), group selects packages for level 4 (important)</div><div class='del'>-	and 5 (must have). export mode add 3 (very nice) level. other level (below 2)</div><div class='del'>-	can only be selected using individual package selection.</div><div class='del'>-</div><div class='del'>-Mandrake/mdkinst</div><div class='del'>-	live system used on certain installs. See ``Ramdisk or not'' below for</div><div class='del'>-	more.</div><div class='del'>-</div><div class='del'>-Mandrake/base/mdkinst_stage2.bz2</div><div class='del'>-	for the ramdisk. live sytem in ext2 filesystem bzipped2.</div><div class='del'>-	generated from Mandrake/mdkinst tree using misc/make_mdkinst_stage2</div><div class='del'>-	See ``Ramdisk or not'' below for more.</div><div class='del'>-</div><div class='del'>-Mandrake/base/rescue_stage2.bz2</div><div class='del'>-	rescue ramdisk. live sytem in ext2 filesystem bzipped2.</div><div class='del'>-	this is the ramdisk loaded when typing rescue on boot prompt.</div><div class='del'>-	there is no live system available, only the ramdisk is used.</div><div class='del'>-</div><div class='del'>-images/*.img</div><div class='del'>-	boot images to use with DrakX. Use:</div><div class='del'>-	- cdrom for cdrom install</div><div class='del'>-	- network for ftp/nfs install (non-pcmcia devices)</div><div class='del'>-	- hd for hard-disk install</div><div class='del'>-	- pcmcia for pcmcia install (see ``PCMCIA install'' below for more)</div><div class='del'>-</div><div class='del'>-	the following modules have been removed from:</div><div class='del'>-          network.img: acenic sk98lin de4x5</div><div class='del'>-          cdrom.img and hd.img: BusLogic seagate fdomain g_NCR5380 dc395x_trm tmscsim</div><div class='del'>-          hd.img: dpt_i2o eata eata_pio eata_dma</div><div class='del'>-          cdrom.img: aztcd gscd isp16 mcd mcdx optcd cm206 sjcd </div><div class='del'>-          pcmcia.img: apa1480_cb</div><div class='del'>-	they are now in "other.img", </div><div class='del'>-</div><div class='del'>-	blank.img is a blank boot image without a kernel nor initrd. this image</div><div class='del'>-	can be used to generate custom boot disk.</div><div class='del'>-</div><div class='del'>-	if you think one of those modules is used a lot, tell me, i may find some room</div><div class='del'>-	to put it back on the main floppies.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* logs *************************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-During install, a lot of interesting stuff can be found in different places:</div><div class='del'>-in consoles and in files. To switch to console 2 for example, do Ctrl-Alt-F2</div><div class='del'>-from the X install.</div><div class='del'>-- alt-F1: the stdout of the install. Not very interesting stuff</div><div class='del'>-- alt-F2: simple shell. Quite a lot of commands are available but as they are</div><div class='del'>-written in perl (for space), they do not handle the very same options as normal.</div><div class='del'>-After install, you can do ``chroot /mnt'' to see your system just like after</div><div class='del'>-rebooting. ``rpm -qa'' works for example.</div><div class='del'>-- alt-F3: a lot of interesting things. Be carefull, some ``ERROR'' messages are</div><div class='del'>-not interesting.</div><div class='del'>-- alt-F4: kernel's place. aka the output of dmesg.</div><div class='del'>-- alt-F7: the graphical install lives there</div><div class='del'>-</div><div class='del'>-- command "bug" puts on floppy lots of interesting stuff.</div><div class='del'>-- /tmp/stage1.log: same as alt-F3 part when stage1 run (e.g. actions</div><div class='del'>-  before graphical install really begins)</div><div class='del'>-- /tmp/ddebug.log: (nearly the) same as latter alt-F3 part</div><div class='del'>-- /tmp/syslog: same as alt-F4</div><div class='del'>-- /mnt/root/drakx/ddebug.log: at the end of each step, DrakX tries to backup</div><div class='del'>-  /tmp/ddebug.log to /mnt/root/drakx. Available only after mounting of /.</div><div class='del'>-- /mnt/root/drakx/install.log: the log of the installation (or upgrade) of the rpms</div><div class='del'>-(just like rpm's /mnt/tmp/(install|upgrade).log)</div><div class='del'>-- /mnt/root/drakx/auto_inst.cfg.pl: a kickstart file generated at the end of each</div><div class='del'>-step. Can be used in 2 ways: kickstart install or ``defcfg'' install. Hopefully</div><div class='del'>-you know about kickstart. ``defcfg'' is a way to customize the default values in</div><div class='del'>-install. For example, French can be the default language with a qwerty keyboard,</div><div class='del'>-the auto-partitionning partitions can be changed, the default user class can be</div><div class='del'>-set to developer (!)...</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* po translation files *********************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-DrakX uses .po files for its translation. A script takes the different</div><div class='del'>-strings out of the .pm files. It generates the DrakX.pot file which contains</div><div class='del'>-all the english strings to translate.</div><div class='del'>-To add a new language, you just have to add it to lang.pm (if it's not there</div><div class='del'>-already) and put the .po in the perl-install/po directory (see ``Ramdisk or</div><div class='del'>-not'' to know if you have to regenerate the mdkinst_stage2.gz)</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* PCMCIA install ***************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-If the media you use to install is a pcmcia device, use the pcmcia boot disk.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Ramdisk or not ***************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-The DrakX install is much bigger than the newt one. So the ramdisk which was</div><div class='del'>-used is getting big, and costs a lot in memory </div><div class='del'>-(eg: the mdkinst_stage2 is 14MB - 23/09/99)</div><div class='del'>-(update! now size is 21MB - 24/01/01)</div><div class='del'>-(update! now size is 19MB - 26/04/01)</div><div class='del'>-</div><div class='del'>-|       | newt    | DrakX</div><div class='del'>-|-------+---------+----------------------------------------------------------</div><div class='del'>-| nfs   | live    | live</div><div class='del'>-| ftp   | ramdisk | ramdisk</div><div class='del'>-| http  | ramdisk | ramdisk</div><div class='del'>-| hd    | ramdisk | live if Mandrake/mdkinst/usr/bin/runinstall2 is a link,</div><div class='del'>-|       |         |   ramdisk otherwise</div><div class='del'>-| cdrom | ramdisk | live if memory &lt; 52MB, ramdisk otherwise</div><div class='del'>-</div><div class='del'>-Where ramdisk is needed, if detected memory is below the limit allowed for</div><div class='del'>-ramdisk (maintained in file gi/mdk-stage1/config-stage1.h; currently 52 Mb),</div><div class='del'>-a failure dialog will be printed explaining that there is not enough memory</div><div class='del'>-to perform the installation.</div><div class='del'>-</div><div class='del'>-When i say live, it means that the stage1 will *mount* the</div><div class='del'>-Mandrake/mdkinst and use it that way.</div><div class='del'>-</div><div class='del'>-The ramdisk is used in place of the live in some cases. This ramdisk is filled</div><div class='del'>-with mdkinst_stage2.gz</div><div class='del'>-</div><div class='del'>-For cdrom install, the ramdisk is used to speed up things (access time is quite</div><div class='del'>-high on cdrom drives)</div><div class='del'>-</div><div class='del'>-For pcmcia, it depends on the type of install.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* modules **********************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-Modules can be found in at least 2 places:</div><div class='del'>-- in /modules/modules.mar</div><div class='del'>-- in /lib/modules.cz&lt;KERNEL_VERSION_RELEASE&gt;</div><div class='del'>-</div><div class='del'>-/modules/modules.mar is used in mdk-stage1. It contains only modules</div><div class='del'>-interesting for one kind of install. For example in an hd install, it</div><div class='del'>-contains scsi modules. For a network install, it contains network card</div><div class='del'>-modules. (To create, extract or view files in a ``mar'' archive, please</div><div class='del'>-use gi/mdk-stage1/mar/mar; this is basically an archive format meant to</div><div class='del'>-be minimalistic)</div><div class='del'>-</div><div class='del'>-/lib/modules.cz&lt;KERNEL_VERSION_RELEASE&gt; contains all modules, it is used</div><div class='del'>-in stage2.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-To install a module, use modprobe which is in /usr/bin. It's a perl wrapper</div><div class='del'>-around /usr/bin/insmod. It uses the dependencies found in</div><div class='del'>-/modules/modules.dep (stage1).</div><div class='del'>-</div><div class='del'>-/usr/bin/insmod is a wrapper around /usr/bin/insmod_. It just extracts the</div><div class='del'>-module out of /lib/modules.cz in /tmp. Then it calls insmod_.</div><div class='del'>-</div><div class='del'>-/usr/bin/insmod_ is the real prog (which you usually find in /sbin/). You need</div><div class='del'>-to give it the complete path.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Making screenshots ***********************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-1. easy solution: press "F2"!</div><div class='del'>-</div><div class='del'>-2. On a test machine, make a network install, switch to console (ctrl-alt-F2), enter:</div><div class='del'>-% xhost+</div><div class='del'>-then, on another computer:</div><div class='del'>-% DISPLAY=test_machine:0 xwd -root | convert - screenshot.png</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Miscellaneous ****************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-&gt;  o Media access methods: nfs, ftp, http, hd, cdrom</div><div class='del'>-&gt;  o Stages: init, stage1, stage2</div><div class='del'>-&gt;    - What exactly each stage does</div><div class='del'>-</div><div class='del'>-init loads stage1</div><div class='del'>-stage1 loads stage2, on various medium type</div><div class='del'>-</div><div class='del'>-stage2 is too big to fit on a floppy, that's why stage1 exists</div><div class='del'>-</div><div class='del'>-&gt;    - How each stage relates to the various media access methods</div><div class='del'>-</div><div class='del'>-stage1 knows only how to access to the media is compiled for. It contains only</div><div class='del'>-the kernel modules needed for that media. For eg, the nfs/ftp/http stage1</div><div class='del'>-doesn't contain scsi modules nor ide.</div><div class='del'>-</div><div class='del'>-&gt;    - How one stage terminates and another begins. i.e., How does</div><div class='del'>-&gt;      stage1 find, mount, and launch stage2?</div><div class='del'>-</div><div class='del'>-/sbin/init just starts /sbin/stage1</div><div class='del'>-/sbin/stage1 takes care of mounting stage2 (in ramdisk if necessary)</div><div class='del'>-  then it runs /usr/bin/runinstall2</div><div class='del'>-</div><div class='del'>-&gt;  o Text and Graphic mode installers</div><div class='del'>-&gt;    - Architectural overview of each</div><div class='del'>-</div><div class='del'>-have a look at gi/docs/object_class.fig</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* OEM **************************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-&gt; I am a system OEM in Bangalore,India selling systems bundled with</div><div class='del'>-&gt; Mandrake Linux. The problem is that with every system I sell, I need to</div><div class='del'>-&gt; install &amp; configure the system which takes HOURS!. Can I do a diskcopy</div><div class='del'>-&gt; instead?</div><div class='del'>-&gt; </div><div class='del'>-&gt; Please Help. This is a major bottleneck for  me.</div><div class='del'>-</div><div class='del'>-many solutions:</div><div class='del'>-</div><div class='del'>-- make an install on drive hdb, then :</div><div class='del'>-      dd if=/dev/hdb of=/dev/hdc</div><div class='del'>-  but you should make sure the hardware is *REALLY* identical.</div><div class='del'>-</div><div class='del'>-- try the oem feature</div><div class='del'>-   3. - burn a cd out of *latest* cooker or 8.0 and above.</div><div class='del'>-      - boot on it telling "oem" to syslinux</div><div class='del'>-      !! it will destroy every data on the harddrive or</div><div class='del'>-         resize (or use free space) if *ONLY* one fat partition is defined !!</div><div class='del'>-      - you now have a very automated install matrix </div><div class='del'>-      (duplicate it with "dd if=/dev/hdb of=/dev/hdc bs=1M count=730")</div><div class='del'>-</div><div class='del'>-    put the harddrive in the oem box, the user will now have an *very* automated</div><div class='del'>-    install, just asking the root password and user password, and some other</div><div class='del'>-    question according its hardware.</div><div class='del'>-</div><div class='del'>-   4. just like 3. but you may have to mount /cdrom after typing rescue on</div><div class='del'>-      syslinux prompt (oem script do it automatically if a automatic boot nfs</div><div class='del'>-      network has been done as server is known). under /cdrom may be anything</div><div class='del'>-      as long as it provides an installation tree of Mandrake Linux.</div><div class='del'>-      after that run oem script by typing "/etc/oem -f" for normal installation</div><div class='del'>-      or "/etc/oem -f server" for server installation (normal with server installed).</div><div class='del'>-</div><div class='del'>-   5. (just like 3. without burning a cd, doing the first part by hand)</div><div class='del'>-      have a look at the /etc/oem script on the rescue and do it by hand...</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-cu Pixel, fpons.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-comments:</div><div class='del'>-1. maybe copy unnecessary things -&gt; take too long</div><div class='del'>-   solution -&gt; use bs=8k count=xxxx </div><div class='del'>-2. kernel_reread can be found on the new rescue, source is also at end of this</div><div class='del'>-mail. This solution works with one partition. Can be easily enhanced to many</div><div class='del'>-primary partitions... For extended partitions, more complicated, but not much :)</div><div class='del'>-3. has just been added in latest cooker. It may still have some pb. The main</div><div class='del'>-current limitation is IDE only, though it can be fixed easily for special cases.</div><div class='del'>-</div><div class='del'>---------------------------------------------------------------------------------</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-void die(char *msg)</div><div class='del'>-{</div><div class='del'>-  perror(msg);</div><div class='del'>-  exit(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void kernel_read(char *dev)</div><div class='del'>-{</div><div class='del'>-  int fd;</div><div class='del'>-  if ((fd = open(dev, O_RDONLY)) == -1) die("can't open device");</div><div class='del'>-  ioctl(fd, BLKRRPART, 0);</div><div class='del'>-  close(fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int main(int argc, char **argv) </div><div class='del'>-{</div><div class='del'>-  if (argc != 2) {</div><div class='del'>-    fprintf(stderr, "usage: kernel_read_part &lt;hard drive device&gt;\n");</div><div class='del'>-    exit(1);</div><div class='del'>-  }</div><div class='del'>-  kernel_read(argv[1]);</div><div class='del'>-}</div><div class='head'>diff --git a/docs/README.devel b/docs/README.devel<br/>deleted file mode 100644<br/>index dd0fb6d5b..000000000<br/>--- a/<a href='/software/drakx/tree/docs/README.devel?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/README.devel</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,252 +0,0 @@</div><div class='del'>-Well here is a little description of how DrakX can be modified or extended.</div><div class='del'>-Please refer to README file for getting DrakX code source and to known more</div><div class='del'>-exactly how it works and what it can do.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Execution of DrakX ***********************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-DrakX has originally be written by pixel in perl and C.</div><div class='del'>-entry point for stage2 is /usr/bin/runinstall2 which is typically a link to</div><div class='del'>-/usr/bin/install2 which simply load module install2.pm and execute</div><div class='del'>-install2::main with @ARGV.</div><div class='del'>-</div><div class='del'>-install2::main parse command line arguments, prepare installation, find the right</div><div class='del'>-install_interactive class (take a look at gi/docs/object_class.fig) according to</div><div class='del'>-command line, memory available and if the interactive chosen is initializing</div><div class='del'>-correctly, else it will try a less-demanding interactive object.</div><div class='del'>-Once done, $::o is set to this install &amp; interactive object and main runs the</div><div class='del'>-various step of install2 defined in $o-&gt;{steps}, starting with $o-&gt;{steps}{first}</div><div class='del'>-and iterating with method install_any::getNextStep().</div><div class='del'>-while running step, it trap any errors that may arise and use perl exception to</div><div class='del'>-change step.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* DrakX modules descriptions ***************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-Here is a brief description of what each modules of DrakX is doing.</div><div class='del'>-</div><div class='del'>-install2: main module of DrakX as described above, main loop execution of DrakX.</div><div class='del'>-</div><div class='del'>-install_steps: generic installation module containing steps definition, all steps</div><div class='del'>-  should always be defined here as some methods may be used on automatic mode.</div><div class='del'>-  there is no interactivity available. typically are defined base operation for</div><div class='del'>-  configuring each step according to $o.</div><div class='del'>-</div><div class='del'>-install_steps_interactive: generic installation module with generic interative</div><div class='del'>-  methods. typically are found all interactive code of DrakX for each steps.</div><div class='del'>-</div><div class='del'>-install_steps_auto_install: implementation installation module without interactive</div><div class='del'>-  methods to match auto_install mode. this is the simplest as almost no method are</div><div class='del'>-  redefined (inherit module install_steps only, compared to other implementation</div><div class='del'>-  modules described below).</div><div class='del'>-</div><div class='del'>-install_steps_stdio: implementation installation module with interactive stdio</div><div class='del'>-  methods to match stdio mode. inherit modules install_steps_interactive and</div><div class='del'>-  interactive_stdio.</div><div class='del'>-</div><div class='del'>-install_steps_newt: implementation installation module with interactive newt</div><div class='del'>-  methods to match newt mode. inherit modules install_steps_interactive and</div><div class='del'>-  interactive_newt.</div><div class='del'>-</div><div class='del'>-install_steps_gtk: implementation installation module with interactive gtk</div><div class='del'>-  methods to match gtk mode. inherit modules install_steps_interactive and</div><div class='del'>-  interactive_gtk.</div><div class='del'>-</div><div class='del'>-install_any: contains various methods using generic interactive interface but</div><div class='del'>-  not used by standalone tools.</div><div class='del'>-</div><div class='del'>-install_gtk: contains various methods using gtk interface but not used by</div><div class='del'>-  standalone tools.</div><div class='del'>-</div><div class='del'>-interactive_stdio: implementation methods for interactivity in stdio mode.</div><div class='del'>-  inherit module interactive.</div><div class='del'>-</div><div class='del'>-interactive_newt: implementation methods for interactivity in newt mode.</div><div class='del'>-  inherit module interactive.</div><div class='del'>-</div><div class='del'>-interactive_gtk: implementation methods for interactivity in gtk mode.</div><div class='del'>-  inherit module interactive.</div><div class='del'>-</div><div class='del'>-my_gtk: basic gtk access methods.</div><div class='del'>-</div><div class='del'>-any: contains various methods using generic interactive interface. to compare</div><div class='del'>-  against install_any module as this one is available for standalone tools.</div><div class='del'>-</div><div class='del'>-class_discard: simple module that implement every methods undefined to return</div><div class='del'>-  nothing. this trick is used to ensure no undefined method can arise when using</div><div class='del'>-  code that reference interactive method which are not defined.</div><div class='del'>-</div><div class='del'>-common: contains very simple and very usefull (common) methods to do various task.</div><div class='del'>-  some methods inspired by functionnal language.</div><div class='del'>-</div><div class='del'>-c: contains wrapper to C definition of methods used by DrakX, use of C is necessary</div><div class='del'>-  for C extern libraries interface (rpmlib, ldetect), kernel interface, XFree</div><div class='del'>-  interface.</div><div class='del'>-</div><div class='del'>-commands: implement some un*x commands, conflicting name with perl contains</div><div class='del'>-  trailing underscore (_). this module is used by commands perl script that</div><div class='del'>-  determine which command to run according to $0 (this is used this way when DrakX</div><div class='del'>-  is running).</div><div class='del'>-</div><div class='del'>-run_program: allow running a program with redirection but without using a shell.</div><div class='del'>-  allow rooted execution.</div><div class='del'>-</div><div class='del'>-help: contains all help message displayed by DrakX.</div><div class='del'>-</div><div class='del'>-log: log facility methods.</div><div class='del'>-</div><div class='del'>-lang: language manipulation methods, get and set sysconfig file, load po.</div><div class='del'>-</div><div class='del'>-keyboard: keyboard manipulation methods, get and set sysconfig file, set console</div><div class='del'>-  keyboard mapping.</div><div class='del'>-</div><div class='del'>-mouse: mouse manipulation methods, get and set sysconfig file, change mouse.</div><div class='del'>-</div><div class='del'>-timezone: time zone manipulation methods, get and set timezone.</div><div class='del'>-</div><div class='del'>-services: services manipulation methods, activate or delete services (see</div><div class='del'>-  /etc/rc.d/init.d directories).</div><div class='del'>-</div><div class='del'>-detect_devices: manage detection of various class of hardware.</div><div class='del'>-</div><div class='del'>-devices: manage device file, create device special according device name.</div><div class='del'>-</div><div class='del'>-partition_table: base partition table management methods, it manages</div><div class='del'>-  appriopriate partition_table_XXX object according to what has been read</div><div class='del'>-  as XXX partition table type.</div><div class='del'>-</div><div class='del'>-partition_table_raw: generic class for the following partition_table_XXX.</div><div class='del'>-</div><div class='del'>-partition_table_emtpy: matches an empty partition table.</div><div class='del'>-</div><div class='del'>-partition_table_dos: matches a DOS partition table.</div><div class='del'>-</div><div class='del'>-partition_table_bsd: matches a BSD partition table.</div><div class='del'>-</div><div class='del'>-partition_table_mac: matches an Apple partition table.</div><div class='del'>-</div><div class='del'>-partition_table_sun: matches a Sun Label partition table.</div><div class='del'>-</div><div class='del'>-fs: read and write /etc/fstab file, mount and umount, format.</div><div class='del'>-</div><div class='del'>-fsedit: manage (modyfy, edit) mount point associated to partition (like editing</div><div class='del'>-  /etc/fstab).</div><div class='del'>-</div><div class='del'>-swap: swap management methods, format and mount (activation).</div><div class='del'>-</div><div class='del'>-raid: raid (software only) management methods.</div><div class='del'>-</div><div class='del'>-lvm: lvm (Logical Volume Manager) management methods.</div><div class='del'>-</div><div class='del'>-loopback: loopback management methods, used for lnx4win type installation or using</div><div class='del'>-  a file as a partition.</div><div class='del'>-</div><div class='del'>-diskdrake: diskdrake itself, disk graphical (using gtk) manipulation tools.</div><div class='del'>-</div><div class='del'>-ftp: ftp mangement methods, used when using ftp install.</div><div class='del'>-</div><div class='del'>-http: http management methods, used when using http install.</div><div class='del'>-</div><div class='del'>-modparm: kernel modules options management, allow building nice dialog with each</div><div class='del'>-  module parameter available.</div><div class='del'>-</div><div class='del'>-modules: kernel modules management, allow loading or unloading (ala modprobe or</div><div class='del'>-  insmod).</div><div class='del'>-</div><div class='del'>-printer: printer management methods, read and write both LPR or CUPS configuration.</div><div class='del'>-</div><div class='del'>-printerdrake: interactive printer management methods.</div><div class='del'>-</div><div class='del'>-network: network management methods, get and set sysconfig file.</div><div class='del'>-</div><div class='del'>-netconnect: network configuration wizard.</div><div class='del'>-</div><div class='del'>-netconnect_const: network configuration wirard data.</div><div class='del'>-</div><div class='del'>-Xconfig: X configuration (monitor + already existing config file) management.</div><div class='del'>-</div><div class='del'>-Xconfigurator: X configuration wizard.</div><div class='del'>-</div><div class='del'>-Xconfigurator_const: X configuration wizard data.</div><div class='del'>-</div><div class='del'>-booloader: bootloader (LILO, GRUB, LOADLIN, SILO) configuration management methods.</div><div class='del'>-</div><div class='del'>-pkgs: rpm package and hdlist, depslist management methods, allow selecting or</div><div class='del'>-  unselecting packages, manage rpmsrate file and select group, installation and</div><div class='del'>-  removal methods of rpm file.</div><div class='del'>-</div><div class='del'>-crypto: *obsoleted* module to manage crypto site and rpm file.</div><div class='del'>-</div><div class='del'>-standalone: standalone only, allow defining a standalone tools.</div><div class='del'>-</div><div class='del'>-bootlook: standalone only, interface with DrakConf to configure bootloader options.</div><div class='del'>-</div><div class='del'>-drakfirewall: standalone only, interface with DrakConf to configure a tiny firewall.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* DrakX FAT resizer module description *****************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-here is a fat resizer written in perl and C used by DrakX (diskdrake) to resize</div><div class='del'>-FAT16/FAT32 partition. it moves clusters to make sure a shrink can be done on the</div><div class='del'>-limit of the partition itself, if no cluster need to be moved, only boot sector</div><div class='del'>-partition limit are modified.</div><div class='del'>-</div><div class='del'>-any: various methods to flag cluster, compute min size.</div><div class='del'>-</div><div class='del'>-boot_sector: boot sector management methods.</div><div class='del'>-</div><div class='del'>-c_rewritten: originally resize_fat was only perl, this contains code section that</div><div class='del'>-  are the most sensible to speed or memory contraints and have been rewritten to C</div><div class='del'>-  using perl extension.</div><div class='del'>-</div><div class='del'>-dir_entry: manage directory structure.</div><div class='del'>-</div><div class='del'>-directory: traverse directory recursively, needed to move correctly cluster.</div><div class='del'>-</div><div class='del'>-fat: manage fat structure.</div><div class='del'>-</div><div class='del'>-info_sector: manage info sector.</div><div class='del'>-</div><div class='del'>-io: manage I/O on disk (need to take care of big file as partition size may be</div><div class='del'>-  larger than 2GB).</div><div class='del'>-</div><div class='del'>-main: main resizer algortihm. if needed allocate new clusters, copy files, copy</div><div class='del'>-  directories. update boot sector info.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* Adding a new step to DrakX ***************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-Say we want to add a question for setting "alawindows" option.</div><div class='del'>-We put it pretty early in the install, let's say after "Select Installation</div><div class='del'>-Class".</div><div class='del'>-</div><div class='del'>-1. in install2.pm</div><div class='del'>-</div><div class='del'>-add</div><div class='del'>-</div><div class='del'>-  selectAlawindows =&gt; [ __("A la windows or not"), 0, 1, '' ],</div><div class='del'>-</div><div class='del'>-after</div><div class='del'>-</div><div class='del'>-  selectInstallClass =&gt; [ __("Select installation class"), 1, 1, '' ],</div><div class='del'>-</div><div class='del'>-the 0, 1, '' means not "redoable", "skip on error", "don't hide"</div><div class='del'>-</div><div class='del'>-2. add your function selectAlawindows in install2.pm</div><div class='del'>-</div><div class='del'>-sub selectAlawindows  { $o-&gt;selectAlawindows }</div><div class='del'>-</div><div class='del'>-3. add your function selectAlawindows in install_steps_interactive.pm</div><div class='del'>-</div><div class='del'>-sub selectAlawindows {</div><div class='del'>-    my ($o) = @_;</div><div class='del'>-    $o-&gt;{alawindows} = $o-&gt;ask_yesorno('', _("Throw everything away as windobe does?"), 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-4. add your function selectAlawindows in install_steps.pm (not needed in that</div><div class='del'>-case, except for auto_install)</div><div class='del'>-</div><div class='del'>-sub selectAlawindows  {}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/docs/README.pxe b/docs/README.pxe<br/>deleted file mode 100644<br/>index 2ddd205fe..000000000<br/>--- a/<a href='/software/drakx/tree/docs/README.pxe?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/README.pxe</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,133 +0,0 @@</div><div class='del'>-Here is a short description to configure a PXE server using dhcpd and tftpd.</div><div class='del'>-This allows a network boot for your ethernet card conforming to the Interl</div><div class='del'>-PXE specification.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-**********                       General overview                   ************</div><div class='del'>-********************************************************************************</div><div class='del'>-</div><div class='del'>-You need a dhcp server and a tftp server on one or two machines to allow the </div><div class='del'>-network boot. We are not using a PXE server to achieve this as it is not</div><div class='del'>-mandatory. </div><div class='del'>-You can install tftp-server and dhcp-server package from the Mandrake</div><div class='del'>-distribution for example.</div><div class='del'>-</div><div class='del'>-On the server machine at 192.168.2.1, you will find a "/etc/dhcpd.conf" sample</div><div class='del'>-file written by Florin Grad &lt;florin@mandrakesoft.com&gt;, where "mydomain.com" is</div><div class='del'>-assumed to be your domain name, and 192.168.1.1 a name server. All install are</div><div class='del'>-done on subnet 192.168.2.0.</div><div class='del'>-</div><div class='del'>-All the files that will be downloaded by the tftp daemon are located under </div><div class='del'>-"/tftpboot" :</div><div class='del'>-  "/tftpboot/pxelinux.0" is a program that is loaded directly by the machine</div><div class='del'>-                         where a network boot will be done, this program comes</div><div class='del'>-                         from the SYSLINUX package by H. Peter Anvin. (look at</div><div class='del'>-                         http://syslinux.zytor.com/pxe.php for more information)</div><div class='del'>-  "/tftpboot/pxelinux.cfg/" is a directory where all configuration file for</div><div class='del'>-                         pxelinux.0 will be found, pxelinux.0 will download</div><div class='del'>-                         these file by itself. It searches first for a file</div><div class='del'>-                         named accordind to the machine IP address in</div><div class='del'>-			 hexadecimal, for example for 192.168.2.20, it</div><div class='del'>-			 looks for "C0A80214" first, then "C0A8021" and so</div><div class='del'>-			 on down to "C0", "C" and "default".</div><div class='del'>-  "/tftpboot/network.rdz" is the standard network initrd for Mandrake installation.</div><div class='del'>-  "/tftpboot/vmlinuz"    is the boot kernel for installation.</div><div class='del'>-  "/tftpboot/help.msg"   is the message displayed by pxelinux.0, note that currently</div><div class='del'>-                         graphical message (as for install using SYSLINUX 1.48 with</div><div class='del'>-                         graphic patch by Mandrake) is not supported.</div><div class='del'>-</div><div class='del'>-All file "network.rdz", "vmlinuz", "help.msg" can be found by mounting "network.img",</div><div class='del'>-or the network floppy disk used for install, "pxelinux.cfg" is just an adaptation</div><div class='del'>-of the file found on the "network.img" called "syslinux.cfg" but without the reference</div><div class='del'>-to boot.msg (as it is not currently supported).</div><div class='del'>-</div><div class='del'>-Update network configuration for your needs and start dhcp server on the machine and</div><div class='del'>-tftp server and this should work.</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-* /etc/dhcpd.conf **************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-ddns-update-style ad-hoc;</div><div class='del'>-</div><div class='del'>-authoritative;</div><div class='del'>-</div><div class='del'>-option space PXE;</div><div class='del'>-option PXE.mtftp-ip code 1 = ip-address;</div><div class='del'>-option PXE.mtftp-cport code 2 = unsigned integer 16;</div><div class='del'>-option PXE.mtftp-sport code 3 = unsigned integer 16;</div><div class='del'>-option PXE.mtftp-tmout code 4 = unsigned integer 8;</div><div class='del'>-option PXE.mtftp-delay code 5 = unsigned integer 8;</div><div class='del'>-option PXE.discovery-control code 6 = unsigned integer 8;</div><div class='del'>-option PXE.discovery-mcast-addr code 7 = ip-address;</div><div class='del'>-</div><div class='del'>-default-lease-time 28800;</div><div class='del'>-max-lease-time 86400;</div><div class='del'>-</div><div class='del'>-option domain-name "mydomain.com";</div><div class='del'>-option domain-name-servers 192.168.1.1;</div><div class='del'>-</div><div class='del'>-class "PXE" {</div><div class='del'>-  match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";</div><div class='del'>-  option vendor-class-identifier "PXEClient";</div><div class='del'>-</div><div class='del'>-  vendor-option-space PXE;</div><div class='del'>-  option PXE.mtftp-ip 0.0.0.0;</div><div class='del'>-  next-server 192.168.2.1; #tftp server location</div><div class='del'>-</div><div class='del'>-  filename "pxelinux.0";          # standard TFTP</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-shared-network "mynetwork" {</div><div class='del'>-  subnet 192.168.2.0 netmask 255.255.255.0 {</div><div class='del'>-    option subnet-mask 255.255.255.0;</div><div class='del'>-    option routers 192.168.2.1;</div><div class='del'>-</div><div class='del'>-    ddns-domainname = "mydomain.com";</div><div class='del'>-</div><div class='del'>-    pool {</div><div class='del'>-      range 192.168.2.10 192.168.2.20;</div><div class='del'>-      allow members of "PXE";</div><div class='del'>-    }</div><div class='del'>-  } </div><div class='del'>-}</div><div class='del'>-********************************************************************************</div><div class='del'>-* /tftpboot/pxelinux.cfg/default ***********************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-default linux</div><div class='del'>-prompt 1</div><div class='del'>-timeout 72</div><div class='del'>-display help.msg</div><div class='del'>-label linux</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 vga=788</div><div class='del'>-label vgalo</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 vga=785</div><div class='del'>-label vgahi</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 vga=791</div><div class='del'>-label vga16</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 vga16</div><div class='del'>-label text</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 text</div><div class='del'>-label patch</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 patch vga=788</div><div class='del'>-label expert</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 expert vga=788</div><div class='del'>-label rescue</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz  root=/dev/ram3 rescue rw</div><div class='del'>-label oem</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append ramdisk_size=32000 initrd=network.rdz automatic=method:cdrom root=/dev/ram3 rescue oem rw</div><div class='del'>-********************************************************************************</div><div class='del'>-* Usefull linkst ***************************************************************</div><div class='del'>-********************************************************************************</div><div class='del'>-</div><div class='del'>-http://syslinux.zytor.com/pxe.php</div><div class='del'>-http://www.kano.org.uk/projects/pxe/</div><div class='head'>diff --git a/docs/SHORTCUTS b/docs/SHORTCUTS<br/>deleted file mode 100644<br/>index 93a7133db..000000000<br/>--- a/<a href='/software/drakx/tree/docs/SHORTCUTS?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/SHORTCUTS</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-********************************************************************************</div><div class='del'>-main shortcuts</div><div class='del'>-</div><div class='del'>-F1 -&gt; help</div><div class='del'>-F2 -&gt; take a screenshot</div><div class='del'>-F11 -&gt; previous step</div><div class='del'>-F12 -&gt; next (reachable) step</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-diskdrake</div><div class='del'>-</div><div class='del'>-taken directly from diskdrake.pm:</div><div class='del'>-</div><div class='del'>-		"a" =&gt; \&amp;Active,</div><div class='del'>-		"b" =&gt; \&amp;Move,</div><div class='del'>-		"c" =&gt; \&amp;Create,</div><div class='del'>-		"d" =&gt; \&amp;Delete,</div><div class='del'>-		"f" =&gt; \&amp;Format,</div><div class='del'>-		"m" =&gt; \&amp;Mount_point,</div><div class='del'>-		"M" =&gt; \&amp;Mount,</div><div class='del'>-		"n" =&gt; \&amp;Create,</div><div class='del'>-		"o" =&gt; \&amp;ReadFromFile,</div><div class='del'>-		"s" =&gt; \&amp;SaveInFile,</div><div class='del'>-		"q" =&gt; \&amp;Exit,</div><div class='del'>-		"r" =&gt; \&amp;Resize,</div><div class='del'>-		"t" =&gt; \&amp;Type,</div><div class='del'>-		"u" =&gt; \&amp;Unmount,</div><div class='del'>-		"w" =&gt; \&amp;WritePartitions,</div><div class='del'>-		"W" =&gt; \&amp;WriteFstab,</div><div class='del'>-</div><div class='del'>-hopefully it is explicit enough :)</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-list choice</div><div class='del'>-</div><div class='del'>-- acceleration a la windows (default): enter a letter and the selection will move to the</div><div class='del'>-first entry beginning with that letter. If you enter another letter it will try</div><div class='del'>-to find the entry beginning with the 2 letters you have given. In case it fails</div><div class='del'>-the starting_word is reset.</div><div class='del'>-- incremental search a la emacs: searches trough the list</div><div class='del'>-</div><div class='del'>-Use control-s to use incremental search and then to search next occurence</div><div class='del'>-</div><div class='del'>-********************************************************************************</div><div class='del'>-in case of complete mouse sh**t</div><div class='del'>-</div><div class='del'>-XFree86 provides a way of moving the mouse pointer:</div><div class='del'>-- first, press Ctrl-Shift-NumLock</div><div class='del'>-- then move the pointer with the keypad arrows</div><div class='del'>-- press button is ``0'' (aka Inser)</div><div class='del'>-- release button is ``.'' (aka Suppr)</div><div class='head'>diff --git a/docs/TODO b/docs/TODO<br/>deleted file mode 100644<br/>index cb9399f82..000000000<br/>--- a/<a href='/software/drakx/tree/docs/TODO?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/TODO</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,515 +0,0 @@</div><div class='del'>--URGENT---------------------------------------------------------------------------------</div><div class='del'>-check for fpons/pixel BOTH that resize_fat is clean for current version</div><div class='del'>-relative to 7.0-2.</div><div class='del'>-</div><div class='del'>-heavy testing of diskdrake to avoid corrupting partition table, current version</div><div class='del'>-should be available to fix bogus partition table, writing enabled only when</div><div class='del'>-partition is Ok (fixme? allow primary partition inside extended one, but with</div><div class='del'>-warning on diskdrake startup, made them as warning ?).</div><div class='del'>-</div><div class='del'>--features-------------------------------------------------------------------------------</div><div class='del'>-add rpmdrake in menu</div><div class='del'>-</div><div class='del'>-(7.1 or later) clean SCSI CDROM autoboot.</div><div class='del'>-(done,gc,8.0) stage1 &amp; cdrom: add ability in expert to choose the scsi cdrom drive to use</div><div class='del'>-</div><div class='del'>-(7.1)better help for partitioning in newbie</div><div class='del'>-</div><div class='del'>-(7.1)Improved network configuration (PPP and/or Ethernet)</div><div class='del'>-PPPoE install and configuration (SuSE includes it, DHCP-like)</div><div class='del'>-(7.1)standalone applications for configuration (netdrake, timetool, authentificationconf, soundcard)</div><div class='del'>-</div><div class='del'>-----</div><div class='del'>-(7.2) replace normal with standard (in the installClass's)</div><div class='del'>-</div><div class='del'>-(7.2 or later)horizontal sub-steps</div><div class='del'>-</div><div class='del'>-(7.2 or later)diskdrake in text mode</div><div class='del'>-</div><div class='del'>-ask "do you have SCSI?" before asking "probe PCI or not"</div><div class='del'>-</div><div class='del'>-(?) paride in stage1</div><div class='del'>-(done,gc,8.0) stage1 &amp; network: add ability to choose the network interface to use</div><div class='del'>-</div><div class='del'>-(?) msec custom</div><div class='del'>-</div><div class='del'>-(?)firewall configuration (instant firewalling?)</div><div class='del'>-</div><div class='del'>-(?)widget for displaying fdisk (dindinx)</div><div class='del'>-add fdisk using the zvt widget (taken in gnome-libs)</div><div class='del'>-</div><div class='del'>-(?)help in some configuration files.</div><div class='del'>-</div><div class='del'>-ability to add nfs/weird_fs entries in fstab</div><div class='del'>-</div><div class='del'>-size of packages in crypto</div><div class='del'>-</div><div class='del'>--to test--------------------------------------------------------------------------------</div><div class='del'>-what's lseek64?</div><div class='del'>-</div><div class='del'>-ensure installClass is set to something in auto install.</div><div class='del'>-</div><div class='del'>-for axp, swriteboot -f1 if swriteboot failed.</div><div class='del'>-axp with swap part sigsegv</div><div class='del'>-</div><div class='del'>-tree for choosing monitors (buggy?)</div><div class='del'>-</div><div class='del'>-what happens if a module fails to insmod (scsi step), in beginner/normal/expert</div><div class='del'>-</div><div class='del'>-fstab must be sorted (/usr/local after /usr)</div><div class='del'>-</div><div class='del'>-RAID upgrades</div><div class='del'>-</div><div class='del'>-add choice clean /tmp or not in expert</div><div class='del'>-</div><div class='del'>-kernel chosen by default must be the one according to supermount/secure</div><div class='del'>-</div><div class='del'>-bug if ide-scsi, no more hdX, but scd0 (aka sr0)</div><div class='del'>- (and add alias block-major-11 ide-scsi ?)</div><div class='del'>-</div><div class='del'>-check on update for conf.modules and modules.conf !</div><div class='del'>-</div><div class='del'>-with /usr, /usr/local and /usr/local/e mount points i get an error at step mounting local filesystems</div><div class='del'>-</div><div class='del'>--easy fixes-----------------------------------------------------------------------------</div><div class='del'>-rpmdrake proposition for cdrom labels</div><div class='del'>-</div><div class='del'>-use option nocheck to mount for upgrades</div><div class='del'>-</div><div class='del'>--fixes needing thinking-----------------------------------------------------------------</div><div class='del'>-bug: changing mem= in miscellaneous doesn't modify lilo conf if you backtrack</div><div class='del'>-</div><div class='del'>-ask network configuration only if NIC found?</div><div class='del'>-</div><div class='del'>-configure DHCP for newbies if ethernet &amp; DHCP card available</div><div class='del'>-</div><div class='del'>-xvidtune like screen configuration (see SuSE's yast)</div><div class='del'>-</div><div class='del'>-live cdrom for alpha (sparc?)</div><div class='del'>-</div><div class='del'>-network boot</div><div class='del'>-</div><div class='del'>-get the error when getting/reading .rpm files fail</div><div class='del'>-better timeout handling for network installs</div><div class='del'>-</div><div class='del'>-handle not enough room for update</div><div class='del'>-(fpons)verify the free space is big enough.</div><div class='del'>-</div><div class='del'>-the XFdrake test does not handle the fontset</div><div class='del'>-</div><div class='del'>-&gt; Here I go into the printer configuration select 'HP Deskjet 722C Colour',</div><div class='del'>-&gt; print a test ASCII page, pressing 'No' when prompted to indicate the page did</div><div class='del'>-&gt; not print OK and then hitting cancel when prompted to choose a printer type</div><div class='del'>-&gt; again.</div><div class='del'>-&gt; ask_from_list cancel at /usr/lib/libDrakX/my_gtk.pm line 504.</div><div class='del'>-</div><div class='del'>-diskdrake: take from parted mklabel, hide(?)</div><div class='del'>-</div><div class='del'>-bug in kde desktop if keeps home but not an upgrade</div><div class='del'>-	</div><div class='del'>-bug in users: mandrake user is added twice in strange installs</div><div class='del'>-(mixed of security 0 + ???)</div><div class='del'>-</div><div class='del'>-bugs rpmdrake: </div><div class='del'>-- just after installing a package, switch to `Installed', the package has wrong name</div><div class='del'>-- refresh the kde desktop after package installation in rpmdrake</div><div class='del'>-(restart kpanel)</div><div class='del'>-- rpmdrake and same name packages</div><div class='del'>-</div><div class='del'>-urpmi: pb if XXX-devel requires XXX = 1.2.3 and we updgrade XXX-1.2.3</div><div class='del'>-</div><div class='del'>-bug in defcfg in with lang=fr_FR, display is buggy</div><div class='del'>-</div><div class='del'>-bug keyboard focus: after switch in console at Xconfig step</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>--to look at--------------------------------------------------------------------------</div><div class='del'>-adduserdrake to remove/update users</div><div class='del'>-</div><div class='del'>-(???)free provider auto configuration facility (to be discussed).</div><div class='del'>-auto ppp-configure with free provider</div><div class='del'>-</div><div class='del'>-(?)on laptop, configure the MMU to use swap not very often</div><div class='del'>-</div><div class='del'>-(?)checkboxes in groups based on compssList (and availableSpace?)</div><div class='del'>-</div><div class='del'>-(?)see what can be done with nvram (50 bytes to save information)</div><div class='del'>-</div><div class='del'>-better wacom support</div><div class='del'>-</div><div class='del'>-(fpons)bug: CANON BJC 4X00 do not work with current rhs-printfilters</div><div class='del'>-  (work with magicfilters (debian))</div><div class='del'>-  (should be handled by ghostscript BJC600's driver)</div><div class='del'>-</div><div class='del'>-(pix)install text on mem=8M, mem=16M?</div><div class='del'>-</div><div class='del'>-(pix)kickstart</div><div class='del'>-partitioning? raid?</div><div class='del'>-X configuration and bootloader in kickstart</div><div class='del'>-</div><div class='del'>-XFdrake chooseResolutions with ask_from_list do not permit ``Show all''</div><div class='del'>-</div><div class='del'>-(?) options in mkfs, progress bar when formatting</div><div class='del'>-</div><div class='del'>-(?) when some error occurs, partition must be unset isFormatted</div><div class='del'>-</div><div class='del'>--hardware-------------------------------------------------------------------------------</div><div class='del'>-- with no floppy drive, mkbootdisk step fails badly</div><div class='del'>-- with bad floppy or write protected, mkbootdisk doesn't say anything</div><div class='del'>-- try detect_devices::floppies (and how are scsi floppies handled?)</div><div class='del'>-maybe: do a iotcl FDGETPRM to detect fd1, fd0.</div><div class='del'>-</div><div class='del'>-need a simple solution to precise mouse type (syslinux option?)</div><div class='del'>-</div><div class='del'>-ELSA Gloria has bad ddc info</div><div class='del'>-</div><div class='del'>-token ring is tr0 not eth0</div><div class='del'>-</div><div class='del'>-I have Mandrake 6.1  installed and working on a ThinkPad 770.</div><div class='del'>-To enable the PCMCIA Token ring I have to append the following line to</div><div class='del'>-/etc/pcmcia/config.opts</div><div class='del'>-module "ibmtr_cs" opts "mmiobase=0xd2000 srambase=0xd4000"</div><div class='del'>-</div><div class='del'>-smp not detected (mhoward@memphisonline.com on cooker, bios=BP6PW)</div><div class='del'>-</div><div class='del'>-UDMA66 (ultra66.o for promise)</div><div class='del'>-</div><div class='del'>-aha152x needs "insmod aha152x.o aha152x=0x140,11,7"</div><div class='del'>-</div><div class='del'>-(obsolete) usb module not removed if no mouse found</div><div class='del'>-</div><div class='del'>-(fpons)handle dat drives</div><div class='del'>-</div><div class='del'>-hibernation on laptop -&gt; clock not restored</div><div class='del'>-</div><div class='del'>-# in 2.3.15 "Silicon Integrated Systems [SiS]|SiS900 10/100 Ethernet" is handled</div><div class='del'>-</div><div class='del'>-(?)enable the testing of the mouse type (under X) (wheel)</div><div class='del'>-possibility to specify the mouse</div><div class='del'>-</div><div class='del'>--(?)---------------------------------------------------------------------------------</div><div class='del'>-(?) handle NT (add entry for it in lilo, put it in fstab)</div><div class='del'>-</div><div class='del'>-(?) lilo-0.22-19mdk is buggy with boot=/dev/hde &amp; root=/dev/sda13, it needs</div><div class='del'>-disk=/dev/hde bios=0x80 &amp; disk=/dev/sda bios=0x81</div><div class='del'>-</div><div class='del'>-(?)using setxkb, enable the testing of the keyboard</div><div class='del'>-</div><div class='del'>-(?)XFdrake does not handle fbdev</div><div class='del'>-</div><div class='del'>-(?) Je viens de faire une installation sur une machine où seul Be était</div><div class='del'>-installé. Je l'ai supprimé et installé (mode recommandé) Oxygen. Au</div><div class='del'>-redémarrage, le boot manager de Be apparaît et il est impossible de</div><div class='del'>-démarrer Linux.</div><div class='del'>-Pourquoi ne pas installer LILO si on supprime toutes les partitions ?</div><div class='del'>-</div><div class='del'>-(?)initrd in bzip2</div><div class='del'>-</div><div class='del'>-(?)smaller zsh (or ash in initrd)</div><div class='del'>-</div><div class='del'>-(?)is configureNetworkNet needed with dhcp/bootp?</div><div class='del'>-</div><div class='del'>-(?)bug in upgrade: install from hda1:/usr/local/blah with hda1:/</div><div class='del'>-</div><div class='del'>-(?)mandrake_desk was not installed while kdebase it there on upgrade</div><div class='del'>-</div><div class='del'>-(?)when clicking on X configuration, installation of packages is not displayed</div><div class='del'>-</div><div class='del'>-(?)maybe remove commented lines in /usr/lib/perl5/... files</div><div class='del'>-</div><div class='del'>-(?)timezone using a picture (pb: how to delimit zones)</div><div class='del'>-when asking GMT or not, display the time for each possibility</div><div class='del'>-the list is too big for USA</div><div class='del'>-</div><div class='del'>-(?)ability to select the type of install when booting of cdrom</div><div class='del'>-(?)use the ability of el torito to handle 2.88MB or more </div><div class='del'>-</div><div class='del'>-(obsolete)lilo-deinstallation in case of lilo auto-installation for beginners</div><div class='del'>-</div><div class='del'>-(?)loadFont sucks</div><div class='del'>-</div><div class='del'>-(obsolete)trash on the screen when X first starts</div><div class='del'>-</div><div class='del'>-(?)remove the gray line surrounding the logo</div><div class='del'>-</div><div class='del'>-(?)cleanup /etc/services &amp; /etc/protocols</div><div class='del'>-</div><div class='del'>-(?)strange: no scsi of type 'fd', only 'tape'</div><div class='del'>-</div><div class='del'>-(?)remount ro before X test.</div><div class='del'>-</div><div class='del'>-(?)remove every &lt;&lt; and &gt;&gt; (doesn't handle &gt; 32bits)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>--done---------------------------------------------------------------------------------</div><div class='del'>-(7.1,done,fpons) improve printerdrake to at least have the same functionalities as printtool.</div><div class='del'>-</div><div class='del'>-(done,fpons)diskdrake can olverlap partitions (resize lower, resize original typically</div><div class='del'>-after clear all and auto allocate, try maximal size available).</div><div class='del'>-</div><div class='del'>-(done,fpons)rewrite mouseconfig in perl?</div><div class='del'>-</div><div class='del'>-(done,pix)kudzu or not in miscellaneous</div><div class='del'>-</div><div class='del'>-(done,pix)warn the user if not enough ram to fulfill install</div><div class='del'>-</div><div class='del'>-(done,fpons)test after printer config</div><div class='del'>-</div><div class='del'>-(done,pix)ask for more than the memory size detected</div><div class='del'>-</div><div class='del'>-(done,fpons)modem config</div><div class='del'>-</div><div class='del'>-(done,pix)call kudzu in batch to initialize its list</div><div class='del'>-</div><div class='del'>-(done,pix)standalone generator of mdkinst_stage2.gz</div><div class='del'>-</div><div class='del'>-(done,pix)text install</div><div class='del'>-</div><div class='del'>-(done,pix) if u choose mouse usb != found mouse, it fails at X config</div><div class='del'>-</div><div class='del'>-(done,pix) diskdrake bug: saved information on floppy contains isMounted.</div><div class='del'>-</div><div class='del'>-(done,pix) update devices.c from modules.pm</div><div class='del'>-</div><div class='del'>-(done,pix) in lilo.conf, put </div><div class='del'>-disk=/dev/hdb</div><div class='del'>-  bios=0x80</div><div class='del'>-</div><div class='del'>-(done,pix) diskdrake</div><div class='del'>-auto_partitions</div><div class='del'>-suggested partition tables must be better foreach installClass</div><div class='del'>-</div><div class='del'>-(done,pix) update the list of modules (in update_kernel)</div><div class='del'>-</div><div class='del'>-(done,pix) language support: only choose the right locales and upmark the packages requiring it</div><div class='del'>-</div><div class='del'>-(done,pix) move security question before isntallation of packages</div><div class='del'>-</div><div class='del'>-(done,pix) install ssh</div><div class='del'>-</div><div class='del'>-(done,fpons,pix) change the boot message of syslinux (have something different from RedHat)</div><div class='del'>-</div><div class='del'>-(done,pix) install_steps.pm: 569 (128M + 3)</div><div class='del'>-</div><div class='del'>-(done,pix) bug: mouse freeze just before network configuration (mouse primax)</div><div class='del'>-  (was kudzu)</div><div class='del'>-</div><div class='del'>-(done,pix) signal 11 in stage1 nfs kickstart mount failed</div><div class='del'>-</div><div class='del'>-(done,pix) ask supermount or not, no supermount with kernel-secure</div><div class='del'>-</div><div class='del'>-(done,pix) fix bug in g_auto_install (can't go through all)</div><div class='del'>-</div><div class='del'>-(done,pix) bug: install from ciril.fr fails</div><div class='del'>-</div><div class='del'>-(done,pix)wizard for partitioning in case of one full vfat</div><div class='del'>-</div><div class='del'>-(done,dindinx)app for choosing drakxtools (drakxconf)</div><div class='del'>-(done,pix)verify being root</div><div class='del'>-(done,pix)log::l -&gt; initlog</div><div class='del'>-</div><div class='del'>-(done,pix)install apmd for laptops (maybe not start apmd though)</div><div class='del'>-(done,pix)icewm apm (sh icewm_apm)</div><div class='del'>-(done,pix)kde apm (put Kapm.kdelnk in ~/Desktop/Autostart)</div><div class='del'>-</div><div class='del'>-(done,pix)bug in adduserdrake: missing pwconv in md5</div><div class='del'>-(done,pix)correct the default value of draksec (cp draksec)</div><div class='del'>-(done,pix)in draksec, (and maybe others) have --expert as default if /etc/sysconfig/system has TYPE=expert</div><div class='del'>-</div><div class='del'>-(done,pix)bug in XFdrake in install, cancel in choose Card do not close the window</div><div class='del'>-</div><div class='del'>-(done,pix)in XFdrake, testing should not overwrite /etc/X11/XF86Config</div><div class='del'>-</div><div class='del'>-(done,pix) hwiz and supermount and eject :(</div><div class='del'>-</div><div class='del'>-(done(replaced by msec's),pix) bug: usermod -G urpmi a not done (full install)</div><div class='del'>-</div><div class='del'>-(done,pix)perl and .ph's</div><div class='del'>-</div><div class='del'>-(done,pix) BUG bootp in network install sigsegv</div><div class='del'>-</div><div class='del'>-(done,pix) move the last done stuff before Xconfiguration if possible</div><div class='del'>-</div><div class='del'>-(done,pix)draksec is buggy, don't try security &gt;= 4</div><div class='del'>-</div><div class='del'>-(done,pix)install apmd on laptops?? (maybe ask emcweb@btinernet.com (see alix))</div><div class='del'>-</div><div class='del'>-(done,pix)missing alias ll for root</div><div class='del'>-</div><div class='del'>-(done,pix)urpmi.addmedia:  |gzip instead of doing it afterwards</div><div class='del'>-</div><div class='del'>-(done,pix)locale (and fonts?) buggy in case ramdisk is used</div><div class='del'>-</div><div class='del'>-(done,pix)rpmdrake: Installed packages not in hdlist should be there</div><div class='del'>-</div><div class='del'>-(done)in ftp install, locale not installed properly</div><div class='del'>-</div><div class='del'>-(done,pix)pcmcia.img does not handle hd/cdrom</div><div class='del'>-</div><div class='del'>-(done,pix)cyrillic font buggy in DrakX</div><div class='del'>-</div><div class='del'>-(done,fred)remove xfs user from kdm</div><div class='del'>-</div><div class='del'>-(done,pix)bug with 2 cdrom drives (.kdelnk to there for 1st drive)</div><div class='del'>-</div><div class='del'>-(done,pix(works))test ramdisk stage2 and romanian</div><div class='del'>-</div><div class='del'>-(done,pix)kfmrc</div><div class='del'>-</div><div class='del'>-(done,pix)on laptop, default to 1024x768</div><div class='del'>-</div><div class='del'>-(done,pix)mkinitrd and deps</div><div class='del'>-</div><div class='del'>-(done,fred(removed the call))XFdrake and mousedrake freeze if lothar launches them</div><div class='del'>-</div><div class='del'>-(done,pix)crypto message</div><div class='del'>-</div><div class='del'>-(done,pix)test bug with lilo and windows (if not on mbr)</div><div class='del'>-</div><div class='del'>-(done,pix)removed icons come back later (kde desktop)</div><div class='del'>-</div><div class='del'>-(done,pix(was bug in upgrade reading old config))</div><div class='del'>-  segfault in linuxconf (adapter 1 empty)</div><div class='del'>-  (test with the sysconfig sent)</div><div class='del'>-</div><div class='del'>-(done,fpons)bug: Lrosqu'on effectue une mise à jour et que /etc/lilo.conf</div><div class='del'>-contient la variable « default » positionnée sur autre chose que</div><div class='del'>-« linux » ou « windows », DrakX est incapable de générer LILO.</div><div class='del'>-</div><div class='del'>-(done,fpons)bug: GeForce and hd.img?</div><div class='del'>-</div><div class='del'>-(done,fpons)for upgrade in expert, give choice of packages to install</div><div class='del'>-   choosing packages available in upgrade?</div><div class='del'>-</div><div class='del'>-(done,pix)rpmdrake: pb uninstalling package with dependencies (rpmdrake is killed?!) (as root too)</div><div class='del'>-</div><div class='del'>-(done,pix)noatime option for ext2 fs on laptops (do not wake up the hd)</div><div class='del'>-       Do  not  update  inode  access times on this</div><div class='del'>-       file system (e.g, for faster access  on  the</div><div class='del'>-       news spool to speed up news servers).</div><div class='del'>-</div><div class='del'>-(done,pix)kde's icons: 28 horiz and 25 vert grid for big icons</div><div class='del'>-</div><div class='del'>-(done,pix)bug: DrakConf don't follow the charset -&gt; add setlocale(LC_ALL, "")</div><div class='del'>-(done,pix)for ko|ja|zh, gnome-terminal should point to rxvt (-CLE)</div><div class='del'>-(done,pix)group cdrom in /etc/group (gid=22)</div><div class='del'>-(done,pix)drakxtools should require urpmi</div><div class='del'>-(done,pix)bug: gdm unset LANG</div><div class='del'>-(done,pix) zip with automount -&gt; ppa not autoloaded</div><div class='del'>-(done,pix)when you set the kde icons to Large, maybe it'd be good to chown the .kderc</div><div class='del'>-(done,pix)lilo in russian/japaneese is horrible</div><div class='del'>-(ok,pix)test ide burners</div><div class='del'>-(ok)test check bad blocks optional for mke2fs</div><div class='del'>-(done,pix)hd install: no umount is done at the end of install :(</div><div class='del'>-</div><div class='del'>-just before release:</div><div class='del'>-(done,pix)- mandrake_doc-xx, the symlink is no good in /usr/doc/mandrake as </div><div class='del'>-(done,pix)- crypto dependencies to update</div><div class='del'>-(done,pix)- update kudzu's pcitable</div><div class='del'>-(done,pix)- update pcitable for 86C368 if 3.3.6 (and other S3 3D's)</div><div class='del'>-            ("ATI|3D Rage P/M Mobility AGP 2x" -&gt; changed to Server:Mach64)</div><div class='del'>-</div><div class='del'>-(done,pix)with 2MB of video ram, chooses 8bpp instead of 16bpp</div><div class='del'>-</div><div class='del'>-(done,pix) replace</div><div class='del'>-	{ device =&gt; "loop7", type =&gt; 0x83, size =&gt; ((cat_('/dos/lnx4win/size.txt'))[0]*2048), mntpoint =&gt; "/", isFormatted =&gt; 1, isMounted =&gt; 1 },</div><div class='del'>-by</div><div class='del'>-	{ device =&gt; "loop7", type =&gt; 0x83, size =&gt; cat_('/dos/lnx4win/size.txt') * 2048, mntpoint =&gt; "/", isFormatted =&gt; 1, isMounted =&gt; 1 },</div><div class='del'>-</div><div class='del'>-(done,fpons)in ftp install, bug with X server install with wu-ftpd 2.6 (see http://www.wu-ftpd.org/broken-clients.html)</div><div class='del'>-</div><div class='del'>-(done,pix)ask package installation languages (must be put in RPM_INSTALL_LANG)</div><div class='del'>-</div><div class='del'>-(done,pix)bug (by dadou): Si la partition racine est trop petite pour installer le système, un</div><div class='del'>-message d'erreur apparaît pour signaler le problème (bien) mais on ne</div><div class='del'>-peut en sortir. La seule solution est de redémarrer.</div><div class='del'>-</div><div class='del'>-(obsolete)bug when selecting compssUsers, do not deselect after (if u deselect)</div><div class='del'>-</div><div class='del'>-(done,pix)detect ide burners and then add hdX=ide-scsi to kernel cmdline</div><div class='del'>-</div><div class='del'>-(done,pix)urpmi: handle many args on cmd-line</div><div class='del'>-</div><div class='del'>-(done,pix)fix any // in path to ftp server otherwise windobe server bug :(</div><div class='del'>-</div><div class='del'>-(done,pix)diskdrake and auto partitioning, may have the last creation of partition rejected,</div><div class='del'>-try to figure why?</div><div class='del'>-</div><div class='del'>-(done,pix)in chooseResolutions: display the graphic card found</div><div class='del'>-</div><div class='del'>-(done,pix)with pcmcia, need ONBOOT=no</div><div class='del'>-</div><div class='del'>-(fpons,done) XFree: handle by card options</div><div class='del'>-eg: SIS6326 needs "no_bitblt" "no_bltimage" and 24bpp instead of 32bpp</div><div class='del'>-</div><div class='del'>-(done,pix) Xconfiguration: if "can't open fixed font", relaunch xfs.</div><div class='del'>-</div><div class='del'>-(obsolete) pb with dependencies ``missing'': icewm do not require XFree86 and so you can have icewm but no X server</div><div class='del'>-</div><div class='del'>-(obsolete) bug in ext2resizing (no sparse superbloc, don't finish properly)</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)manage a lot of language (ergonomic issue as it already exists)</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)tree for choosing things like timezone, monitors, graphic cards, modules, mice, keyboard? ...</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)sound config, although very simple, no dedicated steps and only PCI (or maybe ISA-PNP if time left ?)</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)partitioning, keyboard shortcut.</div><div class='del'>-</div><div class='del'>-(done,fpons,7.1)index/compress hdlist? (for multi-cd)</div><div class='del'>-! for multi-cd live is mandatory, small transaction are mandatory too.</div><div class='del'>-</div><div class='del'>-(done,pix,7.1?)loopback partitions (even root one)</div><div class='del'>-</div><div class='del'>-(done,pix)in ok_cancel, focus has 3 states, should be 2 (ask dindinx)</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)Generally improved package selection /ergonmic issue.</div><div class='del'>-Tree -&gt; CTree, ``all'' branch with all packages</div><div class='del'>-show the value associated (100-&gt;a must, 90-&gt;great, 80-&gt;nice, ... 10-&gt;useless, 0-&gt;do not install)</div><div class='del'>-</div><div class='del'>-(done,pix)let diskdrake have dos/win partition automatically set up with mount point,</div><div class='del'>-this will help loopback too.</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)grub</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)feature missing: cancel installation</div><div class='del'>-</div><div class='del'>-(obsolete) bug in diskdrake: can in strange cases create a primary partition at sector #0</div><div class='del'>-</div><div class='del'>-(done,pix(partly, protection against bugging))bug in diskdrake:</div><div class='del'>-in expert: blank, create hda5 at beginning, create hda6 at the end, create hda7</div><div class='del'>-in the middle, remove the first one. Result hda5 at the end and bug.</div><div class='del'>-</div><div class='del'>-(obsolete) have a better time estimation of the remaining time in install packages</div><div class='del'>-</div><div class='del'>-(done,dindinx+pix)ask_many_from_list can't keyboard scroll</div><div class='del'>-</div><div class='del'>-(done,pix,7.1)individual package selection: double click is tiring...</div><div class='del'>-</div><div class='del'>-(done,fpons,7.1) sparc ehancement, avoid V7+ machine target (div and mul not in v7 standard)</div><div class='del'>-</div><div class='del'>-(done,fpons,7.1)syslinux in graphical mode to be improved for heavily bogus BIOSes.</div><div class='del'>-</div><div class='del'>-(done,pix)missing feature in lilo configuration: can't give hda2 with /boot/vmlinuz if</div><div class='del'>-already hda1 with /boot/vmlinuz</div><div class='del'>-</div><div class='del'>-(done,pix)in 640x480 install box is to small (cuz of 'Cancel' button beeing added)</div><div class='del'>-</div><div class='del'>-(done,pix)chooseGroup with individual alone</div><div class='del'>-</div><div class='del'>-(done)(7.1) rewrite crypto stuff</div><div class='del'>-(done)crypto: add a cancel &amp; progress bar while downloading</div><div class='del'>-(done)error handling (like reading hdlist)</div><div class='del'>-(done)(7.1)progression bar on crypto.</div><div class='del'>-</div><div class='del'>-(done, daouda&amp;pix,7.1, other persons)rescue: </div><div class='del'>-- small modification for stage1 to get the rescue stage2</div><div class='del'>-- create a stage2 with many tools (fdisk, bash...)</div><div class='del'>-the rescue could be on another cd (if multi-cd)</div><div class='del'>-! care must be taken about modules (if ide is in module...)</div><div class='del'>-</div><div class='del'>-(done,7.1)install in 800x600</div><div class='del'>-- need handling of both 640x480 (mostly for VGA16) and 800x600</div><div class='del'>-</div><div class='del'>-(done,NEED 7.1) auto-install for corporate, very important (need consolidation).</div><div class='head'>diff --git a/docs/advocacy b/docs/advocacy<br/>deleted file mode 100644<br/>index 9e7f00b6b..000000000<br/>--- a/<a href='/software/drakx/tree/docs/advocacy?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/advocacy</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,87 +0,0 @@</div><div class='del'>-a little DrakX history:</div><div class='del'>-</div><div class='del'>-june 1999: </div><div class='del'>-  i start rewriting redhat's install in perl, partly for the fun of it. I'm</div><div class='del'>-  still working for the army</div><div class='del'>-</div><div class='del'>-5 july 1999: </div><div class='del'>-  i start full time job at mandrakesoft. But we don't have many computers and i</div><div class='del'>-  must share the accounting computer with Merieme who is working half-time. No</div><div class='del'>-  test machine (i test on others box, and destroyed Jacques partitions once),</div><div class='del'>-  guess how it slows things down?</div><div class='del'>-</div><div class='del'>-august 1999: </div><div class='del'>-  at last computers, even test one</div><div class='del'>-  first DrakX version which can install things, very very rough</div><div class='del'>-</div><div class='del'>-september 1999: </div><div class='del'>-  a friend of mine help me 2 weeks on DrakX relayed by Francois</div><div class='del'>-</div><div class='del'>-november 1999:</div><div class='del'>-  first released version of DrakX (goldpack). Not really stable yet.</div><div class='del'>-</div><div class='del'>-january 2000:</div><div class='del'>-  7.0 is out, with a DrakX quite stable</div><div class='del'>-</div><div class='del'>-july 2000: </div><div class='del'>-  dams starts working on draknet</div><div class='del'>-</div><div class='del'>-mid-october -&gt; mid-january 2000: </div><div class='del'>-  gc rewrites the stage1 to win every kb we can </div><div class='del'>-  -&gt; size divided by 7 (!) for cdrom</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The DrakX team is also doing a lot of other things:</div><div class='del'>-- drakxtools</div><div class='del'>-- urpmi, early MandrakeUpdate, early rpmdrake...</div><div class='del'>-- Mandrake Control Center (new DrakConf)</div><div class='del'>-- packages maintenance/enhancing (esp. ghostscript, 3D-wrappers, lilo)</div><div class='del'>-- fixing core packages to make them installable</div><div class='del'>-- scoring packages, sorting them, flagging them... (compssList, rpmsrate)</div><div class='del'>-- reading/answering cooker and other MLs</div><div class='del'>-- helping non-perl gurus :)</div><div class='del'>-</div><div class='del'>-That doesn't give much. Me being the one more working on plain DrakX. It gives 2</div><div class='del'>-people working for 1.5 years. IMO it isn't ``spending an enormous amount of</div><div class='del'>-resources''.</div><div class='del'>-And what do you mean by ``compared to the code base size''??? DrakX is currently</div><div class='del'>-around 28K lines, which is big IMO. You can compare it with linuxconf which is</div><div class='del'>-170K lines. I think the achievement of DrakX is comparable (a 6 times code size</div><div class='del'>-win from dumb C++ to expressive perl is normal imo).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Also it seems like we don't have the same understanding of the word</div><div class='del'>-"maintenance".</div><div class='del'>-DrakX functionalities have evolved *a lot* since the beginning:</div><div class='del'>-</div><div class='del'>-- hardware detection, configuration, debugging, work-arounding (multi-kernel installs...)</div><div class='del'>-- making things prettier</div><div class='del'>-  - more bitmaps</div><div class='del'>-  - "advanced" button</div><div class='del'>-  - syslinux graphical boot</div><div class='del'>-- making it work with latest versions of software (eg: switching to rpm4)</div><div class='del'>-- finding out the best way to use rpmlib</div><div class='del'>-- multi-cd</div><div class='del'>-- draknet: configuring every piece of stupid protocols</div><div class='del'>-- diskdrake: raid, loopback, LVM, resizing, checking stupid users entry</div><div class='del'>-- XFdrake: multi-mice, multi-heads, 3D-accel</div><div class='del'>-- porting to axp/sparc/ppc (with Stew's help)</div><div class='del'>-- always more i18n</div><div class='del'>-- keeping things small</div><div class='del'>-  - .cz format</div><div class='del'>-  - moving to .png</div><div class='del'>-  - getFile on demand from mdkinst for ramdisk installs</div><div class='del'>-</div><div class='del'>-[...]</div><div class='del'>-</div><div class='del'>-&gt; You don't believe the books ? Count yourself; see the man/months spent</div><div class='del'>-&gt; in 'pure' developoment in drakX, and the resources put in mantainance</div><div class='del'>-&gt; of the code base; as far as i know, your count should confirm what the</div><div class='del'>-&gt; books says; more probabily, you will discover that our numbers are</div><div class='del'>-&gt; even worse.</div><div class='del'>-</div><div class='del'>-if you count enhancements, adding features... in maintenance, i confirm the</div><div class='del'>-numbers, and find them quite normal.</div><div class='del'>-</div><div class='del'>-if you only count bug fixing, the time would be much shorter (around 30%).</div><div class='del'>-</div><div class='head'>diff --git a/docs/advocacy-interactive b/docs/advocacy-interactive<br/>deleted file mode 100644<br/>index 99036008e..000000000<br/>--- a/<a href='/software/drakx/tree/docs/advocacy-interactive?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/advocacy-interactive</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,60 +0,0 @@</div><div class='del'>-</div><div class='del'>-&gt; &gt; We already have some functional backends, frontends, that works great, and has</div><div class='del'>-&gt; &gt; not been thrown away since 1 year. We use it during install, post install, mcc</div><div class='del'>-&gt; &gt; and so.</div><div class='del'>-&gt; </div><div class='del'>-&gt; But aren't generic enough.</div><div class='del'>-</div><div class='del'>-DrakX handles:</div><div class='del'>-- buttons</div><div class='del'>-- bool values (checkboxes)</div><div class='del'>-- ranges</div><div class='del'>-- entries</div><div class='del'>-- combo boxes (editable or not)</div><div class='del'>-- lists / radio boxes</div><div class='del'>-- tree lists</div><div class='del'>-- iconlist</div><div class='del'>-- wait messages</div><div class='del'>-</div><div class='del'>-Features:</div><div class='del'>-- all the entries above can be mixed</div><div class='del'>-- nice separation between data and displayed data (eg: choose in list of</div><div class='del'>-objects representing hda/hdb/... but displayed nicely with size...)</div><div class='del'>-- keyboard handled nicely in GTK frontend</div><div class='del'>-- callback on events:</div><div class='del'>- ok pressed =&gt; check before the dialog is hidden</div><div class='del'>- focus changed =&gt; </div><div class='del'>-  * enables pre-setting things based on other entries</div><div class='del'>-  * value checking on the fly</div><div class='del'>-- simple/advance toggle </div><div class='del'>-- shadowing of entries</div><div class='del'>-- tooltips</div><div class='del'>-- size of windows computed the best possible</div><div class='del'>-- perl-based</div><div class='del'>-</div><div class='del'>-Misfeatures:</div><div class='del'>-- display not flexible (though i don't know any of the tools we're talking</div><div class='del'>-about that is flexible =&gt; nice)</div><div class='del'>-- quite a few features are gtk only (simple/advance toggle, shadowing of</div><div class='del'>-entries, certain events, tooltips).</div><div class='del'>-- a stdio front-end exist but handle only certain entries. It would need a</div><div class='del'>-week-work to finish it</div><div class='del'>-- a http front-end could be done (mod-perl needed)</div><div class='del'>-- perl-based</div><div class='del'>-</div><div class='del'>-The DrakX frontend (called "interactive") could be moved out of DrakX.</div><div class='del'>-</div><div class='del'>-eg of use:</div><div class='del'>-</div><div class='del'>-&lt;#part type="text/plain" filename="~/bin/perl/imessage" disposition=attachment&gt;</div><div class='del'>-&lt;#/part&gt;</div><div class='del'>-</div><div class='del'>-[...]</div><div class='del'>-</div><div class='del'>-&gt; &gt; -provides a lot of frontends</div><div class='del'>-&gt; </div><div class='del'>-&gt; And you ideally have to provide a frontend by widget set.</div><div class='del'>-</div><div class='del'>-nope. The interface is completly standardised, even if it include some</div><div class='del'>-gtk-like niceties. The *complete* newt (and not just entries and radioboxes</div><div class='del'>-like bus) binding takes 241 lines.</div><div class='head'>diff --git a/docs/comparisons b/docs/comparisons<br/>deleted file mode 100644<br/>index 297d1b65a..000000000<br/>--- a/<a href='/software/drakx/tree/docs/comparisons?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/comparisons</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,180 +0,0 @@</div><div class='del'>-redhat 6.1 (fr?), install 766MB, df 900MB, 35min (asked for all groups except "everything")</div><div class='del'>-</div><div class='del'>-upgrade to redhat 6.2, sum 757MB, df 936MB, 20min</div><div class='del'>-</div><div class='del'>-mandrake 7.1, install 755MB, df 1091MB, 17min (asked install size 910MB), 515 packages</div><div class='del'>-</div><div class='del'>-upgrade to cooker, sum 1000MB, df 1404MB, 35min</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-redhat 7.0b, install 815MB, df 960MB, 18min</div><div class='del'>-redhat 7.0, install 995MB, df MB, 26min</div><div class='del'>-</div><div class='del'>-7.2b, 3.3GB 2h26</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-7.2b: (lang fr)</div><div class='del'>-compssLevel  df  rpm  	time  fs          df/time</div><div class='del'>-	               	     </div><div class='del'>-100          64   59  	0:59  ext2 500M   1.08</div><div class='del'>- 90         132  127  	1:50  ext2 500M   1.20</div><div class='del'>- 80         226  218  	3:26  ext2 500M	  1.10</div><div class='del'>- 70         449  387  	5:52  ext2 1G	  1.28</div><div class='del'>- 60         614  541  	8:36  ext2 1G	  1.19</div><div class='del'>- 50        1113  943   17:40  ext2 2G	  1.05</div><div class='del'>- 40        1193 1013   20:39  ext2 2G	  0.96</div><div class='del'>- 30        1262 1072   22:28  ext2 2G	  0.94</div><div class='del'>- 20        1445 1219   27:34  ext2 2G	  0.87</div><div class='del'>- 10        1649 1394   36:58  ext2 2G	  0.74</div><div class='del'>-  0        1943 1638   48:02  ext2 2G	  0.67</div><div class='del'>--10        2957 2519  101:49  ext2 4G 	  0.48</div><div class='del'>-</div><div class='del'>-7.2b: (lang all)</div><div class='del'>-compssLevel  df  rpm  	time  fs          df/time</div><div class='del'>-</div><div class='del'>-100          70   59  	1:04  ext2 500M   1.09</div><div class='del'>- 90         289  281  	4:20  ext2 500M	  1.11</div><div class='del'>- 80         373  361    5:41  ext2 500M	  1.09</div><div class='del'>- 70         890  794   13:28  ext2 1G	  1.10</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-mem used 7.2cooker</div><div class='del'>-gtk:   runinstall2 13608(data 9572) + FBDev 2984(data 1544)</div><div class='del'>-newt:  runinstall2  9516(data 7528)</div><div class='del'>-stdio: runinstall2  9160(data 7372)</div><div class='del'>-</div><div class='del'>-8.0rc1: (lang fr)</div><div class='del'>-</div><div class='del'>-rpmsrate</div><div class='del'>-</div><div class='del'>-4   ()        175   139    3:25   reiserfs 2G  0.85</div><div class='del'>-4   all       831   786   18:08   reiserfs 2G  0.76</div><div class='del'>-</div><div class='del'>-8.1b</div><div class='del'>-</div><div class='del'>-5   ()         77    66    1:24   ext2 300M</div><div class='del'>-</div><div class='del'>-8.1pre_rc1     rpm   df                       time/rpm  rpm/df</div><div class='del'>-</div><div class='del'>-6   ()         82    66    1:26   ext2 500M   1.05      1.24</div><div class='del'>-5   ()         89    71    1:38   ext2 500M   1.10	1.25</div><div class='del'>-3   ()         94    77    1:46   ext2 500M   1.13	1.22</div><div class='del'>-5   X         145   127    2:09   ext2 500M   0.89	1.14</div><div class='del'>-3   X         231   217    3:26   ext2 500M   0.89	1.06</div><div class='del'>-4   kde       393   316    4:31   ext2 2G     0.69	1.24</div><div class='del'>-4   kde       393   316    4:41   ext2 2G     0.72	1.24</div><div class='del'>-4   kde       393   316    4:43   ext2 4G     0.72	1.24</div><div class='del'>-5   all       367   337    5:02   ext2 500M   0.82	1.09</div><div class='del'>-4   kde+gnome 454   370    5:50   ext2 4G     0.77	1.23</div><div class='del'>-4   kde+gnome 454   370    6:10   ext2 4G     0.81	1.23</div><div class='del'>-4   kde+gnome 454   370    6:24   ext2 4G     0.85	1.23</div><div class='del'>-5   all       489   406    5:55   ext2 4G     0.73	1.20</div><div class='del'>-5   all       490   406    5:18   ext2 1G     0.65	1.21</div><div class='del'>-4   kd+gn+dsk 594   494    7:31   ext2 4G     0.76	1.20</div><div class='del'>-4   prev+dev  827   696   10:27   ext2 4G     0.76	1.19</div><div class='del'>-4   all      1100   988   19:34   ext2 1G     1.07	1.11</div><div class='del'>-3   all      1640  1331   31:33   ext2 2G     1.15	1.23</div><div class='del'>-3   all      1740  1434   39:38   ext2 4G     1.37	1.21</div><div class='del'>-2   all      2252  1843   54:40   ext2 4G     1.46	1.22</div><div class='del'>--1  all      2490  2048   61:02   ext2 4G     1.47      1.22</div><div class='del'>-</div><div class='del'>-# perl -alpe '$F[4] =~ /(.*):(.*)/; $r = ($1 * 60 + $2) / $F[2]; s|\S+(\s+\S+)\s*$|sprintf("%.2f", $r) . "$1"|e;'</div><div class='del'>-# perl -ape '$r = $F[2] / $F[3]; s|\S+\s*$|sprintf "%.2f\n", $r|e;'</div><div class='del'>-</div><div class='del'>-9.0beta1</div><div class='del'>-</div><div class='del'>-5   ()         89    71    1:35   ext2 500M</div><div class='del'>-3   X         240   231    3:41   ext2 500M</div><div class='del'>-5   all       306   293    3:36   ext2 500M</div><div class='del'>-4   all       808   731    6:48   ext2 1G</div><div class='del'>-4   all      1433  1331   21:44   ext2 2G</div><div class='del'>-4   X+kde     822   749    6:05   ext2 2G</div><div class='del'>-4   X+gnome   369   319    5:58   ext2 2G</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-redhat 7.3:</div><div class='del'>-- do not halt the box when "halt" is used</div><div class='del'>-- no sysreq</div><div class='del'>-- kdm has gnome entry whereas gnome is not installed</div><div class='del'>-  =&gt; choosing gnome gives a flashing black screen and kdm reruns</div><div class='del'>-</div><div class='del'>-- repartition of packages on various CDs is crap</div><div class='del'>-</div><div class='del'>-- bootloader: handling of multiple disks is more powerful in redhat, but more</div><div class='del'>-dangerous (proposed to everyone, but not proposed especially to people having</div><div class='del'>-a dangerous combinaison)</div><div class='del'>-- why still asking about lba32!!</div><div class='del'>-</div><div class='del'>-redhat 8.0:</div><div class='del'>-</div><div class='del'>-(legend: + pros  - cons  / notice)</div><div class='del'>-</div><div class='del'>-Install steps difference</div><div class='del'>-+ firewall wizard</div><div class='del'>-+ md5sum check when booting install</div><div class='del'>-- no upgrade packages installation during install</div><div class='del'>-- no services configuration (chkconfig)</div><div class='del'>-- no printer configuration</div><div class='del'>-- no autologin</div><div class='del'>-- no real small installation</div><div class='del'>-/ still propose non-MD5 or non-shadow passwords</div><div class='del'>-/ post install tool (firstconfig)</div><div class='del'>-</div><div class='del'>-General install behaviour, eye-candiness</div><div class='del'>-+ package selection a la Windows</div><div class='del'>-+ in language selection languages displayed in native language</div><div class='del'>-+ candy timezone selection</div><div class='del'>-+ help uses bold/italic/big-font</div><div class='del'>-- no one CD install</div><div class='del'>-/ not using fb at install</div><div class='del'>-/ python + gtk2  vs  perl + gtk</div><div class='del'>-/ ask many things before doing anything (esp. delayed partitioning, swap not available when selecting packages!(?))</div><div class='del'>-- more width-hard-coded dialog boxes (harder for translations)</div><div class='del'>-/ use a loopback file from the CD then copied on system</div><div class='del'>-</div><div class='del'>-Partitioning</div><div class='del'>-- no diskdruid after install</div><div class='del'>-- no partitioning wizard</div><div class='del'>-- no devfs</div><div class='del'>-- no xfs (but now has reiserfs/jfs)</div><div class='del'>-- no loopback crypted fs</div><div class='del'>-- no file swap (?)</div><div class='del'>-- no supermount</div><div class='del'>-+ LABELed entries in fstab</div><div class='del'>-+ progress bar while formatting</div><div class='del'>-</div><div class='del'>-Bootloader</div><div class='del'>-+ bootloader configuration less awkward</div><div class='del'>-- no automatic handling of bios ordering with many harddrives</div><div class='del'>-- propose to manually change bios ordering even with one harddrive</div><div class='del'>-- LBA32 checkbox</div><div class='del'>-/ defaults to grub</div><div class='del'>-</div><div class='del'>-Network</div><div class='del'>-- awkward question apropos hostname when using DHCP</div><div class='del'>-- no default choice for netmask/gateway/DNS based on IP</div><div class='del'>-</div><div class='del'>-XFree</div><div class='del'>-- no wacom configuration</div><div class='del'>-- no graphic card multi-head configuration</div><div class='del'>-- no ATI tvout configuration</div><div class='del'>-- no prompt for logout after changing X config</div><div class='del'>-- VideoRam prompted for everybody</div><div class='del'>-/ no XFree3</div><div class='del'>-/ no Utah GLX</div><div class='del'>-/ load module "fbdevhw" "record", but not "v4l"</div><div class='del'>-/ always load module "glx" and "dri"</div><div class='del'>-</div><div class='del'>-Keyboard</div><div class='del'>-- many non useful keyboard entries (eg: latin0)</div><div class='del'>-- no way to choose the toggle key to choose between latin/non-latin keyboard </div><div class='del'>-- no loadkeys done during install for console</div><div class='del'>-</div><div class='del'>-Mouse</div><div class='del'>-- no way to test mouse choice</div><div class='del'>-- mouse choices include many non-useful choices, badly sorted</div><div class='del'>-  (Intellimouse must be sought in Microsoft whereas it's used by many others)</div><div class='del'>-</div><div class='del'>-Multimedia</div><div class='del'>-- no bttv configuration (including webcams)</div><div class='del'>-- missing audio modules (alsa, audigy...)</div><div class='head'>diff --git a/docs/diskdrake.TODO b/docs/diskdrake.TODO<br/>deleted file mode 100644<br/>index e6f2da038..000000000<br/>--- a/<a href='/software/drakx/tree/docs/diskdrake.TODO?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/diskdrake.TODO</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-- test what windows can handle (the number of partitions)</div><div class='del'>-- better keyboard focus handling</div><div class='del'>-- end sector in Create</div><div class='del'>-- add warnings for scsi drives if you create more than sdx15</div><div class='del'>-- the information put in save/restore partitions must be cleaned</div><div class='del'>-(remove mounted/formatted/..., also remove the Data::Dumper dependency)</div><div class='del'>-- test, test, test</div><div class='del'>-- do not allow swap partitions above 2Gigs</div><div class='del'>-- wanting the first partition to be extended is not used</div><div class='del'>-- maybe warn if a mounted partition change of dev number</div><div class='del'>-- text version</div><div class='del'>-- better error handling (what to do if we find a bad partition table?)</div><div class='del'>-- display the information about the correspondance color2type</div><div class='del'>-- handle the partition labels (missing information here)</div><div class='del'>-- add comments in the code</div><div class='del'>-- add documentation</div><div class='del'>-- handle the `luke' case (main extended partition must be extended)</div><div class='del'>-- ability to batch actions (like chained moves)</div><div class='del'>-- add a verification after fdiskReadPartitionTable that the start_cyl,</div><div class='del'>-end_cyl... do correspond to start and start+size. For the moment, this</div><div class='del'>-information is just discarded :(</div><div class='del'>-This verif can't be done in fdiskReadPartitionTable as start is relative in</div><div class='del'>-extended partitions</div><div class='head'>diff --git a/docs/drakfont/Makefile b/docs/drakfont/Makefile<br/>deleted file mode 100644<br/>index b70b4a0c8..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,57 +0,0 @@</div><div class='del'>-#</div><div class='del'>-#</div><div class='del'>-#        Project   : Projet  Libre</div><div class='del'>-#        file      : pki.tex</div><div class='del'>-#             Date : Thu Jun 21 19:26:19 CEST 2001</div><div class='del'>-#   (o-       Id   : DUPONT Sebastien</div><div class='del'>-#   /\        mail : &lt;dupont_s@epita.fr&gt;</div><div class='del'>-#  Y_/___________________________________________</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-RM 	= 	@rm -f</div><div class='del'>-</div><div class='del'>-CD	=	@cd</div><div class='del'>-</div><div class='del'>-ECHO	=	@echo</div><div class='del'>-</div><div class='del'>-PRINTF	=	@echo -n</div><div class='del'>-</div><div class='del'>-FILE	=	drakfont</div><div class='del'>-</div><div class='del'>-DVI	= 	@dvips -j0 -Pcmz -Pamz -o</div><div class='del'>-</div><div class='del'>-PS	=	@ps2pdf</div><div class='del'>-</div><div class='del'>-LATEX	=	@latex</div><div class='del'>-</div><div class='del'>-normal	:</div><div class='del'>-	$(ECHO) '[35m/*--LATEX--*/[0m'</div><div class='del'>-	$(LATEX) $(FILE).tex</div><div class='del'>-</div><div class='del'>-all	: </div><div class='del'>-	$(ECHO) '/*----------latex -&gt; dvi -&gt; ps -&gt; pdf------------'</div><div class='del'>-	$(ECHO) '[35m/*--LATEX--*/[0m'</div><div class='del'>-	$(LATEX) $(FILE).tex</div><div class='del'>-	$(ECHO) '[35m/*--DVI -&gt; PS--*/[0m'</div><div class='del'>-	$(DVI) $(FILE).ps $(FILE).dvi</div><div class='del'>-	$(ECHO) '[35m/*--PS -&gt; PDF--*/[0m'</div><div class='del'>-	$(PS) $(FILE).ps</div><div class='del'>-	$(ECHO) '[35m/*--That s all--*/[0m'</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ps	: normal</div><div class='del'>-	$(ECHO) '[35m/*--DVI -&gt; PS--*/[0m'</div><div class='del'>-	$(DVI) $(FILE).ps $(FILE).dvi</div><div class='del'>-	$(ECHO) '[35m/*--That s all--*/[0m'</div><div class='del'>-</div><div class='del'>-pdf	: ps</div><div class='del'>-	$(ECHO) '[35m/*--PS -&gt; PDF--*/[0m'</div><div class='del'>-	$(PS) $(FILE).ps</div><div class='del'>-	$(ECHO) '[35m/*--That s all--*/[0m'</div><div class='del'>-</div><div class='del'>-clean	:</div><div class='del'>-	$(RM) $(FILE).toc $(FILE).log $(FILE).aux *~</div><div class='del'>-</div><div class='del'>-fclean	:</div><div class='del'>-	make clean</div><div class='del'>-	$(RM) $(FILE).ps $(FILE).pdf  $(FILE).dvi  </div><div class='head'>diff --git a/docs/drakfont/dia_srcs/drakfont.dia b/docs/drakfont/dia_srcs/drakfont.dia<br/>deleted file mode 100644<br/>index c4502a12e..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/dia_srcs/drakfont.dia?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/dia_srcs/drakfont.dia</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/dia_srcs/drakfont_install.dia b/docs/drakfont/dia_srcs/drakfont_install.dia<br/>deleted file mode 100644<br/>index 737c19b9f..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/dia_srcs/drakfont_install.dia?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/dia_srcs/drakfont_install.dia</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/dia_srcs/drakfont_uninstall.dia b/docs/drakfont/dia_srcs/drakfont_uninstall.dia<br/>deleted file mode 100644<br/>index c06f92dd6..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/dia_srcs/drakfont_uninstall.dia?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/dia_srcs/drakfont_uninstall.dia</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/drakfont.jpg b/docs/drakfont/drakfont.jpg<br/>deleted file mode 100644<br/>index 898dfe440..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/drakfont.jpg?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/drakfont.jpg</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/drakfont.tex b/docs/drakfont/drakfont.tex<br/>deleted file mode 100644<br/>index bbc936e5b..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/drakfont.tex?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/drakfont.tex</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,152 +0,0 @@</div><div class='del'>-%\documentclass[pdftex]{article} \usepackage{hyperref} . </div><div class='del'>-%\documentclass[pdftex,onecolumn,11pt,oneside]{article}</div><div class='del'>-\documentclass[onecolumn,11pt,oneside]{article}%seminar}</div><div class='del'>-%\usepackage[pdftex]{hyperref}</div><div class='del'>-\usepackage{isolatin1}</div><div class='del'>-%\ifx\pdfoutput\undefined</div><div class='del'>-</div><div class='del'>-\usepackage[dvips]{graphicx}</div><div class='del'>-%\else</div><div class='del'>-%\usepackage[pdftex]{graphicx}</div><div class='del'>-%\usepackage[pdftex]{hyperref}</div><div class='del'>-%\usepackage{type1cm} </div><div class='del'>-%\fi</div><div class='del'>-%\pdfoutput=1 </div><div class='del'>-\usepackage{color,graphicx,shortvrb,epsfig,verbatim,tabularx}</div><div class='del'>-\usepackage{url}</div><div class='del'>-\usepackage{hyperref}</div><div class='del'>-\urlstyle{sf}</div><div class='del'>-\usepackage{fancyheadings}</div><div class='del'>-\usepackage{program}</div><div class='del'>-\usepackage{ulem}</div><div class='del'>-\usepackage{amsfonts}</div><div class='del'>-\usepackage{xspace}</div><div class='del'>-\usepackage[english,francais]{babel}</div><div class='del'>-\pagestyle{fancy}</div><div class='del'>-\newcommand{\trtitle}{Drakfont\\ fonts importation for mandrake linux}</div><div class='del'>-\DeclareGraphicsRule{.ps}{eps}{.ps}{}</div><div class='del'>-\DeclareGraphicsExtensions{.ps}</div><div class='del'>-\renewcommand\star{{\ttfamily*}}</div><div class='del'>-\let\package\textsf</div><div class='del'>-\newlength{\gxlen}</div><div class='del'>-\settowidth{\gxlen}{\package{graphicx}: }</div><div class='del'>-\newcommand\gs{\makebox[\gxlen][l]{\package{graphics}:}}</div><div class='del'>-\newcommand\gx{\makebox[\gxlen][l]{\package{graphicx}:}}</div><div class='del'>-\MakeShortVerb{\|}</div><div class='del'>-\begin{document}</div><div class='del'>-\title{$Drakfont$ fonts importation for mandrake linux}</div><div class='del'>-</div><div class='del'>-\begin{figure}%[ht]</div><div class='del'>-\begin{center}</div><div class='del'>-%\caption{Exemple d'image}</div><div class='del'>-\mbox{\epsfig{file=mandrake.ps}}\\ %,height=1in,width=2in}}\\</div><div class='del'>-%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}}</div><div class='del'>-\end{center}</div><div class='del'>-\end{figure}</div><div class='del'>-%\begin{figure}</div><div class='del'>-%\begin{center}</div><div class='del'>-</div><div class='del'>-%\end{center}</div><div class='del'>-%\end{figure}</div><div class='del'>-\author{Dupont Sebastien \\ sdupont@mandrakesoft.com}</div><div class='del'>-\date{05/10/2001}</div><div class='del'>-\pagestyle{myheadings}</div><div class='del'>-\markright{\scriptsize \trtitle}</div><div class='del'>-\title{\bf \trtitle}</div><div class='del'>-\maketitle</div><div class='del'>-\section{drakfont Future Overview}</div><div class='del'>-</div><div class='del'>-\paragraph{Fonts import :\\}     </div><div class='del'>-\begin{itemize} </div><div class='del'>-\item pfb ( Adobe Type 1 binary )</div><div class='del'>-\item pfa ( Adobe Type 1 ASCII )</div><div class='del'>-\item ttf ( True-Type  )    </div><div class='del'>-\item pcf.gz		      </div><div class='del'>-\item Speedo		      </div><div class='del'>-\item pfa ( Adobe Type 1 ASCII )</div><div class='del'>-\item ttf ( True-Type  )    </div><div class='del'>-\item and Bitmap (PCF, BDF, and SNF)</div><div class='del'>-\end{itemize}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-\paragraph{Features}                </div><div class='del'>-\begin{itemize} </div><div class='del'>-\item Install fonts from any directory</div><div class='del'>-\item Get windows fonts on any vfat partitions</div><div class='del'>-\item UN-installation of any fonts (even if not installed through drakfont)                </div><div class='del'>-\end{itemize}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-\paragraph{Support}                </div><div class='del'>-\begin{itemize} </div><div class='del'>-\item Xfs		      </div><div class='del'>-\item ghostscript \&amp; printer </div><div class='del'>-\item Staroffice \&amp; printer  </div><div class='del'>-\item abiword		      </div><div class='del'>-\item Koffice, Gnumeric, ... studying</div><div class='del'>-\item all fonts supported by printer</div><div class='del'>-\item ( aliases by RENDER in Xfree86 .... -&gt; later )</div><div class='del'>-\end{itemize}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-\section{Window interface:}</div><div class='del'>-\begin{itemize} </div><div class='del'>-\item</div><div class='del'>-\item Fontselectiondialog widget</div><div class='del'>-\item Command buttons under Fontselectiondialog (like the actual frontend).</div><div class='del'>-\item Commands buttons:	      </div><div class='del'>-\item import from windows partition.</div><div class='del'>-\item import from all fat32 partitions and look for winnt/windows/font</div><div class='del'>-\item and import all (delete doublon) but don't import if already exist.</div><div class='del'>-\item import from directory     </div><div class='del'>-\item look for if it exist before for each font and not delete the original.</div><div class='del'>-\item (replace all, no, none)</div><div class='del'>-\item expert options:	      </div><div class='del'>-\item ask the directory, and look for if it exist before</div><div class='del'>-\item if it exist ask: (replace all, no, none)</div><div class='del'>-\item uninstall with list per font type</div><div class='del'>-\item Expert additional switch</div><div class='del'>-\item option support:   ghostscript, Staroffice, etc...</div><div class='del'>-\item check-button. (by default all check)</div><div class='del'>-\item Printer Application Fonts Support...</div><div class='del'>-\item check-button. (by default all check)</div><div class='del'>-\end{itemize}</div><div class='del'>-</div><div class='del'>-\section{Command line}</div><div class='del'>-\paragraph{Font Importation and monitoring application\\}</div><div class='del'>-\-\-windows\_import : import from all available windows partitions. \\</div><div class='del'>-\-\-strong         : strong verification of font.\\</div><div class='del'>-\-\-install        : accept any font file and any directory.\\</div><div class='del'>-\-\-uninstall      : uninstall any font or any directory of font.\\</div><div class='del'>-\-\-replace        : replace all font if already exist\\</div><div class='del'>-\-\-application    : 0 none application.\\</div><div class='del'>-                 : 1 all application available supported.\\</div><div class='del'>-                 : name\_of\_application" like  staroffice for only this one.\\</div><div class='del'>-				      </div><div class='del'>-\section{Graphics}</div><div class='del'>-</div><div class='del'>-to visualize the conceptual graphics please see:\\</div><div class='del'>-drakfont.jpg\\</div><div class='del'>-drakfont\_install\.jpg\\</div><div class='del'>-\&amp; drakfont\_uninstall.jpg\\</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-%\begin{figure}%[ht]</div><div class='del'>-%\begin{center}</div><div class='del'>-%\caption{Exemple d'image}</div><div class='del'>-%\mbox{\epsfig{file=drakfont_install.ps}}\\ %,height=1in,width=2in}}\\</div><div class='del'>-%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}}</div><div class='del'>-%\end{center}</div><div class='del'>-%\end{figure}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-%\begin{figure}%[ht]</div><div class='del'>-%\begin{center}</div><div class='del'>-%\caption{Exemple d'image}</div><div class='del'>-%\mbox{\epsfig{file=drakfont_uninstall.eps}}\\ %,height=1in,width=2in}}\\</div><div class='del'>-%\mbox{\epsfig{file=carte_.ps,height=1in,width=2in}}</div><div class='del'>-%\end{center}</div><div class='del'>-%\end{figure}</div><div class='del'>-</div><div class='del'>-\end{document}</div><div class='head'>diff --git a/docs/drakfont/drakfont_install.jpg b/docs/drakfont/drakfont_install.jpg<br/>deleted file mode 100644<br/>index 795a5a711..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/drakfont_install.jpg?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/drakfont_install.jpg</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/drakfont_uninstall.jpg b/docs/drakfont/drakfont_uninstall.jpg<br/>deleted file mode 100644<br/>index 711f28e77..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/drakfont_uninstall.jpg?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/drakfont_uninstall.jpg</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/docs/drakfont/mandrake.ps b/docs/drakfont/mandrake.ps<br/>deleted file mode 100644<br/>index 1af9d5bb4..000000000<br/>--- a/<a href='/software/drakx/tree/docs/drakfont/mandrake.ps?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/drakfont/mandrake.ps</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,534 +0,0 @@</div><div class='del'>-%!PS-Adobe-3.0</div><div class='del'>-%%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner</div><div class='del'>-%%Title: /home/seb/drakfont/mandrake.ps</div><div class='del'>-%%CreationDate: Fri Oct  5 18:28:29 2001</div><div class='del'>-%%DocumentData: Clean7Bit</div><div class='del'>-%%LanguageLevel: 2</div><div class='del'>-%%Pages: 1</div><div class='del'>-%%BoundingBox: 14 14 424 84</div><div class='del'>-%%EndComments</div><div class='del'>-%%BeginProlog</div><div class='del'>-% Use own dictionary to avoid conflicts</div><div class='del'>-10 dict begin</div><div class='del'>-%%EndProlog</div><div class='del'>-%%Page: 1 1</div><div class='del'>-% Translate for offset</div><div class='del'>-14.173228 14.173228 translate</div><div class='del'>-% Translate to begin of first scanline</div><div class='del'>-0.000000 69.000000 translate</div><div class='del'>-409.000000 -69.000000 scale</div><div class='del'>-% Image geometry</div><div class='del'>-409 69 8</div><div class='del'>-% Transformation matrix</div><div class='del'>-[ 409 0 0 69 0 0 ]</div><div class='del'>-% Strings to hold RGB-samples per scanline</div><div class='del'>-/rstr 409 string def</div><div class='del'>-/gstr 409 string def</div><div class='del'>-/bstr 409 string def</div><div class='del'>-{currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop}</div><div class='del'>-{currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop}</div><div class='del'>-{currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop}</div><div class='del'>-true 3</div><div class='del'>-%%BeginData:        29637 ASCII Bytes</div><div class='del'>-colorimage</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-bl7e@q"4E6s+13Ds*t~&gt;</div><div class='del'>-bl7e@m,@els+13Ds*t~&gt;</div><div class='del'>-bl7e@T5=@Ts+13Ds*t~&gt;</div><div class='del'>-c2RqDnG2D&lt;JcC&lt;$U&amp;TW~&gt;</div><div class='del'>-c2RqDl/9_PJcC&lt;$U&amp;TW~&gt;</div><div class='del'>-c2RqD]71%QJcC&lt;$U&amp;TW~&gt;</div><div class='del'>-cMn+JnG;n/i;S&lt;-JcDJEJ,~&gt;</div><div class='del'>-cMn+JmbuTmh#;m)JcDJEJ,~&gt;</div><div class='del'>-cMn+Jie^A&lt;a8UYiJcDJEJ,~&gt;</div><div class='del'>-cMn+DnbMk)f)($uJcDJEJ,~&gt;</div><div class='del'>-cMn+DjkIhQchi:nJcDJEJ,~&gt;</div><div class='del'>-cMn+DST5n_V&gt;GiDJcDJEJ,~&gt;</div><div class='del'>-ci47Jn+l_KeBdl?s+13Es*t~&gt;</div><div class='del'>-ci47Jkhjh)WP\C\s+13Es*t~&gt;</div><div class='del'>-ci47J^4K&amp;h%!hSus+13Es*t~&gt;</div><div class='del'>-d/OCNnbW%Rn_2+VJcC&lt;$UAo`~&gt;</div><div class='del'>-d/OCNn);p@^TP0&gt;JcC&lt;$UAo`~&gt;</div><div class='del'>-d/OCNj+q1n%LcV6JcC&lt;$UAo`~&gt;</div><div class='del'>-d/OCHnG2eMo&amp;%LUJcC&lt;$UAo`~&gt;</div><div class='del'>-d/OCHjkS+u^p135JcC&lt;$UAo`~&gt;</div><div class='del'>-d/OCHTl`:/%Lk8_JcC&lt;$UAo`~&gt;</div><div class='del'>-lMgqbp\sLY$2s;fp\"1NjN$P:s+13Es*t~&gt;</div><div class='del'>-lMgqbp\sLY$2s,He&amp;K8A[BAeGs+13Es*t~&gt;</div><div class='del'>-lMgqbq&gt;T^[$2r)%;B-/V%3+S`s+13Es*t~&gt;</div><div class='del'>-li.(dk/mMerri&gt;mqY9a_oE+4!k(3P`s.]OD~&gt;</div><div class='del'>-li.(dk/mMersJbqin;Gk_SWgdk(3P`s.]OD~&gt;</div><div class='del'>-li.(dmFhC'rsJbkMeO[R%M'!Pk(3P`s.]OD~&gt;</div><div class='del'>-m/I4fjeV8=m/I1an+l\UoE4C(gAQU&amp;JcDMFJ,~&gt;</div><div class='del'>-m/I4fje_&gt;&gt;m/I4bjk\5#rk\cKUso9ns+13Fs*t~&gt;</div><div class='del'>-m/I4flbMl_m/IIiWH^N?%Ls!Y%&amp;s2Vs+13Fs*t~&gt;</div><div class='del'>-mJd@ggl^4WrU'UfrU9RVp&amp;4Lbm*a;WJcC&lt;$U]5i~&gt;</div><div class='del'>-mJd@gglg:XrU'UfrTiCk`r3aV];N^FJcC&lt;$U]5i~&gt;</div><div class='del'>-mJd@gjg&lt;_0rU'UfrR6L%+8lZO%1J$fJcC&lt;$U]5i~&gt;</div><div class='del'>-mf*Iik)["5qX+:crq-'^p&amp;+Famb#_TJcC&lt;$U]5i~&gt;</div><div class='del'>-mf*Iik)d(6qX+:drq#.'b/=1p"21eLoR[$ns.fUE~&gt;</div><div class='del'>-mf*IilEnChqX+:drp&gt;Y\/e\'l!Xrf8JcC&lt;$U]5i~&gt;</div><div class='del'>-n,F"!nYD2sp&amp;&gt;!hp%nOYp@\.TrV6BpqX41Qqt(!\hT52;s+13Fs*t~&gt;</div><div class='del'>-n,F"!nYM8tp&amp;&gt;!hm-F!$l0Rm2rV6BqqW?VZ`;IIS^p(69JcC&lt;$U]5i~&gt;</div><div class='del'>-n,F"!o&gt;7BVp&amp;&gt;!h[uQH0T!cSkrV6BqqQkK3(&amp;JIB%70K7s+13Fs*t~&gt;</div><div class='del'>-n,FI)^NR3SrVuomhY$U:q"X[\qY0^VpA+[ds82B`p\"CT!oq&gt;fJcC&lt;$U]5i~&gt;</div><div class='del'>-n,FI)^j!BUrVuomg;hIdf%Jg6kNM-qn+?PWs82-AeAqF&amp;!jo2uJcC&lt;$U]5i~&gt;</div><div class='del'>-n,FI)d@e5&gt;rVuom_BM'9&gt;A8)$G_hZm`nC%as80]m&lt;Zq5K!Y$ODJcC&lt;$U]5i~&gt;</div><div class='del'>-nG`[jf8YC8q&gt;UBuqVJd?m.L&amp;NpAajeq#1!kp%eIZp%e4]kKW1@s+13Fs*t~&gt;</div><div class='del'>-nG`[jf8YC8q&gt;UC0qVJQ`]&gt;_n8c-Xnhg"Y?&gt;kiqElf#bi+_?.6OkCNYas.fUE~&gt;</div><div class='del'>-nG`[jhm8^'q&gt;UC0qVI;C%2gQM4%)eE@rZaAKVFlk?7QZc%Kd4N"m:I:JcDMFJ,~&gt;</div><div class='del'>-nc&amp;gmm]UN9m/I"a#6+8C]\r,HrUg-_rq??c!VZ3]oE4O8iVnE.JcDPGJ,~&gt;</div><div class='del'>-nc&amp;gmm]UQ:m/I"a(&amp;mjRYd1mV_SX4/`lQ?JcdC7lcH*p!_?7KSh&gt;W!*JcDPGJ,~&gt;</div><div class='del'>-nc&amp;gmnApp+m/I"a(&amp;mjRCCL^_%M'-d*@NX&amp;6:t6X5:%$?%Km:P%*&amp;9ts+13Gs*t~&gt;</div><div class='del'>-nc&amp;dibD(8oq&gt;C6srp\(Nj6cI(oE4^PjnOE,JcDPGJ,~&gt;</div><div class='del'>-nc&amp;dibD(;pq&gt;C6srp\(:[(O6N_?7]o`5D&gt;d"2VXrpjrHrs.o[F~&gt;</div><div class='del'>-nc&amp;dif&lt;14fq&gt;C6qrp\&amp;r%J^M6%g3L](D78P%KT)pJcC&lt;$V#Pr~&gt;</div><div class='del'>-o)Apnm'1H"lMg\\#6!f&amp;dH0iglLY2OnG*"XrsA\uq"XjgqtB^[JcC&lt;$\c70~&gt;</div><div class='del'>-o)ApnmBLT$lMg\\#6!f&amp;\@0,fm(rqD`5^X+rqQL"rpo1Err;l[jSON.JcE:\J,~&gt;</div><div class='del'>-o)Apnm`LrrlMg\\"T@T$+q&lt;fI"VDOmC#f3frsA\WEU3W(qji66JcC&lt;$\c70~&gt;</div><div class='del'>-o)Amjb*?Map%eUlqr&gt;9CjmVg,oEY'_p\"4Rr;QWo$2s&amp;VmeZnNp&gt;&gt;Uqs+13\s*t~&gt;</div><div class='del'>-o)Amjb*?Pbp%eUlqr&gt;2i[_BTE_?e'"cIM%Anb`=`rsAYegtV](lHe5ZJcC&lt;$\c70~&gt;</div><div class='del'>-o)Amjf"$U`p%eUjqr=df%I4K1%hp3M&gt;Ci]roD\[f$2s$mBDVSN(rc6#s+13\s*t~&gt;</div><div class='del'>-o)Am`[;pHKrV6BrptE13kO@d/(%q:pq"X[Yp%\Lcs8M65p?qSEe(skOs+13\s*t~&gt;</div><div class='del'>-o)Am`[W6TMrV6BrptE!V\A.@H(;n2:dFR%+k3DR:s8W)^b0fDEf&gt;-5=JcC&lt;$\c70~&gt;</div><div class='del'>-o)Am`bFssSrV6BqptC`;%I4K?%hp-C8mQ7RKs0)+s8W)^Q8?5H&gt;YX&amp;NJcC&lt;$\c70~&gt;</div><div class='del'>-oD]!me&gt;?o:lhCD`rq+[OhWjXqo`+Uap(-omq"aUUq=E"uo]5Yem/DS9JcE:\J,~&gt;</div><div class='del'>-oD]!meYd,&gt;lhCD`rq+[DZ+@a9_A'o,aNMlWf%T6KmIg(uccXqbaR&amp;nWs+13\s*t~&gt;</div><div class='del'>-oD]!mgr,DGlhCD_rq+ZT%1VS4'b:op,r7b[?&gt;XPE\DZu+?7Vct]^5WKs+13\s*t~&gt;</div><div class='del'>-oD]!f^6W?3nb2terp\+KipH=!o`+Uap($ilq"O+(guI)Go(DbUrdk*#s1JA^~&gt;</div><div class='del'>-oD]!f^6`H5nb2terp\+:Zb4-;_@si+aNVuZf\&gt;QHa2#=.eDfTZqu20HJcEC_J,~&gt;</div><div class='del'>-oD]!fcFJk?nb2tcrp\*'%H\-7%h]a,2F:;PDg@Us1*L+oT;9Krrdk*#s1JA^~&gt;</div><div class='del'>-oD]!]YCC#np\"OjrThAHk3qp%o_nFnp@?/4i8NJDeEQYKc-"5QrlP;YVY^&amp;e!rCEmrQ58a`3ciI</div><div class='del'>-d/OCNp#k&amp;U\;/o&gt;h#@ZZp#k&amp;V\rFr4iVs&gt;cn`8KObf\)MdFe!gir92]puU2Tbl5cb^&amp;\&amp;$s*t~&gt;</div><div class='del'>-oD]!]YCC#np\"OjrThA1\%]]&gt;_A'o-aN2ZXdCHg.]=keag\&amp;b7bKS30b6#MWqY1!kqUNslb6?&amp;0</div><div class='del'>-`3ciId/OCNp#k&amp;U\VT)@h#@ZZp#k&amp;V]8k/7iVs&gt;cn`8KObfe/NdFn'hir9DcpuU2Tbfe2P^V9T9</div><div class='del'>-s*t~&gt;</div><div class='del'>-oD]!]aJt!3p\"OhrTh?P%H@p+%hp!3-mB]:J%7BArWNL]p"S9UgY;_]!n&gt;*`p\t&lt;kinaRe"PMAM</div><div class='del'>-b59Qc#laScjPJ7fjo4'8#laScjPS@lgAU"1%0#nbjk\\Fg=b?Co`!kM"oe&gt;aj5&amp;JhgAfS$qjmb;~&gt;</div><div class='del'>-o`#-pfr/arg&amp;(FA"oIDohWO@goFpf^hTE^[d+I+3\@B)hioYiBMk'a&lt;!fM0fq#:d$hS6+`T:M*e</div><div class='del'>-C1Mkcdf0[Qg;:S9ZD;SVjSds8$N8Ym]Xb&gt;FH&gt;(\%jSoMbptsB7]&lt;eK2rgs@hW2mGdrT4%`rTDG@</div><div class='del'>-ZDXGrT)saenX]]1~&gt;</div><div class='del'>-o`#-pfr/asg&amp;(FA"oIDmZ+.O/_@s_sYb@bpYJAE'\@B)hioYlDMk'a&lt;!fM3gq#:d$hS?1aT:M*e</div><div class='del'>-C1Mnddf0[Qg;:V:ZD;SWjSds8$N8Ym]XkDGH&gt;1b&amp;jSoMbptsE9]&lt;eK2rgs@hW3!MerT4%`rTDG@</div><div class='del'>-ZDXGrT)safnX]]1~&gt;</div><div class='del'>-o`#-phSl(&gt;g&amp;(FA"T.;a%1V;,rs]MI#nAC@F#gb?\]3XkXJrM=rP&amp;E&gt;SaH4P%/o8;a1oC'[\K.H</div><div class='del'>-S+&gt;#-$N9&amp;:eC)RXUQ4F6hZ!r]j3uH'bep?&gt;eGA8+#laY_hUg0!`PMPg"iA7"cKP5grs&amp;Ggh:9`f</div><div class='del'>-_&gt;_1NY+"mOs*t~&gt;</div><div class='del'>-o`#-k`1LULi;W?J"o6r`jR)O$oH!MhhT2q%V6%_Zamms?io]goWKMCCDf9T7A7i^Wq&gt;Uls_PM^#</div><div class='del'>-EG/W[H],6!df0[K[s3%5GACN#iVq^6$MV#aF)?#9&gt;[lFajo6"lim#-6Ob7puCMe$3G'nq%P-t2M</div><div class='del'>-rseqc_lA`EF(f,p@pNR+qYpZso@s5Bs*t~&gt;</div><div class='del'>-o`#-k`1U[Ni;W?J"o6r[[Cj?=_B$G(Yb-l2RA-dea2uK^io]goWfhOEDf9T7A7i^Wq&gt;Uls_PM^#</div><div class='del'>-EG/W[H]5&lt;"df0[K[s&lt;.7GACN$iVq^6$MV&amp;bFDc2;&gt;[uLbjo6"lim#-6Ob7puCMe$3G'nq%PICAO</div><div class='del'>-rseqd_lA`EF(f,p@pNU,qYpZso@s5Bs*t~&gt;</div><div class='del'>-o`#-kd(bp"i;W?J"8U`5%HJ$!%2'$U$Vu+1*4lc6i8Wnik-LYHT`1PdTU(S\rV?I%p=$pYT:h[3</div><div class='del'>-H]"0#n'_4CpW&amp;ntT;8$8L&gt;i-grsJMAUn"!NSr/*QqrRhkr9&lt;%c`3ueET:MRGTqnTfZa\-TkPl"i</div><div class='del'>-kL[_[W1f]IQ'I8]k5,)[rq&gt;LQW;hA~&gt;</div><div class='del'>-o`#*d[?tH4iq!*Orq+U^kO]kem,#gfX.uc3c/-+Vg@4Y3s8V`JaII`jBOk^aA?5P&amp;rseqYZA*4-</div><div class='del'>-An"tc][5[4df0XJgUa)+DIZpqkM?.FpYNZaKQL^.E9$r[rtYF__PW-/@pN2?&gt;?b?@A7fLoF`b+j</div><div class='del'>-kl1kZ]qg0nA7#49!`N1[rVm*#m+]aaPkD!TJ,~&gt;</div><div class='del'>-o`#*d[?tH5iq!*Qrq+UM_o(`U+2GLmT8\SmWkcK^ZHL,*n,E@eo\RZZIq35'An#;Pq&gt;1+#rR\?0</div><div class='del'>-D.R&lt;g&gt;][R)iqLn$$2&lt;2cTmU`f&gt;^5GfrsJMW^Sup0@p&lt;p4roX4qqq/c_LiHp1=B\p5&gt;[_/TBQ/*:</div><div class='del'>-\,&gt;Ii%J7B1J8/V$='/O*;cr&amp;Xrs&amp;Gggrugaor.n@~&gt;</div><div class='del'>-o`#*daL[Uhiq!*Qrq+T=&amp;eX=;rs]qU$49S'^m5IRb&gt;Su4rr&lt;#jhT2duQC+#+P`30KqYq$'hor9p</div><div class='del'>-R$j.jL:kmmpX9'JpY39ST:_@%Np#6u$MWDlWLorNKS\[fk5Q1nimu&amp;PTTkChKS&gt;2&gt;Od;B(T;/.&amp;</div><div class='del'>-r94.io[1OUS&lt;f1eIXHKcG2iK##6"&amp;QgW-\oW;hA~&gt;</div><div class='del'>-o`#*_Y**4%ipm$Orp7u)p$;5no'G5SYcFP#`80S&lt;da$mpg!]Zqs8DcYY`!(2BkCmdRIp@U%J7;r</div><div class='del'>-C2Rg"@9\fPp%n[9rsAYqkKfKE@U+lYh&gt;[f[o]t&amp;"L1=JFlK8*_qpN'DH"C;]&lt;*!I??&lt;^cDA7fIh</div><div class='del'>-AT[29lMhb#f;aXCARA&gt;&lt;Dg6PQL$&amp;F8rp%YE[[qAdm&amp;9r7~&gt;</div><div class='del'>-o`#*_Y**4&amp;ipm$Orp7_N`p:Jb^q6hCN/3h#`80S%YKl1M]Wh22s8DcYY`!(3BkCmdRIp@U%J7;r</div><div class='del'>-C2Rg"@9eoRp%n[9rsAYqkKfNF@U+lYh&gt;[f[o]t&amp;#L1=JFlK8*_qpW-EH"C;]&lt;**RB?X-rFA7fIh</div><div class='del'>-AT[29lMh1hf;aXCARA&gt;&lt;DuP"jL?AO9rp%YE[[qAem&amp;9r7~&gt;</div><div class='del'>-o`#*__mY_]ipm$Orp619+6j@9%3&gt;la$;[D7h&lt;&amp;&amp;XcK!"r-M[W@rV&gt;`pZBLK&gt;R$E]4o_SRso[(%8</div><div class='del'>-R%0S,JXtfnqYnqC$2sJYcaTp&lt;K:M;arsAYrld`SMP_,=gk5Q7phU/s3R#QQ;FaJO^I"dTHR$jJ2</div><div class='del'>-Rd9t&lt;rsAY\`iu#$O*Z#%reLuJk5YJ\mb?C&gt;^7Lk]W;hA~&gt;</div><div class='del'>-o`#*ZUkW8cipcsMp"fB8mIV+`m,#gfX.uc7h=(70ftQD&gt;j2T+,rVm5nY_6SBEG/onK^em=$iSSQ</div><div class='del'>-AoDX/BO&gt;#Io$.1&gt;roKu.@9o]!gA_B@WJ4hdV"!RI)#`C(R!*(K;HJLGZF-p8L1t./AnPUc]DUso</div><div class='del'>-)&gt;M+?H=pbn?DG-N`Pp?ss8VuHXd"9O@X..9s*t~&gt;</div><div class='del'>-o`#*ZV1rAeipcsMp"%[8mD9RQ]&lt;IodLmP-[h=(70^o$&amp;bj1r.lrVm5nZ%Q\DEG/onK^em=$iSSQ</div><div class='del'>-AoDX/BO&gt;&amp;Jo$.1&gt;roKu.@:#c"gA_B@WeOqfV"!RI)#`C)R!*(K;HJLGZF-p8LM:70AnPUd]_q'p</div><div class='del'>-)&gt;M+@H=pbn?DG-N`Pp?ss8VuHXd"9O@X74:s*t~&gt;</div><div class='del'>-o`#*Z_lo/TipcsMorV=Eljj%)&amp;ISpQ:SPe`n,)Q69AoU*Sm:^^rsJ57Xc8[=R[9,,nGE4nrS5&gt;X</div><div class='del'>-Od;]1Ne"S/c2S%Jjhn-]K!+Xtrs%],YE=C=nE9fgrT2G=UmR0gG)iE)[BQToO-H$"R?WcQr9F;"</div><div class='del'>-ps6[OR?rbYV7X[b`ROGXs81Tm\#Gs[PNf%GJ,~&gt;</div><div class='del'>-o`#*USpk'WipcsMo^2GHmdq7aj3"U,UTDDin,*+anBoYPs7bI*nbrIpl)/&lt;.WHrAm@s759rsSJ2</div><div class='del'>-I:ACfH"^Ghc1oQ`#Q&lt;/JHsU*ip"TKOrR.Hg?!Y;?kPlCl^8$'h@ola#aP&gt;qAk2+1GFD,9!@UY`"</div><div class='del'>-lMhao^RTFYA7Bc1lgXH7o_\[gps#U\B4YY(l)=W4~&gt;</div><div class='del'>-o`#*UT710YipcsMo\e&lt;Am_T^R[@rP8Q`A![n,*+anBoYPs7bI*nbrIpl)8B/WI&amp;Gn@s@;:rsSJ2</div><div class='del'>-I:JIhH"^Ghc1oQ`#Q&lt;/JHsU-jp"TKOrR7Qi?!Y&gt;@kPlCl^8$'h@ola$aP&gt;qAk2+1HF_GB"@UYc#</div><div class='del'>-lMhao^moOZA7Bf2lgXH7o_\[gps#U\B4YY)l)=W4~&gt;</div><div class='del'>-o`#*U^T!9KipcsMoS[$&amp;m1'g&gt;$OR5:U;YmVqu6WbdF%F_pYacqrVm5h`LVjeVOa*;PjJ;I$hVcD</div><div class='del'>-Ln(08RYu[Aps&amp;gDrS#,eNe"q&lt;g]%NWg;9eIJ&amp;_3FrttFU_PirgJp*g.gudh_hT2LdS!f\/M6-I:</div><div class='del'>-ru(IQ]q_!^O-@uWnF?&amp;@qu?]ke&amp;%uMR$+!(W;hA~&gt;</div><div class='del'>-o`#-TSpXpVgA^[C"T@]_p\""I$M!,kX.uc7h=(7?rr39#nF?DUrqQ0`rr3B*gRr(l_2W\Q@;"d$</div><div class='del'>-rs\kUW+'bVOa^kHB&amp;&lt;L2rs/AEVfl9Mg%sJ'#Pc0+F'E),qrn%trnXZ6D.[6aLXGVgrr&lt;#sm`B`\</div><div class='del'>-&gt;$&gt;!/P4JSO$NB_ai7ci8j6?C=rVn,AnE]E#]pj(TASZtFkNV-or9Wb8k/F0@AnGb*cfjZYk3)`H</div><div class='del'>-s*t~&gt;</div><div class='del'>-o`#-TT6t$XgA^[C"T@N&gt;dDbRk$Ga!9LmP-[h=(7?rr39#nF?DUrqQ0`rr3B*gS&amp;.n_2`bR@;+j%</div><div class='del'>-rs\kUW+'eWP($tIBAWU3rs/AEVfl9Ng%sJ'#Pc0,F'E,-qrn%trnX]7D.[6bLXGVgrr&lt;#sm`Bc]</div><div class='del'>-&gt;$&gt;!/P4JSO$NB_ai7cl:j6?C=rVn,AnE]E#]ps.UASd(HkN_3pr9`h9k/F3AAnGb*cfjZZk3)`H</div><div class='del'>-s*t~&gt;</div><div class='del'>-o`#-T^Sd0Lh#?mE"T?Pj8f@%,#n77L:SPe`n,*+`rs8Jjnb`@cq"=O`rsSh_^m'YkXJMAJMs($&lt;%</div><div class='del'>-/o#$Nf(?RWL/KohYk_!#PlogUksTSqV2#Tps-RHLk+4Vkl2P"ilJBrR?NDkdI@&amp;4s8W&amp;caeauPL</div><div class='del'>-OslIo)8RqrqGmFjQ#7bn,!%^s!.O8nF5Vd]qLj]S#+d)n*KQAnaQ&amp;6d_hlKR@9u)mdKW2mf'BhJ</div><div class='del'>-,~&gt;</div><div class='del'>-p&amp;&gt;9rfUI1qAAA*6rr_uaq"=(I#jTO4W5RN\qu6*b%/\5;@X67aIVN;&amp;b5VD?%K&gt;h.I9iVgS:&gt;$Q</div><div class='del'>-E97)srseu&amp;j4W#8g[4q*f#-ePrVm?+nD;IBrVulhiRu`LrqQL&amp;rp\gma3WGQSnqYIiVrfU$iTGD</div><div class='del'>-a6`g)o\S-WrVQU'rTr7if@K0ao\.C&gt;rVlg-o=(-$&gt;B&amp;X%s8W)nimu]Zq&gt;V-,le:"AlMgh`q8/\K</div><div class='del'>-BP(dkW9sT^rr`5OC0CL:32Q3Grq"sk`4`U`XfSb5[(FcZrr;`7_S!FWKl(F7COr.a[$dWS`50!q</div><div class='del'>-Y)I=3B52a`ZFI90PP;6[J,~&gt;</div><div class='del'>-p&amp;&gt;9rfUI1qA\\37rri&amp;Tfuh5$_?d`GLo&amp;&amp;Gn,*+Rrs\eJS76chQ@&lt;RWB$1,Prsetr]7!t[aII`i</div><div class='del'>-&gt;B/d(r;R6*puL,ZfA#]jm+92@rr)j+rp\difDYaKo\nKRn,E+^%K&gt;kSdE'\f^7T4HCZ59krsSel</div><div class='del'>-f&gt;m7Wrq,'tir/cS!r_K&gt;rmqA&lt;rUegbg&amp;:pM&amp;+d8uBNoH9rr&lt;#tpu9oVrV?I,rTi4kf'&lt;87s7sR(</div><div class='del'>-H&gt;$o$D5ck$r;Qltf5"Rg=?*/Js8MWGcG[H+YcY"3['dNop&amp;&gt;!cb/:m&amp;VhJu"B5&lt;*mZa?0pm)?fO</div><div class='del'>-]!%'3AnPk)S[,f5R[!QLs*t~&gt;</div><div class='del'>-p&amp;&gt;9rgq9PJM9,Ydrri%ZC+^+e%L&lt;LO$BrEan,*+Rrs\eS]T/*!ZDj@WMUDG&amp;rsetsc_uAqb.Xg&gt;</div><div class='del'>-KSegir;R6*q&lt;I#!ioT_.nD`!err)j+rq#=.ir/oVp?CVroD\Ob%K&gt;t_hUpZCcbH$,L#N%0rsSeq</div><div class='del'>-in3f#rq&gt;O6lM^V[!r_WLro+.MrV#=)jSf)X&amp;+dlSRtQUXrr&lt;#tq&lt;Hu!rV?I,rUAn.iU?dGs7t$U</div><div class='del'>-Vja$?QaH/Zr;QltfoULXFuZ\rs8M]Rh:U3%b/hWGc-=Vmp\t3eg"4[!`N&gt;`"R@UCobg!f8m+Bn9</div><div class='del'>-dE/\dR@0SC^&lt;FsK]X.@8s*t~&gt;</div><div class='del'>-p&amp;&gt;9qe&lt;bGiA\.^/rri;fq=jRMoEO?eX3pA4rpKdpp:Z]!N7jqXD.7%`qYpL'qp)$GD:$7nHsp9;</div><div class='del'>-li$i-rqG-bVh9;XWO9ORQuhZnrpJ^ob/:HB[J'1A`k&amp;CNP0Nt&amp;ruh:,e%:laFG6?XK4J52kPk5&lt;</div><div class='del'>-g!RmUUOqY(gr[+(Ls#\qrsnq`b-[7VNMEen_5D=oqYpL+m]_pd&gt;`%bGs8D-*^8cn'rVca4rqG*\</div><div class='del'>-UR%RPTs=LpoX0j'AnG[iJ'@WcrVlruke@"p3O[W8qqfH+UlpI\G'/(ZK85MVUXoD3Z^lo'H#IA.</div><div class='del'>-B52C3Jph&lt;eeu=peJpMEMAnPdpG_(KqBRfHQs*t~&gt;</div><div class='del'>-p&amp;&gt;9qeX1VkB"Rm1rri;ahU9C2_?RE4UXAN,rpKdpp:Z]!N7jqXD.7(aqYpL'qp)$GD:$7oHsp9;</div><div class='del'>-li$i-rqG-bVh9&gt;YWO9RTQuq`orpJ^ob/:HB[J'1Aa1ALOPKj('ruh:,e@_)dFbQHYK4J53kPk5&lt;</div><div class='del'>-g!RmVUP%_)grd1)M9Gksrsnqab-[7VNMEen_5D@qqYpL+m]i!e&gt;`%bGs8D-*^T*"(rVca4rqG*\</div><div class='del'>-Um@[QU9XUqoX0j'AnG[iJ'@WcrVlruke@"p3O[W8qqfK,UlpI\G'/(ZK85MWUt5M4[%3#(H#IA.</div><div class='del'>-B52C3Jph&lt;feuG!fJpMEMAnPdpG_(KqBRfHQs*t~&gt;</div><div class='del'>-p&amp;&gt;9qft+#DNPkS`rri;GI7tRI%L*@LG1#aTrpKdpp&lt;0q%SCt?PSs,,KqYpL'qq8lGL!\,[W02b$</div><div class='del'>-li$i-rqPR,`2olF`Qm#^\sr*crpo:3gXjTRanGAcg!Rs[\(^fXruh:0i6o0.Trl)DXHnR#kPk;D</div><div class='del'>-j58S@_Q2qsjkJ/#Yh8pRrsnqigWd+&amp;Zbjr8e\n',qYpL+m_u]%Jskp(s8D&lt;?eAeW;rVca,rqPO'</div><div class='del'>-_R[J$_9)TSoYn85rg&lt;nYWS.(GrVlruke@"p3O[W8qrZY\_R?YIUnaccXKT%E_;Y@\aM+mZV4X3E</div><div class='del'>-R@BhGX/VG]f#G5%X/DV[R@0P9V5p_tQ^[?Fs*t~&gt;</div><div class='del'>-p&amp;&gt;9qh3`IuAXiDbrr_rbq"=%H"QI&amp;9o)A"U*:U4g@'&amp;CoM/d$8Re?^\rp@4;=eXcaRs8=HV""B`</div><div class='del'>-,Q6oOY@q-TL6-A%LjW]Uk5P%GR[TP$I!M[1Y`jQ^I!fUSo_e_Fqq]5`?s\8GL2:U?@9ecXrRd?u</div><div class='del'>-QBI#DJ()9=P_4-kL%YKFp!UC%?&lt;qlDE-@"k@q49irr3PoWJFtfV""E_i5)4IFCTpprr4)=jN*g$</div><div class='del'>-D1d%QHuQ7cnZ7LaAnG^mH'tnN`mNB$me,iCi[s?cpsm0RKlLX0=^#'8?=RSaG_1XmkFcNo?"%;V</div><div class='del'>-An&gt;FX&gt;?Y-1Gg1_G&gt;$PKHralFG?X-c&lt;=BBS.Y5a"~&gt;</div><div class='del'>-p&amp;&gt;9qh3iP!AXrJcrri#Ufuh5#_?@3&gt;b4&gt;PuruCO6LL@4DZANX3A"3/ks8MDqFBYBr\XRhO?DR)i</div><div class='del'>-s!.L-bcb\bCPIpiI#*/[G38esTUVC9N-orM`j(_WH$k!QI.[@:1]-"IT3tuSP_O!hCLLJ,m/&gt;S$</div><div class='del'>-PEqAeEe)WUY`sc`AqfpXrq4^MJR2W/QuR;)L1=cKqYpL+l)KPJ?)6uirSYPgMf`H\o`"k4rT)%i</div><div class='del'>-AT!0GEdVi/qsgbCDe&lt;TpCjDGQ^W+[PkjJ-.rSfElo_?tPTnRJs?&lt;LH:&gt;[CoPD0UYebNGR5&gt;[:cL</div><div class='del'>-AnGU`?&lt;^T8=*`&amp;@?s6fDAH$0H@p`JE&gt;$+jJl)t&amp;:~&gt;</div><div class='del'>-p&amp;&gt;9qh7BGJO0/-Irri"VC+^+d%Km4Eb4&gt;PuruCOJYD'@D^TaArN32dQs8MH3UO9'!ah4I3K!+VB</div><div class='del'>-s!.L1grc+;Js;grVm*+\O66H7^q@=jZ`'b5eB&gt;&gt;$V5L5[Sb2j[1]-:d^Q&lt;o(S=,b7SW\Vqm/&gt;nQ</div><div class='del'>-\%/rNTr-Gkb.+RLPbIdMrq&gt;6rX,)+]TUDUZYEajsqYpL+l,KrjJZeMBrTDbLZ(mDOo`"k4rT`+M</div><div class='del'>-OGT3hTr=U#qshD(T:)+9SYj!@e(&lt;I8mIKr7rSfj#o_@Cq_6'AqNJ3%&gt;LlR^eSu&amp;Kjg#oo6Mi&lt;gc</div><div class='del'>-R@0G,NerOFIZr$VOGJgWQC+)-Q&amp;gfYLP:29l)t&amp;:~&gt;</div><div class='del'>-p&amp;&gt;9ri0S\"A;0RGrri;fq=jRLoE4*fhYld?6gCXi@*J&amp;VNH8W?MXg`Hqok^&gt;C=;@PQZHJ=](Q+'</div><div class='del'>-rp%Lt?rMQ_`P77JBOP/&amp;l2U+CMfW]JAS$."@r6'lA7f4[l2CX3qprKA=]_$-c+SaGB4,#@nb_+7</div><div class='del'>-M/R3CCN#8KEbJrj&gt;'B93oZXOW&lt;,AJK_jGIX@p&lt;^+rVuosf;*h$?,H=6hQhEB?sHc`mJm4bi5(4Q</div><div class='del'>-EjE?WHZ!A@o('&amp;0AS#IdBP_jEO-ucBZ*q3U`p!F%s81?YR&lt;W=O&lt;Duq-Am\kN&amp;Rf6aDJsd;KO7ef</div><div class='del'>-@q'%^@p2q3&lt;t'#lAm/8?A79%]AR/=6&lt;rm7(Y5a"~&gt;</div><div class='del'>-p&amp;&gt;9ri0\b#A;9XHrri;`hU0=0_?70AhYld?6gCXi@*J&amp;VNcS`AMt-iIqok^&gt;CXVIQQucS?](Q+'</div><div class='del'>-rp%Lt?rVZa`P77JBOP/&amp;l2U+CN,rfKAS$."A8Z6nA7f4\l2CX3qprKA=]_$-c+SdHB4,&amp;Anb_+7</div><div class='del'>-MK!BECN,AMEbJrj&gt;'K?4oZaUX&lt;,AJK_jPRZ@p&lt;a,rVuosf;3n%?GcF7hm.NC?sHfbmJm4bi5(4R</div><div class='del'>-F0`HXHu&lt;JBo(')2AS#IdBP_jEO-ucBZ*q3U`p!F%s81BZR&lt;W=O&lt;Dut/B4,%P&amp;Rf6aDJsg&lt;Kj\"j</div><div class='del'>-@q'%^@p2q3=:B/nB3SJCART.^AR/=6=93C*Y5a"~&gt;</div><div class='del'>-p&amp;&gt;9ri4&gt;bPOe;19rri;8HV,1C%Kd.DhYld?6gDU_K$Nf-Z_&lt;_HU%/0_qq&amp;W&gt;K$ro&amp;\tP+6_"Ia-</div><div class='del'>-rpACTOEHPj`P8(;RZ`8jl2U+TT9u1=Q^+/*LkgkKQ'm\hl2CX$qr-#2L3B3*c+Td@R?3$'nb_4I</div><div class='del'>-SX,h7S=?^MQBIJoJro?up"[`^H\&amp;04_kiuoQ%k"NrVuosh8?4OJB%&lt;]jijTgOG\IOmJm4bkLHeg</div><div class='del'>-KsJ@mVk0*@o('PkR$a;0R[p7U[(F2obKeJ^fC&amp;Y&lt;ruh3rdCZ6COFVLsH[U3kM34-nStDk)UOdT&gt;</div><div class='del'>-N0K]tQ%s\aFps/NMgBPoMisHqQ]-:hFodB_Y5a"~&gt;</div><div class='del'>-o`#-UP]^SJEpNAts7??ep$D;Pj2'a@s$ZkAU1IrnpXt[MAn6;Vs8MDpDHa4-l`?4a&gt;@#qYs8MT-</div><div class='del'>-Uh!JR`T-LO]o6r=&gt;bplho%(RBIqiCm&lt;HOn&gt;XaY%t?!u^ls"s]2]Tc]&amp;S^Zrtj/n,S?&lt;t/8rU&amp;.L</div><div class='del'>-P(%.V@TRN?IUlARM&lt;ju\Z$BA\]%ZT=bE7$Y?%_A?s!RZ_T6+:JgA'O+AS-3k;,aC]s8ColO^)V7</div><div class='del'>-i9Sg_H!=\@pX=Lu@:]@L6"akGDfpAVKo(nYS%ALrl+*7-B44b;GbVLOYFBWC@qB:fBnaC,WMYDh</div><div class='del'>-BP(^[H)@R?YKGP5WMueYFD&gt;Du?YQ&gt;8W&lt;09Gn#l\@~&gt;</div><div class='del'>-o`#-UP]^SJF6iJu"SCd-ai!M_!jnlbli0BPgnSFnhY5]cF(Ss2mJm1Q[r,BQl0GF5CKk,uqZ$Qc</div><div class='del'>-`2$pDIDt7:kIupq?sTSts74aUQ[`aY&lt;`X@9ZE8UlAmJj*rr4hRhS#.Z=.Rh,o]**2D-gP[p&amp;4:.</div><div class='del'>-^6="\A7AY\T7:BM:l=T7bcuFoA\-U`m)tQ:@U4WMrr4AB`h.?WA_Qq9XCZ!i&gt;#A4rn,N@F^l_l9</div><div class='del'>-^&gt;S&gt;*T6XXLl1`YT@:&lt;^GAjL'CC2\6@J;&amp;iAR%1bbropt^G\:Ga;L,"B[BH'B@Uit^C2&amp;C&lt;YGnCS</div><div class='del'>-E+iim??rEIWNXIt^T"31P'(MOA7')Iri#t&amp;b3uM5J,~&gt;</div><div class='del'>-o`#-U[\T=SPO%l@"S@FZ.M;%X!Y#=mli0BPhnbV3hY5^3U6q+2mJm1Rc(B?gl0H9rSV_jLqZ$Qd</div><div class='del'>-f&gt;Eo"N5aiIkJ4BrO+FJ's74aUW2c&gt;LJ9QgEZE9[fR#H[Xrr4hRjO:SrG,*OQo]*EbSrJ99p&amp;4:.</div><div class='del'>-^8S$$QAg6HTotC_ELH.gg&lt;6=BICe/#m)uW0PD,:crr4DCdD)H4L"c=`a-)"2J9&gt;q:n,N@Le[C3_</div><div class='del'>-^&gt;S&gt;*];CF;l1`YtO-,crrg?$?S=cRSWi`M5]"H&gt;crp.qDV4!KrEJUEr[BH3^Ng,p!S!g%fYGnCg</div><div class='del'>-T:;74KnuV*WNXIt^T"31S&gt;)L@QAU6hri#t&amp;b3uM5J,~&gt;</div><div class='del'>-o`#0XQ?d.RC=`CXrr`5dq=a^X#P.6Ah:prSnbMeYji6&lt;Gs*X^eS76L"rSWl_B4,B:s81'6??Olp</div><div class='del'>-kbj/H&gt;\i&lt;ts8'mAH&lt;=RmlhpeYbaWf_?,?77r:T0RP&amp;"9(NPF*,fq*h.&gt;@QXms8MN%Tk.;IdI[A;</div><div class='del'>-oXpN1&gt;@#qYrqlBKViGOu&lt;-5k$Z=$^Xbja&gt;pN*KGaiVEKOiLka1&gt;F"XUs"!`PRr)P[i7t\PD5jp_</div><div class='del'>-B:%6Erp[^p@9KJfqu,0MEE[;BrTCV-?&lt;UZD@qGOL3bN,AF*`26p!9XhC1LLJLVhd-kiC=+Iq`J+</div><div class='del'>-BObeoj5S[aL2U[5?]*IpioKLtl/L^YZ\rm:A7'B*ro+"?mJ=!cJ,~&gt;</div><div class='del'>-o`#0XQ?d.RC=`CXrri;^h9a+&lt;_?[lg['-X=]"n-Y!k,,gli2A0bFN*_jo+,%G%Y2rl2UY*TO2lo</div><div class='del'>-punZ2AR'$0rr;i&lt;YBj;Z_s@7#q95@Q?=(MBs8;QOY**R)=H1)Ijk68YAm8d*s8W)f^7f+?Fj]g[</div><div class='del'>-s7EsjEEcc&amp;qYpBbj/@uR&gt;uc!\d'@(]H-Gd3[u=QoWo&lt;dQrSaH$@9f)crr4M@\XRGDI,NeeB5X`W</div><div class='del'>-EbLilp\sZtSmbg"j88f-YAm`bjo+ANE*c^S@:NmGAiaR&lt;CNFfKX7af&gt;JSJ_!&lt;JSHFk31mW\pnF*</div><div class='del'>-AnY[i_W0Y-Tn[Jt@UG#Eio9%do',/nh6`,^An57idf/5-jR)fHs*t~&gt;</div><div class='del'>-o`#0XZDF%TOkTg.rri;6GXNAF%fQn=$k3[@%K[(Cip6Vlqp`&lt;?MWOfp[%s+OMs:9=fYE&lt;!fD+RK</div><div class='del'>-YEt#uiVrlRfZL+DHc,1Is7t*VUlBoEpAb'`jhS?rLj56#fB(\kXI4lrj8]/Yo$Y@AI&gt;H;Brr;W3</div><div class='del'>-\Y+e/g%t^Fp#EcnSVqcK^&lt;j&lt;AFc+E4iQnfeGcp$$rr(fjX-/%/mf*5;oZ=b;N0iJ`c'&lt;p^[&gt;9=)</div><div class='del'>-fD#:7e\@5mXQ03Vh8u@BLZSKt\W)?!NKKHlR/&lt;:3R[p1NVo/2[a/b\qLj#!!g?.V[f".&lt;;R$jD.</div><div class='del'>-P0)bDf&lt;h]QR?NDqfAbfNmIKN$in_;RTp_4(MphUa!p&amp;bFY5a"~&gt;</div><div class='del'>-o`#0\SpbBcC8q('s8V]lq"=XY%.`iKfuLG"XLZ^&gt;n+6GK"6[b[rp9Y=p:Z`"MX1&lt;)Q?m4QA^gVB</div><div class='del'>-[r,BTm/&gt;M0IUZQ1kl:YD[?G'&amp;OQ-0;s7sX)F';l'qu6UAn$/*h&gt;B%aLq&gt;TigP@e$&lt;jo&gt;AXd]\:.</div><div class='del'>-=gIAms8V`'Rr2JHiVriV+7#tfA63'HjRh6#W5n/m\tE_&gt;E7O^_s8LoOJ6uQaoD\bEn#qskCQ?fU</div><div class='del'>-NHDegi5i[anbr@/Y'aSseG&amp;t.`0FV+L["j6hQqZ;=^"s4&gt;$P?@@V#IM-&gt;.(*HI]WtFCnucBufQ:</div><div class='del'>-rr;umj0s&gt;IAnPXcTDANWY`Ed9@UPDiq&gt;U`q`g(a[A70WGW;hA~&gt;</div><div class='del'>-o`#0\T7(KdC9%.(rr_oSfZF-0%)KWdXe(W3Q'8&amp;Q^;9]`"1Y&amp;Urp9Y=p:Z`"MX1&lt;)Q[3=RB%-_C</div><div class='del'>-\8GNVm/&gt;M1IUZT3kl:YD[?G'&amp;OQ-0;s7sX)F';o(qu6UAn$/*h&gt;B%aLq&gt;TigP@e$=jo&gt;AXe$"C/</div><div class='del'>-=gIAms8V`'Rr2JHiVriV+7#tfA63*IjRh6$W5n/m\tE_&gt;E7O^_s8LoPJ6uQaoD\bEn$&amp;$lCQHlV</div><div class='del'>-NHMkhi5i[anbr@0Y'aSteG&amp;t.`0FV+M!=s7hQqZ&lt;=^"s4&gt;$P?@@V#IM-&gt;.(*He#`uFCnucC&lt;,Z;</div><div class='del'>-rr;umj0sAJAnPXcT_\WXY`Ed9@UPDiq&gt;U`q`g1g\A70ZHW;hA~&gt;</div><div class='del'>-o`#0\[&amp;KU_Q+HhcrrhtK@jhld%L&lt;LP$OR1D$4IC&gt;%Kd.J\,Pao0_W]"MONl2k-LqSP)Iuklcu,M</div><div class='del'>-[d&lt;tJ_5WZQP3DrFkg$Z$I@K6ns8VoA^7pF4gACmL-1Aj`R"U19l1t&gt;I_7,hcM&lt;4d;qqK5oML)_s</div><div class='del'>-rr&lt;#jah44$L#N%1ru^RG[$H5f\`ED&lt;WN+#'n^"t&gt;JVDYKs8W)W_Q&amp;ZH[e'Lu1@N2lSX6&gt;,e$G.J</div><div class='del'>-h;HAhf(&amp;_9fZC(LMq%M#maeq,FI27lptiE&gt;I=$HqL51YFO-&gt;otrg&gt;(&amp;RAS]_]q_!ZJq:u.qu6Wp</div><div class='del'>-puAo]R@'D.NjAK\n\MT+R?WN'nbN1jps-FGR?ieol)=W4~&gt;</div><div class='del'>-o`#0bY^gP%AUF"BrtYM!q=aIQn`o#X]W8'.Uo1&amp;mdH'cfr:C*SaOC%Qs!@0?Lg[%Js6HG3Cgq%n</div><div class='del'>-ouW_1FkQTeb+Eug&gt;E%qKqSoF\&gt;[52&lt;rr35r]:3S@DrUcqru1.$M.9eIk5G&gt;[n#qsd&gt;`%bGs7Edj</div><div class='del'>-C0PN+q&gt;UBun?A-h&gt;^,B1ruh="Vh8A[No'X3o&amp;/HpqV830@9]8err&lt;#sd%GYh?IeiMs$GtLMJI3l</div><div class='del'>-WL\$Lh"gg9me6VZn[4^#D4p%Yf"HrE;.[o@s8McQa0:YNB4=qD&lt;`r[6@:a%_B4Z"YTnR;p@9eiS</div><div class='del'>-rVZ[/q:UdLB4b[`MXpf;Y`Ed9@UPDiq&gt;U`q`g(a[A70WGW;hA~&gt;</div><div class='del'>-o`#0bY^pV&amp;AUO(CrtYLoh9a*W^Ug\GQ&amp;(ZkTr4WYVR=.Sr5&amp;QGT?[9"s!@0?Lgd+Ks6HG3Cgq(o</div><div class='del'>-ouWb3G1l]fb+O&amp;h&gt;E/"LqT#L]&gt;[52&lt;rr35r]:3S@E8plrru1.%M.9eIk5G&gt;[n$&amp;$e&gt;`%bGs7Egk</div><div class='del'>-C0PQ,q&gt;UBun?A-h&gt;^5H2ruh="W.SJ\O5Ba4o&amp;/HpqV861@9f&gt;frr&lt;#sd%P_i?e+rNs$GtLMJI3l</div><div class='del'>-WL\$Lh"gg9me6VZn[=d$D4p%Yf"HrE;.[o@s8McQa0:\OB4G%F='8d7@:a%_B4Z"YTnR;p@9noT</div><div class='del'>-rVZ[/q:UdLB4b[aMt6o&lt;Y`Ed9@UPDiq&gt;U`q`g1g\A70ZHW;hA~&gt;</div><div class='del'>-o`#0b]W7TkQC[U@rtG@EGXN&gt;X%LijU$ORA5O/J%.$k&lt;%C!t&gt;X6qs=&gt;/nA_\eY42JW[]&gt;s`O3@4I</div><div class='del'>-]n_Htq&gt;/RTVNHG#m/Qq2`2AK?`Uj*/#PH6PSV;mZrr2p9l,KrlJskd"s8VQ,\&lt;_`7lMpnVbe9O"</div><div class='del'>-K\-&amp;!rs%u3\=&amp;&amp;2kPkK(ro:quO+!JRqYp'Di:$O$aKUeVVX"0\s8CQbV2BfRq#::Ll,9itTWQ2I</div><div class='del'>-TTe1,qXEqHrVuE4\t5=nk4.H[Z&amp;!FLb4&gt;T3pZ';uR#$3&lt;G'/"VK8PhYrg=.\T"De@SXGUlSE9_I</div><div class='del'>-rtG4]XJ2,NQB%[0s7*q4Tp_.$V"+9\#l)]UUm[O-Om/hEJ,~&gt;</div><div class='del'>-o`#3jbCF&gt;&gt;ASnsUq#CBd'DV7gjOV8SX/2Yr_q3baZ*MsCnGMn\kK)$Fm/JBsWH)@^pAaWdLi?m?</div><div class='del'>-V;AUk=gIDnot?l=?X0]'s7*C\C0YK.qu6U"n?A-g&gt;_D;?rs/PTUjlcWV"+Ha&amp;F-&lt;R@9]Mrs8M,[</div><div class='del'>-M.9eHkl1S]#4&amp;4H@pFuZrr3`3dA)"m&gt;f6.3s8DinrqXF(H&lt;spup&amp;=t,pq`M@&gt;@ugls8W)RV1E2e</div><div class='del'>-Dfg)5C;'TDs!%ElW.SVlHC1@VA6;lY^#f.ks8Mocj4)&amp;ZZE0a]K6:j;@fBsHA8HgPF(f/o@'0"s</div><div class='del'>-rtGCrV1reuA70`Ns7*=SEFrZfPO\JK#l)E)G@kAnGNl(+J,~&gt;</div><div class='del'>-o`#3jbCOD?AT#$Vq#;*$jOhPe[Ao^TLm4C4_q3baZ)=V2^\kqN\=^n&lt;m/JBsWH)@_pAaWdLi?m@</div><div class='del'>-V;AUk=gIDnot?l=?X9c(s7*F]C0YN/qu6U"n?A-g&gt;_MA@rs/PTV12lYV"+Ha&amp;F-?S@9fVts8M,\</div><div class='del'>-M.9eHkl1S]#4&amp;7I@pFuZrr3`3dA2(n&gt;f6.3s8DinrqXF(H&lt;st!p&amp;=t,pq`PA&gt;A)mms8W)RVL`;f</div><div class='del'>-Dfg)5CVKcFs!%EmWIn_mHC:IYAQW#[^#f.ks8Mocj4)&amp;ZZE0a]KQV!=@fBsHA8HjQF(f/o@BK+t</div><div class='del'>-rtGCrV1reuA70cOs7*=SEFrZfPO\JK#l)E*G@kAnGj21,J,~&gt;</div><div class='del'>-o`#3jcDmA%R$u+pq#;'#L1;M&gt;%1EUO$8Q4s_q3bg[V$!Xq[N];$_d@^s!?sKU4UDYs7!b+T9bhU</div><div class='del'>-iQdg:[d="dbIs^4J@+nIn]AA4LP4I[rr32l`OM7fQ0J;J#QEPsWfVe7nc&amp;P"lGg)kJ?JDAro_;*</div><div class='del'>-P_,:drr2p%lbg&amp;oK:M&lt;-rtYLb_PW3&lt;`Ua$.rVQQmq9ZpSNI].Drr3c/cG#s,KAc_.s8LonX-f*A</div><div class='del'>-U8+-@b5M8&lt;0`BeGXI#0H]&gt;1J/H?G(Xjno)Xrql6GeA]#)XJ;/DLPLnSR$jA-RA@$\R[K:l[IX4p</div><div class='del'>-'E77+Y+:uHN0N`0n\MT+R?WN'nbN1jps-FGR?ieol)=W4~&gt;</div><div class='del'>-o`#6qhi2JbBP;n\rqcX2rTs@QiQJ^2WMHN)cJe6bqt/mh\(g-:rU^3Ub0]qNs!Ia#U1@`equ?&lt;%</div><div class='del'>-MfWKKPI?KVHeJ5pn?A-r?!bbLs66G:A6jWHrr2p%l`,nQ?(CB_ru1aRT6O[J_=mp/rn!uq?!YVI</div><div class='del'>-s8C?&gt;I:6K`nbrIlk,*c&gt;?)7#irs/;5So@qLh#%!K#P"s\DHgE%r;Q^#o!Oiu&gt;B]0.rs\eJTm:$G</div><div class='del'>-@q]FcB8?0Xs"O5]RWMk;&gt;[1HHEJ1:2jQkXVf\"]ol1a`6kMtCKbe^K:DeN`p@V0q-C1_'eA@D7/</div><div class='del'>-rt=e+P]:;G?Ztc8nZ\'oAn#/3nbN1jpr8SCAn5:nl)=W4~&gt;</div><div class='del'>-o`#6qhi;SdBP;n\rqcX2rT2eVZ_ES&lt;PaA5XcJe6bqt/mhXKK+KrPAZITum)ss!Ia#UL[lgqu?&lt;&amp;</div><div class='del'>-N,rTLPdc]YI+e&gt;qn?A-r?!khMs66J;A6s`Jrr2p%l`,nQ?(CB_ru1aRT6O[K_Y4$0rn+)s?!b\J</div><div class='del'>-s8C?&gt;I:6NanbrIlk,3i??DR,jrs/;5So@qMh#%!K#P"s\DHgH&amp;r;Q^#o!Oiu&gt;Bf6/rs\eJU3U-H</div><div class='del'>-@qfLdB8?0Xs"O5]RWMk;?!UZLEJ1:2jQkXVg"Fosl1a`6kMtCKbe^K;DeN`p@V0q-C1_'eA[_@0</div><div class='del'>-rt=e,P]:;G?[(i9nZ\'oAn#/3nbN1jpr8VDAn5:ol)=W4~&gt;</div><div class='del'>-o`#6qhl337R[Kr&lt;rqcX1rOd/&amp;%1ERN(Jp@-cJe6cqt/mhBabIK%Kd.JT_RpS-N;o=Q%@Zds7F@;</div><div class='del'>-TpVIXag?_[g%k[;`jhY!JBmohl,BilL6Ca!rr32g_m&gt;PYW:0`c)Z%jrV2^#FpAb0lh8?4MJ'@Ze</div><div class='del'>-rRercObC(2rVm)a`3#/RY4;Mk#PZKWT883VqtpBun\qu/Lk"4Xrr32na1@^nNTU6?%/\PiV2p+[</div><div class='del'>-Ng,rtV=jcd0_il(UQ'_NI&lt;pEsOK-@^n)i]kj5ASXp[RS4j5&amp;80_69B$S!f\.OI;f4R@07s^A%L(</div><div class='del'>-'(&lt;]HTp_1&amp;OmE&amp;;_6fo(P_c.*q&gt;U`qcFKa=Q].'kW;hA~&gt;</div><div class='del'>-o`#6sm&amp;bA@AnZ4XqYL4/o^_[uY,e@pZGkP^oAlm+n,)qIb.c]qnc&amp;._lHdfNmJeL0bFE$\j8T)R</div><div class='del'>-d&gt;r?]DM3^N?+fV)s6HVBB3Sj$rVkNCIUccGm/I"iro']*?X'c,rr3o/\XRSB?/#2Us8'd/F'N&gt;5</div><div class='del'>-r;ZQ,R&lt;N(I[.aM!#Q&lt;)DHsU*ip&amp;=srn["Qp&gt;^,?0qu6oeV28knEo[/urs%npP@RmUli-nnp:Zu8</div><div class='del'>-&gt;$@)HDJ!EsdJj+E(\4npDI@4VWi`_GcJS-cftXqsXe:!`qu6U*rr)WambP(/EFrcg@#Aq&amp;AclRU</div><div class='del'>-U\FWb'(&lt;/mEFrZbHKtP#Y`Ed9@UPDiq&gt;U`q`g(a[AR]oKW;hA~&gt;</div><div class='del'>-o`#6sm&amp;bDAAnZ7YqYL4/o\[]`MhmXjZGkP^oAlp-n,)qIb-/"Z^])(P\u!F@mJeL0bFN*]j8T)R</div><div class='del'>-d?&amp;E^DM3aO?+fV)s6HYCB3Sm%rVkNDIUccHm/I"iro'`+?X0i-rr3o/\sm\C?J&gt;;Vs8'd/F'N&gt;5</div><div class='del'>-r;ZQ,R&lt;N(J[.aM!#Q&lt;)EHsU-jp&amp;=srn[+Wq&gt;^5E1qu6oeVMStoF6!9!rs%npP@RmUli-nnp:Zu8</div><div class='del'>-&gt;$@)HDJ!EtdJj+E(\4qqDI@7WWi`_GcJS-cftXqsXe:$aqu6U*rr)WambP+1EFrcg@#Aq&amp;AclRV</div><div class='del'>-U\FWb'(&lt;/mEFrZbHKtP#Y`Ed9@UPDiq&gt;U`q`g1g\AR]rLW;hA~&gt;</div><div class='del'>-o`#6sm'rdWR@Bk\qYL4.oOf9T$48nBZGkP^oBO;snb`.Kb#AfZr=/o=%$LAPs!@Ql]oS!0rr;cB</div><div class='del'>-[%`t\XKIS0^@)"#lbg&amp;sLk4C\rnbDhP_bsurr36&amp;j27pYJ%5.Mru1OP]V((0gACpMqU30RLP"@[</div><div class='del'>-s7jjNUlgAEpAY'srRnubNe"q&lt;rr35na1@[mNop?&lt;rs.l(Z'pW1j8T&amp;X#4BF=Q%&gt;Fjrr3H$bIsO&amp;</div><div class='del'>-H'jtfR?j2mrr)j5o#.u.N.\"-XgZ'khsgC!eBZ.V^S]QYrr3`4rV6$Qh7C%fR@&amp;tgR[ok6R?iuB</div><div class='del'>-p\On&amp;n&amp;Mu4R?N&gt;dlMpCj[%WnPLnsS:rs8DF\YPX[Ng&amp;_+s*t~&gt;</div><div class='del'>-oD]-ke:VIHBQ8U'qu$I:rTWITVkg?,e)^&amp;okeDar]C5b!rThG=gZ\2"o^'uIp$Mc*p:Z`#M&lt;b-@</div><div class='del'>-rS&lt;QWAnZ$h=G#B*s8V5ZK4J5,jSo&amp;"Q[*(NPOSSO#Q&lt;&amp;EH&lt;ab,q&gt;UC4n$&amp;$i?#\g&amp;s8V`&amp;S8)8O</div><div class='del'>-jo5;PZ]K6:A%;=5rs/A=T64CFg%t^J#4&amp;=M@pFuZqYpcaU5*JnGNf#*#3i+C@9ou)rr3GsYa/m*</div><div class='del'>-FiV=FB4bkDq#14/nZ\'nA9QD\jQZ+*qu6&lt;(TS@c=F)SS`q&gt;Ufm^R]IY@olp:Ir&gt;6t!b[5Xqu7?/</div><div class='del'>-k-U(`Amef#m/QU[O)\c@@$C-Vrs8D=Q$-bOA9[::s*t~&gt;</div><div class='del'>-oD]-ke:_OIBQA^*qu$I:rSk;MPaSMbe)^&amp;okeMjt]C5b!rThG+Y.;&lt;a_Rl\Wp$Mc*p:Z`#MX(6A</div><div class='del'>-rS&lt;TXAnZ$h=G#B*s8V5[K4J5,jSo&amp;"R!E1OPjn\P#Q&lt;&amp;FH&lt;ae-q&gt;UC4n$/*j?#em's8V`&amp;S8)8P</div><div class='del'>-jo5;PZ]K6:A%;=5rs/A&gt;T64CGg%t^J#4&amp;=M@pFuZqYpcaUPESoGj,,+#3i+C@:$&amp;*rr3GsZ'K!,</div><div class='del'>-G/qFHB4bnEq#14/nZ\'nA9QD\jQZ+*qu6&lt;(TS@c=F)\Yaq&gt;Ufm^R]IY@ols;J8Y?u!b[8Yqu7?/</div><div class='del'>-k-^.aAmef$m/QU[O)\c@@$C-Vrs8D&gt;Q$-bOA9d@;s*t~&gt;</div><div class='del'>-oD]-ke&gt;&amp;FuR\?e"qu$I3rNm"@+BkGPe)^&amp;omF&amp;)'_XIL(rThEe$k&lt;1G!t&gt;ZQp$Mc*p&lt;0t'Rd0qQ</div><div class='del'>-rS=fSR@Bb/I$*7]s8V6#Xd+TsjSo&amp;*\tt[NV==Ka#Q&lt;;kVM]lSq&gt;UC4n&amp;Dl+LPb$is8V`6]pj_8</div><div class='del'>-jo5;P`3c8%M88ocrs/AH^S?[:g%t^J#4'78Q%PUnqYpca]W[fdP3DlE#3j.3P(C"1rr3Gs`jqIi</div><div class='del'>-M9!H.R@0DFq#14/n\DN(Oc\#NjQZ+*qu6&lt;6^TXQ5Tps$rq&gt;Ufmcb?0BP_4CfTUu.N!g]SOqu7?/</div><div class='del'>-kKU&lt;'R?2ogm/QUl[%WnPLnsS:rs8DF\&gt;5O[PEtI3s*t~&gt;</div><div class='del'>-oD]3skbrH1ASZOGVsOE^ruh3s_Psrbh&lt;an5ikpgsNPF3?rr&lt;#qkeY$ekje&lt;3d)&gt;MBs!@0?M.*4L</div><div class='del'>-s8W)ZQ?m4V@TQdJnG`Idd\;/!&gt;_MAAq9"eAAS-kirr35u`hIN\CuG9krs%_dLh'b&gt;l2L\om]Vgb</div><div class='del'>-&gt;`7qJs73CMEFWXdp\t1)oYR8@?&gt;SU"s8W)WVh8D`V"+&lt;]#3hh8Cgq&gt;Hrr36&amp;goH!5?c2X;rsn@p</div><div class='del'>-N+6(Lk2;MDBOu/=rr2p%nZ@^h@Vk9*rri&gt;h\rUh0Acl_$li-e]')U1eNc&amp;E6&lt;-H&lt;EEFrfrAoc)n</div><div class='del'>-r;RH,bc6,*A6N-Ao)J6aO)\c@@$C-VrsAJ=OEG/JA9?`.WW.J~&gt;</div><div class='del'>-oD]3skbrK2ASZOHW9jN_ruh3o[%t+Oh&lt;an5il$q!Nka&lt;@rr&lt;#qkeXC'\\H"nVRQ-`s!@0?M.3:M</div><div class='del'>-s8W)ZQ[3=W@TQdJnG`Idd\D5"&gt;_VGBq9"hBAS6tkrr35u`hRT]D;bBlrs%_dLh'e@l2L\om]Vgb</div><div class='del'>-&gt;`A"Ks73CNEFW[fp\t1)oYR8@?&gt;\[#s8W)WW.SMbV"+&lt;]#3hk9CgqAIrr36&amp;goQ'6?c2X;rsn@p</div><div class='del'>-N+6(Lk2;MDBOu2&gt;rr2p%nZIdi@Vt?+rri&gt;h\rUh0Acl_$li-e]')U4fNc&amp;E6&lt;HlKGEFrfrAol/o</div><div class='del'>-r;RH,c)Z;,A6N0Bo)J6aO)\c@@$C-VrsAJ=O`b8KA9Hf/WW.J~&gt;</div><div class='del'>-oD]3skd-eER%:(W_XRR(ruh3V&gt;_of0h&lt;an5l.*2,SA3eNrr&lt;#qkeTIl%1WjW$tf(ts!@0SZ%oLO</div><div class='del'>-s8W)ZZDO(YP_"%onG`IdftjYOKU:s'q9cUFR$496rr35udD;Q7LuA72rs%`,Ya'p*l2L\om`)`%</div><div class='del'>-Jt20,s73t0TTtVPp\t1)oZk7FMMU6js8W)Y`3#2SY4;Ag#3i_%SWf6#rr36&amp;hoMjZK#m]crsnA4</div><div class='del'>-Z]p$0k2&lt;83R[9K&amp;rr2p%n\;?&amp;PEP/,rri&gt;ja0_K&lt;R0/nXmf*+`')US3Z_!MAH&amp;BY@TUD4:R%Dn-</div><div class='del'>-r;RH,fZ0t[Q\^!uo)J6r[%WnPLnsS:rsAJF[A0.XQ_!.8WW.J~&gt;</div><div class='del'>-o)Bg*dtqgLAnlF@S]^I$s82'2fB2Z"kL6u'D0r;*jnJcQrsJYc_8"[ena+Z@na6&gt;[lE,&gt;?]Cl1'</div><div class='del'>--L%4TCLpdPK&amp;6D)s7jL(H!t'Mn,N:&lt;N,WB&gt;GO5A0rpIXpE+4(Trr36&amp;gSB=-&gt;`J.Mru1+#LLXkt</div><div class='del'>-nc/X]]7k-6BpJ&gt;js8M,mP\afRkPkJdrR%Bf?&lt;t/8qYqf)RXT$_DT;YTs8(!&gt;H=1:&lt;qu?]qiMM68</div><div class='del'>-&gt;cdMc]Qe%$C6\Mmrs/(sK5P7&lt;\,H:*55jQB]74L*AnZ")S^HX!rqc!&lt;cF9']AR88;ZerB&lt;A7]Cg</div><div class='del'>-DMZI5s8W)mf!pl_ARAAEfD5I:Y`Ed9@UPDiq&gt;Us#c&amp;-IPB4u1McIg^bb5JLCJ,~&gt;</div><div class='del'>-o)Bg*du%mMAnlFAT$$R%s82'2fB2Z"kL@&amp;)DLAJ,jnJcQrsJYc_6'iM^UpANna6&gt;[lE,&gt;@]Cl1'</div><div class='del'>--L%7UCLpdPK&amp;6D)s7jL(H!t'Nn,N:&lt;NGrK?GjPJ1rpIXpE+4(Trr36&amp;gSB=-&gt;`S4Nru1+#LLXkt</div><div class='del'>-nc/X]]7k-6C6nMls8M,mP\afRkPkJdrR%Eg?=(59qYqf)Rso-`DT;YTs8(!&gt;H=1==qu?]qiMV&lt;9</div><div class='del'>-?**Vd]Qn+%C6\Mmrs/(sK5P7&lt;\,H:*55jQB]7=R+AnZ")T$lg#rqc!&lt;cFB-^AR88;ZerB=A7]Cg</div><div class='del'>-DMZI5s8W)mf!pl_ARAAFfD5I:Y`Ed9@UPDiq&gt;Us#c&amp;6OQB4u1NcIgacbPeUDJ,~&gt;</div><div class='del'>-o)Bg*e"E%mR%0kP^=i/Xs82'2fB2Z"mGQ&lt;uP`W&amp;jjnJcQrsJYc_*8&gt;;%LihXna6&gt;[lGocU_=dg-</div><div class='del'>--L%t?SX5:\Ol$!8s7jpTV36P3n,N:&lt;Z_*YOSF$:Urp\=LT9#/urr36&amp;hSQ:UJtDB/ru1+@YEb!S</div><div class='del'>-nc/X]`NGf"R'-)]s8M92\=J\DkPkJdrReucNe"q&lt;qYqf)[],gaR*bg3s8(?dViZ_hqu?]qj2A$\</div><div class='del'>-J@+n:_5*KeR^)Yers/)/XIbfI`r5l955jcd_Q'&amp;lR@9\C^#&amp;/Trql3IgsER+R#ZK:\)4upQC+)0</div><div class='del'>-T&lt;HoFs8W)niR#$+R#ZK?fD5I:_6fo(P_c.*q&gt;Us#d^#L4R@BhYgZ%2BgAS2SJ,~&gt;</div><div class='del'>-o)Ba/m(IUQ@qB=nJ![1Jce7C&lt;f@J6]Vg;umQbhDFr;-F"qrY`0g$%bO`:&lt;9q#6*J_F)'D)rr4&gt;5</div><div class='del'>-W.f+u&lt;a*6,rr&lt;#i^n5aYBXIF3ro&amp;]MAnPt[p&amp;*jhVh8bsIHgb2-2YoZH='sZo)Jagd@G\sD6rp8</div><div class='del'>-s7k,rBP(q$_Ya,_]:+%ZAprqCrs/;6Soe1Bg%tRFEU03?BP2(&gt;lM^"mYDdF1DqY-is8CB@HsL(&amp;</div><div class='del'>-p\NU&amp;D.[I&amp;_&gt;XE6oYc)fAncbIrVui^c'`OhJ7iA'B4u::SZ]T?_S&lt;LQLiHp0:fES5o@f+9@:a(g</div><div class='del'>-H'PYSbKe,8P]gVF;H'1Mrr;MmO)\c@@$C-Vrsnq]JnS_-BPrBkWhXj:p9+FG~&gt;</div><div class='del'>-o)Ba/m(IXR@qB=nJ![4Ld+[R&gt;f[e?_W-W)oR).MGr;-F"qrY_sXgu'C\+/nd#6*J`F)0J*rr4&gt;5</div><div class='del'>-W.f+u&lt;a*6,rr&lt;#i^n5aYBXIF3ro&amp;`NAnQ"\p&amp;*jiVh8bsId-k3-2YoZH='sZo)Jagd@PbtDR9$9</div><div class='del'>-s7k,sBP(q%_Ya,_]UF.[Aq'"Drs/;6Soe1Cg%tRFEU06@BP2(?lM^"mYDdF1E7t6js8CBAHsL+'</div><div class='del'>-p\NU&amp;DJ!R'_YsN7oYl2hAnceKrVui^cC/akJS/J(B4u::T!,fC_nWURLiHp0:fES5o@f.:@:a(g</div><div class='del'>-H'Y_Tbg4;:P]gVF;H'1Mrr;MmO)\c@@$C-Vrsnq]K4nh.BPrBkWhXj:p9+FG~&gt;</div><div class='del'>-o)Ba/m(f'QPaIr5Wk-3th;mk`iSiSA`MSQHT&gt;B7Nr;-F"qrY^Z$k3XSAb#3g#6*T(U6+()rr4&gt;5</div><div class='del'>-]&lt;.ZgJ9Sfurr&lt;#ic+g$&lt;OM1;dro'oKR$jP^p\a=.`N&gt;\rT'?7S-2Z3-VN6;8o)JagfY4&gt;OR)&amp;Cp</div><div class='del'>-s7k-ER[BS?dJNb#d_)KIQ(I7&gt;rs/;D^8$O7g%tRFEU0s,R[KYMmeuV/ag.P'QJDK&gt;s8CWfVi6/O</div><div class='del'>-p\NUASXGq?dJa+FoZ="uR%()6rVuicgq/okT9bb0R@BkN^&lt;+gRf@8*^Yb78=GB9;0o@fq'P*_T.</div><div class='del'>-VRXe#gYLQ.\"oCPHul1Jrr;N)[%WnPLnsS:rsnq]W0s!?R\$Rn`knUap9+FG~&gt;</div><div class='del'>-nc'R)iM^Kt?t&lt;kbFFfLGWNrn2QuunCBp6-WlhUPTrs8Ma_8"[bf&gt;[7Ks(;9#lH6&amp;KFN!&gt;@s8VZ#</div><div class='del'>-MJQNsK&amp;6D(o^(GHP&amp;OuPU&gt;PtMl(Ds(AT*="XcddEAS,Ll[+3%=oXpK)&gt;?o)?s8Vr8NH&amp;QBIE]p?</div><div class='del'>-q;R?H@V9bCWMY2mBP(geDm\'3d-e,uA6Na,rqcY7o"B-RA8?UbXdaBWB4YXiRa]EmoY-W)=^g.b</div><div class='del'>-rp-Y+@qKV2^&gt;dMmfnj&lt;LAp9TQaMOii?&amp;[14CgCFYAS&gt;n&amp;J;9&amp;@Km[`H&gt;uXU'PgK""m_s9V?".A\</div><div class='del'>-G(l6RSs"Y@@Tu]-MUV7us7*1@@piSIP4AAJ%fYUXB3\hR@qB=iA7:epY5a"~&gt;</div><div class='del'>-nc'R)iM^Kt?t&lt;kbFFfLGWj9"4R&lt;E(FC6Q6XlhUPTrs8Ma_6'iJX0hBcs(;9#lH6)LFN!&gt;@s8VZ$</div><div class='del'>-MelWtK&amp;6D(o^(JIP&amp;OuPU&gt;PtMl(Ds(AT*@$Y**pHAS,Ll[+&lt;.@oXpK)&gt;?o)?s8Vr8NH&amp;QBIEg!A</div><div class='del'>-q;RBJ@V9bDWMb8oBkCpfDm\*5d-e0!A6Nd-rqcY7o"B0SA8?UcY+0QZB4YXiS(#QpoY-W)=^p4c</div><div class='del'>-rp-\,@qKV2^&gt;dMmfnsENAp9WRaMXrk?B!:5CgCFYAS&gt;n&amp;J;9&amp;@Km[`H&gt;uXX(Q-f+#m_s&lt;W?".A\</div><div class='del'>-G(l6RSs"Y@@Tu]-MUV7us7*1@@piSIP4AAJ%fYUXBO"qS@qB=iA7:epY5a"~&gt;</div><div class='del'>-nc'R)iNJ&lt;#OHu&lt;*UT:f&lt;`lu]J];(@6JXa7"lhUPTrs8Ma_*8&gt;;$r-6\s(;9'maoFRT$Qg's8VZ-</div><div class='del'>-Z(6brOl$!7p@74k\"B%Y\E&lt;ejl*-V?R%LS"agRq4QC+&amp;1a5PS)oZOe8LjmD=s8VrAZ_&lt;bSVqKhH</div><div class='del'>-q;S9;PF8/P`l+mNQ'[l*S]B^&gt;h&lt;r7hQ\C.PrqcX&amp;o#%)_QCY"hah=C&gt;rg7/a\DQ#goZXk7Kn/"X</div><div class='del'>-rp.%bQ'n5Fd-9EIfqXaoRAILAf[[p/JXOolOc#3bR$sS@Wir\4Y,IqVMgf_kSC$j*m_tEKN0BX"</div><div class='del'>-Uoq8B^:()5P_j[*Q.,F+s7*h'Q&amp;poVU[e0[%fYUjOc,9aQ'[r1Q&amp;;L1Y5a"~&gt;</div><div class='del'>-nc'L+p",mS?!CTA?t!MS@pr\J=&amp;s:,]$fg9rUp0qqrY`/eBP_pnc)Gai3TGCAR/\cG-UrEpW.Sa</div><div class='del'>-:gh?5rqO73TQadJ&gt;$Z,lPPXprG@4QW&gt;$G08OFL_B=^#BOBs$TcB3S;&gt;h#%-Oq9*kc=]o$FBP6f&amp;</div><div class='del'>-^2mU`r`Tq;CS5cU=]np&gt;C2'g1M.KgeFQ`K"55O#m@p3&amp;?&gt;$&gt;'WQ=jB(=^c&amp;ZNT?L@&gt;&gt;]7urr;`B</div><div class='del'>-JRDVb&gt;\S1mVWGI1?&lt;^]DBP:jZBq*B3fqN.d&gt;?bE@rEq6b?!C?/;-%Y9dd[58qr&gt;,4?&lt;^T=?X[DR</div><div class='del'>-@UNJD&lt;)HhTbjYN1s7)^m&gt;$"^$O7E#F"nKol?WgM1=Thf*;NL@Ns*t~&gt;</div><div class='del'>-nc'L+p",pU?!CTA?t!MS@pr\J=''C.]$fg9rUp0qqrY_rWM?N]nc)GaiO#VEAR/\dGI%,GpW7\c</div><div class='del'>-:gqE6rqO:5TQadJ&gt;$Z,mPPXprG[OZX&gt;$G08OFLbC=^#BOBs$TcB3S;?h#%-Oq9*nd=]o$FBP?l'</div><div class='del'>-^2mXar`Tq;CnPoW=]np&gt;C2'g1MIfpfFm&amp;T#55O#nA6N/@&gt;$G-YQ=sH)=^c&amp;[NoZXB&gt;&gt;];!rr;`B</div><div class='del'>-Jmhed&gt;\S4oVrbR3?&lt;^]DBP:m[C7EK4fqN1e&gt;?bE@rEq6b?!C?/;HIk&lt;dd[58qr&gt;,5?X-c??X[DR</div><div class='del'>-@UNJD&lt;)HhUbjYN1s7)an&gt;$"^$OR`,G"nKol?WpS2=Thf*;NUFOs*t~&gt;</div><div class='del'>-nc'L+p"-."K85AFOHG`kQ'.)ZH$+e2]$fg9rUp0qqrY^Z$k+u[nc*5"kKV#QQ].!!UW332pW]Ol</div><div class='del'>-GC.C"rqOsb^nm-KLl@n"ZMO4&lt;QAC6NLk^D*R$!;]L51hRO1shcQA'R/h#%-Oq9YalL4tJJP)Sku</div><div class='del'>-^lsS.Lkp_3Jte9^L5(JEPE3H&lt;Y*4EZMWag855O$,MhHkAL4OW0S;i;YL5_=YW8t@QKQVt/rr;`B</div><div class='del'>-S;W,XMjBou]&amp;gYfKnbMJR@&amp;t_J&gt;(6Pfr9aYKo(eMrK&amp;XlN/3%2F*3/;dd[58qr&gt;2JJqSo;O-,Wj</div><div class='del'>-PE:]UHZF=pbjYN1s7*LXJ9uQ_TCM^V"nKp)Jpr4KJHUIKF.`!*s*t~&gt;</div><div class='del'>-nGa:'o@UL#@Tc`5=&amp;r:!&lt;*O-jVSC^HpAOR^#5dQ!\[\s2nc&amp;ag`,8sbrDsP4R.UFUgM'bkOQ-0;</div><div class='del'>-mYPO[qc&gt;FQG45Cl\:.[a='g0Qa1$"i='KBoY1hojD.[F1jo5;[qr!`H='&amp;mRNP4]TiO!b,&lt;tf%s</div><div class='del'>-]Zd&lt;l='&amp;U?LT]@gI;&lt;G.R-aYK+TCiPO^M6l&gt;Ap1P`IV;r=(lrVd,:%)An[7ks8W&amp;_]Qa?V)J"5b</div><div class='del'>-dI?,&amp;I:$&amp;S='K[-]%6?Io@LF+AQW&amp;8r`9J.&lt;)cdtAq$SmhXpdGrtP7f_j,4H='&amp;F(=&amp;r:!&lt;F0sM</div><div class='del'>-cL(T0rrVc"K`65uJ$AM=rrr&gt;daJ+0"rFQ.II^&amp;CGs*t~&gt;</div><div class='del'>-nG`^lo@UL#@p8k5$s$&gt;+&lt;Ej6lVSC^HpAOR^#5dQ!Vim_=nc&amp;ag`,B'erE'V6R.UFUgM0knOQ-0;</div><div class='del'>-mYPR]qcGLSGOPLm\:.^c=C6BTa1$"j=BoTrYM/#lDJ*X5jo5;[qr!`I=BK*VNP4]TiO!e-=;,2!</div><div class='del'>-]Zd&lt;m=BJgCLTfFhIV`Y2R-aYK+TCiPO^V?o&gt;]?@R`IV&gt;t=D&lt;/Yd,:(*B5*Ins8W&amp;_]QjEX)J+;d</div><div class='del'>-dI?,&amp;IUH8V=Boj/]%6?Io@LF+Am&amp;5:r`9J.&lt;)lk!B7HbohXpdGrtP7f_j,7J='&amp;F(=&amp;r:"&lt;F:'P</div><div class='del'>-cL(T0rrVc"K`65uJ$AM=rrr&gt;daJ+3$rFZ4JJ$ALHs*t~&gt;</div><div class='del'>-nG`[ko@UL4J,Xa'H[9mXFEi=sW5$pJpAOR^#5dQ!57013nc&amp;agc]s*,rH8`sWV$5fgQ-Q%S)X&gt;F</div><div class='del'>-m\bqiqfXW:O73&amp;0\rV,[G']"Ia1@.PG'JS&amp;ZJ+?3LOO]6jo5;[qr"5uG'87gR(r"aiO4XCFq]7c</div><div class='del'>-]ZdR7G'8+]Pd9$#RY6-?V!RpW:&amp;aV(S:#L'G_;d/`KY^mG(5INd,:gXIXdpSs8W&amp;_^5[&gt;[G(,FI</div><div class='del'>-eF;G+NdGqjG'J\/]%6?Io@LF7IsH&lt;cH@(!bGBItMIZ12@hXpdGrtP7f_juO.G^4U^H[9jVFaAnF</div><div class='del'>-cL(T0rrVc+Q2ZR@Nk"ZTrrr&gt;daJY#JrI+j!Nk"Y_s*t~&gt;</div><div class='del'>-n,EUkpZ'?$Q[esZ#_\MH]Zo="q#9a^"oIH!ZG#VprrW&amp;S\bi?:[++aJroh(qZdSLGs6n+6qPbL=</div><div class='del'>-b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN&lt;VTkOIBBXfAS8</div><div class='del'>-akZCObIG'sg%G.?)&gt;idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&amp;K4e</div><div class='del'>-YeS]Op\t3lp&gt;sQ-SrS-pGmK4fX16=.meZq]rs/Q"m+&amp;kSOb&lt;RW#)SnWa5?IdrVlroim%JA!mTa"</div><div class='del'>-p\tBnn(c("rO;sCb2W3!s*t~&gt;</div><div class='del'>-n,EUkpZ'?$Q[esZ#_\MH]Zo="q#9a^"oIH!VmYm]rrW&amp;S\bi?:[++aJroh(qZdSLGs6n+6qPbL=</div><div class='del'>-b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN&lt;VTkOIBBXfAS8</div><div class='del'>-akZCObIG'sg%G.?)&gt;idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&amp;K4e</div><div class='del'>-YeS]Op\t3lp&gt;sQ-Sr\3rGmSeROK5n6h&lt;t.=rVm-%qWubIYE=M:GmAYPS[6Aoo)8Oe!r1d"rl"r`</div><div class='del'>-iqW9J"T.ZCb.dha"22k:poaXI~&gt;</div><div class='del'>-n,EUkpZ'?$SW*N'#`tOY]Zo="q#9a^"oIH!@u'F@rrW&amp;S\bi?:[++aJroh(qZdSLGs6n+6qPbL=</div><div class='del'>-b4#B*j2\I*X0fq*n)M6dWirtTh!j[V]"#B!nG`G6rpe@BWiWSBcJnTtpYiumWN&lt;VTkOIBBXfAS8</div><div class='del'>-akZCObIG'sg%G.?)&gt;idI[]?F4_:e8@bH\(L[`-kamF/_X^=MrUruh-t`36/A[DLGZqY0$k[&amp;KLm</div><div class='del'>-YeS]Op\t3lp&gt;sQ-U6^Z7L^Ap$R&amp;da&gt;h&lt;t.=rVm-%qWubIYF1IML^/d#TsMeso)8Oe!r1d"rl"r`</div><div class='del'>-iqW9J"T.ZCb.dha"22k:poaXI~&gt;</div><div class='del'>-mJd^oo&amp;\KIa2Q$&lt;cIh1Do_\XSrri5`f&amp;$)irrW/kkkj?Mk4/?Ks7kj&lt;kOSTOs8)-DqViOVmJ?k^</div><div class='del'>-qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[</div><div class='del'>-l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i</div><div class='del'>-"o\)WgsX=C`&lt;XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-&lt;j"</div><div class='del'>-lKn'9rN?0N~&gt;</div><div class='del'>-mJd^oo&amp;\KIa2Q$&lt;cIh1Do_\XSrri5`f&amp;$)irrW/kkkj?Mk4/?Ks7kj&lt;kOSTOs8)-DqViOVmJ?k^</div><div class='del'>-qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[</div><div class='del'>-l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i</div><div class='del'>-"o\)WgsX=C`&lt;XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-&lt;j"</div><div class='del'>-lKn'9rN?0N~&gt;</div><div class='del'>-mJd^oo&amp;\KIa2Q$&lt;cIh1Do_\XSrri5`f&amp;$)irrW/kkkj?Mk4/?Ks7kj&lt;kOSTOs8)-DqViOVmJ?k^</div><div class='del'>-qsik0j66%1rqYpAj5oUtqYp?\lKRX*qu-O?rU]75j65q(qu6WpqX3J)j6?47rqGd?j5oUtqYp?[</div><div class='del'>-l07R,rV-=/rUf@7j6#e*rql3Ij5fIoq#:0]lfmd.r;Q^2rqc'EioB7kpAFphqsin.gY_/]p\k$i</div><div class='del'>-"o\)WgsX=C`&lt;XK0fAPrcqu6Ek#6";aimuAprl#)_d+d^Qqu6Nn!r_obrp^'\q#0pd$i^"om-&lt;j"</div><div class='del'>-lKn'9rN?0N~&gt;</div><div class='del'>-li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq&gt;Kma"9&amp;&amp;fo)A.]o(Mt[LAuc~&gt;</div><div class='del'>-li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq&gt;Kma"9&amp;&amp;fo)A.]o(Mt[LAuc~&gt;</div><div class='del'>-li.%cq=O[V"7l-]roa:`r:fsaJcF:#!r`#ppAY6oqtK[[nH8@Tq&gt;Kma"9&amp;&amp;fo)A.]o(Mt[LAuc~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-JcC&lt;$JcFs6J,~&gt;</div><div class='del'>-%%EndData</div><div class='del'>-showpage</div><div class='del'>-%%Trailer</div><div class='del'>-end</div><div class='del'>-%%EOF</div><div class='head'>diff --git a/docs/draknet_advanced_doc.txt b/docs/draknet_advanced_doc.txt<br/>deleted file mode 100644<br/>index a0c0c63e0..000000000<br/>--- a/<a href='/software/drakx/tree/docs/draknet_advanced_doc.txt?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/draknet_advanced_doc.txt</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,165 +0,0 @@</div><div class='del'>-This document details the entry points you can call without the DrakX graohical</div><div class='del'>-toolkit. First, the general variables you will encounter further. If you don't</div><div class='del'>-know wht a variable is, look here. Any additional locally variables are</div><div class='del'>-commented 'in place'</div><div class='del'>-</div><div class='del'>-------------------------------</div><div class='del'>-Special types (in upper cases)</div><div class='del'>-------------------------------</div><div class='del'>- DB_FILE : file storing the ISDN ISP database. see share/isdndb.txt : file of lines in 'Unlisted - edit manually' or /^(.*)\|(.*)\|(.*)=&gt;([0-9]*)=&gt;(.*)=&gt;(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})=&gt;(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ where $1=Land $2=City $3=ISP_name $4=phone_number $5=hostname $6=dns1 $7=dns2</div><div class='del'>-</div><div class='del'>----------------------------------------------------------------------------------------</div><div class='del'>-Summary of common variables used (local variables are described in the function itself)</div><div class='del'>----------------------------------------------------------------------------------------</div><div class='del'>-notation : keys : description : type : format (regexp or enumeration. `...' means it's not exhaustive</div><div class='del'>- $prefix : prefix path (empty in post-install) : string : path</div><div class='del'>- $isLaptop : flag for laptop : boolean or int : guess</div><div class='del'>- $isdn : hash table containing isdn infos</div><div class='del'>-  $isdn-&gt;{login} : cnx login : string</div><div class='del'>-  $isdn-&gt;{passwd} : cnx passwd : string</div><div class='del'>-  $isdn-&gt;{phone_in} : user phone : /^[0-9]*$/</div><div class='del'>-  $isdn-&gt;{phone_out} : ISP phone : /^[0-9]*$/</div><div class='del'>-  $isdn-&gt;{dialing_mode} : dialing mode : "auto" or "manual"</div><div class='del'>-  $isdn-&gt;{driver} : driver used for the card : "hisax" or "b1pci" or ...</div><div class='del'>-  $isdn-&gt;{type} : type of card, used for the driver, see netconnect_consts : integer : /^[1-22]|[24-37]$/</div><div class='del'>-  $isdn-&gt;{irq} : irq of the ISA card : integer |</div><div class='del'>-  $isdn-&gt;{mem} : mem of the ISA card : string  |</div><div class='del'>-  $isdn-&gt;{io} : io of the ISA card : string    | see netconnect_consts for examples.</div><div class='del'>-  $isdn-&gt;{io0} : io0 of the ISA card : string  |</div><div class='del'>-  $isdn-&gt;{io1} : i01 of the ISA card : string  |</div><div class='del'>-  $isdn-&gt;{idl} : amount of time after the cnx times out in secs : int</div><div class='del'>-  $isdn-&gt;{user_name} : not used anymore. Not explicit. It represented the name of the connexion.</div><div class='del'>-  $isdn-&gt;{card_type} : card type : string : "isa" or "pci" or "pcmcia"</div><div class='del'>-  $isdn-&gt;{protocol} : cnx protocol : int : 1|2|3 : 1 for old german specific (not used anymore), 2 for europe, 3 for rest of the world</div><div class='del'>-  $isdn-&gt;{id} : card id. Associated with vendor, identify strictly the card. see pcitable : integer</div><div class='del'>-  $isdn-&gt;{description} : card description from pcitable : string</div><div class='del'>-  $isdn-&gt;{vendor} : card vendor : integer</div><div class='del'>-  $isdn-&gt;{passwd2} : passwd verification : string</div><div class='del'>- $modem : hash table containing modem infos</div><div class='del'>-  $modem-&gt;{device} : device of the modem : string : /ttyS[0-9]/</div><div class='del'>- $adsl : hash table containing modem infos</div><div class='del'>-  $adsl-&gt;{login} : cnx login : string</div><div class='del'>-  $adsl-&gt;{passwd} : cnx passwd : string</div><div class='del'>-  $adsl-&gt;{atboot} : </div><div class='del'>- $netc : hash table containing system-wide networking infos (maybe not true, correct this) : </div><div class='del'>-  $netc-&gt;{NET_DEVICE}</div><div class='del'>-  $netc-&gt;{dnsServer2}</div><div class='del'>-  $netc-&gt;{dnsServer3}</div><div class='del'>-  $netc-&gt;{DOMAINNAME2}</div><div class='del'>-  $netc-&gt;{NET_INTERFACE} is set to "ppp0"</div><div class='del'>- $in : interactive object</div><div class='del'>-</div><div class='del'>-------------</div><div class='del'>-Entry points</div><div class='del'>-------------</div><div class='del'>-</div><div class='del'>-isdn_write_config_backend : write isdn info, only for ippp0 -&gt; ask_connect_now</div><div class='del'>-input :</div><div class='del'>- $prefix</div><div class='del'>- $isdn</div><div class='del'>-$isdn input:</div><div class='del'>- $isdn-&gt;{login} $isdn-&gt;{passwd} $isdn-&gt;{phone_in} $isdn-&gt;{phone_out} $isdn-&gt;{dialing_mode}</div><div class='del'>- $isdn-&gt;{driver} $isdn-&gt;{type} $isdn-&gt;{irq} $isdn-&gt;{mem} $isdn-&gt;{io} $isdn-&gt;{io0} $isdn-&gt;{io1}</div><div class='del'>-</div><div class='del'>-write_secret_backend : write login and passwd into /etc/ppp/{chap, pap}-secrets. Replace old passwd only if same login</div><div class='del'>-input :</div><div class='del'>- $a : login : string : /^.*$/</div><div class='del'>- $b : passwd : string : /^.*$/</div><div class='del'>-</div><div class='del'>-connect_backend : launch the cnx script</div><div class='del'>-input : $prefix</div><div class='del'>-</div><div class='del'>-connect_backend : launch the cnx script</div><div class='del'>-input : $prefix</div><div class='del'>-</div><div class='del'>-read_providers_backend : build the tree of isdn ISP</div><div class='del'>-input :</div><div class='del'>- $file : 1st location of the file : ISDN_DB_FILE</div><div class='del'>- $file2 : 2nd location of the file : ISDN_DB_FILE</div><div class='del'>-output : the list of ISP : array of strings : array of /^(.*)\|(.*)\|(.*)$/ where $1=Land $2=City $3=ISP_name</div><div class='del'>-</div><div class='del'>-get_info_isdn_backend : fills the infos from the line of the tree returned into $isdn and $netc</div><div class='del'>-input :</div><div class='del'>- $isdn</div><div class='del'>- $netc</div><div class='del'>- $name : the line choosen in the tree of ISP : string : /^(.*)\|(.*)\|(.*)$/ with $1=Land $2=City $3=ISP_name</div><div class='del'>- $file : 1st location of the file : ISDN_DB_FILE</div><div class='del'>- $file2 : 2nd location of the file : ISDN_DB_FILE</div><div class='del'>-$isdn ouput</div><div class='del'>- $isdn-&gt;{user_name}, $isdn-&gt;{phone_out}, $netc-&gt;{DOMAINNAME2}, $netc-&gt;{dnsServer2}, $netc-&gt;{dnsServer3},</div><div class='del'>-$netc output</div><div class='del'>- $netc-&gt;{DOMAINNAME2}, $netc-&gt;{dnsServer2}, $netc-&gt;{dnsServer3}</div><div class='del'>-</div><div class='del'>-isdn_detect_backend : detects isdn pci card and fills the infos in $isdn : only detects one card</div><div class='del'>-input</div><div class='del'>- $isdn</div><div class='del'>-$isdn output:</div><div class='del'>- $isdn-&gt;{description} $isdn-&gt;{vendor} $isdn-&gt;{id} $isdn-&gt;{driver} $isdn-&gt;{card_type} $isdn-&gt;{type}</div><div class='del'>-</div><div class='del'>-isdn_get_list : return isdn cards descriptions list. This function is not use internally.</div><div class='del'>-output : descriptions : list of strings</div><div class='del'>-</div><div class='del'>-isdn_get_info : return isdn card infos. This function is not use internally.</div><div class='del'>-input : the description of the card (see isdn_get_list)</div><div class='del'>-output : a reference on the decription of the card. : ref on a hash(description,type,irq,mem,io,io0,io1card,)</div><div class='del'>-</div><div class='del'>-conf_network_card_backend : configure the network cards and return the list of them, or configure one specified interface : WARNING, you have to setup the ethernet cards, by calling setup_thiskind($in, 'net', !$::expert, 1) or setup_thiskind_backend before calling this function. Basically, you call this function in 2 times.</div><div class='del'>-input</div><div class='del'>- $prefix</div><div class='del'>- $netc</div><div class='del'>- $intf</div><div class='del'>- $type : type of interface, must be given if $interface is : string : "static" or "dhcp"</div><div class='del'>- $interface : facultative, if given, set this interface and return it in a proper form. If not, return @all_cards</div><div class='del'>- $ipadr : facultative, ip address of the interface : string</div><div class='del'>- $netadr : facultative, netaddress of the interface : string</div><div class='del'>-when $interface is given, informations are written in $intf and $netc. If not, @all_cards is returned.</div><div class='del'>-$intf output: $device is the result of</div><div class='del'>- $intf-&gt;{$device}-&gt;{DEVICE} : which device is concerned : $device is the result of $interface =~ /(eth[0-9]+)/; my $device = $1;;</div><div class='del'>- $intf-&gt;{$device}-&gt;{BOOTPROTO} : $type</div><div class='del'>- $intf-&gt;{$device}-&gt;{NETMASK} : '255.255.255.0'</div><div class='del'>- $intf-&gt;{$device}-&gt;{NETWORK} : $netadr</div><div class='del'>- $intf-&gt;{$device}-&gt;{ONBOOT} : "yes"</div><div class='del'>-$netc output:</div><div class='del'>- $netc-&gt;{nb_cards} : nb of ethernet cards</div><div class='del'>- $netc-&gt;{NET_DEVICE} : this is used to indicate that this eth card is used to connect to internet : $device</div><div class='del'>-output:</div><div class='del'>- $all_cards : a list of a list ( (eth1, module1), ... , (ethn, modulen)). Pass the ethx as $interface in further call.</div><div class='del'>- $device : only returned in case $interface was given it's $interface, but filtered by /eth[0-9+]/ : string : /eth[0-9+]/</div><div class='del'>-</div><div class='del'>-adsl_conf_backend : write adsl configuration</div><div class='del'>-input :</div><div class='del'>- $prefix</div><div class='del'>- $adsl</div><div class='del'>- $netc</div><div class='del'>- $adsl_type : type of cnx : string : "pptp" or "pppoe"</div><div class='del'>-$adsl input:</div><div class='del'>- $adsl-&gt;{login}, $adsl-&gt;{passwd}, $adsl-&gt;{atboot}</div><div class='del'>-$netc input:</div><div class='del'>- $netc-&gt;{NET_DEVICE}</div><div class='del'>- $netc-&gt;{dnsServer2}</div><div class='del'>- $netc-&gt;{dnsServer3}</div><div class='del'>- $netc-&gt;{DOMAINNAME2}</div><div class='del'>-$netc output:</div><div class='del'>- $netc-&gt;{NET_INTERFACE} is set to "ppp0"</div><div class='del'>-</div><div class='del'>-modem_detect_backend : detects modem on serial ports and fills the infos in $modem : detects only one card</div><div class='del'>-input</div><div class='del'>- $modem</div><div class='del'>- $mouse : facultative, hash containing device to exclude not to test mouse port : ( device =&gt; /ttyS[0-9]/ )</div><div class='del'>-output:</div><div class='del'>- $modem-&gt;{device} : device where the modem were detected</div><div class='del'>-</div><div class='del'>-get_net_device : return the device choosen for the net cnx</div><div class='del'>-no input</div><div class='del'>-output : name of the internet device.</div><div class='del'>-</div><div class='del'>-read_net_conf : read the information stored in $prefix/etc/sysconfig/draknet and $prefix/etc/sysconfig/draknet.`type`</div><div class='del'>-input:</div><div class='del'>- $prefix</div><div class='del'>- $netcnx</div><div class='del'>- $netc</div><div class='del'>-</div><div class='del'>-set_net_conf : set the information from netcnx in $prefix/etc/sysconfig/draknet and $prefix/etc/sysconfig/draknet.`type`</div><div class='del'>- $prefix</div><div class='del'>- $netcnx</div><div class='del'>- $netc : useless! REMOVE ME</div><div class='head'>diff --git a/docs/interactive/ask_from b/docs/interactive/ask_from<br/>deleted file mode 100755<br/>index dad69247e..000000000<br/>--- a/<a href='/software/drakx/tree/docs/interactive/ask_from?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/interactive/ask_from</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-# Yves Duret &lt;yduret at mandrakesoft.com&gt;</div><div class='del'>-# license: GPL</div><div class='del'>-</div><div class='del'>-use lib qw(/usr/lib/libDrakX);</div><div class='del'>-use interactive;</div><div class='del'>-</div><div class='del'>-my $irq=1;</div><div class='del'>-my $login;</div><div class='del'>-my $login2="editable";</div><div class='del'>-my $check;</div><div class='del'>-my $range=57;</div><div class='del'>-</div><div class='del'>-my $in = 'interactive'-&gt;vnew(undef, 'default');</div><div class='del'>-</div><div class='del'>-$in-&gt;ask_from("window title - ask_from",</div><div class='del'>-	      "message\nexamples of utilisation of ask_from",</div><div class='del'>-	      [</div><div class='del'>-	       { label =&gt; "enter scalar", val =&gt; \$irq },</div><div class='del'>-	       { label =&gt; "combo (type=&gt;combo optionnal)", val =&gt; \$login, list =&gt; ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], type =&gt; 'combo'},</div><div class='del'>-	       { label =&gt; "choose from list editable and sorted", val =&gt; \$login2, list =&gt; ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], not_edit =&gt; 0, sort =&gt; 1},</div><div class='del'>-	       { label =&gt; "check box", val =&gt; \$check, type =&gt; "bool", text =&gt; "text" },</div><div class='del'>-	       { label =&gt; "range", val =&gt; \$range, type =&gt; 'range', min =&gt; 0, max =&gt; 100 },</div><div class='del'>-	      ],</div><div class='del'>-	      complete =&gt; sub { print "complete\n";print "$irq\n$login\n$range\n"; },</div><div class='del'>-#	      focus_out =&gt; sub { print "focus_out\n"},</div><div class='del'>-#	      changed =&gt; sub { print "changed\n"; },</div><div class='del'>-	     ) or $in-&gt;exit(0);</div><div class='del'>-$in-&gt;exit(0);</div><div class='head'>diff --git a/docs/interactive/ask_from_list b/docs/interactive/ask_from_list<br/>deleted file mode 100755<br/>index 63c0ee996..000000000<br/>--- a/<a href='/software/drakx/tree/docs/interactive/ask_from_list?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/interactive/ask_from_list</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-# Yves Duret &lt;yduret at mandrakesoft.com&gt;</div><div class='del'>-# license: GPL</div><div class='del'>-</div><div class='del'>-use lib qw(/usr/lib/libDrakX);</div><div class='del'>-use common;</div><div class='del'>-use interactive;</div><div class='del'>-</div><div class='del'>-my %l = (</div><div class='del'>-	 0 =&gt; "Welcome To Crackers",</div><div class='del'>-	 1 =&gt; "Poor",</div><div class='del'>-	 2 =&gt; "Low",</div><div class='del'>-	 3 =&gt; "Medium",</div><div class='del'>-	 4 =&gt; "High",</div><div class='del'>-	 5 =&gt; "Paranoid",</div><div class='del'>-	);</div><div class='del'>-</div><div class='del'>-my $in = 'interactive'-&gt;vnew(undef, 'default');</div><div class='del'>-</div><div class='del'>-my $level = $in-&gt;ask_from_list("window title - ask_from_list",</div><div class='del'>-			       "radio button\nexamples of utilisation of ask_from_list",</div><div class='del'>-			       [ values %l ], $l{2}</div><div class='del'>-			      ) or $in-&gt;exit(0);</div><div class='del'>-</div><div class='del'>-print "$level\n";</div><div class='del'>-$in-&gt;exit(0);</div><div class='del'>-</div><div class='head'>diff --git a/docs/interactive/ask_from_listf b/docs/interactive/ask_from_listf<br/>deleted file mode 100755<br/>index 077540b49..000000000<br/>--- a/<a href='/software/drakx/tree/docs/interactive/ask_from_listf?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/interactive/ask_from_listf</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-# Yves Duret &lt;yduret at mandrakesoft.com&gt;</div><div class='del'>-# license: GPL</div><div class='del'>-</div><div class='del'>-use lib qw(/usr/lib/libDrakX);</div><div class='del'>-use interactive;</div><div class='del'>-use Data::Dumper;</div><div class='del'>-</div><div class='del'>-my $in = 'interactive'-&gt;vnew(undef, 'default');</div><div class='del'>-</div><div class='del'>-my @m=(</div><div class='del'>-       { description =&gt; "dhcpcd",</div><div class='del'>-	 c =&gt; 1},</div><div class='del'>-       { description =&gt; "dhcpxd",</div><div class='del'>-	 c =&gt; 3},</div><div class='del'>-       { description =&gt; "dhcp-client",</div><div class='del'>-	 c =&gt; 4},</div><div class='del'>-      );</div><div class='del'>-my $f = $in-&gt;ask_from_listf(_("ask_from_listf"),</div><div class='del'>-				_("Which dhcp client do you want to use?\nDefault is dhcpcd"),</div><div class='del'>-				sub { $_[0]{description} },</div><div class='del'>-				\@m );</div><div class='del'>-</div><div class='del'>-print Data::Dumper-&gt;Dump([$f],['f']) . "\n";</div><div class='del'>-</div><div class='del'>-$in-&gt;exit(0);</div><div class='del'>-</div><div class='head'>diff --git a/docs/interactive/ask_from_treelist b/docs/interactive/ask_from_treelist<br/>deleted file mode 100755<br/>index ade7141d4..000000000<br/>--- a/<a href='/software/drakx/tree/docs/interactive/ask_from_treelist?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/interactive/ask_from_treelist</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-# Yves Duret &lt;yduret at mandrakesoft.com&gt;</div><div class='del'>-# license: GPL</div><div class='del'>-</div><div class='del'>-use lib qw(/usr/lib/libDrakX);</div><div class='del'>-use common;</div><div class='del'>-use interactive;</div><div class='del'>-</div><div class='del'>-my $in = 'interactive'-&gt;vnew(undef, 'default');</div><div class='del'>-my $foo = $in-&gt;ask_from_treelist("window title - ask_from_treelist",</div><div class='del'>-		       "message\nexamples of utilisation of ask_from_treelist",</div><div class='del'>-		       '|',</div><div class='del'>-		       ['Custom',</div><div class='del'>-			'Other|Unlisted',</div><div class='del'>-			'Matrox|Millennium II=&gt;Matrox Millennium II',</div><div class='del'>-			'Matrox|Millennium G200=&gt;Matrox Millennium G200',</div><div class='del'>-			'Matrox|Millennium G400=&gt;Matrox Millennium G400',</div><div class='del'>-			'Matrox|Millennium G450=&gt;Matrox Millennium G450',</div><div class='del'>-			'Matrox|Millennium G550=&gt;Matrox Millennium G550',</div><div class='del'>-			'Sun|FFB 67MHz Creator=&gt;Sun FFB 67MHz Creator',</div><div class='del'>-			'Sun|FFB 67MHz Creator 3D=&gt;Sun FFB 67MHz Creator 3D',</div><div class='del'>-			'Sun|FFB 75MHz Creator 3D=&gt;Sun FFB 75MHz Creator 3D',</div><div class='del'>-		       ],</div><div class='del'>-				 'Custom'</div><div class='del'>-		      ) or $in-&gt;exit(0);</div><div class='del'>-print "$foo\n";</div><div class='del'>-$in-&gt;exit(0);</div><div class='head'>diff --git a/docs/interactive/wait_message b/docs/interactive/wait_message<br/>deleted file mode 100755<br/>index 0caec4471..000000000<br/>--- a/<a href='/software/drakx/tree/docs/interactive/wait_message?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/interactive/wait_message</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-# Yves Duret &lt;yduret at mandrakesoft.com&gt;</div><div class='del'>-# license: GPL</div><div class='del'>-</div><div class='del'>-use lib qw(/usr/lib/libDrakX);</div><div class='del'>-use interactive;</div><div class='del'>-</div><div class='del'>-my $in = 'interactive'-&gt;vnew(undef, 'default');</div><div class='del'>-my $wait = $in-&gt;wait_message('wainting title', _("Moving files to the new partition"));</div><div class='del'>-sleep(3);</div><div class='del'>-$wait-&gt;set(_("Removing"));</div><div class='del'>-sleep(3);</div><div class='del'>-$in-&gt;exit(0);</div><div class='head'>diff --git a/docs/mdk-vs-redhat b/docs/mdk-vs-redhat<br/>deleted file mode 100644<br/>index 4d0de8223..000000000<br/>--- a/<a href='/software/drakx/tree/docs/mdk-vs-redhat?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/mdk-vs-redhat</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-+ Open Development (at least DrakX)</div><div class='del'>-+ UDMA66 (HPT366)</div><div class='del'>-+ gamerz</div><div class='del'>-+ number of packages</div><div class='del'>-+ better packages(?)</div><div class='del'>-+ no automatic handling of ide burners</div><div class='del'>-+ urpmi/rpmdrake</div><div class='del'>-+ XFdrake</div><div class='del'>-+ no newbie install</div><div class='del'>-+ reiserfs</div><div class='del'>-+ fat resizing</div><div class='del'>-+ 3D handling (eg: Voodoo3)</div><div class='del'>-+ diskdrake (vs diskdruid)</div><div class='del'>-+ usb storage (?)</div><div class='del'>-+ KDE2</div><div class='del'>-+ faces in kdm/gdm</div><div class='del'>-+ menu</div><div class='del'>-+ alternatives</div><div class='del'>-+ /etc/emacs/site-start.d</div><div class='del'>-+ default config</div><div class='del'>-+ i18n (bootloader keyboard)</div><div class='del'>-</div><div class='del'>-+ More user-friendliness in general:</div><div class='del'>-	+ you can choose between multiple net devices when more than one are</div><div class='del'>-	detected</div><div class='del'>-	+ you are presented with the media descriptions (disks, cdrom's)</div><div class='del'>-	when you must choose between multiple media, and not only "sda",</div><div class='del'>-	"hdc", ..</div><div class='del'>-	+ when installing from a disk partition, you are presented with an</div><div class='del'>-	extract of the directory contents when you fail to give the</div><div class='del'>-	correct location, which is very helpful to correct the input</div><div class='del'>-	instead of simply rebooting to remember where on earth you</div><div class='del'>-	mirrored the distribution on your disks</div><div class='del'>-</div><div class='del'>-+ Automatic mode (Redhat's equivalent is called "kickstart") is not</div><div class='del'>-  performed according to a file on the floppy but from kernel parameters,</div><div class='del'>-  which have many pros, among them: (1) we don't need the vfat filesystem</div><div class='del'>-  for that purpose, and (2) with advanced bootloaders such as grub and</div><div class='del'>-  lilo you can edit parameters on the fly at boot time.</div><div class='del'>-</div><div class='del'>-- no LABEL= in fstab (for auto renumbering of devices)</div><div class='del'>-- kerberos</div><div class='del'>-- LDAP</div><div class='head'>diff --git a/docs/net_object_class.fig b/docs/net_object_class.fig<br/>deleted file mode 100644<br/>index 19f7f5318..000000000<br/>--- a/<a href='/software/drakx/tree/docs/net_object_class.fig?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/net_object_class.fig</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,73 +0,0 @@</div><div class='del'>-#FIG 3.2</div><div class='del'>-Landscape</div><div class='del'>-Center</div><div class='del'>-Inches</div><div class='del'>-Letter  </div><div class='del'>-100.00</div><div class='del'>-Single</div><div class='del'>--2</div><div class='del'>-1200 2</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4050 4162 675 338 4050 4162 4725 4500</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 5700 3112 675 338 5700 3112 6375 3450</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 7275 4087 675 338 7275 4087 7950 4425</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4800 1462 975 487 4800 1462 5775 1950</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 2700 3112 675 338 2700 3112 3375 3450</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4875 5887 975 487 4875 5887 5850 6375</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 9450 5062 675 338 9450 5062 10125 5400</div><div class='del'>-1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 4654 4038 3900 3225 4654 4038 754 813</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 4125 1875 3225 2850</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 4575 1950 4200 3750</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 5250 1950 5475 2775</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 3000 3450 3600 3900</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 5925 3450 6675 3900</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 2700 3450 4050 5550</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 4125 4500 4575 5400</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 5625 3450 5025 5400</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 5775 1575 9450 4725</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 7800 4275 9000 4800</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 4800 1950 4800 5400</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 9000 975 9450 4725</div><div class='del'>-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5</div><div class='del'>-	 7500 75 10687 75 10687 975 7500 975 7500 75</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 7500 375 5400 1050</div><div class='del'>-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2</div><div class='del'>-	0 0 1.00 60.00 120.00</div><div class='del'>-	 5550 1800 7200 3675</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 885 4350 1500 Netconnect\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 435 2475 3150 ISDN\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 720 3675 4200 MODEM\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 960 6825 4125 ETHERNET\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 480 5400 3150 ADSL\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 420 4650 5925 Tools\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 660 9150 5100 Network\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 135 1305 8400 375 Rest of the world\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 180 2595 7725 600 (draknet, printerdrake, tinyfirewall\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 180 2310 7725 825 ftp, http, net_monitor, drakgw)\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 195 2760 3525 6825 Global variables $in, $prefix, $install\001</div><div class='del'>-4 0 0 50 0 0 12 0.0000 4 180 2340 3525 7050 shared with the module globals\001</div><div class='head'>diff --git a/docs/object_class.fig b/docs/object_class.fig<br/>deleted file mode 100644<br/>index 44fd3fe89..000000000<br/>--- a/<a href='/software/drakx/tree/docs/object_class.fig?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/object_class.fig</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#FIG 3.2</div><div class='del'>-Landscape</div><div class='del'>-Center</div><div class='del'>-Inches</div><div class='del'>-Letter  </div><div class='del'>-100.00</div><div class='del'>-Single</div><div class='del'>--2</div><div class='del'>-1200 2</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 2625 1200 2625 1725</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 7575 1125 7575 1650</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 7575 2100 4350 3225</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 5025 2025 4350 3225</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 2625 2100 4350 3225</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 5025 2025 6075 4125</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 2625 1200 4950 1725</div><div class='del'>-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2</div><div class='del'>-	 7575 1125 4950 1725</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 1755 1800 1050 install_steps_gtk\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 1440 6900 975 install_steps_stdio\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 1140 2100 1950 interactive_gtk\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 1275 6900 1950 interactive_stdio\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 1875 4125 1950 install_steps_interactive\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 135 810 3975 3450 interactive\001</div><div class='del'>-4 0 0 100 0 0 12 0.0000 4 180 975 5625 4350 install_steps\001</div><div class='head'>diff --git a/docs/spec-DrakX-8.0.html b/docs/spec-DrakX-8.0.html<br/>deleted file mode 100644<br/>index 3fd545447..000000000<br/>--- a/<a href='/software/drakx/tree/docs/spec-DrakX-8.0.html?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/spec-DrakX-8.0.html</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,405 +0,0 @@</div><div class='del'>-&lt;html&gt;&lt;head&gt;&lt;title&gt;DrakX Specification for Linux-Mandrake 8.0&lt;/title&gt;&lt;/head&gt;</div><div class='del'>-&lt;body bgcolor="#FFFFFF" link="#0066FF" vlink="#0066FF" alink="#FF0000"&gt;</div><div class='del'>-&lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt;</div><div class='del'>-&lt;tr&gt;</div><div class='del'>-&lt;td bgcolor="#99AAFF"&gt;&lt;h2 align="left"&gt;DrakX Specification for Linux-Mandrake 8.0&lt;/h2&gt;&lt;/td&gt;&lt;/tr&gt;</div><div class='del'>-&lt;tr&gt;&lt;td valign="top"&gt;</div><div class='del'>-Current team of Install group is :</div><div class='del'>-&lt;p&gt;</div><div class='del'>-&lt;table cellpadding="2" cellspacing="2" border="1" width="30%"&gt;</div><div class='del'>-&lt;tbody&gt;</div><div class='del'>-&lt;tr valign="Top"&gt;</div><div class='del'>-&lt;td valign="Top"&gt;gc</div><div class='del'>-</div><div class='del'>-&lt;/td&gt;</div><div class='del'>-&lt;/tr&gt;</div><div class='del'>-&lt;tr valign="Top"&gt;</div><div class='del'>-&lt;td valign="Top"&gt;damien</div><div class='del'>-</div><div class='del'>-&lt;/td&gt;</div><div class='del'>-&lt;/tr&gt;</div><div class='del'>-&lt;tr valign="Top"&gt;</div><div class='del'>-&lt;td valign="Top"&gt;fpons</div><div class='del'>-</div><div class='del'>-&lt;/td&gt;</div><div class='del'>-&lt;/tr&gt;</div><div class='del'>-&lt;tr valign="Top"&gt;</div><div class='del'>-&lt;td valign="Top"&gt;pixel</div><div class='del'>-</div><div class='del'>-&lt;/td&gt;</div><div class='del'>-&lt;/tr&gt;</div><div class='del'>-&lt;/tbody&gt;</div><div class='del'>-&lt;/table&gt;</div><div class='del'>-&lt;p&gt;</div><div class='del'>-</div><div class='del'>-&lt;pre&gt;</div><div class='del'>-</div><div class='del'>-  &lt;b&gt;Boot process (stage1)&lt;/b&gt;</div><div class='del'>-</div><div class='del'>-    Installation begin by booting from CD-ROM or Diskette. From CD-ROM all</div><div class='del'>-installation method are available (CD, HD, NFS, FTP, HTTP) on options. From</div><div class='del'>-Diskette according to image selected, only some related method (network or cdrom</div><div class='del'>-or hd) are available and module managed due to size limitation to 1.44Mb.</div><div class='del'>-    Options are always available by pressing on F1.</div><div class='del'>-</div><div class='del'>-  &lt;b&gt;DrakX process (stage2)&lt;/b&gt;</div><div class='del'>-</div><div class='del'>-    DrakX installation organized in steps (execution sequence described below).</div><div class='del'>-Steps listed on left side and help available on bottom right side. most of the</div><div class='del'>-screen is available for various dialog for interacting with the user. Steps</div><div class='del'>-execution sequence is automated and described below.</div><div class='del'>-</div><div class='del'>-Mouse is probed and if none has been found or if the mouse has not moved, a</div><div class='del'>-specific mouse configuration is displayed at the begining.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Before the graphical steps, there is a detection step. It detects various</div><div class='del'>-hardware, including modems (from tty0 to tty7), mouse (serial, usb, ps/2) and</div><div class='del'>-tablets.</div><div class='del'>-</div><div class='del'>-    &lt;b&gt;Steps&lt;/b&gt;</div><div class='del'>-</div><div class='del'>-      &lt;i&gt;Choose Your language&lt;/i&gt;: step always displayed. default choice is previous one or</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;English&lt;/i&gt;&lt;/font&gt;. After choosing a language, a license splash screen translated in the</div><div class='del'>-chosen language is displayed with &lt;font color="#000080"&gt;&lt;i&gt;Accept&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Refuse&lt;/i&gt;&lt;/font&gt; buttons. &lt;font color="#000080"&gt;&lt;i&gt;Refuse&lt;/i&gt;&lt;/font&gt; should</div><div class='del'>-stop installation. &lt;font color="#000080"&gt;&lt;i&gt;Accept&lt;/i&gt;&lt;/font&gt; validate language choice which are propagated to all</div><div class='del'>-DrakX visible widget. Advanced mode allow to select other language available to</div><div class='del'>-be installed. Advanced mode allow to select language which will be installed on</div><div class='del'>-system.</div><div class='del'>-      If step is redone, the license is no more displayed.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Select Install Class&lt;/i&gt;&lt;/font&gt;: step always displayed. default choice is previous one</div><div class='del'>-or &lt;font color="#000080"&gt;&lt;i&gt;Recommended&lt;/i&gt;&lt;/font&gt;. Only one other option available is &lt;font color="#000080"&gt;&lt;i&gt;Customized&lt;/i&gt;&lt;/font&gt;. Two buttons</div><div class='del'>-available are &lt;font color="#000080"&gt;&lt;i&gt;Install&lt;/i&gt;&lt;/font&gt; or &lt;font color="#000080"&gt;&lt;i&gt;Upgrade&lt;/i&gt;&lt;/font&gt;. Available steps (left side) are changed</div><div class='del'>-according to installation class selected, where the default is the one of</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Recommended&lt;/i&gt;&lt;/font&gt; with &lt;font color="#000080"&gt;&lt;i&gt;Install&lt;/i&gt;&lt;/font&gt;.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Hard Drive Detection&lt;/i&gt;&lt;/font&gt;: step always displayed. In recommended mode,</div><div class='del'>-automatically done. In Customized mode, all modules that manage SCSI/IDE cards</div><div class='del'>-are loaded automatically and a question asking for other module to load is</div><div class='del'>-displayed.</div><div class='del'>-      If clicked later or if to the question to load other module the</div><div class='del'>-answer is &lt;font color="#000080"&gt;&lt;i&gt;Yes&lt;/i&gt;&lt;/font&gt;, a list of module is displayed (or if the question to other</div><div class='del'>-module to load is. When a module is chosen, two options are available</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Autoprobe&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Specify options&lt;/i&gt;&lt;/font&gt;. Autoprobe try to load the module without any</div><div class='del'>-other user options (default module parameter). Specify options allow user to</div><div class='del'>-give module parameters individually in a list for all known parameters. At this</div><div class='del'>-point &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; or &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; are available, Cancel should stop the module installation</div><div class='del'>-and go to next step. If any error occurs during module installation, a question</div><div class='del'>-asking to try with other parameter is displayed, the same module is still used.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Setup filesystems&lt;/i&gt;&lt;/font&gt;: step always displayed. display a list of available choice</div><div class='del'>-accoding to what has been probed. May contains &lt;font color="#000080"&gt;&lt;i&gt;Use free space&lt;/i&gt;&lt;/font&gt;, "Use existing</div><div class='del'>-partition&lt;font color="#000080"&gt;&lt;i&gt;, &lt;/i&gt;&lt;/font&gt;Use the window partition for loopback&lt;font color="#000080"&gt;&lt;i&gt;, &lt;/i&gt;&lt;/font&gt;Use the free space on the</div><div class='del'>-Windows partition&lt;font color="#000080"&gt;&lt;i&gt;, &lt;/i&gt;&lt;/font&gt;Remove Windows(TM)&lt;font color="#000080"&gt;&lt;i&gt;|&lt;/i&gt;&lt;/font&gt;Erase entire disk" (according to disk</div><div class='del'>-configuration =&amp;gt; only one big fat for the first case only), "Custom disk</div><div class='del'>-partitioning".</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Use free space&lt;/i&gt;&lt;/font&gt; mode, auto allocation in available on available disk.</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Use existing partition&lt;/i&gt;&lt;/font&gt; mode, a list of partition named in Linux</div><div class='del'>-scheme are displayed with their approximate size in Mb and propose mount point</div><div class='del'>-to choose in list boxes for each partitions available on hard drive.</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Use the window partition for loopback&lt;/i&gt;&lt;/font&gt; mode, DrakX use available size</div><div class='del'>-on the windows partition to create a root file and a swap file which will be</div><div class='del'>-used in loopback, this means this is a lnx4win installation.</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Use the free space on the Windows partition&lt;/i&gt;&lt;/font&gt; mode, DrakX will resize</div><div class='del'>-the windows partition and allocate true linux filesystem (at least / and swap).</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Remove Windows(TM)&lt;/i&gt;&lt;/font&gt;|&lt;font color="#000080"&gt;&lt;i&gt;Erase entire disk&lt;/i&gt;&lt;/font&gt; mode, DrakX clean the</div><div class='del'>-partition table before auto allocating partition.</div><div class='del'>-      If &lt;font color="#000080"&gt;&lt;i&gt;Custom disk partitioning&lt;/i&gt;&lt;/font&gt; mode, diskdrake is launch. TO BE DEFINED to</div><div class='del'>-change make diskdrake use only advanced mode.</div><div class='del'>-Diskdrake show all partition of all non-removable disk graphically. All special</div><div class='del'>-partition are hidden, only user accessible partition are visible: this remove</div><div class='del'>-extended partition, whole disk partition on sparc platform. Clicking on a disk</div><div class='del'>-notebook tab show all his partitions. Clicking on a partition show all actions</div><div class='del'>-available for this partition (depend if customized or advanced mode) as well as</div><div class='del'>-information on this partition (depend if customized or advanced mode). Most</div><div class='del'>-diskdrake operation are done without writing on disk (exception are Resizing</div><div class='del'>-partitions) and everything is written once on the disk when exiting diskdrake,</div><div class='del'>-at any time if writing partition table is necessary, there are always a dialog</div><div class='del'>-box asking the user to confirm the write. If no operation are modifying</div><div class='del'>-partition table, no dialog is displayed on exit (for example if giving mount</div><div class='del'>-point to partition). General action are available too:</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Clear All&lt;/i&gt;&lt;/font&gt;: clear all partition of the given disk.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Auto allocate&lt;/i&gt;&lt;/font&gt;: try to allocate partition in available disk (not the</div><div class='del'>-seen disk).</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Undo&lt;/i&gt;&lt;/font&gt;: undo last operation.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Done&lt;/i&gt;&lt;/font&gt;: quit and save changes.</div><div class='del'>-Other operations are available in advanced mode:</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Rescue partition table&lt;/i&gt;&lt;/font&gt;: try to rescue a lost partition table,</div><div class='del'>-absolutely no garantee to succeed and may destroy what could be saveable by</div><div class='del'>-another tools.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Reload&lt;/i&gt;&lt;/font&gt;: reload partition table from disk, erasing all changes in</div><div class='del'>-memory done by the user.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Wizard&lt;/i&gt;&lt;/font&gt;: go to partition wizard, that the partition filesystems default</div><div class='del'>-behaviour on startup.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Restore from floppy&lt;/i&gt;&lt;/font&gt;: restore a partition table from previously saved</div><div class='del'>-partition table from diskdrake.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Save to floppy&lt;/i&gt;&lt;/font&gt;: save partition table to floppy.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Options&lt;/i&gt;&lt;/font&gt;: global options available for filesystem configuration. This</div><div class='del'>-include &lt;font color="#000080"&gt;&lt;i&gt;Removable media automouting supermount&lt;/i&gt;&lt;/font&gt; check box disabled by default.</div><div class='del'>-      Operation available on partition are:</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Mount point&lt;/i&gt;&lt;/font&gt;: change or define mount point for partition, only</div><div class='del'>-available for true filesystem partition.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Resize&lt;/i&gt;&lt;/font&gt;: resize partition, if a specific algorithm to keep data is</div><div class='del'>-used no data may be lost, else all data are lost but nothing is written by</div><div class='del'>-diskdrake on the partition data in this last case (this means data can be</div><div class='del'>-restored by restoring original size and location).</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Delete&lt;/i&gt;&lt;/font&gt;: delete partition, if the same partition is created (same type,</div><div class='del'>-location, size) all data can be restored as diskdrake doesn't write on partition</div><div class='del'>-data.</div><div class='del'>-      Operation available on partition table but in advanced mode are:</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Type&lt;/i&gt;&lt;/font&gt;: change type of partition, all data will be lost but diskdrake as</div><div class='del'>-above does not destroy them, and everyting can be restored.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Format&lt;/i&gt;&lt;/font&gt;: format partition, at this point, all data ARE LOST.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Mount&lt;/i&gt;&lt;/font&gt;: mount partition now, usefull for swap to increase memory</div><div class='del'>-capacity for machine low on resource that are not available to complete setup</div><div class='del'>-filesystem step correctly (problably if a resize partition is used on FAT fs).</div><div class='del'>-allow Mounting swap on customized mode too.</div><div class='del'>-      A legend for partition type colors is available</div><div class='del'>-(Ext2,ReiserFS,Swap,FAT,Other,Empty). It has additionnal features to create a</div><div class='del'>-partition or change its type (only available in advanced mode).</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Format partitions&lt;/i&gt;&lt;/font&gt;: step always displayed. display list of partition to</div><div class='del'>-format with click boxes. Some are defined according to type of partitions and if</div><div class='del'>-the partition has been created or taken back.</div><div class='del'>-If a partition has already been formated, it is not proposed, or if it should</div><div class='del'>-not be proposed (alrady existing partition like /mnt/windows).</div><div class='del'>-On Advanced tag, an additional dialog is displayed to select partition to format</div><div class='del'>-(all available partition listed) and to format them with bad block checking.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Choose packages&lt;/i&gt;&lt;/font&gt;: step always displayed. default selection done to be</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;correct&lt;/i&gt;&lt;/font&gt; according to size available, Install or Upgrade, Hardware available.</div><div class='del'>-This selection is done according to &lt;font color="#000080"&gt;&lt;i&gt;Mandrake first choice&lt;/i&gt;&lt;/font&gt; of packages.</div><div class='del'>-On all mode, display groups and main desktop used (KDE or Gnome), an</div><div class='del'>-individual package selection check box is available to allow selecting package</div><div class='del'>-individually. In this case, a dialog displaying a tree with groups, (Mandrake</div><div class='del'>-first choice/alternatives) and packages is shown on the left part, a description</div><div class='del'>-window for each packages is shown on the right part.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Install system&lt;/i&gt;&lt;/font&gt;: step always displayed. no interactive and display</div><div class='del'>-installation progression. include if available and on a CD basis a spash screen</div><div class='del'>-of advertising and other (pub!).</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Hardware panel&lt;/i&gt;&lt;/font&gt;: step always displayed. show current configuration for</div><div class='del'>-Mouse, Keyboard, TimeZone, Graphic/TV Card, Monitor.</div><div class='del'>-At each values chosen (list boxes displayed a</div><div class='del'>-synthesis description) the current dialog is removed from screen and specific</div><div class='del'>-configuration panels are displayed (like currently for mouse, keyboard ...).</div><div class='del'>-And end of these specific configuration panels, this one is remapped on screen</div><div class='del'>-to be accepted in general.</div><div class='del'>-</div><div class='del'>-      &lt;b&gt;Sub steps of Hardware panel:&lt;/b&gt;</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure mouse&lt;/i&gt;&lt;/font&gt;: displayed on request or if the mouse has not been</div><div class='del'>-moved (so unsafe detection), but have to be displayed earlier. A mouse tree</div><div class='del'>-selection for type is displayed with default case as what is probed or</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;serial/Generic 2 button Mouse&lt;/i&gt;&lt;/font&gt; if none has been probed. &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; disable mouse</div><div class='del'>-modification and &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; allow next mouse configuration dialog. Then comes a serial</div><div class='del'>-port dialog for serial mice (default mouse connected to COM1 if nothing found).</div><div class='del'>-Then a mouse screen control is chown (according to mouse capacity: 3 buttons</div><div class='del'>-with or without mouse, need 7 buttons checking ?). Here &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; validate to go to</div><div class='del'>-next step and &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; to first mouse dialog displayed (mouse tree selection for</div><div class='del'>-type).</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure keyboard&lt;/i&gt;&lt;/font&gt;: displayed on request. default is set according to</div><div class='del'>-TimeZone definition (itself defaulting to language selection at the beginning).</div><div class='del'>-A list of keyboard is shown to the user and &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; validates change and return to</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Hardware panel&lt;/i&gt;&lt;/font&gt; dialog with enabled change. &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; abort any modification and</div><div class='del'>-return to the same &lt;font color="#000080"&gt;&lt;i&gt;Hardware panel&lt;/i&gt;&lt;/font&gt; dialog.</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure timezone&lt;/i&gt;&lt;/font&gt;: displayed on request. default is set according to</div><div class='del'>-language selection. A timezone tree selection is shown with only the subtree</div><div class='del'>-corresponding to the current selection expanded (as other tree dialog). &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-validates change and return to &lt;font color="#000080"&gt;&lt;i&gt;Hardware panel&lt;/i&gt;&lt;/font&gt; dialog whereas &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; avoid</div><div class='del'>-the change before returning to the same main dialog.</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Graphic Card&lt;/i&gt;&lt;/font&gt;: display graphic card probed. No change available.</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;TV Card&lt;/i&gt;&lt;/font&gt;: display TV/Tuner card probed. No change available.</div><div class='del'>-</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Monitor&lt;/i&gt;&lt;/font&gt;: need execution of ddcxinfos at this point. Only Size, Max</div><div class='del'>-resolution and depth displayed. No change available.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-      Miscellaneous step have been removed and dispatched to other steps. "Use</div><div class='del'>-hard drive optimisation&lt;font color="#000080"&gt;&lt;i&gt; and &lt;/i&gt;&lt;/font&gt;Enable num lock at startup&lt;font color="#000080"&gt;&lt;i&gt; are removed. &lt;/i&gt;&lt;/font&gt;Choose</div><div class='del'>-security level&lt;font color="#000080"&gt;&lt;i&gt; is moved to security step. &lt;/i&gt;&lt;/font&gt;Precise RAM size if needed" and</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Clean /tmp at each boot&lt;/i&gt;&lt;/font&gt; are moved to bootloader step.</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Removable media automouting&lt;/i&gt;&lt;/font&gt; is moved to diskdrake options.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Security&lt;/i&gt;&lt;/font&gt;: step displayed only in customized mode. TO BE DEFINED. should</div><div class='del'>-display at least securty level to choose. level are &lt;font color="#000080"&gt;&lt;i&gt;Low&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Medium&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;High&lt;/i&gt;&lt;/font&gt; and</div><div class='del'>-for advanced there are &lt;font color="#000080"&gt;&lt;i&gt;Welcome To Crackers&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Poor&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Paranoid&lt;/i&gt;&lt;/font&gt; too.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Configure networking&lt;/i&gt;&lt;/font&gt;: step always displayed. dialog always displayed in</div><div class='del'>-both &lt;font color="#000080"&gt;&lt;i&gt;Recommended&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Customized&lt;/i&gt;&lt;/font&gt; mode. A list of network configuration</div><div class='del'>-entries are shown with the following:</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure a normal modem connection&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure an ISDN connection&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-        "Configure a DSL (or ADSL) connection</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure a cable connection&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure local network&lt;/i&gt;&lt;/font&gt;|&lt;font color="#000080"&gt;&lt;i&gt;Reconfigure local network&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Disable networking&lt;/i&gt;&lt;/font&gt;|&lt;font color="#000080"&gt;&lt;i&gt;Enable networking&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Done&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-      By cliking on a specific item, another dialog is displayed to configure</div><div class='del'>-some specific part of the network.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure a normal modem connection&lt;/i&gt;&lt;/font&gt;: display a question to probe for a</div><div class='del'>-modem if not already detected, then if none are found or probe has been refused</div><div class='del'>-a list of possible serial device are listed (in the form ttySx / COM(x+1) with</div><div class='del'>-the current mouse device removed if it is serial). After that a dialog including</div><div class='del'>-all parameters than can be used is shown. This includes &lt;font color="#000080"&gt;&lt;i&gt;Connection Name&lt;/i&gt;&lt;/font&gt;,</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Phone number&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Login ID&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Password&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Authentication&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Domain name&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;DNS 1&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-and &lt;font color="#000080"&gt;&lt;i&gt;DNS 2&lt;/i&gt;&lt;/font&gt;. Authentication is a combo of &lt;font color="#000080"&gt;&lt;i&gt;PAP&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Termina-Based&lt;/i&gt;&lt;/font&gt; and</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Script-Based&lt;/i&gt;&lt;/font&gt; (It seems necessary to get CHAP back on this one, no way of</div><div class='del'>-testing TO BE DEFINED). If no DNS are given, the connection is configured to try</div><div class='del'>-using provider DNS. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; button are available.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure an ISDN connection&lt;/i&gt;&lt;/font&gt;:</div><div class='del'>-Try to detect some PCI card. If not detected, asks if it's a ISA/pcmcia or PCI</div><div class='del'>-card, and gives the list of the cards. Information are then asked: </div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Card IRQ&lt;/i&gt;&lt;/font&gt; only if ISA/pcmcia</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Card mem (DMA)&lt;/i&gt;&lt;/font&gt; only if ISA/pcmcia</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Card IO&lt;/i&gt;&lt;/font&gt; only if ISA/pcmcia</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Card IO_0&lt;/i&gt;&lt;/font&gt; only if ISA/pcmcia with io0</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Card IO_1&lt;/i&gt;&lt;/font&gt; only if ISA/pcmcia with io1</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Your personal phone number&lt;/i&gt;&lt;/font&gt; phone</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider name (ex provider.net)&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider phone number&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider dns 1&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider dns 2&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Dialing mode&lt;/i&gt;&lt;/font&gt; auto or manual</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Account Login (user name)&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Account Password&lt;/i&gt;&lt;/font&gt; hided</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Confirm Password&lt;/i&gt;&lt;/font&gt; again</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure a DLS (or ADSL) connection&lt;/i&gt;&lt;/font&gt;:</div><div class='del'>-The user chooses between pptp, pppoe and dhcp. If dhcp, redirection to LAN.</div><div class='del'>-If there is more than one ethernet card, The user must choose the card to use</div><div class='del'>-(displayed with the module). After that, some informations are asked:</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider name (ex provider.net)&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider dns 1&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Provider dns 2&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Account Login (user name)&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Account Password&lt;/i&gt;&lt;/font&gt; hided</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Confirm Password&lt;/i&gt;&lt;/font&gt; again</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure a cable connection&lt;/i&gt;&lt;/font&gt;: redirection to LAN</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Configure local network&lt;/i&gt;&lt;/font&gt;: display what has been probed with a question</div><div class='del'>-about using another module and &lt;font color="#000080"&gt;&lt;i&gt;Yes&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;No&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;See hardware info&lt;/i&gt;&lt;/font&gt; buttons.</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;No&lt;/i&gt;&lt;/font&gt; is the default. If &lt;font color="#000080"&gt;&lt;i&gt;Yes&lt;/i&gt;&lt;/font&gt; is clicked a list of modules is displayed with</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; or &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; buttons available. &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; should go back to previous</div><div class='del'>-question. If &lt;font color="#000080"&gt;&lt;i&gt;See hardware info&lt;/i&gt;&lt;/font&gt; is clicked a list of probed hardware is</div><div class='del'>-displayed. If &lt;font color="#000080"&gt;&lt;i&gt;Yes&lt;/i&gt;&lt;/font&gt; is clicked, for each ethernet interface, a dialog asking for</div><div class='del'>-IP address, Netmask and Automatic IP check box (DHCP/BOOTP) is displayed. Then</div><div class='del'>-if DHCP has been chosen, only a dialog asking for Host name and another for HTTP</div><div class='del'>-proxy and FTP proxy if any. If DHCP has not been chosen, an IP address has to be</div><div class='del'>-defined and a dialog including &lt;font color="#000080"&gt;&lt;i&gt;Host name&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;DNS server&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Gateway&lt;/i&gt;&lt;/font&gt; and "Gateway</div><div class='del'>-device" is displayed. Then the same HTTP proxy and FTP proxy dialog as above. As</div><div class='del'>-network configuration may to have been reworked a bit it has TO BE DEFINED if</div><div class='del'>-this is kept like that or not.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Disable networking&lt;/i&gt;&lt;/font&gt;|&lt;font color="#000080"&gt;&lt;i&gt;Enable networking&lt;/i&gt;&lt;/font&gt; is just a way to toggle</div><div class='del'>-networking on or off, may be to be accessible only for advanced mode.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Quit&lt;/i&gt;&lt;/font&gt; exit the network step.</div><div class='del'>-</div><div class='del'>-&lt;b&gt;NETWORK ADVANCED DOCUMENTATION:&lt;/b&gt;</div><div class='del'>-Here is a list of entry points available in post install without using the ugly</div><div class='del'>-install graphic toolkit:</div><div class='del'>-</div><div class='del'>-&lt;a href=&lt;font color="#000080"&gt;&lt;i&gt;http://www.mandrakesoft.com/~damien/html/draknet_advanced_doc.txt&lt;/i&gt;&lt;/font&gt;&gt;http://www.mandrakesoft.com/~damien/html/draknet_advanced_doc.txt&lt;/a&gt;</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Configure Printer&lt;/i&gt;&lt;/font&gt;: step always displayed. In recommended mode, only</div><div class='del'>-activated if a local printer is detected, else no printer are configured by</div><div class='del'>-default. In customized mode or if the step has been clicked a list of printer</div><div class='del'>-already configured is displayed and the possibility to add or exit the</div><div class='del'>-configuration. It allow configuration of printers for both LPR and CUPS</div><div class='del'>-individually (available by advanced mode when adding a printer). Printer</div><div class='del'>-protocol managed are local/usb/samba/ncp/lpd for LPR and</div><div class='del'>-local/usb/serial/samba/lpd/cups_network for CUPS.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Set root password&lt;/i&gt;&lt;/font&gt;: step always displayed for Install only. In</div><div class='del'>-recommended mode display only a &lt;font color="#000080"&gt;&lt;i&gt;Password&lt;/i&gt;&lt;/font&gt; entry and a &lt;font color="#000080"&gt;&lt;i&gt;Password (again)&lt;/i&gt;&lt;/font&gt; entry</div><div class='del'>-to select the root password. In advanced mode, a Use NIS (yellow pages) check</div><div class='del'>-boxes and Use MD5 check box are available. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; validate root password and "No</div><div class='del'>-password&lt;font color="#000080"&gt;&lt;i&gt; avoid setting a password. &lt;/i&gt;&lt;/font&gt;No password&lt;font color="#000080"&gt;&lt;i&gt; is only available in &lt;/i&gt;&lt;/font&gt;Low"</div><div class='del'>-security level or less. The length of the minimal password depend upon security level.</div><div class='del'>-</div><div class='del'>-In corporate firewall :</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Set admin password&lt;/i&gt;&lt;/font&gt;: step always displayed for Install only. It only</div><div class='del'>-      displays a &lt;font color="#000080"&gt;&lt;i&gt;Password&lt;/i&gt;&lt;/font&gt; entry and a &lt;font color="#000080"&gt;&lt;i&gt;Password (again)&lt;/i&gt;&lt;/font&gt; entry</div><div class='del'>-to select the admin password. </div><div class='del'>-The length of the minimal password depend upon security level. (double of the</div><div class='del'>-      security level)</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Add a user&lt;/i&gt;&lt;/font&gt;: step always displayed for Install Only. In recommend mode</div><div class='del'>-display &lt;font color="#000080"&gt;&lt;i&gt;Real name&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;User name&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Password&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Password (again)&lt;/i&gt;&lt;/font&gt; and icon</div><div class='del'>-choices as graphical. For customized mode a shell combo is available to choose a</div><div class='del'>-specific shell for the user depending on the package installed. The real name is</div><div class='del'>-the user friendly name of the user whereas user name is its login id name. The</div><div class='del'>-box display user that have already been added below the title. &lt;font color="#000080"&gt;&lt;i&gt;Accept user&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-button allow the creation of the user and &lt;font color="#000080"&gt;&lt;i&gt;Done&lt;/i&gt;&lt;/font&gt; finish this step. High or</div><div class='del'>-higher security level implies the creation of at least one user. Password length</div><div class='del'>-are subject to same restriction according to security level. In advanced mode,</div><div class='del'>-allow to choose the user in auto login mode.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Create a boot disk&lt;/i&gt;&lt;/font&gt;: step always displayed. In recommended mode this</div><div class='del'>-step is automatically done by doing nothing. If clicked or customized mode, the</div><div class='del'>-user is prompted to allow building a boot disk (default is yes). In advanced</div><div class='del'>-mode allow selection of floppy drive.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Install boot loader&lt;/i&gt;&lt;/font&gt;: step always displayed. In recommended mode this</div><div class='del'>-step is automatically done. In customized mode, a combo &lt;font color="#000080"&gt;&lt;i&gt;Boot device&lt;/i&gt;&lt;/font&gt; list the</div><div class='del'>-various boot device that can be used where the bootloader can be installed. The</div><div class='del'>-boot device can the Linux description of the whole disk available (ex: /dev/hda)</div><div class='del'>-or partition available in these disk or floppy drives. Other platform</div><div class='del'>-specificity are not listed here.</div><div class='del'>-      LBA check box is displayed in advanced mode (enabled by default) to</div><div class='del'>-allow using LBA addressing if available (PC with LILO). bootloader combo to</div><div class='del'>-select a given bootloader to use, available choice are &lt;font color="#000080"&gt;&lt;i&gt;Grub&lt;/i&gt;&lt;/font&gt;, "LILO with text</div><div class='del'>-menu&lt;font color="#000080"&gt;&lt;i&gt;, &lt;/i&gt;&lt;/font&gt;LILO with graphical menu&lt;font color="#000080"&gt;&lt;i&gt;. default chosen is &lt;/i&gt;&lt;/font&gt;LILO</div><div class='del'>-with graphical menu&lt;font color="#000080"&gt;&lt;i&gt;. &lt;/i&gt;&lt;/font&gt;Delay before booting default image" entry</div><div class='del'>-field is available with default value current setting (upgrade) or 5 else.</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Precise RAM size if needed (found xx MB)&lt;/i&gt;&lt;/font&gt; entry is displayed too,</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;clean /tmp&lt;/i&gt;&lt;/font&gt; check box is disabled by default too.</div><div class='del'>-Boot in graphical mode (init 5) is available here in advanced mode too</div><div class='del'>-(previously in X configuration). &lt;font color="#000080"&gt;&lt;i&gt;Video mode&lt;/i&gt;&lt;/font&gt; combo, &lt;font color="#000080"&gt;&lt;i&gt;Password&lt;/i&gt;&lt;/font&gt;, &lt;font color="#000080"&gt;&lt;i&gt;Password (again)&lt;/i&gt;&lt;/font&gt;,</div><div class='del'>-&lt;font color="#000080"&gt;&lt;i&gt;Restrict command line options&lt;/i&gt;&lt;/font&gt; check box is displayed.</div><div class='del'>-Video mode combo list text mode and video mode used for frame buffer, video mode</div><div class='del'>-used for frame buffer are available only if the install managed to boot with</div><div class='del'>-frame buffer activated. Password are restricted according to security level as</div><div class='del'>-other password. Password are mandatory according to security level TO BE DEFINED.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Configure X&lt;/i&gt;&lt;/font&gt;: step always displayed. By default on recommended mode,</div><div class='del'>-everything is done automatically if possible up to test of graphic card, and if</div><div class='del'>-the user accept the settings no more question are asked to him. In customized</div><div class='del'>-mode a dialog is displayed to choose resolution, color depth and which version</div><div class='del'>-of XFree (with 3D optionally) is available for the current card where only a</div><div class='del'>-short description is displayed. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; button allow to jump to test phase (for the</div><div class='del'>-first time only) if available. &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; return to main XFree configuration</div><div class='del'>-window allowing to change Monitor, Graphic card, Server options or Resolution</div><div class='del'>-with X version to choose. &lt;font color="#000080"&gt;&lt;i&gt;Show all&lt;/i&gt;&lt;/font&gt; extend resolution list to more resolutions</div><div class='del'>-according to card (with onboard memory) only and no more monitor capabilities.</div><div class='del'>-      The main dialog is a list of command to change some X configuration aspect</div><div class='del'>-according to advanced mode or not :</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Change Monitor&lt;/i&gt;&lt;/font&gt;: display a tree selection of monitors where default one</div><div class='del'>-is selected. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; buttons are available.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Change Graphic card&lt;/i&gt;&lt;/font&gt;: display a tree selection of graphic card where</div><div class='del'>-default one is selected. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; buttons are available. If &lt;font color="#000080"&gt;&lt;i&gt;Unlisted&lt;/i&gt;&lt;/font&gt;</div><div class='del'>-is chosen, then a tree of server/driver is displayed containing available server</div><div class='del'>-for XF3 or driver for XF4. &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; return to main window and &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; validates</div><div class='del'>-change.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Change Server options&lt;/i&gt;&lt;/font&gt;: available only in advanced mode. display list</div><div class='del'>-of check boxes options for server currently used. &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; and &lt;font color="#000080"&gt;&lt;i&gt;Cancel&lt;/i&gt;&lt;/font&gt; available.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Change Resolution&lt;/i&gt;&lt;/font&gt;: change resolution and depth including with X server</div><div class='del'>-version chosen (relative to Xdrakres too).</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Show Information&lt;/i&gt;&lt;/font&gt;: display an information dialog showing current</div><div class='del'>-configuration internals of X.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Test again&lt;/i&gt;&lt;/font&gt;: restart test with current configuration of X.</div><div class='del'>-        &lt;font color="#000080"&gt;&lt;i&gt;Quit&lt;/i&gt;&lt;/font&gt;: exit X configuration main window. Other question about autologin</div><div class='del'>-and window manager to use are asked on Add user step.</div><div class='del'>-</div><div class='del'>-      &lt;font color="#000080"&gt;&lt;i&gt;Exit install&lt;/i&gt;&lt;/font&gt;: step displayed only in customized mode but always</div><div class='del'>-executed. Only a text is displayed with a &lt;font color="#000080"&gt;&lt;i&gt;Ok&lt;/i&gt;&lt;/font&gt; button. If clicked and some step</div><div class='del'>-have not been executed/completed correctly, a question dialog ask the user if he</div><div class='del'>-really want to quit now, default answer is &lt;font color="#000080"&gt;&lt;i&gt;No&lt;/i&gt;&lt;/font&gt;. Advanced switch let user access</div><div class='del'>-to do the previously &lt;font color="#000080"&gt;&lt;i&gt;Auto install floppy&lt;/i&gt;&lt;/font&gt; step in DrakX &amp;lt; 8.0. This is just a</div><div class='del'>-question asking the user to generate an auto install floppy automatically.</div><div class='del'>-&lt;/pre&gt;</div><div class='del'>-&lt;/body&gt;</div><div class='del'>-&lt;/html&gt;</div><div class='head'>diff --git a/docs/wizard.doc b/docs/wizard.doc<br/>deleted file mode 100644<br/>index 0bbf8d254..000000000<br/>--- a/<a href='/software/drakx/tree/docs/wizard.doc?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>docs/wizard.doc</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-How to handle wizard?</div><div class='del'>-</div><div class='del'>-to switch in wizard mode:</div><div class='del'>-set $::isWizard to true;</div><div class='del'>-if $::Wizard_no_previous is set to true, the wizard won't display the previous button. Usefull for first step</div><div class='del'>-if $::Wizard_finished is set to true, the wizard will display Finish instead of Next. Usefull for last step</div><div class='del'>-</div><div class='del'>-how to code:</div><div class='del'>-Code as if there were no wizard.</div><div class='del'>-OK button is displayed as Next</div><div class='del'>-Cancel is displayed as Previous</div><div class='del'>-a additional button Cancel is added, xhich die with the exception 'wizard_cancelled'</div><div class='del'>-</div><div class='del'>-You have to handle the previous button. For example:</div><div class='del'>-</div><div class='del'>-step 1:</div><div class='del'>-ask_from list( blablablabl) or return;</div><div class='del'>-step2:</div><div class='del'>-ask_from list( blablablabl) or goto step1;</div><div class='del'>-step3:</div><div class='del'>-ask_from list( blablablabl) or goto step2;</div><div class='del'>-</div><div class='del'>-etc... You don't have to handle the wizard Cancel button as it send an exception.</div><div class='del'>-</div><div class='del'>-Understood? If yes, you'll see that there is a pb with ask_yesorno. In this case, yes+next returns true, no+next returns false, Cancel send the exception 'wizard_canceled' and previous send the exception 'wizard previous'. So you have to handle the previous button manually.</div><div class='del'>-</div><div class='del'>-plop.</div><div class='del'>-</div><div class='del'>-dam's, pour vous servir</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/isolinux-graphic.bmp b/isolinux-graphic.bmp<br/>deleted file mode 100644<br/>index 1c50e583e..000000000<br/>--- a/<a href='/software/drakx/tree/isolinux-graphic.bmp?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>isolinux-graphic.bmp</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/kernel/.cvsignore b/kernel/.cvsignore<br/>deleted file mode 100644<br/>index 827e0ba13..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-modules.description</div><div class='del'>-all.modules</div><div class='del'>-all.kernels</div><div class='head'>diff --git a/kernel/Makefile b/kernel/Makefile<br/>deleted file mode 100644<br/>index 90fad04b6..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-all: all.modules</div><div class='del'>-</div><div class='del'>-all.modules: ../mdk-stage1/mar/mar update_kernel list_modules.pm</div><div class='del'>-	`../tools/specific_arch ./update_kernel`</div><div class='del'>-</div><div class='del'>-../mdk-stage1/mar/mar:</div><div class='del'>-	make -C `dirname $@`</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -rf *~ modules.description all.modules all.modules64</div><div class='del'>-</div><div class='del'>-check:</div><div class='del'>-	perl modules.pl check &gt; /dev/null</div><div class='head'>diff --git a/kernel/check_mar.pl b/kernel/check_mar.pl<br/>deleted file mode 100755<br/>index d29e65088..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/check_mar.pl?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/check_mar.pl</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-</div><div class='del'>-use MDK::Common;</div><div class='del'>-</div><div class='del'>-my $mar = '../mdk-stage1/mar/mar';</div><div class='del'>--x $mar or die "ERROR: Sorry, need $mar binary\n";</div><div class='del'>-</div><div class='del'>-my %sanity_check = (</div><div class='del'>-    hd =&gt; [ </div><div class='del'>-	if_(arch() !~ /x86_64/, 'aic7xxx'),</div><div class='del'>-	qw(sym53c8xx initio), </div><div class='del'>-	if_(arch() !~ /ppc/, 'advansys'),</div><div class='del'>-    ],</div><div class='del'>-    network =&gt; [ </div><div class='del'>-	qw(3c59x eepro100 tulip via-rhine ne2k-pci 8139too), </div><div class='del'>-	if_(arch() !~ /ppc|x86_64/, 'e100'), </div><div class='del'>-	if_(arch() !~ /ppc|ia64/, 'tlan'),</div><div class='del'>-    ],</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-my $main_version = chomp_(cat_("all.kernels/.main"));</div><div class='del'>-</div><div class='del'>-foreach (keys %sanity_check) {</div><div class='del'>-    my $marfile = "all.modules/$main_version/${_}_modules.mar";</div><div class='del'>-    -e $mar or die "ERROR: missing $marfile\n";</div><div class='del'>-</div><div class='del'>-    my @l = map { /(\S+)\.o/ } `$mar -l $marfile`;</div><div class='del'>-    my @pbs = difference2($sanity_check{$_}, \@l);</div><div class='del'>-</div><div class='del'>-    @pbs and die "ERROR: sanity check should prove that " . join(" ", @pbs) . " be part of $marfile\n";</div><div class='del'>-}</div><div class='head'>diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm<br/>deleted file mode 100644<br/>index b1ce99e3f..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/list_modules.pm?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/list_modules.pm</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,202 +0,0 @@</div><div class='del'>-package list_modules;</div><div class='del'>-</div><div class='del'>-use MDK::Common;</div><div class='del'>-</div><div class='del'>-our @ISA = qw(Exporter);</div><div class='del'>-our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories);</div><div class='del'>-</div><div class='del'>-# the categories have 2 purposes</div><div class='del'>-# - choosing modules to include on stage1's (cf update_kernel and mdk-stage1/pci-resource/update-pci-ids.pl)</div><div class='del'>-# - performing a load_category or probe_category (modules.pm and many files in perl-install)</div><div class='del'>-</div><div class='del'>-our %l = (</div><div class='del'>-  ################################################################################</div><div class='del'>-  network =&gt; </div><div class='del'>-  {</div><div class='del'>-    main =&gt; [</div><div class='del'>-      if_(arch() =~ /ppc/, qw(mace bmac gmac)),</div><div class='del'>-      if_(arch() =~ /^sparc/, qw(myri_sbus sunbmac sunhme sunqe)),</div><div class='del'>-      if_(arch() !~ /alpha/ &amp;&amp; arch() !~ /sparc/,</div><div class='del'>-        qw(3c501 3c503 3c505 3c507 3c509 3c515), # 3c90x</div><div class='del'>-        qw(82596 abyss ac3200 acenic aironet4500_card at1700 atp com20020-pci),</div><div class='del'>-        qw(cs89x0 de600 de620 r8169),</div><div class='del'>-        qw(defxx orinoco_plx), # most unused</div><div class='del'>-        qw(depca dgrs dmfe e100 e1000 e2100 eepro eepro100 eexpress epic100 eth16i),</div><div class='del'>-        qw(ewrk3 hamachi hp hp-plus hp100 ibmtr),</div><div class='del'>-        qw(lance natsemi ne ne2k-pci ni5010 ni52 ni65 nvnet olympic pcnet32 plip rcpci), #old_tulip </div><div class='del'>-        qw(sb1000 sis900 sk98lin smc-ultra smc9194 starfire tg3 tlan tmspci tulip via-rhine), #sktr </div><div class='del'>-        qw(wd winbond-840 yellowfin ns83820),</div><div class='del'>-</div><div class='del'>-	qw(iph5526), #- fibre channel</div><div class='del'>-      ),</div><div class='del'>-      qw(3c59x 8139too sundance dl2k), #rtl8139 </div><div class='del'>-    ],</div><div class='del'>-    raw =&gt; [</div><div class='del'>-      qw(8390 mii),</div><div class='del'>-      qw(ppp_generic ppp_async slhc aironet4500_core),</div><div class='del'>-    ],</div><div class='del'>-    pcmcia =&gt; [ </div><div class='del'>-      qw(3c574_cs 3c589_cs airo airo_cs aironet4500_cs axnet_cs fmvj18x_cs),</div><div class='del'>-      qw(ibmtr_cs orinoco_cs netwave_cs nmclan_cs pcnet_cs ray_cs smc91c92_cs wavelan_cs wvlan_cs),</div><div class='del'>-      qw(xirc2ps_cs xircom_cb xircom_tulip_cb),</div><div class='del'>-    ],</div><div class='del'>-    usb =&gt; [ </div><div class='del'>-      qw(pegasus kaweth usbnet catc CDCEther),</div><div class='del'>-    ],</div><div class='del'>-    isdn =&gt; [</div><div class='del'>-      qw(b1pci c4 hisax hisax_fcpcipnp hysdn t1pci tpam),</div><div class='del'>-    ],</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  ################################################################################</div><div class='del'>-  disk =&gt; </div><div class='del'>-  {</div><div class='del'>-    scsi =&gt; [</div><div class='del'>-      if_(arch() =~ /ppc/, qw(mesh mac53c94)),</div><div class='del'>-      if_(arch() =~ /^sparc/, qw(qlogicpti)),</div><div class='del'>-      if_(arch() !~ /alpha/ &amp;&amp; arch() !~ /sparc/,</div><div class='del'>-        qw(3w-xxxx AM53C974 BusLogic NCR53c406a a100u2w advansys aha152x aha1542 aha1740),</div><div class='del'>-        qw(atp870u dc395x_trm dtc fdomain g_NCR5380 in2000 initio pas16 pci2220i psi240i),</div><div class='del'>-        qw(qla1280 qla2x00 qlogicfas qlogicfc),</div><div class='del'>-        qw(seagate sim710 sym53c416 t128 tmscsim u14-34f ultrastor wd7000),</div><div class='del'>-        qw(eata eata_pio eata_dma),</div><div class='del'>-      ),</div><div class='del'>-      '53c7,8xx',</div><div class='del'>-      qw(aic7xxx pci2000 qlogicisp sym53c8xx), # ncr53c8xx</div><div class='del'>-    ],</div><div class='del'>-    hardware_raid =&gt; [</div><div class='del'>-      if_(arch() =~ /^sparc/, qw(pluto)),</div><div class='del'>-      if_(arch() !~ /alpha/ &amp;&amp; arch() !~ /sparc/,</div><div class='del'>-        qw(DAC960 dpt_i2o megaraid aacraid ataraid cciss cpqarray gdth i2o_block),</div><div class='del'>-	qw(qla2200 qla2300 cpqfc),</div><div class='del'>-        qw(ips ppa imm),</div><div class='del'>-      ),</div><div class='del'>-    ],</div><div class='del'>-    pcmcia =&gt; [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs) ], #ide_cs</div><div class='del'>-    raw =&gt; [ qw(scsi_mod sd_mod) ],</div><div class='del'>-    usb =&gt; [ qw(usb-storage) ],</div><div class='del'>-    firewire =&gt; [ qw(sbp2) ],</div><div class='del'>-    cdrom =&gt; [ qw(ide-cd cdrom sr_mod) ],</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  ################################################################################</div><div class='del'>-</div><div class='del'>-  bus =&gt; </div><div class='del'>-  {</div><div class='del'>-    usb =&gt; [ qw(usbcore usb-uhci usb-ohci ehci-hcd usbkbd keybdev input) ],</div><div class='del'>-    firewire =&gt; [ qw(ohci1394 ieee1394) ],</div><div class='del'>-    pcmcia =&gt; [</div><div class='del'>-      if_(arch() !~ /^sparc/, qw(pcmcia_core tcic ds i82365 yenta_socket)), # cb_enabler</div><div class='del'>-    ],</div><div class='del'>-   #serial_cs</div><div class='del'>-   #ftl_cs 3c575_cb apa1480_cb epic_cb serial_cb tulip_cb iflash2+_mtd iflash2_mtd</div><div class='del'>-   #cb_enabler</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  fs =&gt; </div><div class='del'>-  {</div><div class='del'>-    network =&gt; [ qw(af_packet nfs lockd sunrpc) ],</div><div class='del'>-    cdrom =&gt; [ qw(isofs) ],</div><div class='del'>-    loopback =&gt; [ qw(isofs loop) ],</div><div class='del'>-    local =&gt; [</div><div class='del'>-      if_(arch() =~ /^i.86/, qw(vfat fat)),</div><div class='del'>-      if_(arch() =~ /^ppc/, qw(hfs)),</div><div class='del'>-      qw(reiserfs),</div><div class='del'>-    ],</div><div class='del'>-    various =&gt; [ qw(smbfs romfs jbd xfs) ],</div><div class='del'>-</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  ################################################################################</div><div class='del'>-  multimedia =&gt; </div><div class='del'>-  {</div><div class='del'>-    sound =&gt; [</div><div class='del'>-      if_(arch() =~ /ppc/, qw(dmasound_awacs)),</div><div class='del'>-      if_(arch() !~ /^sparc/,</div><div class='del'>-        qw(ad1816 ad1848 awe_wave audigy cmpci cs46xx cs4232 cs4281 emu10k1 es1370 es1371 esssolo1),</div><div class='del'>-	   qw(gus i810_audio mad16 maestro maestro3 mpu401 msnd_pinnacle opl3 opl3sa opl3sa2 nm256_audio),</div><div class='del'>-        qw(pas2 rme96xx sb sgalaxy sam9407 sonicvibes sscape trident via82cxxx_audio wavefront ymfpci),</div><div class='del'>-        qw(snd-ali5451 snd-als100 snd-als4000 snd-azt2320 snd-cmi8330 snd-cmipci snd-cs46xx snd-dt0197h),</div><div class='del'>-	   qw(snd-cs4281 snd-emu10k1),</div><div class='del'>-	   qw(snd-ad1816a snd-ad1848 snd-cs4232 snd-gusclassic snd-gusextreme snd-gusmax snd-interwave),</div><div class='del'>-	   qw(snd-mpu401 snd-opl3sa2 snd-opl3sa2 snd-opti93x snd-rme9652 snd-sb8 snd-sbawe),</div><div class='del'>-	   qw(snd-ens1370 snd-ens1371 snd-es18xx snd-es968 snd-es1938 snd-es1968 snd-es1688),</div><div class='del'>-        qw(snd-fm801 snd-hdsp snd-ice1712 snd-intel8x0 snd-korg1212 snd-maestro3),</div><div class='del'>-	   qw(snd-nm256 snd-rme96 snd-rme32 snd-opl3sa2 snd-sb16 snd-sgalaxy snd-sonicvibes),</div><div class='del'>-        qw(snd-trident snd-usb-audio snd-via686 snd-via8233 snd-wavefront snd-ymfpci),</div><div class='del'>-      ),</div><div class='del'>-    ],</div><div class='del'>-    tv =&gt; [ qw(bttv cpia_usb ibmcam mod_quickcam ov511 ov518_decomp ultracam usbvideo cyber2000fb saa7134) ],</div><div class='del'>-    photo =&gt; [ qw(dc2xx mdc800) ],</div><div class='del'>-    radio =&gt; [ qw(radio-maxiradio) ],</div><div class='del'>-    scanner =&gt; [ qw(scanner microtek) ],</div><div class='del'>-    joystick =&gt; [ qw(ns558 emu10k1-gp iforce) ],</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  various =&gt; </div><div class='del'>-  # just here for classification, unused categories (nor auto-detect, nor load_thiskind)</div><div class='del'>-  {</div><div class='del'>-    raid =&gt; [</div><div class='del'>-      qw(linear raid0 raid1 raid5 lvm-mod md multipath xor),</div><div class='del'>-    ],</div><div class='del'>-    mouse =&gt; [</div><div class='del'>-      qw(busmouse msbusmouse logibusmouse serial qpmouse atixlmouse),</div><div class='del'>-    ],</div><div class='del'>-    char =&gt; [</div><div class='del'>-      qw(amd768_rng applicom n_r3964 nvram pc110pad ppdev),</div><div class='del'>-      qw(mxser moxa isicom wdt_pci epca synclink istallion sonypi i810-tco sx), #- what are these???</div><div class='del'>-    ],</div><div class='del'>-    other =&gt; [</div><div class='del'>-      qw(agpgart defxx i810_rng i810fb ide-floppy ide-scsi ide-tape loop lp nbd sg st),</div><div class='del'>-      qw(parport parport_pc parport_serial),</div><div class='del'>-      qw(btaudio),</div><div class='del'>-</div><div class='del'>-      #- these need checking</div><div class='del'>-      qw(pcilynx sktr rrunner gmac meye 3c559 buz paep),</div><div class='del'>-    ],</div><div class='del'>-  },</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-my %dependencies;</div><div class='del'>-</div><div class='del'>-sub load_dependencies {</div><div class='del'>-    my ($file) = @_;</div><div class='del'>-</div><div class='del'>-    %dependencies = map {</div><div class='del'>-	my ($f, $deps) = split ':';</div><div class='del'>-	$f =&gt; [ split ' ', $deps ];</div><div class='del'>-    } cat_($file);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub dependencies_closure {</div><div class='del'>-    my @l = map { dependencies_closure($_) } @{$dependencies{$_[0]} || []};</div><div class='del'>-    (@l, $_[0]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub category2modules {</div><div class='del'>-    map {</div><div class='del'>-	my ($t1, $t2s) = m|(.*)/(.*)|;</div><div class='del'>-	map { </div><div class='del'>-	    my $l = $l{$t1}{$_} or die "bad category $t1/$_\n" . backtrace();</div><div class='del'>-	    @$l;</div><div class='del'>-	} split('\|', $t2s);</div><div class='del'>-    } split(' ', $_[0]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub module2category {</div><div class='del'>-    my ($module) = @_;</div><div class='del'>-    foreach my $t1 (keys %l) {</div><div class='del'>-	my $h = $l{$t1};</div><div class='del'>-	foreach my $t2 (keys %$h) {</div><div class='del'>-	  $module eq $_ and return "$t1/$t2" foreach @{$h-&gt;{$t2}};</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    return;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub sub_categories {</div><div class='del'>-    my ($t1) = @_;</div><div class='del'>-    keys %{$l{$t1}};</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-1;</div><div class='head'>diff --git a/kernel/modules.pl b/kernel/modules.pl<br/>deleted file mode 100644<br/>index 6e8f04307..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/modules.pl?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/modules.pl</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,166 +0,0 @@</div><div class='del'>-use strict;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-BEGIN {</div><div class='del'>-    #- for testing purpose</div><div class='del'>-    (my $f = __FILE__) =~ s|/[^/]*$||;</div><div class='del'>-    push @INC, $f;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-use MDK::Common;</div><div class='del'>-use list_modules;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-my @skip_big_modules_on_stage1 = (</div><div class='del'>-qw(</div><div class='del'>-olympic</div><div class='del'>-sk98lin acenic</div><div class='del'>-3c90x</div><div class='del'>-ns83820</div><div class='del'>-aironet4500_card aironet4500_core com20020-pci hamachi starfire winbond-840</div><div class='del'>-</div><div class='del'>-dc395x_trm</div><div class='del'>-BusLogic seagate fdomain g_NCR5380</div><div class='del'>-)</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-my @skip_modules_on_stage1 = (</div><div class='del'>-  qw(sktr tmspci ibmtr abyss), # alt token ring</div><div class='del'>-  qw(old_tulip rtl8139),</div><div class='del'>-  if_(arch() =~ /alpha|ppc/, qw(sb1000)),</div><div class='del'>-  qw(</div><div class='del'>-  tg3 r8169</div><div class='del'>-  apa1480_cb</div><div class='del'>-  imm ppa plip</div><div class='del'>-  3w-xxxx pci2220i qla2x00 i2o_block</div><div class='del'>-  eata_pio eata_dma</div><div class='del'>-  qla2200 qla2300</div><div class='del'>-  iph5526</div><div class='del'>-  ),</div><div class='del'>-  'AM53C974', # deprecated by tmscsim</div><div class='del'>-  qw(ac3200 at1700 atp ni5010 ni52 ni65),  #- unused from Jeff</div><div class='del'>-  "u14-34f", #- duplicate from ultrastor.o</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-my %images = (</div><div class='del'>-    network =&gt; 'fs/network network/raw bus/pcmcia network/main',</div><div class='del'>-    hd      =&gt; 'disk/raw fs/local|loopback disk/scsi|hardware_raid',</div><div class='del'>-    other   =&gt; 'disk/scsi|hardware_raid network/main ONLY_BIG fs/cdrom disk/cdrom|raw fs/network network/raw',</div><div class='del'>-    pcmcia  =&gt; 'fs/cdrom disk/cdrom|raw|pcmcia bus/pcmcia fs/network network/pcmcia|raw',</div><div class='del'>-    cdrom   =&gt; 'fs/cdrom disk/cdrom|raw|scsi',</div><div class='del'>-    usb     =&gt; 'fs/cdrom disk/cdrom|raw bus/usb disk/usb fs/network network/usb|raw bus/firewire disk/firewire',</div><div class='del'>-    all     =&gt; 'fs/cdrom disk/cdrom|raw bus/usb disk/usb|scsi fs/loopback|local bus/pcmcia disk/pcmcia|hardware_raid fs/network network/main|pcmcia|usb|raw bus/firewire disk/firewire',</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-my $verbose = "@ARGV" =~ /-v/;</div><div class='del'>-images() if "@ARGV" =~ /images/;</div><div class='del'>-check() if "@ARGV" =~ /check/;</div><div class='del'>-pci_modules4stage1($1) if "@ARGV" =~ /pci_modules4stage1:(.*)/;</div><div class='del'>-</div><div class='del'>-sub images {</div><div class='del'>-    load_dependencies('modules.dep');</div><div class='del'>-</div><div class='del'>-    while (my ($image, $l) = each %images) {</div><div class='del'>-	my @modules;</div><div class='del'>-	foreach (split(' ', $l)) { </div><div class='del'>-	    if (/ONLY_BIG/) {</div><div class='del'>-		@modules = intersection(\@modules, \@skip_big_modules_on_stage1);</div><div class='del'>-		next;</div><div class='del'>-	    }</div><div class='del'>-	    push @modules, category2modules($_);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ($image !~ /all/) {</div><div class='del'>-	    @modules = difference2(\@modules, \@skip_modules_on_stage1);</div><div class='del'>-	}</div><div class='del'>-	if ($image !~ /other|all/) {</div><div class='del'>-	    @modules = difference2(\@modules, \@skip_big_modules_on_stage1)</div><div class='del'>-	}</div><div class='del'>-	@modules = map { dependencies_closure($_) } @modules;</div><div class='del'>-	printf qq(%s_modules="%s"\n), $image, join(" ", map { "$_.o" } @modules);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub pci_modules4stage1 {</div><div class='del'>-    print "$_\n" foreach difference2([ category2modules($_[0]) ], \@skip_modules_on_stage1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub check {</div><div class='del'>-    my $error;</div><div class='del'>-    my %listed;</div><div class='del'>-    my %big_modules_categories;</div><div class='del'>-    while (my ($t1, $l) = each %list_modules::l) {</div><div class='del'>-	while (my ($t2, $l) = each %$l) {</div><div class='del'>-	    ref $l or die "bad $l in $t1/$t2";</div><div class='del'>-	    foreach (@$l) {</div><div class='del'>-		$listed{$_} = 1; </div><div class='del'>-		push @{$big_modules_categories{$t1}{$t2}}, $_ if member($_, @skip_modules_on_stage1);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    # remove accepted categories for other.img</div><div class='del'>-    delete $big_modules_categories{disk}{hardware_raid};</div><div class='del'>-    delete $big_modules_categories{disk}{scsi};</div><div class='del'>-    delete $big_modules_categories{network}{main};</div><div class='del'>-</div><div class='del'>-    if (map { %$_ } values %big_modules_categories) {</div><div class='del'>-	my @l = map { "$_/" . join('|', sort keys %{$big_modules_categories{$_}}) } sort keys %big_modules_categories;</div><div class='del'>-	print STDERR "WEIRD CATEGORIES USED FOR other.img: ", join(" ", @l), "\n";</div><div class='del'>-	if ($verbose) {</div><div class='del'>-	    while (my ($t1, $t2s) = each %big_modules_categories) {</div><div class='del'>-		print "$t1/$_ used for other.img: ", join(" ", @{$t2s-&gt;{$_}}), "\n" foreach keys %$t2s;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	$error = 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    my %module2category;</div><div class='del'>-    my %deprecated_modules = %listed;</div><div class='del'>-    my $not_listed = sub {</div><div class='del'>-	my ($msg, $verbose, @l) = @_;</div><div class='del'>-	my %not_listed;</div><div class='del'>-	foreach (@l) {</div><div class='del'>-	    my ($mod) = m|([^/]*)\.o(\.gz)?$| or next;</div><div class='del'>-	    delete $deprecated_modules{$mod};</div><div class='del'>-	    next if $listed{$mod};</div><div class='del'>-	    s|.*?mdk(BOOT)?/||;</div><div class='del'>-	    s|kernel/||; s|drivers/||; s|3rdparty/||;</div><div class='del'>-	    $_ = dirname $_;</div><div class='del'>-	    $_ = dirname $_ if $mod eq basename($_);</div><div class='del'>-	    $module2category{$mod} = $_;</div><div class='del'>-	    push @{$not_listed{$_}}, $mod;</div><div class='del'>-	}</div><div class='del'>-	if ($verbose) {</div><div class='del'>-	    print "$msg $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed;</div><div class='del'>-	}</div><div class='del'>-    };</div><div class='del'>-    $not_listed-&gt;('NOT LISTED', 1, `cd all.kernels/2.4* ; find -name "*.o" -o -name "*.o.gz"`);</div><div class='del'>-    $not_listed-&gt;('not listed', $verbose, `rpm -qpl /RPMS/kernel-2.4*`);</div><div class='del'>-    print "bad/old modules : ", join(" ", sort keys %deprecated_modules), "\n" if %deprecated_modules;</div><div class='del'>-</div><div class='del'>-    {</div><div class='del'>-	require '/usr/bin/merge2pcitable.pl';</div><div class='del'>-	my $pcitable = read_pcitable("/usr/share/ldetect-lst/pcitable");</div><div class='del'>-	my $usbtable = read_pcitable("/usr/share/ldetect-lst/usbtable");</div><div class='del'>-</div><div class='del'>-	my @l = uniq grep { !/:/ &amp;&amp; $_ ne 'unknown' } map { $_-&gt;[0] } values %$pcitable;</div><div class='del'>-	if (my @l = difference2(\@l, [ keys %listed ])) {</div><div class='del'>-	    my %not_listed;</div><div class='del'>-	    push @{$not_listed{$module2category{$_}}}, $_ foreach @l;</div><div class='del'>-	    print STDERR "PCITABLE MODULES NOT LISTED $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed;</div><div class='del'>-	    #$error = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	my @l = uniq grep { !/:/ &amp;&amp; $_ ne 'unknown' } map { $_-&gt;[0] } values %$usbtable;</div><div class='del'>-	if (my @l = difference2(\@l, [ keys %listed ])) {</div><div class='del'>-	    my %not_listed;</div><div class='del'>-	    push @{$not_listed{$module2category{$_}}}, $_ foreach @l;</div><div class='del'>-	    if ($verbose) {</div><div class='del'>-		print "usbtable modules not listed $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    exit $error;</div><div class='del'>-}</div><div class='head'>diff --git a/kernel/update_kernel b/kernel/update_kernel<br/>deleted file mode 100755<br/>index 9cea09e7d..000000000<br/>--- a/<a href='/software/drakx/tree/kernel/update_kernel?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>kernel/update_kernel</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,100 +0,0 @@</div><div class='del'>-#!/bin/bash</div><div class='del'>-</div><div class='del'>-ALL_KERNELS="all.kernels"</div><div class='del'>-</div><div class='del'>-# move stuff to this new "kernel" directory</div><div class='del'>-if [ ! -d all.kernels ]; then</div><div class='del'>-  mv ../all.kernels .</div><div class='del'>-  rm -rf ../all.modules</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-function create_marfile() {</div><div class='del'>-    marfile=$1</div><div class='del'>-    shift</div><div class='del'>-    $GIBASEDIR/mdk-stage1/mar/mar -c $marfile $*</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-function create_modules() {</div><div class='del'>-    kernel_path=$1</div><div class='del'>-    kern=$2</div><div class='del'>-    echo "Updating modules in '`pwd`' for kernel '$kern'"</div><div class='del'>-    cp -f `find $kernel_path/lib/modules/ -name "*.o"` .</div><div class='del'>-    /sbin/depmod -F $kernel_path/boot/System.map* -e *.o | perl -pe 's/\\\n//' \</div><div class='del'>-	| perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' &gt; modules.dep</div><div class='del'>-    perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep</div><div class='del'>-</div><div class='del'>-    /sbin/modinfo -f '%{filename} %{description}\n' *.o | perl -lne 'print "$1\t$2" if /(.*?)\.o "(.*)"/' &gt; modules.description</div><div class='del'>-</div><div class='del'>-    echo -n "packdrake $kern: "</div><div class='del'>-    ls *.o | packdrake -b9s "modules.cz" 400000</div><div class='del'>-    echo "done"</div><div class='del'>-    mv modules.cz ../modules.cz-$kern</div><div class='del'>-    for i in network cdrom hd usb other pcmcia all; do</div><div class='del'>-	modules_var="${i}_modules"</div><div class='del'>-	eval "create_marfile ${i}_modules.mar \$$modules_var"</div><div class='del'>-    done</div><div class='del'>-    echo</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-[ -e $ALL_KERNELS/.main ] &amp;&amp; main=$(cat $ALL_KERNELS/.main)</div><div class='del'>-</div><div class='del'>-rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/')</div><div class='del'>-if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then</div><div class='del'>-    [ -n "$main" ] &amp;&amp; rm -rf $ALL_KERNELS/$main</div><div class='del'>-    cd $ALL_KERNELS</div><div class='del'>-    rm -rf $rpm ; mkdir $rpm</div><div class='del'>-    cd $rpm</div><div class='del'>-    rpm2cpio /RPMS/kernel-BOOT-*.rpm | cpio -id</div><div class='del'>-    find -type f -name "*.o.gz" | xargs gunzip</div><div class='del'>-    cd ../..</div><div class='del'>-</div><div class='del'>-    for dir in /tftpboot /var/lib/tftpboot; do</div><div class='del'>-	rm -f $dir/{vmlinuz,network.rdz}</div><div class='del'>-    done</div><div class='del'>-fi </div><div class='del'>-</div><div class='del'>-[ -n "$main" -a -e $ALL_KERNELS/$main ] || {</div><div class='del'>-    cd $ALL_KERNELS</div><div class='del'>-    main=$(echo 2.* | sed 's/.* //')</div><div class='del'>-    echo "Choosing $main"</div><div class='del'>-    echo $main &gt; .main</div><div class='del'>-    cd ..</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`</div><div class='del'>-</div><div class='del'>-eval `perl modules.pl images`</div><div class='del'>-</div><div class='del'>-if [ "$ARCH" == "i386" ]; then</div><div class='del'>-    for i in $ALL_KERNELS/*/boot/vmlinuz*; do</div><div class='del'>-	#disable any existing resolution!!!</div><div class='del'>-	/usr/sbin/rdev -v $i 65535 #788 #785 </div><div class='del'>-    done</div><div class='del'>-else</div><div class='del'>-    if [ "$ARCH" == "ppc" ]; then</div><div class='del'>-        cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux .</div><div class='del'>-    else</div><div class='del'>-        cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz .</div><div class='del'>-    fi</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-GIBASEDIR=`pwd`/..</div><div class='del'>-</div><div class='del'>-rm -rf all.modules ; mkdir all.modules</div><div class='del'>-for i in $ALL_KERNELS/*; do</div><div class='del'>-	kern=`basename $i`</div><div class='del'>-	(</div><div class='del'>-	    mkdir all.modules/$kern</div><div class='del'>-	    cd all.modules/$kern</div><div class='del'>-	    if [ "$kern" = "$main" ]; then</div><div class='del'>-		create_modules ../../$i $kern</div><div class='del'>-	    else</div><div class='del'>-		echo "$kern ($main)"</div><div class='del'>-		create_modules ../../$i $kern 2&gt;/dev/null</div><div class='del'>-	    fi</div><div class='del'>-	) || exit 1</div><div class='del'>-done</div><div class='del'>-cp -f all.modules/$main/modules.description .</div><div class='del'>-</div><div class='del'>-./check_mar.pl</div><div class='head'>diff --git a/live_update b/live_update<br/>deleted file mode 100644<br/>index 0778b4ae8..000000000<br/>--- a/<a href='/software/drakx/tree/live_update?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>live_update</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,77 +0,0 @@</div><div class='del'>-#!/bin/sh</div><div class='del'>-</div><div class='del'>-message=/usr/X11R6/bin/gmessage</div><div class='del'>-[ -x $message ] || message=/usr/X11R6/bin/xmessage</div><div class='del'>-[ -x $message ] || unset message</div><div class='del'>-</div><div class='del'>-if [ "$UID" -ne 0 ]; then</div><div class='del'>-    if [ -x "$message" ]; then</div><div class='del'>-	case "$LANG" in</div><div class='del'>-	    fr*) buttons="Arrêter:0"</div><div class='del'>-		 msg="Mise à jour en direct de Mandrake Linux.</div><div class='del'>-</div><div class='del'>-Vous devez être l'utilisateur root pour lancer cette application." ;;</div><div class='del'>-	    *) buttons="Abort:0"</div><div class='del'>-	       msg="Mandrake Linux live upgrade.</div><div class='del'>-</div><div class='del'>-You need to be root to start this program." ;;</div><div class='del'>-	esac</div><div class='del'>-	$message -buttons "$buttons" -print "$msg"</div><div class='del'>-    else</div><div class='del'>-	echo &gt;&amp;2 "You need to be root to start this program."</div><div class='del'>-    fi</div><div class='del'>-    exit 3</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-distrib=`pwd`;</div><div class='del'>-if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then</div><div class='del'>-    distrib="/mnt/cdrom"</div><div class='del'>-fi</div><div class='del'>-if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then</div><div class='del'>-    if [ -x "$message" ]; then</div><div class='del'>-	case "$LANG" in</div><div class='del'>-	    fr*) buttons="Arrêter:0"</div><div class='del'>-		 msg="Mise à jour en direct de Mandrake Linux.</div><div class='del'>-</div><div class='del'>-Impossible de trouver le Cédérom d'installation de Mandrake Linux dans le premier lecteur." ;;</div><div class='del'>-	    *) buttons="Abort:0"</div><div class='del'>-	       msg="Mandrake Linux live upgrade.</div><div class='del'>-</div><div class='del'>-Unable to find Mandrake Linux Installation Cd-Rom in the first drive." ;;</div><div class='del'>-	esac</div><div class='del'>-	$message -buttons "$buttons" -print "$msg"</div><div class='del'>-    else</div><div class='del'>-	echo &gt;&amp;2 "Unable to find Mandrake Linux Installation Cd-Rom in the first drive."</div><div class='del'>-    fi</div><div class='del'>-    exit 2</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-if [ -x "$message" ]; then</div><div class='del'>-    case "$LANG" in</div><div class='del'>-	fr*) buttons="Mise à jour:0,Annuler:1"</div><div class='del'>-	     msg="Mise à jour en direct de Mandrake Linux.</div><div class='del'>-</div><div class='del'>-Appuyez sur \"Mise à jour\" pour lancer la mise à jour de votre système,</div><div class='del'>-cela prendra quelques minutes avant que l'écran de DrakX apparaisse.</div><div class='del'>-</div><div class='del'>-Appuyez sur \"Annuler\" pour ne pas mettre à jour votre système de cette manière." ;;</div><div class='del'>-	*) buttons="Upgrade:0,Cancel:1"</div><div class='del'>-	   msg="Mandrake Linux live upgrade.</div><div class='del'>-</div><div class='del'>-Press \"Upgrade\" to start live upgrade on your system, note this will</div><div class='del'>-take some time to prepare the system before DrakX screen appears.</div><div class='del'>-</div><div class='del'>-Press \"Cancel\" to avoid upgrading your system this way." ;;</div><div class='del'>-    esac</div><div class='del'>-    default=`echo $buttons | cut -d: -f1`</div><div class='del'>-    $message -buttons "$buttons" -default "$default" -print "$msg"</div><div class='del'>-    [ $? -ne 0 ] &amp;&amp; exit 1</div><div class='del'>-else</div><div class='del'>-    echo &gt;&amp;2 "Press ENTER to start live upgrade on your system, note this will</div><div class='del'>-take some time to prepare the system before DrakX screen appears.</div><div class='del'>-</div><div class='del'>-Press CTRL-C to avoid upgrading your system this way."</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-cd "$distrib/Mandrake/mdkinst/usr/bin/perl-install" &amp;&amp; exec ./live_install</div><div class='del'>-exit 2</div><div class='head'>diff --git a/make_boot_img b/make_boot_img<br/>deleted file mode 100755<br/>index 269be0e5a..000000000<br/>--- a/<a href='/software/drakx/tree/make_boot_img?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>make_boot_img</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,571 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-</div><div class='del'>-@ARGV &gt;= 2 or die "usage: $0 &lt;image&gt; all|other|cdrom|hd|network|usb|blank|pcmcia|live|tftp|tftprd\n";</div><div class='del'>-</div><div class='del'>-use Config;</div><div class='del'>-use MDK::Common;</div><div class='del'>-Config-&gt;import;</div><div class='del'>-my ($arch) = $Config{archname} =~ /(.*?)-/;</div><div class='del'>-</div><div class='del'>-($img, $type) = @ARGV;</div><div class='del'>-</div><div class='del'>-# move stuff to new "kernel" directory</div><div class='del'>--d 'kernel' or die "directory kernel is missing\n";</div><div class='del'>-rename 'all.kernels', 'kernel/all.kernels';</div><div class='del'>-rename 'all.modules', 'kernel/all.modules';</div><div class='del'>-</div><div class='del'>-$default_append = "ramdisk_size=32000 root=/dev/ram3";</div><div class='del'>-$default_vga = "vga=788";</div><div class='del'>-</div><div class='del'>-$instdir = "mdk-stage1";</div><div class='del'>-$mnt = "/tmp/drakx_mnt";</div><div class='del'>-$mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1";</div><div class='del'>-</div><div class='del'>-if ($&gt;) {</div><div class='del'>-    $sudo = "sudo";</div><div class='del'>-    $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub __ { print @_, "\n"; system(@_); }</div><div class='del'>-sub _ { __ @_; $? and die; }</div><div class='del'>-</div><div class='del'>-_ "$sudo mkdir $mnt" unless -e $mnt;</div><div class='del'>-_ "$sudo mkdir ${mnt}2" unless -e "${mnt}2";</div><div class='del'>-</div><div class='del'>-$install = $ {{</div><div class='del'>-    all =&gt; "stage1-full",</div><div class='del'>-    other =&gt; "stage1-full",</div><div class='del'>-    blank =&gt; "stage1-full",</div><div class='del'>-    live =&gt; "stage1-full",</div><div class='del'>-    tftp =&gt; "stage1-full",</div><div class='del'>-    tftprd =&gt; "stage1-full",</div><div class='del'>-    pcmcia =&gt; "stage1-full",</div><div class='del'>-    network =&gt; "stage1-network",</div><div class='del'>-    usb =&gt; "stage1-usb",</div><div class='del'>-    cdrom =&gt; "stage1-cdrom",</div><div class='del'>-    hd =&gt; "stage1-disk",</div><div class='del'>-    live64 =&gt; "stage1-full",</div><div class='del'>-    tftp64 =&gt; "stage1-full",</div><div class='del'>-    tftprd64 =&gt; "stage1-full",</div><div class='del'>-    pcmcia64 =&gt; "stage1-full",</div><div class='del'>-    network64 =&gt; "stage1-network",</div><div class='del'>-    cdrom64 =&gt; "stage1-cdrom",</div><div class='del'>-    hd64 =&gt; "stage1-disk",</div><div class='del'>-}}{$type} or die;</div><div class='del'>-</div><div class='del'>-mkdir "images";</div><div class='del'>-chomp($main = `cat kernel/all.kernels/.main`);</div><div class='del'>-</div><div class='del'>-if ($img =~ /blank|other|pcmcia/) {</div><div class='del'>-    @kernels = $main;</div><div class='del'>-} else {</div><div class='del'>-    @kernels = map { m|kernel/all.kernels/(.*)| } glob('kernel/all.kernels/*');</div><div class='del'>-    $img =~ /usb/ and @kernels = grep { $_ !~ /2\.2\.14/ } @kernels;  #- 2.2.14 is too old, usb support was not working properly</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-foreach (@kernels) {</div><div class='del'>-    if ($img =~ /rdz$/) {</div><div class='del'>-	initrd($mnt, "$img-$_");</div><div class='del'>-    } else {</div><div class='del'>-	print STDERR "calling boot_img_$arch\n";</div><div class='del'>-	$::{"boot_img_$arch"}-&gt;($mnt, "$img-$_", glob("kernel/all.kernels/$_/boot/vmlinu*"));</div><div class='del'>-	rename("$img-$main", "$img");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-if ($arch =~ /i.86/ &amp;&amp; $img =~ /all/) {</div><div class='del'>-    isolinux($main, @kernels);</div><div class='del'>-</div><div class='del'>-    my ($img, $img_sav) = ("images/cdrom.img-$main", 'images/cdrom.img-sav');</div><div class='del'>-    rename($img, $img_sav);</div><div class='del'>-    $type = 'cdrom';</div><div class='del'>-    boot_img_i386($mnt, $img, "kernel/all.kernels/$main/boot/vmlinu*", sub { $_[0] =~ s/\bautomatic=\S+\b//; "$_[0] changedisk" });</div><div class='del'>-    rename($img, 'images/cdrom-changedisk.img');</div><div class='del'>-    rename($img_sav, $img);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {</div><div class='del'>-    system("/bin/cp -f kernel/all.kernels/$main/boot/vmlinu* $tftpboot/vmlinuz 2&gt;/dev/null");</div><div class='del'>-    system("/bin/cp -f images/network.rdz-$main $tftpboot/network.rdz 2&gt;/dev/null");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub install_stripped { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" }</div><div class='del'>-</div><div class='del'>-sub initrd {</div><div class='del'>-    my ($mnt, $img) = @_;</div><div class='del'>-    my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type;</div><div class='del'>-    my $tmp = "$ENV{HOME}/tmp/initrd";</div><div class='del'>-    my $tar = "$instdir/stage1-data/stage1.tar.bz2";</div><div class='del'>-</div><div class='del'>-    __ "$sudo umount $tmp $mnt 2&gt;/dev/null";</div><div class='del'>-    _ "dd if=/dev/zero of=$tmp bs=1k count=" . ($arch =~ /ia64/ ? ($type eq "all" ? 16386 : 16384) : ($type eq "all" ? 4000 : 2000));</div><div class='del'>-    _ "$mke2fs $tmp";</div><div class='del'>-    _ "$sudo mount -t ext2 $tmp $mnt -o loop";</div><div class='del'>-</div><div class='del'>-    _ "$sudo tar xjC $mnt -f $tar";</div><div class='del'>-    install_stripped("$instdir/init", "$mnt/sbin");</div><div class='del'>-    install_stripped("$instdir/$install", "$mnt/sbin/stage1");</div><div class='del'>-</div><div class='del'>-    if ($type eq "network" || $type eq "usb" || $type eq "all" || $type eq "other" || $type eq "blank") {</div><div class='del'>-	install_stripped("$instdir/ppp/pppd-bin", "$mnt/sbin/pppd");</div><div class='del'>-	install_stripped("$instdir/rp-pppoe/pppoe-bin", "$mnt/sbin/pppoe");</div><div class='del'>-	_ "$sudo mknod $mnt/dev/ppp c 108 0";</div><div class='del'>-	_ "$sudo mknod $mnt/dev/ptyp0 c 2 0";</div><div class='del'>-	_ "$sudo mknod $mnt/dev/ttyp0 c 3 0";</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (member($type, qw(pcmcia all network)) &amp;&amp; $arch !~ /ppc/ &amp;&amp; $arch !~ /ia64/) {</div><div class='del'>-	 _ "$sudo cp -a /etc/pcmcia $mnt/etc";</div><div class='del'>-	 _ "cp $mnt/etc/pcmcia/config /tmp/pcmcia_config_tmp";</div><div class='del'>-	 _ "tools/patch_pcmcia_config.pl /tmp/pcmcia_config_tmp kernel/all.modules/$main/modules.dep";</div><div class='del'>-	 _ "sudo mv /tmp/pcmcia_config_tmp $mnt/etc/pcmcia/config";</div><div class='del'>-    }</div><div class='del'>-    my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";</div><div class='del'>-    $modz = "kernel/all.modules$I/$ext";</div><div class='del'>-    _ "$sudo cp -f $modz/${ltype}_modules.mar $mnt/modules/modules$I.mar" if $type !~ /blank/;</div><div class='del'>-    _ "$sudo cp -f $modz/modules.dep $mnt/modules/";</div><div class='del'>-    _ "$sudo umount $mnt";</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-# Workaround for vfat-loop bug (quite touchy)</div><div class='del'>-    _ "gzip -9f $tmp";</div><div class='del'>-    _ "cp -f $tmp.gz $img";</div><div class='del'>-    _ "rm -f $tmp.gz";</div><div class='del'>-#    _ "gzip -9 -c $tmp &gt; $img";</div><div class='del'>-#    _ "rm -f $tmp";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub entries_append {</div><div class='del'>-    my ($type) = @_;</div><div class='del'>-</div><div class='del'>-    my $automatic = "";</div><div class='del'>-    $automatic = "automatic=method:cdrom" if ($type eq "cdrom");</div><div class='del'>-    $automatic = "automatic=method:disk" if ($type eq "hd");</div><div class='del'>-</div><div class='del'>-    my @simple_entries = (</div><div class='del'>-	linux =&gt; "$default_vga",</div><div class='del'>-	vgalo =&gt; "vga=785",</div><div class='del'>-	vgahi =&gt; "vga=791",</div><div class='del'>-	vga16 =&gt; "vga16",</div><div class='del'>-	text =&gt; "text",</div><div class='del'>-	patch =&gt; "patch $default_vga",</div><div class='del'>-	expert =&gt; "expert $default_vga",</div><div class='del'>-	rescue =&gt; "rescue rw",</div><div class='del'>-    );</div><div class='del'>-    my @entries = (</div><div class='del'>-        (map { $_-&gt;[0] =&gt; "$automatic $_-&gt;[1]" } group_by2(@simple_entries)),</div><div class='del'>-	if_(member($type, "cdrom", "all"), oem =&gt; "automatic=method:cdrom $default_vga rescue oem rw"),</div><div class='del'>-        if_($type eq "all", all =&gt; "pcmcia $default_vga"),</div><div class='del'>-    );</div><div class='del'>-</div><div class='del'>-    map { [ $_-&gt;[0], "$default_append $_-&gt;[1]" ] }</div><div class='del'>-      group_by2(@entries);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub boot_img_i386 {</div><div class='del'>-    my ($mnt, $img, $kernel, $args_callback) = @_;</div><div class='del'>-</div><div class='del'>-    __ "$sudo umount $mnt 2&gt;/dev/null";</div><div class='del'>-</div><div class='del'>-    if ($type eq "hd") {</div><div class='del'>-	_ "bunzip2 -c $instdir/init-data/msgboot.img.bz2 &gt; $img";</div><div class='del'>-    } elsif ($type eq "all") {</div><div class='del'>-	_ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo-2880.img.bz2 &gt; $img";</div><div class='del'>-    } elsif ($type eq "blank") {</div><div class='del'>-	_ "bunzip2 -c $instdir/init-data/msgboot-blank.img.bz2 &gt; $img";</div><div class='del'>-    } else {</div><div class='del'>-	_ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo.img.bz2 &gt; $img";</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    _ "$sudo mount -t vfat -o umask=0 $img $mnt -o loop";</div><div class='del'>-    _ "cat $kernel &gt; $mnt/vmlinuz" if $type !~ /blank/;</div><div class='del'>-</div><div class='del'>-    my $rdz = $img; $rdz =~ s/\.img/.rdz/;</div><div class='del'>-    initrd("${mnt}2", $rdz) if !-e $rdz;</div><div class='del'>-    eval { _ "cp -f $rdz $mnt/$type.rdz" };</div><div class='del'>-    if ($@) {</div><div class='del'>-	unlink "$mnt/$type.rdz";</div><div class='del'>-	my $avail = (split ' ', `df $mnt`)[-3];</div><div class='del'>-	my $s = int((-s $rdz) / 1024);</div><div class='del'>-	die sprintf("not enough room for $rdz: need %dKB (available %dKB &lt; needed %dKB)\n", $s - $avail, $avail, $s);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    my $timeout = 72;</div><div class='del'>-    output "$mnt/syslinux.cfg",</div><div class='del'>-"default linux</div><div class='del'>-prompt 1</div><div class='del'>-timeout $timeout</div><div class='del'>-display boot.msg</div><div class='del'>-F1 help.msg</div><div class='del'>-F2 advanced.msg</div><div class='del'>-F3 boot.msg</div><div class='del'>-" . join('', map {</div><div class='del'>-    my $args = $args_callback ? $args_callback-&gt;($_-&gt;[1]) : $_-&gt;[1];</div><div class='del'>-"label $_-&gt;[0]</div><div class='del'>-  kernel vmlinuz</div><div class='del'>-  append initrd=$type.rdz $args</div><div class='del'>-" } entries_append($type));</div><div class='del'>-</div><div class='del'>-    _ "sync";</div><div class='del'>-    _ "df $mnt";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub boot_img_alpha {</div><div class='del'>-    my ($mnt, $img) = @_;</div><div class='del'>-</div><div class='del'>-    __ "$sudo umount $mnt 2&gt;/dev/null";</div><div class='del'>-    _ "dd if=/dev/zero of=$img bs=1k count=1440";</div><div class='del'>-    _ "$mke2fs $img";</div><div class='del'>-    _ "/sbin/e2writeboot $img /boot/bootlx";</div><div class='del'>-    _ "$sudo mount -t ext2 $img $mnt -o loop";</div><div class='del'>-    _ "cp -f vmlinux.gz $mnt" if $type !~ /blank/;</div><div class='del'>-    -f "$type.rdz" ? _ "cp -f $type.rdz $mnt" : initrd("${mnt}2", "$mnt/$type.rdz");</div><div class='del'>-</div><div class='del'>-    mkdir "$mnt/etc", 0777;</div><div class='del'>-    output("$mnt/etc/aboot.conf", </div><div class='del'>-"0:vmlinux.gz initrd=$type.rdz rw $default_append $type</div><div class='del'>-1:vmlinux.gz initrd=$type.rdz rw $default_append text $type</div><div class='del'>-");</div><div class='del'>-    _ "sync";</div><div class='del'>-    _ "df $mnt";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub boot_img_ia64 {</div><div class='del'>-    my ($mnt, $img, $kernel) = @_;</div><div class='del'>-	my $rdz = $img; $rdz =~ s/\.img/.rdz/;</div><div class='del'>-</div><div class='del'>-    __ "$sudo umount $mnt 2&gt;/dev/null";</div><div class='del'>-    _ "dd if=/dev/zero of=$img bs=1k count=16384";</div><div class='del'>-    _ "mkdosfs $img";</div><div class='del'>-    _ "$sudo mount -t vfat $img $mnt -o loop,umask=000";</div><div class='del'>-    _ "$sudo cp -f $kernel $mnt/vmlinux";</div><div class='del'>-    _ "cp -f $rdz $mnt/$type.rdz";</div><div class='del'>-    _ "$sudo cp -f tools/ia64/elilo.efi $mnt";</div><div class='del'>-	output("$mnt/elilo.conf", "</div><div class='del'>-prompt</div><div class='del'>-timeout=50</div><div class='del'>-</div><div class='del'>-image=vmlinux</div><div class='del'>-        label=linux</div><div class='del'>-        root=/dev/ram3</div><div class='del'>-        initrd=$type.rdz</div><div class='del'>-        append=\" ramdisk_size=120000\"</div><div class='del'>-        read-only</div><div class='del'>-</div><div class='del'>-image=vmlinux</div><div class='del'>-        label=rescue</div><div class='del'>-        root=/dev/ram3</div><div class='del'>-        initrd=$type.rdz</div><div class='del'>-        append=\" rescue ramdisk_size=120000\"</div><div class='del'>-");</div><div class='del'>-    _ "sync";</div><div class='del'>-    _ "df $mnt";</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub boot_img_sparc {</div><div class='del'>-    my ($mnt, $img) = @_;</div><div class='del'>-    if ($type =~ /^live(.*)/) {</div><div class='del'>-	#- hack to produce directly into /export the needed file for cdrom boot.</div><div class='del'>-	my $dir = "/export";</div><div class='del'>-	my $boot = "boot"; #- non-absolute pathname only!</div><div class='del'>-</div><div class='del'>-	_ "mkdir -p $dir/$boot";</div><div class='del'>-	_ "cp -f /boot/cd.b /boot/second.b $dir/$boot";</div><div class='del'>-	_ "cp -f vmlinux$1 $dir/$boot/vmlinux$1";</div><div class='del'>-	-f "live$1.rdz" ? _ "cp -f live$1.rdz $dir/$boot" : initrd("${mnt}2", "$dir/$boot/live$1.rdz");</div><div class='del'>-</div><div class='del'>-	output("$dir/$boot/silo.conf", "</div><div class='del'>-partition=1</div><div class='del'>-default=linux</div><div class='del'>-timeout=100</div><div class='del'>-read-write</div><div class='del'>-message=/$boot/boot.msg</div><div class='del'>-image=\"cat /$boot/boot.msg\"</div><div class='del'>-  label=1</div><div class='del'>-  single-key</div><div class='del'>-image=\"cat /$boot/general.msg\"</div><div class='del'>-  label=2</div><div class='del'>-  single-key</div><div class='del'>-image=\"cat /$boot/expert.msg\"</div><div class='del'>-  label=3</div><div class='del'>-  single-key</div><div class='del'>-image=\"cat /$boot/rescue.msg\"</div><div class='del'>-  label=4</div><div class='del'>-  single-key</div><div class='del'>-image=\"cat /$boot/kickit.msg\"</div><div class='del'>-  label=5</div><div class='del'>-  single-key</div><div class='del'>-image=\"cat /$boot/param.msg\"</div><div class='del'>-  label=6</div><div class='del'>-  single-key</div><div class='del'>-image[sun4c,sun4d,sun4m]=/$boot/vmlinux</div><div class='del'>-  label=linux</div><div class='del'>-  alias=install</div><div class='del'>-  initrd=/$boot/live.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 root=/dev/ram3\"</div><div class='del'>-image[sun4c,sun4d,sun4m]=/$boot/vmlinux</div><div class='del'>-  label=text</div><div class='del'>-  initrd=/$boot/live.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 text root=/dev/ram3\"</div><div class='del'>-image[sun4c,sun4d,sun4m]=/$boot/vmlinux</div><div class='del'>-  label=expert</div><div class='del'>-  initrd=/$boot/live.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 expert root=/dev/ram3\"</div><div class='del'>-image[sun4c,sun4d,sun4m]=/$boot/vmlinux</div><div class='del'>-  label=ks</div><div class='del'>-  initrd=/$boot/live.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 ks root=/dev/ram3\"</div><div class='del'>-image[sun4c,sun4d,sun4m]=/$boot/vmlinux</div><div class='del'>-  label=rescue</div><div class='del'>-  initrd=/$boot/live.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3\"</div><div class='del'>-image[sun4u]=/$boot/vmlinux64</div><div class='del'>-  label=linux</div><div class='del'>-  alias=install</div><div class='del'>-  initrd=/$boot/live64.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 root=/dev/ram3\"</div><div class='del'>-image[sun4u]=/$boot/vmlinux64</div><div class='del'>-  label=text</div><div class='del'>-  initrd=/$boot/live64.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 text root=/dev/ram3\"</div><div class='del'>-image[sun4u]=/$boot/vmlinux64</div><div class='del'>-  label=expert</div><div class='del'>-  initrd=/$boot/live64.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 expert root=/dev/ram3\"</div><div class='del'>-image[sun4u]=/$boot/vmlinux64</div><div class='del'>-  label=ks</div><div class='del'>-  initrd=/$boot/live64.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 ks root=/dev/ram3\"</div><div class='del'>-image[sun4u]=/$boot/vmlinux64</div><div class='del'>-  label=rescue</div><div class='del'>-  initrd=/$boot/live64.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 rescue rw root=/dev/ram3\"</div><div class='del'>-");</div><div class='del'>-</div><div class='del'>-	output("$dir/$boot/README", "</div><div class='del'>-To Build a Bootable CD-ROM, try:</div><div class='del'>-  mkisofs -R -o t.iso -s /$boot/silo.conf /export</div><div class='del'>-");</div><div class='del'>-    } elsif ($type =~ /^tftprd(.*)/) {</div><div class='del'>-	my $dir = "/export";</div><div class='del'>-	my $boot = "images";</div><div class='del'>-	my $setarch = $1 ? "sparc64" : "sparc32";</div><div class='del'>-</div><div class='del'>-	_ "mkdir -p $dir/$boot";</div><div class='del'>-	-f "$type.rdz" or initrd("${mnt}2", "$type.rdz");</div><div class='del'>-	_ "cp -f vmlinux$1.aout $dir/$boot/$type.img";</div><div class='del'>-	_ "$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz";</div><div class='del'>-    } elsif ($type =~ /^tftp(.*)/) {</div><div class='del'>-	my $dir = "/export";</div><div class='del'>-	my $boot = "images";</div><div class='del'>-</div><div class='del'>-	_ "mkdir -p $dir/$boot";</div><div class='del'>-	_ "cp -f vmlinux$1.aout $dir/$boot/$type.img";</div><div class='del'>-    } else {</div><div class='del'>-	my $dir = "floppy";</div><div class='del'>-	my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type;</div><div class='del'>-</div><div class='del'>-	__ "$sudo umount $mnt 2&gt;/dev/null";</div><div class='del'>-	_ "rm -rf $dir";</div><div class='del'>-	_ "mkdir -p $dir";</div><div class='del'>-	_ "cp -f /boot/fd.b /boot/second.b $dir";</div><div class='del'>-	_ "cp -f vmlinuz$I $dir/vmlinux$I.gz" if $type !~ /blank/;</div><div class='del'>-	-f "$type.rdz" ? _ "cp -f $type.rdz $dir" : initrd("${mnt}2", "$dir/$type.rdz");</div><div class='del'>-</div><div class='del'>-	output("$dir/boot.msg", "</div><div class='del'>-Welcome to Mandrake Linux 7.1</div><div class='del'>-</div><div class='del'>-Press &lt;Enter&gt; to install or upgrade a system 7mMandrake Linux7m</div><div class='del'>-");</div><div class='del'>-</div><div class='del'>-	output("$dir/silo.conf", "</div><div class='del'>-partition=1</div><div class='del'>-default=linux</div><div class='del'>-timeout=100</div><div class='del'>-read-write</div><div class='del'>-message=/boot.msg</div><div class='del'>-image=/vmlinux$I.gz</div><div class='del'>-  label=linux</div><div class='del'>-  initrd=/$type.rdz</div><div class='del'>-  append=\"ramdisk_size=32000 $ltype root=/dev/ram3\"</div><div class='del'>-");</div><div class='del'>-	_ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V \'DrakX boot disk\'";</div><div class='del'>-	_ "$sudo mount -t romfs /dev/ram $mnt";</div><div class='del'>-	_ "silo -r $mnt -F -i /fd.b -b /second.b -C /silo.conf";</div><div class='del'>-	_ "$sudo umount $mnt";</div><div class='del'>-	_ "dd if=/dev/ram of=$type.img bs=1440k count=1";</div><div class='del'>-	_ "sync";</div><div class='del'>-	_ "$sudo mount -t romfs /dev/ram $mnt";</div><div class='del'>-	_ "df $mnt";</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub boot_img_ppc {</div><div class='del'>-    my ($mnt, $img, $kern, $modz) = @_;</div><div class='del'>-    my $dir = "/export";</div><div class='del'>-    my $boot = "boot"; #- non-absolute pathname only!</div><div class='del'>-    my ($extension) = $modz =~ /.*\/([^\/]+)/;</div><div class='del'>-    _ "mkdir -p $dir/$boot";</div><div class='del'>-    _ "cp -f $kern $dir/$boot/vmlinux";</div><div class='del'>-    _ "cp -f images/all.rdz$extension $dir/boot/all.gz";</div><div class='del'>-    _ "cp -f tools/ppc/yaboot $dir/boot/yaboot";</div><div class='del'>-	</div><div class='del'>-	output("$dir/$boot/yaboot.conf", "</div><div class='del'>-init-message = \"\\nWelcome to Mandrake Linux PPC!\\nHit &lt;TAB&gt; for boot options.\\n\\n\"</div><div class='del'>-timeout = 150</div><div class='del'>-default = install-novideo</div><div class='del'>-</div><div class='del'>-image = cd:,\\\\\\\\vmlinux</div><div class='del'>-    label = install-novideo</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = cd:,\\\\\\\\all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" video=ofonly\"</div><div class='del'>-    </div><div class='del'>-image = cd:,\\\\\\\\vmlinux</div><div class='del'>-    label = install-atyfb</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = cd:,\\\\\\\\all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" video=atyfb:vmode:17\"</div><div class='del'>-    </div><div class='del'>-image = cd:,\\\\\\\\vmlinux</div><div class='del'>-    label = install-aty128fb</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = cd:,\\\\\\\\all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" video=aty128fb:vmode:17\"</div><div class='del'>-</div><div class='del'>-image = cd:,\\\\\\\\vmlinux</div><div class='del'>-    label = install-text</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = cd:,\\\\\\\\all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" text video=ofonly\"</div><div class='del'>-</div><div class='del'>-image = enet:0,vmlinux</div><div class='del'>-    label = install-net</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = enet:0,all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" video=ofonly\"</div><div class='del'>-</div><div class='del'>-image = enet:0,vmlinux</div><div class='del'>-    label = install-net-text</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = enet:0,all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" text video=ofonly\"</div><div class='del'>-</div><div class='del'>-image = cd:,\\\\\\\\vmlinux</div><div class='del'>-    label = rescue</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = cd:,\\\\\\\\all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" rescue video=ofonly\"    </div><div class='del'>-</div><div class='del'>-image = enet:0,vmlinux</div><div class='del'>-    label = rescue-net</div><div class='del'>-    root = /dev/ram3</div><div class='del'>-    initrd = enet:0,all.gz</div><div class='del'>-    initrd-size = 32000</div><div class='del'>-    append = \" rescue video=ofonly\"    </div><div class='del'>-");</div><div class='del'>-	#- seem to need 2 yaboot.conf, one in the root, and one in boot</div><div class='del'>-	_ "cp -f $dir/boot/yaboot.conf $dir/yaboot.conf";		</div><div class='del'>-</div><div class='del'>-	output("$dir/$boot/README", "</div><div class='del'>-To Build a Bootable CD-ROM, do:</div><div class='del'>-cd /tools/ppc</div><div class='del'>-./mkINSTALLCD /export ppc-cd.img</div><div class='del'>-");</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-sub isolinux {</div><div class='del'>-    my ($main, @kernels) = @_;</div><div class='del'>-    @kernels = ($main, grep { $_ ne $main } @kernels);</div><div class='del'>-    _ "rm -rf isolinux"; mkdir "isolinux", 0777;</div><div class='del'>-    my $i = 0;</div><div class='del'>-    foreach (@kernels) {</div><div class='del'>-	mkdir "isolinux/alt$i", 0777;</div><div class='del'>-	my ($kernel) = glob("kernel/all.kernels/$_/boot/vmlinu*");</div><div class='del'>-	_ "cp $kernel isolinux/alt$i/vmlinuz";</div><div class='del'>-	_ "cp images/all.rdz-$_ isolinux/alt$i/all.rdz";</div><div class='del'>-	$i++;</div><div class='del'>-    }</div><div class='del'>-    if (-e "isolinux-graphic.bmp") {</div><div class='del'>-	#- change here for newer picture isolinux-graphic.bmp and newer parameters.</div><div class='del'>-	_ "lilo-bmp2mdk mode:0x103 progress:425,173,16,8,64+2 clear:600,800,64+2 pos:0,0 &lt;isolinux-graphic.bmp &gt;isolinux/boot.msg";</div><div class='del'>-    }</div><div class='del'>-    _ "cp /usr/lib/syslinux/isolinux.bin isolinux/isolinux.bin";</div><div class='del'>-    output "isolinux/isolinux.cfg", "</div><div class='del'>-default linux</div><div class='del'>-prompt 1</div><div class='del'>-timeout 150</div><div class='del'>-" . (-e "isolinux/boot.msg" ? "display boot.msg" : "display help.msg") . "</div><div class='del'>-F1 help.msg</div><div class='del'>-F2 advanced.msg</div><div class='del'>-" . (-e "isolinux/boot.msg" &amp;&amp; "F3 boot.msg") . "</div><div class='del'>-" . join('', map {</div><div class='del'>-"label $_-&gt;[0]</div><div class='del'>-  kernel alt0/vmlinuz</div><div class='del'>-  append initrd=alt0/all.rdz $_-&gt;[1] automatic=method:cdrom</div><div class='del'>-" } entries_append('all'))</div><div class='del'>-  . join('', map_index {</div><div class='del'>-"label alt$::i</div><div class='del'>-  kernel alt$::i/vmlinuz</div><div class='del'>-  append initrd=alt$::i/all.rdz $default_append $default_vga</div><div class='del'>-" } @kernels);</div><div class='del'>-</div><div class='del'>-    output "isolinux/help.msg", (-e "isolinux/boot.msg" &amp;&amp; pack "C*", 0x0E, 0x80, 0x03, 0x00) .</div><div class='del'>-"</div><div class='del'>-                  0aWelcome to 09Mandrake Linux0a install help07</div><div class='del'>-</div><div class='del'>-In most cases, the best way to get started is to simply press the 0e&lt;Enter&gt;07 key.</div><div class='del'>-If you experience problems with standard install, try one of the following </div><div class='del'>-install types (type the highlighted text and press 0e&lt;Enter&gt;07):</div><div class='del'>-</div><div class='del'>- o  0fvgalo07 for low resolution graphical installation.</div><div class='del'>- o  0ftext07 for text installation instead of the graphical one.</div><div class='del'>- o  0flinux07 for standard graphical installation at normal resolution.</div><div class='del'>- o  0fexpert07 for expert graphical installation at normal resolution.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-To use this CD to repair an already installed system type 0frescue07</div><div class='del'>-followed by 0e&lt;Enter&gt;07.</div><div class='del'>-</div><div class='del'>-You can also pass some 0f&lt;specific kernel options&gt;07 to the Linux kernel. </div><div class='del'>-For example, try 0flinux mem=128M07 if your system has 128Mb of RAM but the default</div><div class='del'>-kernel ($main) does not detect it correctly.</div><div class='del'>-0cNOTE07: You cannot pass options to modules (SCSI, ethernet card) or devices</div><div class='del'>-such as CD-ROM drives in this way. If you need to do so, use expert mode.</div><div class='del'>-</div><div class='del'>-" . (-e "isolinux/boot.msg" ?</div><div class='del'>-     "0c[F1-Help] [F2-Advanced Help] [F3-Main]07" :</div><div class='del'>-     "0c[F1-Help] [F2-Advanced Help]07") . "\n";</div><div class='del'>-</div><div class='del'>-    output "isolinux/advanced.msg", (-e "isolinux/boot.msg" &amp;&amp; pack "C*", 0x0E, 0x80, 0x03, 0x00) .</div><div class='del'>-"</div><div class='del'>-The following install types may be used instead of previously notified :</div><div class='del'>- o  0fvgahi07 for high resolution graphical installation.</div><div class='del'>- o  0fvga1607 for 640x480 in 16 colors graphical installation.</div><div class='del'>-</div><div class='del'>-The following options may be added on the command line :</div><div class='del'>- o  0freadonly=107 to disable editing disk partitions.</div><div class='del'>- o  0fdisplay=ackbar:007 to export display to 09ackbar07 machine screen 0 during</div><div class='del'>-    installation.</div><div class='del'>- o  0fnoauto07 to disable automatic detection (generally used with 0fexpert07).</div><div class='del'>- o  0fsecurity=n07 to set security level to value 09n07.</div><div class='del'>- o  0fupdatemodules07 to use the special update floppy containing modules updates.</div><div class='del'>- o  0fpatch07 to use a patch from the floppy (file named 09patch.pl07).</div><div class='del'>- o  0fauto_install=floppy07 to enable auto_install using 09auto_inst.cfg07 file on the</div><div class='del'>-    floppy.</div><div class='del'>-</div><div class='del'>-You can choose the following kernels :</div><div class='del'>-" . join('', map_index { " o  0falt$::i07 is kernel $_\n" } @kernels) . "</div><div class='del'>-" . (-e "isolinux/boot.msg" ?</div><div class='del'>-     "0c[F1-Help] [F2-Advanced Help] [F3-Main]07" :</div><div class='del'>-     "0c[F1-Help] [F2-Advanced Help]07") . "\n";</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/.cvsignore b/mdk-stage1/.cvsignore<br/>deleted file mode 100644<br/>index a96a43de4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-init</div><div class='del'>-stage1-full</div><div class='del'>-stage1-cdrom</div><div class='del'>-stage1-disk</div><div class='del'>-stage1-network</div><div class='del'>-debug.log</div><div class='del'>-.depend</div><div class='del'>-*.rdz*</div><div class='del'>-mkinitrd_helper.tar.bz2</div><div class='del'>-hack_*</div><div class='del'>-stage1-usb</div><div class='del'>-rescue-gui</div><div class='head'>diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile<br/>deleted file mode 100644<br/>index 81378031d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,260 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    mdk-stage1 - the program that will load second-stage install</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- # Portions from Erik Troan (ewt@redhat.com) Copyright 1996 Red Hat Software </div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>- #</div><div class='del'>- # Currently:</div><div class='del'>- #</div><div class='del'>- # 	ix86</div><div class='del'>- # init with minilibc</div><div class='del'>- # stage1 with dietlibc</div><div class='del'>- #</div><div class='del'>- # 	ppc</div><div class='del'>- # init with dietlibc</div><div class='del'>- # stage1 with glibc</div><div class='del'>- #</div><div class='del'>- # 	ia64</div><div class='del'>- # init with glibc</div><div class='del'>- # stage1 with glibc</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-VERSION = 9.0</div><div class='del'>-</div><div class='del'>-top_dir = .</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-DEFS = -DVERSION=\"$(VERSION)\" -DSPAWN_SHELL</div><div class='del'>-</div><div class='del'>-COMPILE = $(CC) $(DEFS) $(CFLAGS)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>- #- stage1 "loader"</div><div class='del'>-ifeq (i386, $(ARCH))</div><div class='del'>-INITSRC = minilibc.c init.c</div><div class='del'>-INIT_DEFS = -DINIT_HEADERS=\"minilibc.h\" -fno-builtin</div><div class='del'>-else</div><div class='del'>-INITSRC = init.c</div><div class='del'>-ifeq (ia64, $(ARCH))</div><div class='del'>-INIT_DEFS = -DINIT_HEADERS=\"init-libc-headers.h\" $(GLIBC_INCLUDES)</div><div class='del'>-else</div><div class='del'>-INIT_DEFS = -DINIT_HEADERS=\"init-libc-headers.h\" $(DIETLIBC_INCLUDES)</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-INITOBJS = $(subst .c,.o,$(INITSRC))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>- #- frontends</div><div class='del'>-NEWT_FRONTEND_SRC = newt-frontend.c</div><div class='del'>-GLIBC_NEWT_FRONTEND_LIBS = newt/libnewt.a slang/libslang.a</div><div class='del'>-DIETLIBC_NEWT_FRONTEND_LIBS = $(subst .a,-DIET.a,$(GLIBC_NEWT_FRONTEND_LIBS))</div><div class='del'>-</div><div class='del'>-STDIO_FRONTEND_SRC = stdio-frontend.c</div><div class='del'>-GLIBC_STDIO_FRONTEND_LIBS =</div><div class='del'>-DIETLIBC_STDIO_FRONTEND_LIBS =</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-FRONTEND_OBJS = $(subst .c,.o,$($(F)_FRONTEND_SRC))</div><div class='del'>-</div><div class='del'>-FRONTEND_LINK = $(FRONTEND_OBJS) $($(L)_$(F)_FRONTEND_LIBS)</div><div class='del'>-</div><div class='del'>-ifeq (i386, $(ARCH))</div><div class='del'>-INSMOD = insmod-busybox</div><div class='del'>-else</div><div class='del'>-INSMOD = insmod-modutils</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-GLIBC_STAGE1_OWN_LIBS = $(INSMOD)/libinsmod.a mar/libmar.a bzlib/libbzlib.a</div><div class='del'>-DIETLIBC_STAGE1_OWN_LIBS = $(subst .a,-DIET.a,$(GLIBC_STAGE1_OWN_LIBS))</div><div class='del'>-STAGE1_OWN_LIBS = $($(L)_STAGE1_OWN_LIBS)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ifeq (DIETLIBC, $(L))</div><div class='del'>-STAGE1_NETWORK_LIBS = $(top_dir)/dietlibc/bin-$(ARCH)/librpc.a</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifeq (GLIBC, $(L))</div><div class='del'>-STAGE1_NETWORK_LIBS = /usr/lib/libresolv.a</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>- #- stage1 itself</div><div class='del'>-STAGE1SRC = stage1.c log.c tools.c modules.c probing.c mount.c automatic.c frontend-common.c</div><div class='del'>-CDROMSRC = cdrom.c</div><div class='del'>-DISKSRC = disk.c lomount.c</div><div class='del'>-NETWORKSRC = network.c nfsmount.c dhcp.c url.c dns.c adsl.c</div><div class='del'>-</div><div class='del'>-ALLSRC = $(INITSRC) $(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STAGE1OBJS-CDROM = $(subst .c,-CDROM.o,$(STAGE1SRC) $(CDROMSRC))</div><div class='del'>-</div><div class='del'>-CDROM_DEFS = -DDISABLE_DISK -DDISABLE_NETWORK</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STAGE1OBJS-DISK = $(subst .c,-DISK.o,$(STAGE1SRC) $(DISKSRC))</div><div class='del'>-</div><div class='del'>-DISK_DEFS = -DDISABLE_CDROM -DDISABLE_NETWORK</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STAGE1OBJS-NETWORK = $(subst .c,-NETWORK.o,$(STAGE1SRC) $(NETWORKSRC))</div><div class='del'>-</div><div class='del'>-NETWORK_DEFS = -DDISABLE_CDROM -DDISABLE_DISK</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STAGE1OBJS-USB = $(subst .c,-USB.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC))</div><div class='del'>-</div><div class='del'>-STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1SRC) $(CDROMSRC) $(DISKSRC) $(NETWORKSRC))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ifeq (i386, $(ARCH))</div><div class='del'>-LDFLAGS_INIT = -static -nostdlib /usr/lib/crt1.o</div><div class='del'>-else</div><div class='del'>-ifeq (ia64, $(ARCH))</div><div class='del'>-LDFLAGS_INIT = $(GLIBC_LDFLAGS_STAGE1)</div><div class='del'>-INIT_LIBC = $(GLIBC_LIBC)</div><div class='del'>-else</div><div class='del'>-LDFLAGS_INIT = $(DIETLIBC_LDFLAGS_STAGE1)</div><div class='del'>-INIT_LIBC = $(DIETLIBC_LIBC)</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-BINS = init stage1-full</div><div class='del'>-</div><div class='del'>-ifeq (i386, $(ARCH))</div><div class='del'>-BINS += stage1-cdrom stage1-disk stage1-network stage1-usb</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifneq (ia64, $(ARCH))</div><div class='del'>-DIRS = dietlibc</div><div class='del'>-endif</div><div class='del'>-DIRS += mar pci-resource usb-resource bzlib $(INSMOD) slang newt ppp/pppd rp-pppoe/src</div><div class='del'>-ifeq (i386,$(ARCH))</div><div class='del'>-DIRS += pcmcia_</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ifeq (i386,$(ARCH))</div><div class='del'>-GLIBC_PCMCIA_LIB = pcmcia_/libpcmcia.a</div><div class='del'>-DIETLIBC_PCMCIA_LIB = $(subst .a,-DIET.a,$(GLIBC_PCMCIA_LIB))</div><div class='del'>-PCMCIA_LIB = $($(L)_PCMCIA_LIB)</div><div class='del'>-PCMCIA_DEFS = -DENABLE_PCMCIA</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-USB_DEFS_GEN = -DENABLE_USB</div><div class='del'>-USB_DEFS = -DENABLE_USB -DDISABLE_PCIADAPTERS</div><div class='del'>-</div><div class='del'>-all: dirs $(BINS)</div><div class='del'>-</div><div class='del'>-dirs:</div><div class='del'>-	@for n in . $(DIRS); do \</div><div class='del'>-		[ "$$n" = "." ] || make -C $$n || exit 1 ;\</div><div class='del'>-	done</div><div class='del'>-</div><div class='del'>-init: $(INITOBJS) $(INIT_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_INIT) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-stage1-cdrom: $(STAGE1OBJS-CDROM) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-stage1-disk: $(STAGE1OBJS-DISK) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-stage1-network: $(STAGE1OBJS-NETWORK) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-stage1-usb: $(STAGE1OBJS-USB) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-$(INITOBJS): %.o: %.c</div><div class='del'>-	$(COMPILE) $(INIT_DEFS) -c $&lt;</div><div class='del'>-</div><div class='del'>-$(STAGE1OBJS-CDROM): %-CDROM.o: %.c</div><div class='del'>-	$(COMPILE) $(INCLUDES) $(CDROM_DEFS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(STAGE1OBJS-DISK): %-DISK.o: %.c</div><div class='del'>-	$(COMPILE) $(INCLUDES) $(DISK_DEFS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(STAGE1OBJS-NETWORK): %-NETWORK.o: %.c</div><div class='del'>-	$(COMPILE) $(INCLUDES) $(NETWORK_DEFS) $(PCMCIA_DEFS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(STAGE1OBJS-USB): %-USB.o: %.c</div><div class='del'>-	$(COMPILE) $(INCLUDES) $(USB_DEFS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(STAGE1OBJS-FULL): %-FULL.o: %.c</div><div class='del'>-	$(COMPILE) $(INCLUDES) $(USB_DEFS_GEN) $(PCMCIA_DEFS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-.c.o:</div><div class='del'>-	$(COMPILE) $(INCLUDES) -c $&lt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-clean: </div><div class='del'>-	@for n in $(DIRS); do \</div><div class='del'>-		(cd $$n; make clean) \</div><div class='del'>-	done</div><div class='del'>-	rm -f *.o .depend *.rdz *.img rescue-gui $(BINS)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-tar-mkinitrd_helper: clean</div><div class='del'>-	rm -rf mkinitrd_helper-subdir</div><div class='del'>-	mkdir mkinitrd_helper-subdir</div><div class='del'>-	cd mkinitrd_helper-subdir ; cp -a ../dietlibc ../insmod-busybox ../Makefile.common ../insmod.h ../log.h . ; \</div><div class='del'>-	    cp ../Makefile.mkinitrd_helper Makefile</div><div class='del'>-	tar cfj mkinitrd_helper.tar.bz2 mkinitrd_helper-subdir --exclude CVS</div><div class='del'>-	rm -rf mkinitrd_helper-subdir</div><div class='del'>-</div><div class='del'>-rescue-gui: rescue-gui.o frontend-common.o $(FRONTEND_LINK) $(STAGE1_LIBC)</div><div class='del'>-	$(CC) $(LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-.depend:</div><div class='del'>-	$(CPP) $(CFLAGS) -M $(ALLSRC) &gt; .depend</div><div class='del'>-</div><div class='del'>-ifeq (.depend,$(wildcard .depend))</div><div class='del'>-include .depend</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-*-CDROM.o: %-CDROM.o: %.o</div><div class='del'>-</div><div class='del'>-*-DISK.o: %-DISK.o: %.o</div><div class='del'>-</div><div class='del'>-*-NETWORK.o: %-NETWORK.o: %.o</div><div class='del'>-</div><div class='del'>-*-USB.o: %-USB.o: %.o</div><div class='del'>-</div><div class='del'>-*-FULL.o: %-FULL.o: %.o</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common<br/>deleted file mode 100644<br/>index 7506c1381..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/Makefile.common?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/Makefile.common</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,57 +0,0 @@</div><div class='del'>- # -*- makefile -*-</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-ARCH := $(patsubst i%86,i386,$(shell uname -m))</div><div class='del'>-ARCH := $(patsubst sparc%,sparc,$(ARCH))</div><div class='del'>-</div><div class='del'>- #- default lib is dietlibc (honoured by main Makefile whenever possible)</div><div class='del'>-L = DIETLIBC</div><div class='del'>-#L = GLIBC</div><div class='del'>-</div><div class='del'>- #- default frontend is newt (honoured by main Makefile whenever possible)</div><div class='del'>-F = NEWT</div><div class='del'>-# F = STDIO</div><div class='del'>-</div><div class='del'>- #- override in some situations</div><div class='del'>-ifeq (ia64, $(ARCH))</div><div class='del'>-L = GLIBC</div><div class='del'>-endif</div><div class='del'>-ifeq (ppc, $(ARCH))</div><div class='del'>-L = GLIBC</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>- #- flags used by all stuff</div><div class='del'>-ifeq (ppc, $(ARCH))</div><div class='del'>-CFLAGS = -Os -pipe -Wall -fomit-frame-pointer</div><div class='del'>-else</div><div class='del'>-CFLAGS = -Os -pipe -Wall -Werror -W -fomit-frame-pointer</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-DIETLIBC_INCLUDES = -I$(top_dir)/dietlibc/include -I. -I$(top_dir)/bzlib</div><div class='del'>-GLIBC_INCLUDES = -I. -I$(top_dir)/bzlib</div><div class='del'>-INCLUDES = $($(L)_INCLUDES)</div><div class='del'>-</div><div class='del'>-GLIBC_LDFLAGS_STAGE1 = -static</div><div class='del'>-DIETLIBC_LDFLAGS_STAGE1 = -nostdlib $(top_dir)/dietlibc/bin-$(ARCH)/start.o</div><div class='del'>-LDFLAGS_STAGE1 = $($(L)_LDFLAGS_STAGE1)</div><div class='del'>-</div><div class='del'>-GLIBC_LIBC =</div><div class='del'>-DIETLIBC_LIBC = $(top_dir)/dietlibc/bin-$(ARCH)/dietlibc.a</div><div class='del'>-STAGE1_LIBC = $($(L)_LIBC)</div><div class='del'>-</div><div class='del'>-STRIPCMD = strip -R .note -R .comment</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/Makefile.mkinitrd_helper b/mdk-stage1/Makefile.mkinitrd_helper<br/>deleted file mode 100644<br/>index 72bef595f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/Makefile.mkinitrd_helper?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/Makefile.mkinitrd_helper</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-DIRS = dietlibc insmod-busybox</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: dirs</div><div class='del'>-</div><div class='del'>-dirs:</div><div class='del'>-	@for n in . $(DIRS); do \</div><div class='del'>-		[ "$$n" = "." ] || make -C $$n ;\</div><div class='del'>-	done</div><div class='del'>-</div><div class='del'>-clean: </div><div class='del'>-	@for n in $(DIRS); do \</div><div class='del'>-		(cd $$n; make clean) \</div><div class='del'>-	done</div><div class='head'>diff --git a/mdk-stage1/adsl.c b/mdk-stage1/adsl.c<br/>deleted file mode 100644<br/>index d542f2f35..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/adsl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/adsl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,172 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;resolv.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "network.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-#include "tools.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "automatic.h"</div><div class='del'>-</div><div class='del'>-#include "adsl.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type adsl_connect(char * net_device, char * username, char * password)</div><div class='del'>-{</div><div class='del'>-	char pppoe_call[500];</div><div class='del'>-	char * pppd_launch[] = { "/sbin/pppd", "pty", pppoe_call, "noipdefault", "noauth", "default-asyncmap", "defaultroute",</div><div class='del'>-				 "hide-password", "nodetach", "usepeerdns", "local", "mtu", "1492", "mru", "1492", "noaccomp",</div><div class='del'>-				 "noccp", "nobsdcomp", "nodeflate", "nopcomp", "novj", "novjccomp", "user", username,</div><div class='del'>-				 "password", password, "lcp-echo-interval", "20", "lcp-echo-failure", "3", "lock", "persist", NULL };</div><div class='del'>-	int fd;</div><div class='del'>-	int retries = 10;</div><div class='del'>-	char * tty_adsl = "/dev/tty6";</div><div class='del'>-	enum return_type status = RETURN_ERROR;</div><div class='del'>-	pid_t ppp_pid;</div><div class='del'>-</div><div class='del'>-	snprintf(pppoe_call, sizeof(pppoe_call), "/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I %s -T 80 -U -m 1412", net_device);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	fd = open(tty_adsl, O_RDWR);</div><div class='del'>-	if (fd == -1) {</div><div class='del'>-		log_message("cannot open tty -- no pppd");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-	else if (access(pppd_launch[0], X_OK)) {</div><div class='del'>-		log_message("cannot open pppd - %s doesn't exist", pppd_launch[0]);</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!(ppp_pid = fork())) {</div><div class='del'>-		dup2(fd, 0);</div><div class='del'>-		dup2(fd, 1);</div><div class='del'>-		dup2(fd, 2);</div><div class='del'>-		</div><div class='del'>-		close(fd);</div><div class='del'>-		setsid();</div><div class='del'>-		if (ioctl(0, TIOCSCTTY, NULL))</div><div class='del'>-			log_perror("could not set new controlling tty");</div><div class='del'>-		</div><div class='del'>-		printf("\t(exec of pppd)\n");</div><div class='del'>-		execve(pppd_launch[0], pppd_launch, grab_env());</div><div class='del'>-		log_message("execve of %s failed: %s", pppd_launch[0], strerror(errno));</div><div class='del'>-		exit(-1);</div><div class='del'>-	}</div><div class='del'>-	close(fd);</div><div class='del'>-	while (retries &gt; 0 &amp;&amp; kill(ppp_pid, 0) == 0) {</div><div class='del'>-		FILE * f;</div><div class='del'>-		if ((f = fopen("/var/run/pppd.tdb", "rb"))) {</div><div class='del'>-			while (1) {</div><div class='del'>-				char buf[500];</div><div class='del'>-				if (!fgets(buf, sizeof(buf), f))</div><div class='del'>-					break;</div><div class='del'>-				if (strstr(buf, "IPLOCAL="))</div><div class='del'>-					status = RETURN_OK;</div><div class='del'>-			}</div><div class='del'>-			fclose(f);</div><div class='del'>-			if (status == RETURN_OK) {</div><div class='del'>-				log_message("PPP: connected!");</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		retries--;</div><div class='del'>-		log_message("PPP: &lt;sleep&gt;");</div><div class='del'>-		sleep(2);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (status != RETURN_OK) {</div><div class='del'>-		log_message("PPP: could not connect");</div><div class='del'>-		kill(ppp_pid, SIGTERM);</div><div class='del'>-		sleep(1);</div><div class='del'>-		kill(ppp_pid, SIGKILL);</div><div class='del'>-		sleep(1);</div><div class='del'>-	}</div><div class='del'>-	return status;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type perform_adsl(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	struct in_addr addr;</div><div class='del'>-	char * questions[] = { "Username", "Password", NULL };</div><div class='del'>-	char * questions_auto[] = { "adsluser", "adslpass", NULL };</div><div class='del'>-	static char ** answers = NULL;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	inet_aton("10.0.0.10", &amp;addr);</div><div class='del'>-	memcpy(&amp;intf-&gt;ip, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-	inet_aton("255.255.255.0", &amp;addr);</div><div class='del'>-	memcpy(&amp;intf-&gt;netmask, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-	*((uint32_t *) &amp;intf-&gt;broadcast) = (*((uint32_t *) &amp;intf-&gt;ip) &amp;</div><div class='del'>-					    *((uint32_t *) &amp;intf-&gt;netmask)) | ~(*((uint32_t *) &amp;intf-&gt;netmask));</div><div class='del'>-</div><div class='del'>-	intf-&gt;is_ptp = 0;</div><div class='del'>-</div><div class='del'>-	if (configure_net_device(intf)) {</div><div class='del'>-		stg1_error_message("Could not configure..");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = ask_from_entries_auto("Please enter the username and password for your ADSL account.\n"</div><div class='del'>-					"(Warning! only PPPoE protocol is supported)",</div><div class='del'>-					questions, &amp;answers, 40, questions_auto, NULL);</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	intf-&gt;boot_proto = BOOTPROTO_ADSL_PPPOE;</div><div class='del'>-</div><div class='del'>-	wait_message("Waiting for ADSL connection to show up...");</div><div class='del'>-	my_insmod("ppp_generic", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-	my_insmod("ppp_async", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-	my_insmod("ppp", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-	results = adsl_connect(intf-&gt;device, answers[0], answers[1]);</div><div class='del'>-	remove_wait_message();</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK) {</div><div class='del'>-		wait_message("Retrying the ADSL connection...");</div><div class='del'>-		results = adsl_connect(intf-&gt;device, answers[0], answers[1]);</div><div class='del'>-		remove_wait_message();</div><div class='del'>-	} else {</div><div class='del'>-		intf-&gt;user = strdup(answers[0]);</div><div class='del'>-		intf-&gt;pass = strdup(answers[1]);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK) {</div><div class='del'>-		stg1_error_message("I could not connect to the ADSL network.");</div><div class='del'>-		return perform_adsl(intf);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	sleep(1);</div><div class='del'>-	res_init();		/* reinit the resolver, pppd modified /etc/resolv.conf */</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/adsl.h b/mdk-stage1/adsl.h<br/>deleted file mode 100644<br/>index 9d32cc631..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/adsl.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/adsl.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,34 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * View the homepage: http://us.mandrakesoft.com/~gc/html/stage1.html</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Portions from GRUB  --  GRand Unified Bootloader</div><div class='del'>- *  Copyright (C) 2000  Free Software Foundation, Inc.</div><div class='del'>- *</div><div class='del'>- *  Itself based on etherboot-4.6.4 by Martin Renters.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _ADSL_H_</div><div class='del'>-#define _ADSL_H_</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "network.h"</div><div class='del'>-</div><div class='del'>-enum return_type perform_adsl(struct interface_info * intf);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c<br/>deleted file mode 100644<br/>index 1c6e021a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/automatic.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/automatic.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,161 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is supposed to replace the redhat "kickstart", by name but</div><div class='del'>- * also by design (less code pollution).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "tools.h"</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-</div><div class='del'>-#include "automatic.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static struct param_elem * automatic_params;</div><div class='del'>-static char * value_not_bound = "";</div><div class='del'>-</div><div class='del'>-void grab_automatic_params(char * line)</div><div class='del'>-{</div><div class='del'>-	int i, p;</div><div class='del'>-	struct param_elem tmp_params[50];</div><div class='del'>-</div><div class='del'>-	i = 0; p = 0;</div><div class='del'>-	while (line[i] != '\0') {</div><div class='del'>-		char *name, *value;</div><div class='del'>-		int k;</div><div class='del'>-		int j = i;</div><div class='del'>-		while (line[i] != ':' &amp;&amp; line[i] != '\0')</div><div class='del'>-			i++;</div><div class='del'>-		name = memdup(&amp;line[j], i-j + 1);</div><div class='del'>-		name[i-j] = 0;</div><div class='del'>-</div><div class='del'>-		k = i+1;</div><div class='del'>-		i++;</div><div class='del'>-		while (line[i] != ',' &amp;&amp; line[i] != '\0')</div><div class='del'>-			i++;</div><div class='del'>-		value = memdup(&amp;line[k], i-k + 1);</div><div class='del'>-		value[i-k] = 0;</div><div class='del'>-</div><div class='del'>-		tmp_params[p].name = name;</div><div class='del'>-		tmp_params[p].value = value;</div><div class='del'>-		p++;</div><div class='del'>-		if (line[i] == '\0')</div><div class='del'>-			break;</div><div class='del'>-		i++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	tmp_params[p++].name = NULL;</div><div class='del'>-	automatic_params = memdup(tmp_params, sizeof(struct param_elem) * p);</div><div class='del'>-</div><div class='del'>-	log_message("AUTOMATIC MODE: got %d params", p-1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * get_auto_value(char * auto_param)</div><div class='del'>-{</div><div class='del'>-	struct param_elem * ptr = automatic_params;</div><div class='del'>-</div><div class='del'>-	struct param_elem short_aliases[] =</div><div class='del'>-		{ { "method", "met" }, { "network", "netw" }, { "interface", "int" }, { "gateway", "gat" },</div><div class='del'>-		  { "netmask", "netm" }, { "adsluser", "adslu" }, { "adslpass", "adslp" }, { "hostname", "hos" },</div><div class='del'>-		  { "domain", "dom" }, { "server", "ser" }, { "directory", "dir" }, { "user", "use" },</div><div class='del'>-		  { "pass", "pas" }, { "disk", "dis" }, { "partition", "par" }, { NULL, NULL } };</div><div class='del'>-	struct param_elem * ptr_alias = short_aliases;</div><div class='del'>-	while (ptr_alias-&gt;name) {</div><div class='del'>-		if (streq(auto_param, ptr_alias-&gt;name))</div><div class='del'>-			break;</div><div class='del'>-		ptr_alias++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (ptr-&gt;name) {</div><div class='del'>-		if (streq(ptr-&gt;name, auto_param)</div><div class='del'>-		    || (ptr_alias-&gt;name &amp;&amp; streq(ptr_alias-&gt;value, ptr-&gt;name)))</div><div class='del'>-			return ptr-&gt;value;</div><div class='del'>-		ptr++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return value_not_bound;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, char * auto_param, char ** elems_auto)</div><div class='del'>-{</div><div class='del'>-	if (!IS_AUTOMATIC)</div><div class='del'>-		return ask_from_list(msg, elems, choice);</div><div class='del'>-	else {</div><div class='del'>-		char ** sav_elems = elems;</div><div class='del'>-		char * tmp = get_auto_value(auto_param);</div><div class='del'>-		while (elems &amp;&amp; *elems) {</div><div class='del'>-			if (!strcmp(tmp, *elems_auto)) {</div><div class='del'>-				*choice = *elems;</div><div class='del'>-				log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems);</div><div class='del'>-				return RETURN_OK;</div><div class='del'>-			}</div><div class='del'>-			elems++;</div><div class='del'>-			elems_auto++;</div><div class='del'>-		}</div><div class='del'>-		unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-		return ask_from_list(msg, sav_elems, choice);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_list_comments_auto(char *msg, char ** elems, char ** elems_comments, char ** choice, char * auto_param, char ** elems_auto)</div><div class='del'>-{</div><div class='del'>-	if (!IS_AUTOMATIC)</div><div class='del'>-		return ask_from_list_comments(msg, elems, elems_comments, choice);</div><div class='del'>-	else {</div><div class='del'>-		char ** sav_elems = elems;</div><div class='del'>-		char * tmp = get_auto_value(auto_param);</div><div class='del'>-		while (elems &amp;&amp; *elems) {</div><div class='del'>-			if (!strcmp(tmp, *elems_auto)) {</div><div class='del'>-				*choice = *elems;</div><div class='del'>-				log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems);</div><div class='del'>-				return RETURN_OK;</div><div class='del'>-			}</div><div class='del'>-			elems++;</div><div class='del'>-			elems_auto++;</div><div class='del'>-		}</div><div class='del'>-		unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-		return ask_from_list_comments(msg, sav_elems, elems_comments, choice);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** answers, int entry_size, char ** questions_auto, void (*callback_func)(char ** strings))</div><div class='del'>-{</div><div class='del'>-	if (!IS_AUTOMATIC)</div><div class='del'>-		return ask_from_entries(msg, questions, answers, entry_size, callback_func);</div><div class='del'>-	else {</div><div class='del'>-		char * tmp_answers[50];</div><div class='del'>-		int i = 0;</div><div class='del'>-		while (questions &amp;&amp; *questions) {</div><div class='del'>-			tmp_answers[i] = get_auto_value(*questions_auto);</div><div class='del'>-			log_message("AUTOMATIC: question %s answers %s because of param %s", *questions, tmp_answers[i], *questions_auto);</div><div class='del'>-			i++;</div><div class='del'>-			questions++;</div><div class='del'>-			questions_auto++;</div><div class='del'>-			</div><div class='del'>-		}</div><div class='del'>-		*answers = memdup(tmp_answers, sizeof(char *) * i);</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/automatic.h b/mdk-stage1/automatic.h<br/>deleted file mode 100644<br/>index c2ac0a73d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/automatic.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/automatic.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is supposed to replace the redhat "kickstart", by name but</div><div class='del'>- * also by design (no code pollution).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _AUTOMATIC_H_</div><div class='del'>-#define _AUTOMATIC_H_</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-</div><div class='del'>-void grab_automatic_params(char * line);</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, char * auto_param, char ** elems_auto);</div><div class='del'>-enum return_type ask_from_list_comments_auto(char *msg, char ** elems, char ** elems_comments, char ** choice, char * auto_param, char ** elems_auto);</div><div class='del'>-enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** answers, int entry_size, char ** questions_auto, void (*callback_func)(char ** strings));</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/bzlib/Makefile b/mdk-stage1/bzlib/Makefile<br/>deleted file mode 100644<br/>index 03a2c254b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,55 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-LIBNAME = libbzlib</div><div class='del'>-</div><div class='del'>-OBJS = blocksort.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o</div><div class='del'>-</div><div class='del'>-DEFS =</div><div class='del'>-</div><div class='del'>-INCS =</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-TARGETS = $(LIBNAME).a</div><div class='del'>-</div><div class='del'>-ifeq (DIETLIBC, $(L))</div><div class='del'>-TARGETS += $(LIBNAME)-DIET.a</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-all: $(TARGETS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a</div><div class='del'>-</div><div class='del'>-OBJS-DIET = $(subst .o,-DIET.o,$(OBJS))</div><div class='del'>-</div><div class='del'>-$(LIBNAME).a: $(OBJS)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-$(LIBNAME)-DIET.a: $(OBJS-DIET)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-$(OBJS): %.o: %.c</div><div class='del'>-	$(CC) $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(OBJS-DIET): %-DIET.o: %.c</div><div class='del'>-	$(CC) $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -c $&lt; -o $@</div><div class='head'>diff --git a/mdk-stage1/bzlib/blocksort.c b/mdk-stage1/bzlib/blocksort.c<br/>deleted file mode 100644<br/>index c1b78c483..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/blocksort.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/blocksort.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1138 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Block sorting machinery                               ---*/</div><div class='del'>-/*---                                           blocksort.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>-</div><div class='del'>-  To get some idea how the block sorting algorithms in this file </div><div class='del'>-  work, read my paper </div><div class='del'>-     On the Performance of BWT Sorting Algorithms</div><div class='del'>-  in Proceedings of the IEEE Data Compression Conference 2000,</div><div class='del'>-  Snowbird, Utah, USA, 27-30 March 2000.  The main sort in this</div><div class='del'>-  file implements the algorithm called  cache  in the paper.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/*--- Fallback O(N log(N)^2) sorting        ---*/</div><div class='del'>-/*--- algorithm, for repetitive blocks      ---*/</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-static </div><div class='del'>-__inline__</div><div class='del'>-void fallbackSimpleSort ( UInt32* fmap, </div><div class='del'>-                          UInt32* eclass, </div><div class='del'>-                          Int32   lo, </div><div class='del'>-                          Int32   hi )</div><div class='del'>-{</div><div class='del'>-   Int32 i, j, tmp;</div><div class='del'>-   UInt32 ec_tmp;</div><div class='del'>-</div><div class='del'>-   if (lo == hi) return;</div><div class='del'>-</div><div class='del'>-   if (hi - lo &gt; 3) {</div><div class='del'>-      for ( i = hi-4; i &gt;= lo; i-- ) {</div><div class='del'>-         tmp = fmap[i];</div><div class='del'>-         ec_tmp = eclass[tmp];</div><div class='del'>-         for ( j = i+4; j &lt;= hi &amp;&amp; ec_tmp &gt; eclass[fmap[j]]; j += 4 )</div><div class='del'>-            fmap[j-4] = fmap[j];</div><div class='del'>-         fmap[j-4] = tmp;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   for ( i = hi-1; i &gt;= lo; i-- ) {</div><div class='del'>-      tmp = fmap[i];</div><div class='del'>-      ec_tmp = eclass[tmp];</div><div class='del'>-      for ( j = i+1; j &lt;= hi &amp;&amp; ec_tmp &gt; eclass[fmap[j]]; j++ )</div><div class='del'>-         fmap[j-1] = fmap[j];</div><div class='del'>-      fmap[j-1] = tmp;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-#define fswap(zz1, zz2) \</div><div class='del'>-   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }</div><div class='del'>-</div><div class='del'>-#define fvswap(zzp1, zzp2, zzn)       \</div><div class='del'>-{                                     \</div><div class='del'>-   Int32 yyp1 = (zzp1);               \</div><div class='del'>-   Int32 yyp2 = (zzp2);               \</div><div class='del'>-   Int32 yyn  = (zzn);                \</div><div class='del'>-   while (yyn &gt; 0) {                  \</div><div class='del'>-      fswap(fmap[yyp1], fmap[yyp2]);  \</div><div class='del'>-      yyp1++; yyp2++; yyn--;          \</div><div class='del'>-   }                                  \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define fmin(a,b) ((a) &lt; (b)) ? (a) : (b)</div><div class='del'>-</div><div class='del'>-#define fpush(lz,hz) { stackLo[sp] = lz; \</div><div class='del'>-                       stackHi[sp] = hz; \</div><div class='del'>-                       sp++; }</div><div class='del'>-</div><div class='del'>-#define fpop(lz,hz) { sp--;              \</div><div class='del'>-                      lz = stackLo[sp];  \</div><div class='del'>-                      hz = stackHi[sp]; }</div><div class='del'>-</div><div class='del'>-#define FALLBACK_QSORT_SMALL_THRESH 10</div><div class='del'>-#define FALLBACK_QSORT_STACK_SIZE   100</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void fallbackQSort3 ( UInt32* fmap, </div><div class='del'>-                      UInt32* eclass,</div><div class='del'>-                      Int32   loSt, </div><div class='del'>-                      Int32   hiSt )</div><div class='del'>-{</div><div class='del'>-   Int32 unLo, unHi, ltLo, gtHi, n, m;</div><div class='del'>-   Int32 sp, lo, hi;</div><div class='del'>-   UInt32 med, r, r3;</div><div class='del'>-   Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];</div><div class='del'>-   Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];</div><div class='del'>-</div><div class='del'>-   r = 0;</div><div class='del'>-</div><div class='del'>-   sp = 0;</div><div class='del'>-   fpush ( loSt, hiSt );</div><div class='del'>-</div><div class='del'>-   while (sp &gt; 0) {</div><div class='del'>-</div><div class='del'>-      AssertH ( sp &lt; FALLBACK_QSORT_STACK_SIZE, 1004 );</div><div class='del'>-</div><div class='del'>-      fpop ( lo, hi );</div><div class='del'>-      if (hi - lo &lt; FALLBACK_QSORT_SMALL_THRESH) {</div><div class='del'>-         fallbackSimpleSort ( fmap, eclass, lo, hi );</div><div class='del'>-         continue;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /* Random partitioning.  Median of 3 sometimes fails to</div><div class='del'>-         avoid bad cases.  Median of 9 seems to help but </div><div class='del'>-         looks rather expensive.  This too seems to work but</div><div class='del'>-         is cheaper.  Guidance for the magic constants </div><div class='del'>-         7621 and 32768 is taken from Sedgewick's algorithms</div><div class='del'>-         book, chapter 35.</div><div class='del'>-      */</div><div class='del'>-      r = ((r * 7621) + 1) % 32768;</div><div class='del'>-      r3 = r % 3;</div><div class='del'>-      if (r3 == 0) med = eclass[fmap[lo]]; else</div><div class='del'>-      if (r3 == 1) med = eclass[fmap[(lo+hi)&gt;&gt;1]]; else</div><div class='del'>-                   med = eclass[fmap[hi]];</div><div class='del'>-</div><div class='del'>-      unLo = ltLo = lo;</div><div class='del'>-      unHi = gtHi = hi;</div><div class='del'>-</div><div class='del'>-      while (1) {</div><div class='del'>-         while (1) {</div><div class='del'>-            if (unLo &gt; unHi) break;</div><div class='del'>-            n = (Int32)eclass[fmap[unLo]] - (Int32)med;</div><div class='del'>-            if (n == 0) { </div><div class='del'>-               fswap(fmap[unLo], fmap[ltLo]); </div><div class='del'>-               ltLo++; unLo++; </div><div class='del'>-               continue; </div><div class='del'>-            };</div><div class='del'>-            if (n &gt; 0) break;</div><div class='del'>-            unLo++;</div><div class='del'>-         }</div><div class='del'>-         while (1) {</div><div class='del'>-            if (unLo &gt; unHi) break;</div><div class='del'>-            n = (Int32)eclass[fmap[unHi]] - (Int32)med;</div><div class='del'>-            if (n == 0) { </div><div class='del'>-               fswap(fmap[unHi], fmap[gtHi]); </div><div class='del'>-               gtHi--; unHi--; </div><div class='del'>-               continue; </div><div class='del'>-            };</div><div class='del'>-            if (n &lt; 0) break;</div><div class='del'>-            unHi--;</div><div class='del'>-         }</div><div class='del'>-         if (unLo &gt; unHi) break;</div><div class='del'>-         fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );</div><div class='del'>-</div><div class='del'>-      if (gtHi &lt; ltLo) continue;</div><div class='del'>-</div><div class='del'>-      n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);</div><div class='del'>-      m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);</div><div class='del'>-</div><div class='del'>-      n = lo + unLo - ltLo - 1;</div><div class='del'>-      m = hi - (gtHi - unHi) + 1;</div><div class='del'>-</div><div class='del'>-      if (n - lo &gt; hi - m) {</div><div class='del'>-         fpush ( lo, n );</div><div class='del'>-         fpush ( m, hi );</div><div class='del'>-      } else {</div><div class='del'>-         fpush ( m, hi );</div><div class='del'>-         fpush ( lo, n );</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#undef fmin</div><div class='del'>-#undef fpush</div><div class='del'>-#undef fpop</div><div class='del'>-#undef fswap</div><div class='del'>-#undef fvswap</div><div class='del'>-#undef FALLBACK_QSORT_SMALL_THRESH</div><div class='del'>-#undef FALLBACK_QSORT_STACK_SIZE</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/* Pre:</div><div class='del'>-      nblock &gt; 0</div><div class='del'>-      eclass exists for [0 .. nblock-1]</div><div class='del'>-      ((UChar*)eclass) [0 .. nblock-1] holds block</div><div class='del'>-      ptr exists for [0 .. nblock-1]</div><div class='del'>-</div><div class='del'>-   Post:</div><div class='del'>-      ((UChar*)eclass) [0 .. nblock-1] holds block</div><div class='del'>-      All other areas of eclass destroyed</div><div class='del'>-      fmap [0 .. nblock-1] holds sorted order</div><div class='del'>-      bhtab [ 0 .. 2+(nblock/32) ] destroyed</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#define       SET_BH(zz)  bhtab[(zz) &gt;&gt; 5] |= (1 &lt;&lt; ((zz) &amp; 31))</div><div class='del'>-#define     CLEAR_BH(zz)  bhtab[(zz) &gt;&gt; 5] &amp;= ~(1 &lt;&lt; ((zz) &amp; 31))</div><div class='del'>-#define     ISSET_BH(zz)  (bhtab[(zz) &gt;&gt; 5] &amp; (1 &lt;&lt; ((zz) &amp; 31)))</div><div class='del'>-#define      WORD_BH(zz)  bhtab[(zz) &gt;&gt; 5]</div><div class='del'>-#define UNALIGNED_BH(zz)  ((zz) &amp; 0x01f)</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void fallbackSort ( UInt32* fmap, </div><div class='del'>-                    UInt32* eclass, </div><div class='del'>-                    UInt32* bhtab,</div><div class='del'>-                    Int32   nblock,</div><div class='del'>-                    Int32   verb )</div><div class='del'>-{</div><div class='del'>-   Int32 ftab[257];</div><div class='del'>-   Int32 ftabCopy[256];</div><div class='del'>-   Int32 H, i, j, k, l, r, cc, cc1;</div><div class='del'>-   Int32 nNotDone;</div><div class='del'>-   Int32 nBhtab;</div><div class='del'>-   UChar* eclass8 = (UChar*)eclass;</div><div class='del'>-</div><div class='del'>-   /*--</div><div class='del'>-      Initial 1-char radix sort to generate</div><div class='del'>-      initial fmap and initial BH bits.</div><div class='del'>-   --*/</div><div class='del'>-   if (verb &gt;= 4)</div><div class='del'>-      VPrintf0 ( "        bucket sorting ...\n" );</div><div class='del'>-   for (i = 0; i &lt; 257;    i++) ftab[i] = 0;</div><div class='del'>-   for (i = 0; i &lt; nblock; i++) ftab[eclass8[i]]++;</div><div class='del'>-   for (i = 0; i &lt; 256;    i++) ftabCopy[i] = ftab[i];</div><div class='del'>-   for (i = 1; i &lt; 257;    i++) ftab[i] += ftab[i-1];</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt; nblock; i++) {</div><div class='del'>-      j = eclass8[i];</div><div class='del'>-      k = ftab[j] - 1;</div><div class='del'>-      ftab[j] = k;</div><div class='del'>-      fmap[k] = i;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   nBhtab = 2 + (nblock / 32);</div><div class='del'>-   for (i = 0; i &lt; nBhtab; i++) bhtab[i] = 0;</div><div class='del'>-   for (i = 0; i &lt; 256; i++) SET_BH(ftab[i]);</div><div class='del'>-</div><div class='del'>-   /*--</div><div class='del'>-      Inductively refine the buckets.  Kind-of an</div><div class='del'>-      "exponential radix sort" (!), inspired by the</div><div class='del'>-      Manber-Myers suffix array construction algorithm.</div><div class='del'>-   --*/</div><div class='del'>-</div><div class='del'>-   /*-- set sentinel bits for block-end detection --*/</div><div class='del'>-   for (i = 0; i &lt; 32; i++) { </div><div class='del'>-      SET_BH(nblock + 2*i);</div><div class='del'>-      CLEAR_BH(nblock + 2*i + 1);</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*-- the log(N) loop --*/</div><div class='del'>-   H = 1;</div><div class='del'>-   while (1) {</div><div class='del'>-</div><div class='del'>-      if (verb &gt;= 4) </div><div class='del'>-         VPrintf1 ( "        depth %6d has ", H );</div><div class='del'>-</div><div class='del'>-      j = 0;</div><div class='del'>-      for (i = 0; i &lt; nblock; i++) {</div><div class='del'>-         if (ISSET_BH(i)) j = i;</div><div class='del'>-         k = fmap[i] - H; if (k &lt; 0) k += nblock;</div><div class='del'>-         eclass[k] = j;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      nNotDone = 0;</div><div class='del'>-      r = -1;</div><div class='del'>-      while (1) {</div><div class='del'>-</div><div class='del'>-	 /*-- find the next non-singleton bucket --*/</div><div class='del'>-         k = r + 1;</div><div class='del'>-         while (ISSET_BH(k) &amp;&amp; UNALIGNED_BH(k)) k++;</div><div class='del'>-         if (ISSET_BH(k)) {</div><div class='del'>-            while (WORD_BH(k) == 0xffffffff) k += 32;</div><div class='del'>-            while (ISSET_BH(k)) k++;</div><div class='del'>-         }</div><div class='del'>-         l = k - 1;</div><div class='del'>-         if (l &gt;= nblock) break;</div><div class='del'>-         while (!ISSET_BH(k) &amp;&amp; UNALIGNED_BH(k)) k++;</div><div class='del'>-         if (!ISSET_BH(k)) {</div><div class='del'>-            while (WORD_BH(k) == 0x00000000) k += 32;</div><div class='del'>-            while (!ISSET_BH(k)) k++;</div><div class='del'>-         }</div><div class='del'>-         r = k - 1;</div><div class='del'>-         if (r &gt;= nblock) break;</div><div class='del'>-</div><div class='del'>-         /*-- now [l, r] bracket current bucket --*/</div><div class='del'>-         if (r &gt; l) {</div><div class='del'>-            nNotDone += (r - l + 1);</div><div class='del'>-            fallbackQSort3 ( fmap, eclass, l, r );</div><div class='del'>-</div><div class='del'>-            /*-- scan bucket and generate header bits-- */</div><div class='del'>-            cc = -1;</div><div class='del'>-            for (i = l; i &lt;= r; i++) {</div><div class='del'>-               cc1 = eclass[fmap[i]];</div><div class='del'>-               if (cc != cc1) { SET_BH(i); cc = cc1; };</div><div class='del'>-            }</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      if (verb &gt;= 4) </div><div class='del'>-         VPrintf1 ( "%6d unresolved strings\n", nNotDone );</div><div class='del'>-</div><div class='del'>-      H *= 2;</div><div class='del'>-      if (H &gt; nblock || nNotDone == 0) break;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*-- </div><div class='del'>-      Reconstruct the original block in</div><div class='del'>-      eclass8 [0 .. nblock-1], since the</div><div class='del'>-      previous phase destroyed it.</div><div class='del'>-   --*/</div><div class='del'>-   if (verb &gt;= 4)</div><div class='del'>-      VPrintf0 ( "        reconstructing block ...\n" );</div><div class='del'>-   j = 0;</div><div class='del'>-   for (i = 0; i &lt; nblock; i++) {</div><div class='del'>-      while (ftabCopy[j] == 0) j++;</div><div class='del'>-      ftabCopy[j]--;</div><div class='del'>-      eclass8[fmap[i]] = (UChar)j;</div><div class='del'>-   }</div><div class='del'>-   AssertH ( j &lt; 256, 1005 );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#undef       SET_BH</div><div class='del'>-#undef     CLEAR_BH</div><div class='del'>-#undef     ISSET_BH</div><div class='del'>-#undef      WORD_BH</div><div class='del'>-#undef UNALIGNED_BH</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/*--- The main, O(N^2 log(N)) sorting       ---*/</div><div class='del'>-/*--- algorithm.  Faster for "normal"       ---*/</div><div class='del'>-/*--- non-repetitive blocks.                ---*/</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-__inline__</div><div class='del'>-Bool mainGtU ( UInt32  i1, </div><div class='del'>-               UInt32  i2,</div><div class='del'>-               UChar*  block, </div><div class='del'>-               UInt16* quadrant,</div><div class='del'>-               UInt32  nblock,</div><div class='del'>-               Int32*  budget )</div><div class='del'>-{</div><div class='del'>-   Int32  k;</div><div class='del'>-   UChar  c1, c2;</div><div class='del'>-   UInt16 s1, s2;</div><div class='del'>-</div><div class='del'>-   AssertD ( i1 != i2, "mainGtU" );</div><div class='del'>-   /* 1 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 2 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 3 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 4 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 5 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 6 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 7 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 8 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 9 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 10 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 11 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-   /* 12 */</div><div class='del'>-   c1 = block[i1]; c2 = block[i2];</div><div class='del'>-   if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-   i1++; i2++;</div><div class='del'>-</div><div class='del'>-   k = nblock + 8;</div><div class='del'>-</div><div class='del'>-   do {</div><div class='del'>-      /* 1 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 2 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 3 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 4 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 5 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 6 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 7 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-      /* 8 */</div><div class='del'>-      c1 = block[i1]; c2 = block[i2];</div><div class='del'>-      if (c1 != c2) return (c1 &gt; c2);</div><div class='del'>-      s1 = quadrant[i1]; s2 = quadrant[i2];</div><div class='del'>-      if (s1 != s2) return (s1 &gt; s2);</div><div class='del'>-      i1++; i2++;</div><div class='del'>-</div><div class='del'>-      if (i1 &gt;= nblock) i1 -= nblock;</div><div class='del'>-      if (i2 &gt;= nblock) i2 -= nblock;</div><div class='del'>-</div><div class='del'>-      k -= 8;</div><div class='del'>-      (*budget)--;</div><div class='del'>-   }</div><div class='del'>-      while (k &gt;= 0);</div><div class='del'>-</div><div class='del'>-   return False;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   Knuth's increments seem to work better</div><div class='del'>-   than Incerpi-Sedgewick here.  Possibly</div><div class='del'>-   because the number of elems to sort is</div><div class='del'>-   usually small, typically &lt;= 20.</div><div class='del'>---*/</div><div class='del'>-static</div><div class='del'>-Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,</div><div class='del'>-                   9841, 29524, 88573, 265720,</div><div class='del'>-                   797161, 2391484 };</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void mainSimpleSort ( UInt32* ptr,</div><div class='del'>-                      UChar*  block,</div><div class='del'>-                      UInt16* quadrant,</div><div class='del'>-                      Int32   nblock,</div><div class='del'>-                      Int32   lo, </div><div class='del'>-                      Int32   hi, </div><div class='del'>-                      Int32   d,</div><div class='del'>-                      Int32*  budget )</div><div class='del'>-{</div><div class='del'>-   Int32 i, j, h, bigN, hp;</div><div class='del'>-   UInt32 v;</div><div class='del'>-</div><div class='del'>-   bigN = hi - lo + 1;</div><div class='del'>-   if (bigN &lt; 2) return;</div><div class='del'>-</div><div class='del'>-   hp = 0;</div><div class='del'>-   while (incs[hp] &lt; bigN) hp++;</div><div class='del'>-   hp--;</div><div class='del'>-</div><div class='del'>-   for (; hp &gt;= 0; hp--) {</div><div class='del'>-      h = incs[hp];</div><div class='del'>-</div><div class='del'>-      i = lo + h;</div><div class='del'>-      while (True) {</div><div class='del'>-</div><div class='del'>-         /*-- copy 1 --*/</div><div class='del'>-         if (i &gt; hi) break;</div><div class='del'>-         v = ptr[i];</div><div class='del'>-         j = i;</div><div class='del'>-         while ( mainGtU ( </div><div class='del'>-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget </div><div class='del'>-                 ) ) {</div><div class='del'>-            ptr[j] = ptr[j-h];</div><div class='del'>-            j = j - h;</div><div class='del'>-            if (j &lt;= (lo + h - 1)) break;</div><div class='del'>-         }</div><div class='del'>-         ptr[j] = v;</div><div class='del'>-         i++;</div><div class='del'>-</div><div class='del'>-         /*-- copy 2 --*/</div><div class='del'>-         if (i &gt; hi) break;</div><div class='del'>-         v = ptr[i];</div><div class='del'>-         j = i;</div><div class='del'>-         while ( mainGtU ( </div><div class='del'>-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget </div><div class='del'>-                 ) ) {</div><div class='del'>-            ptr[j] = ptr[j-h];</div><div class='del'>-            j = j - h;</div><div class='del'>-            if (j &lt;= (lo + h - 1)) break;</div><div class='del'>-         }</div><div class='del'>-         ptr[j] = v;</div><div class='del'>-         i++;</div><div class='del'>-</div><div class='del'>-         /*-- copy 3 --*/</div><div class='del'>-         if (i &gt; hi) break;</div><div class='del'>-         v = ptr[i];</div><div class='del'>-         j = i;</div><div class='del'>-         while ( mainGtU ( </div><div class='del'>-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget </div><div class='del'>-                 ) ) {</div><div class='del'>-            ptr[j] = ptr[j-h];</div><div class='del'>-            j = j - h;</div><div class='del'>-            if (j &lt;= (lo + h - 1)) break;</div><div class='del'>-         }</div><div class='del'>-         ptr[j] = v;</div><div class='del'>-         i++;</div><div class='del'>-</div><div class='del'>-         if (*budget &lt; 0) return;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   The following is an implementation of</div><div class='del'>-   an elegant 3-way quicksort for strings,</div><div class='del'>-   described in a paper "Fast Algorithms for</div><div class='del'>-   Sorting and Searching Strings", by Robert</div><div class='del'>-   Sedgewick and Jon L. Bentley.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#define mswap(zz1, zz2) \</div><div class='del'>-   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }</div><div class='del'>-</div><div class='del'>-#define mvswap(zzp1, zzp2, zzn)       \</div><div class='del'>-{                                     \</div><div class='del'>-   Int32 yyp1 = (zzp1);               \</div><div class='del'>-   Int32 yyp2 = (zzp2);               \</div><div class='del'>-   Int32 yyn  = (zzn);                \</div><div class='del'>-   while (yyn &gt; 0) {                  \</div><div class='del'>-      mswap(ptr[yyp1], ptr[yyp2]);    \</div><div class='del'>-      yyp1++; yyp2++; yyn--;          \</div><div class='del'>-   }                                  \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static </div><div class='del'>-__inline__</div><div class='del'>-UChar mmed3 ( UChar a, UChar b, UChar c )</div><div class='del'>-{</div><div class='del'>-   UChar t;</div><div class='del'>-   if (a &gt; b) { t = a; a = b; b = t; };</div><div class='del'>-   if (b &gt; c) { </div><div class='del'>-      b = c;</div><div class='del'>-      if (a &gt; b) b = a;</div><div class='del'>-   }</div><div class='del'>-   return b;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define mmin(a,b) ((a) &lt; (b)) ? (a) : (b)</div><div class='del'>-</div><div class='del'>-#define mpush(lz,hz,dz) { stackLo[sp] = lz; \</div><div class='del'>-                          stackHi[sp] = hz; \</div><div class='del'>-                          stackD [sp] = dz; \</div><div class='del'>-                          sp++; }</div><div class='del'>-</div><div class='del'>-#define mpop(lz,hz,dz) { sp--;             \</div><div class='del'>-                         lz = stackLo[sp]; \</div><div class='del'>-                         hz = stackHi[sp]; \</div><div class='del'>-                         dz = stackD [sp]; }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define mnextsize(az) (nextHi[az]-nextLo[az])</div><div class='del'>-</div><div class='del'>-#define mnextswap(az,bz)                                        \</div><div class='del'>-   { Int32 tz;                                                  \</div><div class='del'>-     tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \</div><div class='del'>-     tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \</div><div class='del'>-     tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MAIN_QSORT_SMALL_THRESH 20</div><div class='del'>-#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)</div><div class='del'>-#define MAIN_QSORT_STACK_SIZE 100</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void mainQSort3 ( UInt32* ptr,</div><div class='del'>-                  UChar*  block,</div><div class='del'>-                  UInt16* quadrant,</div><div class='del'>-                  Int32   nblock,</div><div class='del'>-                  Int32   loSt, </div><div class='del'>-                  Int32   hiSt, </div><div class='del'>-                  Int32   dSt,</div><div class='del'>-                  Int32*  budget )</div><div class='del'>-{</div><div class='del'>-   Int32 unLo, unHi, ltLo, gtHi, n, m, med;</div><div class='del'>-   Int32 sp, lo, hi, d;</div><div class='del'>-</div><div class='del'>-   Int32 stackLo[MAIN_QSORT_STACK_SIZE];</div><div class='del'>-   Int32 stackHi[MAIN_QSORT_STACK_SIZE];</div><div class='del'>-   Int32 stackD [MAIN_QSORT_STACK_SIZE];</div><div class='del'>-</div><div class='del'>-   Int32 nextLo[3];</div><div class='del'>-   Int32 nextHi[3];</div><div class='del'>-   Int32 nextD [3];</div><div class='del'>-</div><div class='del'>-   sp = 0;</div><div class='del'>-   mpush ( loSt, hiSt, dSt );</div><div class='del'>-</div><div class='del'>-   while (sp &gt; 0) {</div><div class='del'>-</div><div class='del'>-      AssertH ( sp &lt; MAIN_QSORT_STACK_SIZE, 1001 );</div><div class='del'>-</div><div class='del'>-      mpop ( lo, hi, d );</div><div class='del'>-      if (hi - lo &lt; MAIN_QSORT_SMALL_THRESH || </div><div class='del'>-          d &gt; MAIN_QSORT_DEPTH_THRESH) {</div><div class='del'>-         mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );</div><div class='del'>-         if (*budget &lt; 0) return;</div><div class='del'>-         continue;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      med = (Int32) </div><div class='del'>-            mmed3 ( block[ptr[ lo         ]+d],</div><div class='del'>-                    block[ptr[ hi         ]+d],</div><div class='del'>-                    block[ptr[ (lo+hi)&gt;&gt;1 ]+d] );</div><div class='del'>-</div><div class='del'>-      unLo = ltLo = lo;</div><div class='del'>-      unHi = gtHi = hi;</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-         while (True) {</div><div class='del'>-            if (unLo &gt; unHi) break;</div><div class='del'>-            n = ((Int32)block[ptr[unLo]+d]) - med;</div><div class='del'>-            if (n == 0) { </div><div class='del'>-               mswap(ptr[unLo], ptr[ltLo]); </div><div class='del'>-               ltLo++; unLo++; continue; </div><div class='del'>-            };</div><div class='del'>-            if (n &gt;  0) break;</div><div class='del'>-            unLo++;</div><div class='del'>-         }</div><div class='del'>-         while (True) {</div><div class='del'>-            if (unLo &gt; unHi) break;</div><div class='del'>-            n = ((Int32)block[ptr[unHi]+d]) - med;</div><div class='del'>-            if (n == 0) { </div><div class='del'>-               mswap(ptr[unHi], ptr[gtHi]); </div><div class='del'>-               gtHi--; unHi--; continue; </div><div class='del'>-            };</div><div class='del'>-            if (n &lt;  0) break;</div><div class='del'>-            unHi--;</div><div class='del'>-         }</div><div class='del'>-         if (unLo &gt; unHi) break;</div><div class='del'>-         mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertD ( unHi == unLo-1, "mainQSort3(2)" );</div><div class='del'>-</div><div class='del'>-      if (gtHi &lt; ltLo) {</div><div class='del'>-         mpush(lo, hi, d+1 );</div><div class='del'>-         continue;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);</div><div class='del'>-      m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);</div><div class='del'>-</div><div class='del'>-      n = lo + unLo - ltLo - 1;</div><div class='del'>-      m = hi - (gtHi - unHi) + 1;</div><div class='del'>-</div><div class='del'>-      nextLo[0] = lo;  nextHi[0] = n;   nextD[0] = d;</div><div class='del'>-      nextLo[1] = m;   nextHi[1] = hi;  nextD[1] = d;</div><div class='del'>-      nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;</div><div class='del'>-</div><div class='del'>-      if (mnextsize(0) &lt; mnextsize(1)) mnextswap(0,1);</div><div class='del'>-      if (mnextsize(1) &lt; mnextsize(2)) mnextswap(1,2);</div><div class='del'>-      if (mnextsize(0) &lt; mnextsize(1)) mnextswap(0,1);</div><div class='del'>-</div><div class='del'>-      AssertD (mnextsize(0) &gt;= mnextsize(1), "mainQSort3(8)" );</div><div class='del'>-      AssertD (mnextsize(1) &gt;= mnextsize(2), "mainQSort3(9)" );</div><div class='del'>-</div><div class='del'>-      mpush (nextLo[0], nextHi[0], nextD[0]);</div><div class='del'>-      mpush (nextLo[1], nextHi[1], nextD[1]);</div><div class='del'>-      mpush (nextLo[2], nextHi[2], nextD[2]);</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#undef mswap</div><div class='del'>-#undef mvswap</div><div class='del'>-#undef mpush</div><div class='del'>-#undef mpop</div><div class='del'>-#undef mmin</div><div class='del'>-#undef mnextsize</div><div class='del'>-#undef mnextswap</div><div class='del'>-#undef MAIN_QSORT_SMALL_THRESH</div><div class='del'>-#undef MAIN_QSORT_DEPTH_THRESH</div><div class='del'>-#undef MAIN_QSORT_STACK_SIZE</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/* Pre:</div><div class='del'>-      nblock &gt; N_OVERSHOOT</div><div class='del'>-      block32 exists for [0 .. nblock-1 +N_OVERSHOOT]</div><div class='del'>-      ((UChar*)block32) [0 .. nblock-1] holds block</div><div class='del'>-      ptr exists for [0 .. nblock-1]</div><div class='del'>-</div><div class='del'>-   Post:</div><div class='del'>-      ((UChar*)block32) [0 .. nblock-1] holds block</div><div class='del'>-      All other areas of block32 destroyed</div><div class='del'>-      ftab [0 .. 65536 ] destroyed</div><div class='del'>-      ptr [0 .. nblock-1] holds sorted order</div><div class='del'>-      if (*budget &lt; 0), sorting was abandoned</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#define BIGFREQ(b) (ftab[((b)+1) &lt;&lt; 8] - ftab[(b) &lt;&lt; 8])</div><div class='del'>-#define SETMASK (1 &lt;&lt; 21)</div><div class='del'>-#define CLEARMASK (~(SETMASK))</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void mainSort ( UInt32* ptr, </div><div class='del'>-                UChar*  block,</div><div class='del'>-                UInt16* quadrant, </div><div class='del'>-                UInt32* ftab,</div><div class='del'>-                Int32   nblock,</div><div class='del'>-                Int32   verb,</div><div class='del'>-                Int32*  budget )</div><div class='del'>-{</div><div class='del'>-   Int32  i, j, k, ss, sb;</div><div class='del'>-   Int32  runningOrder[256];</div><div class='del'>-   Bool   bigDone[256];</div><div class='del'>-   Int32  copyStart[256];</div><div class='del'>-   Int32  copyEnd  [256];</div><div class='del'>-   UChar  c1;</div><div class='del'>-   Int32  numQSorted;</div><div class='del'>-   UInt16 s;</div><div class='del'>-   if (verb &gt;= 4) VPrintf0 ( "        main sort initialise ...\n" );</div><div class='del'>-</div><div class='del'>-   /*-- set up the 2-byte frequency table --*/</div><div class='del'>-   for (i = 65536; i &gt;= 0; i--) ftab[i] = 0;</div><div class='del'>-</div><div class='del'>-   j = block[0] &lt;&lt; 8;</div><div class='del'>-   i = nblock-1;</div><div class='del'>-   for (; i &gt;= 3; i -= 4) {</div><div class='del'>-      quadrant[i] = 0;</div><div class='del'>-      j = (j &gt;&gt; 8) | ( ((UInt16)block[i]) &lt;&lt; 8);</div><div class='del'>-      ftab[j]++;</div><div class='del'>-      quadrant[i-1] = 0;</div><div class='del'>-      j = (j &gt;&gt; 8) | ( ((UInt16)block[i-1]) &lt;&lt; 8);</div><div class='del'>-      ftab[j]++;</div><div class='del'>-      quadrant[i-2] = 0;</div><div class='del'>-      j = (j &gt;&gt; 8) | ( ((UInt16)block[i-2]) &lt;&lt; 8);</div><div class='del'>-      ftab[j]++;</div><div class='del'>-      quadrant[i-3] = 0;</div><div class='del'>-      j = (j &gt;&gt; 8) | ( ((UInt16)block[i-3]) &lt;&lt; 8);</div><div class='del'>-      ftab[j]++;</div><div class='del'>-   }</div><div class='del'>-   for (; i &gt;= 0; i--) {</div><div class='del'>-      quadrant[i] = 0;</div><div class='del'>-      j = (j &gt;&gt; 8) | ( ((UInt16)block[i]) &lt;&lt; 8);</div><div class='del'>-      ftab[j]++;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*-- (emphasises close relationship of block &amp; quadrant) --*/</div><div class='del'>-   for (i = 0; i &lt; BZ_N_OVERSHOOT; i++) {</div><div class='del'>-      block   [nblock+i] = block[i];</div><div class='del'>-      quadrant[nblock+i] = 0;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (verb &gt;= 4) VPrintf0 ( "        bucket sorting ...\n" );</div><div class='del'>-</div><div class='del'>-   /*-- Complete the initial radix sort --*/</div><div class='del'>-   for (i = 1; i &lt;= 65536; i++) ftab[i] += ftab[i-1];</div><div class='del'>-</div><div class='del'>-   s = block[0] &lt;&lt; 8;</div><div class='del'>-   i = nblock-1;</div><div class='del'>-   for (; i &gt;= 3; i -= 4) {</div><div class='del'>-      s = (s &gt;&gt; 8) | (block[i] &lt;&lt; 8);</div><div class='del'>-      j = ftab[s] -1;</div><div class='del'>-      ftab[s] = j;</div><div class='del'>-      ptr[j] = i;</div><div class='del'>-      s = (s &gt;&gt; 8) | (block[i-1] &lt;&lt; 8);</div><div class='del'>-      j = ftab[s] -1;</div><div class='del'>-      ftab[s] = j;</div><div class='del'>-      ptr[j] = i-1;</div><div class='del'>-      s = (s &gt;&gt; 8) | (block[i-2] &lt;&lt; 8);</div><div class='del'>-      j = ftab[s] -1;</div><div class='del'>-      ftab[s] = j;</div><div class='del'>-      ptr[j] = i-2;</div><div class='del'>-      s = (s &gt;&gt; 8) | (block[i-3] &lt;&lt; 8);</div><div class='del'>-      j = ftab[s] -1;</div><div class='del'>-      ftab[s] = j;</div><div class='del'>-      ptr[j] = i-3;</div><div class='del'>-   }</div><div class='del'>-   for (; i &gt;= 0; i--) {</div><div class='del'>-      s = (s &gt;&gt; 8) | (block[i] &lt;&lt; 8);</div><div class='del'>-      j = ftab[s] -1;</div><div class='del'>-      ftab[s] = j;</div><div class='del'>-      ptr[j] = i;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*--</div><div class='del'>-      Now ftab contains the first loc of every small bucket.</div><div class='del'>-      Calculate the running order, from smallest to largest</div><div class='del'>-      big bucket.</div><div class='del'>-   --*/</div><div class='del'>-   for (i = 0; i &lt;= 255; i++) {</div><div class='del'>-      bigDone     [i] = False;</div><div class='del'>-      runningOrder[i] = i;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   {</div><div class='del'>-      Int32 vv;</div><div class='del'>-      Int32 h = 1;</div><div class='del'>-      do h = 3 * h + 1; while (h &lt;= 256);</div><div class='del'>-      do {</div><div class='del'>-         h = h / 3;</div><div class='del'>-         for (i = h; i &lt;= 255; i++) {</div><div class='del'>-            vv = runningOrder[i];</div><div class='del'>-            j = i;</div><div class='del'>-            while ( BIGFREQ(runningOrder[j-h]) &gt; BIGFREQ(vv) ) {</div><div class='del'>-               runningOrder[j] = runningOrder[j-h];</div><div class='del'>-               j = j - h;</div><div class='del'>-               if (j &lt;= (h - 1)) goto zero;</div><div class='del'>-            }</div><div class='del'>-            zero:</div><div class='del'>-            runningOrder[j] = vv;</div><div class='del'>-         }</div><div class='del'>-      } while (h != 1);</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*--</div><div class='del'>-      The main sorting loop.</div><div class='del'>-   --*/</div><div class='del'>-</div><div class='del'>-   numQSorted = 0;</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt;= 255; i++) {</div><div class='del'>-</div><div class='del'>-      /*--</div><div class='del'>-         Process big buckets, starting with the least full.</div><div class='del'>-         Basically this is a 3-step process in which we call</div><div class='del'>-         mainQSort3 to sort the small buckets [ss, j], but</div><div class='del'>-         also make a big effort to avoid the calls if we can.</div><div class='del'>-      --*/</div><div class='del'>-      ss = runningOrder[i];</div><div class='del'>-</div><div class='del'>-      /*--</div><div class='del'>-         Step 1:</div><div class='del'>-         Complete the big bucket [ss] by quicksorting</div><div class='del'>-         any unsorted small buckets [ss, j], for j != ss.  </div><div class='del'>-         Hopefully previous pointer-scanning phases have already</div><div class='del'>-         completed many of the small buckets [ss, j], so</div><div class='del'>-         we don't have to sort them at all.</div><div class='del'>-      --*/</div><div class='del'>-      for (j = 0; j &lt;= 255; j++) {</div><div class='del'>-         if (j != ss) {</div><div class='del'>-            sb = (ss &lt;&lt; 8) + j;</div><div class='del'>-            if ( ! (ftab[sb] &amp; SETMASK) ) {</div><div class='del'>-               Int32 lo = ftab[sb]   &amp; CLEARMASK;</div><div class='del'>-               Int32 hi = (ftab[sb+1] &amp; CLEARMASK) - 1;</div><div class='del'>-               if (hi &gt; lo) {</div><div class='del'>-                  if (verb &gt;= 4)</div><div class='del'>-                     VPrintf4 ( "        qsort [0x%x, 0x%x]   "</div><div class='del'>-                                "done %d   this %d\n",</div><div class='del'>-                                ss, j, numQSorted, hi - lo + 1 );</div><div class='del'>-                  mainQSort3 ( </div><div class='del'>-                     ptr, block, quadrant, nblock, </div><div class='del'>-                     lo, hi, BZ_N_RADIX, budget </div><div class='del'>-                  );   </div><div class='del'>-                  numQSorted += (hi - lo + 1);</div><div class='del'>-                  if (*budget &lt; 0) return;</div><div class='del'>-               }</div><div class='del'>-            }</div><div class='del'>-            ftab[sb] |= SETMASK;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertH ( !bigDone[ss], 1006 );</div><div class='del'>-</div><div class='del'>-      /*--</div><div class='del'>-         Step 2:</div><div class='del'>-         Now scan this big bucket [ss] so as to synthesise the</div><div class='del'>-         sorted order for small buckets [t, ss] for all t,</div><div class='del'>-         including, magically, the bucket [ss,ss] too.</div><div class='del'>-         This will avoid doing Real Work in subsequent Step 1's.</div><div class='del'>-      --*/</div><div class='del'>-      {</div><div class='del'>-         for (j = 0; j &lt;= 255; j++) {</div><div class='del'>-            copyStart[j] =  ftab[(j &lt;&lt; 8) + ss]     &amp; CLEARMASK;</div><div class='del'>-            copyEnd  [j] = (ftab[(j &lt;&lt; 8) + ss + 1] &amp; CLEARMASK) - 1;</div><div class='del'>-         }</div><div class='del'>-         for (j = ftab[ss &lt;&lt; 8] &amp; CLEARMASK; j &lt; copyStart[ss]; j++) {</div><div class='del'>-            k = ptr[j]-1; if (k &lt; 0) k += nblock;</div><div class='del'>-            c1 = block[k];</div><div class='del'>-            if (!bigDone[c1])</div><div class='del'>-               ptr[ copyStart[c1]++ ] = k;</div><div class='del'>-         }</div><div class='del'>-         for (j = (ftab[(ss+1) &lt;&lt; 8] &amp; CLEARMASK) - 1; j &gt; copyEnd[ss]; j--) {</div><div class='del'>-            k = ptr[j]-1; if (k &lt; 0) k += nblock;</div><div class='del'>-            c1 = block[k];</div><div class='del'>-            if (!bigDone[c1]) </div><div class='del'>-               ptr[ copyEnd[c1]-- ] = k;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertH ( copyStart[ss]-1 == copyEnd[ss], 1007 );</div><div class='del'>-</div><div class='del'>-      for (j = 0; j &lt;= 255; j++) ftab[(j &lt;&lt; 8) + ss] |= SETMASK;</div><div class='del'>-</div><div class='del'>-      /*--</div><div class='del'>-         Step 3:</div><div class='del'>-         The [ss] big bucket is now done.  Record this fact,</div><div class='del'>-         and update the quadrant descriptors.  Remember to</div><div class='del'>-         update quadrants in the overshoot area too, if</div><div class='del'>-         necessary.  The "if (i &lt; 255)" test merely skips</div><div class='del'>-         this updating for the last bucket processed, since</div><div class='del'>-         updating for the last bucket is pointless.</div><div class='del'>-</div><div class='del'>-         The quadrant array provides a way to incrementally</div><div class='del'>-         cache sort orderings, as they appear, so as to </div><div class='del'>-         make subsequent comparisons in fullGtU() complete</div><div class='del'>-         faster.  For repetitive blocks this makes a big</div><div class='del'>-         difference (but not big enough to be able to avoid</div><div class='del'>-         the fallback sorting mechanism, exponential radix sort).</div><div class='del'>-</div><div class='del'>-         The precise meaning is: at all times:</div><div class='del'>-</div><div class='del'>-            for 0 &lt;= i &lt; nblock and 0 &lt;= j &lt;= nblock</div><div class='del'>-</div><div class='del'>-            if block[i] != block[j], </div><div class='del'>-</div><div class='del'>-               then the relative values of quadrant[i] and </div><div class='del'>-                    quadrant[j] are meaningless.</div><div class='del'>-</div><div class='del'>-               else {</div><div class='del'>-                  if quadrant[i] &lt; quadrant[j]</div><div class='del'>-                     then the string starting at i lexicographically</div><div class='del'>-                     precedes the string starting at j</div><div class='del'>-</div><div class='del'>-                  else if quadrant[i] &gt; quadrant[j]</div><div class='del'>-                     then the string starting at j lexicographically</div><div class='del'>-                     precedes the string starting at i</div><div class='del'>-</div><div class='del'>-                  else</div><div class='del'>-                     the relative ordering of the strings starting</div><div class='del'>-                     at i and j has not yet been determined.</div><div class='del'>-               }</div><div class='del'>-      --*/</div><div class='del'>-      bigDone[ss] = True;</div><div class='del'>-</div><div class='del'>-      if (i &lt; 255) {</div><div class='del'>-         Int32 bbStart  = ftab[ss &lt;&lt; 8] &amp; CLEARMASK;</div><div class='del'>-         Int32 bbSize   = (ftab[(ss+1) &lt;&lt; 8] &amp; CLEARMASK) - bbStart;</div><div class='del'>-         Int32 shifts   = 0;</div><div class='del'>-</div><div class='del'>-         while ((bbSize &gt;&gt; shifts) &gt; 65534) shifts++;</div><div class='del'>-</div><div class='del'>-         for (j = bbSize-1; j &gt;= 0; j--) {</div><div class='del'>-            Int32 a2update     = ptr[bbStart + j];</div><div class='del'>-            UInt16 qVal        = (UInt16)(j &gt;&gt; shifts);</div><div class='del'>-            quadrant[a2update] = qVal;</div><div class='del'>-            if (a2update &lt; BZ_N_OVERSHOOT)</div><div class='del'>-               quadrant[a2update + nblock] = qVal;</div><div class='del'>-         }</div><div class='del'>-         AssertH ( ((bbSize-1) &gt;&gt; shifts) &lt;= 65535, 1002 );</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (verb &gt;= 4)</div><div class='del'>-      VPrintf3 ( "        %d pointers, %d sorted, %d scanned\n",</div><div class='del'>-                 nblock, numQSorted, nblock - numQSorted );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#undef BIGFREQ</div><div class='del'>-#undef SETMASK</div><div class='del'>-#undef CLEARMASK</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-/* Pre:</div><div class='del'>-      nblock &gt; 0</div><div class='del'>-      arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]</div><div class='del'>-      ((UChar*)arr2)  [0 .. nblock-1] holds block</div><div class='del'>-      arr1 exists for [0 .. nblock-1]</div><div class='del'>-</div><div class='del'>-   Post:</div><div class='del'>-      ((UChar*)arr2) [0 .. nblock-1] holds block</div><div class='del'>-      All other areas of block destroyed</div><div class='del'>-      ftab [ 0 .. 65536 ] destroyed</div><div class='del'>-      arr1 [0 .. nblock-1] holds sorted order</div><div class='del'>-*/</div><div class='del'>-void BZ2_blockSort ( EState* s )</div><div class='del'>-{</div><div class='del'>-   UInt32* ptr    = s-&gt;ptr; </div><div class='del'>-   UChar*  block  = s-&gt;block;</div><div class='del'>-   UInt32* ftab   = s-&gt;ftab;</div><div class='del'>-   Int32   nblock = s-&gt;nblock;</div><div class='del'>-   Int32   verb   = s-&gt;verbosity;</div><div class='del'>-   Int32   wfact  = s-&gt;workFactor;</div><div class='del'>-   UInt16* quadrant;</div><div class='del'>-   Int32   budget;</div><div class='del'>-   Int32   budgetInit;</div><div class='del'>-   Int32   i;</div><div class='del'>-</div><div class='del'>-   if (nblock &lt; 10000) {</div><div class='del'>-      fallbackSort ( s-&gt;arr1, s-&gt;arr2, ftab, nblock, verb );</div><div class='del'>-   } else {</div><div class='del'>-      /* Calculate the location for quadrant, remembering to get</div><div class='del'>-         the alignment right.  Assumes that &amp;(block[0]) is at least</div><div class='del'>-         2-byte aligned -- this should be ok since block is really</div><div class='del'>-         the first section of arr2.</div><div class='del'>-      */</div><div class='del'>-      i = nblock+BZ_N_OVERSHOOT;</div><div class='del'>-      if (i &amp; 1) i++;</div><div class='del'>-      quadrant = (UInt16*)(&amp;(block[i]));</div><div class='del'>-</div><div class='del'>-      /* (wfact-1) / 3 puts the default-factor-30</div><div class='del'>-         transition point at very roughly the same place as </div><div class='del'>-         with v0.1 and v0.9.0.  </div><div class='del'>-         Not that it particularly matters any more, since the</div><div class='del'>-         resulting compressed stream is now the same regardless</div><div class='del'>-         of whether or not we use the main sort or fallback sort.</div><div class='del'>-      */</div><div class='del'>-      if (wfact &lt; 1  ) wfact = 1;</div><div class='del'>-      if (wfact &gt; 100) wfact = 100;</div><div class='del'>-      budgetInit = nblock * ((wfact-1) / 3);</div><div class='del'>-      budget = budgetInit;</div><div class='del'>-</div><div class='del'>-      mainSort ( ptr, block, quadrant, ftab, nblock, verb, &amp;budget );</div><div class='del'>-      if (verb &gt;= 3) </div><div class='del'>-         VPrintf3 ( "      %d work, %d block, ratio %5.2f\n",</div><div class='del'>-                    budgetInit - budget,</div><div class='del'>-                    nblock, </div><div class='del'>-                    (float)(budgetInit - budget) /</div><div class='del'>-                    (float)(nblock==0 ? 1 : nblock) ); </div><div class='del'>-      if (budget &lt; 0) {</div><div class='del'>-         if (verb &gt;= 2) </div><div class='del'>-            VPrintf0 ( "    too repetitive; using fallback"</div><div class='del'>-                       " sorting algorithm\n" );</div><div class='del'>-         fallbackSort ( s-&gt;arr1, s-&gt;arr2, ftab, nblock, verb );</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   s-&gt;origPtr = -1;</div><div class='del'>-   for (i = 0; i &lt; s-&gt;nblock; i++)</div><div class='del'>-      if (ptr[i] == 0)</div><div class='del'>-         { s-&gt;origPtr = i; break; };</div><div class='del'>-</div><div class='del'>-   AssertH( s-&gt;origPtr != -1, 1003 );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                       blocksort.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/bzlib.c b/mdk-stage1/bzlib/bzlib.c<br/>deleted file mode 100644<br/>index b1fc85236..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/bzlib.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/bzlib.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1567 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Library top-level functions.                          ---*/</div><div class='del'>-/*---                                               bzlib.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-   CHANGES</div><div class='del'>-   ~~~~~~~</div><div class='del'>-   0.9.0 -- original version.</div><div class='del'>-</div><div class='del'>-   0.9.0a/b -- no changes in this file.</div><div class='del'>-</div><div class='del'>-   0.9.0c</div><div class='del'>-      * made zero-length BZ_FLUSH work correctly in bzCompress().</div><div class='del'>-      * fixed bzWrite/bzRead to ignore zero-length requests.</div><div class='del'>-      * fixed bzread to correctly handle read requests after EOF.</div><div class='del'>-      * wrong parameter order in call to bzDecompressInit in</div><div class='del'>-        bzBuffToBuffDecompress.  Fixed.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- Compression stuff                           ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-void BZ2_bz__AssertH__fail ( int errcode )</div><div class='del'>-{</div><div class='del'>-   fprintf(stderr, </div><div class='del'>-      "\n\nbzip2/libbzip2: internal error number %d.\n"</div><div class='del'>-      "This is a bug in bzip2/libbzip2, %s.\n"</div><div class='del'>-      "Please report it to me at: jseward@acm.org.  If this happened\n"</div><div class='del'>-      "when you were using some program which uses libbzip2 as a\n"</div><div class='del'>-      "component, you should also report this bug to the author(s)\n"</div><div class='del'>-      "of that program.  Please make an effort to report this bug;\n"</div><div class='del'>-      "timely and accurate bug reports eventually lead to higher\n"</div><div class='del'>-      "quality software.  Thanks.  Julian Seward, 21 March 2000.\n\n",</div><div class='del'>-      errcode,</div><div class='del'>-      BZ2_bzlibVersion()</div><div class='del'>-   );</div><div class='del'>-   exit(3);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-int bz_config_ok ( void )</div><div class='del'>-{</div><div class='del'>-   if (sizeof(int)   != 4) return 0;</div><div class='del'>-   if (sizeof(short) != 2) return 0;</div><div class='del'>-   if (sizeof(char)  != 1) return 0;</div><div class='del'>-   return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void* default_bzalloc ( void* opaque __attribute__ ((unused)), Int32 items, Int32 size )</div><div class='del'>-{</div><div class='del'>-   void* v = malloc ( items * size );</div><div class='del'>-   return v;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void default_bzfree ( void* opaque __attribute__ ((unused)), void* addr )</div><div class='del'>-{</div><div class='del'>-   if (addr != NULL) free ( addr );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void prepare_new_block ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Int32 i;</div><div class='del'>-   s-&gt;nblock = 0;</div><div class='del'>-   s-&gt;numZ = 0;</div><div class='del'>-   s-&gt;state_out_pos = 0;</div><div class='del'>-   BZ_INITIALISE_CRC ( s-&gt;blockCRC );</div><div class='del'>-   for (i = 0; i &lt; 256; i++) s-&gt;inUse[i] = False;</div><div class='del'>-   s-&gt;blockNo++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void init_RL ( EState* s )</div><div class='del'>-{</div><div class='del'>-   s-&gt;state_in_ch  = 256;</div><div class='del'>-   s-&gt;state_in_len = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-Bool isempty_RL ( EState* s )</div><div class='del'>-{</div><div class='del'>-   if (s-&gt;state_in_ch &lt; 256 &amp;&amp; s-&gt;state_in_len &gt; 0)</div><div class='del'>-      return False; else</div><div class='del'>-      return True;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzCompressInit) </div><div class='del'>-                    ( bz_stream* strm, </div><div class='del'>-                     int        blockSize100k,</div><div class='del'>-                     int        verbosity,</div><div class='del'>-                     int        workFactor )</div><div class='del'>-{</div><div class='del'>-   Int32   n;</div><div class='del'>-   EState* s;</div><div class='del'>-</div><div class='del'>-   if (!bz_config_ok()) return BZ_CONFIG_ERROR;</div><div class='del'>-</div><div class='del'>-   if (strm == NULL || </div><div class='del'>-       blockSize100k &lt; 1 || blockSize100k &gt; 9 ||</div><div class='del'>-       workFactor &lt; 0 || workFactor &gt; 250)</div><div class='del'>-     return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   if (workFactor == 0) workFactor = 30;</div><div class='del'>-   if (strm-&gt;bzalloc == NULL) strm-&gt;bzalloc = default_bzalloc;</div><div class='del'>-   if (strm-&gt;bzfree == NULL) strm-&gt;bzfree = default_bzfree;</div><div class='del'>-</div><div class='del'>-   s = BZALLOC( sizeof(EState) );</div><div class='del'>-   if (s == NULL) return BZ_MEM_ERROR;</div><div class='del'>-   s-&gt;strm = strm;</div><div class='del'>-</div><div class='del'>-   s-&gt;arr1 = NULL;</div><div class='del'>-   s-&gt;arr2 = NULL;</div><div class='del'>-   s-&gt;ftab = NULL;</div><div class='del'>-</div><div class='del'>-   n       = 100000 * blockSize100k;</div><div class='del'>-   s-&gt;arr1 = BZALLOC( n                  * sizeof(UInt32) );</div><div class='del'>-   s-&gt;arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );</div><div class='del'>-   s-&gt;ftab = BZALLOC( 65537              * sizeof(UInt32) );</div><div class='del'>-</div><div class='del'>-   if (s-&gt;arr1 == NULL || s-&gt;arr2 == NULL || s-&gt;ftab == NULL) {</div><div class='del'>-      if (s-&gt;arr1 != NULL) BZFREE(s-&gt;arr1);</div><div class='del'>-      if (s-&gt;arr2 != NULL) BZFREE(s-&gt;arr2);</div><div class='del'>-      if (s-&gt;ftab != NULL) BZFREE(s-&gt;ftab);</div><div class='del'>-      if (s       != NULL) BZFREE(s);</div><div class='del'>-      return BZ_MEM_ERROR;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   s-&gt;blockNo           = 0;</div><div class='del'>-   s-&gt;state             = BZ_S_INPUT;</div><div class='del'>-   s-&gt;mode              = BZ_M_RUNNING;</div><div class='del'>-   s-&gt;combinedCRC       = 0;</div><div class='del'>-   s-&gt;blockSize100k     = blockSize100k;</div><div class='del'>-   s-&gt;nblockMAX         = 100000 * blockSize100k - 19;</div><div class='del'>-   s-&gt;verbosity         = verbosity;</div><div class='del'>-   s-&gt;workFactor        = workFactor;</div><div class='del'>-</div><div class='del'>-   s-&gt;block             = (UChar*)s-&gt;arr2;</div><div class='del'>-   s-&gt;mtfv              = (UInt16*)s-&gt;arr1;</div><div class='del'>-   s-&gt;zbits             = NULL;</div><div class='del'>-   s-&gt;ptr               = (UInt32*)s-&gt;arr1;</div><div class='del'>-</div><div class='del'>-   strm-&gt;state          = s;</div><div class='del'>-   strm-&gt;total_in_lo32  = 0;</div><div class='del'>-   strm-&gt;total_in_hi32  = 0;</div><div class='del'>-   strm-&gt;total_out_lo32 = 0;</div><div class='del'>-   strm-&gt;total_out_hi32 = 0;</div><div class='del'>-   init_RL ( s );</div><div class='del'>-   prepare_new_block ( s );</div><div class='del'>-   return BZ_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void add_pair_to_block ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Int32 i;</div><div class='del'>-   UChar ch = (UChar)(s-&gt;state_in_ch);</div><div class='del'>-   for (i = 0; i &lt; s-&gt;state_in_len; i++) {</div><div class='del'>-      BZ_UPDATE_CRC( s-&gt;blockCRC, ch );</div><div class='del'>-   }</div><div class='del'>-   s-&gt;inUse[s-&gt;state_in_ch] = True;</div><div class='del'>-   switch (s-&gt;state_in_len) {</div><div class='del'>-      case 1:</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         break;</div><div class='del'>-      case 2:</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         break;</div><div class='del'>-      case 3:</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         break;</div><div class='del'>-      default:</div><div class='del'>-         s-&gt;inUse[s-&gt;state_in_len-4] = True;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = (UChar)ch; s-&gt;nblock++;</div><div class='del'>-         s-&gt;block[s-&gt;nblock] = ((UChar)(s-&gt;state_in_len-4));</div><div class='del'>-         s-&gt;nblock++;</div><div class='del'>-         break;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void flush_RL ( EState* s )</div><div class='del'>-{</div><div class='del'>-   if (s-&gt;state_in_ch &lt; 256) add_pair_to_block ( s );</div><div class='del'>-   init_RL ( s );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define ADD_CHAR_TO_BLOCK(zs,zchh0)               \</div><div class='del'>-{                                                 \</div><div class='del'>-   UInt32 zchh = (UInt32)(zchh0);                 \</div><div class='del'>-   /*-- fast track the common case --*/           \</div><div class='del'>-   if (zchh != zs-&gt;state_in_ch &amp;&amp;                 \</div><div class='del'>-       zs-&gt;state_in_len == 1) {                   \</div><div class='del'>-      UChar ch = (UChar)(zs-&gt;state_in_ch);        \</div><div class='del'>-      BZ_UPDATE_CRC( zs-&gt;blockCRC, ch );          \</div><div class='del'>-      zs-&gt;inUse[zs-&gt;state_in_ch] = True;          \</div><div class='del'>-      zs-&gt;block[zs-&gt;nblock] = (UChar)ch;          \</div><div class='del'>-      zs-&gt;nblock++;                               \</div><div class='del'>-      zs-&gt;state_in_ch = zchh;                     \</div><div class='del'>-   }                                              \</div><div class='del'>-   else                                           \</div><div class='del'>-   /*-- general, uncommon cases --*/              \</div><div class='del'>-   if (zchh != zs-&gt;state_in_ch ||                 \</div><div class='del'>-      zs-&gt;state_in_len == 255) {                  \</div><div class='del'>-      if (zs-&gt;state_in_ch &lt; 256)                  \</div><div class='del'>-         add_pair_to_block ( zs );                \</div><div class='del'>-      zs-&gt;state_in_ch = zchh;                     \</div><div class='del'>-      zs-&gt;state_in_len = 1;                       \</div><div class='del'>-   } else {                                       \</div><div class='del'>-      zs-&gt;state_in_len++;                         \</div><div class='del'>-   }                                              \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-Bool copy_input_until_stop ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Bool progress_in = False;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;mode == BZ_M_RUNNING) {</div><div class='del'>-</div><div class='del'>-      /*-- fast track the common case --*/</div><div class='del'>-      while (True) {</div><div class='del'>-         /*-- block full? --*/</div><div class='del'>-         if (s-&gt;nblock &gt;= s-&gt;nblockMAX) break;</div><div class='del'>-         /*-- no input? --*/</div><div class='del'>-         if (s-&gt;strm-&gt;avail_in == 0) break;</div><div class='del'>-         progress_in = True;</div><div class='del'>-         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s-&gt;strm-&gt;next_in))) ); </div><div class='del'>-         s-&gt;strm-&gt;next_in++;</div><div class='del'>-         s-&gt;strm-&gt;avail_in--;</div><div class='del'>-         s-&gt;strm-&gt;total_in_lo32++;</div><div class='del'>-         if (s-&gt;strm-&gt;total_in_lo32 == 0) s-&gt;strm-&gt;total_in_hi32++;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   } else {</div><div class='del'>-</div><div class='del'>-      /*-- general, uncommon case --*/</div><div class='del'>-      while (True) {</div><div class='del'>-         /*-- block full? --*/</div><div class='del'>-         if (s-&gt;nblock &gt;= s-&gt;nblockMAX) break;</div><div class='del'>-         /*-- no input? --*/</div><div class='del'>-         if (s-&gt;strm-&gt;avail_in == 0) break;</div><div class='del'>-         /*-- flush/finish end? --*/</div><div class='del'>-         if (s-&gt;avail_in_expect == 0) break;</div><div class='del'>-         progress_in = True;</div><div class='del'>-         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s-&gt;strm-&gt;next_in))) ); </div><div class='del'>-         s-&gt;strm-&gt;next_in++;</div><div class='del'>-         s-&gt;strm-&gt;avail_in--;</div><div class='del'>-         s-&gt;strm-&gt;total_in_lo32++;</div><div class='del'>-         if (s-&gt;strm-&gt;total_in_lo32 == 0) s-&gt;strm-&gt;total_in_hi32++;</div><div class='del'>-         s-&gt;avail_in_expect--;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-   return progress_in;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-Bool copy_output_until_stop ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Bool progress_out = False;</div><div class='del'>-</div><div class='del'>-   while (True) {</div><div class='del'>-</div><div class='del'>-      /*-- no output space? --*/</div><div class='del'>-      if (s-&gt;strm-&gt;avail_out == 0) break;</div><div class='del'>-</div><div class='del'>-      /*-- block done? --*/</div><div class='del'>-      if (s-&gt;state_out_pos &gt;= s-&gt;numZ) break;</div><div class='del'>-</div><div class='del'>-      progress_out = True;</div><div class='del'>-      *(s-&gt;strm-&gt;next_out) = s-&gt;zbits[s-&gt;state_out_pos];</div><div class='del'>-      s-&gt;state_out_pos++;</div><div class='del'>-      s-&gt;strm-&gt;avail_out--;</div><div class='del'>-      s-&gt;strm-&gt;next_out++;</div><div class='del'>-      s-&gt;strm-&gt;total_out_lo32++;</div><div class='del'>-      if (s-&gt;strm-&gt;total_out_lo32 == 0) s-&gt;strm-&gt;total_out_hi32++;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   return progress_out;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-Bool handle_compress ( bz_stream* strm )</div><div class='del'>-{</div><div class='del'>-   Bool progress_in  = False;</div><div class='del'>-   Bool progress_out = False;</div><div class='del'>-   EState* s = strm-&gt;state;</div><div class='del'>-   </div><div class='del'>-   while (True) {</div><div class='del'>-</div><div class='del'>-      if (s-&gt;state == BZ_S_OUTPUT) {</div><div class='del'>-         progress_out |= copy_output_until_stop ( s );</div><div class='del'>-         if (s-&gt;state_out_pos &lt; s-&gt;numZ) break;</div><div class='del'>-         if (s-&gt;mode == BZ_M_FINISHING &amp;&amp; </div><div class='del'>-             s-&gt;avail_in_expect == 0 &amp;&amp;</div><div class='del'>-             isempty_RL(s)) break;</div><div class='del'>-         prepare_new_block ( s );</div><div class='del'>-         s-&gt;state = BZ_S_INPUT;</div><div class='del'>-         if (s-&gt;mode == BZ_M_FLUSHING &amp;&amp; </div><div class='del'>-             s-&gt;avail_in_expect == 0 &amp;&amp;</div><div class='del'>-             isempty_RL(s)) break;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      if (s-&gt;state == BZ_S_INPUT) {</div><div class='del'>-         progress_in |= copy_input_until_stop ( s );</div><div class='del'>-         if (s-&gt;mode != BZ_M_RUNNING &amp;&amp; s-&gt;avail_in_expect == 0) {</div><div class='del'>-            flush_RL ( s );</div><div class='del'>-            BZ2_compressBlock ( s, (Bool)(s-&gt;mode == BZ_M_FINISHING) );</div><div class='del'>-            s-&gt;state = BZ_S_OUTPUT;</div><div class='del'>-         }</div><div class='del'>-         else</div><div class='del'>-         if (s-&gt;nblock &gt;= s-&gt;nblockMAX) {</div><div class='del'>-            BZ2_compressBlock ( s, False );</div><div class='del'>-            s-&gt;state = BZ_S_OUTPUT;</div><div class='del'>-         }</div><div class='del'>-         else</div><div class='del'>-         if (s-&gt;strm-&gt;avail_in == 0) {</div><div class='del'>-            break;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   return progress_in || progress_out;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )</div><div class='del'>-{</div><div class='del'>-   Bool progress;</div><div class='del'>-   EState* s;</div><div class='del'>-   if (strm == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   s = strm-&gt;state;</div><div class='del'>-   if (s == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   if (s-&gt;strm != strm) return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   preswitch:</div><div class='del'>-   switch (s-&gt;mode) {</div><div class='del'>-</div><div class='del'>-      case BZ_M_IDLE:</div><div class='del'>-         return BZ_SEQUENCE_ERROR;</div><div class='del'>-</div><div class='del'>-      case BZ_M_RUNNING:</div><div class='del'>-         if (action == BZ_RUN) {</div><div class='del'>-            progress = handle_compress ( strm );</div><div class='del'>-            return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;</div><div class='del'>-         } </div><div class='del'>-         else</div><div class='del'>-	 if (action == BZ_FLUSH) {</div><div class='del'>-            s-&gt;avail_in_expect = strm-&gt;avail_in;</div><div class='del'>-            s-&gt;mode = BZ_M_FLUSHING;</div><div class='del'>-            goto preswitch;</div><div class='del'>-         }</div><div class='del'>-         else</div><div class='del'>-         if (action == BZ_FINISH) {</div><div class='del'>-            s-&gt;avail_in_expect = strm-&gt;avail_in;</div><div class='del'>-            s-&gt;mode = BZ_M_FINISHING;</div><div class='del'>-            goto preswitch;</div><div class='del'>-         }</div><div class='del'>-         else </div><div class='del'>-            return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-      case BZ_M_FLUSHING:</div><div class='del'>-         if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR;</div><div class='del'>-         if (s-&gt;avail_in_expect != s-&gt;strm-&gt;avail_in) </div><div class='del'>-            return BZ_SEQUENCE_ERROR;</div><div class='del'>-         progress = handle_compress ( strm );</div><div class='del'>-         if (s-&gt;avail_in_expect &gt; 0 || !isempty_RL(s) ||</div><div class='del'>-             s-&gt;state_out_pos &lt; s-&gt;numZ) return BZ_FLUSH_OK;</div><div class='del'>-         s-&gt;mode = BZ_M_RUNNING;</div><div class='del'>-         return BZ_RUN_OK;</div><div class='del'>-</div><div class='del'>-      case BZ_M_FINISHING:</div><div class='del'>-         if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR;</div><div class='del'>-         if (s-&gt;avail_in_expect != s-&gt;strm-&gt;avail_in) </div><div class='del'>-            return BZ_SEQUENCE_ERROR;</div><div class='del'>-         progress = handle_compress ( strm );</div><div class='del'>-         if (!progress) return BZ_SEQUENCE_ERROR;</div><div class='del'>-         if (s-&gt;avail_in_expect &gt; 0 || !isempty_RL(s) ||</div><div class='del'>-             s-&gt;state_out_pos &lt; s-&gt;numZ) return BZ_FINISH_OK;</div><div class='del'>-         s-&gt;mode = BZ_M_IDLE;</div><div class='del'>-         return BZ_STREAM_END;</div><div class='del'>-   }</div><div class='del'>-   return BZ_OK; /*--not reached--*/</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzCompressEnd)  ( bz_stream *strm )</div><div class='del'>-{</div><div class='del'>-   EState* s;</div><div class='del'>-   if (strm == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   s = strm-&gt;state;</div><div class='del'>-   if (s == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   if (s-&gt;strm != strm) return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;arr1 != NULL) BZFREE(s-&gt;arr1);</div><div class='del'>-   if (s-&gt;arr2 != NULL) BZFREE(s-&gt;arr2);</div><div class='del'>-   if (s-&gt;ftab != NULL) BZFREE(s-&gt;ftab);</div><div class='del'>-   BZFREE(strm-&gt;state);</div><div class='del'>-</div><div class='del'>-   strm-&gt;state = NULL;   </div><div class='del'>-</div><div class='del'>-   return BZ_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- Decompression stuff                         ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzDecompressInit) </div><div class='del'>-                     ( bz_stream* strm, </div><div class='del'>-                       int        verbosity,</div><div class='del'>-                       int        small )</div><div class='del'>-{</div><div class='del'>-   DState* s;</div><div class='del'>-</div><div class='del'>-   if (!bz_config_ok()) return BZ_CONFIG_ERROR;</div><div class='del'>-</div><div class='del'>-   if (strm == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   if (small != 0 &amp;&amp; small != 1) return BZ_PARAM_ERROR;</div><div class='del'>-   if (verbosity &lt; 0 || verbosity &gt; 4) return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   if (strm-&gt;bzalloc == NULL) strm-&gt;bzalloc = default_bzalloc;</div><div class='del'>-   if (strm-&gt;bzfree == NULL) strm-&gt;bzfree = default_bzfree;</div><div class='del'>-</div><div class='del'>-   s = BZALLOC( sizeof(DState) );</div><div class='del'>-   if (s == NULL) return BZ_MEM_ERROR;</div><div class='del'>-   s-&gt;strm                  = strm;</div><div class='del'>-   strm-&gt;state              = s;</div><div class='del'>-   s-&gt;state                 = BZ_X_MAGIC_1;</div><div class='del'>-   s-&gt;bsLive                = 0;</div><div class='del'>-   s-&gt;bsBuff                = 0;</div><div class='del'>-   s-&gt;calculatedCombinedCRC = 0;</div><div class='del'>-   strm-&gt;total_in_lo32      = 0;</div><div class='del'>-   strm-&gt;total_in_hi32      = 0;</div><div class='del'>-   strm-&gt;total_out_lo32     = 0;</div><div class='del'>-   strm-&gt;total_out_hi32     = 0;</div><div class='del'>-   s-&gt;smallDecompress       = (Bool)small;</div><div class='del'>-   s-&gt;ll4                   = NULL;</div><div class='del'>-   s-&gt;ll16                  = NULL;</div><div class='del'>-   s-&gt;tt                    = NULL;</div><div class='del'>-   s-&gt;currBlockNo           = 0;</div><div class='del'>-   s-&gt;verbosity             = verbosity;</div><div class='del'>-</div><div class='del'>-   return BZ_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void unRLE_obuf_to_output_FAST ( DState* s )</div><div class='del'>-{</div><div class='del'>-   UChar k1;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;blockRandomised) {</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-         /* try to finish existing run */</div><div class='del'>-         while (True) {</div><div class='del'>-            if (s-&gt;strm-&gt;avail_out == 0) return;</div><div class='del'>-            if (s-&gt;state_out_len == 0) break;</div><div class='del'>-            *( (UChar*)(s-&gt;strm-&gt;next_out) ) = s-&gt;state_out_ch;</div><div class='del'>-            BZ_UPDATE_CRC ( s-&gt;calculatedBlockCRC, s-&gt;state_out_ch );</div><div class='del'>-            s-&gt;state_out_len--;</div><div class='del'>-            s-&gt;strm-&gt;next_out++;</div><div class='del'>-            s-&gt;strm-&gt;avail_out--;</div><div class='del'>-            s-&gt;strm-&gt;total_out_lo32++;</div><div class='del'>-            if (s-&gt;strm-&gt;total_out_lo32 == 0) s-&gt;strm-&gt;total_out_hi32++;</div><div class='del'>-         }</div><div class='del'>-   </div><div class='del'>-         /* can a new run be started? */</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) return;</div><div class='del'>-               </div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 1;</div><div class='del'>-         s-&gt;state_out_ch = s-&gt;k0;</div><div class='del'>-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 2;</div><div class='del'>-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 3;</div><div class='del'>-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         s-&gt;state_out_len = ((Int32)k1) + 4;</div><div class='del'>-         BZ_GET_FAST(s-&gt;k0); BZ_RAND_UPD_MASK; </div><div class='del'>-         s-&gt;k0 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   } else {</div><div class='del'>-</div><div class='del'>-      /* restore */</div><div class='del'>-      UInt32        c_calculatedBlockCRC = s-&gt;calculatedBlockCRC;</div><div class='del'>-      UChar         c_state_out_ch       = s-&gt;state_out_ch;</div><div class='del'>-      Int32         c_state_out_len      = s-&gt;state_out_len;</div><div class='del'>-      Int32         c_nblock_used        = s-&gt;nblock_used;</div><div class='del'>-      Int32         c_k0                 = s-&gt;k0;</div><div class='del'>-      UInt32*       c_tt                 = s-&gt;tt;</div><div class='del'>-      UInt32        c_tPos               = s-&gt;tPos;</div><div class='del'>-      char*         cs_next_out          = s-&gt;strm-&gt;next_out;</div><div class='del'>-      unsigned int  cs_avail_out         = s-&gt;strm-&gt;avail_out;</div><div class='del'>-      /* end restore */</div><div class='del'>-</div><div class='del'>-      UInt32       avail_out_INIT = cs_avail_out;</div><div class='del'>-      Int32        s_save_nblockPP = s-&gt;save_nblock+1;</div><div class='del'>-      unsigned int total_out_lo32_old;</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-</div><div class='del'>-         /* try to finish existing run */</div><div class='del'>-         if (c_state_out_len &gt; 0) {</div><div class='del'>-            while (True) {</div><div class='del'>-               if (cs_avail_out == 0) goto return_notr;</div><div class='del'>-               if (c_state_out_len == 1) break;</div><div class='del'>-               *( (UChar*)(cs_next_out) ) = c_state_out_ch;</div><div class='del'>-               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );</div><div class='del'>-               c_state_out_len--;</div><div class='del'>-               cs_next_out++;</div><div class='del'>-               cs_avail_out--;</div><div class='del'>-            }</div><div class='del'>-            s_state_out_len_eq_one:</div><div class='del'>-            {</div><div class='del'>-               if (cs_avail_out == 0) { </div><div class='del'>-                  c_state_out_len = 1; goto return_notr;</div><div class='del'>-               };</div><div class='del'>-               *( (UChar*)(cs_next_out) ) = c_state_out_ch;</div><div class='del'>-               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );</div><div class='del'>-               cs_next_out++;</div><div class='del'>-               cs_avail_out--;</div><div class='del'>-            }</div><div class='del'>-         }   </div><div class='del'>-         /* can a new run be started? */</div><div class='del'>-         if (c_nblock_used == s_save_nblockPP) {</div><div class='del'>-            c_state_out_len = 0; goto return_notr;</div><div class='del'>-         };   </div><div class='del'>-         c_state_out_ch = c_k0;</div><div class='del'>-         BZ_GET_FAST_C(k1); c_nblock_used++;</div><div class='del'>-         if (k1 != c_k0) { </div><div class='del'>-            c_k0 = k1; goto s_state_out_len_eq_one; </div><div class='del'>-         };</div><div class='del'>-         if (c_nblock_used == s_save_nblockPP) </div><div class='del'>-            goto s_state_out_len_eq_one;</div><div class='del'>-   </div><div class='del'>-         c_state_out_len = 2;</div><div class='del'>-         BZ_GET_FAST_C(k1); c_nblock_used++;</div><div class='del'>-         if (c_nblock_used == s_save_nblockPP) continue;</div><div class='del'>-         if (k1 != c_k0) { c_k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         c_state_out_len = 3;</div><div class='del'>-         BZ_GET_FAST_C(k1); c_nblock_used++;</div><div class='del'>-         if (c_nblock_used == s_save_nblockPP) continue;</div><div class='del'>-         if (k1 != c_k0) { c_k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         BZ_GET_FAST_C(k1); c_nblock_used++;</div><div class='del'>-         c_state_out_len = ((Int32)k1) + 4;</div><div class='del'>-         BZ_GET_FAST_C(c_k0); c_nblock_used++;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      return_notr:</div><div class='del'>-      total_out_lo32_old = s-&gt;strm-&gt;total_out_lo32;</div><div class='del'>-      s-&gt;strm-&gt;total_out_lo32 += (avail_out_INIT - cs_avail_out);</div><div class='del'>-      if (s-&gt;strm-&gt;total_out_lo32 &lt; total_out_lo32_old)</div><div class='del'>-         s-&gt;strm-&gt;total_out_hi32++;</div><div class='del'>-</div><div class='del'>-      /* save */</div><div class='del'>-      s-&gt;calculatedBlockCRC = c_calculatedBlockCRC;</div><div class='del'>-      s-&gt;state_out_ch       = c_state_out_ch;</div><div class='del'>-      s-&gt;state_out_len      = c_state_out_len;</div><div class='del'>-      s-&gt;nblock_used        = c_nblock_used;</div><div class='del'>-      s-&gt;k0                 = c_k0;</div><div class='del'>-      s-&gt;tt                 = c_tt;</div><div class='del'>-      s-&gt;tPos               = c_tPos;</div><div class='del'>-      s-&gt;strm-&gt;next_out     = cs_next_out;</div><div class='del'>-      s-&gt;strm-&gt;avail_out    = cs_avail_out;</div><div class='del'>-      /* end save */</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-__inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )</div><div class='del'>-{</div><div class='del'>-   Int32 nb, na, mid;</div><div class='del'>-   nb = 0;</div><div class='del'>-   na = 256;</div><div class='del'>-   do {</div><div class='del'>-      mid = (nb + na) &gt;&gt; 1;</div><div class='del'>-      if (indx &gt;= cftab[mid]) nb = mid; else na = mid;</div><div class='del'>-   }</div><div class='del'>-   while (na - nb != 1);</div><div class='del'>-   return nb;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void unRLE_obuf_to_output_SMALL ( DState* s )</div><div class='del'>-{</div><div class='del'>-   UChar k1;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;blockRandomised) {</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-         /* try to finish existing run */</div><div class='del'>-         while (True) {</div><div class='del'>-            if (s-&gt;strm-&gt;avail_out == 0) return;</div><div class='del'>-            if (s-&gt;state_out_len == 0) break;</div><div class='del'>-            *( (UChar*)(s-&gt;strm-&gt;next_out) ) = s-&gt;state_out_ch;</div><div class='del'>-            BZ_UPDATE_CRC ( s-&gt;calculatedBlockCRC, s-&gt;state_out_ch );</div><div class='del'>-            s-&gt;state_out_len--;</div><div class='del'>-            s-&gt;strm-&gt;next_out++;</div><div class='del'>-            s-&gt;strm-&gt;avail_out--;</div><div class='del'>-            s-&gt;strm-&gt;total_out_lo32++;</div><div class='del'>-            if (s-&gt;strm-&gt;total_out_lo32 == 0) s-&gt;strm-&gt;total_out_hi32++;</div><div class='del'>-         }</div><div class='del'>-   </div><div class='del'>-         /* can a new run be started? */</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) return;</div><div class='del'>-               </div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 1;</div><div class='del'>-         s-&gt;state_out_ch = s-&gt;k0;</div><div class='del'>-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 2;</div><div class='del'>-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 3;</div><div class='del'>-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; </div><div class='del'>-         k1 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-         s-&gt;state_out_len = ((Int32)k1) + 4;</div><div class='del'>-         BZ_GET_SMALL(s-&gt;k0); BZ_RAND_UPD_MASK; </div><div class='del'>-         s-&gt;k0 ^= BZ_RAND_MASK; s-&gt;nblock_used++;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   } else {</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-         /* try to finish existing run */</div><div class='del'>-         while (True) {</div><div class='del'>-            if (s-&gt;strm-&gt;avail_out == 0) return;</div><div class='del'>-            if (s-&gt;state_out_len == 0) break;</div><div class='del'>-            *( (UChar*)(s-&gt;strm-&gt;next_out) ) = s-&gt;state_out_ch;</div><div class='del'>-            BZ_UPDATE_CRC ( s-&gt;calculatedBlockCRC, s-&gt;state_out_ch );</div><div class='del'>-            s-&gt;state_out_len--;</div><div class='del'>-            s-&gt;strm-&gt;next_out++;</div><div class='del'>-            s-&gt;strm-&gt;avail_out--;</div><div class='del'>-            s-&gt;strm-&gt;total_out_lo32++;</div><div class='del'>-            if (s-&gt;strm-&gt;total_out_lo32 == 0) s-&gt;strm-&gt;total_out_hi32++;</div><div class='del'>-         }</div><div class='del'>-   </div><div class='del'>-         /* can a new run be started? */</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) return;</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 1;</div><div class='del'>-         s-&gt;state_out_ch = s-&gt;k0;</div><div class='del'>-         BZ_GET_SMALL(k1); s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 2;</div><div class='del'>-         BZ_GET_SMALL(k1); s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         s-&gt;state_out_len = 3;</div><div class='del'>-         BZ_GET_SMALL(k1); s-&gt;nblock_used++;</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1) continue;</div><div class='del'>-         if (k1 != s-&gt;k0) { s-&gt;k0 = k1; continue; };</div><div class='del'>-   </div><div class='del'>-         BZ_GET_SMALL(k1); s-&gt;nblock_used++;</div><div class='del'>-         s-&gt;state_out_len = ((Int32)k1) + 4;</div><div class='del'>-         BZ_GET_SMALL(s-&gt;k0); s-&gt;nblock_used++;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )</div><div class='del'>-{</div><div class='del'>-   DState* s;</div><div class='del'>-   if (strm == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   s = strm-&gt;state;</div><div class='del'>-   if (s == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   if (s-&gt;strm != strm) return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   while (True) {</div><div class='del'>-      if (s-&gt;state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;</div><div class='del'>-      if (s-&gt;state == BZ_X_OUTPUT) {</div><div class='del'>-         if (s-&gt;smallDecompress)</div><div class='del'>-            unRLE_obuf_to_output_SMALL ( s ); else</div><div class='del'>-            unRLE_obuf_to_output_FAST  ( s );</div><div class='del'>-         if (s-&gt;nblock_used == s-&gt;save_nblock+1 &amp;&amp; s-&gt;state_out_len == 0) {</div><div class='del'>-            BZ_FINALISE_CRC ( s-&gt;calculatedBlockCRC );</div><div class='del'>-            if (s-&gt;verbosity &gt;= 3) </div><div class='del'>-               VPrintf2 ( " {0x%x, 0x%x}", s-&gt;storedBlockCRC, </div><div class='del'>-                          s-&gt;calculatedBlockCRC );</div><div class='del'>-            if (s-&gt;verbosity &gt;= 2) VPrintf0 ( "]" );</div><div class='del'>-            if (s-&gt;calculatedBlockCRC != s-&gt;storedBlockCRC)</div><div class='del'>-               return BZ_DATA_ERROR;</div><div class='del'>-            s-&gt;calculatedCombinedCRC </div><div class='del'>-               = (s-&gt;calculatedCombinedCRC &lt;&lt; 1) | </div><div class='del'>-                    (s-&gt;calculatedCombinedCRC &gt;&gt; 31);</div><div class='del'>-            s-&gt;calculatedCombinedCRC ^= s-&gt;calculatedBlockCRC;</div><div class='del'>-            s-&gt;state = BZ_X_BLKHDR_1;</div><div class='del'>-         } else {</div><div class='del'>-            return BZ_OK;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-      if (s-&gt;state &gt;= BZ_X_MAGIC_1) {</div><div class='del'>-         Int32 r = BZ2_decompress ( s );</div><div class='del'>-         if (r == BZ_STREAM_END) {</div><div class='del'>-            if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-               VPrintf2 ( "\n    combined CRCs: stored = 0x%x, computed = 0x%x", </div><div class='del'>-                          s-&gt;storedCombinedCRC, s-&gt;calculatedCombinedCRC );</div><div class='del'>-            if (s-&gt;calculatedCombinedCRC != s-&gt;storedCombinedCRC)</div><div class='del'>-               return BZ_DATA_ERROR;</div><div class='del'>-            return r;</div><div class='del'>-         }</div><div class='del'>-         if (s-&gt;state != BZ_X_OUTPUT) return r;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   AssertH ( 0, 6001 );</div><div class='del'>-</div><div class='del'>-   return 0;  /*NOTREACHED*/</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzDecompressEnd)  ( bz_stream *strm )</div><div class='del'>-{</div><div class='del'>-   DState* s;</div><div class='del'>-   if (strm == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   s = strm-&gt;state;</div><div class='del'>-   if (s == NULL) return BZ_PARAM_ERROR;</div><div class='del'>-   if (s-&gt;strm != strm) return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;tt   != NULL) BZFREE(s-&gt;tt);</div><div class='del'>-   if (s-&gt;ll16 != NULL) BZFREE(s-&gt;ll16);</div><div class='del'>-   if (s-&gt;ll4  != NULL) BZFREE(s-&gt;ll4);</div><div class='del'>-</div><div class='del'>-   BZFREE(strm-&gt;state);</div><div class='del'>-   strm-&gt;state = NULL;</div><div class='del'>-</div><div class='del'>-   return BZ_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- File I/O stuff                              ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-#define BZ_SETERR(eee)                    \</div><div class='del'>-{                                         \</div><div class='del'>-   if (bzerror != NULL) *bzerror = eee;   \</div><div class='del'>-   if (bzf != NULL) bzf-&gt;lastErr = eee;   \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-typedef </div><div class='del'>-   struct {</div><div class='del'>-      FILE*     handle;</div><div class='del'>-      Char      buf[BZ_MAX_UNUSED];</div><div class='del'>-      Int32     bufN;</div><div class='del'>-      Bool      writing;</div><div class='del'>-      bz_stream strm;</div><div class='del'>-      Int32     lastErr;</div><div class='del'>-      Bool      initialisedOk;</div><div class='del'>-   }</div><div class='del'>-   bzFile;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-static Bool myfeof ( FILE* f )</div><div class='del'>-{</div><div class='del'>-	return feof(f) ? True : False;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-BZFILE* BZ_API(BZ2_bzWriteOpen) </div><div class='del'>-                    ( int*  bzerror,      </div><div class='del'>-                      FILE* f, </div><div class='del'>-                      int   blockSize100k, </div><div class='del'>-                      int   verbosity,</div><div class='del'>-                      int   workFactor )</div><div class='del'>-{</div><div class='del'>-   Int32   ret;</div><div class='del'>-   bzFile* bzf = NULL;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-</div><div class='del'>-   if (f == NULL ||</div><div class='del'>-       (blockSize100k &lt; 1 || blockSize100k &gt; 9) ||</div><div class='del'>-       (workFactor &lt; 0 || workFactor &gt; 250) ||</div><div class='del'>-       (verbosity &lt; 0 || verbosity &gt; 4))</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   if (ferror(f))</div><div class='del'>-      { BZ_SETERR(BZ_IO_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   bzf = malloc ( sizeof(bzFile) );</div><div class='del'>-   if (bzf == NULL)</div><div class='del'>-      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-   bzf-&gt;initialisedOk = False;</div><div class='del'>-   bzf-&gt;bufN          = 0;</div><div class='del'>-   bzf-&gt;handle        = f;</div><div class='del'>-   bzf-&gt;writing       = True;</div><div class='del'>-   bzf-&gt;strm.bzalloc  = NULL;</div><div class='del'>-   bzf-&gt;strm.bzfree   = NULL;</div><div class='del'>-   bzf-&gt;strm.opaque   = NULL;</div><div class='del'>-</div><div class='del'>-   if (workFactor == 0) workFactor = 30;</div><div class='del'>-   ret = BZ2_bzCompressInit ( &amp;(bzf-&gt;strm), blockSize100k, </div><div class='del'>-                              verbosity, workFactor );</div><div class='del'>-   if (ret != BZ_OK)</div><div class='del'>-      { BZ_SETERR(ret); free(bzf); return NULL; };</div><div class='del'>-</div><div class='del'>-   bzf-&gt;strm.avail_in = 0;</div><div class='del'>-   bzf-&gt;initialisedOk = True;</div><div class='del'>-   return bzf;   </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ_API(BZ2_bzWrite)</div><div class='del'>-             ( int*    bzerror, </div><div class='del'>-               BZFILE* b, </div><div class='del'>-               void*   buf, </div><div class='del'>-               int     len )</div><div class='del'>-{</div><div class='del'>-   Int32 n, n2, ret;</div><div class='del'>-   bzFile* bzf = (bzFile*)b;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-   if (bzf == NULL || buf == NULL || len &lt; 0)</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return; };</div><div class='del'>-   if (!(bzf-&gt;writing))</div><div class='del'>-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };</div><div class='del'>-   if (ferror(bzf-&gt;handle))</div><div class='del'>-      { BZ_SETERR(BZ_IO_ERROR); return; };</div><div class='del'>-</div><div class='del'>-   if (len == 0)</div><div class='del'>-      { BZ_SETERR(BZ_OK); return; };</div><div class='del'>-</div><div class='del'>-   bzf-&gt;strm.avail_in = len;</div><div class='del'>-   bzf-&gt;strm.next_in  = buf;</div><div class='del'>-</div><div class='del'>-   while (True) {</div><div class='del'>-      bzf-&gt;strm.avail_out = BZ_MAX_UNUSED;</div><div class='del'>-      bzf-&gt;strm.next_out = bzf-&gt;buf;</div><div class='del'>-      ret = BZ2_bzCompress ( &amp;(bzf-&gt;strm), BZ_RUN );</div><div class='del'>-      if (ret != BZ_RUN_OK)</div><div class='del'>-         { BZ_SETERR(ret); return; };</div><div class='del'>-</div><div class='del'>-      if (bzf-&gt;strm.avail_out &lt; BZ_MAX_UNUSED) {</div><div class='del'>-         n = BZ_MAX_UNUSED - bzf-&gt;strm.avail_out;</div><div class='del'>-         n2 = fwrite ( (void*)(bzf-&gt;buf), sizeof(UChar), </div><div class='del'>-                       n, bzf-&gt;handle );</div><div class='del'>-         if (n != n2 || ferror(bzf-&gt;handle))</div><div class='del'>-            { BZ_SETERR(BZ_IO_ERROR); return; };</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      if (bzf-&gt;strm.avail_in == 0)</div><div class='del'>-         { BZ_SETERR(BZ_OK); return; };</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ_API(BZ2_bzWriteClose)</div><div class='del'>-                  ( int*          bzerror, </div><div class='del'>-                    BZFILE*       b, </div><div class='del'>-                    int           abandon,</div><div class='del'>-                    unsigned int* nbytes_in,</div><div class='del'>-                    unsigned int* nbytes_out )</div><div class='del'>-{</div><div class='del'>-   BZ2_bzWriteClose64 ( bzerror, b, abandon, </div><div class='del'>-                        nbytes_in, NULL, nbytes_out, NULL );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void BZ_API(BZ2_bzWriteClose64)</div><div class='del'>-                  ( int*          bzerror, </div><div class='del'>-                    BZFILE*       b, </div><div class='del'>-                    int           abandon,</div><div class='del'>-                    unsigned int* nbytes_in_lo32,</div><div class='del'>-                    unsigned int* nbytes_in_hi32,</div><div class='del'>-                    unsigned int* nbytes_out_lo32,</div><div class='del'>-                    unsigned int* nbytes_out_hi32 )</div><div class='del'>-{</div><div class='del'>-   Int32   n, n2, ret;</div><div class='del'>-   bzFile* bzf = (bzFile*)b;</div><div class='del'>-</div><div class='del'>-   if (bzf == NULL)</div><div class='del'>-      { BZ_SETERR(BZ_OK); return; };</div><div class='del'>-   if (!(bzf-&gt;writing))</div><div class='del'>-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };</div><div class='del'>-   if (ferror(bzf-&gt;handle))</div><div class='del'>-      { BZ_SETERR(BZ_IO_ERROR); return; };</div><div class='del'>-</div><div class='del'>-   if (nbytes_in_lo32 != NULL) *nbytes_in_lo32 = 0;</div><div class='del'>-   if (nbytes_in_hi32 != NULL) *nbytes_in_hi32 = 0;</div><div class='del'>-   if (nbytes_out_lo32 != NULL) *nbytes_out_lo32 = 0;</div><div class='del'>-   if (nbytes_out_hi32 != NULL) *nbytes_out_hi32 = 0;</div><div class='del'>-</div><div class='del'>-   if ((!abandon) &amp;&amp; bzf-&gt;lastErr == BZ_OK) {</div><div class='del'>-      while (True) {</div><div class='del'>-         bzf-&gt;strm.avail_out = BZ_MAX_UNUSED;</div><div class='del'>-         bzf-&gt;strm.next_out = bzf-&gt;buf;</div><div class='del'>-         ret = BZ2_bzCompress ( &amp;(bzf-&gt;strm), BZ_FINISH );</div><div class='del'>-         if (ret != BZ_FINISH_OK &amp;&amp; ret != BZ_STREAM_END)</div><div class='del'>-            { BZ_SETERR(ret); return; };</div><div class='del'>-</div><div class='del'>-         if (bzf-&gt;strm.avail_out &lt; BZ_MAX_UNUSED) {</div><div class='del'>-            n = BZ_MAX_UNUSED - bzf-&gt;strm.avail_out;</div><div class='del'>-            n2 = fwrite ( (void*)(bzf-&gt;buf), sizeof(UChar), </div><div class='del'>-                          n, bzf-&gt;handle );</div><div class='del'>-            if (n != n2 || ferror(bzf-&gt;handle))</div><div class='del'>-               { BZ_SETERR(BZ_IO_ERROR); return; };</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         if (ret == BZ_STREAM_END) break;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if ( !abandon &amp;&amp; !ferror ( bzf-&gt;handle ) ) {</div><div class='del'>-      fflush ( bzf-&gt;handle );</div><div class='del'>-      if (ferror(bzf-&gt;handle))</div><div class='del'>-         { BZ_SETERR(BZ_IO_ERROR); return; };</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (nbytes_in_lo32 != NULL)</div><div class='del'>-      *nbytes_in_lo32 = bzf-&gt;strm.total_in_lo32;</div><div class='del'>-   if (nbytes_in_hi32 != NULL)</div><div class='del'>-      *nbytes_in_hi32 = bzf-&gt;strm.total_in_hi32;</div><div class='del'>-   if (nbytes_out_lo32 != NULL)</div><div class='del'>-      *nbytes_out_lo32 = bzf-&gt;strm.total_out_lo32;</div><div class='del'>-   if (nbytes_out_hi32 != NULL)</div><div class='del'>-      *nbytes_out_hi32 = bzf-&gt;strm.total_out_hi32;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-   BZ2_bzCompressEnd ( &amp;(bzf-&gt;strm) );</div><div class='del'>-   free ( bzf );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-BZFILE* BZ_API(BZ2_bzReadOpen) </div><div class='del'>-                   ( int*  bzerror, </div><div class='del'>-                     FILE* f, </div><div class='del'>-                     int   verbosity,</div><div class='del'>-                     int   small,</div><div class='del'>-                     void* unused,</div><div class='del'>-                     int   nUnused )</div><div class='del'>-{</div><div class='del'>-   bzFile* bzf = NULL;</div><div class='del'>-   int     ret;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-</div><div class='del'>-   if (f == NULL || </div><div class='del'>-       (small != 0 &amp;&amp; small != 1) ||</div><div class='del'>-       (verbosity &lt; 0 || verbosity &gt; 4) ||</div><div class='del'>-       (unused == NULL &amp;&amp; nUnused != 0) ||</div><div class='del'>-       (unused != NULL &amp;&amp; (nUnused &lt; 0 || nUnused &gt; BZ_MAX_UNUSED)))</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   if (ferror(f))</div><div class='del'>-      { BZ_SETERR(BZ_IO_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   bzf = malloc ( sizeof(bzFile) );</div><div class='del'>-   if (bzf == NULL) </div><div class='del'>-      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-</div><div class='del'>-   bzf-&gt;initialisedOk = False;</div><div class='del'>-   bzf-&gt;handle        = f;</div><div class='del'>-   bzf-&gt;bufN          = 0;</div><div class='del'>-   bzf-&gt;writing       = False;</div><div class='del'>-   bzf-&gt;strm.bzalloc  = NULL;</div><div class='del'>-   bzf-&gt;strm.bzfree   = NULL;</div><div class='del'>-   bzf-&gt;strm.opaque   = NULL;</div><div class='del'>-   </div><div class='del'>-   while (nUnused &gt; 0) {</div><div class='del'>-      bzf-&gt;buf[bzf-&gt;bufN] = *((UChar*)(unused)); bzf-&gt;bufN++;</div><div class='del'>-      unused = ((void*)( 1 + ((UChar*)(unused))  ));</div><div class='del'>-      nUnused--;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   ret = BZ2_bzDecompressInit ( &amp;(bzf-&gt;strm), verbosity, small );</div><div class='del'>-   if (ret != BZ_OK)</div><div class='del'>-      { BZ_SETERR(ret); free(bzf); return NULL; };</div><div class='del'>-</div><div class='del'>-   bzf-&gt;strm.avail_in = bzf-&gt;bufN;</div><div class='del'>-   bzf-&gt;strm.next_in  = bzf-&gt;buf;</div><div class='del'>-</div><div class='del'>-   bzf-&gt;initialisedOk = True;</div><div class='del'>-   return bzf;   </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b )</div><div class='del'>-{</div><div class='del'>-   bzFile* bzf = (bzFile*)b;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-   if (bzf == NULL)</div><div class='del'>-      { BZ_SETERR(BZ_OK); return; };</div><div class='del'>-</div><div class='del'>-   if (bzf-&gt;writing)</div><div class='del'>-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };</div><div class='del'>-</div><div class='del'>-   if (bzf-&gt;initialisedOk)</div><div class='del'>-      (void)BZ2_bzDecompressEnd ( &amp;(bzf-&gt;strm) );</div><div class='del'>-   free ( bzf );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzRead) </div><div class='del'>-           ( int*    bzerror, </div><div class='del'>-             BZFILE* b, </div><div class='del'>-             void*   buf, </div><div class='del'>-             int     len )</div><div class='del'>-{</div><div class='del'>-   Int32   n, ret;</div><div class='del'>-   bzFile* bzf = (bzFile*)b;</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-</div><div class='del'>-   if (bzf == NULL || buf == NULL || len &lt; 0)</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return 0; };</div><div class='del'>-</div><div class='del'>-   if (bzf-&gt;writing)</div><div class='del'>-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return 0; };</div><div class='del'>-</div><div class='del'>-   if (len == 0)</div><div class='del'>-      { BZ_SETERR(BZ_OK); return 0; };</div><div class='del'>-</div><div class='del'>-   bzf-&gt;strm.avail_out = len;</div><div class='del'>-   bzf-&gt;strm.next_out = buf;</div><div class='del'>-</div><div class='del'>-   while (True) {</div><div class='del'>-</div><div class='del'>-      if (ferror(bzf-&gt;handle)) </div><div class='del'>-         { BZ_SETERR(BZ_IO_ERROR); return 0; };</div><div class='del'>-</div><div class='del'>-      if (bzf-&gt;strm.avail_in == 0 &amp;&amp; !myfeof(bzf-&gt;handle)) {</div><div class='del'>-         n = fread ( bzf-&gt;buf, sizeof(UChar), </div><div class='del'>-                     BZ_MAX_UNUSED, bzf-&gt;handle );</div><div class='del'>-         if (ferror(bzf-&gt;handle))</div><div class='del'>-            { BZ_SETERR(BZ_IO_ERROR); return 0; };</div><div class='del'>-         bzf-&gt;bufN = n;</div><div class='del'>-         bzf-&gt;strm.avail_in = bzf-&gt;bufN;</div><div class='del'>-         bzf-&gt;strm.next_in = bzf-&gt;buf;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      ret = BZ2_bzDecompress ( &amp;(bzf-&gt;strm) );</div><div class='del'>-</div><div class='del'>-      if (ret != BZ_OK &amp;&amp; ret != BZ_STREAM_END)</div><div class='del'>-         { BZ_SETERR(ret); return 0; };</div><div class='del'>-</div><div class='del'>-      if (ret == BZ_OK &amp;&amp; myfeof(bzf-&gt;handle) &amp;&amp; </div><div class='del'>-          bzf-&gt;strm.avail_in == 0 &amp;&amp; bzf-&gt;strm.avail_out &gt; 0)</div><div class='del'>-         { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; };</div><div class='del'>-</div><div class='del'>-      if (ret == BZ_STREAM_END)</div><div class='del'>-         { BZ_SETERR(BZ_STREAM_END);</div><div class='del'>-           return len - bzf-&gt;strm.avail_out; };</div><div class='del'>-      if (bzf-&gt;strm.avail_out == 0)</div><div class='del'>-         { BZ_SETERR(BZ_OK); return len; };</div><div class='del'>-      </div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   return 0; /*not reached*/</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ_API(BZ2_bzReadGetUnused) </div><div class='del'>-                     ( int*    bzerror, </div><div class='del'>-                       BZFILE* b, </div><div class='del'>-                       void**  unused, </div><div class='del'>-                       int*    nUnused )</div><div class='del'>-{</div><div class='del'>-   bzFile* bzf = (bzFile*)b;</div><div class='del'>-   if (bzf == NULL)</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return; };</div><div class='del'>-   if (bzf-&gt;lastErr != BZ_STREAM_END)</div><div class='del'>-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };</div><div class='del'>-   if (unused == NULL || nUnused == NULL)</div><div class='del'>-      { BZ_SETERR(BZ_PARAM_ERROR); return; };</div><div class='del'>-</div><div class='del'>-   BZ_SETERR(BZ_OK);</div><div class='del'>-   *nUnused = bzf-&gt;strm.avail_in;</div><div class='del'>-   *unused = bzf-&gt;strm.next_in;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- Misc convenience stuff                      ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzBuffToBuffCompress) </div><div class='del'>-                         ( char*         dest, </div><div class='del'>-                           unsigned int* destLen,</div><div class='del'>-                           char*         source, </div><div class='del'>-                           unsigned int  sourceLen,</div><div class='del'>-                           int           blockSize100k, </div><div class='del'>-                           int           verbosity, </div><div class='del'>-                           int           workFactor )</div><div class='del'>-{</div><div class='del'>-   bz_stream strm;</div><div class='del'>-   int ret;</div><div class='del'>-</div><div class='del'>-   if (dest == NULL || destLen == NULL || </div><div class='del'>-       source == NULL ||</div><div class='del'>-       blockSize100k &lt; 1 || blockSize100k &gt; 9 ||</div><div class='del'>-       verbosity &lt; 0 || verbosity &gt; 4 ||</div><div class='del'>-       workFactor &lt; 0 || workFactor &gt; 250) </div><div class='del'>-      return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   if (workFactor == 0) workFactor = 30;</div><div class='del'>-   strm.bzalloc = NULL;</div><div class='del'>-   strm.bzfree = NULL;</div><div class='del'>-   strm.opaque = NULL;</div><div class='del'>-   ret = BZ2_bzCompressInit ( &amp;strm, blockSize100k, </div><div class='del'>-                              verbosity, workFactor );</div><div class='del'>-   if (ret != BZ_OK) return ret;</div><div class='del'>-</div><div class='del'>-   strm.next_in = source;</div><div class='del'>-   strm.next_out = dest;</div><div class='del'>-   strm.avail_in = sourceLen;</div><div class='del'>-   strm.avail_out = *destLen;</div><div class='del'>-</div><div class='del'>-   ret = BZ2_bzCompress ( &amp;strm, BZ_FINISH );</div><div class='del'>-   if (ret == BZ_FINISH_OK) goto output_overflow;</div><div class='del'>-   if (ret != BZ_STREAM_END) goto errhandler;</div><div class='del'>-</div><div class='del'>-   /* normal termination */</div><div class='del'>-   *destLen -= strm.avail_out;   </div><div class='del'>-   BZ2_bzCompressEnd ( &amp;strm );</div><div class='del'>-   return BZ_OK;</div><div class='del'>-</div><div class='del'>-   output_overflow:</div><div class='del'>-   BZ2_bzCompressEnd ( &amp;strm );</div><div class='del'>-   return BZ_OUTBUFF_FULL;</div><div class='del'>-</div><div class='del'>-   errhandler:</div><div class='del'>-   BZ2_bzCompressEnd ( &amp;strm );</div><div class='del'>-   return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzBuffToBuffDecompress) </div><div class='del'>-                           ( char*         dest, </div><div class='del'>-                             unsigned int* destLen,</div><div class='del'>-                             char*         source, </div><div class='del'>-                             unsigned int  sourceLen,</div><div class='del'>-                             int           small,</div><div class='del'>-                             int           verbosity )</div><div class='del'>-{</div><div class='del'>-   bz_stream strm;</div><div class='del'>-   int ret;</div><div class='del'>-</div><div class='del'>-   if (dest == NULL || destLen == NULL || </div><div class='del'>-       source == NULL ||</div><div class='del'>-       (small != 0 &amp;&amp; small != 1) ||</div><div class='del'>-       verbosity &lt; 0 || verbosity &gt; 4) </div><div class='del'>-          return BZ_PARAM_ERROR;</div><div class='del'>-</div><div class='del'>-   strm.bzalloc = NULL;</div><div class='del'>-   strm.bzfree = NULL;</div><div class='del'>-   strm.opaque = NULL;</div><div class='del'>-   ret = BZ2_bzDecompressInit ( &amp;strm, verbosity, small );</div><div class='del'>-   if (ret != BZ_OK) return ret;</div><div class='del'>-</div><div class='del'>-   strm.next_in = source;</div><div class='del'>-   strm.next_out = dest;</div><div class='del'>-   strm.avail_in = sourceLen;</div><div class='del'>-   strm.avail_out = *destLen;</div><div class='del'>-</div><div class='del'>-   ret = BZ2_bzDecompress ( &amp;strm );</div><div class='del'>-   if (ret == BZ_OK) goto output_overflow_or_eof;</div><div class='del'>-   if (ret != BZ_STREAM_END) goto errhandler;</div><div class='del'>-</div><div class='del'>-   /* normal termination */</div><div class='del'>-   *destLen -= strm.avail_out;</div><div class='del'>-   BZ2_bzDecompressEnd ( &amp;strm );</div><div class='del'>-   return BZ_OK;</div><div class='del'>-</div><div class='del'>-   output_overflow_or_eof:</div><div class='del'>-   if (strm.avail_out &gt; 0) {</div><div class='del'>-      BZ2_bzDecompressEnd ( &amp;strm );</div><div class='del'>-      return BZ_UNEXPECTED_EOF;</div><div class='del'>-   } else {</div><div class='del'>-      BZ2_bzDecompressEnd ( &amp;strm );</div><div class='del'>-      return BZ_OUTBUFF_FULL;</div><div class='del'>-   };      </div><div class='del'>-</div><div class='del'>-   errhandler:</div><div class='del'>-   BZ2_bzDecompressEnd ( &amp;strm );</div><div class='del'>-   return ret; </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   Code contributed by Yoshioka Tsuneo</div><div class='del'>-   (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp),</div><div class='del'>-   to support better zlib compatibility.</div><div class='del'>-   This code is not _officially_ part of libbzip2 (yet);</div><div class='del'>-   I haven't tested it, documented it, or considered the</div><div class='del'>-   threading-safeness of it.</div><div class='del'>-   If this code breaks, please contact both Yoshioka and me.</div><div class='del'>---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   return version like "0.9.0c".</div><div class='del'>---*/</div><div class='del'>-const char * BZ_API(BZ2_bzlibVersion)(void)</div><div class='del'>-{</div><div class='del'>-   return BZ_VERSION;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-#if defined(_WIN32) || defined(OS2) || defined(MSDOS)</div><div class='del'>-#   include &lt;fcntl.h&gt;</div><div class='del'>-#   include &lt;io.h&gt;</div><div class='del'>-#   define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)</div><div class='del'>-#else</div><div class='del'>-#   define SET_BINARY_MODE(file)</div><div class='del'>-#endif</div><div class='del'>-static</div><div class='del'>-BZFILE * bzopen_or_bzdopen</div><div class='del'>-               ( const char *path,   /* no use when bzdopen */</div><div class='del'>-                 int fd,             /* no use when bzdopen */</div><div class='del'>-                 const char *mode,</div><div class='del'>-                 int open_mode)      /* bzopen: 0, bzdopen:1 */</div><div class='del'>-{</div><div class='del'>-   int    bzerr;</div><div class='del'>-   char   unused[BZ_MAX_UNUSED];</div><div class='del'>-   int    blockSize100k = 9;</div><div class='del'>-   int    writing       = 0;</div><div class='del'>-   char   mode2[10]     = "";</div><div class='del'>-   FILE   *fp           = NULL;</div><div class='del'>-   BZFILE *bzfp         = NULL;</div><div class='del'>-   int    verbosity     = 0;</div><div class='del'>-   int    workFactor    = 30;</div><div class='del'>-   int    smallMode     = 0;</div><div class='del'>-   int    nUnused       = 0; </div><div class='del'>-</div><div class='del'>-   if (mode == NULL) return NULL;</div><div class='del'>-   while (*mode) {</div><div class='del'>-      switch (*mode) {</div><div class='del'>-      case 'r':</div><div class='del'>-         writing = 0; break;</div><div class='del'>-      case 'w':</div><div class='del'>-         writing = 1; break;</div><div class='del'>-      case 's':</div><div class='del'>-         smallMode = 1; break;</div><div class='del'>-      default:</div><div class='del'>-         if (isdigit((int)(*mode))) {</div><div class='del'>-            blockSize100k = *mode-'0';</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-      mode++;</div><div class='del'>-   }</div><div class='del'>-   strcat(mode2, writing ? "w" : "r" );</div><div class='del'>-   strcat(mode2,"b");   /* binary mode */</div><div class='del'>-</div><div class='del'>-   if (open_mode==0) {</div><div class='del'>-      if (path==NULL || strcmp(path,"")==0) {</div><div class='del'>-        fp = (writing ? stdout : stdin);</div><div class='del'>-        SET_BINARY_MODE(fp);</div><div class='del'>-      } else {</div><div class='del'>-        fp = fopen(path,mode2);</div><div class='del'>-      }</div><div class='del'>-   } else {</div><div class='del'>-#ifdef BZ_STRICT_ANSI</div><div class='del'>-      fp = NULL;</div><div class='del'>-#else</div><div class='del'>-      fp = fdopen(fd,mode2);</div><div class='del'>-#endif</div><div class='del'>-   }</div><div class='del'>-   if (fp == NULL) return NULL;</div><div class='del'>-</div><div class='del'>-   if (writing) {</div><div class='del'>-      /* Guard against total chaos and anarchy -- JRS */</div><div class='del'>-      if (blockSize100k &lt; 1) blockSize100k = 1;</div><div class='del'>-      if (blockSize100k &gt; 9) blockSize100k = 9; </div><div class='del'>-      bzfp = BZ2_bzWriteOpen(&amp;bzerr,fp,blockSize100k,</div><div class='del'>-                             verbosity,workFactor);</div><div class='del'>-   } else {</div><div class='del'>-      bzfp = BZ2_bzReadOpen(&amp;bzerr,fp,verbosity,smallMode,</div><div class='del'>-                            unused,nUnused);</div><div class='del'>-   }</div><div class='del'>-   if (bzfp == NULL) {</div><div class='del'>-      if (fp != stdin &amp;&amp; fp != stdout) fclose(fp);</div><div class='del'>-      return NULL;</div><div class='del'>-   }</div><div class='del'>-   return bzfp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   open file for read or write.</div><div class='del'>-      ex) bzopen("file","w9")</div><div class='del'>-      case path="" or NULL =&gt; use stdin or stdout.</div><div class='del'>---*/</div><div class='del'>-BZFILE * BZ_API(BZ2_bzopen)</div><div class='del'>-               ( const char *path,</div><div class='del'>-                 const char *mode )</div><div class='del'>-{</div><div class='del'>-   return bzopen_or_bzdopen(path,-1,mode,/*bzopen*/0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-BZFILE * BZ_API(BZ2_bzdopen)</div><div class='del'>-               ( int fd,</div><div class='del'>-                 const char *mode )</div><div class='del'>-{</div><div class='del'>-   return bzopen_or_bzdopen(NULL,fd,mode,/*bzdopen*/1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzread) (BZFILE* b, void* buf, int len )</div><div class='del'>-{</div><div class='del'>-   int bzerr, nread;</div><div class='del'>-   if (((bzFile*)b)-&gt;lastErr == BZ_STREAM_END) return 0;</div><div class='del'>-   nread = BZ2_bzRead(&amp;bzerr,b,buf,len);</div><div class='del'>-   if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) {</div><div class='del'>-      return nread;</div><div class='del'>-   } else {</div><div class='del'>-      return -1;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzwrite) (BZFILE* b, void* buf, int len )</div><div class='del'>-{</div><div class='del'>-   int bzerr;</div><div class='del'>-</div><div class='del'>-   BZ2_bzWrite(&amp;bzerr,b,buf,len);</div><div class='del'>-   if(bzerr == BZ_OK){</div><div class='del'>-      return len;</div><div class='del'>-   }else{</div><div class='del'>-      return -1;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-int BZ_API(BZ2_bzflush) (BZFILE *b __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-   /* do nothing now... */</div><div class='del'>-   return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ_API(BZ2_bzclose) (BZFILE* b)</div><div class='del'>-{</div><div class='del'>-   int bzerr;</div><div class='del'>-   FILE *fp = ((bzFile *)b)-&gt;handle;</div><div class='del'>-   </div><div class='del'>-   if (b==NULL) {return;}</div><div class='del'>-   if(((bzFile*)b)-&gt;writing){</div><div class='del'>-      BZ2_bzWriteClose(&amp;bzerr,b,0,NULL,NULL);</div><div class='del'>-      if(bzerr != BZ_OK){</div><div class='del'>-         BZ2_bzWriteClose(NULL,b,1,NULL,NULL);</div><div class='del'>-      }</div><div class='del'>-   }else{</div><div class='del'>-      BZ2_bzReadClose(&amp;bzerr,b);</div><div class='del'>-   }</div><div class='del'>-   if(fp!=stdin &amp;&amp; fp!=stdout){</div><div class='del'>-      fclose(fp);</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--</div><div class='del'>-   return last error code </div><div class='del'>---*/</div><div class='del'>-static char *bzerrorstrings[] = {</div><div class='del'>-       "OK"</div><div class='del'>-      ,"SEQUENCE_ERROR"</div><div class='del'>-      ,"PARAM_ERROR"</div><div class='del'>-      ,"MEM_ERROR"</div><div class='del'>-      ,"DATA_ERROR"</div><div class='del'>-      ,"DATA_ERROR_MAGIC"</div><div class='del'>-      ,"IO_ERROR"</div><div class='del'>-      ,"UNEXPECTED_EOF"</div><div class='del'>-      ,"OUTBUFF_FULL"</div><div class='del'>-      ,"CONFIG_ERROR"</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-      ,"???"   /* for future */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum)</div><div class='del'>-{</div><div class='del'>-   int err = ((bzFile *)b)-&gt;lastErr;</div><div class='del'>-</div><div class='del'>-   if(err&gt;0) err = 0;</div><div class='del'>-   *errnum = err;</div><div class='del'>-   return bzerrorstrings[err*-1];</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                           bzlib.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/bzlib.h b/mdk-stage1/bzlib/bzlib.h<br/>deleted file mode 100644<br/>index c9447a295..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/bzlib.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/bzlib.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,319 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Public header file for the library.                   ---*/</div><div class='del'>-/*---                                               bzlib.h ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef _BZLIB_H</div><div class='del'>-#define _BZLIB_H</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" {</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define BZ_RUN               0</div><div class='del'>-#define BZ_FLUSH             1</div><div class='del'>-#define BZ_FINISH            2</div><div class='del'>-</div><div class='del'>-#define BZ_OK                0</div><div class='del'>-#define BZ_RUN_OK            1</div><div class='del'>-#define BZ_FLUSH_OK          2</div><div class='del'>-#define BZ_FINISH_OK         3</div><div class='del'>-#define BZ_STREAM_END        4</div><div class='del'>-#define BZ_SEQUENCE_ERROR    (-1)</div><div class='del'>-#define BZ_PARAM_ERROR       (-2)</div><div class='del'>-#define BZ_MEM_ERROR         (-3)</div><div class='del'>-#define BZ_DATA_ERROR        (-4)</div><div class='del'>-#define BZ_DATA_ERROR_MAGIC  (-5)</div><div class='del'>-#define BZ_IO_ERROR          (-6)</div><div class='del'>-#define BZ_UNEXPECTED_EOF    (-7)</div><div class='del'>-#define BZ_OUTBUFF_FULL      (-8)</div><div class='del'>-#define BZ_CONFIG_ERROR      (-9)</div><div class='del'>-</div><div class='del'>-typedef </div><div class='del'>-   struct {</div><div class='del'>-      char *next_in;</div><div class='del'>-      unsigned int avail_in;</div><div class='del'>-      unsigned int total_in_lo32;</div><div class='del'>-      unsigned int total_in_hi32;</div><div class='del'>-</div><div class='del'>-      char *next_out;</div><div class='del'>-      unsigned int avail_out;</div><div class='del'>-      unsigned int total_out_lo32;</div><div class='del'>-      unsigned int total_out_hi32;</div><div class='del'>-</div><div class='del'>-      void *state;</div><div class='del'>-</div><div class='del'>-      void *(*bzalloc)(void *,int,int);</div><div class='del'>-      void (*bzfree)(void *,void *);</div><div class='del'>-      void *opaque;</div><div class='del'>-   } </div><div class='del'>-   bz_stream;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef BZ_IMPORT</div><div class='del'>-#define BZ_EXPORT</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef _WIN32</div><div class='del'>-#   include &lt;stdio.h&gt;</div><div class='del'>-#   include &lt;windows.h&gt;</div><div class='del'>-#   ifdef small</div><div class='del'>-      /* windows.h define small to char */</div><div class='del'>-#      undef small</div><div class='del'>-#   endif</div><div class='del'>-#   ifdef BZ_EXPORT</div><div class='del'>-#   define BZ_API(func) WINAPI func</div><div class='del'>-#   define BZ_EXTERN extern</div><div class='del'>-#   else</div><div class='del'>-   /* import windows dll dynamically */</div><div class='del'>-#   define BZ_API(func) (WINAPI * func)</div><div class='del'>-#   define BZ_EXTERN</div><div class='del'>-#   endif</div><div class='del'>-#else</div><div class='del'>-#   define BZ_API(func) func</div><div class='del'>-#   define BZ_EXTERN extern</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Core (low-level) library functions --*/</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( </div><div class='del'>-      bz_stream* strm, </div><div class='del'>-      int        blockSize100k, </div><div class='del'>-      int        verbosity, </div><div class='del'>-      int        workFactor </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzCompress) ( </div><div class='del'>-      bz_stream* strm, </div><div class='del'>-      int action </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( </div><div class='del'>-      bz_stream* strm </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( </div><div class='del'>-      bz_stream *strm, </div><div class='del'>-      int       verbosity, </div><div class='del'>-      int       small</div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( </div><div class='del'>-      bz_stream* strm </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( </div><div class='del'>-      bz_stream *strm </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- High(er) level library functions --*/</div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-#define BZ_MAX_UNUSED 5000</div><div class='del'>-</div><div class='del'>-typedef void BZFILE;</div><div class='del'>-</div><div class='del'>-BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( </div><div class='del'>-      int*  bzerror,   </div><div class='del'>-      FILE* f, </div><div class='del'>-      int   verbosity, </div><div class='del'>-      int   small,</div><div class='del'>-      void* unused,    </div><div class='del'>-      int   nUnused </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( </div><div class='del'>-      int*    bzerror, </div><div class='del'>-      BZFILE* b </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( </div><div class='del'>-      int*    bzerror, </div><div class='del'>-      BZFILE* b, </div><div class='del'>-      void**  unused,  </div><div class='del'>-      int*    nUnused </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzRead) ( </div><div class='del'>-      int*    bzerror, </div><div class='del'>-      BZFILE* b, </div><div class='del'>-      void*   buf, </div><div class='del'>-      int     len </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( </div><div class='del'>-      int*  bzerror,      </div><div class='del'>-      FILE* f, </div><div class='del'>-      int   blockSize100k, </div><div class='del'>-      int   verbosity, </div><div class='del'>-      int   workFactor </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzWrite) ( </div><div class='del'>-      int*    bzerror, </div><div class='del'>-      BZFILE* b, </div><div class='del'>-      void*   buf, </div><div class='del'>-      int     len </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( </div><div class='del'>-      int*          bzerror, </div><div class='del'>-      BZFILE*       b, </div><div class='del'>-      int           abandon, </div><div class='del'>-      unsigned int* nbytes_in, </div><div class='del'>-      unsigned int* nbytes_out </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( </div><div class='del'>-      int*          bzerror, </div><div class='del'>-      BZFILE*       b, </div><div class='del'>-      int           abandon, </div><div class='del'>-      unsigned int* nbytes_in_lo32, </div><div class='del'>-      unsigned int* nbytes_in_hi32, </div><div class='del'>-      unsigned int* nbytes_out_lo32, </div><div class='del'>-      unsigned int* nbytes_out_hi32</div><div class='del'>-   );</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Utility functions --*/</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( </div><div class='del'>-      char*         dest, </div><div class='del'>-      unsigned int* destLen,</div><div class='del'>-      char*         source, </div><div class='del'>-      unsigned int  sourceLen,</div><div class='del'>-      int           blockSize100k, </div><div class='del'>-      int           verbosity, </div><div class='del'>-      int           workFactor </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( </div><div class='del'>-      char*         dest, </div><div class='del'>-      unsigned int* destLen,</div><div class='del'>-      char*         source, </div><div class='del'>-      unsigned int  sourceLen,</div><div class='del'>-      int           small, </div><div class='del'>-      int           verbosity </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-   Code contributed by Yoshioka Tsuneo</div><div class='del'>-   (QWF00133@niftyserve.or.jp/tsuneo-y@is.aist-nara.ac.jp),</div><div class='del'>-   to support better zlib compatibility.</div><div class='del'>-   This code is not _officially_ part of libbzip2 (yet);</div><div class='del'>-   I haven't tested it, documented it, or considered the</div><div class='del'>-   threading-safeness of it.</div><div class='del'>-   If this code breaks, please contact both Yoshioka and me.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (</div><div class='del'>-      void</div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (</div><div class='del'>-      const char *path,</div><div class='del'>-      const char *mode</div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (</div><div class='del'>-      int        fd,</div><div class='del'>-      const char *mode</div><div class='del'>-   );</div><div class='del'>-         </div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzread) (</div><div class='del'>-      BZFILE* b, </div><div class='del'>-      void* buf, </div><div class='del'>-      int len </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzwrite) (</div><div class='del'>-      BZFILE* b, </div><div class='del'>-      void*   buf, </div><div class='del'>-      int     len </div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN int BZ_API(BZ2_bzflush) (</div><div class='del'>-      BZFILE* b</div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN void BZ_API(BZ2_bzclose) (</div><div class='del'>-      BZFILE* b</div><div class='del'>-   );</div><div class='del'>-</div><div class='del'>-BZ_EXTERN const char * BZ_API(BZ2_bzerror) (</div><div class='del'>-      BZFILE *b, </div><div class='del'>-      int    *errnum</div><div class='del'>-   );</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                           bzlib.h ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/bzlib_private.h b/mdk-stage1/bzlib/bzlib_private.h<br/>deleted file mode 100644<br/>index fb51c7a1d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/bzlib_private.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/bzlib_private.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,530 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Private header file for the library.                  ---*/</div><div class='del'>-/*---                                       bzlib_private.h ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef _BZLIB_PRIVATE_H</div><div class='del'>-#define _BZLIB_PRIVATE_H</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "bzlib.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- General stuff. --*/</div><div class='del'>-</div><div class='del'>-#define BZ_VERSION  "1.0.1, 23-June-2000"</div><div class='del'>-</div><div class='del'>-typedef char            Char;</div><div class='del'>-typedef unsigned char   Bool;</div><div class='del'>-typedef unsigned char   UChar;</div><div class='del'>-typedef int             Int32;</div><div class='del'>-typedef unsigned int    UInt32;</div><div class='del'>-typedef short           Int16;</div><div class='del'>-typedef unsigned short  UInt16;</div><div class='del'>-</div><div class='del'>-#define True  ((Bool)1)</div><div class='del'>-#define False ((Bool)0)</div><div class='del'>-</div><div class='del'>-#ifndef __GNUC__</div><div class='del'>-#define __inline__  /* */</div><div class='del'>-#endif </div><div class='del'>-</div><div class='del'>-#ifndef BZ_NO_STDIO</div><div class='del'>-extern void BZ2_bz__AssertH__fail ( int errcode );</div><div class='del'>-#define AssertH(cond,errcode) \</div><div class='del'>-   { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); }</div><div class='del'>-#if BZ_DEBUG</div><div class='del'>-#define AssertD(cond,msg) \</div><div class='del'>-   { if (!(cond)) {       \</div><div class='del'>-      fprintf ( stderr,   \</div><div class='del'>-        "\n\nlibbzip2(debug build): internal error\n\t%s\n", msg );\</div><div class='del'>-      exit(1); \</div><div class='del'>-   }}</div><div class='del'>-#else</div><div class='del'>-#define AssertD(cond,msg) /* */</div><div class='del'>-#endif</div><div class='del'>-#define VPrintf0(zf) \</div><div class='del'>-   fprintf(stderr,zf)</div><div class='del'>-#define VPrintf1(zf,za1) \</div><div class='del'>-   fprintf(stderr,zf,za1)</div><div class='del'>-#define VPrintf2(zf,za1,za2) \</div><div class='del'>-   fprintf(stderr,zf,za1,za2)</div><div class='del'>-#define VPrintf3(zf,za1,za2,za3) \</div><div class='del'>-   fprintf(stderr,zf,za1,za2,za3)</div><div class='del'>-#define VPrintf4(zf,za1,za2,za3,za4) \</div><div class='del'>-   fprintf(stderr,zf,za1,za2,za3,za4)</div><div class='del'>-#define VPrintf5(zf,za1,za2,za3,za4,za5) \</div><div class='del'>-   fprintf(stderr,zf,za1,za2,za3,za4,za5)</div><div class='del'>-#else</div><div class='del'>-extern void bz_internal_error ( int errcode );</div><div class='del'>-#define AssertH(cond,errcode) \</div><div class='del'>-   { if (!(cond)) bz_internal_error ( errcode ); }</div><div class='del'>-#define AssertD(cond,msg) /* */</div><div class='del'>-#define VPrintf0(zf) /* */</div><div class='del'>-#define VPrintf1(zf,za1) /* */</div><div class='del'>-#define VPrintf2(zf,za1,za2) /* */</div><div class='del'>-#define VPrintf3(zf,za1,za2,za3) /* */</div><div class='del'>-#define VPrintf4(zf,za1,za2,za3,za4) /* */</div><div class='del'>-#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define BZALLOC(nnn) (strm-&gt;bzalloc)(strm-&gt;opaque,(nnn),1)</div><div class='del'>-#define BZFREE(ppp)  (strm-&gt;bzfree)(strm-&gt;opaque,(ppp))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Constants for the back end. --*/</div><div class='del'>-</div><div class='del'>-#define BZ_MAX_ALPHA_SIZE 258</div><div class='del'>-#define BZ_MAX_CODE_LEN    23</div><div class='del'>-</div><div class='del'>-#define BZ_RUNA 0</div><div class='del'>-#define BZ_RUNB 1</div><div class='del'>-</div><div class='del'>-#define BZ_N_GROUPS 6</div><div class='del'>-#define BZ_G_SIZE   50</div><div class='del'>-#define BZ_N_ITERS  4</div><div class='del'>-</div><div class='del'>-#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Stuff for randomising repetitive blocks. --*/</div><div class='del'>-</div><div class='del'>-extern Int32 BZ2_rNums[512];</div><div class='del'>-</div><div class='del'>-#define BZ_RAND_DECLS                          \</div><div class='del'>-   Int32 rNToGo;                               \</div><div class='del'>-   Int32 rTPos                                 \</div><div class='del'>-</div><div class='del'>-#define BZ_RAND_INIT_MASK                      \</div><div class='del'>-   s-&gt;rNToGo = 0;                              \</div><div class='del'>-   s-&gt;rTPos  = 0                               \</div><div class='del'>-</div><div class='del'>-#define BZ_RAND_MASK ((s-&gt;rNToGo == 1) ? 1 : 0)</div><div class='del'>-</div><div class='del'>-#define BZ_RAND_UPD_MASK                       \</div><div class='del'>-   if (s-&gt;rNToGo == 0) {                       \</div><div class='del'>-      s-&gt;rNToGo = BZ2_rNums[s-&gt;rTPos];         \</div><div class='del'>-      s-&gt;rTPos++;                              \</div><div class='del'>-      if (s-&gt;rTPos == 512) s-&gt;rTPos = 0;       \</div><div class='del'>-   }                                           \</div><div class='del'>-   s-&gt;rNToGo--;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Stuff for doing CRCs. --*/</div><div class='del'>-</div><div class='del'>-extern UInt32 BZ2_crc32Table[256];</div><div class='del'>-</div><div class='del'>-#define BZ_INITIALISE_CRC(crcVar)              \</div><div class='del'>-{                                              \</div><div class='del'>-   crcVar = 0xffffffffL;                       \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define BZ_FINALISE_CRC(crcVar)                \</div><div class='del'>-{                                              \</div><div class='del'>-   crcVar = ~(crcVar);                         \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define BZ_UPDATE_CRC(crcVar,cha)              \</div><div class='del'>-{                                              \</div><div class='del'>-   crcVar = (crcVar &lt;&lt; 8) ^                    \</div><div class='del'>-            BZ2_crc32Table[(crcVar &gt;&gt; 24) ^    \</div><div class='del'>-                           ((UChar)cha)];      \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- States and modes for compression. --*/</div><div class='del'>-</div><div class='del'>-#define BZ_M_IDLE      1</div><div class='del'>-#define BZ_M_RUNNING   2</div><div class='del'>-#define BZ_M_FLUSHING  3</div><div class='del'>-#define BZ_M_FINISHING 4</div><div class='del'>-</div><div class='del'>-#define BZ_S_OUTPUT    1</div><div class='del'>-#define BZ_S_INPUT     2</div><div class='del'>-</div><div class='del'>-#define BZ_N_RADIX 2</div><div class='del'>-#define BZ_N_QSORT 12</div><div class='del'>-#define BZ_N_SHELL 18</div><div class='del'>-#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Structure holding all the compression-side stuff. --*/</div><div class='del'>-</div><div class='del'>-typedef</div><div class='del'>-   struct {</div><div class='del'>-      /* pointer back to the struct bz_stream */</div><div class='del'>-      bz_stream* strm;</div><div class='del'>-</div><div class='del'>-      /* mode this stream is in, and whether inputting */</div><div class='del'>-      /* or outputting data */</div><div class='del'>-      Int32    mode;</div><div class='del'>-      Int32    state;</div><div class='del'>-</div><div class='del'>-      /* remembers avail_in when flush/finish requested */</div><div class='del'>-      UInt32   avail_in_expect;</div><div class='del'>-</div><div class='del'>-      /* for doing the block sorting */</div><div class='del'>-      UInt32*  arr1;</div><div class='del'>-      UInt32*  arr2;</div><div class='del'>-      UInt32*  ftab;</div><div class='del'>-      Int32    origPtr;</div><div class='del'>-</div><div class='del'>-      /* aliases for arr1 and arr2 */</div><div class='del'>-      UInt32*  ptr;</div><div class='del'>-      UChar*   block;</div><div class='del'>-      UInt16*  mtfv;</div><div class='del'>-      UChar*   zbits;</div><div class='del'>-</div><div class='del'>-      /* for deciding when to use the fallback sorting algorithm */</div><div class='del'>-      Int32    workFactor;</div><div class='del'>-</div><div class='del'>-      /* run-length-encoding of the input */</div><div class='del'>-      UInt32   state_in_ch;</div><div class='del'>-      Int32    state_in_len;</div><div class='del'>-      BZ_RAND_DECLS;</div><div class='del'>-</div><div class='del'>-      /* input and output limits and current posns */</div><div class='del'>-      Int32    nblock;</div><div class='del'>-      Int32    nblockMAX;</div><div class='del'>-      Int32    numZ;</div><div class='del'>-      Int32    state_out_pos;</div><div class='del'>-</div><div class='del'>-      /* map of bytes used in block */</div><div class='del'>-      Int32    nInUse;</div><div class='del'>-      Bool     inUse[256];</div><div class='del'>-      UChar    unseqToSeq[256];</div><div class='del'>-</div><div class='del'>-      /* the buffer for bit stream creation */</div><div class='del'>-      UInt32   bsBuff;</div><div class='del'>-      Int32    bsLive;</div><div class='del'>-</div><div class='del'>-      /* block and combined CRCs */</div><div class='del'>-      UInt32   blockCRC;</div><div class='del'>-      UInt32   combinedCRC;</div><div class='del'>-</div><div class='del'>-      /* misc administratium */</div><div class='del'>-      Int32    verbosity;</div><div class='del'>-      Int32    blockNo;</div><div class='del'>-      Int32    blockSize100k;</div><div class='del'>-</div><div class='del'>-      /* stuff for coding the MTF values */</div><div class='del'>-      Int32    nMTF;</div><div class='del'>-      Int32    mtfFreq    [BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      UChar    selector   [BZ_MAX_SELECTORS];</div><div class='del'>-      UChar    selectorMtf[BZ_MAX_SELECTORS];</div><div class='del'>-</div><div class='del'>-      UChar    len     [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      Int32    code    [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      Int32    rfreq   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      /* second dimension: only 3 needed; 4 makes index calculations faster */</div><div class='del'>-      UInt32   len_pack[BZ_MAX_ALPHA_SIZE][4];</div><div class='del'>-</div><div class='del'>-   }</div><div class='del'>-   EState;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- externs for compression. --*/</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_blockSort ( EState* );</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_compressBlock ( EState*, Bool );</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_bsInitWrite ( EState* );</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- states for decompression. --*/</div><div class='del'>-</div><div class='del'>-#define BZ_X_IDLE        1</div><div class='del'>-#define BZ_X_OUTPUT      2</div><div class='del'>-</div><div class='del'>-#define BZ_X_MAGIC_1     10</div><div class='del'>-#define BZ_X_MAGIC_2     11</div><div class='del'>-#define BZ_X_MAGIC_3     12</div><div class='del'>-#define BZ_X_MAGIC_4     13</div><div class='del'>-#define BZ_X_BLKHDR_1    14</div><div class='del'>-#define BZ_X_BLKHDR_2    15</div><div class='del'>-#define BZ_X_BLKHDR_3    16</div><div class='del'>-#define BZ_X_BLKHDR_4    17</div><div class='del'>-#define BZ_X_BLKHDR_5    18</div><div class='del'>-#define BZ_X_BLKHDR_6    19</div><div class='del'>-#define BZ_X_BCRC_1      20</div><div class='del'>-#define BZ_X_BCRC_2      21</div><div class='del'>-#define BZ_X_BCRC_3      22</div><div class='del'>-#define BZ_X_BCRC_4      23</div><div class='del'>-#define BZ_X_RANDBIT     24</div><div class='del'>-#define BZ_X_ORIGPTR_1   25</div><div class='del'>-#define BZ_X_ORIGPTR_2   26</div><div class='del'>-#define BZ_X_ORIGPTR_3   27</div><div class='del'>-#define BZ_X_MAPPING_1   28</div><div class='del'>-#define BZ_X_MAPPING_2   29</div><div class='del'>-#define BZ_X_SELECTOR_1  30</div><div class='del'>-#define BZ_X_SELECTOR_2  31</div><div class='del'>-#define BZ_X_SELECTOR_3  32</div><div class='del'>-#define BZ_X_CODING_1    33</div><div class='del'>-#define BZ_X_CODING_2    34</div><div class='del'>-#define BZ_X_CODING_3    35</div><div class='del'>-#define BZ_X_MTF_1       36</div><div class='del'>-#define BZ_X_MTF_2       37</div><div class='del'>-#define BZ_X_MTF_3       38</div><div class='del'>-#define BZ_X_MTF_4       39</div><div class='del'>-#define BZ_X_MTF_5       40</div><div class='del'>-#define BZ_X_MTF_6       41</div><div class='del'>-#define BZ_X_ENDHDR_2    42</div><div class='del'>-#define BZ_X_ENDHDR_3    43</div><div class='del'>-#define BZ_X_ENDHDR_4    44</div><div class='del'>-#define BZ_X_ENDHDR_5    45</div><div class='del'>-#define BZ_X_ENDHDR_6    46</div><div class='del'>-#define BZ_X_CCRC_1      47</div><div class='del'>-#define BZ_X_CCRC_2      48</div><div class='del'>-#define BZ_X_CCRC_3      49</div><div class='del'>-#define BZ_X_CCRC_4      50</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Constants for the fast MTF decoder. --*/</div><div class='del'>-</div><div class='del'>-#define MTFA_SIZE 4096</div><div class='del'>-#define MTFL_SIZE 16</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Structure holding all the decompression-side stuff. --*/</div><div class='del'>-</div><div class='del'>-typedef</div><div class='del'>-   struct {</div><div class='del'>-      /* pointer back to the struct bz_stream */</div><div class='del'>-      bz_stream* strm;</div><div class='del'>-</div><div class='del'>-      /* state indicator for this stream */</div><div class='del'>-      Int32    state;</div><div class='del'>-</div><div class='del'>-      /* for doing the final run-length decoding */</div><div class='del'>-      UChar    state_out_ch;</div><div class='del'>-      Int32    state_out_len;</div><div class='del'>-      Bool     blockRandomised;</div><div class='del'>-      BZ_RAND_DECLS;</div><div class='del'>-</div><div class='del'>-      /* the buffer for bit stream reading */</div><div class='del'>-      UInt32   bsBuff;</div><div class='del'>-      Int32    bsLive;</div><div class='del'>-</div><div class='del'>-      /* misc administratium */</div><div class='del'>-      Int32    blockSize100k;</div><div class='del'>-      Bool     smallDecompress;</div><div class='del'>-      Int32    currBlockNo;</div><div class='del'>-      Int32    verbosity;</div><div class='del'>-</div><div class='del'>-      /* for undoing the Burrows-Wheeler transform */</div><div class='del'>-      Int32    origPtr;</div><div class='del'>-      UInt32   tPos;</div><div class='del'>-      Int32    k0;</div><div class='del'>-      Int32    unzftab[256];</div><div class='del'>-      Int32    nblock_used;</div><div class='del'>-      Int32    cftab[257];</div><div class='del'>-      Int32    cftabCopy[257];</div><div class='del'>-</div><div class='del'>-      /* for undoing the Burrows-Wheeler transform (FAST) */</div><div class='del'>-      UInt32   *tt;</div><div class='del'>-</div><div class='del'>-      /* for undoing the Burrows-Wheeler transform (SMALL) */</div><div class='del'>-      UInt16   *ll16;</div><div class='del'>-      UChar    *ll4;</div><div class='del'>-</div><div class='del'>-      /* stored and calculated CRCs */</div><div class='del'>-      UInt32   storedBlockCRC;</div><div class='del'>-      UInt32   storedCombinedCRC;</div><div class='del'>-      UInt32   calculatedBlockCRC;</div><div class='del'>-      UInt32   calculatedCombinedCRC;</div><div class='del'>-</div><div class='del'>-      /* map of bytes used in block */</div><div class='del'>-      Int32    nInUse;</div><div class='del'>-      Bool     inUse[256];</div><div class='del'>-      Bool     inUse16[16];</div><div class='del'>-      UChar    seqToUnseq[256];</div><div class='del'>-</div><div class='del'>-      /* for decoding the MTF values */</div><div class='del'>-      UChar    mtfa   [MTFA_SIZE];</div><div class='del'>-      Int32    mtfbase[256 / MTFL_SIZE];</div><div class='del'>-      UChar    selector   [BZ_MAX_SELECTORS];</div><div class='del'>-      UChar    selectorMtf[BZ_MAX_SELECTORS];</div><div class='del'>-      UChar    len  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-</div><div class='del'>-      Int32    limit  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      Int32    base   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      Int32    perm   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-      Int32    minLens[BZ_N_GROUPS];</div><div class='del'>-</div><div class='del'>-      /* save area for scalars in the main decompress code */</div><div class='del'>-      Int32    save_i;</div><div class='del'>-      Int32    save_j;</div><div class='del'>-      Int32    save_t;</div><div class='del'>-      Int32    save_alphaSize;</div><div class='del'>-      Int32    save_nGroups;</div><div class='del'>-      Int32    save_nSelectors;</div><div class='del'>-      Int32    save_EOB;</div><div class='del'>-      Int32    save_groupNo;</div><div class='del'>-      Int32    save_groupPos;</div><div class='del'>-      Int32    save_nextSym;</div><div class='del'>-      Int32    save_nblockMAX;</div><div class='del'>-      Int32    save_nblock;</div><div class='del'>-      Int32    save_es;</div><div class='del'>-      Int32    save_N;</div><div class='del'>-      Int32    save_curr;</div><div class='del'>-      Int32    save_zt;</div><div class='del'>-      Int32    save_zn; </div><div class='del'>-      Int32    save_zvec;</div><div class='del'>-      Int32    save_zj;</div><div class='del'>-      Int32    save_gSel;</div><div class='del'>-      Int32    save_gMinlen;</div><div class='del'>-      Int32*   save_gLimit;</div><div class='del'>-      Int32*   save_gBase;</div><div class='del'>-      Int32*   save_gPerm;</div><div class='del'>-</div><div class='del'>-   }</div><div class='del'>-   DState;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- Macros for decompression. --*/</div><div class='del'>-</div><div class='del'>-#define BZ_GET_FAST(cccc)                     \</div><div class='del'>-    s-&gt;tPos = s-&gt;tt[s-&gt;tPos];                 \</div><div class='del'>-    cccc = (UChar)(s-&gt;tPos &amp; 0xff);           \</div><div class='del'>-    s-&gt;tPos &gt;&gt;= 8;</div><div class='del'>-</div><div class='del'>-#define BZ_GET_FAST_C(cccc)                   \</div><div class='del'>-    c_tPos = c_tt[c_tPos];                    \</div><div class='del'>-    cccc = (UChar)(c_tPos &amp; 0xff);            \</div><div class='del'>-    c_tPos &gt;&gt;= 8;</div><div class='del'>-</div><div class='del'>-#define SET_LL4(i,n)                                          \</div><div class='del'>-   { if (((i) &amp; 0x1) == 0)                                    \</div><div class='del'>-        s-&gt;ll4[(i) &gt;&gt; 1] = (s-&gt;ll4[(i) &gt;&gt; 1] &amp; 0xf0) | (n); else    \</div><div class='del'>-        s-&gt;ll4[(i) &gt;&gt; 1] = (s-&gt;ll4[(i) &gt;&gt; 1] &amp; 0x0f) | ((n) &lt;&lt; 4);  \</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-#define GET_LL4(i)                             \</div><div class='del'>-   ((((UInt32)(s-&gt;ll4[(i) &gt;&gt; 1])) &gt;&gt; (((i) &lt;&lt; 2) &amp; 0x4)) &amp; 0xF)</div><div class='del'>-</div><div class='del'>-#define SET_LL(i,n)                          \</div><div class='del'>-   { s-&gt;ll16[i] = (UInt16)(n &amp; 0x0000ffff);  \</div><div class='del'>-     SET_LL4(i, n &gt;&gt; 16);                    \</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-#define GET_LL(i) \</div><div class='del'>-   (((UInt32)s-&gt;ll16[i]) | (GET_LL4(i) &lt;&lt; 16))</div><div class='del'>-</div><div class='del'>-#define BZ_GET_SMALL(cccc)                            \</div><div class='del'>-      cccc = BZ2_indexIntoF ( s-&gt;tPos, s-&gt;cftab );    \</div><div class='del'>-      s-&gt;tPos = GET_LL(s-&gt;tPos);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- externs for decompression. --*/</div><div class='del'>-</div><div class='del'>-extern Int32 </div><div class='del'>-BZ2_indexIntoF ( Int32, Int32* );</div><div class='del'>-</div><div class='del'>-extern Int32 </div><div class='del'>-BZ2_decompress ( DState* );</div><div class='del'>-</div><div class='del'>-extern void </div><div class='del'>-BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,</div><div class='del'>-                           Int32,  Int32, Int32 );</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/</div><div class='del'>-</div><div class='del'>-#ifdef BZ_NO_STDIO</div><div class='del'>-#ifndef NULL</div><div class='del'>-#define NULL 0</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                   bzlib_private.h ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/compress.c b/mdk-stage1/bzlib/compress.c<br/>deleted file mode 100644<br/>index 58d5abe7c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/compress.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/compress.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,720 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Compression machinery (not incl block sorting)        ---*/</div><div class='del'>-/*---                                            compress.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-   CHANGES</div><div class='del'>-   ~~~~~~~</div><div class='del'>-   0.9.0 -- original version.</div><div class='del'>-</div><div class='del'>-   0.9.0a/b -- no changes in this file.</div><div class='del'>-</div><div class='del'>-   0.9.0c</div><div class='del'>-      * changed setting of nGroups in sendMTFValues() so as to </div><div class='del'>-        do a bit better on small files</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- Bit stream I/O                              ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ2_bsInitWrite ( EState* s )</div><div class='del'>-{</div><div class='del'>-   s-&gt;bsLive = 0;</div><div class='del'>-   s-&gt;bsBuff = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void bsFinishWrite ( EState* s )</div><div class='del'>-{</div><div class='del'>-   while (s-&gt;bsLive &gt; 0) {</div><div class='del'>-      s-&gt;zbits[s-&gt;numZ] = (UChar)(s-&gt;bsBuff &gt;&gt; 24);</div><div class='del'>-      s-&gt;numZ++;</div><div class='del'>-      s-&gt;bsBuff &lt;&lt;= 8;</div><div class='del'>-      s-&gt;bsLive -= 8;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define bsNEEDW(nz)                           \</div><div class='del'>-{                                             \</div><div class='del'>-   while (s-&gt;bsLive &gt;= 8) {                   \</div><div class='del'>-      s-&gt;zbits[s-&gt;numZ]                       \</div><div class='del'>-         = (UChar)(s-&gt;bsBuff &gt;&gt; 24);          \</div><div class='del'>-      s-&gt;numZ++;                              \</div><div class='del'>-      s-&gt;bsBuff &lt;&lt;= 8;                        \</div><div class='del'>-      s-&gt;bsLive -= 8;                         \</div><div class='del'>-   }                                          \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-__inline__</div><div class='del'>-void bsW ( EState* s, Int32 n, UInt32 v )</div><div class='del'>-{</div><div class='del'>-   bsNEEDW ( n );</div><div class='del'>-   s-&gt;bsBuff |= (v &lt;&lt; (32 - s-&gt;bsLive - n));</div><div class='del'>-   s-&gt;bsLive += n;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void bsPutUInt32 ( EState* s, UInt32 u )</div><div class='del'>-{</div><div class='del'>-   bsW ( s, 8, (u &gt;&gt; 24) &amp; 0xffL );</div><div class='del'>-   bsW ( s, 8, (u &gt;&gt; 16) &amp; 0xffL );</div><div class='del'>-   bsW ( s, 8, (u &gt;&gt;  8) &amp; 0xffL );</div><div class='del'>-   bsW ( s, 8,  u        &amp; 0xffL );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void bsPutUChar ( EState* s, UChar c )</div><div class='del'>-{</div><div class='del'>-   bsW( s, 8, (UInt32)c );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-/*--- The back end proper                         ---*/</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void makeMaps_e ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Int32 i;</div><div class='del'>-   s-&gt;nInUse = 0;</div><div class='del'>-   for (i = 0; i &lt; 256; i++)</div><div class='del'>-      if (s-&gt;inUse[i]) {</div><div class='del'>-         s-&gt;unseqToSeq[i] = s-&gt;nInUse;</div><div class='del'>-         s-&gt;nInUse++;</div><div class='del'>-      }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void generateMTFValues ( EState* s )</div><div class='del'>-{</div><div class='del'>-   UChar   yy[256];</div><div class='del'>-   Int32   i, j;</div><div class='del'>-   Int32   zPend;</div><div class='del'>-   Int32   wr;</div><div class='del'>-   Int32   EOB;</div><div class='del'>-</div><div class='del'>-   /* </div><div class='del'>-      After sorting (eg, here),</div><div class='del'>-         s-&gt;arr1 [ 0 .. s-&gt;nblock-1 ] holds sorted order,</div><div class='del'>-         and</div><div class='del'>-         ((UChar*)s-&gt;arr2) [ 0 .. s-&gt;nblock-1 ] </div><div class='del'>-         holds the original block data.</div><div class='del'>-</div><div class='del'>-      The first thing to do is generate the MTF values,</div><div class='del'>-      and put them in</div><div class='del'>-         ((UInt16*)s-&gt;arr1) [ 0 .. s-&gt;nblock-1 ].</div><div class='del'>-      Because there are strictly fewer or equal MTF values</div><div class='del'>-      than block values, ptr values in this area are overwritten</div><div class='del'>-      with MTF values only when they are no longer needed.</div><div class='del'>-</div><div class='del'>-      The final compressed bitstream is generated into the</div><div class='del'>-      area starting at</div><div class='del'>-         (UChar*) (&amp;((UChar*)s-&gt;arr2)[s-&gt;nblock])</div><div class='del'>-</div><div class='del'>-      These storage aliases are set up in bzCompressInit(),</div><div class='del'>-      except for the last one, which is arranged in </div><div class='del'>-      compressBlock().</div><div class='del'>-   */</div><div class='del'>-   UInt32* ptr   = s-&gt;ptr;</div><div class='del'>-   UChar* block  = s-&gt;block;</div><div class='del'>-   UInt16* mtfv  = s-&gt;mtfv;</div><div class='del'>-</div><div class='del'>-   makeMaps_e ( s );</div><div class='del'>-   EOB = s-&gt;nInUse+1;</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt;= EOB; i++) s-&gt;mtfFreq[i] = 0;</div><div class='del'>-</div><div class='del'>-   wr = 0;</div><div class='del'>-   zPend = 0;</div><div class='del'>-   for (i = 0; i &lt; s-&gt;nInUse; i++) yy[i] = (UChar) i;</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt; s-&gt;nblock; i++) {</div><div class='del'>-      UChar ll_i;</div><div class='del'>-      AssertD ( wr &lt;= i, "generateMTFValues(1)" );</div><div class='del'>-      j = ptr[i]-1; if (j &lt; 0) j += s-&gt;nblock;</div><div class='del'>-      ll_i = s-&gt;unseqToSeq[block[j]];</div><div class='del'>-      AssertD ( ll_i &lt; s-&gt;nInUse, "generateMTFValues(2a)" );</div><div class='del'>-</div><div class='del'>-      if (yy[0] == ll_i) { </div><div class='del'>-         zPend++;</div><div class='del'>-      } else {</div><div class='del'>-</div><div class='del'>-         if (zPend &gt; 0) {</div><div class='del'>-            zPend--;</div><div class='del'>-            while (True) {</div><div class='del'>-               if (zPend &amp; 1) {</div><div class='del'>-                  mtfv[wr] = BZ_RUNB; wr++; </div><div class='del'>-                  s-&gt;mtfFreq[BZ_RUNB]++; </div><div class='del'>-               } else {</div><div class='del'>-                  mtfv[wr] = BZ_RUNA; wr++; </div><div class='del'>-                  s-&gt;mtfFreq[BZ_RUNA]++; </div><div class='del'>-               }</div><div class='del'>-               if (zPend &lt; 2) break;</div><div class='del'>-               zPend = (zPend - 2) / 2;</div><div class='del'>-            };</div><div class='del'>-            zPend = 0;</div><div class='del'>-         }</div><div class='del'>-         {</div><div class='del'>-            register UChar  rtmp;</div><div class='del'>-            register UChar* ryy_j;</div><div class='del'>-            register UChar  rll_i;</div><div class='del'>-            rtmp  = yy[1];</div><div class='del'>-            yy[1] = yy[0];</div><div class='del'>-            ryy_j = &amp;(yy[1]);</div><div class='del'>-            rll_i = ll_i;</div><div class='del'>-            while ( rll_i != rtmp ) {</div><div class='del'>-               register UChar rtmp2;</div><div class='del'>-               ryy_j++;</div><div class='del'>-               rtmp2  = rtmp;</div><div class='del'>-               rtmp   = *ryy_j;</div><div class='del'>-               *ryy_j = rtmp2;</div><div class='del'>-            };</div><div class='del'>-            yy[0] = rtmp;</div><div class='del'>-            j = ryy_j - &amp;(yy[0]);</div><div class='del'>-            mtfv[wr] = j+1; wr++; s-&gt;mtfFreq[j+1]++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (zPend &gt; 0) {</div><div class='del'>-      zPend--;</div><div class='del'>-      while (True) {</div><div class='del'>-         if (zPend &amp; 1) {</div><div class='del'>-            mtfv[wr] = BZ_RUNB; wr++; </div><div class='del'>-            s-&gt;mtfFreq[BZ_RUNB]++; </div><div class='del'>-         } else {</div><div class='del'>-            mtfv[wr] = BZ_RUNA; wr++; </div><div class='del'>-            s-&gt;mtfFreq[BZ_RUNA]++; </div><div class='del'>-         }</div><div class='del'>-         if (zPend &lt; 2) break;</div><div class='del'>-         zPend = (zPend - 2) / 2;</div><div class='del'>-      };</div><div class='del'>-      zPend = 0;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   mtfv[wr] = EOB; wr++; s-&gt;mtfFreq[EOB]++;</div><div class='del'>-</div><div class='del'>-   s-&gt;nMTF = wr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define BZ_LESSER_ICOST  0</div><div class='del'>-#define BZ_GREATER_ICOST 15</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void sendMTFValues ( EState* s )</div><div class='del'>-{</div><div class='del'>-   Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;</div><div class='del'>-   Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;</div><div class='del'>-   Int32 nGroups, nBytes;</div><div class='del'>-</div><div class='del'>-   /*--</div><div class='del'>-   UChar  len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-   is a global since the decoder also needs it.</div><div class='del'>-</div><div class='del'>-   Int32  code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-   Int32  rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];</div><div class='del'>-   are also globals only used in this proc.</div><div class='del'>-   Made global to keep stack frame size small.</div><div class='del'>-   --*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-   UInt16 cost[BZ_N_GROUPS];</div><div class='del'>-   Int32  fave[BZ_N_GROUPS];</div><div class='del'>-</div><div class='del'>-   UInt16* mtfv = s-&gt;mtfv;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-      VPrintf3( "      %d in block, %d after MTF &amp; 1-2 coding, "</div><div class='del'>-                "%d+2 syms in use\n", </div><div class='del'>-                s-&gt;nblock, s-&gt;nMTF, s-&gt;nInUse );</div><div class='del'>-</div><div class='del'>-   alphaSize = s-&gt;nInUse+2;</div><div class='del'>-   for (t = 0; t &lt; BZ_N_GROUPS; t++)</div><div class='del'>-      for (v = 0; v &lt; alphaSize; v++)</div><div class='del'>-         s-&gt;len[t][v] = BZ_GREATER_ICOST;</div><div class='del'>-</div><div class='del'>-   /*--- Decide how many coding tables to use ---*/</div><div class='del'>-   AssertH ( s-&gt;nMTF &gt; 0, 3001 );</div><div class='del'>-   if (s-&gt;nMTF &lt; 200)  nGroups = 2; else</div><div class='del'>-   if (s-&gt;nMTF &lt; 600)  nGroups = 3; else</div><div class='del'>-   if (s-&gt;nMTF &lt; 1200) nGroups = 4; else</div><div class='del'>-   if (s-&gt;nMTF &lt; 2400) nGroups = 5; else</div><div class='del'>-                       nGroups = 6;</div><div class='del'>-</div><div class='del'>-   /*--- Generate an initial set of coding tables ---*/</div><div class='del'>-   { </div><div class='del'>-      Int32 nPart, remF, tFreq, aFreq;</div><div class='del'>-</div><div class='del'>-      nPart = nGroups;</div><div class='del'>-      remF  = s-&gt;nMTF;</div><div class='del'>-      gs = 0;</div><div class='del'>-      while (nPart &gt; 0) {</div><div class='del'>-         tFreq = remF / nPart;</div><div class='del'>-         ge = gs-1;</div><div class='del'>-         aFreq = 0;</div><div class='del'>-         while (aFreq &lt; tFreq &amp;&amp; ge &lt; alphaSize-1) {</div><div class='del'>-            ge++;</div><div class='del'>-            aFreq += s-&gt;mtfFreq[ge];</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         if (ge &gt; gs </div><div class='del'>-             &amp;&amp; nPart != nGroups &amp;&amp; nPart != 1 </div><div class='del'>-             &amp;&amp; ((nGroups-nPart) % 2 == 1)) {</div><div class='del'>-            aFreq -= s-&gt;mtfFreq[ge];</div><div class='del'>-            ge--;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-            VPrintf5( "      initial group %d, [%d .. %d], "</div><div class='del'>-                      "has %d syms (%4.1f%%)\n",</div><div class='del'>-                      nPart, gs, ge, aFreq, </div><div class='del'>-                      (100.0 * (float)aFreq) / (float)(s-&gt;nMTF) );</div><div class='del'>- </div><div class='del'>-         for (v = 0; v &lt; alphaSize; v++)</div><div class='del'>-            if (v &gt;= gs &amp;&amp; v &lt;= ge) </div><div class='del'>-               s-&gt;len[nPart-1][v] = BZ_LESSER_ICOST; else</div><div class='del'>-               s-&gt;len[nPart-1][v] = BZ_GREATER_ICOST;</div><div class='del'>- </div><div class='del'>-         nPart--;</div><div class='del'>-         gs = ge+1;</div><div class='del'>-         remF -= aFreq;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*--- </div><div class='del'>-      Iterate up to BZ_N_ITERS times to improve the tables.</div><div class='del'>-   ---*/</div><div class='del'>-   for (iter = 0; iter &lt; BZ_N_ITERS; iter++) {</div><div class='del'>-</div><div class='del'>-      for (t = 0; t &lt; nGroups; t++) fave[t] = 0;</div><div class='del'>-</div><div class='del'>-      for (t = 0; t &lt; nGroups; t++)</div><div class='del'>-         for (v = 0; v &lt; alphaSize; v++)</div><div class='del'>-            s-&gt;rfreq[t][v] = 0;</div><div class='del'>-</div><div class='del'>-      /*---</div><div class='del'>-        Set up an auxiliary length table which is used to fast-track</div><div class='del'>-	the common case (nGroups == 6). </div><div class='del'>-      ---*/</div><div class='del'>-      if (nGroups == 6) {</div><div class='del'>-         for (v = 0; v &lt; alphaSize; v++) {</div><div class='del'>-            s-&gt;len_pack[v][0] = (s-&gt;len[1][v] &lt;&lt; 16) | s-&gt;len[0][v];</div><div class='del'>-            s-&gt;len_pack[v][1] = (s-&gt;len[3][v] &lt;&lt; 16) | s-&gt;len[2][v];</div><div class='del'>-            s-&gt;len_pack[v][2] = (s-&gt;len[5][v] &lt;&lt; 16) | s-&gt;len[4][v];</div><div class='del'>-	 }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      nSelectors = 0;</div><div class='del'>-      totc = 0;</div><div class='del'>-      gs = 0;</div><div class='del'>-      while (True) {</div><div class='del'>-</div><div class='del'>-         /*--- Set group start &amp; end marks. --*/</div><div class='del'>-         if (gs &gt;= s-&gt;nMTF) break;</div><div class='del'>-         ge = gs + BZ_G_SIZE - 1; </div><div class='del'>-         if (ge &gt;= s-&gt;nMTF) ge = s-&gt;nMTF-1;</div><div class='del'>-</div><div class='del'>-         /*-- </div><div class='del'>-            Calculate the cost of this group as coded</div><div class='del'>-            by each of the coding tables.</div><div class='del'>-         --*/</div><div class='del'>-         for (t = 0; t &lt; nGroups; t++) cost[t] = 0;</div><div class='del'>-</div><div class='del'>-         if (nGroups == 6 &amp;&amp; 50 == ge-gs+1) {</div><div class='del'>-            /*--- fast track the common case ---*/</div><div class='del'>-            register UInt32 cost01, cost23, cost45;</div><div class='del'>-            register UInt16 icv;</div><div class='del'>-            cost01 = cost23 = cost45 = 0;</div><div class='del'>-</div><div class='del'>-#           define BZ_ITER(nn)                \</div><div class='del'>-               icv = mtfv[gs+(nn)];           \</div><div class='del'>-               cost01 += s-&gt;len_pack[icv][0]; \</div><div class='del'>-               cost23 += s-&gt;len_pack[icv][1]; \</div><div class='del'>-               cost45 += s-&gt;len_pack[icv][2]; \</div><div class='del'>-</div><div class='del'>-            BZ_ITER(0);  BZ_ITER(1);  BZ_ITER(2);  BZ_ITER(3);  BZ_ITER(4);</div><div class='del'>-            BZ_ITER(5);  BZ_ITER(6);  BZ_ITER(7);  BZ_ITER(8);  BZ_ITER(9);</div><div class='del'>-            BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);</div><div class='del'>-            BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);</div><div class='del'>-            BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);</div><div class='del'>-            BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);</div><div class='del'>-            BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);</div><div class='del'>-            BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);</div><div class='del'>-            BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);</div><div class='del'>-            BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);</div><div class='del'>-</div><div class='del'>-#           undef BZ_ITER</div><div class='del'>-</div><div class='del'>-            cost[0] = cost01 &amp; 0xffff; cost[1] = cost01 &gt;&gt; 16;</div><div class='del'>-            cost[2] = cost23 &amp; 0xffff; cost[3] = cost23 &gt;&gt; 16;</div><div class='del'>-            cost[4] = cost45 &amp; 0xffff; cost[5] = cost45 &gt;&gt; 16;</div><div class='del'>-</div><div class='del'>-         } else {</div><div class='del'>-	    /*--- slow version which correctly handles all situations ---*/</div><div class='del'>-            for (i = gs; i &lt;= ge; i++) { </div><div class='del'>-               UInt16 icv = mtfv[i];</div><div class='del'>-               for (t = 0; t &lt; nGroups; t++) cost[t] += s-&gt;len[t][icv];</div><div class='del'>-            }</div><div class='del'>-         }</div><div class='del'>- </div><div class='del'>-         /*-- </div><div class='del'>-            Find the coding table which is best for this group,</div><div class='del'>-            and record its identity in the selector table.</div><div class='del'>-         --*/</div><div class='del'>-         bc = 999999999; bt = -1;</div><div class='del'>-         for (t = 0; t &lt; nGroups; t++)</div><div class='del'>-            if (cost[t] &lt; bc) { bc = cost[t]; bt = t; };</div><div class='del'>-         totc += bc;</div><div class='del'>-         fave[bt]++;</div><div class='del'>-         s-&gt;selector[nSelectors] = bt;</div><div class='del'>-         nSelectors++;</div><div class='del'>-</div><div class='del'>-         /*-- </div><div class='del'>-            Increment the symbol frequencies for the selected table.</div><div class='del'>-          --*/</div><div class='del'>-         if (nGroups == 6 &amp;&amp; 50 == ge-gs+1) {</div><div class='del'>-            /*--- fast track the common case ---*/</div><div class='del'>-</div><div class='del'>-#           define BZ_ITUR(nn) s-&gt;rfreq[bt][ mtfv[gs+(nn)] ]++</div><div class='del'>-</div><div class='del'>-            BZ_ITUR(0);  BZ_ITUR(1);  BZ_ITUR(2);  BZ_ITUR(3);  BZ_ITUR(4);</div><div class='del'>-            BZ_ITUR(5);  BZ_ITUR(6);  BZ_ITUR(7);  BZ_ITUR(8);  BZ_ITUR(9);</div><div class='del'>-            BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);</div><div class='del'>-            BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);</div><div class='del'>-            BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);</div><div class='del'>-            BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);</div><div class='del'>-            BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);</div><div class='del'>-            BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);</div><div class='del'>-            BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);</div><div class='del'>-            BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);</div><div class='del'>-</div><div class='del'>-#           undef BZ_ITUR</div><div class='del'>-</div><div class='del'>-         } else {</div><div class='del'>-	    /*--- slow version which correctly handles all situations ---*/</div><div class='del'>-            for (i = gs; i &lt;= ge; i++)</div><div class='del'>-               s-&gt;rfreq[bt][ mtfv[i] ]++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         gs = ge+1;</div><div class='del'>-      }</div><div class='del'>-      if (s-&gt;verbosity &gt;= 3) {</div><div class='del'>-         VPrintf2 ( "      pass %d: size is %d, grp uses are ", </div><div class='del'>-                   iter+1, totc/8 );</div><div class='del'>-         for (t = 0; t &lt; nGroups; t++)</div><div class='del'>-            VPrintf1 ( "%d ", fave[t] );</div><div class='del'>-         VPrintf0 ( "\n" );</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /*--</div><div class='del'>-        Recompute the tables based on the accumulated frequencies.</div><div class='del'>-      --*/</div><div class='del'>-      for (t = 0; t &lt; nGroups; t++)</div><div class='del'>-         BZ2_hbMakeCodeLengths ( &amp;(s-&gt;len[t][0]), &amp;(s-&gt;rfreq[t][0]), </div><div class='del'>-                                 alphaSize, 20 );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-   AssertH( nGroups &lt; 8, 3002 );</div><div class='del'>-   AssertH( nSelectors &lt; 32768 &amp;&amp;</div><div class='del'>-            nSelectors &lt;= (2 + (900000 / BZ_G_SIZE)),</div><div class='del'>-            3003 );</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-   /*--- Compute MTF values for the selectors. ---*/</div><div class='del'>-   {</div><div class='del'>-      UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;</div><div class='del'>-      for (i = 0; i &lt; nGroups; i++) pos[i] = i;</div><div class='del'>-      for (i = 0; i &lt; nSelectors; i++) {</div><div class='del'>-         ll_i = s-&gt;selector[i];</div><div class='del'>-         j = 0;</div><div class='del'>-         tmp = pos[j];</div><div class='del'>-         while ( ll_i != tmp ) {</div><div class='del'>-            j++;</div><div class='del'>-            tmp2 = tmp;</div><div class='del'>-            tmp = pos[j];</div><div class='del'>-            pos[j] = tmp2;</div><div class='del'>-         };</div><div class='del'>-         pos[0] = tmp;</div><div class='del'>-         s-&gt;selectorMtf[i] = j;</div><div class='del'>-      }</div><div class='del'>-   };</div><div class='del'>-</div><div class='del'>-   /*--- Assign actual codes for the tables. --*/</div><div class='del'>-   for (t = 0; t &lt; nGroups; t++) {</div><div class='del'>-      minLen = 32;</div><div class='del'>-      maxLen = 0;</div><div class='del'>-      for (i = 0; i &lt; alphaSize; i++) {</div><div class='del'>-         if (s-&gt;len[t][i] &gt; maxLen) maxLen = s-&gt;len[t][i];</div><div class='del'>-         if (s-&gt;len[t][i] &lt; minLen) minLen = s-&gt;len[t][i];</div><div class='del'>-      }</div><div class='del'>-      AssertH ( !(maxLen &gt; 20), 3004 );</div><div class='del'>-      AssertH ( !(minLen &lt; 1),  3005 );</div><div class='del'>-      BZ2_hbAssignCodes ( &amp;(s-&gt;code[t][0]), &amp;(s-&gt;len[t][0]), </div><div class='del'>-                          minLen, maxLen, alphaSize );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*--- Transmit the mapping table. ---*/</div><div class='del'>-   { </div><div class='del'>-      Bool inUse16[16];</div><div class='del'>-      for (i = 0; i &lt; 16; i++) {</div><div class='del'>-          inUse16[i] = False;</div><div class='del'>-          for (j = 0; j &lt; 16; j++)</div><div class='del'>-             if (s-&gt;inUse[i * 16 + j]) inUse16[i] = True;</div><div class='del'>-      }</div><div class='del'>-     </div><div class='del'>-      nBytes = s-&gt;numZ;</div><div class='del'>-      for (i = 0; i &lt; 16; i++)</div><div class='del'>-         if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);</div><div class='del'>-</div><div class='del'>-      for (i = 0; i &lt; 16; i++)</div><div class='del'>-         if (inUse16[i])</div><div class='del'>-            for (j = 0; j &lt; 16; j++) {</div><div class='del'>-               if (s-&gt;inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);</div><div class='del'>-            }</div><div class='del'>-</div><div class='del'>-      if (s-&gt;verbosity &gt;= 3) </div><div class='del'>-         VPrintf1( "      bytes: mapping %d, ", s-&gt;numZ-nBytes );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*--- Now the selectors. ---*/</div><div class='del'>-   nBytes = s-&gt;numZ;</div><div class='del'>-   bsW ( s, 3, nGroups );</div><div class='del'>-   bsW ( s, 15, nSelectors );</div><div class='del'>-   for (i = 0; i &lt; nSelectors; i++) { </div><div class='del'>-      for (j = 0; j &lt; s-&gt;selectorMtf[i]; j++) bsW(s,1,1);</div><div class='del'>-      bsW(s,1,0);</div><div class='del'>-   }</div><div class='del'>-   if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-      VPrintf1( "selectors %d, ", s-&gt;numZ-nBytes );</div><div class='del'>-</div><div class='del'>-   /*--- Now the coding tables. ---*/</div><div class='del'>-   nBytes = s-&gt;numZ;</div><div class='del'>-</div><div class='del'>-   for (t = 0; t &lt; nGroups; t++) {</div><div class='del'>-      Int32 curr = s-&gt;len[t][0];</div><div class='del'>-      bsW ( s, 5, curr );</div><div class='del'>-      for (i = 0; i &lt; alphaSize; i++) {</div><div class='del'>-         while (curr &lt; s-&gt;len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };</div><div class='del'>-         while (curr &gt; s-&gt;len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };</div><div class='del'>-         bsW ( s, 1, 0 );</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-      VPrintf1 ( "code lengths %d, ", s-&gt;numZ-nBytes );</div><div class='del'>-</div><div class='del'>-   /*--- And finally, the block data proper ---*/</div><div class='del'>-   nBytes = s-&gt;numZ;</div><div class='del'>-   selCtr = 0;</div><div class='del'>-   gs = 0;</div><div class='del'>-   while (True) {</div><div class='del'>-      if (gs &gt;= s-&gt;nMTF) break;</div><div class='del'>-      ge = gs + BZ_G_SIZE - 1; </div><div class='del'>-      if (ge &gt;= s-&gt;nMTF) ge = s-&gt;nMTF-1;</div><div class='del'>-      AssertH ( s-&gt;selector[selCtr] &lt; nGroups, 3006 );</div><div class='del'>-</div><div class='del'>-      if (nGroups == 6 &amp;&amp; 50 == ge-gs+1) {</div><div class='del'>-            /*--- fast track the common case ---*/</div><div class='del'>-            UInt16 mtfv_i;</div><div class='del'>-            UChar* s_len_sel_selCtr </div><div class='del'>-               = &amp;(s-&gt;len[s-&gt;selector[selCtr]][0]);</div><div class='del'>-            Int32* s_code_sel_selCtr</div><div class='del'>-               = &amp;(s-&gt;code[s-&gt;selector[selCtr]][0]);</div><div class='del'>-</div><div class='del'>-#           define BZ_ITAH(nn)                      \</div><div class='del'>-               mtfv_i = mtfv[gs+(nn)];              \</div><div class='del'>-               bsW ( s,                             \</div><div class='del'>-                     s_len_sel_selCtr[mtfv_i],      \</div><div class='del'>-                     s_code_sel_selCtr[mtfv_i] )</div><div class='del'>-</div><div class='del'>-            BZ_ITAH(0);  BZ_ITAH(1);  BZ_ITAH(2);  BZ_ITAH(3);  BZ_ITAH(4);</div><div class='del'>-            BZ_ITAH(5);  BZ_ITAH(6);  BZ_ITAH(7);  BZ_ITAH(8);  BZ_ITAH(9);</div><div class='del'>-            BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);</div><div class='del'>-            BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);</div><div class='del'>-            BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);</div><div class='del'>-            BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);</div><div class='del'>-            BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);</div><div class='del'>-            BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);</div><div class='del'>-            BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);</div><div class='del'>-            BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);</div><div class='del'>-</div><div class='del'>-#           undef BZ_ITAH</div><div class='del'>-</div><div class='del'>-      } else {</div><div class='del'>-	 /*--- slow version which correctly handles all situations ---*/</div><div class='del'>-         for (i = gs; i &lt;= ge; i++) {</div><div class='del'>-            bsW ( s, </div><div class='del'>-                  s-&gt;len  [s-&gt;selector[selCtr]] [mtfv[i]],</div><div class='del'>-                  s-&gt;code [s-&gt;selector[selCtr]] [mtfv[i]] );</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-      gs = ge+1;</div><div class='del'>-      selCtr++;</div><div class='del'>-   }</div><div class='del'>-   AssertH( selCtr == nSelectors, 3007 );</div><div class='del'>-</div><div class='del'>-   if (s-&gt;verbosity &gt;= 3)</div><div class='del'>-      VPrintf1( "codes %d\n", s-&gt;numZ-nBytes );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ2_compressBlock ( EState* s, Bool is_last_block )</div><div class='del'>-{</div><div class='del'>-   if (s-&gt;nblock &gt; 0) {</div><div class='del'>-</div><div class='del'>-      BZ_FINALISE_CRC ( s-&gt;blockCRC );</div><div class='del'>-      s-&gt;combinedCRC = (s-&gt;combinedCRC &lt;&lt; 1) | (s-&gt;combinedCRC &gt;&gt; 31);</div><div class='del'>-      s-&gt;combinedCRC ^= s-&gt;blockCRC;</div><div class='del'>-      if (s-&gt;blockNo &gt; 1) s-&gt;numZ = 0;</div><div class='del'>-</div><div class='del'>-      if (s-&gt;verbosity &gt;= 2)</div><div class='del'>-         VPrintf4( "    block %d: crc = 0x%8x, "</div><div class='del'>-                   "combined CRC = 0x%8x, size = %d\n",</div><div class='del'>-                   s-&gt;blockNo, s-&gt;blockCRC, s-&gt;combinedCRC, s-&gt;nblock );</div><div class='del'>-</div><div class='del'>-      BZ2_blockSort ( s );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   s-&gt;zbits = (UChar*) (&amp;((UChar*)s-&gt;arr2)[s-&gt;nblock]);</div><div class='del'>-</div><div class='del'>-   /*-- If this is the first block, create the stream header. --*/</div><div class='del'>-   if (s-&gt;blockNo == 1) {</div><div class='del'>-      BZ2_bsInitWrite ( s );</div><div class='del'>-      bsPutUChar ( s, 'B' );</div><div class='del'>-      bsPutUChar ( s, 'Z' );</div><div class='del'>-      bsPutUChar ( s, 'h' );</div><div class='del'>-      bsPutUChar ( s, (UChar)('0' + s-&gt;blockSize100k) );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   if (s-&gt;nblock &gt; 0) {</div><div class='del'>-</div><div class='del'>-      bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );</div><div class='del'>-      bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );</div><div class='del'>-      bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );</div><div class='del'>-</div><div class='del'>-      /*-- Now the block's CRC, so it is in a known place. --*/</div><div class='del'>-      bsPutUInt32 ( s, s-&gt;blockCRC );</div><div class='del'>-</div><div class='del'>-      /*-- </div><div class='del'>-         Now a single bit indicating (non-)randomisation. </div><div class='del'>-         As of version 0.9.5, we use a better sorting algorithm</div><div class='del'>-         which makes randomisation unnecessary.  So always set</div><div class='del'>-         the randomised bit to 'no'.  Of course, the decoder</div><div class='del'>-         still needs to be able to handle randomised blocks</div><div class='del'>-         so as to maintain backwards compatibility with</div><div class='del'>-         older versions of bzip2.</div><div class='del'>-      --*/</div><div class='del'>-      bsW(s,1,0);</div><div class='del'>-</div><div class='del'>-      bsW ( s, 24, s-&gt;origPtr );</div><div class='del'>-      generateMTFValues ( s );</div><div class='del'>-      sendMTFValues ( s );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-   /*-- If this is the last block, add the stream trailer. --*/</div><div class='del'>-   if (is_last_block) {</div><div class='del'>-</div><div class='del'>-      bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 );</div><div class='del'>-      bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 );</div><div class='del'>-      bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 );</div><div class='del'>-      bsPutUInt32 ( s, s-&gt;combinedCRC );</div><div class='del'>-      if (s-&gt;verbosity &gt;= 2)</div><div class='del'>-         VPrintf1( "    final combined CRC = 0x%x\n   ", s-&gt;combinedCRC );</div><div class='del'>-      bsFinishWrite ( s );</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                        compress.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/crctable.c b/mdk-stage1/bzlib/crctable.c<br/>deleted file mode 100644<br/>index c0ea3f769..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/crctable.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/crctable.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,148 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Table for doing CRCs                                  ---*/</div><div class='del'>-/*---                                            crctable.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  I think this is an implementation of the AUTODIN-II,</div><div class='del'>-  Ethernet &amp; FDDI 32-bit CRC standard.  Vaguely derived</div><div class='del'>-  from code by Rob Warnock, in Section 51 of the</div><div class='del'>-  comp.compression FAQ.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-UInt32 BZ2_crc32Table[256] = {</div><div class='del'>-</div><div class='del'>-   /*-- Ugly, innit? --*/</div><div class='del'>-</div><div class='del'>-   0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L,</div><div class='del'>-   0x130476dcL, 0x17c56b6bL, 0x1a864db2L, 0x1e475005L,</div><div class='del'>-   0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L,</div><div class='del'>-   0x350c9b64L, 0x31cd86d3L, 0x3c8ea00aL, 0x384fbdbdL,</div><div class='del'>-   0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L,</div><div class='del'>-   0x5f15adacL, 0x5bd4b01bL, 0x569796c2L, 0x52568b75L,</div><div class='del'>-   0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L,</div><div class='del'>-   0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL,</div><div class='del'>-   0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL, 0x95609039L,</div><div class='del'>-   0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L,</div><div class='del'>-   0xbe2b5b58L, 0xbaea46efL, 0xb7a96036L, 0xb3687d81L,</div><div class='del'>-   0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL,</div><div class='del'>-   0xd4326d90L, 0xd0f37027L, 0xddb056feL, 0xd9714b49L,</div><div class='del'>-   0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L,</div><div class='del'>-   0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L,</div><div class='del'>-   0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL, 0xec7dd02dL,</div><div class='del'>-   0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL,</div><div class='del'>-   0x278206abL, 0x23431b1cL, 0x2e003dc5L, 0x2ac12072L,</div><div class='del'>-   0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L,</div><div class='del'>-   0x018aeb13L, 0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL,</div><div class='del'>-   0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL,</div><div class='del'>-   0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L,</div><div class='del'>-   0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L, 0x53dc6066L,</div><div class='del'>-   0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL,</div><div class='del'>-   0xaca5c697L, 0xa864db20L, 0xa527fdf9L, 0xa1e6e04eL,</div><div class='del'>-   0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L,</div><div class='del'>-   0x8aad2b2fL, 0x8e6c3698L, 0x832f1041L, 0x87ee0df6L,</div><div class='del'>-   0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL,</div><div class='del'>-   0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL,</div><div class='del'>-   0xf3b06b3bL, 0xf771768cL, 0xfa325055L, 0xfef34de2L,</div><div class='del'>-   0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L,</div><div class='del'>-   0xd5b88683L, 0xd1799b34L, 0xdc3abdedL, 0xd8fba05aL,</div><div class='del'>-   0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L,</div><div class='del'>-   0x7a089632L, 0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL,</div><div class='del'>-   0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL,</div><div class='del'>-   0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L,</div><div class='del'>-   0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L, 0x285e1d47L,</div><div class='del'>-   0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL,</div><div class='del'>-   0x0315d626L, 0x07d4cb91L, 0x0a97ed48L, 0x0e56f0ffL,</div><div class='del'>-   0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L,</div><div class='del'>-   0xf12f560eL, 0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L,</div><div class='del'>-   0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL,</div><div class='del'>-   0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL,</div><div class='del'>-   0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L, 0xc960ebb3L,</div><div class='del'>-   0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L,</div><div class='del'>-   0xae3afba2L, 0xaafbe615L, 0xa7b8c0ccL, 0xa379dd7bL,</div><div class='del'>-   0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL,</div><div class='del'>-   0x8832161aL, 0x8cf30badL, 0x81b02d74L, 0x857130c3L,</div><div class='del'>-   0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L,</div><div class='del'>-   0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL,</div><div class='del'>-   0x7b827d21L, 0x7f436096L, 0x7200464fL, 0x76c15bf8L,</div><div class='del'>-   0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L,</div><div class='del'>-   0x119b4be9L, 0x155a565eL, 0x18197087L, 0x1cd86d30L,</div><div class='del'>-   0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL,</div><div class='del'>-   0x3793a651L, 0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L,</div><div class='del'>-   0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L,</div><div class='del'>-   0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L,</div><div class='del'>-   0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL, 0xdbee767cL,</div><div class='del'>-   0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L,</div><div class='del'>-   0xf0a5bd1dL, 0xf464a0aaL, 0xf9278673L, 0xfde69bc4L,</div><div class='del'>-   0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L,</div><div class='del'>-   0x9abc8bd5L, 0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL,</div><div class='del'>-   0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L,</div><div class='del'>-   0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                        crctable.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/decompress.c b/mdk-stage1/bzlib/decompress.c<br/>deleted file mode 100644<br/>index 65cf75d8f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/decompress.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/decompress.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,664 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Decompression machinery                               ---*/</div><div class='del'>-/*---                                          decompress.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-static</div><div class='del'>-void makeMaps_d ( DState* s )</div><div class='del'>-{</div><div class='del'>-   Int32 i;</div><div class='del'>-   s-&gt;nInUse = 0;</div><div class='del'>-   for (i = 0; i &lt; 256; i++)</div><div class='del'>-      if (s-&gt;inUse[i]) {</div><div class='del'>-         s-&gt;seqToUnseq[s-&gt;nInUse] = i;</div><div class='del'>-         s-&gt;nInUse++;</div><div class='del'>-      }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define RETURN(rrr)                               \</div><div class='del'>-   { retVal = rrr; goto save_state_and_return; };</div><div class='del'>-</div><div class='del'>-#define GET_BITS(lll,vvv,nnn)                     \</div><div class='del'>-   case lll: s-&gt;state = lll;                      \</div><div class='del'>-   while (True) {                                 \</div><div class='del'>-      if (s-&gt;bsLive &gt;= nnn) {                     \</div><div class='del'>-         UInt32 v;                                \</div><div class='del'>-         v = (s-&gt;bsBuff &gt;&gt;                        \</div><div class='del'>-             (s-&gt;bsLive-nnn)) &amp; ((1 &lt;&lt; nnn)-1);   \</div><div class='del'>-         s-&gt;bsLive -= nnn;                        \</div><div class='del'>-         vvv = v;                                 \</div><div class='del'>-         break;                                   \</div><div class='del'>-      }                                           \</div><div class='del'>-      if (s-&gt;strm-&gt;avail_in == 0) RETURN(BZ_OK);  \</div><div class='del'>-      s-&gt;bsBuff                                   \</div><div class='del'>-         = (s-&gt;bsBuff &lt;&lt; 8) |                     \</div><div class='del'>-           ((UInt32)                              \</div><div class='del'>-              (*((UChar*)(s-&gt;strm-&gt;next_in))));   \</div><div class='del'>-      s-&gt;bsLive += 8;                             \</div><div class='del'>-      s-&gt;strm-&gt;next_in++;                         \</div><div class='del'>-      s-&gt;strm-&gt;avail_in--;                        \</div><div class='del'>-      s-&gt;strm-&gt;total_in_lo32++;                   \</div><div class='del'>-      if (s-&gt;strm-&gt;total_in_lo32 == 0)            \</div><div class='del'>-         s-&gt;strm-&gt;total_in_hi32++;                \</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-#define GET_UCHAR(lll,uuu)                        \</div><div class='del'>-   GET_BITS(lll,uuu,8)</div><div class='del'>-</div><div class='del'>-#define GET_BIT(lll,uuu)                          \</div><div class='del'>-   GET_BITS(lll,uuu,1)</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define GET_MTF_VAL(label1,label2,lval)           \</div><div class='del'>-{                                                 \</div><div class='del'>-   if (groupPos == 0) {                           \</div><div class='del'>-      groupNo++;                                  \</div><div class='del'>-      if (groupNo &gt;= nSelectors)                  \</div><div class='del'>-         RETURN(BZ_DATA_ERROR);                   \</div><div class='del'>-      groupPos = BZ_G_SIZE;                       \</div><div class='del'>-      gSel = s-&gt;selector[groupNo];                \</div><div class='del'>-      gMinlen = s-&gt;minLens[gSel];                 \</div><div class='del'>-      gLimit = &amp;(s-&gt;limit[gSel][0]);              \</div><div class='del'>-      gPerm = &amp;(s-&gt;perm[gSel][0]);                \</div><div class='del'>-      gBase = &amp;(s-&gt;base[gSel][0]);                \</div><div class='del'>-   }                                              \</div><div class='del'>-   groupPos--;                                    \</div><div class='del'>-   zn = gMinlen;                                  \</div><div class='del'>-   GET_BITS(label1, zvec, zn);                    \</div><div class='del'>-   while (1) {                                    \</div><div class='del'>-      if (zn &gt; 20 /* the longest code */)         \</div><div class='del'>-         RETURN(BZ_DATA_ERROR);                   \</div><div class='del'>-      if (zvec &lt;= gLimit[zn]) break;              \</div><div class='del'>-      zn++;                                       \</div><div class='del'>-      GET_BIT(label2, zj);                        \</div><div class='del'>-      zvec = (zvec &lt;&lt; 1) | zj;                    \</div><div class='del'>-   };                                             \</div><div class='del'>-   if (zvec - gBase[zn] &lt; 0                       \</div><div class='del'>-       || zvec - gBase[zn] &gt;= BZ_MAX_ALPHA_SIZE)  \</div><div class='del'>-      RETURN(BZ_DATA_ERROR);                      \</div><div class='del'>-   lval = gPerm[zvec - gBase[zn]];                \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-Int32 BZ2_decompress ( DState* s )</div><div class='del'>-{</div><div class='del'>-   UChar      uc;</div><div class='del'>-   Int32      retVal;</div><div class='del'>-   Int32      minLen, maxLen;</div><div class='del'>-   bz_stream* strm = s-&gt;strm;</div><div class='del'>-</div><div class='del'>-   /* stuff that needs to be saved/restored */</div><div class='del'>-   Int32  i;</div><div class='del'>-   Int32  j;</div><div class='del'>-   Int32  t;</div><div class='del'>-   Int32  alphaSize;</div><div class='del'>-   Int32  nGroups;</div><div class='del'>-   Int32  nSelectors;</div><div class='del'>-   Int32  EOB;</div><div class='del'>-   Int32  groupNo;</div><div class='del'>-   Int32  groupPos;</div><div class='del'>-   Int32  nextSym;</div><div class='del'>-   Int32  nblockMAX;</div><div class='del'>-   Int32  nblock;</div><div class='del'>-   Int32  es;</div><div class='del'>-   Int32  N;</div><div class='del'>-   Int32  curr;</div><div class='del'>-   Int32  zt;</div><div class='del'>-   Int32  zn; </div><div class='del'>-   Int32  zvec;</div><div class='del'>-   Int32  zj;</div><div class='del'>-   Int32  gSel;</div><div class='del'>-   Int32  gMinlen;</div><div class='del'>-   Int32* gLimit;</div><div class='del'>-   Int32* gBase;</div><div class='del'>-   Int32* gPerm;</div><div class='del'>-</div><div class='del'>-   if (s-&gt;state == BZ_X_MAGIC_1) {</div><div class='del'>-      /*initialise the save area*/</div><div class='del'>-      s-&gt;save_i           = 0;</div><div class='del'>-      s-&gt;save_j           = 0;</div><div class='del'>-      s-&gt;save_t           = 0;</div><div class='del'>-      s-&gt;save_alphaSize   = 0;</div><div class='del'>-      s-&gt;save_nGroups     = 0;</div><div class='del'>-      s-&gt;save_nSelectors  = 0;</div><div class='del'>-      s-&gt;save_EOB         = 0;</div><div class='del'>-      s-&gt;save_groupNo     = 0;</div><div class='del'>-      s-&gt;save_groupPos    = 0;</div><div class='del'>-      s-&gt;save_nextSym     = 0;</div><div class='del'>-      s-&gt;save_nblockMAX   = 0;</div><div class='del'>-      s-&gt;save_nblock      = 0;</div><div class='del'>-      s-&gt;save_es          = 0;</div><div class='del'>-      s-&gt;save_N           = 0;</div><div class='del'>-      s-&gt;save_curr        = 0;</div><div class='del'>-      s-&gt;save_zt          = 0;</div><div class='del'>-      s-&gt;save_zn          = 0;</div><div class='del'>-      s-&gt;save_zvec        = 0;</div><div class='del'>-      s-&gt;save_zj          = 0;</div><div class='del'>-      s-&gt;save_gSel        = 0;</div><div class='del'>-      s-&gt;save_gMinlen     = 0;</div><div class='del'>-      s-&gt;save_gLimit      = NULL;</div><div class='del'>-      s-&gt;save_gBase       = NULL;</div><div class='del'>-      s-&gt;save_gPerm       = NULL;</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   /*restore from the save area*/</div><div class='del'>-   i           = s-&gt;save_i;</div><div class='del'>-   j           = s-&gt;save_j;</div><div class='del'>-   t           = s-&gt;save_t;</div><div class='del'>-   alphaSize   = s-&gt;save_alphaSize;</div><div class='del'>-   nGroups     = s-&gt;save_nGroups;</div><div class='del'>-   nSelectors  = s-&gt;save_nSelectors;</div><div class='del'>-   EOB         = s-&gt;save_EOB;</div><div class='del'>-   groupNo     = s-&gt;save_groupNo;</div><div class='del'>-   groupPos    = s-&gt;save_groupPos;</div><div class='del'>-   nextSym     = s-&gt;save_nextSym;</div><div class='del'>-   nblockMAX   = s-&gt;save_nblockMAX;</div><div class='del'>-   nblock      = s-&gt;save_nblock;</div><div class='del'>-   es          = s-&gt;save_es;</div><div class='del'>-   N           = s-&gt;save_N;</div><div class='del'>-   curr        = s-&gt;save_curr;</div><div class='del'>-   zt          = s-&gt;save_zt;</div><div class='del'>-   zn          = s-&gt;save_zn; </div><div class='del'>-   zvec        = s-&gt;save_zvec;</div><div class='del'>-   zj          = s-&gt;save_zj;</div><div class='del'>-   gSel        = s-&gt;save_gSel;</div><div class='del'>-   gMinlen     = s-&gt;save_gMinlen;</div><div class='del'>-   gLimit      = s-&gt;save_gLimit;</div><div class='del'>-   gBase       = s-&gt;save_gBase;</div><div class='del'>-   gPerm       = s-&gt;save_gPerm;</div><div class='del'>-</div><div class='del'>-   retVal = BZ_OK;</div><div class='del'>-</div><div class='del'>-   switch (s-&gt;state) {</div><div class='del'>-</div><div class='del'>-      GET_UCHAR(BZ_X_MAGIC_1, uc);</div><div class='del'>-      if (uc != 'B') RETURN(BZ_DATA_ERROR_MAGIC);</div><div class='del'>-</div><div class='del'>-      GET_UCHAR(BZ_X_MAGIC_2, uc);</div><div class='del'>-      if (uc != 'Z') RETURN(BZ_DATA_ERROR_MAGIC);</div><div class='del'>-</div><div class='del'>-      GET_UCHAR(BZ_X_MAGIC_3, uc)</div><div class='del'>-      if (uc != 'h') RETURN(BZ_DATA_ERROR_MAGIC);</div><div class='del'>-</div><div class='del'>-      GET_BITS(BZ_X_MAGIC_4, s-&gt;blockSize100k, 8)</div><div class='del'>-      if (s-&gt;blockSize100k &lt; '1' || </div><div class='del'>-          s-&gt;blockSize100k &gt; '9') RETURN(BZ_DATA_ERROR_MAGIC);</div><div class='del'>-      s-&gt;blockSize100k -= '0';</div><div class='del'>-</div><div class='del'>-      if (s-&gt;smallDecompress) {</div><div class='del'>-         s-&gt;ll16 = BZALLOC( s-&gt;blockSize100k * 100000 * sizeof(UInt16) );</div><div class='del'>-         s-&gt;ll4  = BZALLOC( </div><div class='del'>-                      ((1 + s-&gt;blockSize100k * 100000) &gt;&gt; 1) * sizeof(UChar) </div><div class='del'>-                   );</div><div class='del'>-         if (s-&gt;ll16 == NULL || s-&gt;ll4 == NULL) RETURN(BZ_MEM_ERROR);</div><div class='del'>-      } else {</div><div class='del'>-         s-&gt;tt  = BZALLOC( s-&gt;blockSize100k * 100000 * sizeof(Int32) );</div><div class='del'>-         if (s-&gt;tt == NULL) RETURN(BZ_MEM_ERROR);</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_1, uc);</div><div class='del'>-</div><div class='del'>-      if (uc == 0x17) goto endhdr_2;</div><div class='del'>-      if (uc != 0x31) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_2, uc);</div><div class='del'>-      if (uc != 0x41) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_3, uc);</div><div class='del'>-      if (uc != 0x59) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_4, uc);</div><div class='del'>-      if (uc != 0x26) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_5, uc);</div><div class='del'>-      if (uc != 0x53) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_BLKHDR_6, uc);</div><div class='del'>-      if (uc != 0x59) RETURN(BZ_DATA_ERROR);</div><div class='del'>-</div><div class='del'>-      s-&gt;currBlockNo++;</div><div class='del'>-      if (s-&gt;verbosity &gt;= 2)</div><div class='del'>-         VPrintf1 ( "\n    [%d: huff+mtf ", s-&gt;currBlockNo );</div><div class='del'>- </div><div class='del'>-      s-&gt;storedBlockCRC = 0;</div><div class='del'>-      GET_UCHAR(BZ_X_BCRC_1, uc);</div><div class='del'>-      s-&gt;storedBlockCRC = (s-&gt;storedBlockCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_BCRC_2, uc);</div><div class='del'>-      s-&gt;storedBlockCRC = (s-&gt;storedBlockCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_BCRC_3, uc);</div><div class='del'>-      s-&gt;storedBlockCRC = (s-&gt;storedBlockCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_BCRC_4, uc);</div><div class='del'>-      s-&gt;storedBlockCRC = (s-&gt;storedBlockCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-</div><div class='del'>-      GET_BITS(BZ_X_RANDBIT, s-&gt;blockRandomised, 1);</div><div class='del'>-</div><div class='del'>-      s-&gt;origPtr = 0;</div><div class='del'>-      GET_UCHAR(BZ_X_ORIGPTR_1, uc);</div><div class='del'>-      s-&gt;origPtr = (s-&gt;origPtr &lt;&lt; 8) | ((Int32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_ORIGPTR_2, uc);</div><div class='del'>-      s-&gt;origPtr = (s-&gt;origPtr &lt;&lt; 8) | ((Int32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_ORIGPTR_3, uc);</div><div class='del'>-      s-&gt;origPtr = (s-&gt;origPtr &lt;&lt; 8) | ((Int32)uc);</div><div class='del'>-</div><div class='del'>-      if (s-&gt;origPtr &lt; 0)</div><div class='del'>-         RETURN(BZ_DATA_ERROR);</div><div class='del'>-      if (s-&gt;origPtr &gt; 10 + 100000*s-&gt;blockSize100k) </div><div class='del'>-         RETURN(BZ_DATA_ERROR);</div><div class='del'>-</div><div class='del'>-      /*--- Receive the mapping table ---*/</div><div class='del'>-      for (i = 0; i &lt; 16; i++) {</div><div class='del'>-         GET_BIT(BZ_X_MAPPING_1, uc);</div><div class='del'>-         if (uc == 1) </div><div class='del'>-            s-&gt;inUse16[i] = True; else </div><div class='del'>-            s-&gt;inUse16[i] = False;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      for (i = 0; i &lt; 256; i++) s-&gt;inUse[i] = False;</div><div class='del'>-</div><div class='del'>-      for (i = 0; i &lt; 16; i++)</div><div class='del'>-         if (s-&gt;inUse16[i])</div><div class='del'>-            for (j = 0; j &lt; 16; j++) {</div><div class='del'>-               GET_BIT(BZ_X_MAPPING_2, uc);</div><div class='del'>-               if (uc == 1) s-&gt;inUse[i * 16 + j] = True;</div><div class='del'>-            }</div><div class='del'>-      makeMaps_d ( s );</div><div class='del'>-      if (s-&gt;nInUse == 0) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      alphaSize = s-&gt;nInUse+2;</div><div class='del'>-</div><div class='del'>-      /*--- Now the selectors ---*/</div><div class='del'>-      GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);</div><div class='del'>-      if (nGroups &lt; 2 || nGroups &gt; 6) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);</div><div class='del'>-      if (nSelectors &lt; 1) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      for (i = 0; i &lt; nSelectors; i++) {</div><div class='del'>-         j = 0;</div><div class='del'>-         while (True) {</div><div class='del'>-            GET_BIT(BZ_X_SELECTOR_3, uc);</div><div class='del'>-            if (uc == 0) break;</div><div class='del'>-            j++;</div><div class='del'>-            if (j &gt;= nGroups) RETURN(BZ_DATA_ERROR);</div><div class='del'>-         }</div><div class='del'>-         s-&gt;selectorMtf[i] = j;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /*--- Undo the MTF values for the selectors. ---*/</div><div class='del'>-      {</div><div class='del'>-         UChar pos[BZ_N_GROUPS], tmp, v;</div><div class='del'>-         for (v = 0; v &lt; nGroups; v++) pos[v] = v;</div><div class='del'>-   </div><div class='del'>-         for (i = 0; i &lt; nSelectors; i++) {</div><div class='del'>-            v = s-&gt;selectorMtf[i];</div><div class='del'>-            tmp = pos[v];</div><div class='del'>-            while (v &gt; 0) { pos[v] = pos[v-1]; v--; }</div><div class='del'>-            pos[0] = tmp;</div><div class='del'>-            s-&gt;selector[i] = tmp;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /*--- Now the coding tables ---*/</div><div class='del'>-      for (t = 0; t &lt; nGroups; t++) {</div><div class='del'>-         GET_BITS(BZ_X_CODING_1, curr, 5);</div><div class='del'>-         for (i = 0; i &lt; alphaSize; i++) {</div><div class='del'>-            while (True) {</div><div class='del'>-               if (curr &lt; 1 || curr &gt; 20) RETURN(BZ_DATA_ERROR);</div><div class='del'>-               GET_BIT(BZ_X_CODING_2, uc);</div><div class='del'>-               if (uc == 0) break;</div><div class='del'>-               GET_BIT(BZ_X_CODING_3, uc);</div><div class='del'>-               if (uc == 0) curr++; else curr--;</div><div class='del'>-            }</div><div class='del'>-            s-&gt;len[t][i] = curr;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /*--- Create the Huffman decoding tables ---*/</div><div class='del'>-      for (t = 0; t &lt; nGroups; t++) {</div><div class='del'>-         minLen = 32;</div><div class='del'>-         maxLen = 0;</div><div class='del'>-         for (i = 0; i &lt; alphaSize; i++) {</div><div class='del'>-            if (s-&gt;len[t][i] &gt; maxLen) maxLen = s-&gt;len[t][i];</div><div class='del'>-            if (s-&gt;len[t][i] &lt; minLen) minLen = s-&gt;len[t][i];</div><div class='del'>-         }</div><div class='del'>-         BZ2_hbCreateDecodeTables ( </div><div class='del'>-            &amp;(s-&gt;limit[t][0]), </div><div class='del'>-            &amp;(s-&gt;base[t][0]), </div><div class='del'>-            &amp;(s-&gt;perm[t][0]), </div><div class='del'>-            &amp;(s-&gt;len[t][0]),</div><div class='del'>-            minLen, maxLen, alphaSize</div><div class='del'>-         );</div><div class='del'>-         s-&gt;minLens[t] = minLen;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /*--- Now the MTF values ---*/</div><div class='del'>-</div><div class='del'>-      EOB      = s-&gt;nInUse+1;</div><div class='del'>-      nblockMAX = 100000 * s-&gt;blockSize100k;</div><div class='del'>-      groupNo  = -1;</div><div class='del'>-      groupPos = 0;</div><div class='del'>-</div><div class='del'>-      for (i = 0; i &lt;= 255; i++) s-&gt;unzftab[i] = 0;</div><div class='del'>-</div><div class='del'>-      /*-- MTF init --*/</div><div class='del'>-      {</div><div class='del'>-         Int32 ii, jj, kk;</div><div class='del'>-         kk = MTFA_SIZE-1;</div><div class='del'>-         for (ii = 256 / MTFL_SIZE - 1; ii &gt;= 0; ii--) {</div><div class='del'>-            for (jj = MTFL_SIZE-1; jj &gt;= 0; jj--) {</div><div class='del'>-               s-&gt;mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj);</div><div class='del'>-               kk--;</div><div class='del'>-            }</div><div class='del'>-            s-&gt;mtfbase[ii] = kk + 1;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-      /*-- end MTF init --*/</div><div class='del'>-</div><div class='del'>-      nblock = 0;</div><div class='del'>-      GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);</div><div class='del'>-</div><div class='del'>-      while (True) {</div><div class='del'>-</div><div class='del'>-         if (nextSym == EOB) break;</div><div class='del'>-</div><div class='del'>-         if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {</div><div class='del'>-</div><div class='del'>-            es = -1;</div><div class='del'>-            N = 1;</div><div class='del'>-            do {</div><div class='del'>-               if (nextSym == BZ_RUNA) es = es + (0+1) * N; else</div><div class='del'>-               if (nextSym == BZ_RUNB) es = es + (1+1) * N;</div><div class='del'>-               N = N * 2;</div><div class='del'>-               GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);</div><div class='del'>-            }</div><div class='del'>-               while (nextSym == BZ_RUNA || nextSym == BZ_RUNB);</div><div class='del'>-</div><div class='del'>-            es++;</div><div class='del'>-            uc = s-&gt;seqToUnseq[ s-&gt;mtfa[s-&gt;mtfbase[0]] ];</div><div class='del'>-            s-&gt;unzftab[uc] += es;</div><div class='del'>-</div><div class='del'>-            if (s-&gt;smallDecompress)</div><div class='del'>-               while (es &gt; 0) {</div><div class='del'>-                  if (nblock &gt;= nblockMAX) RETURN(BZ_DATA_ERROR);</div><div class='del'>-                  s-&gt;ll16[nblock] = (UInt16)uc;</div><div class='del'>-                  nblock++;</div><div class='del'>-                  es--;</div><div class='del'>-               }</div><div class='del'>-            else</div><div class='del'>-               while (es &gt; 0) {</div><div class='del'>-                  if (nblock &gt;= nblockMAX) RETURN(BZ_DATA_ERROR);</div><div class='del'>-                  s-&gt;tt[nblock] = (UInt32)uc;</div><div class='del'>-                  nblock++;</div><div class='del'>-                  es--;</div><div class='del'>-               };</div><div class='del'>-</div><div class='del'>-            continue;</div><div class='del'>-</div><div class='del'>-         } else {</div><div class='del'>-</div><div class='del'>-            if (nblock &gt;= nblockMAX) RETURN(BZ_DATA_ERROR);</div><div class='del'>-</div><div class='del'>-            /*-- uc = MTF ( nextSym-1 ) --*/</div><div class='del'>-            {</div><div class='del'>-               Int32 ii, jj, kk, pp, lno, off;</div><div class='del'>-               UInt32 nn;</div><div class='del'>-               nn = (UInt32)(nextSym - 1);</div><div class='del'>-</div><div class='del'>-               if (nn &lt; MTFL_SIZE) {</div><div class='del'>-                  /* avoid general-case expense */</div><div class='del'>-                  pp = s-&gt;mtfbase[0];</div><div class='del'>-                  uc = s-&gt;mtfa[pp+nn];</div><div class='del'>-                  while (nn &gt; 3) {</div><div class='del'>-                     Int32 z = pp+nn;</div><div class='del'>-                     s-&gt;mtfa[(z)  ] = s-&gt;mtfa[(z)-1];</div><div class='del'>-                     s-&gt;mtfa[(z)-1] = s-&gt;mtfa[(z)-2];</div><div class='del'>-                     s-&gt;mtfa[(z)-2] = s-&gt;mtfa[(z)-3];</div><div class='del'>-                     s-&gt;mtfa[(z)-3] = s-&gt;mtfa[(z)-4];</div><div class='del'>-                     nn -= 4;</div><div class='del'>-                  }</div><div class='del'>-                  while (nn &gt; 0) { </div><div class='del'>-                     s-&gt;mtfa[(pp+nn)] = s-&gt;mtfa[(pp+nn)-1]; nn--; </div><div class='del'>-                  };</div><div class='del'>-                  s-&gt;mtfa[pp] = uc;</div><div class='del'>-               } else { </div><div class='del'>-                  /* general case */</div><div class='del'>-                  lno = nn / MTFL_SIZE;</div><div class='del'>-                  off = nn % MTFL_SIZE;</div><div class='del'>-                  pp = s-&gt;mtfbase[lno] + off;</div><div class='del'>-                  uc = s-&gt;mtfa[pp];</div><div class='del'>-                  while (pp &gt; s-&gt;mtfbase[lno]) { </div><div class='del'>-                     s-&gt;mtfa[pp] = s-&gt;mtfa[pp-1]; pp--; </div><div class='del'>-                  };</div><div class='del'>-                  s-&gt;mtfbase[lno]++;</div><div class='del'>-                  while (lno &gt; 0) {</div><div class='del'>-                     s-&gt;mtfbase[lno]--;</div><div class='del'>-                     s-&gt;mtfa[s-&gt;mtfbase[lno]] </div><div class='del'>-                        = s-&gt;mtfa[s-&gt;mtfbase[lno-1] + MTFL_SIZE - 1];</div><div class='del'>-                     lno--;</div><div class='del'>-                  }</div><div class='del'>-                  s-&gt;mtfbase[0]--;</div><div class='del'>-                  s-&gt;mtfa[s-&gt;mtfbase[0]] = uc;</div><div class='del'>-                  if (s-&gt;mtfbase[0] == 0) {</div><div class='del'>-                     kk = MTFA_SIZE-1;</div><div class='del'>-                     for (ii = 256 / MTFL_SIZE-1; ii &gt;= 0; ii--) {</div><div class='del'>-                        for (jj = MTFL_SIZE-1; jj &gt;= 0; jj--) {</div><div class='del'>-                           s-&gt;mtfa[kk] = s-&gt;mtfa[s-&gt;mtfbase[ii] + jj];</div><div class='del'>-                           kk--;</div><div class='del'>-                        }</div><div class='del'>-                        s-&gt;mtfbase[ii] = kk + 1;</div><div class='del'>-                     }</div><div class='del'>-                  }</div><div class='del'>-               }</div><div class='del'>-            }</div><div class='del'>-            /*-- end uc = MTF ( nextSym-1 ) --*/</div><div class='del'>-</div><div class='del'>-            s-&gt;unzftab[s-&gt;seqToUnseq[uc]]++;</div><div class='del'>-            if (s-&gt;smallDecompress)</div><div class='del'>-               s-&gt;ll16[nblock] = (UInt16)(s-&gt;seqToUnseq[uc]); else</div><div class='del'>-               s-&gt;tt[nblock]   = (UInt32)(s-&gt;seqToUnseq[uc]);</div><div class='del'>-            nblock++;</div><div class='del'>-</div><div class='del'>-            GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);</div><div class='del'>-            continue;</div><div class='del'>-         }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /* Now we know what nblock is, we can do a better sanity</div><div class='del'>-         check on s-&gt;origPtr.</div><div class='del'>-      */</div><div class='del'>-      if (s-&gt;origPtr &lt; 0 || s-&gt;origPtr &gt;= nblock)</div><div class='del'>-         RETURN(BZ_DATA_ERROR);</div><div class='del'>-</div><div class='del'>-      s-&gt;state_out_len = 0;</div><div class='del'>-      s-&gt;state_out_ch  = 0;</div><div class='del'>-      BZ_INITIALISE_CRC ( s-&gt;calculatedBlockCRC );</div><div class='del'>-      s-&gt;state = BZ_X_OUTPUT;</div><div class='del'>-      if (s-&gt;verbosity &gt;= 2) VPrintf0 ( "rt+rld" );</div><div class='del'>-</div><div class='del'>-      /*-- Set up cftab to facilitate generation of T^(-1) --*/</div><div class='del'>-      s-&gt;cftab[0] = 0;</div><div class='del'>-      for (i = 1; i &lt;= 256; i++) s-&gt;cftab[i] = s-&gt;unzftab[i-1];</div><div class='del'>-      for (i = 1; i &lt;= 256; i++) s-&gt;cftab[i] += s-&gt;cftab[i-1];</div><div class='del'>-</div><div class='del'>-      if (s-&gt;smallDecompress) {</div><div class='del'>-</div><div class='del'>-         /*-- Make a copy of cftab, used in generation of T --*/</div><div class='del'>-         for (i = 0; i &lt;= 256; i++) s-&gt;cftabCopy[i] = s-&gt;cftab[i];</div><div class='del'>-</div><div class='del'>-         /*-- compute the T vector --*/</div><div class='del'>-         for (i = 0; i &lt; nblock; i++) {</div><div class='del'>-            uc = (UChar)(s-&gt;ll16[i]);</div><div class='del'>-            SET_LL(i, s-&gt;cftabCopy[uc]);</div><div class='del'>-            s-&gt;cftabCopy[uc]++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         /*-- Compute T^(-1) by pointer reversal on T --*/</div><div class='del'>-         i = s-&gt;origPtr;</div><div class='del'>-         j = GET_LL(i);</div><div class='del'>-         do {</div><div class='del'>-            Int32 tmp = GET_LL(j);</div><div class='del'>-            SET_LL(j, i);</div><div class='del'>-            i = j;</div><div class='del'>-            j = tmp;</div><div class='del'>-         }</div><div class='del'>-            while (i != s-&gt;origPtr);</div><div class='del'>-</div><div class='del'>-         s-&gt;tPos = s-&gt;origPtr;</div><div class='del'>-         s-&gt;nblock_used = 0;</div><div class='del'>-         if (s-&gt;blockRandomised) {</div><div class='del'>-            BZ_RAND_INIT_MASK;</div><div class='del'>-            BZ_GET_SMALL(s-&gt;k0); s-&gt;nblock_used++;</div><div class='del'>-            BZ_RAND_UPD_MASK; s-&gt;k0 ^= BZ_RAND_MASK; </div><div class='del'>-         } else {</div><div class='del'>-            BZ_GET_SMALL(s-&gt;k0); s-&gt;nblock_used++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-      } else {</div><div class='del'>-</div><div class='del'>-         /*-- compute the T^(-1) vector --*/</div><div class='del'>-         for (i = 0; i &lt; nblock; i++) {</div><div class='del'>-            uc = (UChar)(s-&gt;tt[i] &amp; 0xff);</div><div class='del'>-            s-&gt;tt[s-&gt;cftab[uc]] |= (i &lt;&lt; 8);</div><div class='del'>-            s-&gt;cftab[uc]++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-         s-&gt;tPos = s-&gt;tt[s-&gt;origPtr] &gt;&gt; 8;</div><div class='del'>-         s-&gt;nblock_used = 0;</div><div class='del'>-         if (s-&gt;blockRandomised) {</div><div class='del'>-            BZ_RAND_INIT_MASK;</div><div class='del'>-            BZ_GET_FAST(s-&gt;k0); s-&gt;nblock_used++;</div><div class='del'>-            BZ_RAND_UPD_MASK; s-&gt;k0 ^= BZ_RAND_MASK; </div><div class='del'>-         } else {</div><div class='del'>-            BZ_GET_FAST(s-&gt;k0); s-&gt;nblock_used++;</div><div class='del'>-         }</div><div class='del'>-</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      RETURN(BZ_OK);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    endhdr_2:</div><div class='del'>-</div><div class='del'>-      GET_UCHAR(BZ_X_ENDHDR_2, uc);</div><div class='del'>-      if (uc != 0x72) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_ENDHDR_3, uc);</div><div class='del'>-      if (uc != 0x45) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_ENDHDR_4, uc);</div><div class='del'>-      if (uc != 0x38) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_ENDHDR_5, uc);</div><div class='del'>-      if (uc != 0x50) RETURN(BZ_DATA_ERROR);</div><div class='del'>-      GET_UCHAR(BZ_X_ENDHDR_6, uc);</div><div class='del'>-      if (uc != 0x90) RETURN(BZ_DATA_ERROR);</div><div class='del'>-</div><div class='del'>-      s-&gt;storedCombinedCRC = 0;</div><div class='del'>-      GET_UCHAR(BZ_X_CCRC_1, uc);</div><div class='del'>-      s-&gt;storedCombinedCRC = (s-&gt;storedCombinedCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_CCRC_2, uc);</div><div class='del'>-      s-&gt;storedCombinedCRC = (s-&gt;storedCombinedCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_CCRC_3, uc);</div><div class='del'>-      s-&gt;storedCombinedCRC = (s-&gt;storedCombinedCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-      GET_UCHAR(BZ_X_CCRC_4, uc);</div><div class='del'>-      s-&gt;storedCombinedCRC = (s-&gt;storedCombinedCRC &lt;&lt; 8) | ((UInt32)uc);</div><div class='del'>-</div><div class='del'>-      s-&gt;state = BZ_X_IDLE;</div><div class='del'>-      RETURN(BZ_STREAM_END);</div><div class='del'>-</div><div class='del'>-      default: AssertH ( False, 4001 );</div><div class='del'>-   }</div><div class='del'>-</div><div class='del'>-   AssertH ( False, 4002 );</div><div class='del'>-</div><div class='del'>-   save_state_and_return:</div><div class='del'>-</div><div class='del'>-   s-&gt;save_i           = i;</div><div class='del'>-   s-&gt;save_j           = j;</div><div class='del'>-   s-&gt;save_t           = t;</div><div class='del'>-   s-&gt;save_alphaSize   = alphaSize;</div><div class='del'>-   s-&gt;save_nGroups     = nGroups;</div><div class='del'>-   s-&gt;save_nSelectors  = nSelectors;</div><div class='del'>-   s-&gt;save_EOB         = EOB;</div><div class='del'>-   s-&gt;save_groupNo     = groupNo;</div><div class='del'>-   s-&gt;save_groupPos    = groupPos;</div><div class='del'>-   s-&gt;save_nextSym     = nextSym;</div><div class='del'>-   s-&gt;save_nblockMAX   = nblockMAX;</div><div class='del'>-   s-&gt;save_nblock      = nblock;</div><div class='del'>-   s-&gt;save_es          = es;</div><div class='del'>-   s-&gt;save_N           = N;</div><div class='del'>-   s-&gt;save_curr        = curr;</div><div class='del'>-   s-&gt;save_zt          = zt;</div><div class='del'>-   s-&gt;save_zn          = zn;</div><div class='del'>-   s-&gt;save_zvec        = zvec;</div><div class='del'>-   s-&gt;save_zj          = zj;</div><div class='del'>-   s-&gt;save_gSel        = gSel;</div><div class='del'>-   s-&gt;save_gMinlen     = gMinlen;</div><div class='del'>-   s-&gt;save_gLimit      = gLimit;</div><div class='del'>-   s-&gt;save_gBase       = gBase;</div><div class='del'>-   s-&gt;save_gPerm       = gPerm;</div><div class='del'>-</div><div class='del'>-   return retVal;   </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                      decompress.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/huffman.c b/mdk-stage1/bzlib/huffman.c<br/>deleted file mode 100644<br/>index 8994f0bb9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/huffman.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/huffman.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,232 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Huffman coding low-level stuff                        ---*/</div><div class='del'>-/*---                                             huffman.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-#define WEIGHTOF(zz0)  ((zz0) &amp; 0xffffff00)</div><div class='del'>-#define DEPTHOF(zz1)   ((zz1) &amp; 0x000000ff)</div><div class='del'>-#define MYMAX(zz2,zz3) ((zz2) &gt; (zz3) ? (zz2) : (zz3))</div><div class='del'>-</div><div class='del'>-#define ADDWEIGHTS(zw1,zw2)                           \</div><div class='del'>-   (WEIGHTOF(zw1)+WEIGHTOF(zw2)) |                    \</div><div class='del'>-   (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))</div><div class='del'>-</div><div class='del'>-#define UPHEAP(z)                                     \</div><div class='del'>-{                                                     \</div><div class='del'>-   Int32 zz, tmp;                                     \</div><div class='del'>-   zz = z; tmp = heap[zz];                            \</div><div class='del'>-   while (weight[tmp] &lt; weight[heap[zz &gt;&gt; 1]]) {      \</div><div class='del'>-      heap[zz] = heap[zz &gt;&gt; 1];                       \</div><div class='del'>-      zz &gt;&gt;= 1;                                       \</div><div class='del'>-   }                                                  \</div><div class='del'>-   heap[zz] = tmp;                                    \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define DOWNHEAP(z)                                   \</div><div class='del'>-{                                                     \</div><div class='del'>-   Int32 zz, yy, tmp;                                 \</div><div class='del'>-   zz = z; tmp = heap[zz];                            \</div><div class='del'>-   while (True) {                                     \</div><div class='del'>-      yy = zz &lt;&lt; 1;                                   \</div><div class='del'>-      if (yy &gt; nHeap) break;                          \</div><div class='del'>-      if (yy &lt; nHeap &amp;&amp;                               \</div><div class='del'>-          weight[heap[yy+1]] &lt; weight[heap[yy]])      \</div><div class='del'>-         yy++;                                        \</div><div class='del'>-      if (weight[tmp] &lt; weight[heap[yy]]) break;      \</div><div class='del'>-      heap[zz] = heap[yy];                            \</div><div class='del'>-      zz = yy;                                        \</div><div class='del'>-   }                                                  \</div><div class='del'>-   heap[zz] = tmp;                                    \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ2_hbMakeCodeLengths ( UChar *len, </div><div class='del'>-                             Int32 *freq,</div><div class='del'>-                             Int32 alphaSize,</div><div class='del'>-                             Int32 maxLen )</div><div class='del'>-{</div><div class='del'>-   /*--</div><div class='del'>-      Nodes and heap entries run from 1.  Entry 0</div><div class='del'>-      for both the heap and nodes is a sentinel.</div><div class='del'>-   --*/</div><div class='del'>-   Int32 nNodes, nHeap, n1, n2, i, j, k;</div><div class='del'>-   Bool  tooLong;</div><div class='del'>-</div><div class='del'>-   Int32 heap   [ BZ_MAX_ALPHA_SIZE + 2 ];</div><div class='del'>-   Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];</div><div class='del'>-   Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ]; </div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt; alphaSize; i++)</div><div class='del'>-      weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) &lt;&lt; 8;</div><div class='del'>-</div><div class='del'>-   while (True) {</div><div class='del'>-</div><div class='del'>-      nNodes = alphaSize;</div><div class='del'>-      nHeap = 0;</div><div class='del'>-</div><div class='del'>-      heap[0] = 0;</div><div class='del'>-      weight[0] = 0;</div><div class='del'>-      parent[0] = -2;</div><div class='del'>-</div><div class='del'>-      for (i = 1; i &lt;= alphaSize; i++) {</div><div class='del'>-         parent[i] = -1;</div><div class='del'>-         nHeap++;</div><div class='del'>-         heap[nHeap] = i;</div><div class='del'>-         UPHEAP(nHeap);</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertH( nHeap &lt; (BZ_MAX_ALPHA_SIZE+2), 2001 );</div><div class='del'>-   </div><div class='del'>-      while (nHeap &gt; 1) {</div><div class='del'>-         n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);</div><div class='del'>-         n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);</div><div class='del'>-         nNodes++;</div><div class='del'>-         parent[n1] = parent[n2] = nNodes;</div><div class='del'>-         weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);</div><div class='del'>-         parent[nNodes] = -1;</div><div class='del'>-         nHeap++;</div><div class='del'>-         heap[nHeap] = nNodes;</div><div class='del'>-         UPHEAP(nHeap);</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      AssertH( nNodes &lt; (BZ_MAX_ALPHA_SIZE * 2), 2002 );</div><div class='del'>-</div><div class='del'>-      tooLong = False;</div><div class='del'>-      for (i = 1; i &lt;= alphaSize; i++) {</div><div class='del'>-         j = 0;</div><div class='del'>-         k = i;</div><div class='del'>-         while (parent[k] &gt;= 0) { k = parent[k]; j++; }</div><div class='del'>-         len[i-1] = j;</div><div class='del'>-         if (j &gt; maxLen) tooLong = True;</div><div class='del'>-      }</div><div class='del'>-      </div><div class='del'>-      if (! tooLong) break;</div><div class='del'>-</div><div class='del'>-      for (i = 1; i &lt; alphaSize; i++) {</div><div class='del'>-         j = weight[i] &gt;&gt; 8;</div><div class='del'>-         j = 1 + (j / 2);</div><div class='del'>-         weight[i] = j &lt;&lt; 8;</div><div class='del'>-      }</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ2_hbAssignCodes ( Int32 *code,</div><div class='del'>-                         UChar *length,</div><div class='del'>-                         Int32 minLen,</div><div class='del'>-                         Int32 maxLen,</div><div class='del'>-                         Int32 alphaSize )</div><div class='del'>-{</div><div class='del'>-   Int32 n, vec, i;</div><div class='del'>-</div><div class='del'>-   vec = 0;</div><div class='del'>-   for (n = minLen; n &lt;= maxLen; n++) {</div><div class='del'>-      for (i = 0; i &lt; alphaSize; i++)</div><div class='del'>-         if (length[i] == n) { code[i] = vec; vec++; };</div><div class='del'>-      vec &lt;&lt;= 1;</div><div class='del'>-   }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------------*/</div><div class='del'>-void BZ2_hbCreateDecodeTables ( Int32 *limit,</div><div class='del'>-                                Int32 *base,</div><div class='del'>-                                Int32 *perm,</div><div class='del'>-                                UChar *length,</div><div class='del'>-                                Int32 minLen,</div><div class='del'>-                                Int32 maxLen,</div><div class='del'>-                                Int32 alphaSize )</div><div class='del'>-{</div><div class='del'>-   Int32 pp, i, j, vec;</div><div class='del'>-</div><div class='del'>-   pp = 0;</div><div class='del'>-   for (i = minLen; i &lt;= maxLen; i++)</div><div class='del'>-      for (j = 0; j &lt; alphaSize; j++)</div><div class='del'>-         if (length[j] == i) { perm[pp] = j; pp++; };</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt; BZ_MAX_CODE_LEN; i++) base[i] = 0;</div><div class='del'>-   for (i = 0; i &lt; alphaSize; i++) base[length[i]+1]++;</div><div class='del'>-</div><div class='del'>-   for (i = 1; i &lt; BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];</div><div class='del'>-</div><div class='del'>-   for (i = 0; i &lt; BZ_MAX_CODE_LEN; i++) limit[i] = 0;</div><div class='del'>-   vec = 0;</div><div class='del'>-</div><div class='del'>-   for (i = minLen; i &lt;= maxLen; i++) {</div><div class='del'>-      vec += (base[i+1] - base[i]);</div><div class='del'>-      limit[i] = vec-1;</div><div class='del'>-      vec &lt;&lt;= 1;</div><div class='del'>-   }</div><div class='del'>-   for (i = minLen + 1; i &lt;= maxLen; i++)</div><div class='del'>-      base[i] = ((limit[i-1] + 1) &lt;&lt; 1) - base[i];</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                         huffman.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/bzlib/randtable.c b/mdk-stage1/bzlib/randtable.c<br/>deleted file mode 100644<br/>index a1fc82cfb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/bzlib/randtable.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/bzlib/randtable.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,128 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- Table for randomising repetitive blocks               ---*/</div><div class='del'>-/*---                                           randtable.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-</div><div class='del'>-/*--</div><div class='del'>-  This file is a part of bzip2 and/or libbzip2, a program and</div><div class='del'>-  library for lossless, block-sorting data compression.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1996-2000 Julian R Seward.  All rights reserved.</div><div class='del'>-</div><div class='del'>-  Redistribution and use in source and binary forms, with or without</div><div class='del'>-  modification, are permitted provided that the following conditions</div><div class='del'>-  are met:</div><div class='del'>-</div><div class='del'>-  1. Redistributions of source code must retain the above copyright</div><div class='del'>-     notice, this list of conditions and the following disclaimer.</div><div class='del'>-</div><div class='del'>-  2. The origin of this software must not be misrepresented; you must </div><div class='del'>-     not claim that you wrote the original software.  If you use this </div><div class='del'>-     software in a product, an acknowledgment in the product </div><div class='del'>-     documentation would be appreciated but is not required.</div><div class='del'>-</div><div class='del'>-  3. Altered source versions must be plainly marked as such, and must</div><div class='del'>-     not be misrepresented as being the original software.</div><div class='del'>-</div><div class='del'>-  4. The name of the author may not be used to endorse or promote </div><div class='del'>-     products derived from this software without specific prior written </div><div class='del'>-     permission.</div><div class='del'>-</div><div class='del'>-  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS</div><div class='del'>-  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</div><div class='del'>-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>-  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</div><div class='del'>-  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</div><div class='del'>-  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div class='del'>-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</div><div class='del'>-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</div><div class='del'>-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-</div><div class='del'>-  Julian Seward, Cambridge, UK.</div><div class='del'>-  jseward@acm.org</div><div class='del'>-  bzip2/libbzip2 version 1.0 of 21 March 2000</div><div class='del'>-</div><div class='del'>-  This program is based on (at least) the work of:</div><div class='del'>-     Mike Burrows</div><div class='del'>-     David Wheeler</div><div class='del'>-     Peter Fenwick</div><div class='del'>-     Alistair Moffat</div><div class='del'>-     Radford Neal</div><div class='del'>-     Ian H. Witten</div><div class='del'>-     Robert Sedgewick</div><div class='del'>-     Jon L. Bentley</div><div class='del'>-</div><div class='del'>-  For more information on these sources, see the manual.</div><div class='del'>---*/</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_CONFIG_H</div><div class='del'>-#include &lt;config.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "bzlib_private.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*---------------------------------------------*/</div><div class='del'>-Int32 BZ2_rNums[512] = { </div><div class='del'>-   619, 720, 127, 481, 931, 816, 813, 233, 566, 247, </div><div class='del'>-   985, 724, 205, 454, 863, 491, 741, 242, 949, 214, </div><div class='del'>-   733, 859, 335, 708, 621, 574, 73, 654, 730, 472, </div><div class='del'>-   419, 436, 278, 496, 867, 210, 399, 680, 480, 51, </div><div class='del'>-   878, 465, 811, 169, 869, 675, 611, 697, 867, 561, </div><div class='del'>-   862, 687, 507, 283, 482, 129, 807, 591, 733, 623, </div><div class='del'>-   150, 238, 59, 379, 684, 877, 625, 169, 643, 105, </div><div class='del'>-   170, 607, 520, 932, 727, 476, 693, 425, 174, 647, </div><div class='del'>-   73, 122, 335, 530, 442, 853, 695, 249, 445, 515, </div><div class='del'>-   909, 545, 703, 919, 874, 474, 882, 500, 594, 612, </div><div class='del'>-   641, 801, 220, 162, 819, 984, 589, 513, 495, 799, </div><div class='del'>-   161, 604, 958, 533, 221, 400, 386, 867, 600, 782, </div><div class='del'>-   382, 596, 414, 171, 516, 375, 682, 485, 911, 276, </div><div class='del'>-   98, 553, 163, 354, 666, 933, 424, 341, 533, 870, </div><div class='del'>-   227, 730, 475, 186, 263, 647, 537, 686, 600, 224, </div><div class='del'>-   469, 68, 770, 919, 190, 373, 294, 822, 808, 206, </div><div class='del'>-   184, 943, 795, 384, 383, 461, 404, 758, 839, 887, </div><div class='del'>-   715, 67, 618, 276, 204, 918, 873, 777, 604, 560, </div><div class='del'>-   951, 160, 578, 722, 79, 804, 96, 409, 713, 940, </div><div class='del'>-   652, 934, 970, 447, 318, 353, 859, 672, 112, 785, </div><div class='del'>-   645, 863, 803, 350, 139, 93, 354, 99, 820, 908, </div><div class='del'>-   609, 772, 154, 274, 580, 184, 79, 626, 630, 742, </div><div class='del'>-   653, 282, 762, 623, 680, 81, 927, 626, 789, 125, </div><div class='del'>-   411, 521, 938, 300, 821, 78, 343, 175, 128, 250, </div><div class='del'>-   170, 774, 972, 275, 999, 639, 495, 78, 352, 126, </div><div class='del'>-   857, 956, 358, 619, 580, 124, 737, 594, 701, 612, </div><div class='del'>-   669, 112, 134, 694, 363, 992, 809, 743, 168, 974, </div><div class='del'>-   944, 375, 748, 52, 600, 747, 642, 182, 862, 81, </div><div class='del'>-   344, 805, 988, 739, 511, 655, 814, 334, 249, 515, </div><div class='del'>-   897, 955, 664, 981, 649, 113, 974, 459, 893, 228, </div><div class='del'>-   433, 837, 553, 268, 926, 240, 102, 654, 459, 51, </div><div class='del'>-   686, 754, 806, 760, 493, 403, 415, 394, 687, 700, </div><div class='del'>-   946, 670, 656, 610, 738, 392, 760, 799, 887, 653, </div><div class='del'>-   978, 321, 576, 617, 626, 502, 894, 679, 243, 440, </div><div class='del'>-   680, 879, 194, 572, 640, 724, 926, 56, 204, 700, </div><div class='del'>-   707, 151, 457, 449, 797, 195, 791, 558, 945, 679, </div><div class='del'>-   297, 59, 87, 824, 713, 663, 412, 693, 342, 606, </div><div class='del'>-   134, 108, 571, 364, 631, 212, 174, 643, 304, 329, </div><div class='del'>-   343, 97, 430, 751, 497, 314, 983, 374, 822, 928, </div><div class='del'>-   140, 206, 73, 263, 980, 736, 876, 478, 430, 305, </div><div class='del'>-   170, 514, 364, 692, 829, 82, 855, 953, 676, 246, </div><div class='del'>-   369, 970, 294, 750, 807, 827, 150, 790, 288, 923, </div><div class='del'>-   804, 378, 215, 828, 592, 281, 565, 555, 710, 82, </div><div class='del'>-   896, 831, 547, 261, 524, 462, 293, 465, 502, 56, </div><div class='del'>-   661, 821, 976, 991, 658, 869, 905, 758, 745, 193, </div><div class='del'>-   768, 550, 608, 933, 378, 286, 215, 979, 792, 961, </div><div class='del'>-   61, 688, 793, 644, 986, 403, 106, 366, 905, 644, </div><div class='del'>-   372, 567, 466, 434, 645, 210, 389, 550, 919, 135, </div><div class='del'>-   780, 773, 635, 389, 707, 100, 626, 958, 165, 504, </div><div class='del'>-   920, 176, 193, 713, 857, 265, 203, 50, 668, 108, </div><div class='del'>-   645, 990, 626, 197, 510, 357, 358, 850, 858, 364, </div><div class='del'>-   936, 638</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='del'>-/*--- end                                       randtable.c ---*/</div><div class='del'>-/*-------------------------------------------------------------*/</div><div class='head'>diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c<br/>deleted file mode 100644<br/>index ba0341b30..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/cdrom.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/cdrom.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,209 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-#include "probing.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "mount.h"</div><div class='del'>-</div><div class='del'>-#include "cdrom.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int mount_that_cd_device(char * dev_name)</div><div class='del'>-{</div><div class='del'>-	char device_fullname[50];</div><div class='del'>-</div><div class='del'>-	strcpy(device_fullname, "/dev/");</div><div class='del'>-	strcat(device_fullname, dev_name);</div><div class='del'>-</div><div class='del'>-	return my_mount(device_fullname, IMAGE_LOCATION, "iso9660", 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int test_that_cd()</div><div class='del'>-{</div><div class='del'>-	return access(IMAGE_LOCATION LIVE_LOCATION, R_OK);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type try_with_device(char * dev_name, char * dev_model);</div><div class='del'>-</div><div class='del'>-static enum return_type do_with_device(char * dev_name, char * dev_model)</div><div class='del'>-{</div><div class='del'>-	if (test_that_cd()) {</div><div class='del'>-		enum return_type results;</div><div class='del'>-		umount(IMAGE_LOCATION);</div><div class='del'>-		results = ask_yes_no("That CDROM disc does not seem to be a " DISTRIB_NAME " Installation CDROM.\nRetry with another disc?");</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			return try_with_device(dev_name, dev_model);</div><div class='del'>-		return results;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	log_message("found a " DISTRIB_NAME " CDROM, good news!");</div><div class='del'>-</div><div class='del'>-	if (IS_SPECIAL_STAGE2 || ramdisk_possible())</div><div class='del'>-		load_ramdisk(); /* we don't care about return code, we'll do it live if we failed */</div><div class='del'>-</div><div class='del'>-	if (IS_RESCUE)</div><div class='del'>-		umount(IMAGE_LOCATION);</div><div class='del'>-</div><div class='del'>-	method_name = strdup("cdrom");</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}		</div><div class='del'>-</div><div class='del'>-static enum return_type try_with_device(char * dev_name, char * dev_model)</div><div class='del'>-{</div><div class='del'>-	wait_message("Trying to access a CDROM disc (drive %s)", dev_model);</div><div class='del'>-</div><div class='del'>-	if (mount_that_cd_device(dev_name) == -1) {</div><div class='del'>-		enum return_type results;</div><div class='del'>-		char msg[500];</div><div class='del'>-		unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-		remove_wait_message();</div><div class='del'>-</div><div class='del'>-		snprintf(msg, sizeof(msg), "I can't access a " DISTRIB_NAME " Installation disc in your CDROM drive (%s).\nRetry?", dev_model);</div><div class='del'>-		results = ask_yes_no(msg);</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			return try_with_device(dev_name, dev_model);</div><div class='del'>-		return results;</div><div class='del'>-	}	</div><div class='del'>-	remove_wait_message();</div><div class='del'>-</div><div class='del'>-	return do_with_device(dev_name, dev_model);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int try_automatic(char ** medias, char ** medias_models)</div><div class='del'>-{</div><div class='del'>-	static char * already_tried[50] = { NULL };</div><div class='del'>-	char ** model = medias_models;</div><div class='del'>-	char ** ptr = medias;</div><div class='del'>-	int i = 0;</div><div class='del'>-	while (ptr &amp;&amp; *ptr) {</div><div class='del'>-		char ** p;</div><div class='del'>-		for (p = already_tried; p &amp;&amp; *p; p++)</div><div class='del'>-			if (streq(*p, *ptr)) </div><div class='del'>-				goto try_automatic_already_tried;</div><div class='del'>-		*p = strdup(*ptr);</div><div class='del'>-		*(p+1) = NULL;</div><div class='del'>-</div><div class='del'>-		wait_message("Trying to access " DISTRIB_NAME " CDROM disc (drive %s)", *model);</div><div class='del'>-		if (mount_that_cd_device(*ptr) != -1) {</div><div class='del'>-			if (!test_that_cd()) {</div><div class='del'>-				remove_wait_message();</div><div class='del'>-				return i;</div><div class='del'>-			}</div><div class='del'>-			else</div><div class='del'>-				umount(IMAGE_LOCATION);</div><div class='del'>-		}</div><div class='del'>-		remove_wait_message();</div><div class='del'>-</div><div class='del'>-	try_automatic_already_tried:</div><div class='del'>-		ptr++;</div><div class='del'>-		model++;</div><div class='del'>-		i++;</div><div class='del'>-	}</div><div class='del'>-	return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum return_type cdrom_prepare(void)</div><div class='del'>-{</div><div class='del'>-	char ** medias, ** ptr, ** medias_models;</div><div class='del'>-	char * choice;</div><div class='del'>-	int i, count = 0;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	my_insmod("ide-cd", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-	if (IS_AUTOMATIC) {</div><div class='del'>-		get_medias(CDROM, &amp;medias, &amp;medias_models, BUS_IDE);</div><div class='del'>-		if ((i = try_automatic(medias, medias_models)) != -1)</div><div class='del'>-			return do_with_device(medias[i], medias_models[i]);</div><div class='del'>-		</div><div class='del'>-		my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-		get_medias(CDROM, &amp;medias, &amp;medias_models, BUS_SCSI);</div><div class='del'>-		if ((i = try_automatic(medias, medias_models)) != -1)</div><div class='del'>-			return do_with_device(medias[i], medias_models[i]);</div><div class='del'>-		</div><div class='del'>-		get_medias(CDROM, &amp;medias, &amp;medias_models, BUS_USB);</div><div class='del'>-		if ((i = try_automatic(medias, medias_models)) != -1)</div><div class='del'>-			return do_with_device(medias[i], medias_models[i]);</div><div class='del'>-</div><div class='del'>-		unset_param(MODE_AUTOMATIC);</div><div class='del'>-	} else</div><div class='del'>-		my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	get_medias(CDROM, &amp;medias, &amp;medias_models, BUS_ANY);</div><div class='del'>-        ptr = medias;</div><div class='del'>-        while (ptr &amp;&amp; *ptr) {</div><div class='del'>-                count++;</div><div class='del'>-                ptr++;</div><div class='del'>-        }</div><div class='del'>-</div><div class='del'>-	if (count == 0) {</div><div class='del'>-		stg1_error_message("No CDROM device found.");</div><div class='del'>-		i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-		if (i == RETURN_BACK)</div><div class='del'>-			return RETURN_BACK;</div><div class='del'>-		return cdrom_prepare();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count == 1) {</div><div class='del'>-		results = try_with_device(*medias, *medias_models);</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			return RETURN_OK;</div><div class='del'>-		i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-		if (i == RETURN_BACK)</div><div class='del'>-			return RETURN_BACK;</div><div class='del'>-		return cdrom_prepare();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = ask_from_list_comments("Please choose the CDROM drive to use for the installation.", medias, medias_models, &amp;choice);</div><div class='del'>-	if (results == RETURN_OK) {</div><div class='del'>-		char ** model = medias_models;</div><div class='del'>-		ptr = medias;</div><div class='del'>-		while (ptr &amp;&amp; *ptr &amp;&amp; model &amp;&amp; *model) {</div><div class='del'>-			if (!strcmp(*ptr, choice))</div><div class='del'>-				break;</div><div class='del'>-			ptr++;</div><div class='del'>-			model++;</div><div class='del'>-		}</div><div class='del'>-			results = try_with_device(choice, *model);</div><div class='del'>-	} else</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	if (results == RETURN_OK)</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-	if (results == RETURN_BACK)</div><div class='del'>-		return cdrom_prepare();</div><div class='del'>-</div><div class='del'>-	i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-	if (i == RETURN_BACK)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-	return cdrom_prepare();</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/cdrom.h b/mdk-stage1/cdrom.h<br/>deleted file mode 100644<br/>index 639487eed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/cdrom.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/cdrom.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _CDROM_H_</div><div class='del'>-#define _CDROM_H_</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-</div><div class='del'>-enum return_type cdrom_prepare(void);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h<br/>deleted file mode 100644<br/>index 3af38a446..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/config-stage1.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/config-stage1.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,48 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _CONFIG_STAGE1_H_</div><div class='del'>-#define _CONFIG_STAGE1_H_</div><div class='del'>-</div><div class='del'>-#define _GNU_SOURCE 1</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* If we have more than that amount of memory (in Mbytes), we assume we can load the second stage as a ramdisk */</div><div class='del'>-#define MEM_LIMIT_RAMDISK 52</div><div class='del'>-</div><div class='del'>-/* If we have more than that amount of memory (in Mbytes), we assume we can load the rescue as a ramdisk */</div><div class='del'>-#define MEM_LIMIT_RESCUE 40</div><div class='del'>-</div><div class='del'>-#define DISTRIB_NAME "Mandrake Linux"</div><div class='del'>-</div><div class='del'>-#define RAMDISK_COMPRESSION_RATIO 1.95</div><div class='del'>-</div><div class='del'>-#define LIVE_LOCATION    "/Mandrake/mdkinst/"</div><div class='del'>-#define RAMDISK_LOCATION "/Mandrake/base/"</div><div class='del'>-#define IMAGE_LOCATION   "/tmp/image"</div><div class='del'>-#define STAGE2_LOCATION  "/tmp/stage2"</div><div class='del'>-</div><div class='del'>-/* user-definable (in Makefile): DISABLE_NETWORK, DISABLE_DISK, DISABLE_CDROM, DISABLE_PCMCIA */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* some factorizing for disabling more features */</div><div class='del'>-</div><div class='del'>-#ifdef DISABLE_DISK</div><div class='del'>-#ifdef DISABLE_CDROM</div><div class='del'>-#define DISABLE_MEDIAS</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c<br/>deleted file mode 100644<br/>index 32c7a932b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dhcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dhcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,679 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from GRUB  --  GRand Unified Bootloader</div><div class='del'>- * Copyright (C) 2000  Free Software Foundation, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;net/ethernet.h&gt;</div><div class='del'>-#include &lt;netinet/ip.h&gt;</div><div class='del'>-#include &lt;netinet/udp.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "network.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "automatic.h"</div><div class='del'>-</div><div class='del'>-#include "dhcp.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef int bp_int32;</div><div class='del'>-typedef short bp_int16;</div><div class='del'>-</div><div class='del'>-#define BOOTP_OPTION_NETMASK		1</div><div class='del'>-#define BOOTP_OPTION_GATEWAY		3</div><div class='del'>-#define BOOTP_OPTION_DNS		6</div><div class='del'>-#define BOOTP_OPTION_HOSTNAME		12</div><div class='del'>-#define BOOTP_OPTION_DOMAIN		15</div><div class='del'>-#define BOOTP_OPTION_BROADCAST		28</div><div class='del'>-</div><div class='del'>-#define DHCP_OPTION_REQADDR		50</div><div class='del'>-#define DHCP_OPTION_LEASE		51</div><div class='del'>-#define DHCP_OPTION_TYPE		53</div><div class='del'>-#define DHCP_OPTION_SERVER		54</div><div class='del'>-#define DHCP_OPTION_OPTIONREQ		55</div><div class='del'>-#define DHCP_OPTION_MAXSIZE		57</div><div class='del'>-</div><div class='del'>-#define DHCP_OPTION_CLIENT_IDENTIFIER	61</div><div class='del'>-</div><div class='del'>-#define BOOTP_CLIENT_PORT	68</div><div class='del'>-#define BOOTP_SERVER_PORT	67</div><div class='del'>-</div><div class='del'>-#define BOOTP_OPCODE_REQUEST	1</div><div class='del'>-#define BOOTP_OPCODE_REPLY	2</div><div class='del'>-</div><div class='del'>-#define DHCP_TYPE_DISCOVER	1</div><div class='del'>-#define DHCP_TYPE_OFFER		2</div><div class='del'>-#define DHCP_TYPE_REQUEST	3</div><div class='del'>-#define DHCP_TYPE_ACK		5</div><div class='del'>-#define DHCP_TYPE_RELEASE	7</div><div class='del'>-</div><div class='del'>-#define BOOTP_VENDOR_LENGTH	64</div><div class='del'>-#define DHCP_VENDOR_LENGTH	340</div><div class='del'>-</div><div class='del'>-struct bootp_request {</div><div class='del'>-	char opcode;</div><div class='del'>-	char hw;</div><div class='del'>-	char hwlength;</div><div class='del'>-	char hopcount;</div><div class='del'>-	bp_int32 id;</div><div class='del'>-	bp_int16 secs;</div><div class='del'>-	bp_int16 flags;</div><div class='del'>-	bp_int32 ciaddr, yiaddr, server_ip, bootp_gw_ip;</div><div class='del'>-	char hwaddr[16];</div><div class='del'>-	char servername[64];</div><div class='del'>-	char bootfile[128];</div><div class='del'>-	char vendor[DHCP_VENDOR_LENGTH];</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static const char vendor_cookie[] = { 99, 130, 83, 99, 255 };</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static unsigned int verify_checksum(void * buf2, int length2)</div><div class='del'>-{</div><div class='del'>-	unsigned int csum = 0;</div><div class='del'>-	unsigned short * sp;</div><div class='del'>-</div><div class='del'>-	for (sp = (unsigned short *) buf2; length2 &gt; 0; (length2 -= 2), sp++)</div><div class='del'>-		csum += *sp;</div><div class='del'>-	</div><div class='del'>-	while (csum &gt;&gt; 16)</div><div class='del'>-		csum = (csum &amp; 0xffff) + (csum &gt;&gt; 16);</div><div class='del'>-</div><div class='del'>-	return (csum == 0xffff);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int initial_setup_interface(char * device, int s) {</div><div class='del'>-	struct sockaddr_in * addrp;</div><div class='del'>-	struct ifreq req;</div><div class='del'>-	struct rtentry route;</div><div class='del'>-	int true = 1;</div><div class='del'>-	</div><div class='del'>-	addrp = (struct sockaddr_in *) &amp;req.ifr_addr;</div><div class='del'>-	</div><div class='del'>-	strcpy(req.ifr_name, device);</div><div class='del'>-	addrp-&gt;sin_family = AF_INET;</div><div class='del'>-	addrp-&gt;sin_port = 0;</div><div class='del'>-	memset(&amp;addrp-&gt;sin_addr, 0, sizeof(addrp-&gt;sin_addr));</div><div class='del'>-	</div><div class='del'>-	req.ifr_flags = 0; /* take it down */</div><div class='del'>-	if (ioctl(s, SIOCSIFFLAGS, &amp;req)) {</div><div class='del'>-		log_perror("SIOCSIFFLAGS (downing)");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-    </div><div class='del'>-	addrp-&gt;sin_family = AF_INET;</div><div class='del'>-	addrp-&gt;sin_addr.s_addr = htonl(0);</div><div class='del'>-	if (ioctl(s, SIOCSIFADDR, &amp;req)) {</div><div class='del'>-		log_perror("SIOCSIFADDR");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	req.ifr_flags = IFF_UP | IFF_BROADCAST | IFF_RUNNING;</div><div class='del'>-	if (ioctl(s, SIOCSIFFLAGS, &amp;req)) {</div><div class='del'>-		log_perror("SIOCSIFFLAGS (upping)");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;route, 0, sizeof(route));</div><div class='del'>-	memcpy(&amp;route.rt_gateway, addrp, sizeof(*addrp));</div><div class='del'>-	</div><div class='del'>-	addrp-&gt;sin_family = AF_INET;</div><div class='del'>-	addrp-&gt;sin_port = 0;</div><div class='del'>-	addrp-&gt;sin_addr.s_addr = INADDR_ANY;</div><div class='del'>-	memcpy(&amp;route.rt_dst, addrp, sizeof(*addrp));</div><div class='del'>-	memcpy(&amp;route.rt_genmask, addrp, sizeof(*addrp));</div><div class='del'>-	</div><div class='del'>-	route.rt_dev = device;</div><div class='del'>-	route.rt_flags = RTF_UP;</div><div class='del'>-	route.rt_metric = 0;</div><div class='del'>-	</div><div class='del'>-	if (ioctl(s, SIOCADDRT, &amp;route)) {</div><div class='del'>-		if (errno != EEXIST) {</div><div class='del'>-			close(s);</div><div class='del'>-			log_perror("SIOCADDRT");</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, &amp;true, sizeof(true))) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("setsockopt");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* I need to sleep a bit in order for kernel to finish init of the</div><div class='del'>-           network device; this would allow to not send further multiple</div><div class='del'>-           dhcp requests when only one is needed. */</div><div class='del'>-	wait_message("Bringing up networking...");</div><div class='del'>-	sleep(2);</div><div class='del'>-	remove_wait_message();</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void set_missing_ip_info(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	bp_int32 ipNum = *((bp_int32 *) &amp;intf-&gt;ip);</div><div class='del'>-	bp_int32 nmNum;</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;netmask.s_addr == 0)</div><div class='del'>-		inet_aton(guess_netmask(inet_ntoa(intf-&gt;ip)), &amp;intf-&gt;netmask);</div><div class='del'>-</div><div class='del'>-	nmNum = *((bp_int32 *) &amp;intf-&gt;netmask);</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;broadcast.s_addr == 0)</div><div class='del'>-		*((bp_int32 *) &amp;intf-&gt;broadcast) = (ipNum &amp; nmNum) | ~(nmNum);</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;network.s_addr == 0)</div><div class='del'>-		*((bp_int32 *) &amp;intf-&gt;network) = ipNum &amp; nmNum;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void parse_reply(struct bootp_request * breq, struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	unsigned char * chptr;</div><div class='del'>-	unsigned char option, length;</div><div class='del'>-</div><div class='del'>-	if (breq-&gt;bootfile &amp;&amp; strlen(breq-&gt;bootfile) &gt; 0)</div><div class='del'>-		stage2_kickstart = strdup(breq-&gt;bootfile);</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;intf-&gt;ip, &amp;breq-&gt;yiaddr, 4);</div><div class='del'>-</div><div class='del'>-	chptr = breq-&gt;vendor;</div><div class='del'>-	chptr += 4;</div><div class='del'>-	while (*chptr != 0xFF &amp;&amp; (void *) chptr &lt; (void *) breq-&gt;vendor + DHCP_VENDOR_LENGTH) {</div><div class='del'>-		char tmp_str[500];</div><div class='del'>-		option = *chptr++;</div><div class='del'>-		if (!option)</div><div class='del'>-			continue;</div><div class='del'>-		length = *chptr++;</div><div class='del'>-</div><div class='del'>-		switch (option) {</div><div class='del'>-		case BOOTP_OPTION_DNS:</div><div class='del'>-			memcpy(&amp;dns_server, chptr, sizeof(dns_server));</div><div class='del'>-			log_message("got dns %s", inet_ntoa(dns_server));</div><div class='del'>-			if (length &gt;= sizeof(dns_server)*2) {</div><div class='del'>-				memcpy(&amp;dns_server2, chptr+sizeof(dns_server), sizeof(dns_server2));</div><div class='del'>-				log_message("got dns2 %s", inet_ntoa(dns_server2));</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case BOOTP_OPTION_NETMASK:</div><div class='del'>-			memcpy(&amp;intf-&gt;netmask, chptr, sizeof(intf-&gt;netmask));</div><div class='del'>-			log_message("got netmask %s", inet_ntoa(intf-&gt;netmask));</div><div class='del'>-			break;</div><div class='del'>-		    </div><div class='del'>-		case BOOTP_OPTION_DOMAIN:</div><div class='del'>-			memcpy(tmp_str, chptr, length);</div><div class='del'>-			tmp_str[length] = '\0';</div><div class='del'>-			domain = strdup(tmp_str);</div><div class='del'>-			log_message("got domain %s", domain);</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case BOOTP_OPTION_BROADCAST:</div><div class='del'>-			memcpy(&amp;intf-&gt;broadcast, chptr, sizeof(intf-&gt;broadcast));</div><div class='del'>-			log_message("got broadcast %s", inet_ntoa(intf-&gt;broadcast));</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case BOOTP_OPTION_GATEWAY:</div><div class='del'>-			memcpy(&amp;gateway, chptr, sizeof(gateway));</div><div class='del'>-			log_message("got gateway %s", inet_ntoa(gateway));</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case BOOTP_OPTION_HOSTNAME:</div><div class='del'>-			memcpy(tmp_str, chptr, length);</div><div class='del'>-			tmp_str[length] = '\0';</div><div class='del'>-			hostname = strdup(tmp_str);</div><div class='del'>-			log_message("got hostname %s", hostname);</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		chptr += length;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	set_missing_ip_info(intf);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void init_vendor_codes(struct bootp_request * breq) {</div><div class='del'>-	memcpy(breq-&gt;vendor, vendor_cookie, sizeof(vendor_cookie));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char gen_hwaddr[16];</div><div class='del'>-</div><div class='del'>-static int prepare_request(struct bootp_request * breq, int sock, char * device)</div><div class='del'>-{</div><div class='del'>-	struct ifreq req;</div><div class='del'>-	</div><div class='del'>-	memset(breq, 0, sizeof(*breq));</div><div class='del'>-	</div><div class='del'>-	breq-&gt;opcode = BOOTP_OPCODE_REQUEST;</div><div class='del'>-	</div><div class='del'>-	strcpy(req.ifr_name, device);</div><div class='del'>-	if (ioctl(sock, SIOCGIFHWADDR, &amp;req)) {</div><div class='del'>-		log_perror("SIOCSIFHWADDR");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	breq-&gt;hw = 1; 		/* ethernet */</div><div class='del'>-	breq-&gt;hwlength = IFHWADDRLEN;	</div><div class='del'>-	memcpy(breq-&gt;hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN);</div><div class='del'>-	memcpy(gen_hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN);</div><div class='del'>-	</div><div class='del'>-	breq-&gt;hopcount = 0;</div><div class='del'>-	</div><div class='del'>-	init_vendor_codes(breq);</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int get_vendor_code(struct bootp_request * bresp, unsigned char option, void * data)</div><div class='del'>-{</div><div class='del'>-	unsigned char * chptr;</div><div class='del'>-	unsigned int length, theOption;</div><div class='del'>-	</div><div class='del'>-	chptr = bresp-&gt;vendor + 4;</div><div class='del'>-	while (*chptr != 0xFF &amp;&amp; *chptr != option) {</div><div class='del'>-		theOption = *chptr++;</div><div class='del'>-		if (!theOption)</div><div class='del'>-			continue;</div><div class='del'>-		length = *chptr++;</div><div class='del'>-		chptr += length;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (*chptr++ == 0xff)</div><div class='del'>-		return 1;</div><div class='del'>-	</div><div class='del'>-	length = *chptr++;</div><div class='del'>-	memcpy(data, chptr, length);</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static unsigned long currticks(void)</div><div class='del'>-{</div><div class='del'>-	struct timeval tv;</div><div class='del'>-	unsigned long csecs;</div><div class='del'>-	unsigned long ticks_per_csec, ticks_per_usec;</div><div class='del'>-	</div><div class='del'>-	/* Note: 18.2 ticks/sec.  */</div><div class='del'>-	</div><div class='del'>-	gettimeofday (&amp;tv, 0);</div><div class='del'>-	csecs = tv.tv_sec / 10;</div><div class='del'>-	ticks_per_csec = csecs * 182;</div><div class='del'>-	ticks_per_usec = (((tv.tv_sec - csecs * 10) * 1000000 + tv.tv_usec) * 182 / 10000000);</div><div class='del'>-	return ticks_per_csec + ticks_per_usec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define BACKOFF_LIMIT 7</div><div class='del'>-#define	TICKS_PER_SEC 18</div><div class='del'>-#define MAX_ARP_RETRIES	4</div><div class='del'>-</div><div class='del'>-static void rfc951_sleep(int exp)</div><div class='del'>-{</div><div class='del'>-	static long seed = 0;</div><div class='del'>-	long q;</div><div class='del'>-	unsigned long tmo;</div><div class='del'>-	</div><div class='del'>-	if (exp &gt; BACKOFF_LIMIT)</div><div class='del'>-		exp = BACKOFF_LIMIT;</div><div class='del'>-	</div><div class='del'>-	if (!seed)</div><div class='del'>-		/* Initialize linear congruential generator.  */</div><div class='del'>-		seed = (currticks () + *(long *) &amp;gen_hwaddr + ((short *) gen_hwaddr)[2]);</div><div class='del'>-  </div><div class='del'>-	/* Simplified version of the LCG given in Bruce Scheier's</div><div class='del'>-	   "Applied Cryptography".  */</div><div class='del'>-	q = seed / 53668;</div><div class='del'>-	if ((seed = 40014 * (seed - 53668 * q) - 12211 * q) &lt; 0)</div><div class='del'>-		seed += 2147483563l;</div><div class='del'>-	</div><div class='del'>-	/* Compute mask.  */</div><div class='del'>-	for (tmo = 63; tmo &lt;= 60 * TICKS_PER_SEC &amp;&amp; --exp &gt; 0; tmo = 2 * tmo + 1)</div><div class='del'>-		;</div><div class='del'>-  </div><div class='del'>-	/* Sleep.  */</div><div class='del'>-	log_message("&lt;sleep&gt;");</div><div class='del'>-	</div><div class='del'>-	for (tmo = (tmo &amp; seed) + currticks (); currticks () &lt; tmo;);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int handle_transaction(int s, struct bootp_request * breq, struct bootp_request * bresp,</div><div class='del'>-			      struct sockaddr_in * server_addr, int dhcp_type)</div><div class='del'>-{</div><div class='del'>-	struct pollfd polls;</div><div class='del'>-	int i, j;</div><div class='del'>-	int retry = 1;</div><div class='del'>-	int sin;</div><div class='del'>-	char eth_packet[ETH_FRAME_LEN];</div><div class='del'>-	struct iphdr * ip_hdr;</div><div class='del'>-	struct udphdr * udp_hdr;</div><div class='del'>-	unsigned char type;</div><div class='del'>-	unsigned long starttime;</div><div class='del'>-	int timeout = 1;</div><div class='del'>-</div><div class='del'>-	breq-&gt;id = starttime = currticks();</div><div class='del'>-	breq-&gt;secs = 0;</div><div class='del'>-</div><div class='del'>-	sin = socket(AF_PACKET, SOCK_DGRAM, ntohs(ETH_P_IP));</div><div class='del'>-	if (sin &lt; 0) {</div><div class='del'>-		log_perror("af_packet socket");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (retry &lt;= MAX_ARP_RETRIES) {</div><div class='del'>-		i = sizeof(*breq);</div><div class='del'>-</div><div class='del'>-		if (sendto(s, breq, i, 0, (struct sockaddr *) server_addr, sizeof(*server_addr)) != i) {</div><div class='del'>-			close(s);</div><div class='del'>-			log_perror("sendto");</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-		</div><div class='del'>-		polls.fd = sin;</div><div class='del'>-		polls.events = POLLIN;</div><div class='del'>-</div><div class='del'>-		while (poll(&amp;polls, 1, timeout*1000) == 1) {</div><div class='del'>-</div><div class='del'>-			if ((j = recv(sin, eth_packet, sizeof(eth_packet), 0)) == -1) {</div><div class='del'>-				log_perror("recv");</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			</div><div class='del'>-			/* We need to do some basic sanity checking of the header */</div><div class='del'>-			if (j &lt; (signed)(sizeof(*ip_hdr) + sizeof(*udp_hdr)))</div><div class='del'>-				continue;</div><div class='del'>-			</div><div class='del'>-			ip_hdr = (void *) eth_packet;</div><div class='del'>-			if (!verify_checksum(ip_hdr, sizeof(*ip_hdr)))</div><div class='del'>-				continue;</div><div class='del'>-</div><div class='del'>-			if (ntohs(ip_hdr-&gt;tot_len) &gt; j)</div><div class='del'>-				continue;</div><div class='del'>-</div><div class='del'>-			j = ntohs(ip_hdr-&gt;tot_len);</div><div class='del'>-			</div><div class='del'>-			if (ip_hdr-&gt;protocol != IPPROTO_UDP)</div><div class='del'>-				continue;</div><div class='del'>-			</div><div class='del'>-			udp_hdr = (void *) (eth_packet + sizeof(*ip_hdr));</div><div class='del'>-</div><div class='del'>-			if (ntohs(udp_hdr-&gt;source) != BOOTP_SERVER_PORT)</div><div class='del'>-				continue;</div><div class='del'>-			</div><div class='del'>-			if (ntohs(udp_hdr-&gt;dest) != BOOTP_CLIENT_PORT)</div><div class='del'>-				continue;</div><div class='del'>-			/* Go on with this packet; it looks sane */</div><div class='del'>-			</div><div class='del'>-			/* Originally copied sizeof (*bresp) - this is a security</div><div class='del'>-			   problem due to a potential underflow of the source</div><div class='del'>-			   buffer.  Also, it trusted that the packet was properly</div><div class='del'>-			   0xFF terminated, which is not true in the case of the</div><div class='del'>-			   DHCP server on Cisco 800 series ISDN router. */</div><div class='del'>-			</div><div class='del'>-			memset (bresp, 0xFF, sizeof (*bresp));</div><div class='del'>-			memcpy (bresp, (char *) udp_hdr + sizeof (*udp_hdr), j - sizeof (*ip_hdr) - sizeof (*udp_hdr));</div><div class='del'>-			</div><div class='del'>-			/* sanity checks */</div><div class='del'>-			if (bresp-&gt;id != breq-&gt;id)</div><div class='del'>-				continue;</div><div class='del'>-			if (bresp-&gt;opcode != BOOTP_OPCODE_REPLY)</div><div class='del'>-				continue;</div><div class='del'>-			if (bresp-&gt;hwlength != breq-&gt;hwlength)</div><div class='del'>-				continue;</div><div class='del'>-			if (memcmp(bresp-&gt;hwaddr, breq-&gt;hwaddr, bresp-&gt;hwlength))</div><div class='del'>-				continue;</div><div class='del'>-			if (get_vendor_code(bresp, DHCP_OPTION_TYPE, &amp;type) || type != dhcp_type)</div><div class='del'>-				continue;</div><div class='del'>-			if (memcmp(bresp-&gt;vendor, vendor_cookie, 4))</div><div class='del'>-				continue;</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-		rfc951_sleep(retry);</div><div class='del'>-		breq-&gt;secs = htons ((currticks () - starttime) / 20);</div><div class='del'>-		retry++;</div><div class='del'>-		timeout *= 2;</div><div class='del'>-		if (timeout &gt; 5)</div><div class='del'>-			timeout = 5;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void add_vendor_code(struct bootp_request * breq, unsigned char option, unsigned char length, void * data)</div><div class='del'>-{</div><div class='del'>-	unsigned char * chptr;</div><div class='del'>-	int theOption, theLength;</div><div class='del'>-</div><div class='del'>-	chptr = breq-&gt;vendor;</div><div class='del'>-	chptr += 4;</div><div class='del'>-	while (*chptr != 0xFF &amp;&amp; *chptr != option) {</div><div class='del'>-		theOption = *chptr++;</div><div class='del'>-		if (!theOption) continue;</div><div class='del'>-		theLength = *chptr++;</div><div class='del'>-		chptr += theLength;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	*chptr++ = option;</div><div class='del'>-	*chptr++ = length;</div><div class='del'>-	memcpy(chptr, data, length);</div><div class='del'>-	chptr[length] = 0xff;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * dhcp_hostname = NULL;</div><div class='del'>-char * dhcp_domain = NULL;</div><div class='del'>-</div><div class='del'>-enum return_type perform_dhcp(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	int s, i;</div><div class='del'>-	struct sockaddr_in server_addr;</div><div class='del'>-	struct sockaddr_in client_addr;</div><div class='del'>-	struct sockaddr_in broadcast_addr;</div><div class='del'>-	struct bootp_request breq, bresp;</div><div class='del'>-	unsigned char messageType;</div><div class='del'>-	unsigned int lease;</div><div class='del'>-	short aShort;</div><div class='del'>-	int num_options;</div><div class='del'>-	char requested_options[50];</div><div class='del'>-	char * client_id_str, * client_id_hwaddr;</div><div class='del'>-</div><div class='del'>-	if (strncmp(intf-&gt;device, "eth", 3)) {</div><div class='del'>-		stg1_error_message("DHCP available only for Ethernet networking.");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-	if (s &lt; 0) {</div><div class='del'>-		log_perror("socket");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	{</div><div class='del'>-		enum return_type results;</div><div class='del'>-		char * questions[] = { "Host name", "Domain name", NULL };</div><div class='del'>-		char * questions_auto[] = { "hostname", "domain" };</div><div class='del'>-		static char ** answers = NULL;</div><div class='del'>-		char * boulet;</div><div class='del'>-</div><div class='del'>-		client_id_str = client_id_hwaddr = NULL;</div><div class='del'>-		</div><div class='del'>-		results = ask_from_entries_auto("If the DHCP server needs to know you by name; please fill in this information. "</div><div class='del'>-						"Valid answers are for example: `mybox' for hostname and `mynetwork.com' for "</div><div class='del'>-						"domain name, for a machine called `mybox.mynetwork.com' on the Internet.",</div><div class='del'>-						questions, &amp;answers, 32, questions_auto, NULL);</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-		{</div><div class='del'>-			dhcp_hostname = answers[0];</div><div class='del'>-			if ((boulet = strchr(dhcp_hostname, '.')) != NULL)</div><div class='del'>-				boulet[0] = '\0';</div><div class='del'>-			dhcp_domain = answers[1];</div><div class='del'>-			</div><div class='del'>-			if (*dhcp_hostname &amp;&amp; *dhcp_domain) {</div><div class='del'>-				/* if we have both, then create client id from them */</div><div class='del'>-				client_id_str = malloc(1 + strlen(dhcp_hostname) + 1 + strlen(dhcp_domain) + 1);</div><div class='del'>-				client_id_str[0] = '\0';</div><div class='del'>-				sprintf(client_id_str+1, "%s.%s", dhcp_hostname, dhcp_domain);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (initial_setup_interface(intf-&gt;device, s) != 0) {</div><div class='del'>-		close(s);</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (prepare_request(&amp;breq, s, intf-&gt;device) != 0) {</div><div class='del'>-		close(s);</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	messageType = DHCP_TYPE_DISCOVER;</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_TYPE, 1, &amp;messageType);</div><div class='del'>-</div><div class='del'>-	/* add pieces needed to have DDNS/DHCP IP selection based on requested name */</div><div class='del'>-	if (dhcp_hostname &amp;&amp; *dhcp_hostname) { /* pick client id form based on absence or presence of domain name */</div><div class='del'>-		if (*dhcp_domain) /* alternate style &lt;hostname&gt;.&lt;domainname&gt; */</div><div class='del'>-			add_vendor_code(&amp;breq, DHCP_OPTION_CLIENT_IDENTIFIER, strlen(client_id_str+1)+1, client_id_str);</div><div class='del'>-		else { /* usual style (aka windows / dhcpcd) */</div><div class='del'>-			/* but put MAC in form required for client identifier first */</div><div class='del'>-			client_id_hwaddr = malloc(IFHWADDRLEN+2);</div><div class='del'>-			client_id_hwaddr[0] = 1;  /* set flag for ethernet */</div><div class='del'>-			memcpy(client_id_hwaddr+1, gen_hwaddr, IFHWADDRLEN);</div><div class='del'>-			add_vendor_code(&amp;breq, DHCP_OPTION_CLIENT_IDENTIFIER, IFHWADDRLEN+1, client_id_hwaddr);</div><div class='del'>-		}</div><div class='del'>-		/* this is the one that the dhcp server really wants for DDNS updates */</div><div class='del'>-		add_vendor_code(&amp;breq, BOOTP_OPTION_HOSTNAME, strlen(dhcp_hostname), dhcp_hostname);</div><div class='del'>-		log_message("DHCP: telling server to use name = %s", dhcp_hostname);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;client_addr.sin_addr, 0, sizeof(&amp;client_addr.sin_addr));</div><div class='del'>-	client_addr.sin_family = AF_INET;</div><div class='del'>-	client_addr.sin_port = htons(BOOTP_CLIENT_PORT);	/* bootp client */</div><div class='del'>-</div><div class='del'>-	if (bind(s, (struct sockaddr *) &amp;client_addr, sizeof(client_addr))) {</div><div class='del'>-		log_perror("bind");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	broadcast_addr.sin_family = AF_INET;</div><div class='del'>-	broadcast_addr.sin_port = htons(BOOTP_SERVER_PORT);	/* bootp server */</div><div class='del'>-	memset(&amp;broadcast_addr.sin_addr, 0xff, sizeof(broadcast_addr.sin_addr));  /* broadcast */</div><div class='del'>-</div><div class='del'>-	log_message("DHCP: sending DISCOVER");</div><div class='del'>-</div><div class='del'>-	wait_message("Sending DHCP request...");</div><div class='del'>-	i = handle_transaction(s, &amp;breq, &amp;bresp, &amp;broadcast_addr, DHCP_TYPE_OFFER);</div><div class='del'>-	remove_wait_message();</div><div class='del'>-</div><div class='del'>-	if (i != 0) {</div><div class='del'>-		stg1_error_message("No DHCP reply received.");</div><div class='del'>-		close(s);</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	server_addr.sin_family = AF_INET;</div><div class='del'>-	server_addr.sin_port = htons(BOOTP_SERVER_PORT);	/* bootp server */</div><div class='del'>-	if (get_vendor_code(&amp;bresp, DHCP_OPTION_SERVER, &amp;server_addr.sin_addr)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_message("DHCPOFFER didn't include server address");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	init_vendor_codes(&amp;breq);</div><div class='del'>-	messageType = DHCP_TYPE_REQUEST;</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_TYPE, 1, &amp;messageType);</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_SERVER, 4, &amp;server_addr.sin_addr);</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_REQADDR, 4, &amp;bresp.yiaddr);</div><div class='del'>-</div><div class='del'>-	/* if used the first time, then have to use it again */</div><div class='del'>-	if (dhcp_hostname &amp;&amp; *dhcp_hostname) { /* add pieces needed to have DDNS/DHCP IP selection based on requested name */</div><div class='del'>-		if (dhcp_domain &amp;&amp; *dhcp_domain) /* alternate style */</div><div class='del'>-			add_vendor_code(&amp;breq, DHCP_OPTION_CLIENT_IDENTIFIER, strlen(client_id_str+1)+1, client_id_str);</div><div class='del'>-		else /* usual style (aka windows / dhcpcd) */</div><div class='del'>-			add_vendor_code(&amp;breq, DHCP_OPTION_CLIENT_IDENTIFIER, IFHWADDRLEN+1, client_id_hwaddr);</div><div class='del'>-		/* this is the one that the dhcp server really wants for DDNS updates */</div><div class='del'>-		add_vendor_code(&amp;breq, BOOTP_OPTION_HOSTNAME, strlen(dhcp_hostname), dhcp_hostname);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	aShort = ntohs(sizeof(struct bootp_request));</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_MAXSIZE, 2, &amp;aShort);</div><div class='del'>-</div><div class='del'>-	num_options = 0;</div><div class='del'>-	requested_options[num_options++] = BOOTP_OPTION_NETMASK;</div><div class='del'>-	requested_options[num_options++] = BOOTP_OPTION_GATEWAY;</div><div class='del'>-	requested_options[num_options++] = BOOTP_OPTION_DNS;</div><div class='del'>-	requested_options[num_options++] = BOOTP_OPTION_DOMAIN;</div><div class='del'>-	requested_options[num_options++] = BOOTP_OPTION_BROADCAST;</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_OPTIONREQ, num_options, requested_options);</div><div class='del'>-</div><div class='del'>-	/* request a lease of 1 hour */</div><div class='del'>-	i = htonl(60 * 60);</div><div class='del'>-	add_vendor_code(&amp;breq, DHCP_OPTION_LEASE, 4, &amp;i);</div><div class='del'>-</div><div class='del'>-	log_message("DHCP: sending REQUEST");</div><div class='del'>-</div><div class='del'>-	i = handle_transaction(s, &amp;breq, &amp;bresp, &amp;broadcast_addr, DHCP_TYPE_ACK);</div><div class='del'>-</div><div class='del'>-	if (i != 0) {</div><div class='del'>-		close(s);</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (get_vendor_code(&amp;bresp, DHCP_OPTION_LEASE, &amp;lease)) {</div><div class='del'>-		log_message("failed to get lease time\n");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-	lease = ntohl(lease);</div><div class='del'>-</div><div class='del'>-	close(s);</div><div class='del'>-</div><div class='del'>-	intf-&gt;netmask.s_addr = 0;</div><div class='del'>-	intf-&gt;broadcast.s_addr = 0;</div><div class='del'>-	intf-&gt;network.s_addr = 0;</div><div class='del'>-</div><div class='del'>-	parse_reply(&amp;bresp, intf);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dhcp.h b/mdk-stage1/dhcp.h<br/>deleted file mode 100644<br/>index 71d062e9c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dhcp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dhcp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * View the homepage: http://us.mandrakesoft.com/~gc/html/stage1.html</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Portions from GRUB  --  GRand Unified Bootloader</div><div class='del'>- *  Copyright (C) 2000  Free Software Foundation, Inc.</div><div class='del'>- *</div><div class='del'>- *  Itself based on etherboot-4.6.4 by Martin Renters.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _DHCP_H_</div><div class='del'>-#define _DHCP_H_</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "network.h"</div><div class='del'>-</div><div class='del'>-enum return_type perform_dhcp(struct interface_info * intf);</div><div class='del'>-</div><div class='del'>-extern char * dhcp_hostname;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/.cvsignore b/mdk-stage1/dietlibc/.cvsignore<br/>deleted file mode 100644<br/>index 7c88cb004..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-t</div><div class='del'>-elftrunc</div><div class='del'>-mapfile</div><div class='del'>-t1</div><div class='del'>-load</div><div class='del'>-compile</div><div class='del'>-bin-alpha</div><div class='del'>-bin-arm</div><div class='del'>-bin-i386</div><div class='del'>-bin-mips</div><div class='del'>-bin-ppc</div><div class='del'>-bin-sparc</div><div class='head'>diff --git a/mdk-stage1/dietlibc/AUTHOR b/mdk-stage1/dietlibc/AUTHOR<br/>deleted file mode 100644<br/>index 6d8ab1a05..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/AUTHOR?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/AUTHOR</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-Felix von Leitner &lt;felix-dietlibc@fefe.de&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/Makefile b/mdk-stage1/dietlibc/Makefile<br/>deleted file mode 100644<br/>index b6e7b2783..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,146 +0,0 @@</div><div class='del'>-ARCH=$(shell uname -m | sed 's/i[4-9]86/i386/')</div><div class='del'>-</div><div class='del'>-OBJDIR=bin-$(ARCH)</div><div class='del'>-</div><div class='del'>-all: $(OBJDIR) $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a $(OBJDIR)/librpc.a $(OBJDIR)/diet</div><div class='del'>-</div><div class='del'>-CFLAGS=-pipe</div><div class='del'>-CROSS=</div><div class='del'>-</div><div class='del'>-VPATH=lib:libstdio:libugly:libcruft:libcrypt:libshell:liblatin1:librpc:libregex:syscalls.c</div><div class='del'>-</div><div class='del'>-SYSCALLOBJ=$(patsubst syscalls.s/%.S,$(OBJDIR)/%.o,$(wildcard syscalls.s/*.S))</div><div class='del'>-</div><div class='del'>-LIBOBJ=$(patsubst lib/%.c,$(OBJDIR)/%.o,$(wildcard lib/*.c))</div><div class='del'>-LIBUGLYOBJ=$(patsubst libugly/%.c,$(OBJDIR)/%.o,$(wildcard libugly/*.c))</div><div class='del'>-LIBSTDIOOBJ=$(patsubst libstdio/%.c,$(OBJDIR)/%.o,$(wildcard libstdio/*.c))</div><div class='del'>-LIBCRUFTOBJ=$(patsubst libcruft/%.c,$(OBJDIR)/%.o,$(wildcard libcruft/*.c))</div><div class='del'>-LIBCRYPTOBJ=$(patsubst libcrypt/%.c,$(OBJDIR)/%.o,$(wildcard libcrypt/*.c))</div><div class='del'>-LIBSHELLOBJ=$(patsubst libshell/%.c,$(OBJDIR)/%.o,$(wildcard libshell/*.c))</div><div class='del'>-</div><div class='del'>-LIBRPCOBJ=$(patsubst librpc/%.c,$(OBJDIR)/%.o,$(wildcard librpc/*.c))</div><div class='del'>-LIBREGEXOBJ=$(patsubst libregex/%.c,$(OBJDIR)/%.o,$(wildcard libregex/*.c))</div><div class='del'>-</div><div class='del'>-include $(ARCH)/Makefile.add</div><div class='del'>-</div><div class='del'>-ifeq ($(CFLAGS),-pipe)</div><div class='del'>-CFLAGS+=-O -fomit-frame-pointer</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifneq ($(DEBUG),)</div><div class='del'>-CFLAGS = -g</div><div class='del'>-COMMENT = :</div><div class='del'>-endif</div><div class='del'>-CFLAGS += -Wall -Wno-switch</div><div class='del'>-</div><div class='del'>-PWD=$(shell pwd)</div><div class='del'>-</div><div class='del'>-.SUFFIXES:</div><div class='del'>-.SUFFIXES: .S .c</div><div class='del'>-</div><div class='del'>-$(OBJDIR):</div><div class='del'>-	mkdir $@</div><div class='del'>-</div><div class='del'>-% :: %,v</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/%.o: %.S</div><div class='del'>-	$(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/%.o: %.c</div><div class='del'>-	$(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $&lt; -o $@</div><div class='del'>-	$(COMMENT) $(CROSS)strip -x -R .comment -R .note $@</div><div class='del'>-</div><div class='del'>-DIETLIBC_OBJ = $(SYSCALLOBJ) $(LIBOBJ) $(LIBSTDIOOBJ) $(LIBUGLYOBJ) \</div><div class='del'>-$(LIBCRUFTOBJ) $(LIBCRYPTOBJ) $(LIBSHELLOBJ) $(LIBREGEXOBJ) \</div><div class='del'>-$(OBJDIR)/__longjmp.o $(OBJDIR)/setjmp.o $(OBJDIR)/unified.o \</div><div class='del'>-$(OBJDIR)/mmap.o $(OBJDIR)/clone.o</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/dietlibc.a: $(DIETLIBC_OBJ) $(OBJDIR)/start.o</div><div class='del'>-	$(CROSS)ar cru $@ $(DIETLIBC_OBJ)</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/librpc.a: $(LIBRPCOBJ)</div><div class='del'>-	$(CROSS)ar cru $@ $(LIBRPCOBJ)</div><div class='del'>-</div><div class='del'>-LIBLATIN1_OBJS=$(patsubst liblatin1/%.c,$(OBJDIR)/%.o,$(wildcard liblatin1/*.c))</div><div class='del'>-$(OBJDIR)/liblatin1.a: $(LIBLATIN1_OBJS)</div><div class='del'>-	$(CROSS)ar cru $@ $^</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/libdietc.so: $(OBJDIR)/dietlibc.a</div><div class='del'>-	$(CROSS)ld -whole-archive -shared -o $@ $^</div><div class='del'>-</div><div class='del'>-$(SYSCALLOBJ): syscalls.h</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/diet: diet.c $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a</div><div class='del'>-	$(CROSS)$(CC) -Iinclude $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(PWD)\"</div><div class='del'>-	$(CROSS)strip -R .comment -R .note $@</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/compile:</div><div class='del'>-	echo 'exec gcc $(CFLAGS) -I$(PWD)/$(OBJDIR)/include -c $${1+"$$@"}' &gt; $@</div><div class='del'>-	chmod 755 $@</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/load:</div><div class='del'>-	echo 'main="$$1"; shift; exec gcc -nostdlib -o "$$main" $(PWD)/$(OBJDIR)/start.o "$$main".o $${1+"$$@"} $(PWD)/$(OBJDIR)/dietlibc.a -lgcc'  &gt; $@</div><div class='del'>-	chmod 755 $@</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a t t1 compile load exports mapfile libdietc.so</div><div class='del'>-	rm -rf bin-*</div><div class='del'>-</div><div class='del'>-tar: clean</div><div class='del'>-	rm -f armv4l</div><div class='del'>-	ln -sf arm armv4l</div><div class='del'>-	cd ..; tar cvvf dietlibc.tar.bz2 dietlibc --use=bzip2 --exclude CVS</div><div class='del'>-</div><div class='del'>-$(OBJDIR)/exports: $(OBJDIR)/dietlibc.a</div><div class='del'>-	nm -g $(OBJDIR)/dietlibc.a | grep -w T | awk '{ print $$3 }' | sort -u &gt; $(OBJDIR)/exports</div><div class='del'>-</div><div class='del'>-.PHONY: t t1</div><div class='del'>-t:</div><div class='del'>-	$(CROSS)$(CC) -g $(CFLAGS) -fno-builtin -nostdlib -Iinclude -o t t.c $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a -lgcc -Wl,-Map,mapfile</div><div class='del'>-</div><div class='del'>-t1:</div><div class='del'>-	$(CROSS)$(CC) -g -o t1 t.c</div><div class='del'>-</div><div class='del'>-install: $(OBJDIR)/start.o $(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a $(OBJDIR)/diet</div><div class='del'>-	cp $(OBJDIR)/start.o $(INSTALLPREFIX)$(prefix)/lib/dietstart.o</div><div class='del'>-	cp $(OBJDIR)/dietlibc.a $(INSTALLPREFIX)$(prefix)/lib/libdietc.a</div><div class='del'>-	cp $(OBJDIR)/liblatin1.a $(INSTALLPREFIX)$(prefix)/lib/libdietlatin1.a</div><div class='del'>-	cp $(OBJDIR)/diet $(INSTALLPREFIX)$(prefix)/bin/diet</div><div class='del'>-</div><div class='del'>-.PHONY: sparc ppc mips arm alpha i386</div><div class='del'>-</div><div class='del'>-arm sparc ppc alpha i386:</div><div class='del'>-	$(MAKE) ARCH=$@ CROSS=$@-linux- all t bin-$@/libdietc.so</div><div class='del'>-</div><div class='del'>-mips:</div><div class='del'>-	$(MAKE) ARCH=$@ CROSS=$@-linux-gnu- all t bin-$@/libdietc.so</div><div class='del'>-</div><div class='del'>-cross:</div><div class='del'>-	$(MAKE) arm sparc ppc alpha i386 mips</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for large file backward compatibility</div><div class='del'>-$(OBJDIR)/__fstat64.o $(OBJDIR)/__lstat64.o $(OBJDIR)/__stat64.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for thread support</div><div class='del'>-$(OBJDIR)/alloc.o $(OBJDIR)/perror.o $(OBJDIR)/logging.o $(OBJDIR)/unified.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for linker warnings</div><div class='del'>-$(OBJDIR)/assert_fail.o $(OBJDIR)/sprintf.o $(OBJDIR)/vsnprintf.o $(OBJDIR)/___div.o $(OBJDIR)/fflush.o $(OBJDIR)/setvbuf.o $(OBJDIR)/system.o $(OBJDIR)/sendfile.o $(OBJDIR)/setenv.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for buffered stdio</div><div class='del'>-fclose.o $(OBJDIR)/fdglue.o $(OBJDIR)/fflush.o $(OBJDIR)/fgetc.o $(OBJDIR)/fputc.o $(OBJDIR)/fread.o $(OBJDIR)/fseek.o $(OBJDIR)/printf.o $(OBJDIR)/setvbuf.o $(OBJDIR)/stderr.o $(OBJDIR)/stdin.o $(OBJDIR)/stdout.o $(OBJDIR)/fwrite.o $(OBJDIR)/puts.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for fast string routines</div><div class='del'>-strcasecmp.o $(OBJDIR)/strcat.o $(OBJDIR)/strchr.o $(OBJDIR)/strcmp.o $(OBJDIR)/strcpy.o $(OBJDIR)/strlen.o $(OBJDIR)/strncasecmp.o $(OBJDIR)/strncat.o $(OBJDIR)/strrchr.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for /proc</div><div class='del'>-$(OBJDIR)/tty.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for ungetc support ;-)</div><div class='del'>-$(OBJDIR)/ungetc.o: dietfeatures.h</div><div class='del'>-</div><div class='del'>-# these depend on dietfeatures.h for WANT_TZFILE_PARSER</div><div class='del'>-$(OBJDIR)/localtime_r.o: dietfeatures.h</div><div class='head'>diff --git a/mdk-stage1/dietlibc/README b/mdk-stage1/dietlibc/README<br/>deleted file mode 100644<br/>index ce9838832..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-diet libc to statically link programs that don't need all the bloat</div><div class='del'>-from glibc.</div><div class='del'>-</div><div class='del'>-malloc, printf and scanf contributed from Olaf Dreesen.</div><div class='del'>-</div><div class='del'>-To compile:</div><div class='del'>-</div><div class='del'>-	$ make</div><div class='del'>-</div><div class='del'>-make should compile the diet libc itself without warnings.  In addition</div><div class='del'>-to the diet libc, the default make target includes t, which is a test</div><div class='del'>-program and probably contains code which produces warnings.  You can</div><div class='del'>-safely ignore them.</div><div class='del'>-</div><div class='del'>-When make is done, it will have created dietlibc.a in bin-i386 (or</div><div class='del'>-bin-ppc, bin-alpha, bin-sparc, bin-ppc or bin-arm, depending on your</div><div class='del'>-architecture).  In that directory you will also find a program called</div><div class='del'>-"diet", which you need to copy in a directory in your $PATH:</div><div class='del'>-</div><div class='del'>-	# install bin-i386/diet /usr/local/bin</div><div class='del'>-</div><div class='del'>-Then you can compile programs by prepending diet to the command line,</div><div class='del'>-i.e.</div><div class='del'>-</div><div class='del'>-	$ diet gcc -s -Os -pipe -o t t.c</div><div class='del'>-</div><div class='del'>-diet is cross-compiler friendly and can also be used like this:</div><div class='del'>-</div><div class='del'>-	$ diet sparc-linux-gcc -o t t.c</div><div class='del'>-</div><div class='del'>-diet will then link against dietlibc.a from bin-sparc, of course.</div><div class='del'>-diet comes with a man page (diet.1), which you can copy to an</div><div class='del'>-appropriate location, too:</div><div class='del'>-</div><div class='del'>-	# cp diet.1 /usr/local/man/man1</div><div class='del'>-</div><div class='del'>-After you compiled the diet libc successfully, I invite you to check out</div><div class='del'>-the embedded utils (http://www.fefe.de/embutils/) and the diet libc</div><div class='del'>-binary repository (ftp://foobar.math.fu-berlin.de/pub/dietlibc/), too.</div><div class='del'>-The embedded utils are small replacements for common utilities like mv,</div><div class='del'>-chown, ls, and even a small tar that can extract tar files.  The binary</div><div class='del'>-repository contains a few utilities I linked against the diet libc, for</div><div class='del'>-example gzip, bzip2 and fdisk.</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/Makefile.add b/mdk-stage1/dietlibc/alpha/Makefile.add<br/>deleted file mode 100644<br/>index 10ff0faef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/Makefile.add?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/Makefile.add</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-</div><div class='del'>-CFLAGS+=-Os -Iinclude -fomit-frame-pointer -fstrict-aliasing</div><div class='del'>-VPATH:=alpha:syscalls.s:$(VPATH)</div><div class='del'>-</div><div class='del'>-LIBOBJ+=$(patsubst %,$(OBJDIR)/%,divq.o divl.o remq.o reml.o seteuid.o __time.o)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/__longjmp.S b/mdk-stage1/dietlibc/alpha/__longjmp.S<br/>deleted file mode 100644<br/>index d86d76717..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/__longjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/__longjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,38 +0,0 @@</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-</div><div class='del'>-.global __longjmp</div><div class='del'>-__longjmp:</div><div class='del'>-	mov	$17, $0 	/* a1 -&gt; v0 */</div><div class='del'>-</div><div class='del'>-	ldq	 $9, (JB_S0*8) ($16)	/* s0 */</div><div class='del'>-	ldq	$10, (JB_S1*8) ($16)	/* s1 */</div><div class='del'>-	ldq	$11, (JB_S2*8) ($16)	/* s2 */</div><div class='del'>-	ldq	$12, (JB_S3*8) ($16)	/* s3 */</div><div class='del'>-	ldq	$13, (JB_S4*8) ($16)	/* s4 */</div><div class='del'>-	ldq	$14, (JB_S5*8) ($16)	/* s5 */</div><div class='del'>-</div><div class='del'>-	ldq	$26, (JB_PC*8) ($16)	/* ra */</div><div class='del'>-	ldq	$fp, (JB_FP*8) ($16)	/* fp */</div><div class='del'>-	ldq	 $1, (JB_SP*8) ($16)	/* sp */</div><div class='del'>-</div><div class='del'>-	ldt	$f2, (JB_F2*8) ($16)	/* f2 */</div><div class='del'>-	ldt	$f3, (JB_F3*8) ($16)	/* f3 */</div><div class='del'>-	ldt	$f4, (JB_F4*8) ($16)	/* f4 */</div><div class='del'>-	ldt	$f5, (JB_F5*8) ($16)	/* f5 */</div><div class='del'>-	ldt	$f6, (JB_F6*8) ($16)	/* f6 */</div><div class='del'>-	ldt	$f7, (JB_F7*8) ($16)	/* f7 */</div><div class='del'>-	ldt	$f8, (JB_F8*8) ($16)	/* f8 */</div><div class='del'>-	ldt	$f9, (JB_F9*8) ($16)	/* f9 */</div><div class='del'>-</div><div class='del'>-	cmoveq	 $0, 0x1, $0</div><div class='del'>-	mov	 $1, $sp</div><div class='del'>-</div><div class='del'>-	ret	$31, ($26), 1</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/__time.c b/mdk-stage1/dietlibc/alpha/__time.c<br/>deleted file mode 100644<br/>index 07275e0e3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/__time.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/__time.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-time_t time(time_t *foo) {</div><div class='del'>-  struct timeval tv;</div><div class='del'>-  time_t tmp=(time_t)-1;</div><div class='del'>-  if (gettimeofday(&amp;tv,0)==0)</div><div class='del'>-    tmp=(time_t)tv.tv_sec;</div><div class='del'>-  if (foo) *foo=tmp;</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/accept.S b/mdk-stage1/dietlibc/alpha/accept.S<br/>deleted file mode 100644<br/>index 459c45d7a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/accept.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/accept.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(accept,accept,__libc_accept)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/bind.S b/mdk-stage1/dietlibc/alpha/bind.S<br/>deleted file mode 100644<br/>index 86a04cb70..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/bind.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/bind.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(bind,bind)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/clone.S b/mdk-stage1/dietlibc/alpha/clone.S<br/>deleted file mode 100644<br/>index b7e32d707..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/clone.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/clone.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.weak clone</div><div class='del'>-clone:</div><div class='del'>-.global __clone</div><div class='del'>-.type __clone,@function</div><div class='del'>-__clone:</div><div class='del'>-	ldiq	$0, EINVAL</div><div class='del'>-	beq	$16, .Lerror</div><div class='del'>-	beq	$17, .Lerror</div><div class='del'>-</div><div class='del'>-	subq	$17, 16, $17</div><div class='del'>-	stq	$16, 0($17)</div><div class='del'>-	stq	$19, 8($17)</div><div class='del'>-	mov	$18, $16</div><div class='del'>-</div><div class='del'>-	lda	$0, __NR_clone($31)</div><div class='del'>-	callsys</div><div class='del'>-	bne	$19, .Lerror</div><div class='del'>-</div><div class='del'>-	beq	$0, .Lstart_thread</div><div class='del'>-</div><div class='del'>-	ret	$31, ($26), 0x01</div><div class='del'>-</div><div class='del'>-.Lerror:</div><div class='del'>-	jmp	error_unified_syscall</div><div class='del'>-</div><div class='del'>-.Lstart_thread:</div><div class='del'>-	clr	$fp</div><div class='del'>-</div><div class='del'>-	ldq	$27, 0($sp)</div><div class='del'>-	ldq	$16, 8($sp)</div><div class='del'>-</div><div class='del'>-	jsr	$26, ($27), 0x04</div><div class='del'>-</div><div class='del'>-	ldgp	$gp, 0($26)</div><div class='del'>-	mov	$0,  $16</div><div class='del'>-	jsr	$26, exit</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/connect.S b/mdk-stage1/dietlibc/alpha/connect.S<br/>deleted file mode 100644<br/>index c191ca808..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/connect.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/connect.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(connect,connect,__libc_connect)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/divl.S b/mdk-stage1/dietlibc/alpha/divl.S<br/>deleted file mode 100644<br/>index 3af22a5e8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/divl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/divl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,101 +0,0 @@</div><div class='del'>-/* taken from glibc 2.2 */</div><div class='del'>-</div><div class='del'>-	.set noreorder</div><div class='del'>-	.set noat</div><div class='del'>-</div><div class='del'>-	.ent __divlu</div><div class='del'>-	.globl __divlu</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__divlu :</div><div class='del'>-	lda	$30 , - 48 ($30 )</div><div class='del'>-	.frame	$30 , 48 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-.Ludiv:</div><div class='del'>-	stq	$1 , 0($30 )</div><div class='del'>-	zapnot  $25   ,15,  $1</div><div class='del'>-	stq	$2 , 8($30 )</div><div class='del'>-	zapnot  $24   ,15,  $2</div><div class='del'>-	stq	$0 , 16($30 )</div><div class='del'>-	clr	$27</div><div class='del'>-	stq	$3  , 24($30 )</div><div class='del'>-	ldiq	$0  , 1</div><div class='del'>-	 stq $4   ,32($30 )</div><div class='del'>-	beq	$1  , .Ldivbyzero</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-1:	cmpult	$1  , $2  , $at</div><div class='del'>-	s8addq	$1  , $31 , $1</div><div class='del'>-	s8addq	$0  , $31 , $0</div><div class='del'>-	bne	$at  , 1b</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-3:	 addq $27    ,$0  , $4</div><div class='del'>-	srl	$0  , 1, $0</div><div class='del'>-	cmpule	$1  , $2  , $at</div><div class='del'>-	subq	$2  , $1  , $3</div><div class='del'>-	 cmovne $at   ,$4  , $27</div><div class='del'>-	srl	$1  , 1, $1</div><div class='del'>-	cmovne	$at  , $3  , $2</div><div class='del'>-	bne	$0  , 3b</div><div class='del'>-</div><div class='del'>-.Ldone:	ldq	$1 , 0($30 )</div><div class='del'>-	ldq	$2 , 8($30 )</div><div class='del'>-	ldq	$0 , 16($30 )</div><div class='del'>-	ldq	$3  , 24($30 )</div><div class='del'>-	 ldq $4   ,32($30 )</div><div class='del'>-	lda	$30 , 48 ($30 )</div><div class='del'>-	ret	$31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-.Ldivbyzero:</div><div class='del'>-	mov	$16 , $3</div><div class='del'>-	ldiq	$16 , -2</div><div class='del'>-	call_pal 170</div><div class='del'>-	mov	$3  , $16</div><div class='del'>-	clr	$27</div><div class='del'>-	br	.Ldone</div><div class='del'>-</div><div class='del'>-	.end __divlu</div><div class='del'>-</div><div class='del'>-	.ent __divl</div><div class='del'>-	.globl __divl</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__divl :</div><div class='del'>-	lda	$30 , - 48 ($30 )</div><div class='del'>-	.frame	$30 , 48 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-	or	$24  , $25  , $at</div><div class='del'>-	sextl  $at  , $at</div><div class='del'>-	bge	$at , .Ludiv</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	stq	$24  , 0($30 )</div><div class='del'>-	negl  $24   ,  $at</div><div class='del'>-	stq	$25  , 8($30 )</div><div class='del'>-	cmovge	$at , $at , $24</div><div class='del'>-	stq	$23  , 16($30 )</div><div class='del'>-	negl  $25   ,  $at</div><div class='del'>-	stq	$3  , 24($30 )</div><div class='del'>-	cmovge	$at , $at , $25</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	bsr	$23  , __divlu</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	ldq	$24  , 0($30 )</div><div class='del'>-	ldq	$25  , 8($30 )</div><div class='del'>-	xor $24  , $25  ,  $at</div><div class='del'>-	negl  $27   ,  $3</div><div class='del'>-	sextl  $at  , $at</div><div class='del'>-	ldq	$23  , 16($30 )</div><div class='del'>-	cmovlt	$at , $3  , $27</div><div class='del'>-	ldq	$3  , 24($30 )</div><div class='del'>-</div><div class='del'>-	lda	$30 , 48 ($30 )</div><div class='del'>-	ret	$31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-	.end	__divl</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/divq.S b/mdk-stage1/dietlibc/alpha/divq.S<br/>deleted file mode 100644<br/>index cf70862c4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/divq.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/divq.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,102 +0,0 @@</div><div class='del'>-/* taken from glibc 2.2 */</div><div class='del'>-</div><div class='del'>-        .set noreorder</div><div class='del'>-        .set noat</div><div class='del'>-</div><div class='del'>-        .ent __divqu</div><div class='del'>-        .globl __divqu</div><div class='del'>-</div><div class='del'>-        .align 3</div><div class='del'>-__divqu :</div><div class='del'>-        lda     $30 , - 48 ($30 )</div><div class='del'>-        .frame  $30 , 48 , $23  , 0</div><div class='del'>-        .prologue 0</div><div class='del'>-$udiv:</div><div class='del'>-        stq     $1 , 0($30 )</div><div class='del'>-        mov  $25   ,  $1</div><div class='del'>-        stq     $2 , 8($30 )</div><div class='del'>-        mov  $24   ,  $2</div><div class='del'>-        stq     $0 , 16($30 )</div><div class='del'>-        clr     $27</div><div class='del'>-        stq     $3  , 24($30 )</div><div class='del'>-        ldiq    $0  , 1</div><div class='del'>-         stq $4   ,32($30 )</div><div class='del'>-        beq     $1  , $divbyzero</div><div class='del'>-</div><div class='del'>-        .align 3</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-1:      cmpult  $1  , $2  , $at</div><div class='del'>-        blt     $1  , 2f</div><div class='del'>-        addq    $1  , $1  , $1</div><div class='del'>-        addq    $0  , $0  , $0</div><div class='del'>-        bne     $at  , 1b</div><div class='del'>-        unop</div><div class='del'>-2:</div><div class='del'>-3:       addq $27    ,$0  , $4</div><div class='del'>-        srl     $0  , 1, $0</div><div class='del'>-        cmpule  $1  , $2  , $at</div><div class='del'>-        subq    $2  , $1  , $3</div><div class='del'>-         cmovne $at   ,$4  , $27</div><div class='del'>-        srl     $1  , 1, $1</div><div class='del'>-        cmovne  $at  , $3  , $2</div><div class='del'>-        bne     $0  , 3b</div><div class='del'>-</div><div class='del'>-$done:  ldq     $1 , 0($30 )</div><div class='del'>-        ldq     $2 , 8($30 )</div><div class='del'>-        ldq     $0 , 16($30 )</div><div class='del'>-        ldq     $3  , 24($30 )</div><div class='del'>-         ldq $4   ,32($30 )</div><div class='del'>-        lda     $30 , 48 ($30 )</div><div class='del'>-        ret     $31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-$divbyzero:</div><div class='del'>-        mov     $16 , $3</div><div class='del'>-        ldiq    $16 , -2</div><div class='del'>-        call_pal 170</div><div class='del'>-        mov     $3  , $16</div><div class='del'>-        clr     $27</div><div class='del'>-        br      $done</div><div class='del'>-</div><div class='del'>-        .end __divqu</div><div class='del'>-</div><div class='del'>-        .ent __divq</div><div class='del'>-        .globl __divq</div><div class='del'>-</div><div class='del'>-        .align 3</div><div class='del'>-__divq :</div><div class='del'>-        lda     $30 , - 48 ($30 )</div><div class='del'>-        .frame  $30 , 48 , $23  , 0</div><div class='del'>-        .prologue 0</div><div class='del'>-        or      $24  , $25  , $at</div><div class='del'>-</div><div class='del'>-        bge     $at , $udiv</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        stq     $24  , 0($30 )</div><div class='del'>-        negq  $24   ,  $at</div><div class='del'>-        stq     $25  , 8($30 )</div><div class='del'>-        cmovge  $at , $at , $24</div><div class='del'>-        stq     $23  , 16($30 )</div><div class='del'>-        negq  $25   ,  $at</div><div class='del'>-        stq     $3  , 24($30 )</div><div class='del'>-        cmovge  $at , $at , $25</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        bsr     $23  , __divqu</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        ldq     $24  , 0($30 )</div><div class='del'>-        ldq     $25  , 8($30 )</div><div class='del'>-        xor $24  , $25  ,  $at</div><div class='del'>-        negq  $27   ,  $3</div><div class='del'>-</div><div class='del'>-        ldq     $23  , 16($30 )</div><div class='del'>-        cmovlt  $at , $3  , $27</div><div class='del'>-        ldq     $3  , 24($30 )</div><div class='del'>-</div><div class='del'>-        lda     $30 , 48 ($30 )</div><div class='del'>-        ret     $31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-        .end    __divq</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getegid.S b/mdk-stage1/dietlibc/alpha/getegid.S<br/>deleted file mode 100644<br/>index 89c35d45e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getegid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getegid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.global getegid</div><div class='del'>-getegid:</div><div class='del'>-	lda	$sp,-8($sp)</div><div class='del'>-	stq	$26, 0($sp)</div><div class='del'>-	jsr	getgid</div><div class='del'>-	ldq	$26, 0($sp)</div><div class='del'>-	lda	$sp, 8($sp)</div><div class='del'>-	cmovge	$0, $20, $0</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/geteuid.S b/mdk-stage1/dietlibc/alpha/geteuid.S<br/>deleted file mode 100644<br/>index 087ca7348..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/geteuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/geteuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.global geteuid</div><div class='del'>-geteuid:</div><div class='del'>-	lda	$sp,-8($sp)</div><div class='del'>-	stq	$26, 0($sp)</div><div class='del'>-	jsr	getuid</div><div class='del'>-	ldq	$26, 0($sp)</div><div class='del'>-	lda	$sp, 8($sp)</div><div class='del'>-	cmovge	$0, $20, $0</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getgid.S b/mdk-stage1/dietlibc/alpha/getgid.S<br/>deleted file mode 100644<br/>index 7350082f3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getxgid,getgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getpeername.S b/mdk-stage1/dietlibc/alpha/getpeername.S<br/>deleted file mode 100644<br/>index 3b3f48b1a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getpeername.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getpeername.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getpeername,getpeername)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getpid.S b/mdk-stage1/dietlibc/alpha/getpid.S<br/>deleted file mode 100644<br/>index d8b3523b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getpid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getpid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getxpid,getpid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getppid.S b/mdk-stage1/dietlibc/alpha/getppid.S<br/>deleted file mode 100644<br/>index e181268c3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getppid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getppid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.global getppid</div><div class='del'>-getppid:</div><div class='del'>-	lda	$sp,-8($sp)</div><div class='del'>-	stq	$26, 0($sp)</div><div class='del'>-	jsr	getpid</div><div class='del'>-	ldq	$26, 0($sp)</div><div class='del'>-	lda	$sp, 8($sp)</div><div class='del'>-	cmovge	$0, $20, $0</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getsockname.S b/mdk-stage1/dietlibc/alpha/getsockname.S<br/>deleted file mode 100644<br/>index 2727d88da..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getsockname.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getsockname.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getsockname,getsockname)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getsockopt.S b/mdk-stage1/dietlibc/alpha/getsockopt.S<br/>deleted file mode 100644<br/>index 44b4a910a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getsockopt.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getsockopt.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getsockopt,getsockopt)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/getuid.S b/mdk-stage1/dietlibc/alpha/getuid.S<br/>deleted file mode 100644<br/>index fcb5570c2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/getuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/getuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getxuid,getuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/listen.S b/mdk-stage1/dietlibc/alpha/listen.S<br/>deleted file mode 100644<br/>index 1102831d4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/listen.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/listen.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(listen,listen)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/mmap.S b/mdk-stage1/dietlibc/alpha/mmap.S<br/>deleted file mode 100644<br/>index 2e57fbb74..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/mmap.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/mmap.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mmap,mmap)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/msgctl.S b/mdk-stage1/dietlibc/alpha/msgctl.S<br/>deleted file mode 100644<br/>index d7caed2cc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/msgctl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/msgctl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(msgctl,msgctl)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/msgget.S b/mdk-stage1/dietlibc/alpha/msgget.S<br/>deleted file mode 100644<br/>index 518d67ac4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/msgget.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/msgget.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(msgget,msgget)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/msgrcv.S b/mdk-stage1/dietlibc/alpha/msgrcv.S<br/>deleted file mode 100644<br/>index ab62e6c30..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/msgrcv.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/msgrcv.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(msgrcv,msgrcv)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/msgsnd.S b/mdk-stage1/dietlibc/alpha/msgsnd.S<br/>deleted file mode 100644<br/>index 890a996a2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/msgsnd.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/msgsnd.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(msgsnd,msgsnd)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/pipe.S b/mdk-stage1/dietlibc/alpha/pipe.S<br/>deleted file mode 100644<br/>index 3dfef10bf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/pipe.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/pipe.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.global pipe</div><div class='del'>-.type pipe,@function</div><div class='del'>-pipe:</div><div class='del'>-        lda     $0, __NR_pipe($31)</div><div class='del'>-        callsys</div><div class='del'>-        bne     $19, .Lerror</div><div class='del'>-        stl     $0,  0($16)</div><div class='del'>-        stl     $20, 4($16)</div><div class='del'>-        clr     $0</div><div class='del'>-        ret     $31, ($26), 0x01</div><div class='del'>-.Lerror:</div><div class='del'>-        br      error_unified_syscall</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/recv.S b/mdk-stage1/dietlibc/alpha/recv.S<br/>deleted file mode 100644<br/>index 17664f2e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/recv.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/recv.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(recv,recv,__libc_recv)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/recvfrom.S b/mdk-stage1/dietlibc/alpha/recvfrom.S<br/>deleted file mode 100644<br/>index d8e3922af..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/recvfrom.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/recvfrom.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(recvfrom,recvfrom,__libc_recvfrom)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/recvmsg.S b/mdk-stage1/dietlibc/alpha/recvmsg.S<br/>deleted file mode 100644<br/>index 6ce87eebb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/recvmsg.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/recvmsg.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(recvmsg,recvmsg)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/reml.S b/mdk-stage1/dietlibc/alpha/reml.S<br/>deleted file mode 100644<br/>index 2d89e3280..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/reml.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/reml.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,101 +0,0 @@</div><div class='del'>-/* taken from glibc 2.2 */</div><div class='del'>-</div><div class='del'>-	.set noreorder</div><div class='del'>-	.set noat</div><div class='del'>-</div><div class='del'>-	.ent __remlu</div><div class='del'>-	.globl __remlu</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__remlu :</div><div class='del'>-	lda	$30 , -32($30)</div><div class='del'>-	.frame	$30 , 32 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-.Ludiv:</div><div class='del'>-	stq	$1  , 0($30)</div><div class='del'>-	zapnot	$25 , 15 , $1</div><div class='del'>-	stq	$2  , 8($30)</div><div class='del'>-	zapnot  $24 , 15 , $27</div><div class='del'>-	stq	$0  , 16($30)</div><div class='del'>-	clr	$2</div><div class='del'>-	stq	$3  , 24($30)</div><div class='del'>-	ldiq	$0  , 1</div><div class='del'>-</div><div class='del'>-	beq	$1  , .Ldivbyzero</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-1:	cmpult	$1  , $27 , $at</div><div class='del'>-	s8addq	$1  , $31 , $1</div><div class='del'>-	s8addq	$0  , $31 , $0</div><div class='del'>-	bne	$at , 1b</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-3:</div><div class='del'>-	srl	$0  , 1 , $0</div><div class='del'>-	cmpule	$1  , $27 , $at</div><div class='del'>-	subq	$27 , $1 , $3</div><div class='del'>-</div><div class='del'>-	srl	$1  , 1  , $1</div><div class='del'>-	cmovne	$at , $3  , $27</div><div class='del'>-	bne	$0  , 3b</div><div class='del'>-</div><div class='del'>-.Ldone:	ldq	$1 , 0($30)</div><div class='del'>-	ldq	$2 , 8($30)</div><div class='del'>-	ldq	$0 , 16($30)</div><div class='del'>-	ldq	$3 , 24($30)</div><div class='del'>-</div><div class='del'>-	lda	$30 , 32($30)</div><div class='del'>-	ret	$31 , ($23), 1</div><div class='del'>-</div><div class='del'>-.Ldivbyzero:</div><div class='del'>-	mov	$16 , $3</div><div class='del'>-	ldiq	$16 , -2</div><div class='del'>-	call_pal 170</div><div class='del'>-	mov	$3  , $16</div><div class='del'>-	clr	$27</div><div class='del'>-	br	.Ldone</div><div class='del'>-</div><div class='del'>-	.end __remlu</div><div class='del'>-</div><div class='del'>-	.ent __reml</div><div class='del'>-	.globl __reml</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__reml :</div><div class='del'>-	lda	$30 , - 32 ($30 )</div><div class='del'>-	.frame	$30 , 32 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-	or	$24 , $25  , $at</div><div class='del'>-	sextl	$at , $at</div><div class='del'>-	bge	$at , .Ludiv</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	stq	$24 , 0($30 )</div><div class='del'>-	negl	$24 ,  $at</div><div class='del'>-	stq	$25 , 8($30 )</div><div class='del'>-	cmovge	$at , $at , $24</div><div class='del'>-	stq	$23 , 16($30 )</div><div class='del'>-	negl	$25 ,  $at</div><div class='del'>-	stq	$3  , 24($30 )</div><div class='del'>-	cmovge	$at , $at , $25</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	bsr	$23 , __remlu</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	ldq	$24 , 0($30 )</div><div class='del'>-	ldq	$25 , 8($30 )</div><div class='del'>-	mov	$24 ,  $at</div><div class='del'>-	negl	$27 ,  $3</div><div class='del'>-	sextl	$at , $at</div><div class='del'>-	ldq	$23 , 16($30 )</div><div class='del'>-	cmovlt	$at , $3  , $27</div><div class='del'>-	ldq	$3  , 24($30 )</div><div class='del'>-</div><div class='del'>-	lda	$30 , 32 ($30 )</div><div class='del'>-	ret	$31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-	.end	__reml</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/remq.S b/mdk-stage1/dietlibc/alpha/remq.S<br/>deleted file mode 100644<br/>index 713484da3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/remq.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/remq.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-/* taken from glibc 2.2 */</div><div class='del'>-</div><div class='del'>-	.set noreorder</div><div class='del'>-	.set noat</div><div class='del'>-</div><div class='del'>-	.ent __remqu</div><div class='del'>-	.globl __remqu</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__remqu :</div><div class='del'>-	lda	$30 , - 32 ($30 )</div><div class='del'>-	.frame	$30 , 32 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-.Ludiv:</div><div class='del'>-	stq	$1  , 0($30 )</div><div class='del'>-	mov	$25 ,  $1</div><div class='del'>-	stq	$2  , 8($30 )</div><div class='del'>-	mov	$24 ,  $27</div><div class='del'>-	stq	$0  , 16($30 )</div><div class='del'>-	clr	$2</div><div class='del'>-	stq	$3  , 24($30 )</div><div class='del'>-	ldiq	$0  , 1</div><div class='del'>-</div><div class='del'>-	beq	$1  , .Ldivbyzero</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-</div><div class='del'>-1:	cmpult	$1  , $27   , $at</div><div class='del'>-	blt	$1  , 2f</div><div class='del'>-	addq	$1  , $1  , $1</div><div class='del'>-	addq	$0  , $0  , $0</div><div class='del'>-	bne	$at , 1b</div><div class='del'>-	unop</div><div class='del'>-2:</div><div class='del'>-3:</div><div class='del'>-	srl	$0  , 1, $0</div><div class='del'>-	cmpule	$1  , $27   , $at</div><div class='del'>-	subq	$27 , $1  , $3</div><div class='del'>-</div><div class='del'>-	srl	$1  , 1, $1</div><div class='del'>-	cmovne	$at , $3  , $27</div><div class='del'>-	bne	$0  , 3b</div><div class='del'>-</div><div class='del'>-.Ldone:	ldq	$1  , 0($30 )</div><div class='del'>-	ldq	$2  , 8($30 )</div><div class='del'>-	ldq	$0  , 16($30 )</div><div class='del'>-	ldq	$3  , 24($30 )</div><div class='del'>-</div><div class='del'>-	lda	$30 , 32 ($30 )</div><div class='del'>-	ret	$31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-.Ldivbyzero:</div><div class='del'>-	mov	$16 , $3</div><div class='del'>-	ldiq	$16 , -2</div><div class='del'>-	call_pal 170</div><div class='del'>-	mov	$3  , $16</div><div class='del'>-	clr	$27</div><div class='del'>-	br	.Ldone</div><div class='del'>-</div><div class='del'>-	.end __remqu</div><div class='del'>-</div><div class='del'>-	.ent __remq</div><div class='del'>-	.globl __remq</div><div class='del'>-</div><div class='del'>-	.align 3</div><div class='del'>-__remq :</div><div class='del'>-	lda	$30 , - 32 ($30 )</div><div class='del'>-	.frame	$30 , 32 , $23  , 0</div><div class='del'>-	.prologue 0</div><div class='del'>-	or	$24  , $25  , $at</div><div class='del'>-</div><div class='del'>-	bge	$at , .Ludiv</div><div class='del'>-</div><div class='del'>-	stq	$24 , 0($30 )</div><div class='del'>-	negq	$24 , $at</div><div class='del'>-	stq	$25 , 8($30 )</div><div class='del'>-	cmovge	$at , $at , $24</div><div class='del'>-	stq	$23 , 16($30 )</div><div class='del'>-	negq	$25 , $at</div><div class='del'>-	stq	$3  , 24($30 )</div><div class='del'>-	cmovge	$at , $at , $25</div><div class='del'>-</div><div class='del'>-	bsr	$23 , __remqu</div><div class='del'>-</div><div class='del'>-	ldq	$24 , 0($30 )</div><div class='del'>-	ldq	$25 , 8($30 )</div><div class='del'>-	mov	$24 ,  $at</div><div class='del'>-	negq	$27 ,  $3</div><div class='del'>-</div><div class='del'>-	ldq	$23 , 16($30 )</div><div class='del'>-	cmovlt	$at , $3  , $27</div><div class='del'>-	ldq	$3  , 24($30 )</div><div class='del'>-</div><div class='del'>-	lda	$30 , 32 ($30 )</div><div class='del'>-	ret	$31 , ($23  ), 1</div><div class='del'>-</div><div class='del'>-	.end	__remq</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/semctl.S b/mdk-stage1/dietlibc/alpha/semctl.S<br/>deleted file mode 100644<br/>index e215ed955..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/semctl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/semctl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(semctl,semctl)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/semget.S b/mdk-stage1/dietlibc/alpha/semget.S<br/>deleted file mode 100644<br/>index 67f488546..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/semget.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/semget.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(semget,semget)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/semop.S b/mdk-stage1/dietlibc/alpha/semop.S<br/>deleted file mode 100644<br/>index 81b6fc606..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/semop.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/semop.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(semop,semop)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/send.S b/mdk-stage1/dietlibc/alpha/send.S<br/>deleted file mode 100644<br/>index cfd11be2a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/send.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/send.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(send,send,__libc_send)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/sendmsg.S b/mdk-stage1/dietlibc/alpha/sendmsg.S<br/>deleted file mode 100644<br/>index 14646ad68..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/sendmsg.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/sendmsg.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sendmsg,sendmsg)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/sendto.S b/mdk-stage1/dietlibc/alpha/sendto.S<br/>deleted file mode 100644<br/>index 17a033011..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/sendto.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/sendto.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(sendto,sendto,__libc_sendto)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/seteuid.c b/mdk-stage1/dietlibc/alpha/seteuid.c<br/>deleted file mode 100644<br/>index a7cf47893..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/seteuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/seteuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#undef seteuid</div><div class='del'>-int seteuid(uid_t euid) {</div><div class='del'>-  return setreuid(-1,euid);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/setjmp.S b/mdk-stage1/dietlibc/alpha/setjmp.S<br/>deleted file mode 100644<br/>index 3768056be..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/setjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/setjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __sigsetjmp</div><div class='del'>-__sigsetjmp:</div><div class='del'>-	ldgp	$gp,  0($gp)</div><div class='del'>-</div><div class='del'>-	mov	$sp, $1</div><div class='del'>-	lda	$sp, -16($sp)</div><div class='del'>-</div><div class='del'>-	stq	$26, 0($sp)	/* save ra */</div><div class='del'>-</div><div class='del'>-	stq	 $9, (JB_S0*8) ($16)	/* s0 */</div><div class='del'>-	stq	$10, (JB_S1*8) ($16)	/* s1 */</div><div class='del'>-	stq	$11, (JB_S2*8) ($16)	/* s2 */</div><div class='del'>-	stq	$12, (JB_S3*8) ($16)	/* s3 */</div><div class='del'>-	stq	$13, (JB_S4*8) ($16)	/* s4 */</div><div class='del'>-	stq	$14, (JB_S5*8) ($16)	/* s5 */</div><div class='del'>-</div><div class='del'>-	stq	$26, (JB_PC*8) ($16)	/* ra */</div><div class='del'>-	stq	$fp, (JB_FP*8) ($16)	/* fp */</div><div class='del'>-	stq	 $1, (JB_SP*8) ($16)	/* sp */</div><div class='del'>-</div><div class='del'>-	stt	$f2, (JB_F2*8) ($16)	/* f2 */</div><div class='del'>-	stt	$f3, (JB_F3*8) ($16)	/* f3 */</div><div class='del'>-	stt	$f4, (JB_F4*8) ($16)	/* f4 */</div><div class='del'>-	stt	$f5, (JB_F5*8) ($16)	/* f5 */</div><div class='del'>-	stt	$f6, (JB_F6*8) ($16)	/* f6 */</div><div class='del'>-	stt	$f7, (JB_F7*8) ($16)	/* f7 */</div><div class='del'>-	stt	$f8, (JB_F8*8) ($16)	/* f8 */</div><div class='del'>-	stt	$f9, (JB_F9*8) ($16)	/* f9 */</div><div class='del'>-</div><div class='del'>-	br	$26, __sigjmp_save	/* call __sigjmp_save */</div><div class='del'>-</div><div class='del'>-	ldq	$26, 0($sp)	/* restore ra */</div><div class='del'>-</div><div class='del'>-	lda	$sp, 16($sp)</div><div class='del'>-	ret	$31, ($26), 1	/* back to caller */</div><div class='del'>-</div><div class='del'>-.weak setjmp</div><div class='del'>-setjmp:</div><div class='del'>-.weak __setjmp</div><div class='del'>-__setjmp:</div><div class='del'>-	ldgp	$gp,  0($gp)</div><div class='del'>-	mov	0, $17</div><div class='del'>-	br	__sigsetjmp</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/setsockopt.S b/mdk-stage1/dietlibc/alpha/setsockopt.S<br/>deleted file mode 100644<br/>index e3fe1d321..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/setsockopt.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/setsockopt.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setsockopt,setsockopt)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/shmat.S b/mdk-stage1/dietlibc/alpha/shmat.S<br/>deleted file mode 100644<br/>index 51248173d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/shmat.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/shmat.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(shmat,shmat)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/shmctl.S b/mdk-stage1/dietlibc/alpha/shmctl.S<br/>deleted file mode 100644<br/>index d56caace4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/shmctl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/shmctl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(shmctl,shmctl)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/shmdt.S b/mdk-stage1/dietlibc/alpha/shmdt.S<br/>deleted file mode 100644<br/>index d9812a799..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/shmdt.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/shmdt.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(shmdt,shmdt)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/shmget.S b/mdk-stage1/dietlibc/alpha/shmget.S<br/>deleted file mode 100644<br/>index 82914223f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/shmget.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/shmget.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(shmget,shmget)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/shutdown.S b/mdk-stage1/dietlibc/alpha/shutdown.S<br/>deleted file mode 100644<br/>index 9b5139325..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/shutdown.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/shutdown.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(shutdown,shutdown)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/signal.S b/mdk-stage1/dietlibc/alpha/signal.S<br/>deleted file mode 100644<br/>index ceca0f02d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/signal.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/signal.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(osf_signal,signal)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/sigprocmask.S b/mdk-stage1/dietlibc/alpha/sigprocmask.S<br/>deleted file mode 100644<br/>index d9da836c2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/sigprocmask.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/sigprocmask.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(osf_sigprocmask,sigprocmask,__sigprocmask)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/socket.S b/mdk-stage1/dietlibc/alpha/socket.S<br/>deleted file mode 100644<br/>index 85401f56e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/socket.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/socket.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(socket,socket)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/socketcall.S b/mdk-stage1/dietlibc/alpha/socketcall.S<br/>deleted file mode 100644<br/>index b150bd5d5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/socketcall.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/socketcall.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Doesn't exist on alpha ( accept, bind, ... are SYSCALLS !?! )</div><div class='del'>- */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/start.S b/mdk-stage1/dietlibc/alpha/start.S<br/>deleted file mode 100644<br/>index 00b8e950d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/start.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/start.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#include "start.h"</div><div class='del'>-</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-	.set noreorder</div><div class='del'>-</div><div class='del'>-.global __start</div><div class='del'>-__start:</div><div class='del'>-.global _start</div><div class='del'>-_start:</div><div class='del'>-	clr	$fp		/* clear frame pointer */</div><div class='del'>-</div><div class='del'>-	br	$gp,.Lstart	/* set global pointer */</div><div class='del'>-.Lstart:</div><div class='del'>-	ldgp	$gp, 0($gp)</div><div class='del'>-</div><div class='del'>-/* prepare to call main */</div><div class='del'>-	ldl	$16, 0($sp)	/* argc */</div><div class='del'>-</div><div class='del'>-	lda	$17, 8($sp)	/* argv */</div><div class='del'>-</div><div class='del'>-	addq	$16,   1, $18	/* argp */</div><div class='del'>-	s8addq	$18, $17, $18	/* (8*(argc+1))+argv -&gt; argp  */</div><div class='del'>-</div><div class='del'>-	stq	$18, environ</div><div class='del'>-</div><div class='del'>-	mov	 $0, $21	/* mov v0(dynload) to a5 */</div><div class='del'>-</div><div class='del'>-	jsr	$26, main</div><div class='del'>-	mov	 $0, $16</div><div class='del'>-	jsr	$26, exit	/* YES, CALL! for threads and atexit ! (+4 byte) */</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/strlen.c b/mdk-stage1/dietlibc/alpha/strlen.c<br/>deleted file mode 100644<br/>index ac532254a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/strlen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/strlen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-static const unsigned long long magic = 0x0101010101010101LL;</div><div class='del'>-</div><div class='del'>-size_t strlen(const char *s)</div><div class='del'>-{</div><div class='del'>-  const char *t = s;</div><div class='del'>-  unsigned long long word;</div><div class='del'>-</div><div class='del'>-  if (!s) return 0;</div><div class='del'>-</div><div class='del'>-  /* Byte compare up until 64 bit word boundary */</div><div class='del'>-  for (; ((unsigned long long) t &amp; 7); t++)</div><div class='del'>-    if (!*t) return t - s;</div><div class='del'>-</div><div class='del'>-  /* Word compare */</div><div class='del'>-  do {</div><div class='del'>-    word = *((unsigned long long *) t); t += 8;</div><div class='del'>-    word = (word - magic) &amp;~ word;</div><div class='del'>-    word &amp;= (magic &lt;&lt; 7);</div><div class='del'>-  } while (word == 0);</div><div class='del'>-</div><div class='del'>-  /* word &amp; 0x8080808080808080 == word */</div><div class='del'>-  word = (word - 1) &amp; (magic &lt;&lt; 8);</div><div class='del'>-  word += (word &lt;&lt; 32);</div><div class='del'>-  word += (word &lt;&lt; 16);</div><div class='del'>-  word += (word &lt;&lt; 8);</div><div class='del'>-  t += word &gt;&gt; 56;</div><div class='del'>-  return ((const char *) t) - 8 - s;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/time.S b/mdk-stage1/dietlibc/alpha/time.S<br/>deleted file mode 100644<br/>index e69de29bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/time.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/time.S</a><br/>+++ /dev/null</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/unified.S b/mdk-stage1/dietlibc/alpha/unified.S<br/>deleted file mode 100644<br/>index 02a1c9bcd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/unified.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/unified.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-#include &lt;dietfeatures.h&gt;</div><div class='del'>-</div><div class='del'>-.global __unified_syscall</div><div class='del'>-__unified_syscall:</div><div class='del'>-	callsys</div><div class='del'>-	bne	$19, .Lerror</div><div class='del'>-	ret	$31, ($26), 0x01</div><div class='del'>-</div><div class='del'>-.Lerror:</div><div class='del'>-.global error_unified_syscall</div><div class='del'>-error_unified_syscall:</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	lda	$sp, -16($sp)	/* alloc 2 qwords on stack */</div><div class='del'>-	stq	$26, 0($sp)	/* save ra to stack */</div><div class='del'>-	stq	$0,  8($sp)	/* save v0 to stack */</div><div class='del'>-</div><div class='del'>-	jsr	$26, __errno_location	/* call __errno_location */</div><div class='del'>-</div><div class='del'>-	ldq	$1,  8($sp)	/* write old v0 to errno */</div><div class='del'>-	stl	$1,  0($0)</div><div class='del'>-</div><div class='del'>-	lda	$0,  -1($31)	/* new return value is -1 */</div><div class='del'>-	ldq	$26, 0($sp)	/* restore return address */</div><div class='del'>-	lda	$sp, 16($sp)	/* free 2 qwords on stack */</div><div class='del'>-#else</div><div class='del'>-	lda	$1,  errno</div><div class='del'>-	stl	$0,  0($1)</div><div class='del'>-#endif</div><div class='del'>-	ret	$31, ($26), 0x01  /* return */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/utime.S b/mdk-stage1/dietlibc/alpha/utime.S<br/>deleted file mode 100644<br/>index a9a8aada6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/utime.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/utime.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(utimes,utime)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/alpha/waitpid.S b/mdk-stage1/dietlibc/alpha/waitpid.S<br/>deleted file mode 100644<br/>index 6dc1c99db..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/alpha/waitpid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/alpha/waitpid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;syscalls.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 2</div><div class='del'>-.weak waitpid</div><div class='del'>-waitpid:</div><div class='del'>-.global __libc_waitpid</div><div class='del'>-__libc_waitpid:</div><div class='del'>-	clr	$19</div><div class='del'>-	br	wait4</div><div class='head'>diff --git a/mdk-stage1/dietlibc/diet.c b/mdk-stage1/dietlibc/diet.c<br/>deleted file mode 100644<br/>index 1de6befc8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/diet.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/diet.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,112 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-/* goal:</div><div class='del'>- *   when invoked as</div><div class='del'>- * "diet gcc -c t.c"</div><div class='del'>- *   exec</div><div class='del'>- * "gcc -I/path/to/dietlibc/include -c t.c"</div><div class='del'>- *</div><div class='del'>- *   when invoked as</div><div class='del'>- * "diet sparc-linux-gcc -o t t.o"</div><div class='del'>- *   exec</div><div class='del'>- * "sparc-linux-gcc -nostdlib -static -o t t.o /path/to/dietlibc/bin-sparc/start.o /path/to/dietlibc/bin-sparc/dietlibc.a"</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-void error(const char *message) {</div><div class='del'>-  write(2,message,strlen(message));</div><div class='del'>-  exit(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int main(int argc,char *argv[]) {</div><div class='del'>-  int link=0;</div><div class='del'>-  int compile=0;</div><div class='del'>-  char diethome[]=DIETHOME;</div><div class='del'>-  char platform[1000]=DIETHOME "/bin-";</div><div class='del'>-  char *nostdlib="-nostdlib";</div><div class='del'>-  char *libgcc="-lgcc";</div><div class='del'>-  char dashL[1000]="-L";</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  if (argc&lt;2) {</div><div class='del'>-    error("usage: diet [gcc command line]\n"</div><div class='del'>-	  "e.g.   diet gcc -c t.c\n"</div><div class='del'>-	  "or     diet sparc-linux-gcc -o foo foo.c bar.o\n");</div><div class='del'>-  }</div><div class='del'>-  {</div><div class='del'>-    char *tmp=strchr(argv[1],0)-2;</div><div class='del'>-    char *tmp2;</div><div class='del'>-    char *cc=argv[1];</div><div class='del'>-    if (tmp&lt;cc) goto donttouch;</div><div class='del'>-    if ((tmp2=strchr(cc,'-'))) {	/* cross compiling? */</div><div class='del'>-      int len=strlen(platform);</div><div class='del'>-      if (tmp2-cc&gt;90) error("platform name too long!\n");</div><div class='del'>-      memmove(platform+len,argv[1],tmp2-cc);</div><div class='del'>-      platform[tmp2-cc+len]=0;</div><div class='del'>-/*      printf("found platform %s\n",platform); */</div><div class='del'>-    } else {</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-      strcat(platform,"sparc");</div><div class='del'>-#endif</div><div class='del'>-#ifdef __ppc__</div><div class='del'>-      strcat(platform,"ppc");</div><div class='del'>-#endif</div><div class='del'>-#ifdef __i386__</div><div class='del'>-      strcat(platform,"i386");</div><div class='del'>-#endif</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-      strcat(platform,"alpha");</div><div class='del'>-#endif</div><div class='del'>-#ifdef __arm__</div><div class='del'>-      strcat(platform,"arm");</div><div class='del'>-#endif</div><div class='del'>-#ifdef __mips__</div><div class='del'>-      strcat(platform,"mips");</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-    strcat(dashL,platform);</div><div class='del'>-    if (!strcmp(tmp,"cc")) {</div><div class='del'>-      char **newargv;</div><div class='del'>-      char **dest;</div><div class='del'>-      char *a,*b,*c;</div><div class='del'>-/* we need to add -I... if the command line contains -c, -S or -E */</div><div class='del'>-      for (i=2; i&lt;argc; ++i)</div><div class='del'>-	if (!strcmp(argv[i],"-c") || !strcmp(argv[i],"-S") || !strcmp(argv[i],"-E"))</div><div class='del'>-	  compile=1;</div><div class='del'>-/* we need to add -nostdlib if we are not compiling*/</div><div class='del'>-      link=!compile;</div><div class='del'>-#if 0</div><div class='del'>-      for (i=2; i&lt;argc; ++i)</div><div class='del'>-	if (!strcmp(argv[i],"-o"))</div><div class='del'>-	  if (!compile) link=1;</div><div class='del'>-#endif</div><div class='del'>-      newargv=alloca(sizeof(char*)*(argc+6));</div><div class='del'>-      a=alloca(strlen(diethome)+20);</div><div class='del'>-      b=alloca(strlen(platform)+20);</div><div class='del'>-      c=alloca(strlen(platform)+20);</div><div class='del'>-</div><div class='del'>-      strcpy(a,"-I"); strcat(a,diethome); strcat(a,"/include");</div><div class='del'>-      strcpy(b,platform); strcat(b,"/start.o");</div><div class='del'>-      strcpy(c,platform); strcat(c,"/dietlibc.a");</div><div class='del'>-</div><div class='del'>-      dest=newargv;</div><div class='del'>-      *dest++=argv[1];</div><div class='del'>-      if (link) { *dest++=nostdlib; *dest++=dashL; }</div><div class='del'>-      if (compile || link) *dest++=a;</div><div class='del'>-      for (i=2; i&lt;argc; ++i)</div><div class='del'>-	*dest++=argv[i];</div><div class='del'>-      if (link) { *dest++=b; *dest++=c; *dest++=libgcc; }</div><div class='del'>-      *dest=0;</div><div class='del'>-      execvp(newargv[0],newargv);</div><div class='del'>-      goto error;</div><div class='del'>-    } else if (!strcmp(tmp,"ld")) {</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-donttouch:</div><div class='del'>-  execvp(argv[1],argv+1);</div><div class='del'>-error:</div><div class='del'>-  error("execvp failed!\n");</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dietdirent.h b/mdk-stage1/dietlibc/dietdirent.h<br/>deleted file mode 100644<br/>index d732cf7dc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dietdirent.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dietdirent.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-struct __dirstream {</div><div class='del'>-  int fd;</div><div class='del'>-  char buf[1024];</div><div class='del'>-  unsigned int num;</div><div class='del'>-  unsigned int cur;</div><div class='del'>-};				/* stream data from opendir() */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dietfeatures.h b/mdk-stage1/dietlibc/dietfeatures.h<br/>deleted file mode 100644<br/>index e1de38577..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dietfeatures.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dietfeatures.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>-#ifndef _DIETFEATURES_H</div><div class='del'>-#define _DIETFEATURES_H</div><div class='del'>-</div><div class='del'>-/* feel free to comment some of these out to reduce code size */</div><div class='del'>-</div><div class='del'>-//#define WANT_FLOATING_POINT_IN_PRINTF</div><div class='del'>-//#define WANT_FLOATING_POINT_IN_SCANF</div><div class='del'>-#define WANT_CHARACTER_CLASSES_IN_SCANF</div><div class='del'>-#define WANT_NULL_PRINTF</div><div class='del'>-</div><div class='del'>-#define SLASH_PROC_OK</div><div class='del'>-</div><div class='del'>-// #define WANT_BUFFERED_STDIO</div><div class='del'>-</div><div class='del'>-/* use errno_location instead of errno */</div><div class='del'>-// #define WANT_THREAD_SAFE</div><div class='del'>-</div><div class='del'>-/* make the startcode, etc. dynamic aware */</div><div class='del'>-/* #undef WANT_DYNAMIC */</div><div class='del'>-</div><div class='del'>-/* do you want smaller or faster string routines? */</div><div class='del'>-/* #define WANT_FASTER_STRING_ROUTINES */</div><div class='del'>-</div><div class='del'>-/* do you want ungetc?  makes fgetc more complex */</div><div class='del'>-#define WANT_UNGETC</div><div class='del'>-</div><div class='del'>-// #define WANT_LINKER_WARNINGS</div><div class='del'>-</div><div class='del'>-/* you need to define this if you want to run your programs with large</div><div class='del'>- * file support on kernel 2.2 or 2.4 */</div><div class='del'>-// #define WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-</div><div class='del'>-/* do you want localtime(3) to read /etc/localtime?</div><div class='del'>- * Needed for daylight saving time etc. */</div><div class='del'>-// #define WANT_TZFILE_PARSER</div><div class='del'>-</div><div class='del'>-/* stop uncommenting here ;-) */</div><div class='del'>-#ifndef WANT_FASTER_STRING_ROUTINES</div><div class='del'>-#define WANT_SMALL_STRING_ROUTINES</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dietstdarg.h b/mdk-stage1/dietlibc/dietstdarg.h<br/>deleted file mode 100644<br/>index 827671b22..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dietstdarg.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dietstdarg.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-/* this assumes that va_copy() will be a macro, it is on gcc */</div><div class='del'>-#ifndef va_copy</div><div class='del'>-# ifdef __va_copy</div><div class='del'>-#  define va_copy(x, y) __va_copy(x, y)</div><div class='del'>-# else</div><div class='del'>-/* assume copying it works... */</div><div class='del'>-#  define va_copy(x, y) x = y</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dietstdio.h b/mdk-stage1/dietlibc/dietstdio.h<br/>deleted file mode 100644<br/>index a1cbeba83..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dietstdio.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dietstdio.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,81 +0,0 @@</div><div class='del'>-/* diet stdio -- no buffering ;-} */</div><div class='del'>-</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define BUFSIZE 128</div><div class='del'>-</div><div class='del'>-typedef struct __file {</div><div class='del'>-  int fd;</div><div class='del'>-  int flags;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  unsigned int bs;	/* read: bytes in buffer */</div><div class='del'>-  unsigned int bm;	/* position in buffer */</div><div class='del'>-  char buf[BUFSIZE];</div><div class='del'>-  struct __file *next;	/* for fflush */</div><div class='del'>-#endif</div><div class='del'>-  pid_t popen_kludge;</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  char ungetbuf;</div><div class='del'>-  char ungotten;</div><div class='del'>-#endif</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-  pthread_mutex_t m;</div><div class='del'>-#endif</div><div class='del'>-} FILE;</div><div class='del'>-</div><div class='del'>-extern FILE *__stdio_root;</div><div class='del'>-</div><div class='del'>-#define ERRORINDICATOR 1</div><div class='del'>-#define EOFINDICATOR 2</div><div class='del'>-#define BUFINPUT 4</div><div class='del'>-#define BUFLINEWISE 8</div><div class='del'>-#define NOBUF 16</div><div class='del'>-#define UNSEEKABLE 32</div><div class='del'>-</div><div class='del'>-#define _IONBF 0</div><div class='del'>-#define _IOLBF 1</div><div class='del'>-#define _IOFBF 2</div><div class='del'>-</div><div class='del'>-/* internal function to flush buffer.</div><div class='del'>- * However, if next is BUFINPUT and the buffer is an input buffer, it</div><div class='del'>- * will not be flushed. Vice versa for output */</div><div class='del'>-extern int __fflush4(FILE *stream,int next);</div><div class='del'>-</div><div class='del'>-FILE *fopen (const char *path, const char *mode);</div><div class='del'>-FILE *fdopen (int fildes, const char *mode);</div><div class='del'>-FILE *freopen (const char *path, const char *mode, FILE *stream);</div><div class='del'>-</div><div class='del'>-int fgetc(FILE *stream);</div><div class='del'>-char *fgets(char *s, int size, FILE *stream);</div><div class='del'>-int getc(FILE *stream);</div><div class='del'>-int getchar(void);</div><div class='del'>-char *gets(char *s);</div><div class='del'>-int ungetc(int c, FILE *stream);</div><div class='del'>-</div><div class='del'>-int fputc(int c, FILE *stream);</div><div class='del'>-int fputs(const char *s, FILE *stream);</div><div class='del'>-int putc(int c, FILE *stream);</div><div class='del'>-int putchar(int c);</div><div class='del'>-int puts(const char *s);</div><div class='del'>-</div><div class='del'>-long fseek( FILE *stream, long offset, int whence);</div><div class='del'>-long ftell( FILE *stream);</div><div class='del'>-void rewind( FILE *stream);</div><div class='del'>-int fgetpos( FILE *stream, fpos_t *pos);</div><div class='del'>-int fsetpos( FILE *stream, fpos_t *pos);</div><div class='del'>-</div><div class='del'>-size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream);</div><div class='del'>-</div><div class='del'>-size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream);</div><div class='del'>-</div><div class='del'>-int fflush(FILE *stream);</div><div class='del'>-</div><div class='del'>-int fclose(FILE *stream);</div><div class='del'>-</div><div class='del'>-extern FILE *stdout, *stderr, *stdin;</div><div class='del'>-</div><div class='del'>-#define EOF (int)(-1)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dietwarning.h b/mdk-stage1/dietlibc/dietwarning.h<br/>deleted file mode 100644<br/>index f7c67a175..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dietwarning.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dietwarning.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LINKER_WARNINGS</div><div class='del'>-</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-</div><div class='del'>-#define link_warning(symbol,msg) \</div><div class='del'>-  asm (".section .gnu.warning." symbol "\n\t.string \"" msg "\"\n\t.previous");</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#define link_warning(symbol,msg) \</div><div class='del'>-  .section .gnu.warning.##symbol ;\</div><div class='del'>-  .string msg ;\</div><div class='del'>-  .previous</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#define link_warning(foo,bar)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/dirstream.h b/mdk-stage1/dietlibc/dirstream.h<br/>deleted file mode 100644<br/>index dc8fba79c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/dirstream.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/dirstream.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,78 +0,0 @@</div><div class='del'>-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.</div><div class='del'>-This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-modify it under the terms of the GNU Library General Public License as</div><div class='del'>-published by the Free Software Foundation; either version 2 of the</div><div class='del'>-License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-You should have received a copy of the GNU Library General Public</div><div class='del'>-License along with the GNU C Library; see the file COPYING.LIB.  If</div><div class='del'>-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,</div><div class='del'>-Cambridge, MA 02139, USA.  */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	POSIX Standard: 5.1.2 Directory Operations	&lt;dirent.h&gt;</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef	_DIRSTREAM_H</div><div class='del'>-</div><div class='del'>-#define	_DIRSTREAM_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#ifdef _POSIX_THREADS</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* For now, syscall readdir () only supports one entry at a time. It</div><div class='del'>- * will be changed in the future.</div><div class='del'>-#define NUMENT		3</div><div class='del'>-*/</div><div class='del'>-#ifndef NUMENT</div><div class='del'>-#define NUMENT		1</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define SINGLE_READDIR	11</div><div class='del'>-#define MULTI_READDIR	12</div><div class='del'>-#define NEW_READDIR	13</div><div class='del'>-</div><div class='del'>-/* Directory stream type.  */</div><div class='del'>-struct __dirstream {</div><div class='del'>-  /* file descriptor */</div><div class='del'>-  int dd_fd;</div><div class='del'>-</div><div class='del'>-  /* offset of the next dir entry in buffer */</div><div class='del'>-  off_t dd_nextloc;</div><div class='del'>-</div><div class='del'>-  /* bytes of valid entries in buffer */</div><div class='del'>-  size_t dd_size;</div><div class='del'>-</div><div class='del'>-  /* -&gt; directory buffer */</div><div class='del'>-  struct dirent *dd_buf;</div><div class='del'>-</div><div class='del'>-  /* we have to convert */</div><div class='del'>-  struct dirent convbuf;</div><div class='del'>-</div><div class='del'>-  /* offset of the next dir entry in directory. */</div><div class='del'>-  off_t dd_nextoff;</div><div class='del'>-</div><div class='del'>-  /* total size of buffer */</div><div class='del'>-  size_t dd_max;</div><div class='del'>- </div><div class='del'>-  enum {unknown, have_getdents, no_getdents} dd_getdents;</div><div class='del'>-</div><div class='del'>-  /* lock */</div><div class='del'>-#ifdef _POSIX_THREADS</div><div class='del'>-  pthread_mutex_t *dd_lock;</div><div class='del'>-#else</div><div class='del'>-  void *dd_lock;</div><div class='del'>-#endif</div><div class='del'>-};				/* stream data from opendir() */</div><div class='del'>-</div><div class='del'>-#endif /* dirent.h  */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/Makefile.add b/mdk-stage1/dietlibc/i386/Makefile.add<br/>deleted file mode 100644<br/>index b685cc360..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/Makefile.add?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/Makefile.add</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-</div><div class='del'>-CFLAGS+=-march=i386 -mcpu=i386 -Os -fomit-frame-pointer</div><div class='del'>-VPATH:=i386:syscalls.s:$(VPATH)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/__longjmp.S b/mdk-stage1/dietlibc/i386/__longjmp.S<br/>deleted file mode 100644<br/>index 098275037..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/__longjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/__longjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __longjmp</div><div class='del'>-__longjmp:</div><div class='del'>-	movl 4(%esp), %ecx	/* User's jmp_buf in %ecx.  */</div><div class='del'>-	movl 8(%esp), %eax	/* Second argument is return value.  */</div><div class='del'>-	/* Save the return address now.  */</div><div class='del'>-	movl (JB_PC*4)(%ecx), %edx</div><div class='del'>-	/* Restore registers.  */</div><div class='del'>-	movl (JB_BX*4)(%ecx), %ebx</div><div class='del'>-	movl (JB_SI*4)(%ecx), %esi</div><div class='del'>-	movl (JB_DI*4)(%ecx), %edi</div><div class='del'>-	movl (JB_BP*4)(%ecx), %ebp</div><div class='del'>-	movl (JB_SP*4)(%ecx), %esp</div><div class='del'>-	/* Jump to saved PC.  */</div><div class='del'>-	jmp *%edx</div><div class='del'>-.size __longjmp,.-__longjmp;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/__testandset.S b/mdk-stage1/dietlibc/i386/__testandset.S<br/>deleted file mode 100644<br/>index af7b4d5a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/__testandset.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/__testandset.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.global __testandset</div><div class='del'>-__testandset:</div><div class='del'>-	xorl	%eax, %eax</div><div class='del'>-	movl	0x4(%esp),%edx</div><div class='del'>-	incl	%eax</div><div class='del'>-	xchgl	%eax,(%edx)</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/clone.S b/mdk-stage1/dietlibc/i386/clone.S<br/>deleted file mode 100644<br/>index ac02eb468..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/clone.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/clone.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.weak clone</div><div class='del'>-clone:</div><div class='del'>-.global __clone</div><div class='del'>-__clone:</div><div class='del'>-	movl	4(%esp), %ecx	/* have non null thread_funcion */</div><div class='del'>-	testl	%ecx, %ecx</div><div class='del'>-	je	.Lclone_error</div><div class='del'>-</div><div class='del'>-	movl	8(%esp), %ecx	/* have non null child_stack pointer */</div><div class='del'>-	testl	%ecx, %ecx</div><div class='del'>-	je	.Lclone_error</div><div class='del'>-</div><div class='del'>-	/* put the parameter on thread stack */</div><div class='del'>-	subl	$8, %ecx</div><div class='del'>-</div><div class='del'>-	movl	16(%esp), %eax	/* arg */</div><div class='del'>-	movl	%eax, 4(%ecx)</div><div class='del'>-</div><div class='del'>-	movl	4(%esp), %eax	/* thread_func */</div><div class='del'>-	movl	%eax, 0(%ecx)</div><div class='del'>-</div><div class='del'>-	/* the syscall */</div><div class='del'>-	pushl	%ebx</div><div class='del'>-	movl	16(%esp), %ebx	/* flags */</div><div class='del'>-	movl	$__NR_clone, %eax</div><div class='del'>-	int	$0x80</div><div class='del'>-	popl	%ebx</div><div class='del'>-</div><div class='del'>-	testl	%eax, %eax</div><div class='del'>-	jl	.Lclone_error</div><div class='del'>-	je	.Lstart_thread</div><div class='del'>-	ret</div><div class='del'>-</div><div class='del'>-.Lstart_thread:</div><div class='del'>-	xorl	%ebp,%ebp</div><div class='del'>-	call	*%ebx</div><div class='del'>-	pushl	%eax</div><div class='del'>-	call	_exit</div><div class='del'>-</div><div class='del'>-.Lclone_error:</div><div class='del'>-	negl	%eax</div><div class='del'>-	pushl	%eax</div><div class='del'>-	call	__errno_location</div><div class='del'>-	popl	%ecx</div><div class='del'>-	movl	%ecx, (%eax)</div><div class='del'>-	xorl	%eax, %eax</div><div class='del'>-	decl	%eax</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/mmap.c b/mdk-stage1/dietlibc/i386/mmap.c<br/>deleted file mode 100644<br/>index 26ecb55c0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/mmap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/mmap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define __NR__mmap __NR_mmap</div><div class='del'>-_syscall1(int,_mmap,unsigned long *,buffer)</div><div class='del'>-</div><div class='del'>-char *mmap(char *addr, size_t len, int prot, int flags, int fd, unsigned long off) {</div><div class='del'>-  unsigned long buffer[6];</div><div class='del'>-  buffer[0] = (unsigned long)addr;</div><div class='del'>-  buffer[1] = (unsigned long)len;</div><div class='del'>-  buffer[2] = (unsigned long)prot;</div><div class='del'>-  buffer[3] = (unsigned long)flags;</div><div class='del'>-  buffer[4] = (unsigned long)fd;</div><div class='del'>-  buffer[5] = (unsigned long)off;</div><div class='del'>-  return (char*) _mmap(buffer);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/select.S b/mdk-stage1/dietlibc/i386/select.S<br/>deleted file mode 100644<br/>index 9e7066eae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/select.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/select.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(_newselect,select,__libc_select)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/setjmp.S b/mdk-stage1/dietlibc/i386/setjmp.S<br/>deleted file mode 100644<br/>index 9bfecf565..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/setjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/setjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,62 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-/* setjmp for i386.</div><div class='del'>-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-.section	.rodata</div><div class='del'>-.text</div><div class='del'>-.weak setjmp</div><div class='del'>-setjmp:</div><div class='del'>-.globl __setjmp</div><div class='del'>-__setjmp:</div><div class='del'>-	popl %eax		/* Pop return address.  */</div><div class='del'>-	popl %ecx		/* Pop jmp_buf.  */</div><div class='del'>-	pushl $0		/* Push zero argument.  */</div><div class='del'>-	pushl %ecx		/* Push jmp_buf.  */</div><div class='del'>-	pushl %eax		/* Push back return address.  */</div><div class='del'>-</div><div class='del'>-.globl __sigsetjmp</div><div class='del'>-__sigsetjmp:</div><div class='del'>-	movl 4(%esp), %eax	/* User's jmp_buf in %eax.  */</div><div class='del'>-	/* Save registers.  */</div><div class='del'>-	movl %ebx, (JB_BX*4)(%eax)</div><div class='del'>-	movl %esi, (JB_SI*4)(%eax)</div><div class='del'>-	movl %edi, (JB_DI*4)(%eax)</div><div class='del'>-	movl %ebp, (JB_BP*4)(%eax)</div><div class='del'>-	leal 4(%esp), %ecx	/* Save SP as it will be after we return.  */</div><div class='del'>-	movl %ecx, (JB_SP*4)(%eax)</div><div class='del'>-	movl 0(%esp), %ecx	/* Save PC we are returning to now.  */</div><div class='del'>-	movl %ecx, (JB_PC*4)(%eax)</div><div class='del'>-</div><div class='del'>-	/* Make a tail call to __sigjmp_save; it takes the same args.  */</div><div class='del'>-#ifdef	PIC</div><div class='del'>-	/* We cannot use the PLT, because it requires that %ebx be set, but</div><div class='del'>-           we can't save and restore our caller's value.  Instead, we do an</div><div class='del'>-           indirect jump through the GOT, using for the temporary register</div><div class='del'>-           %ecx, which is call-clobbered.  */</div><div class='del'>-	call L(here)</div><div class='del'>-L(here):</div><div class='del'>-	popl %ecx</div><div class='del'>-	addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ecx</div><div class='del'>-	movl C_SYMBOL_NAME(__sigjmp_save@GOT)(%ecx), %ecx</div><div class='del'>-	jmp *%ecx</div><div class='del'>-#else</div><div class='del'>-	jmp __sigjmp_save</div><div class='del'>-#endif</div><div class='del'>-.size __sigsetjmp,.-__sigsetjmp;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/start.S b/mdk-stage1/dietlibc/i386/start.S<br/>deleted file mode 100644<br/>index 167bb779c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/start.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/start.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>-#include "start.h"</div><div class='del'>-</div><div class='del'>-#ifdef __i386__</div><div class='del'>-.text</div><div class='del'>-.globl _start</div><div class='del'>-_start:</div><div class='del'>-#if 0</div><div class='del'>-	popl	%ecx</div><div class='del'>-	movl	%esp, %esi</div><div class='del'>-	leal	4(%esp,%ecx,4),%eax</div><div class='del'>-#else</div><div class='del'>-	movl (%esp),%ecx	/* %ecx = argc */</div><div class='del'>-	leal 4(%esp),%esi	/* %esi = argv */</div><div class='del'>-</div><div class='del'>-	leal 4(%esi,%ecx,4),%eax	/* eax = 4*ecx+4 = envp */</div><div class='del'>-#endif</div><div class='del'>-	pushl %eax</div><div class='del'>-	pushl %esi</div><div class='del'>-	pushl %ecx</div><div class='del'>-	movl %eax,environ</div><div class='del'>-</div><div class='del'>-#ifdef WANT_DYNAMIC</div><div class='del'>-/* in %edx we have the dynamic _fini ( register this if non null ) */</div><div class='del'>-	test	%edx, %edx</div><div class='del'>-	je	.Linit</div><div class='del'>-	push	%edx</div><div class='del'>-	call	atexit</div><div class='del'>-	pop	%edx</div><div class='del'>-.Linit:</div><div class='del'>-	call	_init</div><div class='del'>-	push	$_fini</div><div class='del'>-	call	atexit</div><div class='del'>-	pop	%edx</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	call main</div><div class='del'>-	pushl %eax</div><div class='del'>-	call exit</div><div class='del'>-.Lfefe:</div><div class='del'>-	.size	 _start,.Lfefe-_start</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/i386/unified.S b/mdk-stage1/dietlibc/i386/unified.S<br/>deleted file mode 100644<br/>index f182bdb4b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/i386/unified.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/i386/unified.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,34 +0,0 @@</div><div class='del'>-#include &lt;dietfeatures.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __unified_syscall</div><div class='del'>-__unified_syscall:</div><div class='del'>-	movzbl	%al, %eax</div><div class='del'>-	push	%edi</div><div class='del'>-	push	%esi</div><div class='del'>-	push	%ebx</div><div class='del'>-	movl	%esp,%edi</div><div class='del'>-	movl	0x10(%edi),%ebx</div><div class='del'>-	movl	0x14(%edi),%ecx</div><div class='del'>-	movl	0x18(%edi),%edx</div><div class='del'>-	movl	0x1c(%edi),%esi</div><div class='del'>-	movl	0x20(%edi),%edi</div><div class='del'>-	int	$0x80</div><div class='del'>-	cmp	$-124,%eax</div><div class='del'>-	jbe	.Lnoerror</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	movl	%eax,%ebx</div><div class='del'>-	call	__errno_location</div><div class='del'>-	neg	%ebx</div><div class='del'>-	movl	%ebx,(%eax)</div><div class='del'>-#else</div><div class='del'>-	neg	%eax</div><div class='del'>-	mov	%eax,errno</div><div class='del'>-#endif</div><div class='del'>-	xor	%eax,%eax</div><div class='del'>-	dec	%eax</div><div class='del'>-.Lnoerror:</div><div class='del'>-	pop	%ebx</div><div class='del'>-	pop	%esi</div><div class='del'>-	pop	%edi</div><div class='del'>-	ret</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/alloca.h b/mdk-stage1/dietlibc/include/alloca.h<br/>deleted file mode 100644<br/>index e69de29bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/alloca.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/alloca.h</a><br/>+++ /dev/null</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/arpa/inet.h b/mdk-stage1/dietlibc/include/arpa/inet.h<br/>deleted file mode 100644<br/>index 6d5a6dc35..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/arpa/inet.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/arpa/inet.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#ifndef _ARPA_INET_H</div><div class='del'>-#define _ARPA_INET_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-int inet_aton(const char *cp, struct in_addr *inp) __THROW;</div><div class='del'>-unsigned long int inet_addr(const char *cp) __THROW;</div><div class='del'>-unsigned long int inet_network(const char *cp) __THROW;</div><div class='del'>-char *inet_ntoa(struct in_addr in) __THROW;</div><div class='del'>-struct in_addr inet_makeaddr(int net, int host) __THROW;</div><div class='del'>-unsigned long int inet_lnaof(struct in_addr in) __THROW;</div><div class='del'>-unsigned long int inet_netof(struct in_addr in) __THROW;</div><div class='del'>-</div><div class='del'>-int inet_pton (int AF, const char* CP, void* BUF) __THROW;</div><div class='del'>-const char* inet_ntop (int AF, const void* CP, char* BUF, size_t LEN) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/arpa/nameser.h b/mdk-stage1/dietlibc/include/arpa/nameser.h<br/>deleted file mode 100644<br/>index 1ee048d66..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/arpa/nameser.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/arpa/nameser.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,217 +0,0 @@</div><div class='del'>-#ifndef _ARPA_NAMESER_H</div><div class='del'>-#define _ARPA_NAMESER_H</div><div class='del'>-</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-</div><div class='del'>-#define NS_PACKETSZ	512	/* maximum packet size */</div><div class='del'>-#define NS_MAXDNAME	1025	/* maximum domain name */</div><div class='del'>-#define NS_MAXCDNAME	255	/* maximum compressed domain name */</div><div class='del'>-#define NS_MAXLABEL	63	/* maximum length of domain label */</div><div class='del'>-#define NS_HFIXEDSZ	12	/* #/bytes of fixed data in header */</div><div class='del'>-#define NS_QFIXEDSZ	4	/* #/bytes of fixed data in query */</div><div class='del'>-#define NS_RRFIXEDSZ	10	/* #/bytes of fixed data in r record */</div><div class='del'>-#define NS_INT32SZ	4	/* #/bytes of data in a u_int32_t */</div><div class='del'>-#define NS_INT16SZ	2	/* #/bytes of data in a u_int16_t */</div><div class='del'>-#define NS_INT8SZ	1	/* #/bytes of data in a u_int8_t */</div><div class='del'>-#define NS_INADDRSZ	4	/* IPv4 T_A */</div><div class='del'>-#define NS_IN6ADDRSZ	16	/* IPv6 T_AAAA */</div><div class='del'>-#define NS_CMPRSFLGS	0xc0	/* Flag bits indicating name compression. */</div><div class='del'>-#define NS_DEFAULTPORT	53	/* For both TCP and UDP. */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Currently defined type values for resources and queries.</div><div class='del'>- */</div><div class='del'>-typedef enum __ns_type {</div><div class='del'>-	ns_t_invalid = 0,	/* Cookie. */</div><div class='del'>-	ns_t_a = 1,		/* Host address. */</div><div class='del'>-	ns_t_ns = 2,		/* Authoritative server. */</div><div class='del'>-	ns_t_md = 3,		/* Mail destination. */</div><div class='del'>-	ns_t_mf = 4,		/* Mail forwarder. */</div><div class='del'>-	ns_t_cname = 5,		/* Canonical name. */</div><div class='del'>-	ns_t_soa = 6,		/* Start of authority zone. */</div><div class='del'>-	ns_t_mb = 7,		/* Mailbox domain name. */</div><div class='del'>-	ns_t_mg = 8,		/* Mail group member. */</div><div class='del'>-	ns_t_mr = 9,		/* Mail rename name. */</div><div class='del'>-	ns_t_null = 10,		/* Null resource record. */</div><div class='del'>-	ns_t_wks = 11,		/* Well known service. */</div><div class='del'>-	ns_t_ptr = 12,		/* Domain name pointer. */</div><div class='del'>-	ns_t_hinfo = 13,	/* Host information. */</div><div class='del'>-	ns_t_minfo = 14,	/* Mailbox information. */</div><div class='del'>-	ns_t_mx = 15,		/* Mail routing information. */</div><div class='del'>-	ns_t_txt = 16,		/* Text strings. */</div><div class='del'>-	ns_t_rp = 17,		/* Responsible person. */</div><div class='del'>-	ns_t_afsdb = 18,	/* AFS cell database. */</div><div class='del'>-	ns_t_x25 = 19,		/* X_25 calling address. */</div><div class='del'>-	ns_t_isdn = 20,		/* ISDN calling address. */</div><div class='del'>-	ns_t_rt = 21,		/* Router. */</div><div class='del'>-	ns_t_nsap = 22,		/* NSAP address. */</div><div class='del'>-	ns_t_nsap_ptr = 23,	/* Reverse NSAP lookup (deprecated). */</div><div class='del'>-	ns_t_sig = 24,		/* Security signature. */</div><div class='del'>-	ns_t_key = 25,		/* Security key. */</div><div class='del'>-	ns_t_px = 26,		/* X.400 mail mapping. */</div><div class='del'>-	ns_t_gpos = 27,		/* Geographical position (withdrawn). */</div><div class='del'>-	ns_t_aaaa = 28,		/* Ip6 Address. */</div><div class='del'>-	ns_t_loc = 29,		/* Location Information. */</div><div class='del'>-	ns_t_nxt = 30,		/* Next domain (security). */</div><div class='del'>-	ns_t_eid = 31,		/* Endpoint identifier. */</div><div class='del'>-	ns_t_nimloc = 32,	/* Nimrod Locator. */</div><div class='del'>-	ns_t_srv = 33,		/* Server Selection. */</div><div class='del'>-	ns_t_atma = 34,		/* ATM Address */</div><div class='del'>-	ns_t_naptr = 35,	/* Naming Authority PoinTeR */</div><div class='del'>-	ns_t_kx = 36,		/* Key Exchange */</div><div class='del'>-	ns_t_cert = 37,		/* Certification record */</div><div class='del'>-	ns_t_a6 = 38,		/* IPv6 address (deprecates AAAA) */</div><div class='del'>-	ns_t_dname = 39,	/* Non-terminal DNAME (for IPv6) */</div><div class='del'>-	ns_t_sink = 40,		/* Kitchen sink (experimentatl) */</div><div class='del'>-	ns_t_opt = 41,		/* EDNS0 option (meta-RR) */</div><div class='del'>-	ns_t_tsig = 250,	/* Transaction signature. */</div><div class='del'>-	ns_t_ixfr = 251,	/* Incremental zone transfer. */</div><div class='del'>-	ns_t_axfr = 252,	/* Transfer zone of authority. */</div><div class='del'>-	ns_t_mailb = 253,	/* Transfer mailbox records. */</div><div class='del'>-	ns_t_maila = 254,	/* Transfer mail agent records. */</div><div class='del'>-	ns_t_any = 255,		/* Wildcard match. */</div><div class='del'>-	ns_t_zxfr = 256,	/* BIND-specific, nonstandard. */</div><div class='del'>-	ns_t_max = 65536</div><div class='del'>-} ns_type;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for class field</div><div class='del'>- */</div><div class='del'>-typedef enum __ns_class {</div><div class='del'>-	ns_c_invalid = 0,	/* Cookie. */</div><div class='del'>-	ns_c_in = 1,		/* Internet. */</div><div class='del'>-	ns_c_2 = 2,		/* unallocated/unsupported. */</div><div class='del'>-	ns_c_chaos = 3,		/* MIT Chaos-net. */</div><div class='del'>-	ns_c_hs = 4,		/* MIT Hesiod. */</div><div class='del'>-	/* Query class values which do not appear in resource records */</div><div class='del'>-	ns_c_none = 254,	/* for prereq. sections in update requests */</div><div class='del'>-	ns_c_any = 255,		/* Wildcard match. */</div><div class='del'>-	ns_c_max = 65536</div><div class='del'>-} ns_class;</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-        unsigned        id :16;         /* query identification number */</div><div class='del'>-#if BYTE_ORDER == BIG_ENDIAN</div><div class='del'>-                        /* fields in third byte */</div><div class='del'>-        unsigned        qr: 1;          /* response flag */</div><div class='del'>-        unsigned        opcode: 4;      /* purpose of message */</div><div class='del'>-        unsigned        aa: 1;          /* authoritive answer */</div><div class='del'>-        unsigned        tc: 1;          /* truncated message */</div><div class='del'>-        unsigned        rd: 1;          /* recursion desired */</div><div class='del'>-                        /* fields in fourth byte */</div><div class='del'>-        unsigned        ra: 1;          /* recursion available */</div><div class='del'>-        unsigned        unused :1;      /* unused bits (MBZ as of 4.9.3a3) */</div><div class='del'>-        unsigned        ad: 1;          /* authentic data from named */</div><div class='del'>-        unsigned        cd: 1;          /* checking disabled by resolver */</div><div class='del'>-        unsigned        rcode :4;       /* response code */</div><div class='del'>-#endif</div><div class='del'>-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN</div><div class='del'>-                        /* fields in third byte */</div><div class='del'>-        unsigned        rd :1;          /* recursion desired */</div><div class='del'>-        unsigned        tc :1;          /* truncated message */</div><div class='del'>-        unsigned        aa :1;          /* authoritive answer */</div><div class='del'>-        unsigned        opcode :4;      /* purpose of message */</div><div class='del'>-        unsigned        qr :1;          /* response flag */</div><div class='del'>-                        /* fields in fourth byte */</div><div class='del'>-        unsigned        rcode :4;       /* response code */</div><div class='del'>-        unsigned        cd: 1;          /* checking disabled by resolver */</div><div class='del'>-        unsigned        ad: 1;          /* authentic data from named */</div><div class='del'>-        unsigned        unused :1;      /* unused bits (MBZ as of 4.9.3a3) */</div><div class='del'>-        unsigned        ra :1;          /* recursion available */</div><div class='del'>-#endif</div><div class='del'>-                        /* remaining bytes */</div><div class='del'>-        unsigned        qdcount :16;    /* number of question entries */</div><div class='del'>-        unsigned        ancount :16;    /* number of answer entries */</div><div class='del'>-        unsigned        nscount :16;    /* number of authority entries */</div><div class='del'>-        unsigned        arcount :16;    /* number of resource entries */</div><div class='del'>-} HEADER;</div><div class='del'>-</div><div class='del'>-#define PACKETSZ        NS_PACKETSZ</div><div class='del'>-#define MAXDNAME        NS_MAXDNAME</div><div class='del'>-#define MAXCDNAME       NS_MAXCDNAME</div><div class='del'>-#define MAXLABEL        NS_MAXLABEL</div><div class='del'>-#define HFIXEDSZ        NS_HFIXEDSZ</div><div class='del'>-#define QFIXEDSZ        NS_QFIXEDSZ</div><div class='del'>-#define RRFIXEDSZ       NS_RRFIXEDSZ</div><div class='del'>-#define INT32SZ         NS_INT32SZ</div><div class='del'>-#define INT16SZ         NS_INT16SZ</div><div class='del'>-#define INADDRSZ        NS_INADDRSZ</div><div class='del'>-#define IN6ADDRSZ       NS_IN6ADDRSZ</div><div class='del'>-#define INDIR_MASK      NS_CMPRSFLGS</div><div class='del'>-#define NAMESERVER_PORT NS_DEFAULTPORT</div><div class='del'>-</div><div class='del'>-#define S_ZONE          ns_s_zn</div><div class='del'>-#define S_PREREQ        ns_s_pr</div><div class='del'>-#define S_UPDATE        ns_s_ud</div><div class='del'>-#define S_ADDT          ns_s_ar</div><div class='del'>-</div><div class='del'>-#define QUERY           ns_o_query</div><div class='del'>-#define IQUERY          ns_o_iquery</div><div class='del'>-#define STATUS          ns_o_status</div><div class='del'>-#define NS_NOTIFY_OP    ns_o_notify</div><div class='del'>-#define NS_UPDATE_OP    ns_o_update</div><div class='del'>-</div><div class='del'>-#define NOERROR         ns_r_noerror</div><div class='del'>-#define FORMERR         ns_r_formerr</div><div class='del'>-#define SERVFAIL        ns_r_servfail</div><div class='del'>-#define NXDOMAIN        ns_r_nxdomain</div><div class='del'>-#define NOTIMP          ns_r_notimpl</div><div class='del'>-#define REFUSED         ns_r_refused</div><div class='del'>-#define YXDOMAIN        ns_r_yxdomain</div><div class='del'>-#define YXRRSET         ns_r_yxrrset</div><div class='del'>-#define NXRRSET         ns_r_nxrrset</div><div class='del'>-#define NOTAUTH         ns_r_notauth</div><div class='del'>-#define NOTZONE         ns_r_notzone</div><div class='del'>-</div><div class='del'>-#define DELETE          ns_uop_delete</div><div class='del'>-#define ADD             ns_uop_add</div><div class='del'>-</div><div class='del'>-#define T_A             ns_t_a</div><div class='del'>-#define T_NS            ns_t_ns</div><div class='del'>-#define T_MD            ns_t_md</div><div class='del'>-#define T_MF            ns_t_mf</div><div class='del'>-#define T_CNAME         ns_t_cname</div><div class='del'>-#define T_SOA           ns_t_soa</div><div class='del'>-#define T_MB            ns_t_mb</div><div class='del'>-#define T_MG            ns_t_mg</div><div class='del'>-#define T_MR            ns_t_mr</div><div class='del'>-#define T_NULL          ns_t_null</div><div class='del'>-#define T_WKS           ns_t_wks</div><div class='del'>-#define T_PTR           ns_t_ptr</div><div class='del'>-#define T_HINFO         ns_t_hinfo</div><div class='del'>-#define T_MINFO         ns_t_minfo</div><div class='del'>-#define T_MX            ns_t_mx</div><div class='del'>-#define T_TXT           ns_t_txt</div><div class='del'>-#define T_RP            ns_t_rp</div><div class='del'>-#define T_AFSDB         ns_t_afsdb</div><div class='del'>-#define T_X25           ns_t_x25</div><div class='del'>-#define T_ISDN          ns_t_isdn</div><div class='del'>-#define T_RT            ns_t_rt</div><div class='del'>-#define T_NSAP          ns_t_nsap</div><div class='del'>-#define T_NSAP_PTR      ns_t_nsap_ptr</div><div class='del'>-#define T_SIG           ns_t_sig</div><div class='del'>-#define T_KEY           ns_t_key</div><div class='del'>-#define T_PX            ns_t_px</div><div class='del'>-#define T_GPOS          ns_t_gpos</div><div class='del'>-#define T_AAAA          ns_t_aaaa</div><div class='del'>-#define T_LOC           ns_t_loc</div><div class='del'>-#define T_NXT           ns_t_nxt</div><div class='del'>-#define T_EID           ns_t_eid</div><div class='del'>-#define T_NIMLOC        ns_t_nimloc</div><div class='del'>-#define T_SRV           ns_t_srv</div><div class='del'>-#define T_ATMA          ns_t_atma</div><div class='del'>-#define T_NAPTR         ns_t_naptr</div><div class='del'>-#define T_TSIG          ns_t_tsig</div><div class='del'>-#define T_IXFR          ns_t_ixfr</div><div class='del'>-#define T_AXFR          ns_t_axfr</div><div class='del'>-#define T_MAILB         ns_t_mailb</div><div class='del'>-#define T_MAILA         ns_t_maila</div><div class='del'>-#define T_ANY           ns_t_any</div><div class='del'>-</div><div class='del'>-#define C_IN            ns_c_in</div><div class='del'>-#define C_CHAOS         ns_c_chaos</div><div class='del'>-#define C_HS            ns_c_hs</div><div class='del'>-#define C_NONE          ns_c_none</div><div class='del'>-#define C_ANY           ns_c_any</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/assert.h b/mdk-stage1/dietlibc/include/assert.h<br/>deleted file mode 100644<br/>index bb573d0f2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/assert.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/assert.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#ifndef _ASSERT_H</div><div class='del'>-#define _ASSERT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-/* This prints an "Assertion failed" message and aborts.  */</div><div class='del'>-extern void __assert_fail (__const char *__assertion, __const char *__file,</div><div class='del'>-			   unsigned int __line, __const char *__function)</div><div class='del'>-     __THROW __attribute__ ((__noreturn__));</div><div class='del'>-</div><div class='del'>-#ifdef __PRETTY_FUNCTION__</div><div class='del'>-#define __ASSERT_FUNCTION __PRETTY_FUNCTION__</div><div class='del'>-#else</div><div class='del'>-#define __ASSERT_FUNCTION __func__</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#undef assert</div><div class='del'>-#ifdef NDEBUG</div><div class='del'>-#define assert(expr)</div><div class='del'>-#else</div><div class='del'>-# define assert(expr)							      \</div><div class='del'>-  ((void) ((expr) ? 0 :							      \</div><div class='del'>-	   (__assert_fail (#expr,				      \</div><div class='del'>-			   __FILE__, __LINE__, __ASSERT_FUNCTION), 0)))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/ctype.h b/mdk-stage1/dietlibc/include/ctype.h<br/>deleted file mode 100644<br/>index 9322e8c7b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/ctype.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/ctype.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,28 +0,0 @@</div><div class='del'>-#ifndef	_CTYPE_H</div><div class='del'>-#define _CTYPE_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-extern int isascii (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int isblank (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int isalnum (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int isalpha (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int isdigit (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int isspace (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-extern int isupper (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int islower (int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-extern int tolower(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int toupper(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-extern int isprint(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int ispunct(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-extern int iscntrl(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-/* fscking GNU extensions! */</div><div class='del'>-extern int isxdigit(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-extern int isgraph(int c) __THROW __attribute__ ((__const__));</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/daemon.h b/mdk-stage1/dietlibc/include/daemon.h<br/>deleted file mode 100644<br/>index 9049f367d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/daemon.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/daemon.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _DAEMON_H</div><div class='del'>-#define _DAEMON_H</div><div class='del'>-</div><div class='del'>-extern int daemon (int nochdir,int noclose);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/dirent.h b/mdk-stage1/dietlibc/include/dirent.h<br/>deleted file mode 100644<br/>index b0ad4f5ec..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/dirent.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/dirent.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#ifndef _DIRENT_H</div><div class='del'>-#define _DIRENT_H       1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/dirent.h&gt;</div><div class='del'>-</div><div class='del'>-#define d_fileno	d_ino	/* Backwards compatibility.  */</div><div class='del'>-</div><div class='del'>-#undef  _DIRENT_HAVE_D_NAMLEN</div><div class='del'>-#define _DIRENT_HAVE_D_RECLEN</div><div class='del'>-#define _DIRENT_HAVE_D_OFF</div><div class='del'>-#define _DIRENT_HAVE_D_TYPE</div><div class='del'>-</div><div class='del'>-typedef struct __dirstream DIR;</div><div class='del'>-</div><div class='del'>-DIR *opendir (const char *__name) __THROW;</div><div class='del'>-int closedir (DIR *__dirp) __THROW;</div><div class='del'>-struct dirent *readdir (DIR *__dirp) __THROW;</div><div class='del'>-struct dirent64 *readdir64 (DIR *__dirp) __THROW;</div><div class='del'>-void rewinddir (DIR *__dirp) __THROW;</div><div class='del'>-void seekdir (DIR *__dirp, long int __pos) __THROW;</div><div class='del'>-long int telldir (DIR *__dirp) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/dlfcn.h b/mdk-stage1/dietlibc/include/dlfcn.h<br/>deleted file mode 100644<br/>index b96f8f615..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/dlfcn.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/dlfcn.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#ifndef _DLFCN_H</div><div class='del'>-#define _DLFCN_H 1</div><div class='del'>-</div><div class='del'>-#define RTLD_LAZY	0x00000</div><div class='del'>-#define RTLD_NOW	0x00001</div><div class='del'>-</div><div class='del'>-#define RTLD_LOCAL	0x00000</div><div class='del'>-#define RTLD_GLOBAL	0x10000</div><div class='del'>-</div><div class='del'>-void *dlopen (const char *filename, int flag);</div><div class='del'>-const char *dlerror(void);</div><div class='del'>-void *dlsym(void *handle, char *symbol);</div><div class='del'>-int dlclose (void *handle);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/elf.h b/mdk-stage1/dietlibc/include/elf.h<br/>deleted file mode 100644<br/>index be09dbee4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/elf.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/elf.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#include &lt;linux/elf.h&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/endian.h b/mdk-stage1/dietlibc/include/endian.h<br/>deleted file mode 100644<br/>index 463c24fff..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/endian.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/endian.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-#ifndef	_ENDIAN_H</div><div class='del'>-#define	_ENDIAN_H</div><div class='del'>-</div><div class='del'>-#define	__LITTLE_ENDIAN	1234</div><div class='del'>-#define	__BIG_ENDIAN	4321</div><div class='del'>-</div><div class='del'>-#ifdef __i386__</div><div class='del'>-#define __BYTE_ORDER __LITTLE_ENDIAN</div><div class='del'>-#define __FLOAT_WORD_ORDER __BYTE_ORDER</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-#define __BYTE_ORDER __BIG_ENDIAN</div><div class='del'>-#define __FLOAT_WORD_ORDER __BYTE_ORDER</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __mips__</div><div class='del'>-#ifdef __MIPSEB__</div><div class='del'>-#define __BIG_ENDIAN__</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef __BYTE_ORDER</div><div class='del'>-#ifdef __BIG_ENDIAN__</div><div class='del'>-#define __BYTE_ORDER __BIG_ENDIAN</div><div class='del'>-#define __FLOAT_WORD_ORDER __BYTE_ORDER</div><div class='del'>-#else</div><div class='del'>-#define __BYTE_ORDER __LITTLE_ENDIAN</div><div class='del'>-#define __FLOAT_WORD_ORDER __BYTE_ORDER</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define LITTLE_ENDIAN	__LITTLE_ENDIAN</div><div class='del'>-#define BIG_ENDIAN	__BIG_ENDIAN</div><div class='del'>-#define BYTE_ORDER	__BYTE_ORDER</div><div class='del'>-</div><div class='del'>-#if __BYTE_ORDER == __LITTLE_ENDIAN</div><div class='del'>-# define __LONG_LONG_PAIR(HI, LO) LO, HI</div><div class='del'>-#elif __BYTE_ORDER == __BIG_ENDIAN</div><div class='del'>-# define __LONG_LONG_PAIR(HI, LO) HI, LO</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/errno.h b/mdk-stage1/dietlibc/include/errno.h<br/>deleted file mode 100644<br/>index d1c68f39c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/errno.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/errno.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#ifndef _ERRNO_H</div><div class='del'>-#define	_ERRNO_H</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int *__errno_location(void);</div><div class='del'>-extern void __set_errno(int error);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/fcntl.h b/mdk-stage1/dietlibc/include/fcntl.h<br/>deleted file mode 100644<br/>index b792502c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/fcntl.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/fcntl.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#ifndef _FCNTL_H</div><div class='del'>-#define _FCNTL_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;asm/fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-extern int fcntl (int __fd, int __cmd, ...) __THROW;</div><div class='del'>-extern int open (const char *__file, int __oflag, ...) __THROW;</div><div class='del'>-extern int open64 (const char *__file, int __oflag, ...) __THROW;</div><div class='del'>-extern int creat (const char *__file, mode_t __mode) __THROW;</div><div class='del'>-extern int creat64 (const char *__file, mode_t __mode) __THROW;</div><div class='del'>-extern int lockf (int __fd, int __cmd, off_t __len) __THROW;</div><div class='del'>-extern int lockf64 (int __fd, int __cmd, off64_t __len) __THROW;</div><div class='del'>-</div><div class='del'>-#define F_ULOCK 0	/* Unlock a previously locked region.  */</div><div class='del'>-#define F_LOCK  1	/* Lock a region for exclusive use.  */</div><div class='del'>-#define F_TLOCK 2	/* Test and lock a region for exclusive use.  */</div><div class='del'>-#define F_TEST  3	/* Test a region for other processes locks.  */</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/features.h b/mdk-stage1/dietlibc/include/features.h<br/>deleted file mode 100644<br/>index 5b0283f20..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/features.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/features.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#warning "someone included features.h, apparently someone is including glibc headers!"</div><div class='del'>-</div><div class='del'>-#define __dietlibc__</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/fnmatch.h b/mdk-stage1/dietlibc/include/fnmatch.h<br/>deleted file mode 100644<br/>index 762b43ff7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/fnmatch.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/fnmatch.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#ifndef _FNMATCH_H</div><div class='del'>-#define _FNMATCH_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-int fnmatch(const char *pattern, const char *string, int flags) __THROW;</div><div class='del'>-</div><div class='del'>-#define FNM_NOESCAPE 1</div><div class='del'>-#define FNM_PATHNAME 2</div><div class='del'>-#define FNM_FILE_NAME 2</div><div class='del'>-#define FNM_PERIOD 4</div><div class='del'>-#define FNM_LEADING_DIR 8</div><div class='del'>-#define FNM_CASEFOLD 16</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/ftw.h b/mdk-stage1/dietlibc/include/ftw.h<br/>deleted file mode 100644<br/>index c888f0021..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/ftw.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/ftw.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-#ifndef _FTW_H</div><div class='del'>-#define _FTW_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-struct FTW</div><div class='del'>-  {</div><div class='del'>-    int base;</div><div class='del'>-    int level;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-int ftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int depth) __THROW;</div><div class='del'>-int  nftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int depth, int flags) __THROW;</div><div class='del'>-</div><div class='del'>-enum</div><div class='del'>-{</div><div class='del'>-  FTW_F,		/* Regular file.  */</div><div class='del'>-#define FTW_F	 FTW_F</div><div class='del'>-  FTW_D,		/* Directory.  */</div><div class='del'>-#define FTW_D	 FTW_D</div><div class='del'>-  FTW_DNR,		/* Unreadable directory.  */</div><div class='del'>-#define FTW_DNR	 FTW_DNR</div><div class='del'>-  FTW_NS,		/* Unstatable file.  */</div><div class='del'>-#define FTW_NS	 FTW_NS</div><div class='del'>-  FTW_SL,		/* Symbolic link.  */</div><div class='del'>-# define FTW_SL	 FTW_SL</div><div class='del'>-/* These flags are only passed from the `nftw' function.  */</div><div class='del'>-  FTW_DP,		/* Directory, all subdirs have been visited. */</div><div class='del'>-# define FTW_DP	 FTW_DP</div><div class='del'>-  FTW_SLN		/* Symbolic link naming non-existing file.  */</div><div class='del'>-# define FTW_SLN FTW_SLN</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-typedef int (*__ftw_func_t) (__const char *__filename,</div><div class='del'>-			     __const struct stat *__status, int __flag) __THROW;</div><div class='del'>-</div><div class='del'>-typedef int (*__nftw_func_t) (__const char *__filename,</div><div class='del'>-			      __const struct stat *__status, int __flag,</div><div class='del'>-			      struct FTW *__info) __THROW;</div><div class='del'>-</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-typedef int (*__ftw64_func_t) (__const char *__filename,</div><div class='del'>-			       __const struct stat64 *__status, int __flag) __THROW;</div><div class='del'>-</div><div class='del'>-typedef int (*__nftw64_func_t) (__const char *__filename,</div><div class='del'>-				__const struct stat64 *__status,</div><div class='del'>-				int __flag, struct FTW *__info) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/getopt.h b/mdk-stage1/dietlibc/include/getopt.h<br/>deleted file mode 100644<br/>index ebfc5522d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/getopt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/getopt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#ifndef __GETOPT_H__</div><div class='del'>-#define __GETOPT_H__</div><div class='del'>-</div><div class='del'>-extern int optind,opterr;</div><div class='del'>-extern char *optarg;</div><div class='del'>-int getopt(int argc, char *argv[], char *options);</div><div class='del'>-</div><div class='del'>-/* the following was taken from GNU getopt, it's not actually supported</div><div class='del'>- * by the diet libc! */</div><div class='del'>-extern int optopt;</div><div class='del'>-</div><div class='del'>-struct option {</div><div class='del'>-  const char* name;</div><div class='del'>-  int has_arg;</div><div class='del'>-  int* flag;</div><div class='del'>-  int val;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define no_argument             0</div><div class='del'>-#define required_argument       1</div><div class='del'>-#define optional_argument       2</div><div class='del'>-</div><div class='del'>-extern int getopt_long(int argc, char *const *argv,</div><div class='del'>-		       const char *shortopts, const struct option *longopts,</div><div class='del'>-		       int *longind);</div><div class='del'>-</div><div class='del'>-extern int getopt_long_only(int argc, char *const *argv,</div><div class='del'>-			    const char *shortopts, const struct option *longopts,</div><div class='del'>-			    int *longind);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/glob.h b/mdk-stage1/dietlibc/include/glob.h<br/>deleted file mode 100644<br/>index 80febbccf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/glob.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/glob.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,55 +0,0 @@</div><div class='del'>-#ifndef _GLOB_H</div><div class='del'>-#define _GLOB_H</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-	size_t gl_pathc;    /* Count of paths matched so far  */</div><div class='del'>-	char **gl_pathv;    /* List of matched pathnames.  */</div><div class='del'>-	size_t gl_offs;     /* Slots to reserve in `gl_pathv'.  */</div><div class='del'>-	int gl_flags;		/* Set to FLAGS, maybe | GLOB_MAGCHAR.  */</div><div class='del'>-} glob_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int glob(const char *pattern, int flags,</div><div class='del'>-	 int errfunc(const char * epath, int eerrno),</div><div class='del'>-	 glob_t *pglob) __THROW;</div><div class='del'>-</div><div class='del'>-void globfree(glob_t *pglob) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Bits set in the FLAGS argument to `glob'.  */</div><div class='del'>-#define	GLOB_ERR	(1 &lt;&lt; 0)/* Return on read errors.  */</div><div class='del'>-#define	GLOB_MARK	(1 &lt;&lt; 1)/* Append a slash to each name.  */</div><div class='del'>-#define	GLOB_NOSORT	(1 &lt;&lt; 2)/* Don't sort the names.  */</div><div class='del'>-#define	GLOB_DOOFFS	(1 &lt;&lt; 3)/* Insert PGLOB-&gt;gl_offs NULLs.  */</div><div class='del'>-#define	GLOB_NOCHECK	(1 &lt;&lt; 4)/* If nothing matches, return the pattern.  */</div><div class='del'>-#define	GLOB_APPEND	(1 &lt;&lt; 5)/* Append to results of a previous call.  */</div><div class='del'>-#define	GLOB_NOESCAPE	(1 &lt;&lt; 6)/* Backslashes don't quote metacharacters.  */</div><div class='del'>-#define	GLOB_PERIOD	(1 &lt;&lt; 7)/* Leading `.' can be matched by metachars.  */</div><div class='del'>-</div><div class='del'>-#define GLOB_MAGCHAR	 (1 &lt;&lt; 8)/* Set in gl_flags if any metachars seen.  */</div><div class='del'>-#define GLOB_ALTDIRFUNC  (1 &lt;&lt; 9)/* Use gl_opendir et al functions.  */</div><div class='del'>-#define GLOB_BRACE	 (1 &lt;&lt; 10)/* Expand "{a,b}" to "a" "b".  */</div><div class='del'>-#define GLOB_NOMAGIC	 (1 &lt;&lt; 11)/* If no magic chars, return the pattern.  */</div><div class='del'>-#define GLOB_TILDE	 (1 &lt;&lt; 12)/* Expand ~user and ~ to home directories. */</div><div class='del'>-#define GLOB_ONLYDIR	 (1 &lt;&lt; 13)/* Match only directories.  */</div><div class='del'>-#define GLOB_TILDE_CHECK (1 &lt;&lt; 14)/* Like GLOB_TILDE but return an error</div><div class='del'>-				      if the user name is not available.  */</div><div class='del'>-#define __GLOB_FLAGS	(GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \</div><div class='del'>-			 GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|     \</div><div class='del'>-			 GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE|     \</div><div class='del'>-			 GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Error returns from `glob'.  */</div><div class='del'>-#define	GLOB_NOSPACE	1	/* Ran out of memory.  */</div><div class='del'>-#define	GLOB_ABORTED	2	/* Read error.  */</div><div class='del'>-#define	GLOB_NOMATCH	3	/* No matches found.  */</div><div class='del'>-#define GLOB_NOSYS	4	/* Not implemented.  */</div><div class='del'>-/* Previous versions of this file defined GLOB_ABEND instead of</div><div class='del'>-   GLOB_ABORTED.  Provide a compatibility definition here.  */</div><div class='del'>-#define GLOB_ABEND GLOB_ABORTED</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/grp.h b/mdk-stage1/dietlibc/include/grp.h<br/>deleted file mode 100644<br/>index 32bf49afc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/grp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/grp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#ifndef _GRP_H</div><div class='del'>-#define _GRP_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-struct group</div><div class='del'>-  {</div><div class='del'>-    char *gr_name;		/* Group name.	*/</div><div class='del'>-    char *gr_passwd;		/* Password.	*/</div><div class='del'>-    gid_t gr_gid;		/* Group ID.	*/</div><div class='del'>-    char **gr_mem;		/* Member list.	*/</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-extern struct group *getgrgid (gid_t uid) __THROW;</div><div class='del'>-extern struct group *getgrnam (const char *name) __THROW;</div><div class='del'>-</div><div class='del'>-extern struct group *getgrent(void) __THROW;</div><div class='del'>-extern void setgrent(void) __THROW;</div><div class='del'>-extern void endgrent(void) __THROW;</div><div class='del'>-</div><div class='del'>-extern int setgroups(size_t n, const gid_t *groups) __THROW;</div><div class='del'>-extern int initgroups(const char *user, gid_t group) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/inttypes.h b/mdk-stage1/dietlibc/include/inttypes.h<br/>deleted file mode 100644<br/>index e69de29bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/inttypes.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/inttypes.h</a><br/>+++ /dev/null</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/limits.h b/mdk-stage1/dietlibc/include/limits.h<br/>deleted file mode 100644<br/>index a333debfd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/limits.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/limits.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,48 +0,0 @@</div><div class='del'>-#ifndef _LIMITS_H</div><div class='del'>-#define _LIMITS_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/limits.h&gt;</div><div class='del'>-</div><div class='del'>-#define __WORDSIZE 32</div><div class='del'>-</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-#undef __WORDSIZE</div><div class='del'>-#define __WORDSIZE 64</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef PATH_MAX</div><div class='del'>-#define PATH_MAX 4096</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define CHAR_BIT 8</div><div class='del'>-</div><div class='del'>-#define SCHAR_MIN (-128)</div><div class='del'>-#define SCHAR_MAX 0x7f</div><div class='del'>-#define UCHAR_MAX 0xff</div><div class='del'>-</div><div class='del'>-#define SHRT_MIN (-SHRT_MAX-1)</div><div class='del'>-#define SHRT_MAX 0x7fff</div><div class='del'>-#define USHRT_MAX 0xffff</div><div class='del'>-</div><div class='del'>-#define INT_MIN (-INT_MAX-1)</div><div class='del'>-#define INT_MAX 0x7fffffff</div><div class='del'>-#define UINT_MAX 0xffffffff</div><div class='del'>-</div><div class='del'>-#if __WORDSIZE == 64</div><div class='del'>-#define LONG_MAX 9223372036854775807L</div><div class='del'>-#define ULONG_MAX 18446744073709551615UL</div><div class='del'>-#else</div><div class='del'>-#define LONG_MAX 2147483647L</div><div class='del'>-#define ULONG_MAX 4294967295UL</div><div class='del'>-#endif</div><div class='del'>-#define LONG_MIN (-LONG_MAX - 1L)</div><div class='del'>-</div><div class='del'>-#define LLONG_MAX 9223372036854775807LL</div><div class='del'>-#define LLONG_MIN (-LLONG_MAX - 1LL)</div><div class='del'>-</div><div class='del'>-/* Maximum value an `unsigned long long int' can hold.  (Minimum is 0.)  */</div><div class='del'>-#define ULLONG_MAX 18446744073709551615ULL</div><div class='del'>-</div><div class='del'>-#define PASS_MAX 256</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/locale.h b/mdk-stage1/dietlibc/include/locale.h<br/>deleted file mode 100644<br/>index acbeec8c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/locale.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/locale.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#warning "there is no locale support for diet libc yet"</div><div class='del'>-</div><div class='del'>-#define setlocale(a,b) 0</div><div class='del'>-#define bindtextdomain</div><div class='del'>-#define textdomain</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/malloc.h b/mdk-stage1/dietlibc/include/malloc.h<br/>deleted file mode 100644<br/>index c8b49f26d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/malloc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/malloc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/math.h b/mdk-stage1/dietlibc/include/math.h<br/>deleted file mode 100644<br/>index 2f4f2e33f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/math.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/math.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,61 +0,0 @@</div><div class='del'>-#ifndef _MATH_H</div><div class='del'>-#define _MATH_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#define M_E		2.7182818284590452354	/* e */</div><div class='del'>-#define M_LOG2E		1.4426950408889634074	/* log_2 e */</div><div class='del'>-#define M_LOG10E	0.43429448190325182765	/* log_10 e */</div><div class='del'>-#define M_LN2		0.69314718055994530942	/* log_e 2 */</div><div class='del'>-#define M_LN10		2.30258509299404568402	/* log_e 10 */</div><div class='del'>-#define M_PI		3.14159265358979323846	/* pi */</div><div class='del'>-#define M_PI_2		1.57079632679489661923	/* pi/2 */</div><div class='del'>-#define M_PI_4		0.78539816339744830962	/* pi/4 */</div><div class='del'>-#define M_1_PI		0.31830988618379067154	/* 1/pi */</div><div class='del'>-#define M_2_PI		0.63661977236758134308	/* 2/pi */</div><div class='del'>-#define M_2_SQRTPI	1.12837916709551257390	/* 2/sqrt(pi) */</div><div class='del'>-#define M_SQRT2		1.41421356237309504880	/* sqrt(2) */</div><div class='del'>-#define M_SQRT1_2	0.70710678118654752440	/* 1/sqrt(2) */</div><div class='del'>-</div><div class='del'>-#define M_El		2.7182818284590452353602874713526625L  /* e */</div><div class='del'>-#define M_LOG2El	1.4426950408889634073599246810018922L  /* log_2 e */</div><div class='del'>-#define M_LOG10El	0.4342944819032518276511289189166051L  /* log_10 e */</div><div class='del'>-#define M_LN2l		0.6931471805599453094172321214581766L  /* log_e 2 */</div><div class='del'>-#define M_LN10l		2.3025850929940456840179914546843642L  /* log_e 10 */</div><div class='del'>-#define M_PIl		3.1415926535897932384626433832795029L  /* pi */</div><div class='del'>-#define M_PI_2l		1.5707963267948966192313216916397514L  /* pi/2 */</div><div class='del'>-#define M_PI_4l		0.7853981633974483096156608458198757L  /* pi/4 */</div><div class='del'>-#define M_1_PIl		0.3183098861837906715377675267450287L  /* 1/pi */</div><div class='del'>-#define M_2_PIl		0.6366197723675813430755350534900574L  /* 2/pi */</div><div class='del'>-#define M_2_SQRTPIl	1.1283791670955125738961589031215452L  /* 2/sqrt(pi) */</div><div class='del'>-#define M_SQRT2l	1.4142135623730950488016887242096981L  /* sqrt(2) */</div><div class='del'>-#define M_SQRT1_2l	0.7071067811865475244008443621048490L  /* 1/sqrt(2) */</div><div class='del'>-</div><div class='del'>-double sin(double d) __THROW __attribute__((__const__));</div><div class='del'>-double cos(double d) __THROW __attribute__((__const__));</div><div class='del'>-double tan(double d) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double sinh(double d) __THROW __attribute__((__const__));</div><div class='del'>-double cosh(double d) __THROW __attribute__((__const__));</div><div class='del'>-double tanh(double d) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double asin(double d) __THROW __attribute__((__const__));</div><div class='del'>-double acos(double d) __THROW __attribute__((__const__));</div><div class='del'>-double atan(double d) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double asinh(double d) __THROW __attribute__((__const__));</div><div class='del'>-double acosh(double d) __THROW __attribute__((__const__));</div><div class='del'>-double atanh(double d) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double exp(double d) __THROW __attribute__((__const__));</div><div class='del'>-double log(double d) __THROW __attribute__((__const__));</div><div class='del'>-double log10(double d) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double pow(double x, double y) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-double sqrt(double x) __THROW __attribute__((__const__));</div><div class='del'>-double fabs(double x) __THROW __attribute__((__const__));</div><div class='del'>-double fmod(double x, double y) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/memory.h b/mdk-stage1/dietlibc/include/memory.h<br/>deleted file mode 100644<br/>index 39adee705..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/memory.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/memory.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _MEMORY_H</div><div class='del'>-#define _MEMORY_H</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/mntent.h b/mdk-stage1/dietlibc/include/mntent.h<br/>deleted file mode 100644<br/>index 301403224..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/mntent.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/mntent.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-#ifndef _MNTENT_H</div><div class='del'>-#define _MNTENT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;paths.h&gt;</div><div class='del'>-</div><div class='del'>-#define MNTTAB          _PATH_MNTTAB    /* Deprecated alias.  */</div><div class='del'>-#define MOUNTED         _PATH_MOUNTED   /* Deprecated alias.  */</div><div class='del'>-</div><div class='del'>-/* General filesystem types.  */</div><div class='del'>-#define MNTTYPE_IGNORE	"ignore"	/* Ignore this entry.  */</div><div class='del'>-#define MNTTYPE_NFS	"nfs"		/* Network file system.  */</div><div class='del'>-#define MNTTYPE_SWAP	"swap"		/* Swap device.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Generic mount options.  */</div><div class='del'>-#define MNTOPT_DEFAULTS	"defaults"	/* Use all default options.  */</div><div class='del'>-#define MNTOPT_RO	"ro"		/* Read only.  */</div><div class='del'>-#define MNTOPT_RW	"rw"		/* Read/write.  */</div><div class='del'>-#define MNTOPT_SUID	"suid"		/* Set uid allowed.  */</div><div class='del'>-#define MNTOPT_NOSUID	"nosuid"	/* No set uid allowed.  */</div><div class='del'>-#define MNTOPT_NOAUTO	"noauto"	/* Do not auto mount.  */</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/* Structure describing a mount table entry.  */</div><div class='del'>-struct mntent</div><div class='del'>-  {</div><div class='del'>-    char *mnt_fsname;		/* Device or server for filesystem.  */</div><div class='del'>-    char *mnt_dir;		/* Directory mounted on.  */</div><div class='del'>-    char *mnt_type;		/* Type of filesystem: ufs, nfs, etc.  */</div><div class='del'>-    char *mnt_opts;		/* Comma-separated options for fs.  */</div><div class='del'>-    int mnt_freq;		/* Dump frequency (in days).  */</div><div class='del'>-    int mnt_passno;		/* Pass number for `fsck'.  */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Prepare to begin reading and/or writing mount table entries from the</div><div class='del'>-   beginning of FILE.  MODE is as for `fopen'.  */</div><div class='del'>-extern FILE *setmntent (const char *file, const char *mode) __THROW;</div><div class='del'>-</div><div class='del'>-/* Read one mount table entry from STREAM.  Returns a pointer to storage</div><div class='del'>-   reused on the next call, or null for EOF or error (use feof/ferror to</div><div class='del'>-   check).  */</div><div class='del'>-extern struct mntent *getmntent (FILE* stream) __THROW;</div><div class='del'>-</div><div class='del'>-#ifdef __USE_MISC</div><div class='del'>-/* Reentrant version of the above function.  */</div><div class='del'>-extern struct mntent *getmntent_r (FILE* stream,</div><div class='del'>-				   struct mntent* result,</div><div class='del'>-				   char* buffer,</div><div class='del'>-				   int bufsize) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Write the mount table entry described by MNT to STREAM.</div><div class='del'>-   Return zero on success, nonzero on failure.  */</div><div class='del'>-extern int addmntent (FILE* stream,</div><div class='del'>-		      const struct mntent* mnt) __THROW;</div><div class='del'>-</div><div class='del'>-/* Close a stream opened with `setmntent'.  */</div><div class='del'>-extern int endmntent (FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-/* Search MNT-&gt;mnt_opts for an option matching OPT.</div><div class='del'>-   Returns the address of the substring, or null if none found.  */</div><div class='del'>-extern char *hasmntopt (const struct mntent *__mnt,</div><div class='del'>-			const char *opt) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif	/* mntent.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/net/if.h b/mdk-stage1/dietlibc/include/net/if.h<br/>deleted file mode 100644<br/>index 88f386f46..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/net/if.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/net/if.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#ifndef _NET_IF_H</div><div class='del'>-#define _NET_IF_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned int if_nametoindex (const char *ifname) __THROW;</div><div class='del'>-char *if_indextoname (unsigned int ifindex, char *ifname) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/net/if_arp.h b/mdk-stage1/dietlibc/include/net/if_arp.h<br/>deleted file mode 100644<br/>index fe37a22dc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/net/if_arp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/net/if_arp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _NET_IF_ARP_H</div><div class='del'>-#define _NET_IF_ARP_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/if_arp.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/net/route.h b/mdk-stage1/dietlibc/include/net/route.h<br/>deleted file mode 100644<br/>index 5e5db7b1a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/net/route.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/net/route.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _NET_IF_ROUTE_H</div><div class='del'>-#define _NET_IF_ROUTE_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/route.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/netdb.h b/mdk-stage1/dietlibc/include/netdb.h<br/>deleted file mode 100644<br/>index e90ea81ac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/netdb.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/netdb.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,90 +0,0 @@</div><div class='del'>-#ifndef _NETDB_H</div><div class='del'>-#define _NETDB_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-/* Absolute file name for network data base files.  */</div><div class='del'>-#define	_PATH_HEQUIV		"/etc/hosts.equiv"</div><div class='del'>-#define	_PATH_HOSTS		"/etc/hosts"</div><div class='del'>-#define	_PATH_NETWORKS		"/etc/networks"</div><div class='del'>-#define	_PATH_NSSWITCH_CONF	"/etc/nsswitch.conf"</div><div class='del'>-#define	_PATH_PROTOCOLS		"/etc/protocols"</div><div class='del'>-#define	_PATH_SERVICES		"/etc/services"</div><div class='del'>-</div><div class='del'>-/* Description of data base entry for a single service.  */</div><div class='del'>-struct servent</div><div class='del'>-{</div><div class='del'>-  char *s_name;			/* Official service name.  */</div><div class='del'>-  char **s_aliases;		/* Alias list.  */</div><div class='del'>-  int s_port;			/* Port number.  */</div><div class='del'>-  char *s_proto;		/* Protocol to use.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern void endservent (void) __THROW;</div><div class='del'>-extern struct servent *getservent (void) __THROW;</div><div class='del'>-extern struct servent *getservbyname (const char *__name,</div><div class='del'>-				      const char *__proto) __THROW;</div><div class='del'>-extern struct servent *getservbyport (int __port, const char *__proto)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-struct hostent</div><div class='del'>-{</div><div class='del'>-  char *h_name;			/* Official name of host.  */</div><div class='del'>-  char **h_aliases;		/* Alias list.  */</div><div class='del'>-  int h_addrtype;		/* Host address type.  */</div><div class='del'>-  socklen_t h_length;		/* Length of address.  */</div><div class='del'>-  char **h_addr_list;		/* List of addresses from name server.  */</div><div class='del'>-#define	h_addr	h_addr_list[0]	/* Address, for backward compatibility.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern void endhostent (void) __THROW;</div><div class='del'>-extern struct hostent *gethostent (void) __THROW;</div><div class='del'>-extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len,</div><div class='del'>-				      int __type) __THROW;</div><div class='del'>-extern struct hostent *gethostbyname (const char *__name) __THROW;</div><div class='del'>-extern struct hostent *gethostbyname2 (const char *__name, int __af) __THROW;</div><div class='del'>-</div><div class='del'>-/* this glibc "invention" is so ugly, I'm going to throw up any minute</div><div class='del'>- * now */</div><div class='del'>-extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF,</div><div class='del'>-			   size_t BUFLEN, struct hostent** RESULT,</div><div class='del'>-			   int* H_ERRNOP) __THROW;</div><div class='del'>-</div><div class='del'>-#define HOST_NOT_FOUND 1</div><div class='del'>-#define TRY_AGAIN 2</div><div class='del'>-#define NO_RECOVERY 3</div><div class='del'>-#define NO_ADDRESS 4</div><div class='del'>-</div><div class='del'>-extern int gethostbyaddr_r(const char* addr, size_t length, int format,</div><div class='del'>-		    struct hostent* result, char *buf, size_t buflen,</div><div class='del'>-		    struct hostent **RESULT, int *h_errnop) __THROW;</div><div class='del'>-</div><div class='del'>-struct protoent {</div><div class='del'>-  char    *p_name;        /* official protocol name */</div><div class='del'>-  char    **p_aliases;    /* alias list */</div><div class='del'>-  int     p_proto;        /* protocol number */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct protoent *getprotoent(void) __THROW;</div><div class='del'>-struct protoent *getprotobyname(const char *name) __THROW;</div><div class='del'>-struct protoent *getprotobynumber(int proto) __THROW;</div><div class='del'>-void setprotoent(int stayopen) __THROW;</div><div class='del'>-void endprotoent(void) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Description of data base entry for a single network.  NOTE: here a</div><div class='del'>-   poor assumption is made.  The network number is expected to fit</div><div class='del'>-   into an unsigned long int variable.  */</div><div class='del'>-struct netent</div><div class='del'>-{</div><div class='del'>-  char *n_name;			/* Official name of network.  */</div><div class='del'>-  char **n_aliases;		/* Alias list.  */</div><div class='del'>-  int n_addrtype;		/* Net address type.  */</div><div class='del'>-  uint32_t n_net;		/* Network number.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct netent *getnetbyname (__const char *__name) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/netinet/in.h b/mdk-stage1/dietlibc/include/netinet/in.h<br/>deleted file mode 100644<br/>index 0569c8289..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/netinet/in.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/netinet/in.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef _NETINET_IN_H</div><div class='del'>-#define _NETINET_IN_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/in.h&gt;</div><div class='del'>-#include &lt;linux/in6.h&gt;</div><div class='del'>-</div><div class='del'>-#define IPPORT_RESERVED 1024</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/netinet/in_systm.h b/mdk-stage1/dietlibc/include/netinet/in_systm.h<br/>deleted file mode 100644<br/>index e69de29bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/netinet/in_systm.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/netinet/in_systm.h</a><br/>+++ /dev/null</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/netinet/ip.h b/mdk-stage1/dietlibc/include/netinet/ip.h<br/>deleted file mode 100644<br/>index 35bf9cc42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/netinet/ip.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/netinet/ip.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _NETINET_IP_H</div><div class='del'>-#define _NETINET_IP_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/ip.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/paths.h b/mdk-stage1/dietlibc/include/paths.h<br/>deleted file mode 100644<br/>index 0e36bb10e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/paths.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/paths.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#ifndef _PATHS_H</div><div class='del'>-#define _PATHS_H</div><div class='del'>-</div><div class='del'>-#define _PATH_BSHELL "/bin/sh"</div><div class='del'>-#define _PATH_DEFPATH "/bin:/usr/bin:"</div><div class='del'>-</div><div class='del'>-#define _PATH_DEVNULL "/dev/null"</div><div class='del'>-</div><div class='del'>-#define _PATH_CONSOLE "/dev/console"</div><div class='del'>-#define _PATH_MOUNTED "/etc/mtab"</div><div class='del'>-</div><div class='del'>-#define _PATH_PASSWD "/etc/passwd"</div><div class='del'>-#define _PATH_GROUP "/etc/group"</div><div class='del'>-#define _PATH_SHADOW "/etc/shadow"</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/pthread.h b/mdk-stage1/dietlibc/include/pthread.h<br/>deleted file mode 100644<br/>index e922ab28b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/pthread.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/pthread.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,227 +0,0 @@</div><div class='del'>-#ifndef _PTHREAD_H</div><div class='del'>-#define _PTHREAD_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;sched.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-/* arg... kernel haeder... */</div><div class='del'>-#define ENOTSUP 524 /* Operation is not supported */</div><div class='del'>-</div><div class='del'>-#define PTHREAD_STACK_SIZE	16384</div><div class='del'>-</div><div class='del'>-#define PTHREAD_THREADS_MAX	128</div><div class='del'>-</div><div class='del'>-#define MAX_SPIN_COUNT		50</div><div class='del'>-#define SPIN_SLEEP_DURATION	2000001</div><div class='del'>-</div><div class='del'>-#define PTHREAD_KEYS_MAX	7</div><div class='del'>-#define PTHREAD_DESTRUCTOR_ITERATIONS 10</div><div class='del'>-</div><div class='del'>-typedef struct _pthread_descr_struct *_pthread_descr;</div><div class='del'>-typedef unsigned long int pthread_t;</div><div class='del'>-</div><div class='del'>-/* Fast locks */</div><div class='del'>-struct _pthread_fastlock {</div><div class='del'>-  int __spinlock;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Mutexes */</div><div class='del'>-typedef struct {</div><div class='del'>-  struct _pthread_fastlock lock;</div><div class='del'>-  _pthread_descr owner;</div><div class='del'>-  int kind;</div><div class='del'>-  unsigned int count;</div><div class='del'>-} pthread_mutex_t;</div><div class='del'>-</div><div class='del'>-enum {</div><div class='del'>-  PTHREAD_MUTEX_FAST_NP,</div><div class='del'>-  PTHREAD_MUTEX_RECURSIVE_NP,</div><div class='del'>-  PTHREAD_MUTEX_ERRORCHECK_NP,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum</div><div class='del'>-{</div><div class='del'>-  PTHREAD_PROCESS_PRIVATE,</div><div class='del'>-#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE</div><div class='del'>-  PTHREAD_PROCESS_SHARED</div><div class='del'>-#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define PTHREAD_MUTEX_INITIALIZER \</div><div class='del'>-{{0}, 0, PTHREAD_MUTEX_FAST_NP, 0}</div><div class='del'>-</div><div class='del'>-#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \</div><div class='del'>-{{0}, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0}</div><div class='del'>-</div><div class='del'>-#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \</div><div class='del'>-{{0}, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0}</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-  int __mutexkind;</div><div class='del'>-} pthread_mutexattr_t;</div><div class='del'>-</div><div class='del'>-int pthread_mutex_init(pthread_mutex_t *mutex,</div><div class='del'>-		const pthread_mutexattr_t *mutexattr);</div><div class='del'>-int pthread_mutex_lock(pthread_mutex_t *mutex);</div><div class='del'>-int pthread_mutex_unlock(pthread_mutex_t *mutex);</div><div class='del'>-int pthread_mutex_trylock(pthread_mutex_t *mutex);</div><div class='del'>-int pthread_mutex_destroy(pthread_mutex_t *mutex);</div><div class='del'>-</div><div class='del'>-/* Conditions */</div><div class='del'>-typedef void* pthread_condattr_t;</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-  struct _pthread_fastlock lock;</div><div class='del'>-  _pthread_descr wait_chain;</div><div class='del'>-} pthread_cond_t;</div><div class='del'>-</div><div class='del'>-#define PTHREAD_COND_INITIALIZER \</div><div class='del'>-{{0},0}</div><div class='del'>-</div><div class='del'>-int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr);</div><div class='del'>-int pthread_cond_destroy(pthread_cond_t *cond);</div><div class='del'>-int pthread_cond_signal(pthread_cond_t *cond);</div><div class='del'>-int pthread_cond_broadcast(pthread_cond_t *cond);</div><div class='del'>-int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,</div><div class='del'>-			   const struct timespec *abstime);</div><div class='del'>-int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);</div><div class='del'>-</div><div class='del'>-/* only for completeness (always return NULL) */</div><div class='del'>-int pthread_condattr_init(pthread_condattr_t *attr);</div><div class='del'>-int pthread_condattr_destroy(pthread_condattr_t *attr);</div><div class='del'>-int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared);</div><div class='del'>-int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared);</div><div class='del'>-</div><div class='del'>-/* thread specific variables */</div><div class='del'>-typedef unsigned int pthread_key_t;</div><div class='del'>-</div><div class='del'>-int pthread_key_create(pthread_key_t *key, void (*destructor)(const void*));</div><div class='del'>-int pthread_key_delete(pthread_key_t key);</div><div class='del'>-int pthread_setspecific(pthread_key_t key, const void *value);</div><div class='del'>-const void *pthread_getspecific(pthread_key_t key);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Attributes for threads.  */</div><div class='del'>-typedef struct</div><div class='del'>-{</div><div class='del'>-  int		__detachstate;</div><div class='del'>-  int		__schedpolicy;</div><div class='del'>-  struct sched_param	__schedparam;</div><div class='del'>-  int		__inheritsched;</div><div class='del'>-  int		__scope;</div><div class='del'>-  void *	__stackaddr;</div><div class='del'>-  unsigned long __stacksize;</div><div class='del'>-} pthread_attr_t;</div><div class='del'>-</div><div class='del'>-enum</div><div class='del'>-{</div><div class='del'>-  PTHREAD_CREATE_JOINABLE,</div><div class='del'>-#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE</div><div class='del'>-  PTHREAD_CREATE_DETACHED</div><div class='del'>-#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum</div><div class='del'>-{</div><div class='del'>-  PTHREAD_EXPLICIT_SCHED,</div><div class='del'>-#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED</div><div class='del'>-  PTHREAD_INHERIT_SCHED</div><div class='del'>-#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum	/* for completeness */</div><div class='del'>-{</div><div class='del'>-  PTHREAD_SCOPE_SYSTEM,</div><div class='del'>-#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM</div><div class='del'>-  PTHREAD_SCOPE_PROCESS</div><div class='del'>-#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int pthread_attr_init(pthread_attr_t *attr);</div><div class='del'>-int pthread_attr_destroy(pthread_attr_t *attr);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);</div><div class='del'>-int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);</div><div class='del'>-int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setschedparam(pthread_attr_t *attr,</div><div class='del'>-				const struct sched_param *param);</div><div class='del'>-int pthread_attr_getschedparam(const pthread_attr_t *attr,</div><div class='del'>-				struct sched_param *param);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit);</div><div class='del'>-int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setscope(pthread_attr_t *attr, int scope);</div><div class='del'>-int pthread_attr_getscope(const pthread_attr_t *attr, int *scope);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack);</div><div class='del'>-int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stack);</div><div class='del'>-</div><div class='del'>-int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);</div><div class='del'>-int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize);</div><div class='del'>-</div><div class='del'>-/* ONCE */</div><div class='del'>-typedef int pthread_once_t;</div><div class='del'>-#define PTHREAD_ONCE_INIT	0</div><div class='del'>-</div><div class='del'>-int __pthread_once(pthread_once_t* once_control, void (*init_routine)(void));</div><div class='del'>-int pthread_once(pthread_once_t* once_control, void (*init_routine)(void));</div><div class='del'>-</div><div class='del'>-/* CANCEL */</div><div class='del'>-</div><div class='del'>-enum {</div><div class='del'>-  PTHREAD_CANCEL_ENABLE,</div><div class='del'>-#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE</div><div class='del'>-  PTHREAD_CANCEL_DISABLE,</div><div class='del'>-#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum {</div><div class='del'>-  PTHREAD_CANCEL_ASYNCHRONOUS,</div><div class='del'>-#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS</div><div class='del'>-  PTHREAD_CANCEL_DEFERRED,</div><div class='del'>-#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define PTHREAD_CANCELED ((void *) -1)</div><div class='del'>-</div><div class='del'>-int pthread_cancel(pthread_t thread);</div><div class='del'>-int pthread_setcancelstate(int state, int *oldstate);</div><div class='del'>-</div><div class='del'>-int pthread_setcanceltype(int type, int *oldtype);</div><div class='del'>-</div><div class='del'>-void pthread_testcancel(void);</div><div class='del'>-</div><div class='del'>-/* CLEANUP */</div><div class='del'>-</div><div class='del'>-void pthread_cleanup_push(void (*routine)(void*), void *arg);</div><div class='del'>-void pthread_cleanup_pop (int execute);</div><div class='del'>-</div><div class='del'>-void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg);</div><div class='del'>-void pthread_cleanup_pop_restore_np(int execute);</div><div class='del'>-</div><div class='del'>-/* FORK */</div><div class='del'>-</div><div class='del'>-pid_t pthread_atfork(void (*prepare)(void), void (*parent)(void),</div><div class='del'>-		     void (*child)(void));</div><div class='del'>-</div><div class='del'>-/* THREADS */</div><div class='del'>-int pthread_create (pthread_t *__thread,</div><div class='del'>-		const pthread_attr_t *__attr,</div><div class='del'>-		void *(*__start_routine) (void *),</div><div class='del'>-		void *__arg);</div><div class='del'>-</div><div class='del'>-void pthread_exit (void *__retval) __attribute__ ((__noreturn__));</div><div class='del'>-</div><div class='del'>-int pthread_join (pthread_t __th, void **__thread_return);</div><div class='del'>-</div><div class='del'>-int pthread_detach (pthread_t __th);</div><div class='del'>-</div><div class='del'>-pthread_t pthread_self (void);</div><div class='del'>-int pthread_equal (pthread_t __thread1, pthread_t __thread2);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/pwd.h b/mdk-stage1/dietlibc/include/pwd.h<br/>deleted file mode 100644<br/>index e6fb5d0be..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/pwd.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/pwd.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#ifndef _PWD_H</div><div class='del'>-#define _PWD_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-struct passwd {</div><div class='del'>-  char *pw_name;		/* Username.  */</div><div class='del'>-  char *pw_passwd;		/* Password.  */</div><div class='del'>-  uid_t pw_uid;			/* User ID.  */</div><div class='del'>-  gid_t pw_gid;			/* Group ID.  */</div><div class='del'>-  char *pw_gecos;		/* Real name.  */</div><div class='del'>-  char *pw_dir;			/* Home directory.  */</div><div class='del'>-  char *pw_shell;		/* Shell program.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct passwd *getpwuid (uid_t __uid) __THROW;</div><div class='del'>-extern struct passwd *getpwnam (const char *__name) __THROW;</div><div class='del'>-</div><div class='del'>-extern struct passwd *getpwent(void) __THROW;</div><div class='del'>-extern void setpwent(void) __THROW;</div><div class='del'>-extern void endpwent(void) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/regex.h b/mdk-stage1/dietlibc/include/regex.h<br/>deleted file mode 100644<br/>index be609d9db..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/regex.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/regex.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,67 +0,0 @@</div><div class='del'>-#ifndef _REGEX_H</div><div class='del'>-#define _REGEX_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-typedef ptrdiff_t regoff_t;</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-  regoff_t rm_so;</div><div class='del'>-  regoff_t rm_eo;</div><div class='del'>-} regmatch_t;</div><div class='del'>-</div><div class='del'>-#define REG_EXTENDED 1</div><div class='del'>-#define REG_ICASE 2</div><div class='del'>-#define REG_NOSUB 4</div><div class='del'>-#define REG_NEWLINE 8</div><div class='del'>-</div><div class='del'>-#define REG_NOTBOL 1</div><div class='del'>-#define REG_NOTEOL 2</div><div class='del'>-</div><div class='del'>-#define REG_NOMATCH -1</div><div class='del'>-</div><div class='del'>-#define RE_DUP_MAX 255</div><div class='del'>-</div><div class='del'>-struct __regex_t;</div><div class='del'>-</div><div class='del'>-typedef int (*matcher)(void*,const char*,int ofs,struct __regex_t *t,int plus,int eflags);</div><div class='del'>-</div><div class='del'>-typedef struct __regex_t {</div><div class='del'>-  struct regex {</div><div class='del'>-    matcher m;</div><div class='del'>-    void* next;</div><div class='del'>-    int pieces;</div><div class='del'>-    int num;</div><div class='del'>-    struct branch *b;</div><div class='del'>-  } r;</div><div class='del'>-  int brackets,cflags;</div><div class='del'>-  regmatch_t *l;</div><div class='del'>-} regex_t;</div><div class='del'>-</div><div class='del'>-int regcomp(regex_t *preg, const char *regex, int cflags) __THROW;</div><div class='del'>-int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) __THROW;</div><div class='del'>-size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) __THROW;</div><div class='del'>-void regfree(regex_t *preg) __THROW;</div><div class='del'>-</div><div class='del'>-enum __regex_errors {</div><div class='del'>-  REG_NOERROR,</div><div class='del'>-  REG_BADRPT, /* Invalid use of repetition operators such as using `*' as the first character. */</div><div class='del'>-  REG_BADBR, /* Invalid use of back reference operator. */</div><div class='del'>-  REG_EBRACE, /* Un-matched brace interval operators. */</div><div class='del'>-  REG_EBRACK, /* Un-matched bracket list operators. */</div><div class='del'>-  REG_ERANGE, /* Invalid use of the range operator, eg. the ending point of the</div><div class='del'>-		 range occurs  prior  to  the  starting point. */</div><div class='del'>-  REG_ECTYPE, /* Unknown character class name. */</div><div class='del'>-  REG_ECOLLATE, /* Invalid collating element. */</div><div class='del'>-  REG_EPAREN, /* Un-matched parenthesis group operators. */</div><div class='del'>-  REG_ESUBREG, /* Invalid back reference to a subexpression. */</div><div class='del'>-  REG_EEND, /* Non specific error.  This is not defined by POSIX.2. */</div><div class='del'>-  REG_EESCAPE, /* Trailing backslash. */</div><div class='del'>-  REG_BADPAT, /* Invalid use of pattern operators such as group or list. */</div><div class='del'>-  REG_ESIZE, /* Compiled  regular  expression  requires  a  pattern  buffer</div><div class='del'>-		larger than 64Kb.  This is not defined by POSIX.2. */</div><div class='del'>-  REG_ESPACE, /* regcomp ran out of space */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/resolv.h b/mdk-stage1/dietlibc/include/resolv.h<br/>deleted file mode 100644<br/>index 4e90799c2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/resolv.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/resolv.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-void res_init(void);</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/auth.h b/mdk-stage1/dietlibc/include/rpc/auth.h<br/>deleted file mode 100644<br/>index 4aa7d21ce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/auth.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/auth.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,213 +0,0 @@</div><div class='del'>-/* @(#)auth.h	2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth.h, Authentication interface.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * The data structures are completely opaque to the client.  The client</div><div class='del'>- * is required to pass a AUTH * to routines that create rpc</div><div class='del'>- * "sessions".</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_AUTH_H</div><div class='del'>-</div><div class='del'>-#define _RPC_AUTH_H	1</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-#define MAX_AUTH_BYTES	400</div><div class='del'>-#define MAXNETNAMELEN	255	/* maximum length of network user's name */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Status returned from authentication check</div><div class='del'>- */</div><div class='del'>-enum auth_stat {</div><div class='del'>-	AUTH_OK=0,</div><div class='del'>-	/*</div><div class='del'>-	 * failed at remote end</div><div class='del'>-	 */</div><div class='del'>-	AUTH_BADCRED=1,			/* bogus credentials (seal broken) */</div><div class='del'>-	AUTH_REJECTEDCRED=2,		/* client should begin new session */</div><div class='del'>-	AUTH_BADVERF=3,			/* bogus verifier (seal broken) */</div><div class='del'>-	AUTH_REJECTEDVERF=4,		/* verifier expired or was replayed */</div><div class='del'>-	AUTH_TOOWEAK=5,			/* rejected due to security reasons */</div><div class='del'>-	/*</div><div class='del'>-	 * failed locally</div><div class='del'>-	*/</div><div class='del'>-	AUTH_INVALIDRESP=6,		/* bogus response verifier */</div><div class='del'>-	AUTH_FAILED=7			/* some unknown reason */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-union des_block {</div><div class='del'>-	struct {</div><div class='del'>-		u_int32_t high;</div><div class='del'>-		u_int32_t low;</div><div class='del'>-	} key;</div><div class='del'>-	char c[8];</div><div class='del'>-};</div><div class='del'>-typedef union des_block des_block;</div><div class='del'>-extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Authentication info.  Opaque to client.</div><div class='del'>- */</div><div class='del'>-struct opaque_auth {</div><div class='del'>-	enum_t	oa_flavor;		/* flavor of auth */</div><div class='del'>-	caddr_t	oa_base;		/* address of more auth stuff */</div><div class='del'>-	u_int	oa_length;		/* not to exceed MAX_AUTH_BYTES */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Auth handle, interface to client side authenticators.</div><div class='del'>- */</div><div class='del'>-typedef struct AUTH AUTH;</div><div class='del'>-struct AUTH {</div><div class='del'>-  struct opaque_auth ah_cred;</div><div class='del'>-  struct opaque_auth ah_verf;</div><div class='del'>-  union des_block ah_key;</div><div class='del'>-  struct auth_ops {</div><div class='del'>-    void (*ah_nextverf) (AUTH *);</div><div class='del'>-    int  (*ah_marshal) (AUTH *, XDR *);		/* nextverf &amp; serialize */</div><div class='del'>-    int  (*ah_validate) (AUTH *, struct opaque_auth *);</div><div class='del'>-						/* validate verifier */</div><div class='del'>-    int  (*ah_refresh) (AUTH *);		/* refresh credentials */</div><div class='del'>-    void (*ah_destroy) (AUTH *); 	    	/* destroy this structure */</div><div class='del'>-  } *ah_ops;</div><div class='del'>-  caddr_t ah_private;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Authentication ops.</div><div class='del'>- * The ops and the auth handle provide the interface to the authenticators.</div><div class='del'>- *</div><div class='del'>- * AUTH	*auth;</div><div class='del'>- * XDR	*xdrs;</div><div class='del'>- * struct opaque_auth verf;</div><div class='del'>- */</div><div class='del'>-#define AUTH_NEXTVERF(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_nextverf))(auth))</div><div class='del'>-#define auth_nextverf(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_nextverf))(auth))</div><div class='del'>-</div><div class='del'>-#define AUTH_MARSHALL(auth, xdrs)	\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_marshal))(auth, xdrs))</div><div class='del'>-#define auth_marshall(auth, xdrs)	\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_marshal))(auth, xdrs))</div><div class='del'>-</div><div class='del'>-#define AUTH_VALIDATE(auth, verfp)	\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_validate))((auth), verfp))</div><div class='del'>-#define auth_validate(auth, verfp)	\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_validate))((auth), verfp))</div><div class='del'>-</div><div class='del'>-#define AUTH_REFRESH(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_refresh))(auth))</div><div class='del'>-#define auth_refresh(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_refresh))(auth))</div><div class='del'>-</div><div class='del'>-#define AUTH_DESTROY(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_destroy))(auth))</div><div class='del'>-#define auth_destroy(auth)		\</div><div class='del'>-		((*((auth)-&gt;ah_ops-&gt;ah_destroy))(auth))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern struct opaque_auth _null_auth;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * These are the various implementations of client side authenticators.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unix style authentication</div><div class='del'>- * AUTH *authunix_create(machname, uid, gid, len, aup_gids)</div><div class='del'>- *	char *machname;</div><div class='del'>- *	int uid;</div><div class='del'>- *	int gid;</div><div class='del'>- *	int len;</div><div class='del'>- *	int *aup_gids;</div><div class='del'>- */</div><div class='del'>-extern AUTH *authunix_create (char *__machname,uid_t __uid, gid_t __gid,</div><div class='del'>-			      int __len, gid_t *__aup_gids) __THROW;</div><div class='del'>-extern AUTH *authunix_create_default (void) __THROW;</div><div class='del'>-extern AUTH *authnone_create (void) __THROW;</div><div class='del'>-extern AUTH *authdes_create (const char *__servername, u_int __window,</div><div class='del'>-			     struct sockaddr *__syncaddr, des_block *__ckey)</div><div class='del'>-     __THROW;</div><div class='del'>-extern AUTH *authdes_pk_create (const char *, netobj *, u_int,</div><div class='del'>-				struct sockaddr *, des_block *) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define AUTH_NONE	0		/* no authentication */</div><div class='del'>-#define	AUTH_NULL	0		/* backward compatibility */</div><div class='del'>-#define	AUTH_SYS	1		/* unix style (uid, gids) */</div><div class='del'>-#define	AUTH_UNIX	AUTH_SYS</div><div class='del'>-#define	AUTH_SHORT	2		/* short hand unix style */</div><div class='del'>-#define AUTH_DES	3		/* des style (encrypted timestamps) */</div><div class='del'>-#define AUTH_DH		AUTH_DES	/* Diffie-Hellman (this is DES) */</div><div class='del'>-#define AUTH_KERB       4               /* kerberos style */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Netname manipulating functions</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-extern int getnetname (char *) __THROW;</div><div class='del'>-extern int host2netname (char *, __const char *, __const char *) __THROW;</div><div class='del'>-extern int user2netname (char *, __const uid_t, __const char *) __THROW;</div><div class='del'>-extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *)</div><div class='del'>-     __THROW;</div><div class='del'>-extern int netname2host (__const char *, char *, __const int) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *</div><div class='del'>- * These routines interface to the keyserv daemon</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-extern int key_decryptsession (char *, des_block *) __THROW;</div><div class='del'>-extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW;</div><div class='del'>-extern int key_encryptsession (char *, des_block *) __THROW;</div><div class='del'>-extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW;</div><div class='del'>-extern int key_gendes (des_block *) __THROW;</div><div class='del'>-extern int key_setsecret (char *) __THROW;</div><div class='del'>-extern int key_secretkey_is_set (void) __THROW;</div><div class='del'>-extern int key_get_conv (char *, des_block *) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR an opaque authentication struct.</div><div class='del'>- */</div><div class='del'>-extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/auth.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/auth_des.h b/mdk-stage1/dietlibc/include/rpc/auth_des.h<br/>deleted file mode 100644<br/>index 198b299e7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/auth_des.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/auth_des.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,112 +0,0 @@</div><div class='del'>-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_AUTH_DES_H</div><div class='del'>-#define _RPC_AUTH_DES_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/* There are two kinds of "names": fullnames and nicknames */</div><div class='del'>-enum authdes_namekind</div><div class='del'>-  {</div><div class='del'>-    ADN_FULLNAME,</div><div class='del'>-    ADN_NICKNAME</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* A fullname contains the network name of the client,</div><div class='del'>-   a conversation key and the window */</div><div class='del'>-struct authdes_fullname</div><div class='del'>-  {</div><div class='del'>-    char *name;		/* network name of client, up to MAXNETNAMELEN */</div><div class='del'>-    des_block key;	/* conversation key */</div><div class='del'>-    uint32_t window;	/* associated window */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* A credential */</div><div class='del'>-struct authdes_cred</div><div class='del'>-  {</div><div class='del'>-    enum authdes_namekind adc_namekind;</div><div class='del'>-    struct authdes_fullname adc_fullname;</div><div class='del'>-    uint32_t adc_nickname;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* A timeval replacement for !32bit platforms */</div><div class='del'>-struct rpc_timeval</div><div class='del'>-  {</div><div class='del'>-    uint32_t tv_sec;            /* Seconds.  */</div><div class='del'>-    uint32_t tv_usec;           /* Microseconds.  */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* A des authentication verifier */</div><div class='del'>-struct authdes_verf</div><div class='del'>-  {</div><div class='del'>-    union</div><div class='del'>-      {</div><div class='del'>-	struct rpc_timeval adv_ctime;	/* clear time */</div><div class='del'>-	des_block adv_xtime;		/* crypt time */</div><div class='del'>-      }</div><div class='del'>-    adv_time_u;</div><div class='del'>-    uint32_t adv_int_u;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* des authentication verifier: client variety</div><div class='del'>-</div><div class='del'>-   adv_timestamp is the current time.</div><div class='del'>-   adv_winverf is the credential window + 1.</div><div class='del'>-   Both are encrypted using the conversation key. */</div><div class='del'>-#define adv_timestamp  adv_time_u.adv_ctime</div><div class='del'>-#define adv_xtimestamp adv_time_u.adv_xtime</div><div class='del'>-#define adv_winverf    adv_int_u</div><div class='del'>-</div><div class='del'>-/* des authentication verifier: server variety</div><div class='del'>-</div><div class='del'>-   adv_timeverf is the client's timestamp + client's window</div><div class='del'>-   adv_nickname is the server's nickname for the client.</div><div class='del'>-   adv_timeverf is encrypted using the conversation key. */</div><div class='del'>-#define adv_timeverf   adv_time_u.adv_ctime</div><div class='del'>-#define adv_xtimeverf  adv_time_u.adv_xtime</div><div class='del'>-#define adv_nickname   adv_int_u</div><div class='del'>-</div><div class='del'>-/* Map a des credential into a unix cred. */</div><div class='del'>-extern int authdes_getucred (__const struct authdes_cred * __adc,</div><div class='del'>-			     uid_t * __uid, gid_t * __gid,</div><div class='del'>-			     short *__grouplen, gid_t * __groups) __THROW;</div><div class='del'>-</div><div class='del'>-/* Get the public key for NAME and place it in KEY.  NAME can only be</div><div class='del'>-   up to MAXNETNAMELEN bytes long and the destination buffer KEY should</div><div class='del'>-   have HEXKEYBYTES + 1 bytes long to fit all characters from the key.  */</div><div class='del'>-extern int getpublickey (__const char *__name, char *__key) __THROW;</div><div class='del'>-</div><div class='del'>-/* Get the secret key for NAME and place it in KEY.  PASSWD is used to</div><div class='del'>-   decrypt the encrypted key stored in the database.  NAME can only be</div><div class='del'>-   up to MAXNETNAMELEN bytes long and the destination buffer KEY</div><div class='del'>-   should have HEXKEYBYTES + 1 bytes long to fit all characters from</div><div class='del'>-   the key.  */</div><div class='del'>-extern int getsecretkey (__const char *__name, char *__key,</div><div class='del'>-			 __const char *__passwd) __THROW;</div><div class='del'>-</div><div class='del'>-extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep,</div><div class='del'>-		  struct rpc_timeval *__timeout) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif /* rpc/auth_des.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/auth_unix.h b/mdk-stage1/dietlibc/include/rpc/auth_unix.h<br/>deleted file mode 100644<br/>index 7a1bfa9f0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/auth_unix.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/auth_unix.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,90 +0,0 @@</div><div class='del'>-/* @(#)auth_unix.h	2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*      @(#)auth_unix.h 1.5 86/07/16 SMI      */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_unix.h, Protocol for UNIX style authentication parameters for RPC</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The system is very weak.  The client uses no encryption for  it</div><div class='del'>- * credentials and only sends null verifiers.  The server sends backs</div><div class='del'>- * null verifiers or optionally a verifier that suggests a new short hand</div><div class='del'>- * for the credentials.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_AUTH_UNIX_H</div><div class='del'>-#define _RPC_AUTH_UNIX_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/* The machine name is part of a credential; it may not exceed 255 bytes */</div><div class='del'>-#define MAX_MACHINE_NAME 255</div><div class='del'>-</div><div class='del'>-/* gids compose part of a credential; there may not be more than 16 of them */</div><div class='del'>-#define NGRPS 16</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unix style credentials.</div><div class='del'>- */</div><div class='del'>-struct authunix_parms</div><div class='del'>-  {</div><div class='del'>-    u_long aup_time;</div><div class='del'>-    char *aup_machname;</div><div class='del'>-    uid_t aup_uid;</div><div class='del'>-    gid_t aup_gid;</div><div class='del'>-    u_int aup_len;</div><div class='del'>-    gid_t *aup_gids;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If a response verifier has flavor AUTH_SHORT,</div><div class='del'>- * then the body of the response verifier encapsulates the following structure;</div><div class='del'>- * again it is serialized in the obvious fashion.</div><div class='del'>- */</div><div class='del'>-struct short_hand_verf</div><div class='del'>-  {</div><div class='del'>-    struct opaque_auth new_cred;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/auth_unix.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/clnt.h b/mdk-stage1/dietlibc/include/rpc/clnt.h<br/>deleted file mode 100644<br/>index 60b0fafdf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/clnt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/clnt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,421 +0,0 @@</div><div class='del'>-/* @(#)clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clnt.h - Client side remote procedure call interface.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_CLNT_H</div><div class='del'>-#define _RPC_CLNT_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#include &lt;sys/un.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Rpc calls return an enum clnt_stat.  This should be looked at more,</div><div class='del'>- * since each implementation is required to live with this (implementation</div><div class='del'>- * independent) list of errors.</div><div class='del'>- */</div><div class='del'>-enum clnt_stat {</div><div class='del'>-	RPC_SUCCESS=0,			/* call succeeded */</div><div class='del'>-	/*</div><div class='del'>-	 * local errors</div><div class='del'>-	 */</div><div class='del'>-	RPC_CANTENCODEARGS=1,		/* can't encode arguments */</div><div class='del'>-	RPC_CANTDECODERES=2,		/* can't decode results */</div><div class='del'>-	RPC_CANTSEND=3,			/* failure in sending call */</div><div class='del'>-	RPC_CANTRECV=4,			/* failure in receiving result */</div><div class='del'>-	RPC_TIMEDOUT=5,			/* call timed out */</div><div class='del'>-	/*</div><div class='del'>-	 * remote errors</div><div class='del'>-	 */</div><div class='del'>-	RPC_VERSMISMATCH=6,		/* rpc versions not compatible */</div><div class='del'>-	RPC_AUTHERROR=7,		/* authentication error */</div><div class='del'>-	RPC_PROGUNAVAIL=8,		/* program not available */</div><div class='del'>-	RPC_PROGVERSMISMATCH=9,		/* program version mismatched */</div><div class='del'>-	RPC_PROCUNAVAIL=10,		/* procedure unavailable */</div><div class='del'>-	RPC_CANTDECODEARGS=11,		/* decode arguments error */</div><div class='del'>-	RPC_SYSTEMERROR=12,		/* generic "other problem" */</div><div class='del'>-	RPC_NOBROADCAST = 21,		/* Broadcasting not supported */</div><div class='del'>-	/*</div><div class='del'>-	 * callrpc &amp; clnt_create errors</div><div class='del'>-	 */</div><div class='del'>-	RPC_UNKNOWNHOST=13,		/* unknown host name */</div><div class='del'>-	RPC_UNKNOWNPROTO=17,		/* unknown protocol */</div><div class='del'>-	RPC_UNKNOWNADDR = 19,		/* Remote address unknown */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * rpcbind errors</div><div class='del'>-	 */</div><div class='del'>-	RPC_RPCBFAILURE=14,		/* portmapper failed in its call */</div><div class='del'>-#define RPC_PMAPFAILURE RPC_RPCBFAILURE</div><div class='del'>-	RPC_PROGNOTREGISTERED=15,	/* remote program is not registered */</div><div class='del'>-	RPC_N2AXLATEFAILURE = 22,	/* Name to addr translation failed */</div><div class='del'>-	/*</div><div class='del'>-	 * unspecified error</div><div class='del'>-	 */</div><div class='del'>-	RPC_FAILED=16,</div><div class='del'>-	RPC_INTR=18,</div><div class='del'>-	RPC_TLIERROR=20,</div><div class='del'>-	RPC_UDERROR=23,</div><div class='del'>-        /*</div><div class='del'>-         * asynchronous errors</div><div class='del'>-         */</div><div class='del'>-        RPC_INPROGRESS = 24,</div><div class='del'>-        RPC_STALERACHANDLE = 25</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Error info.</div><div class='del'>- */</div><div class='del'>-struct rpc_err {</div><div class='del'>-  enum clnt_stat re_status;</div><div class='del'>-  union {</div><div class='del'>-    int RE_errno;		/* related system error */</div><div class='del'>-    enum auth_stat RE_why;	/* why the auth error occurred */</div><div class='del'>-    struct {</div><div class='del'>-      u_long low;		/* lowest verion supported */</div><div class='del'>-      u_long high;		/* highest verion supported */</div><div class='del'>-    } RE_vers;</div><div class='del'>-    struct {			/* maybe meaningful if RPC_FAILED */</div><div class='del'>-      long s1;</div><div class='del'>-      long s2;</div><div class='del'>-    } RE_lb;			/* life boot &amp; debugging only */</div><div class='del'>-  } ru;</div><div class='del'>-#define	re_errno	ru.RE_errno</div><div class='del'>-#define	re_why		ru.RE_why</div><div class='del'>-#define	re_vers		ru.RE_vers</div><div class='del'>-#define	re_lb		ru.RE_lb</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Client rpc handle.</div><div class='del'>- * Created by individual implementations, see e.g. rpc_udp.c.</div><div class='del'>- * Client is responsible for initializing auth, see e.g. auth_none.c.</div><div class='del'>- */</div><div class='del'>-typedef struct CLIENT CLIENT;</div><div class='del'>-struct CLIENT {</div><div class='del'>-  AUTH	*cl_auth;		 /* authenticator */</div><div class='del'>-  struct clnt_ops {</div><div class='del'>-    enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t,</div><div class='del'>-			       caddr_t, struct timeval);</div><div class='del'>-			       	/* call remote procedure */</div><div class='del'>-    void (*cl_abort) (void);	/* abort a call */</div><div class='del'>-    void (*cl_geterr) (CLIENT *, struct rpc_err *);</div><div class='del'>-				/* get specific error code */</div><div class='del'>-    bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t);</div><div class='del'>-				/* frees results */</div><div class='del'>-    void (*cl_destroy) (CLIENT *); /* destroy this structure */</div><div class='del'>-    bool_t (*cl_control) (CLIENT *, int, char *);</div><div class='del'>-				/* the ioctl() of rpc */</div><div class='del'>-  } *cl_ops;</div><div class='del'>-  caddr_t cl_private;		/* private stuff */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * client side rpc interface ops</div><div class='del'>- *</div><div class='del'>- * Parameter types are:</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * enum clnt_stat</div><div class='del'>- * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)</div><div class='del'>- * 	CLIENT *rh;</div><div class='del'>- *	u_long proc;</div><div class='del'>- *	xdrproc_t xargs;</div><div class='del'>- *	caddr_t argsp;</div><div class='del'>- *	xdrproc_t xres;</div><div class='del'>- *	caddr_t resp;</div><div class='del'>- *	struct timeval timeout;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)	\</div><div class='del'>-	((*(rh)-&gt;cl_ops-&gt;cl_call)(rh, proc, xargs, argsp, xres, resp, secs))</div><div class='del'>-#define	clnt_call(rh, proc, xargs, argsp, xres, resp, secs)	\</div><div class='del'>-	((*(rh)-&gt;cl_ops-&gt;cl_call)(rh, proc, xargs, argsp, xres, resp, secs))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * void</div><div class='del'>- * CLNT_ABORT(rh);</div><div class='del'>- * 	CLIENT *rh;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_ABORT(rh)	((*(rh)-&gt;cl_ops-&gt;cl_abort)(rh))</div><div class='del'>-#define	clnt_abort(rh)	((*(rh)-&gt;cl_ops-&gt;cl_abort)(rh))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * struct rpc_err</div><div class='del'>- * CLNT_GETERR(rh);</div><div class='del'>- * 	CLIENT *rh;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_GETERR(rh,errp)	((*(rh)-&gt;cl_ops-&gt;cl_geterr)(rh, errp))</div><div class='del'>-#define	clnt_geterr(rh,errp)	((*(rh)-&gt;cl_ops-&gt;cl_geterr)(rh, errp))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bool_t</div><div class='del'>- * CLNT_FREERES(rh, xres, resp);</div><div class='del'>- * 	CLIENT *rh;</div><div class='del'>- *	xdrproc_t xres;</div><div class='del'>- *	caddr_t resp;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_FREERES(rh,xres,resp) ((*(rh)-&gt;cl_ops-&gt;cl_freeres)(rh,xres,resp))</div><div class='del'>-#define	clnt_freeres(rh,xres,resp) ((*(rh)-&gt;cl_ops-&gt;cl_freeres)(rh,xres,resp))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bool_t</div><div class='del'>- * CLNT_CONTROL(cl, request, info)</div><div class='del'>- *      CLIENT *cl;</div><div class='del'>- *      u_int request;</div><div class='del'>- *      char *info;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_CONTROL(cl,rq,in) ((*(cl)-&gt;cl_ops-&gt;cl_control)(cl,rq,in))</div><div class='del'>-#define	clnt_control(cl,rq,in) ((*(cl)-&gt;cl_ops-&gt;cl_control)(cl,rq,in))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * control operations that apply to all transports</div><div class='del'>- *</div><div class='del'>- * Note: options marked XXX are no-ops in this implementation of RPC.</div><div class='del'>- * The are present in TI-RPC but can't be implemented here since they</div><div class='del'>- * depend on the presence of STREAMS/TLI, which we don't have.</div><div class='del'>- */</div><div class='del'>-#define CLSET_TIMEOUT        1    /* set timeout (timeval) */</div><div class='del'>-#define CLGET_TIMEOUT        2    /* get timeout (timeval) */</div><div class='del'>-#define CLGET_SERVER_ADDR    3    /* get server's address (sockaddr) */</div><div class='del'>-#define CLGET_FD             6    /* get connections file descriptor */</div><div class='del'>-#define CLGET_SVC_ADDR       7    /* get server's address (netbuf)      XXX */</div><div class='del'>-#define CLSET_FD_CLOSE       8    /* close fd while clnt_destroy */</div><div class='del'>-#define CLSET_FD_NCLOSE      9    /* Do not close fd while clnt_destroy*/</div><div class='del'>-#define CLGET_XID            10   /* Get xid */</div><div class='del'>-#define CLSET_XID            11   /* Set xid */</div><div class='del'>-#define CLGET_VERS           12   /* Get version number */</div><div class='del'>-#define CLSET_VERS           13   /* Set version number */</div><div class='del'>-#define CLGET_PROG           14   /* Get program number */</div><div class='del'>-#define CLSET_PROG           15   /* Set program number */</div><div class='del'>-#define CLSET_SVC_ADDR       16   /* get server's address (netbuf)      XXX */</div><div class='del'>-#define CLSET_PUSH_TIMOD     17   /* push timod if not already present  XXX */</div><div class='del'>-#define CLSET_POP_TIMOD      18   /* pop timod                          XXX */</div><div class='del'>-/*</div><div class='del'>- * Connectionless only control operations</div><div class='del'>- */</div><div class='del'>-#define CLSET_RETRY_TIMEOUT	4	/* set retry timeout (timeval) */</div><div class='del'>-#define CLGET_RETRY_TIMEOUT	5	/* get retry timeout (timeval) */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * void</div><div class='del'>- * CLNT_DESTROY(rh);</div><div class='del'>- * 	CLIENT *rh;</div><div class='del'>- */</div><div class='del'>-#define	CLNT_DESTROY(rh)	((*(rh)-&gt;cl_ops-&gt;cl_destroy)(rh))</div><div class='del'>-#define	clnt_destroy(rh)	((*(rh)-&gt;cl_ops-&gt;cl_destroy)(rh))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * RPCTEST is a test program which is accessible on every rpc</div><div class='del'>- * transport/port.  It is used for testing, performance evaluation,</div><div class='del'>- * and network administration.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RPCTEST_PROGRAM		((u_long)1)</div><div class='del'>-#define RPCTEST_VERSION		((u_long)1)</div><div class='del'>-#define RPCTEST_NULL_PROC	((u_long)2)</div><div class='del'>-#define RPCTEST_NULL_BATCH_PROC	((u_long)3)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * By convention, procedure 0 takes null arguments and returns them</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NULLPROC ((u_long)0)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Below are the client handle creation routines for the various</div><div class='del'>- * implementations of client side rpc.  They can return NULL if a</div><div class='del'>- * creation failure occurs.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Memory based rpc (for speed check and testing)</div><div class='del'>- * CLIENT *</div><div class='del'>- * clntraw_create(prog, vers)</div><div class='del'>- *	u_long prog;</div><div class='del'>- *	u_long vers;</div><div class='del'>- */</div><div class='del'>-extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Generic client creation routine. Supported protocols are "udp", "tcp" and</div><div class='del'>- * "unix"</div><div class='del'>- * CLIENT *</div><div class='del'>- * clnt_create(host, prog, vers, prot)</div><div class='del'>- *	char *host; 	-- hostname</div><div class='del'>- *	u_long prog;	-- program number</div><div class='del'>- *	u_ong vers;	-- version number</div><div class='del'>- *	char *prot;	-- protocol</div><div class='del'>- */</div><div class='del'>-extern CLIENT *clnt_create (__const char *__host, __const u_long __prog,</div><div class='del'>-			    __const u_long __vers, __const char *__prot)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TCP based rpc</div><div class='del'>- * CLIENT *</div><div class='del'>- * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)</div><div class='del'>- *	struct sockaddr_in *raddr;</div><div class='del'>- *	u_long prog;</div><div class='del'>- *	u_long version;</div><div class='del'>- *	register int *sockp;</div><div class='del'>- *	u_int sendsz;</div><div class='del'>- *	u_int recvsz;</div><div class='del'>- */</div><div class='del'>-extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, u_long __prog,</div><div class='del'>-			       u_long __version, int *__sockp, u_int __sendsz,</div><div class='del'>-			       u_int __recvsz) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * UDP based rpc.</div><div class='del'>- * CLIENT *</div><div class='del'>- * clntudp_create(raddr, program, version, wait, sockp)</div><div class='del'>- *	struct sockaddr_in *raddr;</div><div class='del'>- *	u_long program;</div><div class='del'>- *	u_long version;</div><div class='del'>- *	struct timeval wait_resend;</div><div class='del'>- *	int *sockp;</div><div class='del'>- *</div><div class='del'>- * Same as above, but you specify max packet sizes.</div><div class='del'>- * CLIENT *</div><div class='del'>- * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)</div><div class='del'>- *	struct sockaddr_in *raddr;</div><div class='del'>- *	u_long program;</div><div class='del'>- *	u_long version;</div><div class='del'>- *	struct timeval wait_resend;</div><div class='del'>- *	int *sockp;</div><div class='del'>- *	u_int sendsz;</div><div class='del'>- *	u_int recvsz;</div><div class='del'>- */</div><div class='del'>-extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program,</div><div class='del'>-			       u_long __version, struct timeval __wait_resend,</div><div class='del'>-			       int *__sockp) __THROW;</div><div class='del'>-extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr,</div><div class='del'>-				  u_long __program, u_long __version,</div><div class='del'>-				  struct timeval __wait_resend, int *__sockp,</div><div class='del'>-				  u_int __sendsz, u_int __recvsz) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * AF_UNIX based rpc</div><div class='del'>- * CLIENT *</div><div class='del'>- * clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)</div><div class='del'>- *      struct sockaddr_un *raddr;</div><div class='del'>- *      u_long prog;</div><div class='del'>- *      u_long version;</div><div class='del'>- *      register int *sockp;</div><div class='del'>- *      u_int sendsz;</div><div class='del'>- *      u_int recvsz;</div><div class='del'>- */</div><div class='del'>-extern CLIENT *clntunix_create  (struct sockaddr_un *__raddr, u_long __program,</div><div class='del'>-				 u_long __version, int *__sockp,</div><div class='del'>-				 u_int __sendsz, u_int __recvsz) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int callrpc (__const char *__host, __const u_long __prognum,</div><div class='del'>-		    __const u_long __versnum, __const u_long __procnum,</div><div class='del'>-		    __const xdrproc_t __inproc, __const char *__in,</div><div class='del'>-		    __const xdrproc_t __outproc, char *__out) __THROW;</div><div class='del'>-extern int _rpc_dtablesize (void) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Print why creation failed</div><div class='del'>- */</div><div class='del'>-extern void clnt_pcreateerror (__const char *__msg) __THROW;	/* stderr */</div><div class='del'>-extern char *clnt_spcreateerror(__const char *__msg) __THROW;	/* string */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Like clnt_perror(), but is more verbose in its output</div><div class='del'>- */</div><div class='del'>-extern void clnt_perrno (enum clnt_stat __num) __THROW;		/* stderr */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Print an English error message, given the client error code</div><div class='del'>- */</div><div class='del'>-extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW;</div><div class='del'>-							/* stderr */</div><div class='del'>-extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW;</div><div class='del'>-							/* string */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If a creation fails, the following allows the user to figure out why.</div><div class='del'>- */</div><div class='del'>-struct rpc_createerr {</div><div class='del'>-	enum clnt_stat cf_stat;</div><div class='del'>-	struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct rpc_createerr rpc_createerr;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copy error message to buffer.</div><div class='del'>- */</div><div class='del'>-extern char *clnt_sperrno (enum clnt_stat __num) __THROW;	/* string */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get the port number on the host for the rpc program,version and proto</div><div class='del'>- */</div><div class='del'>-extern int getrpcport (__const char * __host, u_long __prognum,</div><div class='del'>-		       u_long __versnum, u_int proto) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get the local host's IP address without consulting</div><div class='del'>- * name service library functions</div><div class='del'>- */</div><div class='del'>-extern void get_myaddress (struct sockaddr_in *) __THROW;</div><div class='del'>-</div><div class='del'>-#define UDPMSGSIZE	8800	/* rpc imposed limit on udp msg size */</div><div class='del'>-#define RPCSMALLMSGSIZE	400	/* a more reasonable packet size */</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/clnt.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/des_crypt.h b/mdk-stage1/dietlibc/include/rpc/des_crypt.h<br/>deleted file mode 100644<br/>index 6a65887d3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/des_crypt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/des_crypt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * @(#)des_crypt.h	2.1 88/08/11 4.0 RPCSRC;	from 1.4 88/02/08 (C) 1986 SMI</div><div class='del'>- *</div><div class='del'>- * des_crypt.h, des library routine interface</div><div class='del'>- * Copyright (C) 1986, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __DES_CRYPT_H__</div><div class='del'>-#define __DES_CRYPT_H__ 1</div><div class='del'>-</div><div class='del'>-#include &lt;features.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-#define DES_MAXDATA 8192	/* max bytes encrypted in one call */</div><div class='del'>-#define DES_DIRMASK (1 &lt;&lt; 0)</div><div class='del'>-#define DES_ENCRYPT (0*DES_DIRMASK)	/* Encrypt */</div><div class='del'>-#define DES_DECRYPT (1*DES_DIRMASK)	/* Decrypt */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define DES_DEVMASK (1 &lt;&lt; 1)</div><div class='del'>-#define	DES_HW (0*DES_DEVMASK)	/* Use hardware device */</div><div class='del'>-#define DES_SW (1*DES_DEVMASK)	/* Use software device */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define DESERR_NONE 0	/* succeeded */</div><div class='del'>-#define DESERR_NOHWDEVICE 1	/* succeeded, but hw device not available */</div><div class='del'>-#define DESERR_HWERROR 2	/* failed, hardware/driver error */</div><div class='del'>-#define DESERR_BADPARAM 3	/* failed, bad parameter to call */</div><div class='del'>-</div><div class='del'>-#define DES_FAILED(err) \</div><div class='del'>-	((err) &gt; DESERR_NOHWDEVICE)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cbc_crypt()</div><div class='del'>- * ecb_crypt()</div><div class='del'>- *</div><div class='del'>- * Encrypt (or decrypt) len bytes of a buffer buf.</div><div class='del'>- * The length must be a multiple of eight.</div><div class='del'>- * The key should have odd parity in the low bit of each byte.</div><div class='del'>- * ivec is the input vector, and is updated to the new one (cbc only).</div><div class='del'>- * The mode is created by oring together the appropriate parameters.</div><div class='del'>- * DESERR_NOHWDEVICE is returned if DES_HW was specified but</div><div class='del'>- * there was no hardware to do it on (the data will still be</div><div class='del'>- * encrypted though, in software).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Cipher Block Chaining mode</div><div class='del'>- */</div><div class='del'>-extern int cbc_crypt (char *__key, char *__buf, unsigned __len,</div><div class='del'>-		      unsigned __mode, char *__ivec) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Electronic Code Book mode</div><div class='del'>- */</div><div class='del'>-extern int ecb_crypt (char *__key, char *__buf, unsigned __len,</div><div class='del'>-		      unsigned __mode) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Set des parity for a key.</div><div class='del'>- * DES parity is odd and in the low bit of each byte</div><div class='del'>- */</div><div class='del'>-extern void des_setparity (char *__key) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/key_prot.h b/mdk-stage1/dietlibc/include/rpc/key_prot.h<br/>deleted file mode 100644<br/>index 3e2eb7208..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/key_prot.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/key_prot.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,346 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Please do not edit this file.</div><div class='del'>- * It was generated using rpcgen.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _KEY_PROT_H_RPCGEN</div><div class='del'>-#define _KEY_PROT_H_RPCGEN</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if 0</div><div class='del'>-#pragma ident	"@(#)key_prot.x	1.7	94/04/29 SMI"</div><div class='del'>-#endif</div><div class='del'>-/* Copyright (c)  1990, 1991 Sun Microsystems, Inc. */</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * Compiled from key_prot.x using rpcgen.</div><div class='del'>- * DO NOT EDIT THIS FILE!</div><div class='del'>- * This is NOT source code!</div><div class='del'>- */</div><div class='del'>-#define PROOT 3</div><div class='del'>-#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b"</div><div class='del'>-#define HEXKEYBYTES 48</div><div class='del'>-#define KEYSIZE 192</div><div class='del'>-#define KEYBYTES 24</div><div class='del'>-#define KEYCHECKSUMSIZE 16</div><div class='del'>-</div><div class='del'>-enum keystatus {</div><div class='del'>-	KEY_SUCCESS = 0,</div><div class='del'>-	KEY_NOSECRET = 1,</div><div class='del'>-	KEY_UNKNOWN = 2,</div><div class='del'>-	KEY_SYSTEMERR = 3,</div><div class='del'>-};</div><div class='del'>-typedef enum keystatus keystatus;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_keystatus(XDR *, keystatus*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_keystatus(XDR *, keystatus*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_keystatus();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char keybuf[HEXKEYBYTES];</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_keybuf(XDR *, keybuf);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_keybuf(XDR *, keybuf);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_keybuf();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char *netnamestr;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_netnamestr(XDR *, netnamestr*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_netnamestr(XDR *, netnamestr*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_netnamestr();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct cryptkeyarg {</div><div class='del'>-	netnamestr remotename;</div><div class='del'>-	des_block deskey;</div><div class='del'>-};</div><div class='del'>-typedef struct cryptkeyarg cryptkeyarg;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_cryptkeyarg(XDR *, cryptkeyarg*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_cryptkeyarg();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct cryptkeyarg2 {</div><div class='del'>-	netnamestr remotename;</div><div class='del'>-	netobj remotekey;</div><div class='del'>-	des_block deskey;</div><div class='del'>-};</div><div class='del'>-typedef struct cryptkeyarg2 cryptkeyarg2;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_cryptkeyarg2(XDR *, cryptkeyarg2*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_cryptkeyarg2();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct cryptkeyres {</div><div class='del'>-	keystatus status;</div><div class='del'>-	union {</div><div class='del'>-		des_block deskey;</div><div class='del'>-	} cryptkeyres_u;</div><div class='del'>-};</div><div class='del'>-typedef struct cryptkeyres cryptkeyres;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_cryptkeyres(XDR *, cryptkeyres*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_cryptkeyres(XDR *, cryptkeyres*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_cryptkeyres();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-#define MAXGIDS 16</div><div class='del'>-</div><div class='del'>-struct unixcred {</div><div class='del'>-	u_int uid;</div><div class='del'>-	u_int gid;</div><div class='del'>-	struct {</div><div class='del'>-		u_int gids_len;</div><div class='del'>-		u_int *gids_val;</div><div class='del'>-	} gids;</div><div class='del'>-};</div><div class='del'>-typedef struct unixcred unixcred;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_unixcred(XDR *, unixcred*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_unixcred(XDR *, unixcred*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_unixcred();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct getcredres {</div><div class='del'>-	keystatus status;</div><div class='del'>-	union {</div><div class='del'>-		unixcred cred;</div><div class='del'>-	} getcredres_u;</div><div class='del'>-};</div><div class='del'>-typedef struct getcredres getcredres;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_getcredres(XDR *, getcredres*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_getcredres(XDR *, getcredres*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_getcredres();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct key_netstarg {</div><div class='del'>-	keybuf st_priv_key;</div><div class='del'>-	keybuf st_pub_key;</div><div class='del'>-	netnamestr st_netname;</div><div class='del'>-};</div><div class='del'>-typedef struct key_netstarg key_netstarg;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_key_netstarg(XDR *, key_netstarg*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_key_netstarg(XDR *, key_netstarg*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_key_netstarg();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct key_netstres {</div><div class='del'>-	keystatus status;</div><div class='del'>-	union {</div><div class='del'>-		key_netstarg knet;</div><div class='del'>-	} key_netstres_u;</div><div class='del'>-};</div><div class='del'>-typedef struct key_netstres key_netstres;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_key_netstres(XDR *, key_netstres*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_key_netstres(XDR *, key_netstres*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_key_netstres();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef opaque</div><div class='del'>-#define opaque char</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define KEY_PROG ((u_long)100029)</div><div class='del'>-#define KEY_VERS ((u_long)1)</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-#define KEY_SET ((u_long)1)</div><div class='del'>-extern "C" keystatus * key_set_1(opaque *, CLIENT *);</div><div class='del'>-extern "C" keystatus * key_set_1_svc(opaque *, struct svc_req *);</div><div class='del'>-#define KEY_ENCRYPT ((u_long)2)</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-#define KEY_DECRYPT ((u_long)3)</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-#define KEY_GEN ((u_long)4)</div><div class='del'>-extern "C" des_block * key_gen_1(void *, CLIENT *);</div><div class='del'>-extern "C" des_block * key_gen_1_svc(void *, struct svc_req *);</div><div class='del'>-#define KEY_GETCRED ((u_long)5)</div><div class='del'>-extern "C" getcredres * key_getcred_1(netnamestr *, CLIENT *);</div><div class='del'>-extern "C" getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#elif __STDC__</div><div class='del'>-#define KEY_SET ((u_long)1)</div><div class='del'>-extern  keystatus * key_set_1(opaque *, CLIENT *);</div><div class='del'>-extern  keystatus * key_set_1_svc(opaque *, struct svc_req *);</div><div class='del'>-#define KEY_ENCRYPT ((u_long)2)</div><div class='del'>-extern  cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-#define KEY_DECRYPT ((u_long)3)</div><div class='del'>-extern  cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-#define KEY_GEN ((u_long)4)</div><div class='del'>-extern  des_block * key_gen_1(void *, CLIENT *);</div><div class='del'>-extern  des_block * key_gen_1_svc(void *, struct svc_req *);</div><div class='del'>-#define KEY_GETCRED ((u_long)5)</div><div class='del'>-extern  getcredres * key_getcred_1(netnamestr *, CLIENT *);</div><div class='del'>-extern  getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-#define KEY_SET ((u_long)1)</div><div class='del'>-extern  keystatus * key_set_1();</div><div class='del'>-extern  keystatus * key_set_1_svc();</div><div class='del'>-#define KEY_ENCRYPT ((u_long)2)</div><div class='del'>-extern  cryptkeyres * key_encrypt_1();</div><div class='del'>-extern  cryptkeyres * key_encrypt_1_svc();</div><div class='del'>-#define KEY_DECRYPT ((u_long)3)</div><div class='del'>-extern  cryptkeyres * key_decrypt_1();</div><div class='del'>-extern  cryptkeyres * key_decrypt_1_svc();</div><div class='del'>-#define KEY_GEN ((u_long)4)</div><div class='del'>-extern  des_block * key_gen_1();</div><div class='del'>-extern  des_block * key_gen_1_svc();</div><div class='del'>-#define KEY_GETCRED ((u_long)5)</div><div class='del'>-extern  getcredres * key_getcred_1();</div><div class='del'>-extern  getcredres * key_getcred_1_svc();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-#define KEY_VERS2 ((u_long)2)</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" keystatus * key_set_2(opaque *, CLIENT *);</div><div class='del'>-extern "C" keystatus * key_set_2_svc(opaque *, struct svc_req *);</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-extern "C" des_block * key_gen_2(void *, CLIENT *);</div><div class='del'>-extern "C" des_block * key_gen_2_svc(void *, struct svc_req *);</div><div class='del'>-extern "C" getcredres * key_getcred_2(netnamestr *, CLIENT *);</div><div class='del'>-extern "C" getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *);</div><div class='del'>-#define KEY_ENCRYPT_PK ((u_long)6)</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);</div><div class='del'>-#define KEY_DECRYPT_PK ((u_long)7)</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);</div><div class='del'>-#define KEY_NET_PUT ((u_long)8)</div><div class='del'>-extern "C" keystatus * key_net_put_2(key_netstarg *, CLIENT *);</div><div class='del'>-extern "C" keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *);</div><div class='del'>-#define KEY_NET_GET ((u_long)9)</div><div class='del'>-extern "C" key_netstres * key_net_get_2(void *, CLIENT *);</div><div class='del'>-extern "C" key_netstres * key_net_get_2_svc(void *, struct svc_req *);</div><div class='del'>-#define KEY_GET_CONV ((u_long)10)</div><div class='del'>-extern "C" cryptkeyres * key_get_conv_2(opaque *, CLIENT *);</div><div class='del'>-extern "C" cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#elif __STDC__</div><div class='del'>-extern  keystatus * key_set_2(opaque *, CLIENT *);</div><div class='del'>-extern  keystatus * key_set_2_svc(opaque *, struct svc_req *);</div><div class='del'>-extern  cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-extern  cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *);</div><div class='del'>-extern  des_block * key_gen_2(void *, CLIENT *);</div><div class='del'>-extern  des_block * key_gen_2_svc(void *, struct svc_req *);</div><div class='del'>-extern  getcredres * key_getcred_2(netnamestr *, CLIENT *);</div><div class='del'>-extern  getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *);</div><div class='del'>-#define KEY_ENCRYPT_PK ((u_long)6)</div><div class='del'>-extern  cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);</div><div class='del'>-#define KEY_DECRYPT_PK ((u_long)7)</div><div class='del'>-extern  cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);</div><div class='del'>-#define KEY_NET_PUT ((u_long)8)</div><div class='del'>-extern  keystatus * key_net_put_2(key_netstarg *, CLIENT *);</div><div class='del'>-extern  keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *);</div><div class='del'>-#define KEY_NET_GET ((u_long)9)</div><div class='del'>-extern  key_netstres * key_net_get_2(void *, CLIENT *);</div><div class='del'>-extern  key_netstres * key_net_get_2_svc(void *, struct svc_req *);</div><div class='del'>-#define KEY_GET_CONV ((u_long)10)</div><div class='del'>-extern  cryptkeyres * key_get_conv_2(opaque *, CLIENT *);</div><div class='del'>-extern  cryptkeyres * key_get_conv_2_svc(opaque *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-extern  keystatus * key_set_2();</div><div class='del'>-extern  keystatus * key_set_2_svc();</div><div class='del'>-extern  cryptkeyres * key_encrypt_2();</div><div class='del'>-extern  cryptkeyres * key_encrypt_2_svc();</div><div class='del'>-extern  cryptkeyres * key_decrypt_2();</div><div class='del'>-extern  cryptkeyres * key_decrypt_2_svc();</div><div class='del'>-extern  des_block * key_gen_2();</div><div class='del'>-extern  des_block * key_gen_2_svc();</div><div class='del'>-extern  getcredres * key_getcred_2();</div><div class='del'>-extern  getcredres * key_getcred_2_svc();</div><div class='del'>-#define KEY_ENCRYPT_PK ((u_long)6)</div><div class='del'>-extern  cryptkeyres * key_encrypt_pk_2();</div><div class='del'>-extern  cryptkeyres * key_encrypt_pk_2_svc();</div><div class='del'>-#define KEY_DECRYPT_PK ((u_long)7)</div><div class='del'>-extern  cryptkeyres * key_decrypt_pk_2();</div><div class='del'>-extern  cryptkeyres * key_decrypt_pk_2_svc();</div><div class='del'>-#define KEY_NET_PUT ((u_long)8)</div><div class='del'>-extern  keystatus * key_net_put_2();</div><div class='del'>-extern  keystatus * key_net_put_2_svc();</div><div class='del'>-#define KEY_NET_GET ((u_long)9)</div><div class='del'>-extern  key_netstres * key_net_get_2();</div><div class='del'>-extern  key_netstres * key_net_get_2_svc();</div><div class='del'>-#define KEY_GET_CONV ((u_long)10)</div><div class='del'>-extern  cryptkeyres * key_get_conv_2();</div><div class='del'>-extern  cryptkeyres * key_get_conv_2_svc();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-#endif /* !_KEY_PROT_H_RPCGEN */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/netdb.h b/mdk-stage1/dietlibc/include/rpc/netdb.h<br/>deleted file mode 100644<br/>index da4bddfc4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/netdb.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/netdb.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,74 +0,0 @@</div><div class='del'>-/* @(#)netdb.h	2.1 88/07/29 3.9 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*	@(#)rpc.h 1.8 87/07/24 SMI	*/</div><div class='del'>-</div><div class='del'>-/* Cleaned up for GNU C library roland@gnu.ai.mit.edu:</div><div class='del'>-   added multiple inclusion protection and use of &lt;sys/cdefs.h&gt;.</div><div class='del'>-   In GNU this file is #include'd by &lt;netdb.h&gt;.  */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_NETDB_H</div><div class='del'>-#define _RPC_NETDB_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#define __need_size_t</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-struct rpcent</div><div class='del'>-{</div><div class='del'>-  char *r_name;		/* Name of server for this rpc program.  */</div><div class='del'>-  char **r_aliases;	/* Alias list.  */</div><div class='del'>-  int r_number;		/* RPC program number.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern void setrpcent (int __stayopen) __THROW;</div><div class='del'>-extern void endrpcent (void) __THROW;</div><div class='del'>-extern struct rpcent *getrpcbyname (__const char *__name) __THROW;</div><div class='del'>-extern struct rpcent *getrpcbynumber (int __number) __THROW;</div><div class='del'>-extern struct rpcent *getrpcent (void) __THROW;</div><div class='del'>-</div><div class='del'>-#ifdef __USE_MISC</div><div class='del'>-extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,</div><div class='del'>-			   char *__buffer, size_t __buflen,</div><div class='del'>-			   struct rpcent **__result) __THROW;</div><div class='del'>-</div><div class='del'>-extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,</div><div class='del'>-			     char *__buffer, size_t __buflen,</div><div class='del'>-			     struct rpcent **__result) __THROW;</div><div class='del'>-</div><div class='del'>-extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,</div><div class='del'>-			size_t __buflen, struct rpcent **__result) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/netdb.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h b/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h<br/>deleted file mode 100644<br/>index 68bc8d8ec..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/pmap_clnt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/pmap_clnt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,98 +0,0 @@</div><div class='del'>-/* @(#)pmap_clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_clnt.h</div><div class='del'>- * Supplies C routines to get to portmap services.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_PMAP_CLNT_H</div><div class='del'>-#define _RPC_PMAP_CLNT_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/clnt.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Usage:</div><div class='del'>- *	success = pmap_set(program, version, protocol, port);</div><div class='del'>- *	success = pmap_unset(program, version);</div><div class='del'>- *	port = pmap_getport(address, program, version, protocol);</div><div class='del'>- *	head = pmap_getmaps(address);</div><div class='del'>- *	clnt_stat = pmap_rmtcall(address, program, version, procedure,</div><div class='del'>- *		xdrargs, argsp, xdrres, resp, tout, port_ptr)</div><div class='del'>- *		(works for udp only.)</div><div class='del'>- * 	clnt_stat = clnt_broadcast(program, version, procedure,</div><div class='del'>- *		xdrargs, argsp,	xdrres, resp, eachresult)</div><div class='del'>- *		(like pmap_rmtcall, except the call is broadcasted to all</div><div class='del'>- *		locally connected nets.  For each valid response received,</div><div class='del'>- *		the procedure eachresult is called.  Its form is:</div><div class='del'>- *	done = eachresult(resp, raddr)</div><div class='del'>- *		bool_t done;</div><div class='del'>- *		caddr_t resp;</div><div class='del'>- *		struct sockaddr_in raddr;</div><div class='del'>- *		where resp points to the results of the call and raddr is the</div><div class='del'>- *		address if the responder to the broadcast.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern bool_t pmap_set (__const u_long __program, __const u_long __vers,</div><div class='del'>-			int __protocol, u_short __port) __THROW;</div><div class='del'>-extern bool_t pmap_unset (__const u_long __program, __const u_long __vers)</div><div class='del'>-     __THROW;</div><div class='del'>-extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW;</div><div class='del'>-extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr,</div><div class='del'>-				    __const u_long __prog,</div><div class='del'>-				    __const u_long __vers,</div><div class='del'>-				    __const u_long __proc,</div><div class='del'>-				    xdrproc_t __xdrargs,</div><div class='del'>-				    caddr_t __argsp, xdrproc_t __xdrres,</div><div class='del'>-				    caddr_t __resp, struct timeval __tout,</div><div class='del'>-				    u_long *__port_ptr) __THROW;</div><div class='del'>-extern enum clnt_stat clnt_broadcast (__const u_long __prog,</div><div class='del'>-				      __const u_long __vers,</div><div class='del'>-				      __const u_long __proc, xdrproc_t __xargs,</div><div class='del'>-				      caddr_t __argsp, xdrproc_t __xresults,</div><div class='del'>-				      caddr_t __resultsp,</div><div class='del'>-				      resultproc_t __eachresult) __THROW;</div><div class='del'>-extern u_short pmap_getport (struct sockaddr_in *__address,</div><div class='del'>-			     __const u_long __program,</div><div class='del'>-			     __const u_long __version, u_int __protocol)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/pmap_clnt.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_prot.h b/mdk-stage1/dietlibc/include/rpc/pmap_prot.h<br/>deleted file mode 100644<br/>index fd7fb8e7e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/pmap_prot.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/pmap_prot.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,108 +0,0 @@</div><div class='del'>-/* @(#)pmap_prot.h	2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_prot.h</div><div class='del'>- * Protocol for the local binder service, or pmap.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_PMAP_PROT_H</div><div class='del'>-#define _RPC_PMAP_PROT_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/* The following procedures are supported by the protocol:</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_NULL() returns ()</div><div class='del'>- * 	takes nothing, returns nothing</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_SET(struct pmap) returns (bool_t)</div><div class='del'>- * 	TRUE is success, FALSE is failure.  Registers the tuple</div><div class='del'>- *	[prog, vers, prot, port].</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_UNSET(struct pmap) returns (bool_t)</div><div class='del'>- *	TRUE is success, FALSE is failure.  Un-registers pair</div><div class='del'>- *	[prog, vers].  prot and port are ignored.</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).</div><div class='del'>- *	0 is failure.  Otherwise returns the port number where the pair</div><div class='del'>- *	[prog, vers] is registered.  It may lie!</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_DUMP() RETURNS (struct pmaplist *)</div><div class='del'>- *</div><div class='del'>- * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string&lt;&gt;)</div><div class='del'>- * 	RETURNS (port, string&lt;&gt;);</div><div class='del'>- * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);</div><div class='del'>- * 	Calls the procedure on the local machine.  If it is not registered,</div><div class='del'>- *	this procedure is quite; ie it does not return error information!!!</div><div class='del'>- *	This procedure only is supported on rpc/udp and calls via</div><div class='del'>- *	rpc/udp.  This routine only passes null authentication parameters.</div><div class='del'>- *	This file has no interface to xdr routines for PMAPPROC_CALLIT.</div><div class='del'>- *</div><div class='del'>- * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define PMAPPORT		((u_short)111)</div><div class='del'>-#define PMAPPROG		((u_long)100000)</div><div class='del'>-#define PMAPVERS		((u_long)2)</div><div class='del'>-#define PMAPVERS_PROTO		((u_long)2)</div><div class='del'>-#define PMAPVERS_ORIG		((u_long)1)</div><div class='del'>-#define PMAPPROC_NULL		((u_long)0)</div><div class='del'>-#define PMAPPROC_SET		((u_long)1)</div><div class='del'>-#define PMAPPROC_UNSET		((u_long)2)</div><div class='del'>-#define PMAPPROC_GETPORT	((u_long)3)</div><div class='del'>-#define PMAPPROC_DUMP		((u_long)4)</div><div class='del'>-#define PMAPPROC_CALLIT		((u_long)5)</div><div class='del'>-</div><div class='del'>-struct pmap {</div><div class='del'>-	long unsigned pm_prog;</div><div class='del'>-	long unsigned pm_vers;</div><div class='del'>-	long unsigned pm_prot;</div><div class='del'>-	long unsigned pm_port;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW;</div><div class='del'>-</div><div class='del'>-struct pmaplist {</div><div class='del'>-	struct pmap	pml_map;</div><div class='del'>-	struct pmaplist *pml_next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/pmap_prot.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h b/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h<br/>deleted file mode 100644<br/>index 160f998ca..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/pmap_rmt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/pmap_rmt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,68 +0,0 @@</div><div class='del'>-/* @(#)pmap_rmt.h	2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Structures and XDR routines for parameters to and replies from</div><div class='del'>- * the portmapper remote-call-service.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1986, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_PMAP_RMT_H</div><div class='del'>-#define _RPC_PMAP_RMT_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-struct rmtcallargs {</div><div class='del'>-	u_long prog, vers, proc, arglen;</div><div class='del'>-	caddr_t args_ptr;</div><div class='del'>-	xdrproc_t xdr_args;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-struct rmtcallres {</div><div class='del'>-	u_long *port_ptr;</div><div class='del'>-	u_long resultslen;</div><div class='del'>-	caddr_t results_ptr;</div><div class='del'>-	xdrproc_t xdr_results;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/pmap_rmt.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/rpc.h b/mdk-stage1/dietlibc/include/rpc/rpc.h<br/>deleted file mode 100644<br/>index 20b341d74..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/rpc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/rpc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-/* @(#)rpc.h	2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * rpc.h, Just includes the billions of rpc header files necessary to</div><div class='del'>- * do remote procedure calling.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_RPC_H</div><div class='del'>-#define _RPC_RPC_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;		/* some typedefs */</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-/* external data representation interfaces */</div><div class='del'>-#include &lt;rpc/xdr.h&gt;		/* generic (de)serializer */</div><div class='del'>-</div><div class='del'>-/* Client side only authentication */</div><div class='del'>-#include &lt;rpc/auth.h&gt;		/* generic authenticator (client side) */</div><div class='del'>-</div><div class='del'>-/* Client side (mostly) remote procedure call */</div><div class='del'>-#include &lt;rpc/clnt.h&gt;		/* generic rpc stuff */</div><div class='del'>-</div><div class='del'>-/* semi-private protocol headers */</div><div class='del'>-#include &lt;rpc/rpc_msg.h&gt;	/* protocol for rpc messages */</div><div class='del'>-#include &lt;rpc/auth_unix.h&gt;	/* protocol for unix style cred */</div><div class='del'>-#include &lt;rpc/auth_des.h&gt;	/* protocol for des style cred */</div><div class='del'>-</div><div class='del'>-/* Server side only remote procedure callee */</div><div class='del'>-#include &lt;rpc/svc.h&gt;		/* service manager and multiplexer */</div><div class='del'>-#include &lt;rpc/svc_auth.h&gt;	/* service side authenticator */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION</div><div class='del'>- * OF UNIX BASED ON NFSSRC.  These systems will already have the structures</div><div class='del'>- * defined by &lt;rpc/netdb.h&gt; included in &lt;netdb.h&gt;.</div><div class='del'>- */</div><div class='del'>-/* routines for parsing /etc/rpc */</div><div class='del'>-#include &lt;rpc/netdb.h&gt;		/* structures and routines to parse /etc/rpc */</div><div class='del'>-</div><div class='del'>-int bindresvport(int sd, struct sockaddr_in* sin) __THROW;</div><div class='del'>-</div><div class='del'>-#endif /* rpc/rpc.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_des.h b/mdk-stage1/dietlibc/include/rpc/rpc_des.h<br/>deleted file mode 100644<br/>index 0f36d1697..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/rpc_des.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/rpc_des.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*</div><div class='del'>- * Generic DES driver interface</div><div class='del'>- * Keep this file hardware independent!</div><div class='del'>- * Copyright (c) 1986 by Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _DES_H</div><div class='del'>-#define _DES_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#define DES_MAXLEN 	65536	/* maximum # of bytes to encrypt  */</div><div class='del'>-#define DES_QUICKLEN	16	/* maximum # of bytes to encrypt quickly */</div><div class='del'>-</div><div class='del'>-enum desdir</div><div class='del'>-  {</div><div class='del'>-    ENCRYPT, DECRYPT</div><div class='del'>-  };</div><div class='del'>-enum desmode</div><div class='del'>-  {</div><div class='del'>-    CBC, ECB</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * parameters to ioctl call</div><div class='del'>- */</div><div class='del'>-struct desparams</div><div class='del'>-  {</div><div class='del'>-    u_char des_key[8];		/* key (with low bit parity) */</div><div class='del'>-    enum desdir des_dir;	/* direction */</div><div class='del'>-    enum desmode des_mode;	/* mode */</div><div class='del'>-    u_char des_ivec[8];		/* input vector */</div><div class='del'>-    unsigned des_len;		/* number of bytes to crypt */</div><div class='del'>-    union</div><div class='del'>-      {</div><div class='del'>-	u_char UDES_data[DES_QUICKLEN];</div><div class='del'>-	u_char *UDES_buf;</div><div class='del'>-      }</div><div class='del'>-    UDES;</div><div class='del'>-#define des_data UDES.UDES_data	/* direct data here if quick */</div><div class='del'>-#define des_buf	UDES.UDES_buf	/* otherwise, pointer to data */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/rpc_msg.h b/mdk-stage1/dietlibc/include/rpc/rpc_msg.h<br/>deleted file mode 100644<br/>index 636d60ea9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/rpc_msg.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/rpc_msg.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,202 +0,0 @@</div><div class='del'>-/* @(#)rpc_msg.h	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*      @(#)rpc_msg.h 1.7 86/07/16 SMI      */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_MSG_H</div><div class='del'>-#define _RPC_MSG_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/clnt.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * rpc_msg.h</div><div class='del'>- * rpc message definition</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RPC_MSG_VERSION		((u_long) 2)</div><div class='del'>-#define RPC_SERVICE_PORT	((u_short) 2048)</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Bottom up definition of an rpc message.</div><div class='del'>- * NOTE: call and reply use the same overall struct but</div><div class='del'>- * different parts of unions within it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-enum msg_type {</div><div class='del'>-	CALL=0,</div><div class='del'>-	REPLY=1</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum reply_stat {</div><div class='del'>-	MSG_ACCEPTED=0,</div><div class='del'>-	MSG_DENIED=1</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum accept_stat {</div><div class='del'>-	SUCCESS=0,</div><div class='del'>-	PROG_UNAVAIL=1,</div><div class='del'>-	PROG_MISMATCH=2,</div><div class='del'>-	PROC_UNAVAIL=3,</div><div class='del'>-	GARBAGE_ARGS=4,</div><div class='del'>-	SYSTEM_ERR=5</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum reject_stat {</div><div class='del'>-	RPC_MISMATCH=0,</div><div class='del'>-	AUTH_ERROR=1</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Reply part of an rpc exchange</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Reply to an rpc request that was accepted by the server.</div><div class='del'>- * Note: there could be an error even though the request was</div><div class='del'>- * accepted.</div><div class='del'>- */</div><div class='del'>-struct accepted_reply {</div><div class='del'>-	struct opaque_auth	ar_verf;</div><div class='del'>-	enum accept_stat	ar_stat;</div><div class='del'>-	union {</div><div class='del'>-		struct {</div><div class='del'>-			u_long	low;</div><div class='del'>-			u_long	high;</div><div class='del'>-		} AR_versions;</div><div class='del'>-		struct {</div><div class='del'>-			caddr_t	where;</div><div class='del'>-			xdrproc_t proc;</div><div class='del'>-		} AR_results;</div><div class='del'>-		/* and many other null cases */</div><div class='del'>-	} ru;</div><div class='del'>-#define	ar_results	ru.AR_results</div><div class='del'>-#define	ar_vers		ru.AR_versions</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Reply to an rpc request that was rejected by the server.</div><div class='del'>- */</div><div class='del'>-struct rejected_reply {</div><div class='del'>-	enum reject_stat rj_stat;</div><div class='del'>-	union {</div><div class='del'>-		struct {</div><div class='del'>-			u_long low;</div><div class='del'>-			u_long high;</div><div class='del'>-		} RJ_versions;</div><div class='del'>-		enum auth_stat RJ_why;  /* why authentication did not work */</div><div class='del'>-	} ru;</div><div class='del'>-#define	rj_vers	ru.RJ_versions</div><div class='del'>-#define	rj_why	ru.RJ_why</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Body of a reply to an rpc request.</div><div class='del'>- */</div><div class='del'>-struct reply_body {</div><div class='del'>-	enum reply_stat rp_stat;</div><div class='del'>-	union {</div><div class='del'>-		struct accepted_reply RP_ar;</div><div class='del'>-		struct rejected_reply RP_dr;</div><div class='del'>-	} ru;</div><div class='del'>-#define	rp_acpt	ru.RP_ar</div><div class='del'>-#define	rp_rjct	ru.RP_dr</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Body of an rpc request call.</div><div class='del'>- */</div><div class='del'>-struct call_body {</div><div class='del'>-	u_long cb_rpcvers;	/* must be equal to two */</div><div class='del'>-	u_long cb_prog;</div><div class='del'>-	u_long cb_vers;</div><div class='del'>-	u_long cb_proc;</div><div class='del'>-	struct opaque_auth cb_cred;</div><div class='del'>-	struct opaque_auth cb_verf; /* protocol specific - provided by client */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The rpc message</div><div class='del'>- */</div><div class='del'>-struct rpc_msg {</div><div class='del'>-	u_long			rm_xid;</div><div class='del'>-	enum msg_type		rm_direction;</div><div class='del'>-	union {</div><div class='del'>-		struct call_body RM_cmb;</div><div class='del'>-		struct reply_body RM_rmb;</div><div class='del'>-	} ru;</div><div class='del'>-#define	rm_call		ru.RM_cmb</div><div class='del'>-#define	rm_reply	ru.RM_rmb</div><div class='del'>-};</div><div class='del'>-#define	acpted_rply	ru.RM_rmb.ru.RP_ar</div><div class='del'>-#define	rjcted_rply	ru.RM_rmb.ru.RP_dr</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR routine to handle a rpc message.</div><div class='del'>- * xdr_callmsg(xdrs, cmsg)</div><div class='del'>- * 	XDR *xdrs;</div><div class='del'>- * 	struct rpc_msg *cmsg;</div><div class='del'>- */</div><div class='del'>-extern bool_t	xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR routine to pre-serialize the static part of a rpc message.</div><div class='del'>- * xdr_callhdr(xdrs, cmsg)</div><div class='del'>- * 	XDR *xdrs;</div><div class='del'>- * 	struct rpc_msg *cmsg;</div><div class='del'>- */</div><div class='del'>-extern bool_t	xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR routine to handle a rpc reply.</div><div class='del'>- * xdr_replymsg(xdrs, rmsg)</div><div class='del'>- * 	XDR *xdrs;</div><div class='del'>- * 	struct rpc_msg *rmsg;</div><div class='del'>- */</div><div class='del'>-extern bool_t	xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Fills in the error part of a reply message.</div><div class='del'>- * _seterr_reply(msg, error)</div><div class='del'>- * 	struct rpc_msg *msg;</div><div class='del'>- * 	struct rpc_err *error;</div><div class='del'>- */</div><div class='del'>-extern void	_seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/rpc_msg.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/svc.h b/mdk-stage1/dietlibc/include/rpc/svc.h<br/>deleted file mode 100644<br/>index 27c997dde..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/svc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/svc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,316 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc.h, Server-side remote procedure call interface.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_SVC_H</div><div class='del'>-#define _RPC_SVC_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;rpc/rpc_msg.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This interface must manage two items concerning remote procedure calling:</div><div class='del'>- *</div><div class='del'>- * 1) An arbitrary number of transport connections upon which rpc requests</div><div class='del'>- * are received.  The two most notable transports are TCP and UDP;  they are</div><div class='del'>- * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;</div><div class='del'>- * they in turn call xprt_register and xprt_unregister.</div><div class='del'>- *</div><div class='del'>- * 2) An arbitrary number of locally registered services.  Services are</div><div class='del'>- * described by the following four data: program number, version number,</div><div class='del'>- * "service dispatch" function, a transport handle, and a boolean that</div><div class='del'>- * indicates whether or not the exported program should be registered with a</div><div class='del'>- * local binder service;  if true the program's number and version and the</div><div class='del'>- * port number from the transport handle are registered with the binder.</div><div class='del'>- * These data are registered with the rpc svc system via svc_register.</div><div class='del'>- *</div><div class='del'>- * A service's dispatch function is called whenever an rpc request comes in</div><div class='del'>- * on a transport.  The request's program and version numbers must match</div><div class='del'>- * those of the registered service.  The dispatch function is passed two</div><div class='del'>- * parameters, struct svc_req * and SVCXPRT *, defined below.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-enum xprt_stat {</div><div class='del'>-	XPRT_DIED,</div><div class='del'>-	XPRT_MOREREQS,</div><div class='del'>-	XPRT_IDLE</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Server side transport handle</div><div class='del'>- */</div><div class='del'>-typedef struct SVCXPRT SVCXPRT;</div><div class='del'>-struct SVCXPRT {</div><div class='del'>-  int xp_sock;</div><div class='del'>-  u_short xp_port;		/* associated port number */</div><div class='del'>-  const struct xp_ops {</div><div class='del'>-    bool_t	(*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg);</div><div class='del'>-				/* receive incoming requests */</div><div class='del'>-    enum xprt_stat (*xp_stat) (SVCXPRT *__xprt);</div><div class='del'>-				/* get transport status */</div><div class='del'>-    bool_t	(*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,</div><div class='del'>-			       caddr_t args_ptr); /* get arguments */</div><div class='del'>-    bool_t	(*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg);</div><div class='del'>-				/* send reply */</div><div class='del'>-    bool_t	(*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args,</div><div class='del'>-				caddr_t args_ptr);</div><div class='del'>-				/* free mem allocated for args */</div><div class='del'>-    void	(*xp_destroy) (SVCXPRT *__xprt);</div><div class='del'>-				/* destroy this struct */</div><div class='del'>-  } *xp_ops;</div><div class='del'>-  int		xp_addrlen;	 /* length of remote address */</div><div class='del'>-  struct sockaddr_in xp_raddr;	 /* remote address */</div><div class='del'>-  struct opaque_auth xp_verf;	 /* raw response verifier */</div><div class='del'>-  caddr_t		xp_p1;		 /* private */</div><div class='del'>-  caddr_t		xp_p2;		 /* private */</div><div class='del'>-  char		xp_pad [256];	/* padding, internal use */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Approved way of getting address of caller</div><div class='del'>- */</div><div class='del'>-#define svc_getcaller(x) (&amp;(x)-&gt;xp_raddr)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Operations defined on an SVCXPRT handle</div><div class='del'>- *</div><div class='del'>- * SVCXPRT		*xprt;</div><div class='del'>- * struct rpc_msg	*msg;</div><div class='del'>- * xdrproc_t		 xargs;</div><div class='del'>- * caddr_t		 argsp;</div><div class='del'>- */</div><div class='del'>-#define SVC_RECV(xprt, msg)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_recv)((xprt), (msg))</div><div class='del'>-#define svc_recv(xprt, msg)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_recv)((xprt), (msg))</div><div class='del'>-</div><div class='del'>-#define SVC_STAT(xprt)					\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_stat)(xprt)</div><div class='del'>-#define svc_stat(xprt)					\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_stat)(xprt)</div><div class='del'>-</div><div class='del'>-#define SVC_GETARGS(xprt, xargs, argsp)			\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_getargs)((xprt), (xargs), (argsp))</div><div class='del'>-#define svc_getargs(xprt, xargs, argsp)			\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_getargs)((xprt), (xargs), (argsp))</div><div class='del'>-</div><div class='del'>-#define SVC_REPLY(xprt, msg)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_reply) ((xprt), (msg))</div><div class='del'>-#define svc_reply(xprt, msg)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_reply) ((xprt), (msg))</div><div class='del'>-</div><div class='del'>-#define SVC_FREEARGS(xprt, xargs, argsp)		\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_freeargs)((xprt), (xargs), (argsp))</div><div class='del'>-#define svc_freeargs(xprt, xargs, argsp)		\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_freeargs)((xprt), (xargs), (argsp))</div><div class='del'>-</div><div class='del'>-#define SVC_DESTROY(xprt)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_destroy)(xprt)</div><div class='del'>-#define svc_destroy(xprt)				\</div><div class='del'>-	(*(xprt)-&gt;xp_ops-&gt;xp_destroy)(xprt)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Service request</div><div class='del'>- */</div><div class='del'>-struct svc_req {</div><div class='del'>-  rpcprog_t rq_prog;            /* service program number */</div><div class='del'>-  rpcvers_t rq_vers;            /* service protocol version */</div><div class='del'>-  rpcproc_t rq_proc;            /* the desired procedure */</div><div class='del'>-  struct opaque_auth rq_cred;   /* raw creds from the wire */</div><div class='del'>-  caddr_t rq_clntcred;          /* read only cooked cred */</div><div class='del'>-  SVCXPRT *rq_xprt;             /* associated transport */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifndef __DISPATCH_FN_T</div><div class='del'>-#define __DISPATCH_FN_T</div><div class='del'>-typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Service registration</div><div class='del'>- *</div><div class='del'>- * svc_register(xprt, prog, vers, dispatch, protocol)</div><div class='del'>- *	SVCXPRT *xprt;</div><div class='del'>- *	rpcprog_t prog;</div><div class='del'>- *	rpcvers_t vers;</div><div class='del'>- *	void (*dispatch)(struct svc_req*, SVCXPRT*);</div><div class='del'>- *	rpcprot_t protocol;  like TCP or UDP, zero means do not register</div><div class='del'>- */</div><div class='del'>-extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog,</div><div class='del'>-			    rpcvers_t __vers, __dispatch_fn_t __dispatch,</div><div class='del'>-			    rpcprot_t __protocol) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Service un-registration</div><div class='del'>- *</div><div class='del'>- * svc_unregister(prog, vers)</div><div class='del'>- *	rpcprog_t prog;</div><div class='del'>- *	rpcvers_t vers;</div><div class='del'>- */</div><div class='del'>-extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Transport registration.</div><div class='del'>- *</div><div class='del'>- * xprt_register(xprt)</div><div class='del'>- *	SVCXPRT *xprt;</div><div class='del'>- */</div><div class='del'>-extern void xprt_register (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Transport un-register</div><div class='del'>- *</div><div class='del'>- * xprt_unregister(xprt)</div><div class='del'>- *	SVCXPRT *xprt;</div><div class='del'>- */</div><div class='del'>-extern void xprt_unregister (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * When the service routine is called, it must first check to see if it</div><div class='del'>- * knows about the procedure;  if not, it should call svcerr_noproc</div><div class='del'>- * and return.  If so, it should deserialize its arguments via</div><div class='del'>- * SVC_GETARGS (defined above).  If the deserialization does not work,</div><div class='del'>- * svcerr_decode should be called followed by a return.  Successful</div><div class='del'>- * decoding of the arguments should be followed the execution of the</div><div class='del'>- * procedure's code and a call to svc_sendreply.</div><div class='del'>- *</div><div class='del'>- * Also, if the service refuses to execute the procedure due to too-</div><div class='del'>- * weak authentication parameters, svcerr_weakauth should be called.</div><div class='del'>- * Note: do not confuse access-control failure with weak authentication!</div><div class='del'>- *</div><div class='del'>- * NB: In pure implementations of rpc, the caller always waits for a reply</div><div class='del'>- * msg.  This message is sent when svc_sendreply is called.</div><div class='del'>- * Therefore pure service implementations should always call</div><div class='del'>- * svc_sendreply even if the function logically returns void;  use</div><div class='del'>- * xdr.h - xdr_void for the xdr routine.  HOWEVER, tcp based rpc allows</div><div class='del'>- * for the abuse of pure rpc via batched calling or pipelining.  In the</div><div class='del'>- * case of a batched call, svc_sendreply should NOT be called since</div><div class='del'>- * this would send a return message, which is what batching tries to avoid.</div><div class='del'>- * It is the service/protocol writer's responsibility to know which calls are</div><div class='del'>- * batched and which are not.  Warning: responding to batch calls may</div><div class='del'>- * deadlock the caller and server processes!</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern bool_t	svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results,</div><div class='del'>-			       caddr_t __xdr_location) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_decode (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_weakauth (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_noproc (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers,</div><div class='del'>-				 rpcvers_t __high_vers) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_noprog (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-extern void	svcerr_systemerr (SVCXPRT *__xprt) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Lowest level dispatching -OR- who owns this process anyway.</div><div class='del'>- * Somebody has to wait for incoming requests and then call the correct</div><div class='del'>- * service routine.  The routine svc_run does infinite waiting; i.e.,</div><div class='del'>- * svc_run never returns.</div><div class='del'>- * Since another (coexistent) package may wish to selectively wait for</div><div class='del'>- * incoming calls or other events outside of the rpc architecture, the</div><div class='del'>- * routine svc_getreq is provided.  It must be passed readfds, the</div><div class='del'>- * "in-place" results of a select system call (see select, section 2).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Global keeper of rpc service descriptors in use</div><div class='del'>- * dynamic; must be inspected before each call to select</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern struct pollfd *svc_pollfd;</div><div class='del'>-extern int svc_max_pollfd;</div><div class='del'>-extern fd_set svc_fdset;</div><div class='del'>-#define svc_fds svc_fdset.fds_bits[0]	/* compatibility */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * a small program implemented by the svc_rpc implementation itself;</div><div class='del'>- * also see clnt.h for protocol numbers.</div><div class='del'>- */</div><div class='del'>-extern void svc_getreq (int __rdfds) __THROW;</div><div class='del'>-extern void svc_getreq_common (const int __fd) __THROW;</div><div class='del'>-extern void svc_getreqset (fd_set *__readfds) __THROW;</div><div class='del'>-extern void svc_getreq_poll (struct pollfd *, const int) __THROW;</div><div class='del'>-extern void svc_exit (void) __THROW;</div><div class='del'>-extern void svc_run (void) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Socket to use on svcxxx_create call to get default socket</div><div class='del'>- */</div><div class='del'>-#define	RPC_ANYSOCK	-1</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * These are the existing service side transport implementations</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Memory based rpc for testing and timing.</div><div class='del'>- */</div><div class='del'>-extern SVCXPRT *svcraw_create (void) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Udp based rpc.</div><div class='del'>- */</div><div class='del'>-extern SVCXPRT *svcudp_create (int __sock) __THROW;</div><div class='del'>-extern SVCXPRT *svcudp_bufcreate (int __sock, u_int __sendsz, u_int __recvsz)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Tcp based rpc.</div><div class='del'>- */</div><div class='del'>-extern SVCXPRT *svctcp_create (int __sock, u_int __sendsize, u_int __recvsize)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unix based rpc.</div><div class='del'>- */</div><div class='del'>-extern SVCXPRT *svcunix_create (int __sock, u_int __sendsize, u_int __recvsize,</div><div class='del'>-				char *__path) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/svc.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/svc_auth.h b/mdk-stage1/dietlibc/include/rpc/svc_auth.h<br/>deleted file mode 100644<br/>index cd4b8da29..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/svc_auth.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/svc_auth.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,54 +0,0 @@</div><div class='del'>-/* @(#)svc_auth.h	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*      @(#)svc_auth.h 1.6 86/07/16 SMI      */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_auth.h, Service side of rpc authentication.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_SVC_AUTH_H</div><div class='del'>-#define _RPC_SVC_AUTH_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;rpc/svc.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Server side authenticator</div><div class='del'>- */</div><div class='del'>-extern enum auth_stat _authenticate (struct svc_req *__rqst,</div><div class='del'>-				     struct rpc_msg *__msg) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/svc_auth.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/types.h b/mdk-stage1/dietlibc/include/rpc/types.h<br/>deleted file mode 100644<br/>index e2e8402be..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/types.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/types.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,78 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/* fixincludes should not add extern "C" to this file */</div><div class='del'>-/*</div><div class='del'>- * Rpc additions to &lt;sys/types.h&gt;</div><div class='del'>- */</div><div class='del'>-#ifndef _RPC_TYPES_H</div><div class='del'>-#define _RPC_TYPES_H 1</div><div class='del'>-</div><div class='del'>-typedef int bool_t;</div><div class='del'>-typedef int enum_t;</div><div class='del'>-/* This needs to be changed to uint32_t in the future */</div><div class='del'>-typedef unsigned long rpcprog_t;</div><div class='del'>-typedef unsigned long rpcvers_t;</div><div class='del'>-typedef unsigned long rpcproc_t;</div><div class='del'>-typedef unsigned long rpcprot_t;</div><div class='del'>-typedef unsigned long rpcport_t;</div><div class='del'>-</div><div class='del'>-#define        __dontcare__    -1</div><div class='del'>-</div><div class='del'>-#ifndef FALSE</div><div class='del'>-#      define  FALSE   (0)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef TRUE</div><div class='del'>-#      define  TRUE    (1)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef NULL</div><div class='del'>-#      define  NULL 0</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;		/* For malloc decl.  */</div><div class='del'>-#define mem_alloc(bsize)	malloc(bsize)</div><div class='del'>-#define mem_free(ptr, bsize)	free(ptr)</div><div class='del'>-</div><div class='del'>-#ifndef makedev /* ie, we haven't already included it */</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef INADDR_LOOPBACK</div><div class='del'>-#define       INADDR_LOOPBACK         (u_long)0x7F000001</div><div class='del'>-#endif</div><div class='del'>-#ifndef MAXHOSTNAMELEN</div><div class='del'>-#define        MAXHOSTNAMELEN  64</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* rpc/types.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/rpc/xdr.h b/mdk-stage1/dietlibc/include/rpc/xdr.h<br/>deleted file mode 100644<br/>index ce092f085..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/rpc/xdr.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/rpc/xdr.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,379 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr.h, External Data Representation Serialization Routines.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _RPC_XDR_H</div><div class='del'>-#define _RPC_XDR_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-</div><div class='del'>-/* We need FILE.  */</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-__BEGIN_DECLS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR provides a conventional way for converting between C data</div><div class='del'>- * types and an external bit-string representation.  Library supplied</div><div class='del'>- * routines provide for the conversion on built-in C data types.  These</div><div class='del'>- * routines and utility routines defined here are used to help implement</div><div class='del'>- * a type encode/decode routine for each user-defined type.</div><div class='del'>- *</div><div class='del'>- * Each data type provides a single procedure which takes two arguments:</div><div class='del'>- *</div><div class='del'>- *      bool_t</div><div class='del'>- *      xdrproc(xdrs, argresp)</div><div class='del'>- *              XDR *xdrs;</div><div class='del'>- *              &lt;type&gt; *argresp;</div><div class='del'>- *</div><div class='del'>- * xdrs is an instance of a XDR handle, to which or from which the data</div><div class='del'>- * type is to be converted.  argresp is a pointer to the structure to be</div><div class='del'>- * converted.  The XDR handle contains an operation field which indicates</div><div class='del'>- * which of the operations (ENCODE, DECODE * or FREE) is to be performed.</div><div class='del'>- *</div><div class='del'>- * XDR_DECODE may allocate space if the pointer argresp is null.  This</div><div class='del'>- * data can be freed with the XDR_FREE operation.</div><div class='del'>- *</div><div class='del'>- * We write only one procedure per data type to make it easy</div><div class='del'>- * to keep the encode and decode procedures for a data type consistent.</div><div class='del'>- * In many cases the same code performs all operations on a user defined type,</div><div class='del'>- * because all the hard work is done in the component type routines.</div><div class='del'>- * decode as a series of calls on the nested data types.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Xdr operations.  XDR_ENCODE causes the type to be encoded into the</div><div class='del'>- * stream.  XDR_DECODE causes the type to be extracted from the stream.</div><div class='del'>- * XDR_FREE can be used to release the space allocated by an XDR_DECODE</div><div class='del'>- * request.</div><div class='del'>- */</div><div class='del'>-enum xdr_op {</div><div class='del'>-  XDR_ENCODE = 0,</div><div class='del'>-  XDR_DECODE = 1,</div><div class='del'>-  XDR_FREE = 2</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the number of bytes per unit of external data.</div><div class='del'>- */</div><div class='del'>-#define BYTES_PER_XDR_UNIT	(4)</div><div class='del'>-/*</div><div class='del'>- * This only works if the above is a power of 2.  But it's defined to be</div><div class='del'>- * 4 by the appropriate RFCs.  So it will work.  And it's normally quicker</div><div class='del'>- * than the old routine.</div><div class='del'>- */</div><div class='del'>-#if 1</div><div class='del'>-#define RNDUP(x)  (((x) + BYTES_PER_XDR_UNIT - 1) &amp; ~(BYTES_PER_XDR_UNIT - 1))</div><div class='del'>-#else /* this is the old routine */</div><div class='del'>-#define RNDUP(x)  ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \</div><div class='del'>-		    * BYTES_PER_XDR_UNIT)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The XDR handle.</div><div class='del'>- * Contains operation which is being applied to the stream,</div><div class='del'>- * an operations vector for the particular implementation (e.g. see xdr_mem.c),</div><div class='del'>- * and two private fields for the use of the particular implementation.</div><div class='del'>- */</div><div class='del'>-typedef struct XDR XDR;</div><div class='del'>-struct XDR</div><div class='del'>-  {</div><div class='del'>-    enum xdr_op x_op;		/* operation; fast additional param */</div><div class='del'>-    struct xdr_ops</div><div class='del'>-      {</div><div class='del'>-	bool_t (*x_getlong) (XDR *__xdrs, long *__lp);</div><div class='del'>-	/* get a long from underlying stream */</div><div class='del'>-	bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);</div><div class='del'>-	/* put a long to " */</div><div class='del'>-	bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len);</div><div class='del'>-	/* get some bytes from " */</div><div class='del'>-	bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len);</div><div class='del'>-	/* put some bytes to " */</div><div class='del'>-	u_int (*x_getpostn) (const XDR *__xdrs);</div><div class='del'>-	/* returns bytes off from beginning */</div><div class='del'>-	bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);</div><div class='del'>-	/* lets you reposition the stream */</div><div class='del'>-	int32_t *(*x_inline) (XDR *__xdrs, int __len);</div><div class='del'>-	/* buf quick ptr to buffered data */</div><div class='del'>-	void (*x_destroy) (XDR *__xdrs);</div><div class='del'>-	/* free privates of this xdr_stream */</div><div class='del'>-	bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);</div><div class='del'>-	/* get a int from underlying stream */</div><div class='del'>-	bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip);</div><div class='del'>-	/* put a int to " */</div><div class='del'>-      }</div><div class='del'>-     *x_ops;</div><div class='del'>-    caddr_t x_public;		/* users' data */</div><div class='del'>-    caddr_t x_private;		/* pointer to private data */</div><div class='del'>-    caddr_t x_base;		/* private used for position info */</div><div class='del'>-    int x_handy;		/* extra private word */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A xdrproc_t exists for each data type which is to be encoded or decoded.</div><div class='del'>- *</div><div class='del'>- * The second argument to the xdrproc_t is a pointer to an opaque pointer.</div><div class='del'>- * The opaque pointer generally points to a structure of the data type</div><div class='del'>- * to be decoded.  If this pointer is 0, then the type routines should</div><div class='del'>- * allocate dynamic storage of the appropriate size and return it.</div><div class='del'>- * bool_t       (*xdrproc_t)(XDR *, caddr_t *);</div><div class='del'>- */</div><div class='del'>-typedef bool_t (*xdrproc_t) (XDR *, void *,...);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Operations defined on a XDR handle</div><div class='del'>- *</div><div class='del'>- * XDR          *xdrs;</div><div class='del'>- * int32_t      *int32p;</div><div class='del'>- * long         *longp;</div><div class='del'>- * caddr_t       addr;</div><div class='del'>- * u_int         len;</div><div class='del'>- * u_int         pos;</div><div class='del'>- */</div><div class='del'>-#define XDR_GETINT32(xdrs, int32p)                      \</div><div class='del'>-        (*(xdrs)-&gt;x_ops-&gt;x_getint32)(xdrs, int32p)</div><div class='del'>-#define xdr_getint32(xdrs, int32p)                      \</div><div class='del'>-        (*(xdrs)-&gt;x_ops-&gt;x_getint32)(xdrs, int32p)</div><div class='del'>-</div><div class='del'>-#define XDR_PUTINT32(xdrs, int32p)                      \</div><div class='del'>-        (*(xdrs)-&gt;x_ops-&gt;x_putint32)(xdrs, int32p)</div><div class='del'>-#define xdr_putint32(xdrs, int32p)                      \</div><div class='del'>-        (*(xdrs)-&gt;x_ops-&gt;x_putint32)(xdrs, int32p)</div><div class='del'>-</div><div class='del'>-#define XDR_GETLONG(xdrs, longp)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getlong)(xdrs, longp)</div><div class='del'>-#define xdr_getlong(xdrs, longp)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getlong)(xdrs, longp)</div><div class='del'>-</div><div class='del'>-#define XDR_PUTLONG(xdrs, longp)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_putlong)(xdrs, longp)</div><div class='del'>-#define xdr_putlong(xdrs, longp)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_putlong)(xdrs, longp)</div><div class='del'>-</div><div class='del'>-#define XDR_GETBYTES(xdrs, addr, len)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getbytes)(xdrs, addr, len)</div><div class='del'>-#define xdr_getbytes(xdrs, addr, len)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getbytes)(xdrs, addr, len)</div><div class='del'>-</div><div class='del'>-#define XDR_PUTBYTES(xdrs, addr, len)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_putbytes)(xdrs, addr, len)</div><div class='del'>-#define xdr_putbytes(xdrs, addr, len)			\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_putbytes)(xdrs, addr, len)</div><div class='del'>-</div><div class='del'>-#define XDR_GETPOS(xdrs)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getpostn)(xdrs)</div><div class='del'>-#define xdr_getpos(xdrs)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_getpostn)(xdrs)</div><div class='del'>-</div><div class='del'>-#define XDR_SETPOS(xdrs, pos)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_setpostn)(xdrs, pos)</div><div class='del'>-#define xdr_setpos(xdrs, pos)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_setpostn)(xdrs, pos)</div><div class='del'>-</div><div class='del'>-#define	XDR_INLINE(xdrs, len)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_inline)(xdrs, len)</div><div class='del'>-#define	xdr_inline(xdrs, len)				\</div><div class='del'>-	(*(xdrs)-&gt;x_ops-&gt;x_inline)(xdrs, len)</div><div class='del'>-</div><div class='del'>-#define	XDR_DESTROY(xdrs)					\</div><div class='del'>-	do {							\</div><div class='del'>-		if ((xdrs)-&gt;x_ops-&gt;x_destroy)			\</div><div class='del'>-			(*(xdrs)-&gt;x_ops-&gt;x_destroy)(xdrs);	\</div><div class='del'>-	} while (0)</div><div class='del'>-#define	xdr_destroy(xdrs)					\</div><div class='del'>-	do {							\</div><div class='del'>-		if ((xdrs)-&gt;x_ops-&gt;x_destroy)			\</div><div class='del'>-			(*(xdrs)-&gt;x_ops-&gt;x_destroy)(xdrs);	\</div><div class='del'>-	} while (0)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Support struct for discriminated unions.</div><div class='del'>- * You create an array of xdrdiscrim structures, terminated with</div><div class='del'>- * a entry with a null procedure pointer.  The xdr_union routine gets</div><div class='del'>- * the discriminant value and then searches the array of structures</div><div class='del'>- * for a matching value.  If a match is found the associated xdr routine</div><div class='del'>- * is called to handle that part of the union.  If there is</div><div class='del'>- * no match, then a default routine may be called.</div><div class='del'>- * If there is no match and no default routine it is an error.</div><div class='del'>- */</div><div class='del'>-#define NULL_xdrproc_t ((xdrproc_t)0)</div><div class='del'>-struct xdr_discrim</div><div class='del'>-{</div><div class='del'>-  int value;</div><div class='del'>-  xdrproc_t proc;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Inline routines for fast encode/decode of primitive data types.</div><div class='del'>- * Caveat emptor: these use single memory cycles to get the</div><div class='del'>- * data from the underlying buffer, and will fail to operate</div><div class='del'>- * properly if the data is not aligned.  The standard way to use these</div><div class='del'>- * is to say:</div><div class='del'>- *      if ((buf = XDR_INLINE(xdrs, count)) == NULL)</div><div class='del'>- *              return (FALSE);</div><div class='del'>- *      &lt;&lt;&lt; macro calls &gt;&gt;&gt;</div><div class='del'>- * where ``count'' is the number of bytes of data occupied</div><div class='del'>- * by the primitive data types.</div><div class='del'>- *</div><div class='del'>- * N.B. and frozen for all time: each data type here uses 4 bytes</div><div class='del'>- * of external representation.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define IXDR_GET_INT32(buf)           ((int32_t)ntohl((uint32_t)*(buf)++))</div><div class='del'>-#define IXDR_PUT_INT32(buf, v)        (*(buf)++ = (int32_t)htonl((uint32_t)(v)))</div><div class='del'>-#define IXDR_GET_U_INT32(buf)         ((uint32_t)IXDR_GET_INT32(buf))</div><div class='del'>-#define IXDR_PUT_U_INT32(buf, v)      IXDR_PUT_INT32(buf, (int32_t)(v))</div><div class='del'>-</div><div class='del'>-/* WARNING: The IXDR_*_LONG defines are removed by Sun for new platforms</div><div class='del'>- * and shouldn't be used any longer. Code which use this defines or longs</div><div class='del'>- * in the RPC code will not work on 64bit Solaris platforms !</div><div class='del'>- */</div><div class='del'>-#define IXDR_GET_LONG(buf) \</div><div class='del'>-	((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))</div><div class='del'>-#define IXDR_PUT_LONG(buf, v) \</div><div class='del'>-	(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))</div><div class='del'>-#define IXDR_GET_U_LONG(buf)	      ((u_long)IXDR_GET_LONG(buf))</div><div class='del'>-#define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define IXDR_GET_BOOL(buf)            ((bool_t)IXDR_GET_LONG(buf))</div><div class='del'>-#define IXDR_GET_ENUM(buf, t)         ((t)IXDR_GET_LONG(buf))</div><div class='del'>-#define IXDR_GET_SHORT(buf)           ((short)IXDR_GET_LONG(buf))</div><div class='del'>-#define IXDR_GET_U_SHORT(buf)         ((u_short)IXDR_GET_LONG(buf))</div><div class='del'>-</div><div class='del'>-#define IXDR_PUT_BOOL(buf, v)         IXDR_PUT_LONG(buf, (long)(v))</div><div class='del'>-#define IXDR_PUT_ENUM(buf, v)         IXDR_PUT_LONG(buf, (long)(v))</div><div class='del'>-#define IXDR_PUT_SHORT(buf, v)        IXDR_PUT_LONG(buf, (long)(v))</div><div class='del'>-#define IXDR_PUT_U_SHORT(buf, v)      IXDR_PUT_LONG(buf, (long)(v))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * These are the "generic" xdr routines.</div><div class='del'>- * None of these can have const applied because it's not possible to</div><div class='del'>- * know whether the call is a read or a write to the passed parameter</div><div class='del'>- * also, the XDR structure is always updated by some of these calls.</div><div class='del'>- */</div><div class='del'>-extern bool_t xdr_void (void) __THROW;</div><div class='del'>-extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW;</div><div class='del'>-extern bool_t xdr_u_short (XDR *__xdrs, u_short *__usp) __THROW;</div><div class='del'>-extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW;</div><div class='del'>-extern bool_t xdr_u_int (XDR *__xdrs, u_int *__up) __THROW;</div><div class='del'>-extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW;</div><div class='del'>-extern bool_t xdr_u_long (XDR *__xdrs, u_long *__ulp) __THROW;</div><div class='del'>-extern bool_t xdr_hyper (XDR *__xdrs, __quad_t *__llp) __THROW;</div><div class='del'>-extern bool_t xdr_u_hyper (XDR *__xdrs, __u_quad_t *__ullp) __THROW;</div><div class='del'>-extern bool_t xdr_longlong_t (XDR *__xdrs, __quad_t *__llp) __THROW;</div><div class='del'>-extern bool_t xdr_u_longlong_t (XDR *__xdrs, __u_quad_t *__ullp) __THROW;</div><div class='del'>-extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW;</div><div class='del'>-extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW;</div><div class='del'>-extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW;</div><div class='del'>-extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW;</div><div class='del'>-extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW;</div><div class='del'>-extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW;</div><div class='del'>-extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW;</div><div class='del'>-extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW;</div><div class='del'>-extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW;</div><div class='del'>-extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW;</div><div class='del'>-extern bool_t xdr_array (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep,</div><div class='del'>-			 u_int __maxsize, u_int __elsize, xdrproc_t __elproc)</div><div class='del'>-     __THROW;</div><div class='del'>-extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, u_int *__sizep,</div><div class='del'>-			 u_int __maxsize) __THROW;</div><div class='del'>-extern bool_t xdr_opaque (XDR *__xdrs, caddr_t __cp, u_int __cnt) __THROW;</div><div class='del'>-extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW;</div><div class='del'>-extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,</div><div class='del'>-			 const struct xdr_discrim *__choices,</div><div class='del'>-			 xdrproc_t dfault) __THROW;</div><div class='del'>-extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW;</div><div class='del'>-extern bool_t xdr_u_char (XDR *__xdrs, u_char *__cp) __THROW;</div><div class='del'>-extern bool_t xdr_vector (XDR *__xdrs, char *__basep, u_int __nelem,</div><div class='del'>-			  u_int __elemsize, xdrproc_t __xdr_elem) __THROW;</div><div class='del'>-extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW;</div><div class='del'>-extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW;</div><div class='del'>-extern bool_t xdr_reference (XDR *__xdrs, caddr_t *__xpp, u_int __size,</div><div class='del'>-			     xdrproc_t __proc) __THROW;</div><div class='del'>-extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp,</div><div class='del'>-			   u_int __obj_size, xdrproc_t __xdr_obj) __THROW;</div><div class='del'>-extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW;</div><div class='del'>-extern u_long xdr_sizeof (xdrproc_t, void *) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Common opaque bytes objects used by many rpc protocols;</div><div class='del'>- * declared here due to commonality.</div><div class='del'>- */</div><div class='del'>-#define MAX_NETOBJ_SZ 1024</div><div class='del'>-struct netobj</div><div class='del'>-{</div><div class='del'>-  u_int n_len;</div><div class='del'>-  char *n_bytes;</div><div class='del'>-};</div><div class='del'>-typedef struct netobj netobj;</div><div class='del'>-extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * These are the public routines for the various implementations of</div><div class='del'>- * xdr streams.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* XDR using memory buffers */</div><div class='del'>-extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr,</div><div class='del'>-			   u_int __size, enum xdr_op __xop) __THROW;</div><div class='del'>-</div><div class='del'>-/* XDR using stdio library */</div><div class='del'>-extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop)</div><div class='del'>-     __THROW;</div><div class='del'>-</div><div class='del'>-/* XDR pseudo records for tcp */</div><div class='del'>-extern void xdrrec_create (XDR *__xdrs, u_int __sendsize,</div><div class='del'>-			   u_int __recvsize, caddr_t __tcp_handle,</div><div class='del'>-			   int (*__readit) (char *, char *, int),</div><div class='del'>-			   int (*__writeit) (char *, char *, int)) __THROW;</div><div class='del'>-</div><div class='del'>-/* make end of xdr record */</div><div class='del'>-extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW;</div><div class='del'>-</div><div class='del'>-/* move to beginning of next record */</div><div class='del'>-extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW;</div><div class='del'>-</div><div class='del'>-/* true if no more input */</div><div class='del'>-extern bool_t xdrrec_eof (XDR *__xdrs) __THROW;</div><div class='del'>-</div><div class='del'>-/* free memory buffers for xdr */</div><div class='del'>-extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW;</div><div class='del'>-</div><div class='del'>-__END_DECLS</div><div class='del'>-</div><div class='del'>-#endif /* rpc/xdr.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sched.h b/mdk-stage1/dietlibc/include/sched.h<br/>deleted file mode 100644<br/>index 5e4430d29..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sched.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sched.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,74 +0,0 @@</div><div class='del'>-#ifndef _SCHED_H</div><div class='del'>-#define _SCHED_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#ifndef u16</div><div class='del'>-#define u16 __u16</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* till those F**KIN' kernel headers are sane: A COPY !</div><div class='del'>- * #include &lt;linux/sched.h&gt;</div><div class='del'>- * A COPY OF THE STUFF WE NEED.... *GRUMBLE* */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cloning flags:</div><div class='del'>- */</div><div class='del'>-#define CSIGNAL         0x000000ff      /* signal mask to be sent at exit */</div><div class='del'>-#define CLONE_VM        0x00000100      /* set if VM shared between processes */</div><div class='del'>-#define CLONE_FS        0x00000200      /* set if fs info shared between processes */</div><div class='del'>-#define CLONE_FILES     0x00000400      /* set if open files shared between processes */</div><div class='del'>-#define CLONE_SIGHAND   0x00000800      /* set if signal handlers and blocked signals shared */</div><div class='del'>-#define CLONE_PID       0x00001000      /* set if pid shared */</div><div class='del'>-#define CLONE_PTRACE    0x00002000      /* set if we want to let tracing continue on the child too */</div><div class='del'>-#define CLONE_VFORK     0x00004000      /* set if the parent wants the child to wake it up on mm_release */</div><div class='del'>-#define CLONE_PARENT    0x00008000      /* set if we want to have the same parent as the cloner */</div><div class='del'>-#define CLONE_THREAD    0x00010000      /* Same thread group? */</div><div class='del'>-</div><div class='del'>-#define CLONE_SIGNAL    (CLONE_SIGHAND | CLONE_THREA)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Scheduling policies</div><div class='del'>- */</div><div class='del'>-#define SCHED_OTHER		0</div><div class='del'>-#define SCHED_FIFO		1</div><div class='del'>-#define SCHED_RR		2</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is an additional bit set when we want to</div><div class='del'>- * yield the CPU for one re-schedule..</div><div class='del'>- */</div><div class='del'>-#define SCHED_YIELD		0x10</div><div class='del'>-</div><div class='del'>-struct sched_param {</div><div class='del'>-	int sched_priority;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* END OF COPY form kernel-header */</div><div class='del'>-</div><div class='del'>-int __sched_setparam(pid_t pid, const struct sched_param *p);</div><div class='del'>-int sched_setparam(pid_t pid, const struct sched_param *p);</div><div class='del'>-</div><div class='del'>-int __sched_getparam(pid_t pid, struct sched_param *p);</div><div class='del'>-int sched_getparam(pid_t pid, struct sched_param *p);</div><div class='del'>-</div><div class='del'>-int __sched_getscheduler(pid_t pid);</div><div class='del'>-int sched_getscheduler(pid_t pid);</div><div class='del'>-</div><div class='del'>-int __sched_setscheduler(pid_t pid, int policy, const struct sched_param *p);</div><div class='del'>-int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p);</div><div class='del'>-</div><div class='del'>-int __sched_yield(void);</div><div class='del'>-int sched_yield(void);</div><div class='del'>-</div><div class='del'>-int __sched_get_priority_max(int policy);</div><div class='del'>-int sched_get_priority_max(int policy);</div><div class='del'>-</div><div class='del'>-int __sched_get_priority_min(int policy);</div><div class='del'>-int sched_get_priority_min(int policy);</div><div class='del'>-</div><div class='del'>-int __sched_rr_get_interval(pid_t pid, struct timespec *tp);</div><div class='del'>-int sched_rr_get_interval(pid_t pid, struct timespec *tp);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/scsi/scsi.h b/mdk-stage1/dietlibc/include/scsi/scsi.h<br/>deleted file mode 100644<br/>index 652e44ee9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/scsi/scsi.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/scsi/scsi.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,224 +0,0 @@</div><div class='del'>-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This header file contains public constants and structures used by</div><div class='del'>- * the scsi code for linux.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _SCSI_SCSI_H</div><div class='del'>-#define _SCSI_SCSI_H	1</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *      SCSI opcodes</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define TEST_UNIT_READY       0x00</div><div class='del'>-#define REZERO_UNIT           0x01</div><div class='del'>-#define REQUEST_SENSE         0x03</div><div class='del'>-#define FORMAT_UNIT           0x04</div><div class='del'>-#define READ_BLOCK_LIMITS     0x05</div><div class='del'>-#define REASSIGN_BLOCKS       0x07</div><div class='del'>-#define READ_6                0x08</div><div class='del'>-#define WRITE_6               0x0a</div><div class='del'>-#define SEEK_6                0x0b</div><div class='del'>-#define READ_REVERSE          0x0f</div><div class='del'>-#define WRITE_FILEMARKS       0x10</div><div class='del'>-#define SPACE                 0x11</div><div class='del'>-#define INQUIRY               0x12</div><div class='del'>-#define RECOVER_BUFFERED_DATA 0x14</div><div class='del'>-#define MODE_SELECT           0x15</div><div class='del'>-#define RESERVE               0x16</div><div class='del'>-#define RELEASE               0x17</div><div class='del'>-#define COPY                  0x18</div><div class='del'>-#define ERASE                 0x19</div><div class='del'>-#define MODE_SENSE            0x1a</div><div class='del'>-#define START_STOP            0x1b</div><div class='del'>-#define RECEIVE_DIAGNOSTIC    0x1c</div><div class='del'>-#define SEND_DIAGNOSTIC       0x1d</div><div class='del'>-#define ALLOW_MEDIUM_REMOVAL  0x1e</div><div class='del'>-</div><div class='del'>-#define SET_WINDOW            0x24</div><div class='del'>-#define READ_CAPACITY         0x25</div><div class='del'>-#define READ_10               0x28</div><div class='del'>-#define WRITE_10              0x2a</div><div class='del'>-#define SEEK_10               0x2b</div><div class='del'>-#define WRITE_VERIFY          0x2e</div><div class='del'>-#define VERIFY                0x2f</div><div class='del'>-#define SEARCH_HIGH           0x30</div><div class='del'>-#define SEARCH_EQUAL          0x31</div><div class='del'>-#define SEARCH_LOW            0x32</div><div class='del'>-#define SET_LIMITS            0x33</div><div class='del'>-#define PRE_FETCH             0x34</div><div class='del'>-#define READ_POSITION         0x34</div><div class='del'>-#define SYNCHRONIZE_CACHE     0x35</div><div class='del'>-#define LOCK_UNLOCK_CACHE     0x36</div><div class='del'>-#define READ_DEFECT_DATA      0x37</div><div class='del'>-#define MEDIUM_SCAN           0x38</div><div class='del'>-#define COMPARE               0x39</div><div class='del'>-#define COPY_VERIFY           0x3a</div><div class='del'>-#define WRITE_BUFFER          0x3b</div><div class='del'>-#define READ_BUFFER           0x3c</div><div class='del'>-#define UPDATE_BLOCK          0x3d</div><div class='del'>-#define READ_LONG             0x3e</div><div class='del'>-#define WRITE_LONG            0x3f</div><div class='del'>-#define CHANGE_DEFINITION     0x40</div><div class='del'>-#define WRITE_SAME            0x41</div><div class='del'>-#define READ_TOC              0x43</div><div class='del'>-#define LOG_SELECT            0x4c</div><div class='del'>-#define LOG_SENSE             0x4d</div><div class='del'>-#define MODE_SELECT_10        0x55</div><div class='del'>-#define RESERVE_10            0x56</div><div class='del'>-#define RELEASE_10            0x57</div><div class='del'>-#define MODE_SENSE_10         0x5a</div><div class='del'>-#define PERSISTENT_RESERVE_IN 0x5e</div><div class='del'>-#define PERSISTENT_RESERVE_OUT 0x5f</div><div class='del'>-#define MOVE_MEDIUM           0xa5</div><div class='del'>-#define READ_12               0xa8</div><div class='del'>-#define WRITE_12              0xaa</div><div class='del'>-#define WRITE_VERIFY_12       0xae</div><div class='del'>-#define SEARCH_HIGH_12        0xb0</div><div class='del'>-#define SEARCH_EQUAL_12       0xb1</div><div class='del'>-#define SEARCH_LOW_12         0xb2</div><div class='del'>-#define READ_ELEMENT_STATUS   0xb8</div><div class='del'>-#define SEND_VOLUME_TAG       0xb6</div><div class='del'>-#define WRITE_LONG_2          0xea</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Status codes</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define GOOD                 0x00</div><div class='del'>-#define CHECK_CONDITION      0x01</div><div class='del'>-#define CONDITION_GOOD       0x02</div><div class='del'>-#define BUSY                 0x04</div><div class='del'>-#define INTERMEDIATE_GOOD    0x08</div><div class='del'>-#define INTERMEDIATE_C_GOOD  0x0a</div><div class='del'>-#define RESERVATION_CONFLICT 0x0c</div><div class='del'>-#define COMMAND_TERMINATED   0x11</div><div class='del'>-#define QUEUE_FULL           0x14</div><div class='del'>-</div><div class='del'>-#define STATUS_MASK          0x3e</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  SENSE KEYS</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NO_SENSE            0x00</div><div class='del'>-#define RECOVERED_ERROR     0x01</div><div class='del'>-#define NOT_READY           0x02</div><div class='del'>-#define MEDIUM_ERROR        0x03</div><div class='del'>-#define HARDWARE_ERROR      0x04</div><div class='del'>-#define ILLEGAL_REQUEST     0x05</div><div class='del'>-#define UNIT_ATTENTION      0x06</div><div class='del'>-#define DATA_PROTECT        0x07</div><div class='del'>-#define BLANK_CHECK         0x08</div><div class='del'>-#define COPY_ABORTED        0x0a</div><div class='del'>-#define ABORTED_COMMAND     0x0b</div><div class='del'>-#define VOLUME_OVERFLOW     0x0d</div><div class='del'>-#define MISCOMPARE          0x0e</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  DEVICE TYPES</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define TYPE_DISK           0x00</div><div class='del'>-#define TYPE_TAPE           0x01</div><div class='del'>-#define TYPE_PROCESSOR      0x03    /* HP scanners use this */</div><div class='del'>-#define TYPE_WORM           0x04    /* Treated as ROM by our system */</div><div class='del'>-#define TYPE_ROM            0x05</div><div class='del'>-#define TYPE_SCANNER        0x06</div><div class='del'>-#define TYPE_MOD            0x07    /* Magneto-optical disk -</div><div class='del'>-				     * - treated as TYPE_DISK */</div><div class='del'>-#define TYPE_MEDIUM_CHANGER 0x08</div><div class='del'>-#define TYPE_ENCLOSURE	    0x0d    /* Enclosure Services Device */</div><div class='del'>-#define TYPE_NO_LUN         0x7f</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * standard mode-select header prepended to all mode-select commands</div><div class='del'>- *</div><div class='del'>- * moved here from cdrom.h -- kraxel</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct ccs_modesel_head</div><div class='del'>-  {</div><div class='del'>-    unsigned char _r1;			/* reserved.  */</div><div class='del'>-    unsigned char medium;		/* device-specific medium type.  */</div><div class='del'>-    unsigned char _r2;			/* reserved.  */</div><div class='del'>-    unsigned char block_desc_length;	/* block descriptor length.  */</div><div class='del'>-    unsigned char density;		/* device-specific density code.  */</div><div class='del'>-    unsigned char number_blocks_hi;	/* number of blocks in this block</div><div class='del'>-					   desc.  */</div><div class='del'>-    unsigned char number_blocks_med;</div><div class='del'>-    unsigned char number_blocks_lo;</div><div class='del'>-    unsigned char _r3;</div><div class='del'>-    unsigned char block_length_hi;	/* block length for blocks in this</div><div class='del'>-					   desc.  */</div><div class='del'>-    unsigned char block_length_med;</div><div class='del'>-    unsigned char block_length_lo;</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  MESSAGE CODES</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define COMMAND_COMPLETE    0x00</div><div class='del'>-#define EXTENDED_MESSAGE    0x01</div><div class='del'>-#define     EXTENDED_MODIFY_DATA_POINTER    0x00</div><div class='del'>-#define     EXTENDED_SDTR                   0x01</div><div class='del'>-#define     EXTENDED_EXTENDED_IDENTIFY      0x02    /* SCSI-I only */</div><div class='del'>-#define     EXTENDED_WDTR                   0x03</div><div class='del'>-#define SAVE_POINTERS       0x02</div><div class='del'>-#define RESTORE_POINTERS    0x03</div><div class='del'>-#define DISCONNECT          0x04</div><div class='del'>-#define INITIATOR_ERROR     0x05</div><div class='del'>-#define ABORT               0x06</div><div class='del'>-#define MESSAGE_REJECT      0x07</div><div class='del'>-#define NOP                 0x08</div><div class='del'>-#define MSG_PARITY_ERROR    0x09</div><div class='del'>-#define LINKED_CMD_COMPLETE 0x0a</div><div class='del'>-#define LINKED_FLG_CMD_COMPLETE 0x0b</div><div class='del'>-#define BUS_DEVICE_RESET    0x0c</div><div class='del'>-</div><div class='del'>-#define INITIATE_RECOVERY   0x0f            /* SCSI-II only */</div><div class='del'>-#define RELEASE_RECOVERY    0x10            /* SCSI-II only */</div><div class='del'>-</div><div class='del'>-#define SIMPLE_QUEUE_TAG    0x20</div><div class='del'>-#define HEAD_OF_QUEUE_TAG   0x21</div><div class='del'>-#define ORDERED_QUEUE_TAG   0x22</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Here are some scsi specific ioctl commands which are sometimes useful.</div><div class='del'>- */</div><div class='del'>-/* These are a few other constants only used by scsi devices.  */</div><div class='del'>-</div><div class='del'>-#define SCSI_IOCTL_GET_IDLUN 0x5382</div><div class='del'>-</div><div class='del'>-/* Used to turn on and off tagged queuing for scsi devices.  */</div><div class='del'>-</div><div class='del'>-#define SCSI_IOCTL_TAGGED_ENABLE 0x5383</div><div class='del'>-#define SCSI_IOCTL_TAGGED_DISABLE 0x5384</div><div class='del'>-</div><div class='del'>-/* Used to obtain the host number of a device.  */</div><div class='del'>-#define SCSI_IOCTL_PROBE_HOST 0x5385</div><div class='del'>-</div><div class='del'>-/* Used to get the bus number for a device.  */</div><div class='del'>-#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386</div><div class='del'>-</div><div class='del'>-#endif /* scsi/scsi.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h b/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h<br/>deleted file mode 100644<br/>index bc9931838..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/scsi/scsi_ioctl.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,34 +0,0 @@</div><div class='del'>-/* Copyright (C) 1999 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ifndef _SCSI_IOCTL_H</div><div class='del'>-#define _SCSI_IOCTL_H </div><div class='del'>-</div><div class='del'>-/* IOCTLs for SCSI.  */</div><div class='del'>-#define SCSI_IOCTL_SEND_COMMAND		1	/* Send a command to the SCSI host.  */</div><div class='del'>-#define SCSI_IOCTL_TEST_UNIT_READY	2	/* Test if unit is ready.  */</div><div class='del'>-#define SCSI_IOCTL_BENCHMARK_COMMAND	3</div><div class='del'>-#define SCSI_IOCTL_SYNC			4	/* Request synchronous parameters.  */</div><div class='del'>-#define SCSI_IOCTL_START_UNIT		5</div><div class='del'>-#define SCSI_IOCTL_STOP_UNIT		6</div><div class='del'>-#define SCSI_IOCTL_DOORLOCK		0x5380	/* Lock the eject mechanism.  */</div><div class='del'>-#define SCSI_IOCTL_DOORUNLOCK		0x5381	/* Unlock the mechanism.  */</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/scsi/sg.h b/mdk-stage1/dietlibc/include/scsi/sg.h<br/>deleted file mode 100644<br/>index 00334654e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/scsi/sg.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/scsi/sg.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,274 +0,0 @@</div><div class='del'>-/* Copyright (C) 1997, 1998, 1999, 2000  Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-   History:</div><div class='del'>-    Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user</div><div class='del'>-     process control of SCSI devices.</div><div class='del'>-    Development Sponsored by Killy Corp. NY NY</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#ifndef _SCSI_SG_H</div><div class='del'>-#define _SCSI_SG_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-/* New interface introduced in the 3.x SG drivers follows */</div><div class='del'>-</div><div class='del'>-/* Same structure as used by readv() Linux system call. It defines one</div><div class='del'>-   scatter-gather element. */</div><div class='del'>-typedef struct sg_iovec</div><div class='del'>-{</div><div class='del'>-  void * iov_base;            /* Starting address  */</div><div class='del'>-  size_t iov_len;             /* Length in bytes  */</div><div class='del'>-} sg_iovec_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct sg_io_hdr</div><div class='del'>-{</div><div class='del'>-  int interface_id;           /* [i] 'S' for SCSI generic (required) */</div><div class='del'>-  int dxfer_direction;        /* [i] data transfer direction  */</div><div class='del'>-  unsigned char cmd_len;      /* [i] SCSI command length ( &lt;= 16 bytes) */</div><div class='del'>-  unsigned char mx_sb_len;    /* [i] max length to write to sbp */</div><div class='del'>-  unsigned short int iovec_count; /* [i] 0 implies no scatter gather */</div><div class='del'>-  unsigned int dxfer_len;     /* [i] byte count of data transfer */</div><div class='del'>-  void * dxferp;              /* [i], [*io] points to data transfer memory</div><div class='del'>-				 or scatter gather list */</div><div class='del'>-  unsigned char * cmdp;       /* [i], [*i] points to command to perform */</div><div class='del'>-  unsigned char * sbp;        /* [i], [*o] points to sense_buffer memory */</div><div class='del'>-  unsigned int timeout;       /* [i] MAX_UINT-&gt;no timeout (unit: millisec) */</div><div class='del'>-  unsigned int flags;         /* [i] 0 -&gt; default, see SG_FLAG... */</div><div class='del'>-  int pack_id;                /* [i-&gt;o] unused internally (normally) */</div><div class='del'>-  void * usr_ptr;             /* [i-&gt;o] unused internally */</div><div class='del'>-  unsigned char status;       /* [o] scsi status */</div><div class='del'>-  unsigned char masked_status;/* [o] shifted, masked scsi status */</div><div class='del'>-  unsigned char msg_status;   /* [o] messaging level data (optional) */</div><div class='del'>-  unsigned char sb_len_wr;    /* [o] byte count actually written to sbp */</div><div class='del'>-  unsigned short int host_status; /* [o] errors from host adapter */</div><div class='del'>-  unsigned short int driver_status;/* [o] errors from software driver */</div><div class='del'>-  int resid;                  /* [o] dxfer_len - actual_transferred */</div><div class='del'>-  unsigned int duration;      /* [o] time taken by cmd (unit: millisec) */</div><div class='del'>-  unsigned int info;          /* [o] auxiliary information */</div><div class='del'>-} sg_io_hdr_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Use negative values to flag difference from original sg_header structure.  */</div><div class='del'>-#define SG_DXFER_NONE -1        /* e.g. a SCSI Test Unit Ready command */</div><div class='del'>-#define SG_DXFER_TO_DEV -2      /* e.g. a SCSI WRITE command */</div><div class='del'>-#define SG_DXFER_FROM_DEV -3    /* e.g. a SCSI READ command */</div><div class='del'>-#define SG_DXFER_TO_FROM_DEV -4 /* treated like SG_DXFER_FROM_DEV with the</div><div class='del'>-				   additional property than during indirect</div><div class='del'>-				   IO the user buffer is copied into the</div><div class='del'>-				   kernel buffers before the transfer */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* following flag values can be "or"-ed together */</div><div class='del'>-#define SG_FLAG_DIRECT_IO 1     /* default is indirect IO */</div><div class='del'>-#define SG_FLAG_LUN_INHIBIT 2   /* default is to put device's lun into */</div><div class='del'>-				/* the 2nd byte of SCSI command */</div><div class='del'>-#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */</div><div class='del'>-				/* user space (debug indirect IO) */</div><div class='del'>-</div><div class='del'>-/* The following 'info' values are "or"-ed together.  */</div><div class='del'>-#define SG_INFO_OK_MASK	0x1</div><div class='del'>-#define SG_INFO_OK	0x0	/* no sense, host nor driver "noise" */</div><div class='del'>-#define SG_INFO_CHECK	0x1     /* something abnormal happened */</div><div class='del'>-</div><div class='del'>-#define SG_INFO_DIRECT_IO_MASK	0x6</div><div class='del'>-#define SG_INFO_INDIRECT_IO 	0x0	/* data xfer via kernel buffers (or no xfer) */</div><div class='del'>-#define SG_INFO_DIRECT_IO 	0x2	/* direct IO requested and performed */</div><div class='del'>-#define SG_INFO_MIXED_IO 	0x4	/* part direct, part indirect IO */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Request information about a specific SG device, used by</div><div class='del'>-   SG_GET_SCSI_ID ioctl ().  */</div><div class='del'>-struct sg_scsi_id {</div><div class='del'>-  /* Host number as in "scsi&lt;n&gt;" where 'n' is one of 0, 1, 2 etc.  */</div><div class='del'>-  int host_no;</div><div class='del'>-  int channel;</div><div class='del'>-  /* SCSI id of target device.  */</div><div class='del'>-  int scsi_id;</div><div class='del'>-  int lun;</div><div class='del'>-  /* TYPE_... defined in &lt;scsi/scsi.h&gt;.  */</div><div class='del'>-  int scsi_type;</div><div class='del'>-  /* Host (adapter) maximum commands per lun.  */</div><div class='del'>-  short int h_cmd_per_lun;</div><div class='del'>-  /* Device (or adapter) maximum queue length.  */</div><div class='del'>-  short int d_queue_depth;</div><div class='del'>-  /* Unused, set to 0 for now.  */</div><div class='del'>-  int unused[2];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Used by SG_GET_REQUEST_TABLE ioctl().  */</div><div class='del'>-typedef struct sg_req_info {</div><div class='del'>-    char req_state;     /* 0 -&gt; not used, 1 -&gt; written, 2 -&gt; ready to read */</div><div class='del'>-    char orphan;        /* 0 -&gt; normal request, 1 -&gt; from interruped SG_IO */</div><div class='del'>-    char sg_io_owned;   /* 0 -&gt; complete with read(), 1 -&gt; owned by SG_IO */</div><div class='del'>-    char problem;       /* 0 -&gt; no problem detected, 1 -&gt; error to report */</div><div class='del'>-    int pack_id;        /* pack_id associated with request */</div><div class='del'>-    void * usr_ptr;     /* user provided pointer (in new interface) */</div><div class='del'>-    unsigned int duration; /* millisecs elapsed since written (req_state==1)</div><div class='del'>-			      or request duration (req_state==2) */</div><div class='del'>-    int unused;</div><div class='del'>-} sg_req_info_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* IOCTLs: Those ioctls that are relevant to the SG 3.x drivers follow.</div><div class='del'>- [Those that only apply to the SG 2.x drivers are at the end of the file.]</div><div class='del'>- (_GET_s yield result via 'int *' 3rd argument unless otherwise indicated) */</div><div class='del'>-</div><div class='del'>-#define SG_EMULATED_HOST 0x2203 /* true for emulated host adapter (ATAPI) */</div><div class='del'>-</div><div class='del'>-/* Used to configure SCSI command transformation layer for ATAPI devices */</div><div class='del'>-/* Only supported by the ide-scsi driver */</div><div class='del'>-#define SG_SET_TRANSFORM 0x2204 /* N.B. 3rd arg is not pointer but value: */</div><div class='del'>-		      /* 3rd arg = 0 to disable transform, 1 to enable it */</div><div class='del'>-#define SG_GET_TRANSFORM 0x2205</div><div class='del'>-</div><div class='del'>-#define SG_SET_RESERVED_SIZE 0x2275  /* request a new reserved buffer size */</div><div class='del'>-#define SG_GET_RESERVED_SIZE 0x2272  /* actual size of reserved buffer */</div><div class='del'>-</div><div class='del'>-/* The following ioctl has a 'sg_scsi_id_t *' object as its 3rd argument. */</div><div class='del'>-#define SG_GET_SCSI_ID 0x2276   /* Yields fd's bus, chan, dev, lun + type */</div><div class='del'>-/* SCSI id information can also be obtained from SCSI_IOCTL_GET_IDLUN */</div><div class='del'>-</div><div class='del'>-/* Override host setting and always DMA using low memory ( &lt;16MB on i386) */</div><div class='del'>-#define SG_SET_FORCE_LOW_DMA 0x2279  /* 0-&gt; use adapter setting, 1-&gt; force */</div><div class='del'>-#define SG_GET_LOW_DMA 0x227a   /* 0-&gt; use all ram for dma; 1-&gt; low dma ram */</div><div class='del'>-</div><div class='del'>-/* When SG_SET_FORCE_PACK_ID set to 1, pack_id is input to read() which</div><div class='del'>-   tries to fetch a packet with a matching pack_id, waits, or returns EAGAIN.</div><div class='del'>-   If pack_id is -1 then read oldest waiting. When ...FORCE_PACK_ID set to 0</div><div class='del'>-   then pack_id ignored by read() and oldest readable fetched. */</div><div class='del'>-#define SG_SET_FORCE_PACK_ID 0x227b</div><div class='del'>-#define SG_GET_PACK_ID 0x227c /* Yields oldest readable pack_id (or -1) */</div><div class='del'>-</div><div class='del'>-#define SG_GET_NUM_WAITING 0x227d /* Number of commands awaiting read() */</div><div class='del'>-</div><div class='del'>-/* Yields max scatter gather tablesize allowed by current host adapter */</div><div class='del'>-#define SG_GET_SG_TABLESIZE 0x227F  /* 0 implies can't do scatter gather */</div><div class='del'>-</div><div class='del'>-#define SG_GET_VERSION_NUM 0x2282 /* Example: version 2.1.34 yields 20134 */</div><div class='del'>-</div><div class='del'>-/* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */</div><div class='del'>-#define SG_SCSI_RESET 0x2284</div><div class='del'>-/* Associated values that can be given to SG_SCSI_RESET follow */</div><div class='del'>-#define SG_SCSI_RESET_NOTHING	0</div><div class='del'>-#define SG_SCSI_RESET_DEVICE	1</div><div class='del'>-#define SG_SCSI_RESET_BUS	2</div><div class='del'>-#define SG_SCSI_RESET_HOST	3</div><div class='del'>-</div><div class='del'>-/* synchronous SCSI command ioctl, (only in version 3 interface) */</div><div class='del'>-#define SG_IO 0x2285   /* similar effect as write() followed by read() */</div><div class='del'>-</div><div class='del'>-#define SG_GET_REQUEST_TABLE 0x2286   /* yields table of active requests */</div><div class='del'>-</div><div class='del'>-/* How to treat EINTR during SG_IO ioctl(), only in SG 3.x series */</div><div class='del'>-#define SG_SET_KEEP_ORPHAN 0x2287 /* 1 -&gt; hold for read(), 0 -&gt; drop (def) */</div><div class='del'>-#define SG_GET_KEEP_ORPHAN 0x2288</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define SG_SCATTER_SZ (8 * 4096)  /* PAGE_SIZE not available to user */</div><div class='del'>-/* Largest size (in bytes) a single scatter-gather list element can have.</div><div class='del'>-   The value must be a power of 2 and &lt;= (PAGE_SIZE * 32) [131072 bytes on</div><div class='del'>-   i386]. The minimum value is PAGE_SIZE. If scatter-gather not supported</div><div class='del'>-   by adapter then this value is the largest data block that can be</div><div class='del'>-   read/written by a single scsi command. The user can find the value of</div><div class='del'>-   PAGE_SIZE by calling getpagesize() defined in unistd.h . */</div><div class='del'>-</div><div class='del'>-#define SG_DEFAULT_RETRIES 1</div><div class='del'>-</div><div class='del'>-/* Defaults, commented if they differ from original sg driver */</div><div class='del'>-#define SG_DEF_FORCE_LOW_DMA 0  /* was 1 -&gt; memory below 16MB on i386 */</div><div class='del'>-#define SG_DEF_FORCE_PACK_ID 0</div><div class='del'>-#define SG_DEF_KEEP_ORPHAN 0</div><div class='del'>-#define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ /* load time option */</div><div class='del'>-</div><div class='del'>-/* maximum outstanding requests, write() yields EDOM if exceeded */</div><div class='del'>-#define SG_MAX_QUEUE 16</div><div class='del'>-</div><div class='del'>-#define SG_BIG_BUFF SG_DEF_RESERVED_SIZE    /* for backward compatibility */</div><div class='del'>-</div><div class='del'>-/* Alternate style type names, "..._t" variants preferred */</div><div class='del'>-typedef struct sg_io_hdr Sg_io_hdr;</div><div class='del'>-typedef struct sg_io_vec Sg_io_vec;</div><div class='del'>-typedef struct sg_scsi_id Sg_scsi_id;</div><div class='del'>-typedef struct sg_req_info Sg_req_info;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */</div><div class='del'>-/*   The older SG interface based on the 'sg_header' structure follows.   */</div><div class='del'>-/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */</div><div class='del'>-</div><div class='del'>-#define SG_MAX_SENSE 16   /* this only applies to the sg_header interface */</div><div class='del'>-</div><div class='del'>-struct sg_header</div><div class='del'>- {</div><div class='del'>-   /* Length of incoming packet (including header).  */</div><div class='del'>-   int pack_len;</div><div class='del'>-   /* Maximal length of expected reply.  */</div><div class='del'>-   int reply_len;</div><div class='del'>-   /* Id number of packet.  */</div><div class='del'>-   int pack_id;</div><div class='del'>-   /* 0==ok, otherwise error number.  */</div><div class='del'>-   int result;</div><div class='del'>-   /* Force 12 byte command length for group 6 &amp; 7 commands.  */</div><div class='del'>-   unsigned int twelve_byte:1;</div><div class='del'>-   /* SCSI status from target.  */</div><div class='del'>-   unsigned int target_status:5;</div><div class='del'>-   /* Host status (see "DID" codes).  */</div><div class='del'>-   unsigned int host_status:8;</div><div class='del'>-   /* Driver status+suggestion.  */</div><div class='del'>-   unsigned int driver_status:8;</div><div class='del'>-   /* Unused.  */</div><div class='del'>-   unsigned int other_flags:10;</div><div class='del'>-   /* Output in 3 cases:</div><div class='del'>-      when target_status is CHECK_CONDITION or</div><div class='del'>-      when target_status is COMMAND_TERMINATED or</div><div class='del'>-      when (driver_status &amp; DRIVER_SENSE) is true.  */</div><div class='del'>-   unsigned char sense_buffer[SG_MAX_SENSE];</div><div class='del'>- };</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* IOCTLs: The following are not required (or ignored) when the sg_io_hdr_t</div><div class='del'>-	   interface is used. They are kept for backward compatibility with</div><div class='del'>-	   the original and version 2 drivers. */</div><div class='del'>-</div><div class='del'>-#define SG_SET_TIMEOUT		0x2201	/* Set timeout; *(int *)arg==timeout.  */</div><div class='del'>-#define SG_GET_TIMEOUT		0x2202	/* Get timeout; return timeout.  */</div><div class='del'>-</div><div class='del'>-/* Get/set command queuing state per fd (default is SG_DEF_COMMAND_Q). */</div><div class='del'>-#define SG_GET_COMMAND_Q	0x2270	/* Yields 0 (queuing off) or 1 (on).  */</div><div class='del'>-#define SG_SET_COMMAND_Q 	0x2271	/* Change queuing state with 0 or 1.  */</div><div class='del'>-</div><div class='del'>-/* Turn on error sense trace (1..8), dump this device to log/console (9)</div><div class='del'>-   or dump all sg device states ( &gt;9 ) to log/console.  */</div><div class='del'>-#define SG_SET_DEBUG		0x227e	/* 0 -&gt; turn off debug */</div><div class='del'>-</div><div class='del'>-#define SG_NEXT_CMD_LEN		0x2283	/* Override SCSI command length with given</div><div class='del'>-					   number on the next write() on this file</div><div class='del'>-					   descriptor.  */</div><div class='del'>-</div><div class='del'>-/* Defaults, commented if they differ from original sg driver */</div><div class='del'>-#define SG_DEFAULT_TIMEOUT (60*HZ) /* HZ == 'jiffies in 1 second' */</div><div class='del'>-#define SG_DEF_COMMAND_Q 0     /* command queuing is always on when</div><div class='del'>-				  the new interface is used */</div><div class='del'>-#define SG_DEF_UNDERRUN_FLAG 0</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif	/* scsi/sg.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/setjmp.h b/mdk-stage1/dietlibc/include/setjmp.h<br/>deleted file mode 100644<br/>index 66fc288f4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/setjmp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/setjmp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,123 +0,0 @@</div><div class='del'>-#ifndef _SETJMP_H</div><div class='del'>-#define _SETJMP_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef __i386__</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef int __jmp_buf[6];</div><div class='del'>-#endif</div><div class='del'>-# define JB_BX	0</div><div class='del'>-# define JB_SI	1</div><div class='del'>-# define JB_DI	2</div><div class='del'>-# define JB_BP	3</div><div class='del'>-# define JB_SP	4</div><div class='del'>-# define JB_PC	5</div><div class='del'>-# define JB_SIZE 24</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-#define JB_S0  0</div><div class='del'>-#define JB_S1  1</div><div class='del'>-#define JB_S2  2</div><div class='del'>-#define JB_S3  3</div><div class='del'>-#define JB_S4  4</div><div class='del'>-#define JB_S5  5</div><div class='del'>-#define JB_PC  6</div><div class='del'>-#define JB_FP  7</div><div class='del'>-#define JB_SP  8</div><div class='del'>-#define JB_F2  9</div><div class='del'>-#define JB_F3  10</div><div class='del'>-#define JB_F4  11</div><div class='del'>-#define JB_F5  12</div><div class='del'>-#define JB_F6  13</div><div class='del'>-#define JB_F7  14</div><div class='del'>-#define JB_F8  15</div><div class='del'>-#define JB_F9  16</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef long int __jmp_buf[17];</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __mips__</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef struct</div><div class='del'>-  {</div><div class='del'>-    void * __pc;	/* Program counter.  */</div><div class='del'>-    void * __sp;	/* Stack pointer.  */</div><div class='del'>-    int __regs[8];	/* Callee-saved registers s0 through s7.  */</div><div class='del'>-    void * __fp;	/* The frame pointer.  */</div><div class='del'>-    void * __gp;	/* The global pointer.  */</div><div class='del'>-    int __fpc_csr;	/* Floating point status register.  */</div><div class='del'>-    double __fpregs[6];	/* Callee-saved floating point registers.  */</div><div class='del'>-  } __jmp_buf[1];</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-#define JB_SP  0</div><div class='del'>-#define JB_FP  1</div><div class='del'>-#define JB_PC  2</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef int __jmp_buf[3];</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __arm__</div><div class='del'>-#define __JMP_BUF_SP            8</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef int __jmp_buf[10];</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __powerpc__</div><div class='del'>-# define JB_GPR1   0  /* Also known as the stack pointer */</div><div class='del'>-# define JB_GPR2   1</div><div class='del'>-# define JB_LR     2  /* The address we will return to */</div><div class='del'>-# define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */</div><div class='del'>-# define JB_CR     21 /* Condition code registers. */</div><div class='del'>-# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */</div><div class='del'>-# define JB_SIZE   (58*4)</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-typedef long int __jmp_buf[58];</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef __ASSEMBLER__</div><div class='del'>-</div><div class='del'>-typedef int sig_atomic_t;</div><div class='del'>-#define __sig_atomic_t sig_atomic_t</div><div class='del'>-</div><div class='del'>-# define _SIGSET_NWORDS	(1024 / (8 * sizeof (unsigned long int)))</div><div class='del'>-typedef struct</div><div class='del'>-  {</div><div class='del'>-    unsigned long int __val[_SIGSET_NWORDS];</div><div class='del'>-  } __sigset_t;</div><div class='del'>-</div><div class='del'>-/* Calling environment, plus possibly a saved signal mask.  */</div><div class='del'>-typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */</div><div class='del'>-  {</div><div class='del'>-    /* NOTE: The machine-dependent definitions of `__sigsetjmp'</div><div class='del'>-       assume that a `jmp_buf' begins with a `__jmp_buf'.</div><div class='del'>-       Do not move this member or add others before it.  */</div><div class='del'>-    __jmp_buf __jmpbuf;		/* Calling environment.  */</div><div class='del'>-    int __mask_was_saved;	/* Saved the signal mask?  */</div><div class='del'>-    __sigset_t __saved_mask;	/* Saved signal mask.  */</div><div class='del'>-  } jmp_buf[1];</div><div class='del'>-</div><div class='del'>-extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW;</div><div class='del'>-</div><div class='del'>-extern void longjmp (jmp_buf __env, int __val)</div><div class='del'>-     __THROW __attribute__ ((__noreturn__));</div><div class='del'>-</div><div class='del'>-typedef jmp_buf sigjmp_buf;</div><div class='del'>-</div><div class='del'>-extern void siglongjmp (sigjmp_buf __env, int __val)</div><div class='del'>-     __THROW __attribute__ ((__noreturn__));</div><div class='del'>-</div><div class='del'>-#define setjmp(env) __sigsetjmp(env,0)</div><div class='del'>-#define sigsetjmp(a,b) __sigsetjmp(a,b)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/shadow.h b/mdk-stage1/dietlibc/include/shadow.h<br/>deleted file mode 100644<br/>index 4d6341af1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/shadow.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/shadow.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#ifndef _SHADOW_H</div><div class='del'>-#define _SHADOW_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-struct spwd {</div><div class='del'>-	char *sp_namp;		/* user login name */</div><div class='del'>-	char *sp_pwdp;		/* encrypted password */</div><div class='del'>-	long  sp_lstchg;	/* last password change */</div><div class='del'>-	int   sp_min;		/* days until change allowed. */</div><div class='del'>-	int   sp_max;		/* days before change required */</div><div class='del'>-	int   sp_warn;		/* days warning for expiration */</div><div class='del'>-	int   sp_inact;		/* days before  account  inactive */</div><div class='del'>-	int   sp_expire;	/* date when account expires */</div><div class='del'>-	int   sp_flag;		/* reserved for future use */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct spwd *getspent(void) __THROW;</div><div class='del'>-extern void setspent(void) __THROW;</div><div class='del'>-extern void endspent(void) __THROW;</div><div class='del'>-extern struct spwd *getspnam (__const char *__name) __THROW;</div><div class='del'>-</div><div class='del'>-#endif /* _SHADOW_H */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/signal.h b/mdk-stage1/dietlibc/include/signal.h<br/>deleted file mode 100644<br/>index 9ed93fe83..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/signal.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/signal.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#ifndef _SIGNAL_H</div><div class='del'>-#define _SIGNAL_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#define __WANT_POSIX1B_SIGNALS__</div><div class='del'>-</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/signal.h&gt;</div><div class='del'>-</div><div class='del'>-typedef void (*sighandler_t)(int);</div><div class='del'>-</div><div class='del'>-int sigemptyset(sigset_t *set) __THROW;</div><div class='del'>-int sigfillset(sigset_t *set) __THROW;</div><div class='del'>-int sigaddset(sigset_t *set, int signum) __THROW;</div><div class='del'>-int sigdelset(sigset_t *set, int signum) __THROW;</div><div class='del'>-int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) __THROW;</div><div class='del'>-sighandler_t signal(int signum, sighandler_t action);</div><div class='del'>-int raise (int sig) __THROW;</div><div class='del'>-int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) __THROW;</div><div class='del'>-int sigaltstack(const struct sigaltstack *newstack, struct sigaltstack *oldstack) __THROW;</div><div class='del'>-</div><div class='del'>-#ifndef SIGCLD</div><div class='del'>-#define SIGCLD SIGCHLD</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern const char *const sys_siglist[];</div><div class='del'>-</div><div class='del'>-typedef __sighandler_t sig_t;</div><div class='del'>-</div><div class='del'>-#ifndef NSIG</div><div class='del'>-#define NSIG _NSIG</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/stdint.h b/mdk-stage1/dietlibc/include/stdint.h<br/>deleted file mode 100644<br/>index d287e6794..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/stdint.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/stdint.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _STDINT_H</div><div class='del'>-#define _STDINT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/stdio.h b/mdk-stage1/dietlibc/include/stdio.h<br/>deleted file mode 100644<br/>index 92d9dc0cb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/stdio.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/stdio.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-#ifndef _STDIO_H</div><div class='del'>-#define _STDIO_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-typedef struct __stdio_file FILE;</div><div class='del'>-</div><div class='del'>-FILE *fopen (const char *path, const char *mode) __THROW;</div><div class='del'>-FILE *fdopen (int fildes, const char *mode) __THROW;</div><div class='del'>-FILE *freopen (const char *path, const char *mode, FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-int printf(const char *format, ...) __THROW;</div><div class='del'>-int fprintf(FILE *stream, const char *format, ...) __THROW;</div><div class='del'>-int sprintf(char *str, const char *format, ...) __THROW;</div><div class='del'>-int snprintf(char *str, size_t size, const char *format, ...) __THROW;</div><div class='del'>-int asprintf(char **ptr, const char* format, ...) __THROW;</div><div class='del'>-</div><div class='del'>-int scanf( const char *format, ...) __THROW;</div><div class='del'>-int fscanf( FILE *stream, const char *format, ...) __THROW;</div><div class='del'>-int sscanf( const char *str, const char *format, ...) __THROW;</div><div class='del'>-</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-int vprintf(const char *format, va_list ap) __THROW;</div><div class='del'>-int vfprintf(FILE *stream, const char *format, va_list ap) __THROW;</div><div class='del'>-int vsprintf(char *str, const char *format, va_list ap) __THROW;</div><div class='del'>-int vsnprintf(char *str, size_t size, const char *format, va_list ap) __THROW;</div><div class='del'>-</div><div class='del'>-int vscanf( const char *format, va_list ap) __THROW;</div><div class='del'>-int vsscanf( const char *str, const char *format, va_list ap) __THROW;</div><div class='del'>-int vfscanf( FILE *stream, const char *format, va_list ap) __THROW;</div><div class='del'>-</div><div class='del'>-int fgetc(FILE *stream) __THROW;</div><div class='del'>-char *fgets(char *s, int size, FILE *stream) __THROW;</div><div class='del'>-int getc(FILE *stream) __THROW;</div><div class='del'>-int getchar(void) __THROW;</div><div class='del'>-char *gets(char *s) __THROW;</div><div class='del'>-int ungetc(int c, FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-int fputc(int c, FILE *stream) __THROW;</div><div class='del'>-int fputs(const char *s, FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-#define putc(c,stream) fputc(c,stream)</div><div class='del'>-#define putchar(c) fputc(c,stdout)</div><div class='del'>-</div><div class='del'>-#define getchar() fgetc(stdin)</div><div class='del'>-#define getc(stream) fgetc(stream)</div><div class='del'>-</div><div class='del'>-int puts(const char *s) __THROW;</div><div class='del'>-</div><div class='del'>-long fseek( FILE *stream, long offset, int whence) __THROW;</div><div class='del'>-long ftell( FILE *stream) __THROW;</div><div class='del'>-void rewind( FILE *stream) __THROW;</div><div class='del'>-int fgetpos( FILE *stream, fpos_t *pos) __THROW;</div><div class='del'>-int fsetpos( FILE *stream, fpos_t *pos) __THROW;</div><div class='del'>-</div><div class='del'>-size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-int fflush(FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-int fclose(FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-void clearerr(FILE *stream) __THROW;</div><div class='del'>-int feof (FILE *stream) __THROW;</div><div class='del'>-int ferror( FILE *stream) __THROW;</div><div class='del'>-int fileno( FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-int remove(const char *pathname) __THROW;</div><div class='del'>-</div><div class='del'>-void perror(const char *s) __THROW;</div><div class='del'>-</div><div class='del'>-extern FILE *stdin, *stdout, *stderr;</div><div class='del'>-</div><div class='del'>-#define EOF (int)(-1)</div><div class='del'>-</div><div class='del'>-#define BUFSIZ 128</div><div class='del'>-</div><div class='del'>-#define _IONBF 0</div><div class='del'>-#define _IOLBF 1</div><div class='del'>-#define _IOFBF 2</div><div class='del'>-</div><div class='del'>-int setvbuf(FILE *stream, char *buf, int mode , size_t size) __THROW;</div><div class='del'>-</div><div class='del'>-#define setbuf(stream,buf) setvbuf(stream,buf,buf?_IOFBF:_IONBF,BUFSIZ)</div><div class='del'>-#define setbuffer(stream,buf,size) setvbuf(stream,buf,buf?_IOFBF:_IONBF,size)</div><div class='del'>-#define setlinebuf(stream) setvbuf(stream,0,_IOLBF,BUFSIZ)</div><div class='del'>-</div><div class='del'>-FILE *popen(const char *command, const char *type) __THROW;</div><div class='del'>-int pclose(FILE *stream) __THROW;</div><div class='del'>-</div><div class='del'>-#define getc_unlocked(stream) getc(stream)</div><div class='del'>-#define putc_unlocked(c,stream) putc(c,stream)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h<br/>deleted file mode 100644<br/>index 6a13a48ff..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/stdlib.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/stdlib.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,67 +0,0 @@</div><div class='del'>-#ifndef _STDLIB_H</div><div class='del'>-#define _STDLIB_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#define __LIBC_DIETLIBC__</div><div class='del'>-</div><div class='del'>-void *calloc(size_t nmemb, size_t size) __THROW;</div><div class='del'>-void *malloc(size_t size) __THROW;</div><div class='del'>-void free(void *ptr) __THROW;</div><div class='del'>-void *realloc(void *ptr, size_t size) __THROW;</div><div class='del'>-</div><div class='del'>-char *getenv(const char *name) __THROW __pure__;</div><div class='del'>-int putenv(const char *string) __THROW;</div><div class='del'>-int setenv(const char *name, const char *value, int overwrite) __THROW;</div><div class='del'>-void unsetenv(const char *name) __THROW;</div><div class='del'>-</div><div class='del'>-int atexit(void (*function)(void)) __THROW;</div><div class='del'>-</div><div class='del'>-double strtod(const char *nptr, char **endptr) __THROW;</div><div class='del'>-long int strtol(const char *nptr, char **endptr, int base) __THROW;</div><div class='del'>-unsigned long int strtoul(const char *nptr, char **endptr, int base) __THROW;</div><div class='del'>-</div><div class='del'>-int __ltostr(char *s, int size, unsigned long i, int base, char UpCase) __THROW;</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-long long int strtoll(const char *nptr, char **endptr, int base) __THROW;</div><div class='del'>-unsigned long long int strtoull(const char *nptr, char **endptr, int base) __THROW;</div><div class='del'>-int __lltostr(char *s, int size, unsigned long long i, int base, char UpCase) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int atoi(const char *nptr) __THROW;</div><div class='del'>-long int atol(const char *nptr) __THROW;</div><div class='del'>-double atof(const char *nptr) __THROW;</div><div class='del'>-</div><div class='del'>-void exit(int status) __THROW __attribute__((noreturn));</div><div class='del'>-void abort(void) __THROW;</div><div class='del'>-</div><div class='del'>-/* warning: the rand() implementation of the diet libc really sucks. */</div><div class='del'>-#define RAND_MAX 32767</div><div class='del'>-</div><div class='del'>-extern int rand(void) __THROW;</div><div class='del'>-extern void srand(unsigned int seed) __THROW;</div><div class='del'>-</div><div class='del'>-void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW;</div><div class='del'>-void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) __THROW;</div><div class='del'>-</div><div class='del'>-extern char **environ;</div><div class='del'>-</div><div class='del'>-#define EXIT_SUCCESS 0</div><div class='del'>-#define EXIT_FAILURE 1</div><div class='del'>-</div><div class='del'>-/* now this function is the greatest bullshit I have ever seen.</div><div class='del'>- * The ISO people must be out of their minds. */</div><div class='del'>-typedef struct { int quot,rem; } div_t;</div><div class='del'>-div_t div(int numer, int denom) __THROW __attribute__((const));</div><div class='del'>-</div><div class='del'>-void *alloca(size_t size) __THROW; /* gcc built-in */</div><div class='del'>-</div><div class='del'>-char *realpath(const char *path, char *resolved_path) __THROW;</div><div class='del'>-</div><div class='del'>-int abs(int j) __THROW;</div><div class='del'>-</div><div class='del'>-long int random(void) __THROW;</div><div class='del'>-void srandom(unsigned int seed) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/string.h b/mdk-stage1/dietlibc/include/string.h<br/>deleted file mode 100644<br/>index 1ef78ae54..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/string.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/string.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,57 +0,0 @@</div><div class='del'>-#ifndef _STRING_H</div><div class='del'>-#define _STRING_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-char *strcpy(char *dest, const char *src) __THROW;</div><div class='del'>-char *strncpy(char *dest, const char *src, size_t n) __THROW;</div><div class='del'>-</div><div class='del'>-void *memccpy(void *dest, const void *src, int c, size_t n) __THROW;</div><div class='del'>-void *memcpy(void *dest, const void *src, size_t n) __THROW;</div><div class='del'>-void *memmove(void *dest, const void *src, size_t n) __THROW;</div><div class='del'>-</div><div class='del'>-int memccmp(const void *s1, const void *s2, int c, size_t n) __THROW __pure__;</div><div class='del'>-int memcmp(const void *s1, const void *s2, size_t n) __THROW __pure__;</div><div class='del'>-int strcmp(const char *s1, const char *s2) __THROW __pure__;</div><div class='del'>-int strncmp(const char *s1, const char *s2, size_t n) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-int strcasecmp(const char *s1, const char *s2) __THROW __pure__;</div><div class='del'>-int strncasecmp(const char *s1, const char *s2, size_t n) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-size_t strlen(const char *s) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-char *strstr(const char *haystack, const char *needle) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-char *strdup(const char *s) __THROW;</div><div class='del'>-</div><div class='del'>-char *strchr(const char *s, int c) __THROW __pure__;</div><div class='del'>-char *strrchr(const char *s, int c) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-char *strcat(char *dest, const char *src) __THROW;</div><div class='del'>-char *strncat(char *dest, const char *src, size_t n) __THROW;</div><div class='del'>-</div><div class='del'>-size_t strspn(const char *s, const char *accept) __THROW;</div><div class='del'>-size_t strcspn(const char *s, const char *reject) __THROW;</div><div class='del'>-</div><div class='del'>-char *strpbrk(const char *s, const char *accept) __THROW;</div><div class='del'>-char *strsep(char **stringp, const char *delim) __THROW;</div><div class='del'>-</div><div class='del'>-void* memset(void *s, int c, size_t n) __THROW;</div><div class='del'>-</div><div class='del'>-#undef NULL</div><div class='del'>-#define NULL (void*)0</div><div class='del'>-</div><div class='del'>-#define bzero(s,n) memset(s,0,n)</div><div class='del'>-#define bcopy(src,dest,n) memmove(dest,src,n)</div><div class='del'>-#define bcmp(a,b,n) memcmp(a,b,n)</div><div class='del'>-</div><div class='del'>-char *strerror(int errnum) __THROW;</div><div class='del'>-char *strsignal(int signum) __THROW;</div><div class='del'>-</div><div class='del'>-char *strtok(char *s, const char *delim) __THROW;</div><div class='del'>-char *strtok_r(char *s, const char *delim, char **ptrptr) __THROW;</div><div class='del'>-</div><div class='del'>-int ffs(int i) __THROW __attribute__((__const__));</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/strings.h b/mdk-stage1/dietlibc/include/strings.h<br/>deleted file mode 100644<br/>index ec947a9b9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/strings.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/strings.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2 +0,0 @@</div><div class='del'>-#warning "your code included obsolescent &lt;strings.h&gt;.  Please change that to &lt;string.h&gt;!"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/cdefs.h b/mdk-stage1/dietlibc/include/sys/cdefs.h<br/>deleted file mode 100644<br/>index 895bb74b8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/cdefs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/cdefs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-#ifndef _SYS_CDEFS_H</div><div class='del'>-#define _SYS_CDEFS_H</div><div class='del'>-</div><div class='del'>-#define __dietlibc__</div><div class='del'>-</div><div class='del'>-#ifndef __cplusplus</div><div class='del'>-#define throw ()</div><div class='del'>-#define __THROW</div><div class='del'>-#define __BEGIN_DECLS</div><div class='del'>-#define __END_DECLS</div><div class='del'>-#else</div><div class='del'>-#define __THROW throw ()</div><div class='del'>-#define __BEGIN_DECLS extern "C" {</div><div class='del'>-#define __END_DECLS }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef __GNUC__</div><div class='del'>-#define __attribute__(xyz)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define __pure__</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-#if (__GNUC__ &gt; 2) || ((__GNUC__ == 2) &amp;&amp; (__GNUC_MINOR__ &gt;= 96))</div><div class='del'>-#undef __pure__</div><div class='del'>-#define __pure__ __attribute__ ((__pure__))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if (__GNUC__ == 2) &amp;&amp; (__GNUC_MINOR__ &lt; 95)</div><div class='del'>-#define __restrict__</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define __P(x) x</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/file.h b/mdk-stage1/dietlibc/include/sys/file.h<br/>deleted file mode 100644<br/>index 93787fd42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/file.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/file.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#ifndef _SYS_FILE_H</div><div class='del'>-#define _SYS_FILE_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-extern int fcntl(int fd, int cmd, ...) __THROW;</div><div class='del'>-extern int flock(int fd, int operation) __THROW;</div><div class='del'>-</div><div class='del'>-/* Operations for the `flock' call.  */</div><div class='del'>-#define	LOCK_SH	1	/* Shared lock.  */</div><div class='del'>-#define	LOCK_EX	2 	/* Exclusive lock.  */</div><div class='del'>-#define	LOCK_UN	8	/* Unlock.  */</div><div class='del'>-</div><div class='del'>-/* Can be OR'd in to one of the above.  */</div><div class='del'>-#define	LOCK_NB	4	/* Don't block when locking.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif	/* _SYS_FILE_H */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/io.h b/mdk-stage1/dietlibc/include/sys/io.h<br/>deleted file mode 100644<br/>index cce841735..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/io.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/io.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,41 +0,0 @@</div><div class='del'>-#ifndef _IO_H</div><div class='del'>-#define _IO_H</div><div class='del'>-</div><div class='del'>-int ioperm(unsigned long from, unsigned long num, int turn_on) __THROW;</div><div class='del'>-</div><div class='del'>-#ifdef __i386__</div><div class='del'>-</div><div class='del'>-static __inline void</div><div class='del'>-outb (unsigned char value, unsigned short int port)</div><div class='del'>-{</div><div class='del'>-  __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static __inline unsigned char</div><div class='del'>-inb (unsigned short int port)</div><div class='del'>-{</div><div class='del'>-  unsigned char _v;</div><div class='del'>-</div><div class='del'>-  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));</div><div class='del'>-  return _v;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static __inline unsigned short int</div><div class='del'>-inw (unsigned short int port)</div><div class='del'>-{</div><div class='del'>-  unsigned short _v;</div><div class='del'>-</div><div class='del'>-  __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port));</div><div class='del'>-  return _v;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static __inline void</div><div class='del'>-outw (unsigned short int value, unsigned short int port)</div><div class='del'>-{</div><div class='del'>-  __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port));</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/ioctl.h b/mdk-stage1/dietlibc/include/sys/ioctl.h<br/>deleted file mode 100644<br/>index fca1aeeab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/ioctl.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/ioctl.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#ifndef _IOCTL_H</div><div class='del'>-#define _IOCTL_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;linux/ioctl.h&gt;</div><div class='del'>-#include &lt;asm/ioctls.h&gt;</div><div class='del'>-</div><div class='del'>-int ioctl(int d, int request, ...) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/ipc.h b/mdk-stage1/dietlibc/include/sys/ipc.h<br/>deleted file mode 100644<br/>index 9184a2a82..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/ipc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/ipc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#ifndef _SYS_IPC_H</div><div class='del'>-#define _SYS_IPC_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;linux/ipc.h&gt;</div><div class='del'>-#include &lt;asm/page.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/kd.h b/mdk-stage1/dietlibc/include/sys/kd.h<br/>deleted file mode 100644<br/>index 9e9a5152b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/kd.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/kd.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _SYS_KD_H</div><div class='del'>-#define _SYS_KD_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/kd.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/mman.h b/mdk-stage1/dietlibc/include/sys/mman.h<br/>deleted file mode 100644<br/>index dc398ba90..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/mman.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/mman.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,33 +0,0 @@</div><div class='del'>-#ifndef _SYS_MMAN_H</div><div class='del'>-#define _SYS_MMAN_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;linux/mman.h&gt;</div><div class='del'>-#include &lt;asm/page.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef PAGE_SIZE</div><div class='del'>-#warning PAGE_SIZE undefined</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define MAP_FAILED      ((void *) -1)</div><div class='del'>-</div><div class='del'>-extern void *mmap (void *__addr, size_t __len, int __prot,</div><div class='del'>-                   int __flags, int __fd, off_t __offset);</div><div class='del'>-</div><div class='del'>-extern int munmap (void *__addr, size_t __len) __THROW;</div><div class='del'>-extern int mprotect (void *__addr, size_t __len, int __prot) __THROW;</div><div class='del'>-extern int msync (void *__addr, size_t __len, int __flags) __THROW;</div><div class='del'>-extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,</div><div class='del'>-		     int __may_move) __THROW;</div><div class='del'>-extern int mincore (void *__start, size_t __len, unsigned char *__vec);</div><div class='del'>-</div><div class='del'>-#ifdef __quad_t</div><div class='del'>-extern void *mmap64 (void *__addr, size_t __len, int __prot,</div><div class='del'>-		     int __flags, int __fd, off64_t __offset) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int mlockall(int flags) __THROW;</div><div class='del'>-int munlockall(void) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/mount.h b/mdk-stage1/dietlibc/include/sys/mount.h<br/>deleted file mode 100644<br/>index 2e9e86774..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/mount.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/mount.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#ifndef _SYS_MOUNT_H</div><div class='del'>-#define _SYS_MOUNT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;linux/fs.h&gt;</div><div class='del'>-</div><div class='del'>-int  mount(const char* specialfile, const char* dir, const char* filesystemtype,</div><div class='del'>-	   unsigned long rwflag, const void * data) __THROW;</div><div class='del'>-</div><div class='del'>-int umount(const char *specialfile) __THROW;</div><div class='del'>-</div><div class='del'>-int umount(const char *dir) __THROW;</div><div class='del'>-</div><div class='del'>-int umount2(const char *specialfile, int mflag) __THROW;</div><div class='del'>-</div><div class='del'>-int umount2(const char *dir, int mflag) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/msg.h b/mdk-stage1/dietlibc/include/sys/msg.h<br/>deleted file mode 100644<br/>index ea1e470b6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/msg.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/msg.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#ifndef _SYS_MSG_H</div><div class='del'>-#define _SYS_MSG_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/msg.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;asm/page.h&gt;</div><div class='del'>-</div><div class='del'>-extern int msgctl (int msqid, int cmd, struct msqid_ds *buf) __THROW;</div><div class='del'>-extern int msgget (key_t key, int msgflg) __THROW;</div><div class='del'>-extern int msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg) __THROW;</div><div class='del'>-extern int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/mtio.h b/mdk-stage1/dietlibc/include/sys/mtio.h<br/>deleted file mode 100644<br/>index e70663407..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/mtio.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/mtio.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _SYS_MTIO_H</div><div class='del'>-#define _SYS_MTIO_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/mtio.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/param.h b/mdk-stage1/dietlibc/include/sys/param.h<br/>deleted file mode 100644<br/>index 05f4d40e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/param.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/param.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#ifndef _SYS_PARAM_H</div><div class='del'>-#define _SYS_PARAM_H</div><div class='del'>-</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-</div><div class='del'>-#define MAXPATHLEN     PATH_MAX</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/poll.h b/mdk-stage1/dietlibc/include/sys/poll.h<br/>deleted file mode 100644<br/>index adce26687..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/poll.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/poll.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#ifndef _SYS_POLL_H</div><div class='del'>-#define _SYS_POLL_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/poll.h&gt;</div><div class='del'>-</div><div class='del'>-extern int poll(struct pollfd *ufds, unsigned int nfds, int timeout) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif	/* _SYS_POLL_H */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/ptrace.h b/mdk-stage1/dietlibc/include/sys/ptrace.h<br/>deleted file mode 100644<br/>index 9dd730bc6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/ptrace.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/ptrace.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#ifndef _SYS_PTRACE_H</div><div class='del'>-#define _SYS_PTRACE_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/ptrace.h&gt;</div><div class='del'>-</div><div class='del'>-extern long int ptrace (int request, ...) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/reboot.h b/mdk-stage1/dietlibc/include/sys/reboot.h<br/>deleted file mode 100644<br/>index ba58d296a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/reboot.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/reboot.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef _SYS_REBOOT_H</div><div class='del'>-#define _SYS_REBOOT_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/reboot.h&gt;</div><div class='del'>-</div><div class='del'>-/* Reboot or halt the system.  */</div><div class='del'>-int reboot (int flag, void *arg);</div><div class='del'>-</div><div class='del'>-#endif	/* _SYS_REBOOT_H */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/resource.h b/mdk-stage1/dietlibc/include/sys/resource.h<br/>deleted file mode 100644<br/>index 442434cd1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/resource.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/resource.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#ifndef _SYS_RESOURCE_H</div><div class='del'>-#define _SYS_RESOURCE_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;linux/resource.h&gt;</div><div class='del'>-</div><div class='del'>-int getpriority(int which, int who) __THROW;</div><div class='del'>-int setpriority(int which, int who, int prio) __THROW;</div><div class='del'>-</div><div class='del'>-int getrlimit (int resource, struct rlimit *rlim);</div><div class='del'>-int getrusage (int who, struct rusage *usage);</div><div class='del'>-int setrlimit (int resource, const struct rlimit *rlim);</div><div class='del'>-</div><div class='del'>-typedef unsigned long rlim_t;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/select.h b/mdk-stage1/dietlibc/include/sys/select.h<br/>deleted file mode 100644<br/>index e69de29bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/select.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/select.h</a><br/>+++ /dev/null</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/sem.h b/mdk-stage1/dietlibc/include/sys/sem.h<br/>deleted file mode 100644<br/>index cc182649c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/sem.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/sem.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#ifndef _SYS_SEM_H</div><div class='del'>-#define _SYS_SEM_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/sem.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int semget( key_t key, int nsems, int semflg) __THROW;</div><div class='del'>-extern int semctl(int semid, int semnum, int cmd, union semun arg) __THROW;</div><div class='del'>-extern int semop(int semid, struct sembuf *sops, unsigned nsops) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/sendfile.h b/mdk-stage1/dietlibc/include/sys/sendfile.h<br/>deleted file mode 100644<br/>index 2e0c04add..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/sendfile.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/sendfile.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef _SYS_SENDFILE_H</div><div class='del'>-#define _SYS_SENDFILE_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *offset,</div><div class='del'>-			 size_t __count) __THROW;</div><div class='del'>-</div><div class='del'>-#endif	/* sys/sendfile.h */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/shm.h b/mdk-stage1/dietlibc/include/sys/shm.h<br/>deleted file mode 100644<br/>index c27f5ddcf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/shm.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/shm.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#ifndef _SYS_SHM_H</div><div class='del'>-#define _SYS_SHM_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/shm.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;asm/page.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef PAGE_SIZE</div><div class='del'>-#define PAGE_SIZE getpagesize()</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern int shmget(key_t key, int size, int shmflg) __THROW;</div><div class='del'>-extern void *shmat(int shmid, const void *shmaddr, int shmflg) __THROW;</div><div class='del'>-extern int shmdt (const void *shmaddr) __THROW;</div><div class='del'>-extern int shmctl(int shmid, int cmd, struct shmid_ds *buf) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/signal.h b/mdk-stage1/dietlibc/include/sys/signal.h<br/>deleted file mode 100644<br/>index 2e602dad8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/signal.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/signal.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/socket.h b/mdk-stage1/dietlibc/include/sys/socket.h<br/>deleted file mode 100644<br/>index a1435501c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/socket.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/socket.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#ifndef _SYS_SOCKET_H</div><div class='del'>-#define _SYS_SOCKET_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;linux/socket.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef SOCK_DGRAM</div><div class='del'>-/* the Linux kernel headers suck really badly on non-x86 */</div><div class='del'>-#define SOCK_STREAM	1		/* stream (connection) socket	*/</div><div class='del'>-#define SOCK_DGRAM	2		/* datagram (conn.less) socket	*/</div><div class='del'>-#define SOCK_RAW	3		/* raw socket			*/</div><div class='del'>-#define SOCK_RDM	4		/* reliably-delivered message	*/</div><div class='del'>-#define SOCK_SEQPACKET	5		/* sequential packet socket	*/</div><div class='del'>-#define SOCK_PACKET	10		/* linux specific way of	*/</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct sockaddr_storage {</div><div class='del'>-  char __tmp[sizeof(struct sockaddr)];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int socket(int domain, int type, int protocol) __THROW;</div><div class='del'>-int accept(int s, struct sockaddr *addr, socklen_t *addrlen) __THROW;</div><div class='del'>-int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) __THROW;</div><div class='del'>-int bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen) __THROW;</div><div class='del'>-int recv(int s, void *buf, size_t len, int flags) __THROW;</div><div class='del'>-int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) __THROW;</div><div class='del'>-int recvmsg(int s, struct msghdr *msg, int flags) __THROW;</div><div class='del'>-int send(int s, const void *msg, size_t len, int flags) __THROW;</div><div class='del'>-int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) __THROW;</div><div class='del'>-int sendmsg(int s, const struct msghdr *msg, int flags) __THROW;</div><div class='del'>-</div><div class='del'>-int getpeername(int s, struct sockaddr *name, socklen_t *namelen) __THROW;</div><div class='del'>-int getsockname(int  s , struct sockaddr * name , socklen_t * namelen) __THROW;</div><div class='del'>-</div><div class='del'>-int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) __THROW;</div><div class='del'>-int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) __THROW;</div><div class='del'>-</div><div class='del'>-int listen(int s, int backlog) __THROW;</div><div class='del'>-</div><div class='del'>-#define SHUT_RD 0</div><div class='del'>-#define SHUT_WR 1</div><div class='del'>-#define SHUT_RDWR 2</div><div class='del'>-int shutdown(int s, int how) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/stat.h b/mdk-stage1/dietlibc/include/sys/stat.h<br/>deleted file mode 100644<br/>index 10fddfa42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/stat.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/stat.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,52 +0,0 @@</div><div class='del'>-#ifndef _SYS_STAT_H</div><div class='del'>-#define _SYS_STAT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/stat.h&gt;</div><div class='del'>-#include &lt;asm/stat.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef STAT64_HAS_BROKEN_ST_INO</div><div class='del'>-#define __NO_STAT64</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern int stat(const char *__file, struct stat *__buf) __THROW;</div><div class='del'>-extern int fstat(int __fd, struct stat *__buf) __THROW;</div><div class='del'>-extern int lstat(const char *__file, struct stat *__buf) __THROW;</div><div class='del'>-</div><div class='del'>-#ifdef __NO_STAT64</div><div class='del'>-#undef _FILE_OFFSET_BITS</div><div class='del'>-#else</div><div class='del'>-extern int stat64(const char *__file, struct stat64 *__buf) __THROW;</div><div class='del'>-extern int fstat64(int __fd, struct stat64 *__buf) __THROW;</div><div class='del'>-extern int lstat64(const char *__file, struct stat64 *__buf) __THROW;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if _FILE_OFFSET_BITS == 64</div><div class='del'>-#define lstat(file,buf) lstat64(file,buf)</div><div class='del'>-#define fstat(file,buf) fstat64(file,buf)</div><div class='del'>-#define stat stat64</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define major(dev) (((dev)&gt;&gt;8) &amp; 0xff)</div><div class='del'>-#define minor(dev) ((dev) &amp; 0xff)</div><div class='del'>-#define makedev(major, minor) ((((unsigned int) (major)) &lt;&lt; 8) | ((unsigned int) (minor)))</div><div class='del'>-</div><div class='del'>-extern int chmod (const char *__file, mode_t __mode) __THROW;</div><div class='del'>-</div><div class='del'>-extern int fchmod (int __fd, mode_t __mode) __THROW;</div><div class='del'>-</div><div class='del'>-extern mode_t umask (mode_t __mask) __THROW;</div><div class='del'>-</div><div class='del'>-extern int mkdir (const char *__path, mode_t __mode) __THROW;</div><div class='del'>-</div><div class='del'>-extern int mknod (const char *__path, mode_t __mode, dev_t __dev) __THROW;</div><div class='del'>-</div><div class='del'>-extern int mkfifo (const char *__path, mode_t __mode) __THROW;</div><div class='del'>-</div><div class='del'>-#define S_IREAD S_IRUSR</div><div class='del'>-#define S_IWRITE S_IWUSR</div><div class='del'>-#define S_IEXEC S_IXUSR</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/syscall.h b/mdk-stage1/dietlibc/include/sys/syscall.h<br/>deleted file mode 100644<br/>index 5d6b5a4ad..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/syscall.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/syscall.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#ifndef _SYSCALL_H</div><div class='del'>-#define _SYSCALL_H</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/sysinfo.h b/mdk-stage1/dietlibc/include/sys/sysinfo.h<br/>deleted file mode 100644<br/>index 5f059d469..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/sysinfo.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/sysinfo.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef _SYS_SYSINFO_H</div><div class='del'>-#define _SYS_SYSINFO_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;linux/kernel.h&gt;</div><div class='del'>-</div><div class='del'>-int sysinfo(struct sysinfo *info) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/syslog.h b/mdk-stage1/dietlibc/include/sys/syslog.h<br/>deleted file mode 100644<br/>index 91bf0d1fa..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/syslog.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/syslog.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,102 +0,0 @@</div><div class='del'>-#ifndef _SYS_SYSLOG_H</div><div class='del'>-#define _SYS_SYSLOG_H 1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#define _PATH_LOG	"/dev/log"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * priorities/facilities are encoded into a single 32-bit quantity, where the</div><div class='del'>- * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility</div><div class='del'>- * (0-big number).  Both the priorities and the facilities map roughly</div><div class='del'>- * one-to-one to strings in the syslogd(8) source code.  This mapping is</div><div class='del'>- * included in this file.</div><div class='del'>- *</div><div class='del'>- * priorities (these are ordered)</div><div class='del'>- */</div><div class='del'>-#define LOG_EMERG	0	/* system is unusable */</div><div class='del'>-#define LOG_ALERT	1	/* action must be taken immediately */</div><div class='del'>-#define LOG_CRIT	2	/* critical conditions */</div><div class='del'>-#define LOG_ERR		3	/* error conditions */</div><div class='del'>-#define LOG_WARNING	4	/* warning conditions */</div><div class='del'>-#define LOG_NOTICE	5	/* normal but significant condition */</div><div class='del'>-#define LOG_INFO	6	/* informational */</div><div class='del'>-#define LOG_DEBUG	7	/* debug-level messages */</div><div class='del'>-</div><div class='del'>-#define LOG_PRIMASK	0x07	/* mask to extract priority part (internal) */</div><div class='del'>-				/* extract priority */</div><div class='del'>-#define LOG_PRI(p)	((p) &amp; LOG_PRIMASK)</div><div class='del'>-#define LOG_MAKEPRI(fac, pri)	(((fac) &lt;&lt; 3) | (pri))</div><div class='del'>-</div><div class='del'>-/* facility codes */</div><div class='del'>-#define LOG_KERN	(0&lt;&lt;3)	/* kernel messages */</div><div class='del'>-#define LOG_USER	(1&lt;&lt;3)	/* random user-level messages */</div><div class='del'>-#define LOG_MAIL	(2&lt;&lt;3)	/* mail system */</div><div class='del'>-#define LOG_DAEMON	(3&lt;&lt;3)	/* system daemons */</div><div class='del'>-#define LOG_AUTH	(4&lt;&lt;3)	/* security/authorization messages */</div><div class='del'>-#define LOG_SYSLOG	(5&lt;&lt;3)	/* messages generated internally by syslogd */</div><div class='del'>-#define LOG_LPR		(6&lt;&lt;3)	/* line printer subsystem */</div><div class='del'>-#define LOG_NEWS	(7&lt;&lt;3)	/* network news subsystem */</div><div class='del'>-#define LOG_UUCP	(8&lt;&lt;3)	/* UUCP subsystem */</div><div class='del'>-#define LOG_CRON	(9&lt;&lt;3)	/* clock daemon */</div><div class='del'>-#define LOG_AUTHPRIV	(10&lt;&lt;3)	/* security/authorization messages (private) */</div><div class='del'>-#define LOG_FTP		(11&lt;&lt;3)	/* ftp daemon */</div><div class='del'>-</div><div class='del'>-	/* other codes through 15 reserved for system use */</div><div class='del'>-#define LOG_LOCAL0	(16&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL1	(17&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL2	(18&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL3	(19&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL4	(20&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL5	(21&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL6	(22&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-#define LOG_LOCAL7	(23&lt;&lt;3)	/* reserved for local use */</div><div class='del'>-</div><div class='del'>-#define LOG_NFACILITIES	24	/* current number of facilities */</div><div class='del'>-#define LOG_FACMASK	0x03f8	/* mask to extract facility part */</div><div class='del'>-				/* facility of pri */</div><div class='del'>-#define LOG_FAC(p)	(((p) &amp; LOG_FACMASK) &gt;&gt; 3)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * arguments to setlogmask.</div><div class='del'>- */</div><div class='del'>-#define LOG_MASK(pri)	(1 &lt;&lt; (pri))		/* mask for one priority */</div><div class='del'>-#define LOG_UPTO(pri)	((1 &lt;&lt; ((pri)+1)) - 1)	/* all priorities through pri */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option flags for openlog.</div><div class='del'>- *</div><div class='del'>- * LOG_ODELAY no longer does anything.</div><div class='del'>- * LOG_NDELAY is the inverse of what it used to be.</div><div class='del'>- */</div><div class='del'>-#define LOG_PID		0x01	/* log the pid with each message */</div><div class='del'>-#define LOG_CONS	0x02	/* log on the console if errors in sending */</div><div class='del'>-#define LOG_ODELAY	0x04	/* delay open until first syslog() (default) */</div><div class='del'>-#define LOG_NDELAY	0x08	/* don't delay open */</div><div class='del'>-#define LOG_NOWAIT	0x10	/* don't wait for console forks: DEPRECATED */</div><div class='del'>-#define LOG_PERROR	0x20	/* log to stderr as well */</div><div class='del'>-</div><div class='del'>-/* Open connection to system logger.  */</div><div class='del'>-/* against the glibc-routine ident has not to be const ! */</div><div class='del'>-/* instead ident is limited to 80 characters ! */</div><div class='del'>-void openlog (const char *ident, int option, int  facility);</div><div class='del'>-</div><div class='del'>-void closelog (void) __THROW;</div><div class='del'>-</div><div class='del'>-int setlogmask (int mask) __THROW;</div><div class='del'>-</div><div class='del'>-void syslog (int priority, const char *format, ...) __THROW;</div><div class='del'>-</div><div class='del'>-void vsyslog (int priority, const char *format, va_list arg_ptr) __THROW;</div><div class='del'>-</div><div class='del'>-/* yuck yuck yuck, only needed for syslogd. */</div><div class='del'>-typedef struct _code {</div><div class='del'>-  char *c_name;</div><div class='del'>-  int c_val;</div><div class='del'>-} CODE;</div><div class='del'>-</div><div class='del'>-extern CODE prioritynames[];</div><div class='del'>-extern CODE facilitynames[];</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/time.h b/mdk-stage1/dietlibc/include/sys/time.h<br/>deleted file mode 100644<br/>index 11144f57b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/time.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/time.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#ifndef _SYS_TIME_H</div><div class='del'>-#define _SYS_TIME_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-</div><div class='del'>-#if defined __USE_GNU || defined __USE_BSD</div><div class='del'>-typedef struct timezone *__timezone_ptr_t;</div><div class='del'>-#else</div><div class='del'>-typedef void *__timezone_ptr_t;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int getitimer(int which, struct itimerval *value) __THROW;</div><div class='del'>-int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) __THROW;</div><div class='del'>-</div><div class='del'>-int gettimeofday(struct timeval *tv, struct timezone *tz) __THROW;</div><div class='del'>-int settimeofday(const struct timeval *tv , const struct timezone *tz) __THROW;</div><div class='del'>-</div><div class='del'>-extern int adjtime (const struct timeval *__delta,</div><div class='del'>-		    struct timeval *__olddelta) __THROW;</div><div class='del'>-</div><div class='del'>-struct tm</div><div class='del'>-{</div><div class='del'>-  int tm_sec;			/* Seconds.	[0-60] (1 leap second) */</div><div class='del'>-  int tm_min;			/* Minutes.	[0-59] */</div><div class='del'>-  int tm_hour;			/* Hours.	[0-23] */</div><div class='del'>-  int tm_mday;			/* Day.		[1-31] */</div><div class='del'>-  int tm_mon;			/* Month.	[0-11] */</div><div class='del'>-  int tm_year;			/* Year	- 1900.  */</div><div class='del'>-  int tm_wday;			/* Day of week.	[0-6] */</div><div class='del'>-  int tm_yday;			/* Days in year.[0-365]	*/</div><div class='del'>-  int tm_isdst;			/* DST.		[-1/0/1]*/</div><div class='del'>-</div><div class='del'>-  long int tm_gmtoff;		/* Seconds east of UTC.  */</div><div class='del'>-  const char *tm_zone;		/* Timezone abbreviation.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct tm* gmtime(const time_t *t) __THROW;</div><div class='del'>-struct tm* gmtime_r(const time_t *t, struct tm *r) __THROW;</div><div class='del'>-</div><div class='del'>-struct tm* localtime(const time_t *t) __THROW;</div><div class='del'>-struct tm* localtime_r(const time_t *t, struct tm *r) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/times.h b/mdk-stage1/dietlibc/include/sys/times.h<br/>deleted file mode 100644<br/>index 72ec62fec..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/times.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/times.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#ifndef _SYS_TIMES_H</div><div class='del'>-#define _SYS_TIMES_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/times.h&gt;</div><div class='del'>-</div><div class='del'>-clock_t times(struct tms *buf);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/types.h b/mdk-stage1/dietlibc/include/sys/types.h<br/>deleted file mode 100644<br/>index 34dbaa9f1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/types.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/types.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,33 +0,0 @@</div><div class='del'>-#ifndef _SYS_TYPES_H</div><div class='del'>-#define _SYS_TYPES_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/posix_types.h&gt;</div><div class='del'>-#include &lt;linux/socket.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-#define __quad_t __quad_t</div><div class='del'>-typedef long long int __quad_t;</div><div class='del'>-typedef unsigned long long int __u_quad_t;</div><div class='del'>-#else</div><div class='del'>-#warning no long long support - no 64 bit file I/O support</div><div class='del'>-typedef long int __quad_t;</div><div class='del'>-typedef unsigned long int __u_quad_t;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __quad_t</div><div class='del'>-typedef __quad_t off64_t;</div><div class='del'>-typedef __u_quad_t ino64_t;</div><div class='del'>-typedef __quad_t blkcnt64_t;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-typedef long int fpos_t;</div><div class='del'>-</div><div class='del'>-#define socklen_t socklen_t</div><div class='del'>-typedef unsigned int socklen_t;</div><div class='del'>-</div><div class='del'>-typedef long int blksize_t;</div><div class='del'>-typedef long int blkcnt_t;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/uio.h b/mdk-stage1/dietlibc/include/sys/uio.h<br/>deleted file mode 100644<br/>index d64fd33c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/uio.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/uio.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef _SYS_UIO</div><div class='del'>-#define _SYS_UIO 1</div><div class='del'>-</div><div class='del'>-#include &lt;linux/uio.h&gt;</div><div class='del'>-</div><div class='del'>-int readv(int filedes, const struct iovec *vector, size_t count);</div><div class='del'>-int writev(int filedes, const struct iovec *vector, size_t count);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/un.h b/mdk-stage1/dietlibc/include/sys/un.h<br/>deleted file mode 100644<br/>index 213d9290e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/un.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/un.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#ifndef	_SYS_UN_H</div><div class='del'>-#define	_SYS_UN_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/un.h&gt;</div><div class='del'>-</div><div class='del'>-#endif	/* sys/un.h  */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/utsname.h b/mdk-stage1/dietlibc/include/sys/utsname.h<br/>deleted file mode 100644<br/>index 37bf6c811..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/utsname.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/utsname.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#ifndef	_SYS_UTSNAME_H</div><div class='del'>-#define	_SYS_UTSNAME_H	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-</div><div class='del'>-/* Length of the entries in `struct utsname' is 65.  */</div><div class='del'>-#define _UTSNAME_LENGTH 65</div><div class='del'>-#define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH</div><div class='del'>-</div><div class='del'>-/* Linux provides as additional information in the `struct utsname'</div><div class='del'>-   the name of the current domain.  Define _UTSNAME_DOMAIN_LENGTH</div><div class='del'>-   to a value != 0 to activate this entry.  */</div><div class='del'>-#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH</div><div class='del'>-</div><div class='del'>-struct utsname {</div><div class='del'>-  /* Name of the implementation of the operating system.  */</div><div class='del'>-  char sysname[_UTSNAME_LENGTH];</div><div class='del'>-</div><div class='del'>-  /* Name of this node on the network.  */</div><div class='del'>-  char nodename[_UTSNAME_NODENAME_LENGTH];</div><div class='del'>-</div><div class='del'>-  /* Current release level of this implementation.  */</div><div class='del'>-  char release[_UTSNAME_LENGTH];</div><div class='del'>-  /* Current version level of this release.  */</div><div class='del'>-  char version[_UTSNAME_LENGTH];</div><div class='del'>-</div><div class='del'>-  /* Name of the hardware type the system is running on.  */</div><div class='del'>-  char machine[_UTSNAME_LENGTH];</div><div class='del'>-</div><div class='del'>-  /* Name of the domain of this node on the network.  */</div><div class='del'>-  char domainname[_UTSNAME_DOMAIN_LENGTH];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern int uname (struct utsname *__name) __THROW;</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/vfs.h b/mdk-stage1/dietlibc/include/sys/vfs.h<br/>deleted file mode 100644<br/>index e4740a225..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/vfs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/vfs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#ifndef _SYS_VFS_H</div><div class='del'>-#define _SYS_VFS_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;linux/vfs.h&gt;</div><div class='del'>-</div><div class='del'>-int statfs(const char *path, struct statfs *buf) __THROW;</div><div class='del'>-int fstatfs(int fd, struct statfs *buf) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/sys/wait.h b/mdk-stage1/dietlibc/include/sys/wait.h<br/>deleted file mode 100644<br/>index eb70112e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/sys/wait.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/sys/wait.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#ifndef _SYS_WAIT_H</div><div class='del'>-#define _SYS_WAIT_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/resource.h&gt;</div><div class='del'>-#include &lt;linux/wait.h&gt;</div><div class='del'>-</div><div class='del'>-/* If WIFEXITED(STATUS), the low-order 8 bits of the status.  */</div><div class='del'>-#define __WEXITSTATUS(status)	(((status) &amp; 0xff00) &gt;&gt; 8)</div><div class='del'>-#define WEXITSTATUS __WEXITSTATUS</div><div class='del'>-</div><div class='del'>-/* If WIFSIGNALED(STATUS), the terminating signal.  */</div><div class='del'>-#define __WTERMSIG(status)	((status) &amp; 0x7f)</div><div class='del'>-#define WTERMSIG __WTERMSIG</div><div class='del'>-</div><div class='del'>-/* If WIFSTOPPED(STATUS), the signal that stopped the child.  */</div><div class='del'>-#define __WSTOPSIG(status)	__WEXITSTATUS(status)</div><div class='del'>-#define WSTOPSIG __WSTOPSIG</div><div class='del'>-</div><div class='del'>-/* Nonzero if STATUS indicates normal termination.  */</div><div class='del'>-#define WIFEXITED(status)	(__WTERMSIG(status) == 0)</div><div class='del'>-</div><div class='del'>-/* Nonzero if STATUS indicates termination by a signal.  */</div><div class='del'>-#define WIFSIGNALED(status)	(!WIFSTOPPED(status) &amp;&amp; !WIFEXITED(status))</div><div class='del'>-</div><div class='del'>-/* Nonzero if STATUS indicates the child is stopped.  */</div><div class='del'>-#define WIFSTOPPED(status)	(((status) &amp; 0xff) == 0x7f)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-pid_t wait(int *status) __THROW;</div><div class='del'>-pid_t waitpid(pid_t pid, int *status, int options) __THROW;</div><div class='del'>-</div><div class='del'>-pid_t wait3(int *status, int options, struct rusage *rusage) __THROW;</div><div class='del'>-</div><div class='del'>-pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/syslog.h b/mdk-stage1/dietlibc/include/syslog.h<br/>deleted file mode 100644<br/>index 830b4928a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/syslog.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/syslog.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#include &lt;sys/syslog.h&gt;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/termios.h b/mdk-stage1/dietlibc/include/termios.h<br/>deleted file mode 100644<br/>index f10909c1b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/termios.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/termios.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#ifndef	_TERMIOS_H</div><div class='del'>-#define	_TERMIOS_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-/* man, the Linux kernel headers suck */</div><div class='del'>-#define __USE_BSD</div><div class='del'>-#include &lt;linux/termios.h&gt;</div><div class='del'>-#undef __USE_BSD</div><div class='del'>-</div><div class='del'>-pid_t tcgetpgrp(int fd) __THROW;</div><div class='del'>-int tcsetpgrp(int fd, pid_t pgrpid) __THROW;</div><div class='del'>-int tcgetattr(int fd, struct termios *termios_p) __THROW;</div><div class='del'>-int tcsetattr(int fd, int optional_actions, struct termios *termios_p) __THROW;</div><div class='del'>-speed_t cfgetospeed(struct termios *termios_p) __THROW;</div><div class='del'>-int cfsetospeed(struct termios *termios_p, speed_t speed) __THROW;</div><div class='del'>-speed_t cfgetispeed(struct termios *termios_p) __THROW;</div><div class='del'>-int cfsetispeed(struct termios *termios_p, speed_t speed) __THROW;</div><div class='del'>-int tcflush(int fd, int queue_selector) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/time.h b/mdk-stage1/dietlibc/include/time.h<br/>deleted file mode 100644<br/>index 827c85b97..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/time.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/time.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#ifndef _TIME_H</div><div class='del'>-#define _TIME_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __isleap(int year);</div><div class='del'>-</div><div class='del'>-int nanosleep(const struct timespec *req, struct timespec *rem) __THROW;</div><div class='del'>-unsigned int sleep(unsigned int secs) __THROW;</div><div class='del'>-</div><div class='del'>-time_t mktime(struct tm *timeptr) __THROW __pure__;</div><div class='del'>-</div><div class='del'>-char *asctime(const struct tm *timeptr) __THROW;</div><div class='del'>-char *asctime_r(const struct tm *timeptr, char *buf) __THROW;</div><div class='del'>-</div><div class='del'>-char *ctime(const time_t *timep) __THROW;</div><div class='del'>-</div><div class='del'>-size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) __THROW;</div><div class='del'>-time_t time(time_t *t) __THROW;</div><div class='del'>-</div><div class='del'>-int stime(time_t *t) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/unistd.h b/mdk-stage1/dietlibc/include/unistd.h<br/>deleted file mode 100644<br/>index 1a528c0e4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/unistd.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/unistd.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,168 +0,0 @@</div><div class='del'>-#ifndef _UNISTD_H</div><div class='del'>-#define _UNISTD_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;getopt.h&gt;</div><div class='del'>-#include &lt;linux/sysctl.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-/* Values for the second argument to access.</div><div class='del'>-   These may be OR'd together.  */</div><div class='del'>-#define R_OK 4 /* Test for read permission.  */</div><div class='del'>-#define W_OK 2 /* Test for write permission.  */</div><div class='del'>-#define X_OK 1 /* Test for execute permission.  */</div><div class='del'>-#define F_OK 0 /* Test for existence.  */</div><div class='del'>-</div><div class='del'>-/* Test for access to NAME using the real UID and real GID.  */</div><div class='del'>-extern int access (__const char *__name, int __type) __THROW;</div><div class='del'>-</div><div class='del'>-#define SEEK_SET 0</div><div class='del'>-#define SEEK_CUR 1</div><div class='del'>-#define SEEK_END 2</div><div class='del'>-</div><div class='del'>-#define STDIN_FILENO   0</div><div class='del'>-#define STDOUT_FILENO  1</div><div class='del'>-#define STDERR_FILENO  2</div><div class='del'>-</div><div class='del'>-off_t lseek(int fildes, off_t offset, int whence) __THROW;</div><div class='del'>-int llseek(int fildes, unsigned long hi, unsigned long lo, loff_t* result,int whence) __THROW;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-loff_t lseek64(int fildes, loff_t offset, int whence) __THROW;</div><div class='del'>-#endif</div><div class='del'>-#if _FILE_OFFSET_BITS == 64</div><div class='del'>-#define lseek(fildes,offset,whence) lseek64(fildes,offset,whence)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int chdir(const char *path) __THROW;</div><div class='del'>-int fchdir(int fd) __THROW;</div><div class='del'>-int mkdir(const char *pathname, mode_t mode) __THROW;</div><div class='del'>-int rmdir(const char *pathname) __THROW;</div><div class='del'>-char *getcwd(char *buf, size_t size) __THROW;</div><div class='del'>-</div><div class='del'>-int open(const char* pathname,int flags, ...) __THROW;</div><div class='del'>-int open64(const char* pathname,int flags, ...) __THROW;</div><div class='del'>-int creat(const char* pathname,mode_t mode) __THROW;</div><div class='del'>-int creat64(const char* pathname,mode_t mode) __THROW;</div><div class='del'>-int write(int fd,const void* buf,size_t len) __THROW;</div><div class='del'>-int read(int fd,void* buf,size_t len) __THROW;</div><div class='del'>-int close(int fd) __THROW;</div><div class='del'>-</div><div class='del'>-int unlink(const char *pathname) __THROW;</div><div class='del'>-</div><div class='del'>-int pread(int fd, void *buf, size_t count, off_t offset);</div><div class='del'>-int pwrite(int fd, const void *buf, size_t count, off_t offset);</div><div class='del'>-</div><div class='del'>-int execve(const char *filename, char *const argv [], char *const envp[]) __THROW;</div><div class='del'>-int execlp(const char *file, const char *arg, ...) __THROW;</div><div class='del'>-int execv(const char *path, char *const argv[]) __THROW;</div><div class='del'>-int execvp(const char *file, char *const argv[]) __THROW;</div><div class='del'>-int execl(const char *path, ...) __THROW;</div><div class='del'>-</div><div class='del'>-pid_t getpid(void) __attribute__((__const__)) __THROW;</div><div class='del'>-pid_t getppid(void) __THROW;</div><div class='del'>-int kill(pid_t pid, int sig) __THROW;</div><div class='del'>-</div><div class='del'>-int setpgid (pid_t pid,pid_t pgid) __THROW;</div><div class='del'>-pid_t getpgid (pid_t pid) __THROW;</div><div class='del'>-int setpgrp (void) __THROW;</div><div class='del'>-pid_t getpgrp (void) __THROW;</div><div class='del'>-pid_t setsid (void) __THROW;</div><div class='del'>-int dup (int oldfd) __THROW;</div><div class='del'>-int dup2 (int oldfd,int newfd) __THROW;</div><div class='del'>-</div><div class='del'>-int mknod(const char *pathname, mode_t mode, dev_t dev) __THROW;</div><div class='del'>-</div><div class='del'>-int getdents(unsigned int fd, struct dirent *dirp, unsigned int count) __THROW;</div><div class='del'>-int getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int count) __THROW;</div><div class='del'>-</div><div class='del'>-pid_t fork(void) __THROW;</div><div class='del'>-pid_t vfork(void) __THROW;</div><div class='del'>-</div><div class='del'>-int readlink(const char *path, char *buf, size_t bufsiz) __THROW;</div><div class='del'>-int symlink(const char *oldpath, const char *newpath) __THROW;</div><div class='del'>-int link(const char *oldpath, const char *newpath) __THROW;</div><div class='del'>-</div><div class='del'>-int chown(const char *path, uid_t owner, gid_t group) __THROW;</div><div class='del'>-int fchown(int fd, uid_t owner, gid_t group) __THROW;</div><div class='del'>-int lchown(const char *path, uid_t owner, gid_t group) __THROW;</div><div class='del'>-</div><div class='del'>-int fsync(int fd) __THROW;</div><div class='del'>-</div><div class='del'>-int pipe(int filedes[2]) __THROW;</div><div class='del'>-</div><div class='del'>-char *ttyname (int desc) __THROW;</div><div class='del'>-</div><div class='del'>-int brk(void *end_data_segment) __THROW;</div><div class='del'>-void *sbrk(ptrdiff_t increment) __THROW;</div><div class='del'>-</div><div class='del'>-int gethostname(char *name, size_t len) __THROW;</div><div class='del'>-int sethostname(const char *name, size_t len) __THROW;</div><div class='del'>-</div><div class='del'>-void usleep(unsigned long usec) __THROW;</div><div class='del'>-unsigned int sleep(unsigned int seconds) __THROW;</div><div class='del'>-</div><div class='del'>-unsigned int alarm(unsigned int seconds) __THROW;</div><div class='del'>-int sync(void) __THROW;</div><div class='del'>-</div><div class='del'>-int isatty(int desc) __THROW;</div><div class='del'>-</div><div class='del'>-void _exit(int status) __THROW __attribute__((noreturn));</div><div class='del'>-</div><div class='del'>-extern int daemon (int nochdir,int noclose) __THROW;</div><div class='del'>-</div><div class='del'>-#if _FILE_OFFSET_BITS == 64</div><div class='del'>-#define open open64</div><div class='del'>-#define creat creat64</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern char* getlogin(void) __THROW;</div><div class='del'>-/* warning: the diet libc getlogin() simply returns getenv("LOGNAME") */</div><div class='del'>-</div><div class='del'>-int chroot(const char *path) __THROW;</div><div class='del'>-</div><div class='del'>-uid_t getuid(void) __THROW;</div><div class='del'>-uid_t geteuid(void) __THROW;</div><div class='del'>-gid_t getgid(void) __THROW;</div><div class='del'>-gid_t getegid(void) __THROW;</div><div class='del'>-int setuid(uid_t uid) __THROW;</div><div class='del'>-/* int seteuid(uid_t uid) __THROW; */</div><div class='del'>-int setgid(gid_t gid) __THROW;</div><div class='del'>-/* int setegid(gid_t gid) __THROW; */</div><div class='del'>-int setregid(gid_t rgid, gid_t egid) __THROW;</div><div class='del'>-int setreuid(uid_t ruid, uid_t euid) __THROW;</div><div class='del'>-#define seteuid(euid) setreuid(-1,euid)</div><div class='del'>-#define setegid(egid) setregid(-1,egid)</div><div class='del'>-</div><div class='del'>-int rename(const char *oldpath, const char *newpath) __THROW;</div><div class='del'>-int ftruncate(int fd, off_t length) __THROW;</div><div class='del'>-</div><div class='del'>-int mkstemp(char *Template) __THROW;</div><div class='del'>-</div><div class='del'>-int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) __THROW;</div><div class='del'>-</div><div class='del'>-int nice(int inc) __THROW;</div><div class='del'>-</div><div class='del'>-extern char *__environ[];</div><div class='del'>-</div><div class='del'>-char *crypt(const char *key, const char *salt) __THROW;</div><div class='del'>-void encrypt(char block[64], int edflag) __THROW;</div><div class='del'>-void setkey(const char *key) __THROW;</div><div class='del'>-</div><div class='del'>-size_t getpagesize(void) __attribute__((__const__)) __THROW;</div><div class='del'>-</div><div class='del'>-int getdomainname(char *name, size_t len) __THROW;</div><div class='del'>-int setdomainname(const char *name, size_t len) __THROW;</div><div class='del'>-</div><div class='del'>-int getgroups(int size, gid_t list[]) __THROW;</div><div class='del'>-</div><div class='del'>-/* warning: linux specific: */</div><div class='del'>-int _sysctl(struct __sysctl_args *args) __THROW;</div><div class='del'>-int  sendfile(int out_fd, int in_fd, off_t *offset, size_t count) __THROW;</div><div class='del'>-</div><div class='del'>-int getdtablesize(void) __THROW;</div><div class='del'>-char *getpass(const char * prompt) __THROW;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/utime.h b/mdk-stage1/dietlibc/include/utime.h<br/>deleted file mode 100644<br/>index 41674f379..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/utime.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/utime.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#ifndef _UTIME_H</div><div class='del'>-#define _UTIME_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-struct utimbuf {</div><div class='del'>-  time_t actime;  /* access time */</div><div class='del'>-  time_t modtime; /* modification time */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int utime(const char *filename, struct utimbuf *buf) __THROW;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/include/utmp.h b/mdk-stage1/dietlibc/include/utmp.h<br/>deleted file mode 100644<br/>index 2946be921..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/include/utmp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/include/utmp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,73 +0,0 @@</div><div class='del'>-#ifndef _UTMP_H</div><div class='del'>-#define _UTMP_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/cdefs.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-#define UT_LINESIZE	32</div><div class='del'>-#define UT_NAMESIZE	32</div><div class='del'>-#define UT_HOSTSIZE	256</div><div class='del'>-</div><div class='del'>-#define _PATH_UTMP	"/var/run/utmp"</div><div class='del'>-#define _PATH_WTMP	"/var/log/wtmp"</div><div class='del'>-</div><div class='del'>-/* The structure describing an entry in the database of</div><div class='del'>-   previous logins.  */</div><div class='del'>-struct lastlog</div><div class='del'>-  {</div><div class='del'>-    time_t ll_time;</div><div class='del'>-    char ll_line[UT_LINESIZE];</div><div class='del'>-    char ll_host[UT_HOSTSIZE];</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* The structure describing the status of a terminated process.  This</div><div class='del'>-   type is used in `struct utmp' below.  */</div><div class='del'>-struct exit_status</div><div class='del'>-  {</div><div class='del'>-    short int e_termination;	/* Process termination status.  */</div><div class='del'>-    short int e_exit;		/* Process exit status.  */</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-/* The structure describing an entry in the user accounting database.  */</div><div class='del'>-struct utmp</div><div class='del'>-{</div><div class='del'>-  short int ut_type;		/* Type of login.  */</div><div class='del'>-  pid_t ut_pid;			/* Process ID of login process.  */</div><div class='del'>-  char ut_line[UT_LINESIZE];	/* Devicename.  */</div><div class='del'>-  char ut_id[4];		/* Inittab ID.  */</div><div class='del'>-  char ut_user[UT_NAMESIZE];	/* Username.  */</div><div class='del'>-  char ut_host[UT_HOSTSIZE];	/* Hostname for remote login.  */</div><div class='del'>-#define ut_name ut_host</div><div class='del'>-  struct exit_status ut_exit;	/* Exit status of a process marked</div><div class='del'>-				   as DEAD_PROCESS.  */</div><div class='del'>-  long int ut_session;		/* Session ID, used for windowing.  */</div><div class='del'>-  struct timeval ut_tv;		/* Time entry was made.  */</div><div class='del'>-  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */</div><div class='del'>-  char __unused[20];		/* Reserved for future use.  */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Values for the `ut_type' field of a `struct utmp'.  */</div><div class='del'>-#define EMPTY		0	/* No valid user accounting information.  */</div><div class='del'>-</div><div class='del'>-#define RUN_LVL		1	/* The system's runlevel.  */</div><div class='del'>-#define BOOT_TIME	2	/* Time of system boot.  */</div><div class='del'>-#define NEW_TIME	3	/* Time after system clock changed.  */</div><div class='del'>-#define OLD_TIME	4	/* Time when system clock changed.  */</div><div class='del'>-</div><div class='del'>-#define INIT_PROCESS	5	/* Process spawned by the init process.  */</div><div class='del'>-#define LOGIN_PROCESS	6	/* Session leader of a logged in user.  */</div><div class='del'>-#define USER_PROCESS	7	/* Normal process.  */</div><div class='del'>-#define DEAD_PROCESS	8	/* Terminated process.  */</div><div class='del'>-</div><div class='del'>-#define ACCOUNTING	9</div><div class='del'>-</div><div class='del'>-/* Tell the user that we have a modern system with UT_HOST, UT_PID,</div><div class='del'>-   UT_TYPE, UT_ID and UT_TV fields.  */</div><div class='del'>-#define _HAVE_UT_TYPE	1</div><div class='del'>-#define _HAVE_UT_PID	1</div><div class='del'>-#define _HAVE_UT_ID	1</div><div class='del'>-#define _HAVE_UT_TV	1</div><div class='del'>-#define _HAVE_UT_HOST	1</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__dtostr.c b/mdk-stage1/dietlibc/lib/__dtostr.c<br/>deleted file mode 100644<br/>index e9a8a83d3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__dtostr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__dtostr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,104 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-/* convert double to string.  Helper for sprintf. */</div><div class='del'>-</div><div class='del'>-int __dtostr(double d,char *buf,int maxlen,int prec) {</div><div class='del'>-  unsigned long long *x=(unsigned long long *)&amp;d;</div><div class='del'>-  /* step 1: extract sign, mantissa and exponent */</div><div class='del'>-  signed int s=*x&gt;&gt;63;</div><div class='del'>-  signed long e=((*x&gt;&gt;52)&amp;((1&lt;&lt;11)-1))-1023;</div><div class='del'>-/*  unsigned long long m=*x &amp; ((1ull&lt;&lt;52)-1); */</div><div class='del'>-  /* step 2: exponent is base 2, compute exponent for base 10 */</div><div class='del'>-  signed long e10=1+(long)(e*0.30102999566398119802); /* log10(2) */</div><div class='del'>-  /* step 3: calculate 10^e10 */</div><div class='del'>-  int i;</div><div class='del'>-  double tmp=10.0;</div><div class='del'>-  char *oldbuf=buf;</div><div class='del'>-  int initial=1;</div><div class='del'>-</div><div class='del'>-  if (d==0.0) {</div><div class='del'>-    *buf='0'; ++buf;</div><div class='del'>-    goto done;</div><div class='del'>-  }</div><div class='del'>-  if (s) { d=-d; *buf='-'; --maxlen; buf++; }</div><div class='del'>-/*  printf("e=%d e10=%d prec=%d\n",e,e10,prec); */</div><div class='del'>-  if (e10&gt;=0) {</div><div class='del'>-    i=e10;</div><div class='del'>-    while (i&gt;10) { tmp=tmp*1e10; i-=10; }</div><div class='del'>-    while (i&gt;1) { tmp=tmp*10; --i; }</div><div class='del'>-  } else {</div><div class='del'>-    i=(e10=-e10);</div><div class='del'>-    while (i&gt;10) { tmp=tmp*1e-10; i-=10; }</div><div class='del'>-    while (i&gt;1) { tmp=tmp/10; --i; }</div><div class='del'>-  }</div><div class='del'>-  while (d/tmp&lt;1) {</div><div class='del'>-    --e10;</div><div class='del'>-    tmp/=10.0;</div><div class='del'>-  }</div><div class='del'>-  /* step 4: see if precision is sufficient to display all digits */</div><div class='del'>-  if (e10&gt;prec) {</div><div class='del'>-    /* use scientific notation */</div><div class='del'>-    int len=__dtostr(d/tmp,buf,maxlen,prec);</div><div class='del'>-    if (len==0) return 0;</div><div class='del'>-    maxlen-=len; buf+=len;</div><div class='del'>-    if (--maxlen&gt;=0) {</div><div class='del'>-      *buf='e';</div><div class='del'>-      ++buf;</div><div class='del'>-    }</div><div class='del'>-    for (len=1000; len&gt;0; len/=10) {</div><div class='del'>-      if (e10&gt;=len || !initial) {</div><div class='del'>-	if (--maxlen&gt;=0) {</div><div class='del'>-	  *buf=(e10/len)+'0';</div><div class='del'>-	  ++buf;</div><div class='del'>-	}</div><div class='del'>-	initial=0;</div><div class='del'>-	e10=e10%len;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    if (maxlen&gt;=0) return buf-oldbuf;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  /* step 5: loop through the digits, inserting the decimal point when</div><div class='del'>-   * appropriate */</div><div class='del'>-  if (d&lt;1.0) {</div><div class='del'>-    double x=1.0;</div><div class='del'>-    int first=1;</div><div class='del'>-    do {</div><div class='del'>-      if (--maxlen&lt;0) return buf-oldbuf;</div><div class='del'>-      *buf='0'; ++buf;</div><div class='del'>-      if (first) {</div><div class='del'>-	first=0;</div><div class='del'>-	*buf='.'; ++buf;</div><div class='del'>-	if (--maxlen&lt;0) return buf-oldbuf;</div><div class='del'>-      }</div><div class='del'>-      x/=10.0;</div><div class='del'>-    } while (x&gt;d);</div><div class='del'>-  }</div><div class='del'>-  for (; prec&gt;0; ) {</div><div class='del'>-    double tmp2=d/tmp;</div><div class='del'>-    char c;</div><div class='del'>-    d-=((int)tmp2*tmp);</div><div class='del'>-    c=((int)tmp2);</div><div class='del'>-    if ((!initial)||c) {</div><div class='del'>-      if (--maxlen&gt;=0) {</div><div class='del'>-	initial=0;</div><div class='del'>-	*buf=c+'0';</div><div class='del'>-	++buf;</div><div class='del'>-      } else</div><div class='del'>-	return 0;</div><div class='del'>-      --prec;</div><div class='del'>-    }</div><div class='del'>-    if (tmp&gt;0.5 &amp;&amp; tmp&lt;1.5) {</div><div class='del'>-      tmp=1e-1;</div><div class='del'>-      initial=0;</div><div class='del'>-      if (--maxlen&gt;=0) {</div><div class='del'>-	*buf='.';</div><div class='del'>-	++buf;</div><div class='del'>-      } else</div><div class='del'>-	return 0;</div><div class='del'>-    } else</div><div class='del'>-      tmp/=10.0;</div><div class='del'>-  }</div><div class='del'>-done:</div><div class='del'>-  *buf=0;</div><div class='del'>-  return buf-oldbuf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__fstat64.c b/mdk-stage1/dietlibc/lib/__fstat64.c<br/>deleted file mode 100644<br/>index 6f9fcb2c5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__fstat64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__fstat64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dietlibc_fstat64(int __fd, struct stat64 *__buf);</div><div class='del'>-extern void __stat64_cvt(const struct stat *src,struct stat64 *dest);</div><div class='del'>-</div><div class='del'>-int fstat64(int __fd, struct stat64 *__buf) {</div><div class='del'>-  if (__dietlibc_fstat64(__fd,__buf)) {</div><div class='del'>-    struct stat temp;</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    if (*__errno_location()!=ENOSYS) return -1;</div><div class='del'>-#else</div><div class='del'>-    if (errno!=ENOSYS) return -1;</div><div class='del'>-#endif</div><div class='del'>-    if (fstat(__fd,&amp;temp)) return -1;</div><div class='del'>-    __stat64_cvt(&amp;temp,__buf);</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__getcwd.c b/mdk-stage1/dietlibc/lib/__getcwd.c<br/>deleted file mode 100644<br/>index e97fc4520..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__getcwd.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__getcwd.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __syscall_getcwd(char* buf, size_t size);</div><div class='del'>-</div><div class='del'>-char *getcwd(char *buf, size_t size) {</div><div class='del'>-  int tmp;</div><div class='del'>-  if ((tmp=__syscall_getcwd(buf,size))&lt;0) return 0;</div><div class='del'>-  buf[tmp]=0;</div><div class='del'>-  return buf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__isnan.c b/mdk-stage1/dietlibc/lib/__isnan.c<br/>deleted file mode 100644<br/>index 9d21e9824..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__isnan.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__isnan.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-int __isnan(double d) {</div><div class='del'>-  unsigned long long *x=(unsigned long long *)&amp;d;</div><div class='del'>-  return (*x==0x7FF8002000000000ll || *x==0x7FF0002000000000);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-TestFromIeeeExtended("7FFF0000000000000000");   /* +infinity */</div><div class='del'>-TestFromIeeeExtended("FFFF0000000000000000");   /* -infinity */</div><div class='del'>-TestFromIeeeExtended("7FFF8001000000000000");   /* Quiet NaN(1) */</div><div class='del'>-TestFromIeeeExtended("7FFF0001000000000000");   /* Signalling NaN(1) */</div><div class='del'>-TestFromIeeeExtended("3FFFFEDCBA9876543210");   /* accuracy test */</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__lltostr.c b/mdk-stage1/dietlibc/lib/__lltostr.c<br/>deleted file mode 100644<br/>index eb4a27cef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__lltostr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__lltostr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int __lltostr(char *s, int size, unsigned long long i, int base, char UpCase)</div><div class='del'>-{</div><div class='del'>-  char *tmp;</div><div class='del'>-  int j=0;</div><div class='del'>-</div><div class='del'>-  s[--size]=0;</div><div class='del'>-</div><div class='del'>-  tmp=s+size;</div><div class='del'>-</div><div class='del'>-  if ((base==0)||(base&gt;36)) base=10;</div><div class='del'>-</div><div class='del'>-  j=0;</div><div class='del'>-  if (!i)</div><div class='del'>-  {</div><div class='del'>-    *(--tmp)='0';</div><div class='del'>-    j=1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  while((tmp&gt;s)&amp;&amp;(i))</div><div class='del'>-  {</div><div class='del'>-    tmp--;</div><div class='del'>-    if ((*tmp=i%base+'0')&gt;'9') *tmp+=(UpCase?'A':'a')-'9'-1;</div><div class='del'>-    i=i/base;</div><div class='del'>-    j++;</div><div class='del'>-  }</div><div class='del'>-  memmove(s,tmp,j+1);</div><div class='del'>-</div><div class='del'>-  return j;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__lstat64.c b/mdk-stage1/dietlibc/lib/__lstat64.c<br/>deleted file mode 100644<br/>index a871f3917..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__lstat64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__lstat64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dietlibc_lstat64(const char *__file, struct stat64 *__buf);</div><div class='del'>-extern void __stat64_cvt(const struct stat *src,struct stat64 *dest);</div><div class='del'>-</div><div class='del'>-int lstat64(const char *__file, struct stat64 *__buf) {</div><div class='del'>-  if (__dietlibc_lstat64(__file,__buf)) {</div><div class='del'>-    struct stat temp;</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    if (*__errno_location()!=ENOSYS) return -1;</div><div class='del'>-#else</div><div class='del'>-    if (errno!=ENOSYS) return -1;</div><div class='del'>-#endif</div><div class='del'>-    if (lstat(__file,&amp;temp)) return -1;</div><div class='del'>-    __stat64_cvt(&amp;temp,__buf);</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__ltostr.c b/mdk-stage1/dietlibc/lib/__ltostr.c<br/>deleted file mode 100644<br/>index 57e0690d2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__ltostr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__ltostr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int __ltostr(char *s, int size, unsigned long i, int base, char UpCase)</div><div class='del'>-{</div><div class='del'>-  char *tmp;</div><div class='del'>-  int j=0;</div><div class='del'>-</div><div class='del'>-  s[--size]=0;</div><div class='del'>-</div><div class='del'>-  tmp=s+size;</div><div class='del'>-</div><div class='del'>-  if ((base==0)||(base&gt;36)) base=10;</div><div class='del'>-</div><div class='del'>-  j=0;</div><div class='del'>-  if (!i)</div><div class='del'>-  {</div><div class='del'>-    *(--tmp)='0';</div><div class='del'>-    j=1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  while((tmp&gt;s)&amp;&amp;(i))</div><div class='del'>-  {</div><div class='del'>-    tmp--;</div><div class='del'>-    if ((*tmp=i%base+'0')&gt;'9') *tmp+=(UpCase?'A':'a')-'9'-1;</div><div class='del'>-    i=i/base;</div><div class='del'>-    j++;</div><div class='del'>-  }</div><div class='del'>-  memmove(s,tmp,j+1);</div><div class='del'>-</div><div class='del'>-  return j;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__stat64.c b/mdk-stage1/dietlibc/lib/__stat64.c<br/>deleted file mode 100644<br/>index dfb0d4315..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__stat64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__stat64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dietlibc_stat64(const char *__file, struct stat64 *__buf);</div><div class='del'>-extern void __stat64_cvt(const struct stat *src,struct stat64 *dest);</div><div class='del'>-</div><div class='del'>-int stat64(const char *__file, struct stat64 *__buf) {</div><div class='del'>-  if (__dietlibc_stat64(__file,__buf)) {</div><div class='del'>-    struct stat temp;</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    if (*__errno_location()!=ENOSYS) return -1;</div><div class='del'>-#else</div><div class='del'>-    if (errno!=ENOSYS) return -1;</div><div class='del'>-#endif</div><div class='del'>-    if (stat(__file,&amp;temp)) return -1;</div><div class='del'>-    __stat64_cvt(&amp;temp,__buf);</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__stat64_cvt.c b/mdk-stage1/dietlibc/lib/__stat64_cvt.c<br/>deleted file mode 100644<br/>index dced352a4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__stat64_cvt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__stat64_cvt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-</div><div class='del'>-void __stat64_cvt(const struct stat *src,struct stat64 *dest) {</div><div class='del'>-  dest-&gt;st_dev=src-&gt;st_dev;</div><div class='del'>-  dest-&gt;st_ino=src-&gt;st_ino;</div><div class='del'>-  dest-&gt;st_mode=src-&gt;st_mode;</div><div class='del'>-  dest-&gt;st_nlink=src-&gt;st_nlink;</div><div class='del'>-  dest-&gt;st_uid=src-&gt;st_gid;</div><div class='del'>-  dest-&gt;st_rdev=src-&gt;st_rdev;</div><div class='del'>-  dest-&gt;st_size=src-&gt;st_size;</div><div class='del'>-  dest-&gt;st_blksize=src-&gt;st_blksize;</div><div class='del'>-  dest-&gt;st_blocks=src-&gt;st_blocks;</div><div class='del'>-  dest-&gt;st_atime=src-&gt;st_atime;</div><div class='del'>-  dest-&gt;st_mtime=src-&gt;st_mtime;</div><div class='del'>-  dest-&gt;st_ctime=src-&gt;st_ctime;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/__xmknod.c b/mdk-stage1/dietlibc/lib/__xmknod.c<br/>deleted file mode 100644<br/>index 4739a1f5f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/__xmknod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/__xmknod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-int __xmknod(int ver,char* filename,mode_t mode,dev_t *dev) {</div><div class='del'>-  return mknod(filename,mode,*dev);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/_brk.c b/mdk-stage1/dietlibc/lib/_brk.c<br/>deleted file mode 100644<br/>index 6d0b29c03..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/_brk.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/_brk.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __diet_brk(void *end_data_segment);</div><div class='del'>-</div><div class='del'>-void* __curbrk=0;</div><div class='del'>-</div><div class='del'>-int __brk(void *end_data_segment) {</div><div class='del'>-  int res;</div><div class='del'>-  if ((res=__diet_brk(end_data_segment))==0)</div><div class='del'>-    __curbrk=end_data_segment;</div><div class='del'>-  return res;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int brk (void *end_data_segment) __attribute__((weak,alias("__brk")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/abort.c b/mdk-stage1/dietlibc/lib/abort.c<br/>deleted file mode 100644<br/>index 55bfb8f0f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/abort.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/abort.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/signal.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-void abort() {</div><div class='del'>-  sigset_t t;</div><div class='del'>-  if (!sigemptyset(&amp;t) &amp;&amp; !sigaddset(&amp;t, SIGABRT))</div><div class='del'>-    sigprocmask(SIG_UNBLOCK, &amp;t, 0);</div><div class='del'>-  while (1)</div><div class='del'>-    if (raise(SIGABRT))</div><div class='del'>-      exit(127);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/abs.c b/mdk-stage1/dietlibc/lib/abs.c<br/>deleted file mode 100644<br/>index 9d7055358..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/abs.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/abs.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int abs(int j)</div><div class='del'>-{</div><div class='del'>-	return (j &lt; 0) ? -j : j;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/accept.c b/mdk-stage1/dietlibc/lib/accept.c<br/>deleted file mode 100644<br/>index c7e8254ca..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/accept.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/accept.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_accept(int a, void * addr, void * addr2) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_ACCEPT, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) addr, (long) addr2 };</div><div class='del'>-  return socketcall(SYS_ACCEPT, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int accept(int a, void * addr, void * addr2) __attribute__((weak,alias("__libc_accept")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/alarm.c b/mdk-stage1/dietlibc/lib/alarm.c<br/>deleted file mode 100644<br/>index fd35372f2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/alarm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/alarm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,47 +0,0 @@</div><div class='del'>-/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-/* Schedule an alarm.  In SECONDS seconds, the process will get a SIGALRM.</div><div class='del'>-   If SECONDS is zero, any currently scheduled alarm will be cancelled.</div><div class='del'>-   The function returns the number of seconds remaining until the last</div><div class='del'>-   alarm scheduled would have signaled, or zero if there wasn't one.</div><div class='del'>-   There is no return value to indicate an error, but you can set `errno'</div><div class='del'>-   to 0 and check its value after calling `alarm', and this might tell you.</div><div class='del'>-   The signal may come late due to processor scheduling.  */</div><div class='del'>-unsigned int</div><div class='del'>-alarm (seconds)</div><div class='del'>-     unsigned int seconds;</div><div class='del'>-{</div><div class='del'>-  struct itimerval old, new;</div><div class='del'>-  unsigned int retval;</div><div class='del'>-</div><div class='del'>-  new.it_interval.tv_usec = 0;</div><div class='del'>-  new.it_interval.tv_sec = 0;</div><div class='del'>-  new.it_value.tv_usec = 0;</div><div class='del'>-  new.it_value.tv_sec = (long int) seconds;</div><div class='del'>-  if (setitimer (ITIMER_REAL, &amp;new, &amp;old) &lt; 0)</div><div class='del'>-    return 0;</div><div class='del'>-</div><div class='del'>-  retval = old.it_value.tv_sec;</div><div class='del'>-  if (old.it_value.tv_usec)</div><div class='del'>-    ++retval;</div><div class='del'>-  return retval;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/alloc.c b/mdk-stage1/dietlibc/lib/alloc.c<br/>deleted file mode 100644<br/>index 8cb87a69b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/alloc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/alloc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,243 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * malloc/free by O.Dreesen</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-#include &lt;asm/mman.h&gt;</div><div class='del'>-#include &lt;linux/errno.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-#include &lt;sys/mman.h&gt;</div><div class='del'>-#define _LIBC</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-</div><div class='del'>-#if defined(MAP_ANONYMOUS) &amp;&amp; !defined(MAP_ANON)</div><div class='del'>-#define MAP_ANON MAP_ANONYMOUS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef MAP_FAILED</div><div class='del'>-#define MAP_FAILED ((void*)-1)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef NULL</div><div class='del'>-#define NULL ((void*)0)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern void * mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);</div><div class='del'>-extern void *memset(void *s, int c, size_t n);</div><div class='del'>-extern void *memcpy(void *dest, const void *src, size_t n);</div><div class='del'>-</div><div class='del'>-typedef struct t_alloc_head {</div><div class='del'>-  unsigned int magic1;</div><div class='del'>-  struct t_alloc_head *ptr;</div><div class='del'>-  unsigned long size;</div><div class='del'>-  unsigned int magic2;</div><div class='del'>-} alloc_head;</div><div class='del'>-</div><div class='del'>-/* guess what ? the virtual block size */</div><div class='del'>-#define MEM_BLOCK_SIZE	4096</div><div class='del'>-</div><div class='del'>-/* minimum allocated bytes */</div><div class='del'>-#define MEM_ALLOC_MIN	4</div><div class='del'>-</div><div class='del'>-/* Initial start position in memory */</div><div class='del'>-#define MEM_ALLOC_START	((char*)0x18000000)</div><div class='del'>-</div><div class='del'>-/* Make every block align */</div><div class='del'>-#define MEM_ALIGN(s)	(((s)+MEM_ALLOC_MIN-1)&amp;(~(MEM_ALLOC_MIN-1)))</div><div class='del'>-#define PAGE_ALIGN(s)	(((s)+MEM_BLOCK_SIZE-1)&amp;(~(MEM_BLOCK_SIZE-1)))</div><div class='del'>-#define PAGE_ALIGNP(p)	((char*)PAGE_ALIGN((size_t)(p)))</div><div class='del'>-</div><div class='del'>-#define END_OF_BLOCK(p)	((alloc_head*)(((char*)(p))+((p)-&gt;size)))</div><div class='del'>-#define START_BLOCK(p)	((alloc_head*)(((char*)(p))-sizeof(alloc_head)))</div><div class='del'>-#define START_DATA(p)	(((char*)(p))+sizeof(alloc_head))</div><div class='del'>-#define MIN_ALLOC(s)	(((((s)+sizeof(alloc_head)-1)/MEM_ALLOC_MIN)+1)*MEM_ALLOC_MIN)</div><div class='del'>-</div><div class='del'>-#define ALLOC_MAGIC1	0xbad2f7ee</div><div class='del'>-#define ALLOC_MAGIC2	0xf7ee2bad</div><div class='del'>-</div><div class='del'>-/* freelist handler */</div><div class='del'>-static alloc_head base = {ALLOC_MAGIC1,&amp;base,0,ALLOC_MAGIC2};</div><div class='del'>-static char *alloc_get_end = MEM_ALLOC_START;</div><div class='del'>-</div><div class='del'>-void __libc_free(void *ptr)</div><div class='del'>-{</div><div class='del'>-  alloc_head *prev,*p,*block;</div><div class='del'>-</div><div class='del'>-  if (ptr==NULL) return;</div><div class='del'>-</div><div class='del'>-  block=START_BLOCK(ptr);</div><div class='del'>-  if (block-&gt;magic1 != ALLOC_MAGIC1) return;</div><div class='del'>-  if (block-&gt;magic2 != ALLOC_MAGIC2) return;</div><div class='del'>-</div><div class='del'>-  prev=&amp;base;</div><div class='del'>-  for (p=prev-&gt;ptr ; ; prev=p, p=p-&gt;ptr)</div><div class='del'>-  {</div><div class='del'>-    if ((block&gt;prev)&amp;&amp;(block&lt;p)) break; /* found the gap block belongs */</div><div class='del'>-    if ((prev&gt;p)&amp;&amp;(block&lt;p)) break;	  /* block pre freelist */</div><div class='del'>-    if ((prev&gt;p)&amp;&amp;(block&gt;prev)) break;  /* block after freelist */</div><div class='del'>-</div><div class='del'>-    /* emergency escape: freelist has ONLY one entry the freelist base */</div><div class='del'>-    if (p-&gt;ptr==p) break;</div><div class='del'>-  }</div><div class='del'>-  prev-&gt;ptr = block;</div><div class='del'>-</div><div class='del'>-  if (END_OF_BLOCK(block)==p)</div><div class='del'>-  { /* join right neighbor */</div><div class='del'>-    block-&gt;ptr   = p-&gt;ptr;</div><div class='del'>-    block-&gt;size += p-&gt;size;</div><div class='del'>-  }</div><div class='del'>-  else</div><div class='del'>-    block-&gt;ptr = p;</div><div class='del'>-</div><div class='del'>-  if (END_OF_BLOCK(prev)==block)</div><div class='del'>-  { /* join left neighbor */</div><div class='del'>-    prev-&gt;size += block-&gt;size;</div><div class='del'>-    prev-&gt;ptr   = block-&gt;ptr;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-void free(void *ptr) __attribute__((weak,alias("__libc_free")));</div><div class='del'>-</div><div class='del'>-static void *alloc_get_mem(unsigned long size)</div><div class='del'>-{</div><div class='del'>-  char *tmp;</div><div class='del'>-  alloc_head *ah;</div><div class='del'>-</div><div class='del'>-  size=PAGE_ALIGN(size);</div><div class='del'>-</div><div class='del'>-  /* map free pages @ alloc_get_end */</div><div class='del'>-  tmp=mmap(alloc_get_end, size, PROT_READ|PROT_WRITE,</div><div class='del'>-	   MAP_ANONYMOUS|MAP_PRIVATE|MAP_FIXED, -1, 0);</div><div class='del'>-  if (tmp==MAP_FAILED)</div><div class='del'>-  {</div><div class='del'>-    /* OK we can't map free pages @ alloc_get_end so try free position */</div><div class='del'>-    tmp=mmap(0, size, PROT_READ|PROT_WRITE,</div><div class='del'>-	     MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);</div><div class='del'>-    if (tmp==MAP_FAILED)</div><div class='del'>-    {</div><div class='del'>-      errno = ENOMEM;</div><div class='del'>-      return NULL;	/* PANIC ! */</div><div class='del'>-    }</div><div class='del'>-    alloc_get_end=tmp;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  alloc_get_end+=size;</div><div class='del'>-</div><div class='del'>-  /* make a header */</div><div class='del'>-  ah=(alloc_head*)tmp;</div><div class='del'>-  ah-&gt;magic1=ALLOC_MAGIC1;</div><div class='del'>-  ah-&gt;magic2=ALLOC_MAGIC2;</div><div class='del'>-  ah-&gt;ptr=ah;</div><div class='del'>-  ah-&gt;size=size;</div><div class='del'>-</div><div class='del'>-  /* link new free maped pages in freelist */</div><div class='del'>-  __libc_free(START_DATA(tmp));</div><div class='del'>-</div><div class='del'>-  return &amp;base;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *__libc_malloc(size_t size)</div><div class='del'>-{</div><div class='del'>-  alloc_head *p, *prev;</div><div class='del'>-  size_t need;</div><div class='del'>-</div><div class='del'>-  /* needed MEM_ALLOC_MIN */</div><div class='del'>-  need=MIN_ALLOC(size);</div><div class='del'>-</div><div class='del'>-  prev=&amp;base;</div><div class='del'>-  for (p=prev-&gt;ptr;;prev=p,p=p-&gt;ptr)</div><div class='del'>-  {</div><div class='del'>-    if (p-&gt;size&gt;=need)</div><div class='del'>-    {</div><div class='del'>-      if (p-&gt;size==need)</div><div class='del'>-      { /* fit PERFECT */</div><div class='del'>-	prev-&gt;ptr=p-&gt;ptr;	/* relink freelist */</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-      {</div><div class='del'>-	alloc_head *tmp=(alloc_head*)(((char*)p)+need);</div><div class='del'>-	if ((p-&gt;size-need)&lt;sizeof(alloc_head))</div><div class='del'>-	{ /* work around: if there is not enough space for freelist head.</div><div class='del'>-	   * this waste some bytes ( &lt; sizeof(alloc_head) ) */</div><div class='del'>-	  need=p-&gt;size;</div><div class='del'>-	  prev-&gt;ptr=p-&gt;ptr;	/* relink freelist */</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-	{</div><div class='del'>-	  prev-&gt;ptr=tmp;</div><div class='del'>-	  tmp-&gt;magic1=ALLOC_MAGIC1;</div><div class='del'>-	  tmp-&gt;magic2=ALLOC_MAGIC2;</div><div class='del'>-	  tmp-&gt;ptr=p-&gt;ptr;</div><div class='del'>-	  tmp-&gt;size=p-&gt;size-need;	/* remaining size */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	p-&gt;size=need;	/* set size */</div><div class='del'>-      }</div><div class='del'>-      p-&gt;ptr=p;		/* self-link */</div><div class='del'>-</div><div class='del'>-      return (void*)START_DATA(p);</div><div class='del'>-    }</div><div class='del'>-    else if (p==&amp;base)</div><div class='del'>-    {</div><div class='del'>-      if ((p=alloc_get_mem(need))==NULL) goto err_out;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-err_out:</div><div class='del'>-  return NULL;</div><div class='del'>-}</div><div class='del'>-void *malloc(size_t size) __attribute__((weak,alias("__libc_malloc")));</div><div class='del'>-</div><div class='del'>-void *calloc(size_t nmemb,size_t size)</div><div class='del'>-{</div><div class='del'>-  size_t n=nmemb*size;</div><div class='del'>-  void *tmp=malloc(n);</div><div class='del'>-  if (tmp) memset(tmp,0,n);</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *realloc(void *ptr,size_t size)</div><div class='del'>-{</div><div class='del'>-  alloc_head *tmp=0,*tf=0;</div><div class='del'>-  long need=0;</div><div class='del'>-  long diff=0;</div><div class='del'>-</div><div class='del'>-  if (ptr)</div><div class='del'>-  {</div><div class='del'>-    if (size)</div><div class='del'>-    {</div><div class='del'>-      tmp=START_BLOCK(ptr);</div><div class='del'>-      need=MIN_ALLOC(size);  /* only this size will survive */</div><div class='del'>-      diff=tmp-&gt;size-need;</div><div class='del'>-      if (diff&lt;0)</div><div class='del'>-      {</div><div class='del'>-	if ((tf=malloc(size)))</div><div class='del'>-	{</div><div class='del'>-	  memcpy(tf,ptr,tmp-&gt;size-sizeof(alloc_head));</div><div class='del'>-	  free(ptr);</div><div class='del'>-	  return tf;</div><div class='del'>-	}</div><div class='del'>-	return NULL;</div><div class='del'>-      }</div><div class='del'>-      if (diff&gt;=sizeof(alloc_head))</div><div class='del'>-      {</div><div class='del'>-	tmp-&gt;size=need;</div><div class='del'>-	tf=END_OF_BLOCK(tmp);</div><div class='del'>-	tf-&gt;magic1=ALLOC_MAGIC1;</div><div class='del'>-	tf-&gt;magic2=ALLOC_MAGIC2;</div><div class='del'>-	tf-&gt;ptr=tf;</div><div class='del'>-	tf-&gt;size=diff;</div><div class='del'>-	free(START_DATA(tf));</div><div class='del'>-      }</div><div class='del'>-      return ptr;</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-      free(ptr);</div><div class='del'>-  }</div><div class='del'>-  else if (size&gt;0)</div><div class='del'>-    return malloc(size);</div><div class='del'>-  return NULL;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/assert_fail.c b/mdk-stage1/dietlibc/lib/assert_fail.c<br/>deleted file mode 100644<br/>index 3d6ba65c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/assert_fail.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/assert_fail.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-extern int __ltostr(char *s, int size, unsigned long i, int base, char UpCase);</div><div class='del'>-</div><div class='del'>-void __assert_fail (const char *assertion, const char *file, unsigned int line, const char *function)</div><div class='del'>-{</div><div class='del'>-  int alen=strlen(assertion);</div><div class='del'>-  int flen=strlen(file);</div><div class='del'>-  int fulen=strlen(function);</div><div class='del'>-  char *buf=(char*)alloca(alen+flen+fulen+50);</div><div class='del'>-  if (buf) {</div><div class='del'>-    char *tmp;</div><div class='del'>-    *buf=0;</div><div class='del'>-    if (file) strcat(strcat(buf,file),":");</div><div class='del'>-    tmp=buf+strlen(buf);</div><div class='del'>-    __ltostr(tmp,10,line,10,0);</div><div class='del'>-    strcat(buf,": ");</div><div class='del'>-    if (function) strcat(strcat(buf,function),": ");</div><div class='del'>-    strcat(buf,"Assertion `");</div><div class='del'>-    strcat(buf,assertion);</div><div class='del'>-    strcat(buf,"' failed.\n");</div><div class='del'>-    write(2,buf,strlen(buf));</div><div class='del'>-  }</div><div class='del'>-  abort();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-link_warning("__assert_fail","warning: your code still has assertions enabled!")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/atexit.c b/mdk-stage1/dietlibc/lib/atexit.c<br/>deleted file mode 100644<br/>index 8204af06c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/atexit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/atexit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-typedef void (*function)(void);</div><div class='del'>-</div><div class='del'>-static function __atexitlist[4];</div><div class='del'>-</div><div class='del'>-int atexit(function t) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0; i&lt;4; i++)</div><div class='del'>-    if (__atexitlist[i]==0) {</div><div class='del'>-      __atexitlist[i]=t;</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void _exit(int code) __attribute__((noreturn));</div><div class='del'>-</div><div class='del'>-void exit(int code) {</div><div class='del'>-  if (__atexitlist[3]) __atexitlist[3]();</div><div class='del'>-  if (__atexitlist[2]) __atexitlist[2]();</div><div class='del'>-  if (__atexitlist[1]) __atexitlist[1]();</div><div class='del'>-  if (__atexitlist[0]) __atexitlist[0]();</div><div class='del'>-  _exit(code);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/atof.c b/mdk-stage1/dietlibc/lib/atof.c<br/>deleted file mode 100644<br/>index 54221390e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/atof.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/atof.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-double atof(const char *nptr) {</div><div class='del'>-#if 0</div><div class='del'>-  return strtod(nptr,0);</div><div class='del'>-#else</div><div class='del'>-  double tmp=strtod(nptr,0);</div><div class='del'>-  return tmp;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/atoi.c b/mdk-stage1/dietlibc/lib/atoi.c<br/>deleted file mode 100644<br/>index fe952b8c4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/atoi.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/atoi.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-int atoi(const char* s) {</div><div class='del'>-  int v=0;</div><div class='del'>-  int sign=1;</div><div class='del'>-  if (*s=='-') { sign=-1; ++s; } else if (*s=='+') ++s;</div><div class='del'>-  while (*s &amp;&amp; (*s&gt;='0') &amp;&amp; (*s&lt;='9'))</div><div class='del'>-    v=v*10+*s++-'0';</div><div class='del'>-  return v*sign;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/atol.c b/mdk-stage1/dietlibc/lib/atol.c<br/>deleted file mode 100644<br/>index 558a004b9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/atol.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/atol.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-long int atol(const char* s) {</div><div class='del'>-  long int v=0;</div><div class='del'>-  int sign=1;</div><div class='del'>-  if (*s=='-') { sign=-1; ++s; } else if (*s=='+') ++s;</div><div class='del'>-  while (*s &amp;&amp; (*s&gt;='0') &amp;&amp; (*s&lt;='9'))</div><div class='del'>-    v=v*10+*s++-'0';</div><div class='del'>-  return v*sign;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/bind.c b/mdk-stage1/dietlibc/lib/bind.c<br/>deleted file mode 100644<br/>index ec1c93e1b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/bind.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/bind.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int bind(int a, void * b, int c) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_BIND, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c };</div><div class='del'>-  return socketcall(SYS_BIND, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/bsearch.c b/mdk-stage1/dietlibc/lib/bsearch.c<br/>deleted file mode 100644<br/>index d2f5c74b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/bsearch.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/bsearch.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {</div><div class='del'>-  const char *v, *r;</div><div class='del'>-  int res;</div><div class='del'>-  r=base+(nmemb-1)*size;</div><div class='del'>-  do {</div><div class='del'>-    register int num=nmemb/2;</div><div class='del'>-    v=base+num*size;</div><div class='del'>-    if ((res=compar(key,v))&lt;0) {</div><div class='del'>-      r=v-size;</div><div class='del'>-      nmemb=num;</div><div class='del'>-    } else {</div><div class='del'>-      if (res==0) return (void*)v;</div><div class='del'>-      base=v+size;</div><div class='del'>-      nmemb-=num;</div><div class='del'>-    }</div><div class='del'>-  } while ((char*)base&lt;=r);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/cfmakeraw.c b/mdk-stage1/dietlibc/lib/cfmakeraw.c<br/>deleted file mode 100644<br/>index 7f6df9913..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/cfmakeraw.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/cfmakeraw.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-void cfmakeraw(struct termios *t)</div><div class='del'>-{</div><div class='del'>-     t-&gt;c_iflag &amp;= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);</div><div class='del'>-     t-&gt;c_oflag &amp;= ~OPOST;</div><div class='del'>-     t-&gt;c_lflag &amp;= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);</div><div class='del'>-     t-&gt;c_cflag &amp;= ~(CSIZE|PARENB);</div><div class='del'>-     t-&gt;c_cflag |= CS8;</div><div class='del'>-     t-&gt;c_cc[VMIN] = 1;</div><div class='del'>-     t-&gt;c_cc[VTIME] = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/closedir.c b/mdk-stage1/dietlibc/lib/closedir.c<br/>deleted file mode 100644<br/>index e73025eb1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/closedir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/closedir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int closedir (DIR* d) {</div><div class='del'>-  int res=close(d-&gt;fd);</div><div class='del'>-  free(d);</div><div class='del'>-  return res;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/connect.c b/mdk-stage1/dietlibc/lib/connect.c<br/>deleted file mode 100644<br/>index 01fd61a6c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/connect.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/connect.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_connect(int a, void * b, int c) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_CONNECT, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c };</div><div class='del'>-  return socketcall(SYS_CONNECT, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int connect(int a, void * b, int c) __attribute__((weak,alias("__libc_connect")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/creat.c b/mdk-stage1/dietlibc/lib/creat.c<br/>deleted file mode 100644<br/>index 82145b515..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/creat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/creat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-int creat(const char *file,mode_t mode) {</div><div class='del'>-  return open(file,O_WRONLY|O_CREAT|O_TRUNC,mode);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/creat64.c b/mdk-stage1/dietlibc/lib/creat64.c<br/>deleted file mode 100644<br/>index 8cf897b57..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/creat64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/creat64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef O_LARGEFILE</div><div class='del'>-#define O_LARGEFILE 0</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int creat64(const char *file,mode_t mode) {</div><div class='del'>-  return open(file,O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE,mode);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/errlist.c b/mdk-stage1/dietlibc/lib/errlist.c<br/>deleted file mode 100644<br/>index d0e712190..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/errlist.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/errlist.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,132 +0,0 @@</div><div class='del'>-</div><div class='del'>-const char *const sys_errlist[] = {</div><div class='del'>-	"Success",				/* 0 */</div><div class='del'>-	"Operation not permitted", 		/* EPERM */</div><div class='del'>-	"No such file or directory", 		/* ENOENT */</div><div class='del'>-	"No such process", 			/* ESRCH */</div><div class='del'>-	"Interrupted system call", 		/* EINTR */</div><div class='del'>-	"I/O error", 				/* EIO */</div><div class='del'>-	"No such device or address", 		/* ENXIO */</div><div class='del'>-	"Arg list too long", 			/* E2BIG */</div><div class='del'>-	"Exec format error", 			/* ENOEXEC */</div><div class='del'>-	"Bad file number", 			/* EBADF */</div><div class='del'>-	"No child processes", 			/* ECHILD */</div><div class='del'>-	"Try again", 				/* EAGAIN */</div><div class='del'>-	"Out of memory", 			/* ENOMEM */</div><div class='del'>-	"Permission denied", 			/* EACCES */</div><div class='del'>-	"Bad address", 				/* EFAULT */</div><div class='del'>-	"Block device required", 		/* ENOTBLK */</div><div class='del'>-	"Device or resource busy", 		/* EBUSY */</div><div class='del'>-	"File exists", 				/* EEXIST */</div><div class='del'>-	"Cross-device link", 			/* EXDEV */</div><div class='del'>-	"No such device", 			/* ENODEV */</div><div class='del'>-	"Not a directory", 			/* ENOTDIR */</div><div class='del'>-	"Is a directory", 			/* EISDIR */</div><div class='del'>-	"Invalid argument", 			/* EINVAL */</div><div class='del'>-	"File table overflow", 			/* ENFILE */</div><div class='del'>-	"Too many open files", 			/* EMFILE */</div><div class='del'>-	"Not a typewriter", 			/* ENOTTY */</div><div class='del'>-	"Text file busy", 			/* ETXTBSY */</div><div class='del'>-	"File too large", 			/* EFBIG */</div><div class='del'>-	"No space left on device", 		/* ENOSPC */</div><div class='del'>-	"Illegal seek", 			/* ESPIPE */</div><div class='del'>-	"Read-only file system", 		/* EROFS */</div><div class='del'>-	"Too many links", 			/* EMLINK */</div><div class='del'>-	"Broken pipe", 				/* EPIPE */</div><div class='del'>-	"Math argument out of domain of func", 	/* EDOM */</div><div class='del'>-	"Math result not representable", 	/* ERANGE */</div><div class='del'>-	"Resource deadlock would occur", 	/* EDEADLK */</div><div class='del'>-	"File name too long", 			/* ENAMETOOLONG */</div><div class='del'>-	"No record locks available", 		/* ENOLCK */</div><div class='del'>-	"Function not implemented", 		/* ENOSYS */</div><div class='del'>-	"Directory not empty", 			/* ENOTEMPTY */</div><div class='del'>-	"Too many symbolic links encountered", 	/* ELOOP */</div><div class='del'>-	"Operation would block", 		/* EWOULDBLOCK */</div><div class='del'>-	"No message of desired type", 		/* ENOMSG */</div><div class='del'>-	"Identifier removed", 			/* EIDRM */</div><div class='del'>-	"Channel number out of range", 		/* ECHRNG */</div><div class='del'>-	"Level 2 not synchronized", 		/* EL2NSYNC */</div><div class='del'>-	"Level 3 halted", 			/* EL3HLT */</div><div class='del'>-	"Level 3 reset", 			/* EL3RST */</div><div class='del'>-	"Link number out of range", 		/* ELNRNG */</div><div class='del'>-	"Protocol driver not attached", 	/* EUNATCH */</div><div class='del'>-	"No CSI structure available", 		/* ENOCSI */</div><div class='del'>-	"Level 2 halted", 			/* EL2HLT */</div><div class='del'>-	"Invalid exchange", 			/* EBADE */</div><div class='del'>-	"Invalid request descriptor", 		/* EBADR */</div><div class='del'>-	"Exchange full", 			/* EXFULL */</div><div class='del'>-	"No anode", 				/* ENOANO */</div><div class='del'>-	"Invalid request code", 		/* EBADRQC */</div><div class='del'>-	"Invalid slot", 			/* EBADSLT */</div><div class='del'>-	"File locking deadlock error", 		/* EDEADLOCK */</div><div class='del'>-	"Bad font file format", 		/* EBFONT */</div><div class='del'>-	"Device not a stream", 			/* ENOSTR */</div><div class='del'>-	"No data available", 			/* ENODATA */</div><div class='del'>-	"Timer expired", 			/* ETIME */</div><div class='del'>-	"Out of streams resources", 		/* ENOSR */</div><div class='del'>-	"Machine is not on the network", 	/* ENONET */</div><div class='del'>-	"Package not installed", 		/* ENOPKG */</div><div class='del'>-	"Object is remote", 			/* EREMOTE */</div><div class='del'>-	"Link has been severed", 		/* ENOLINK */</div><div class='del'>-	"Advertise error", 			/* EADV */</div><div class='del'>-	"Srmount error", 			/* ESRMNT */</div><div class='del'>-	"Communication error on send", 		/* ECOMM */</div><div class='del'>-	"Protocol error", 			/* EPROTO */</div><div class='del'>-	"Multihop attempted", 			/* EMULTIHOP */</div><div class='del'>-	"RFS specific error", 			/* EDOTDOT */</div><div class='del'>-	"Not a data message", 			/* EBADMSG */</div><div class='del'>-	"Value too large for defined data type", 	/* EOVERFLOW */</div><div class='del'>-	"Name not unique on network", 		/* ENOTUNIQ */</div><div class='del'>-	"File descriptor in bad state", 	/* EBADFD */</div><div class='del'>-	"Remote address changed", 		/* EREMCHG */</div><div class='del'>-	"Can not access a needed shared library", 	/* ELIBACC */</div><div class='del'>-	"Accessing a corrupted shared library", 	/* ELIBBAD */</div><div class='del'>-	".lib section in a.out corrupted", 	/* ELIBSCN */</div><div class='del'>-	"Attempting to link in too many shared libraries", 	/* ELIBMAX */</div><div class='del'>-	"Cannot exec a shared library directly", 	/* ELIBEXEC */</div><div class='del'>-	"Illegal byte sequence", 		/* EILSEQ */</div><div class='del'>-	"Interrupted system call should be restarted", 	/* ERESTART */</div><div class='del'>-	"Streams pipe error", 			/* ESTRPIPE */</div><div class='del'>-	"Too many users", 			/* EUSERS */</div><div class='del'>-	"Socket operation on non-socket", 	/* ENOTSOCK */</div><div class='del'>-	"Destination address required", 	/* EDESTADDRREQ */</div><div class='del'>-	"Message too long", 			/* EMSGSIZE */</div><div class='del'>-	"Protocol wrong type for socket", 	/* EPROTOTYPE */</div><div class='del'>-	"Protocol not available", 		/* ENOPROTOOPT */</div><div class='del'>-	"Protocol not supported", 		/* EPROTONOSUPPORT */</div><div class='del'>-	"Socket type not supported", 		/* ESOCKTNOSUPPORT */</div><div class='del'>-	"Operation not supported on transport endpoint", 	/* EOPNOTSUPP */</div><div class='del'>-	"Protocol family not supported", 	/* EPFNOSUPPORT */</div><div class='del'>-	"Address family not supported by protocol", 	/* EAFNOSUPPORT */</div><div class='del'>-	"Address already in use", 		/* EADDRINUSE */</div><div class='del'>-	"Cannot assign requested address", 	/* EADDRNOTAVAIL */</div><div class='del'>-	"Network is down", 			/* ENETDOWN */</div><div class='del'>-	"Network is unreachable", 		/* ENETUNREACH */</div><div class='del'>-	"Network dropped connection because of reset", 	/* ENETRESET */</div><div class='del'>-	"Software caused connection abort", 	/* ECONNABORTED */</div><div class='del'>-	"Connection reset by peer", 		/* ECONNRESET */</div><div class='del'>-	"No buffer space available", 		/* ENOBUFS */</div><div class='del'>-	"Transport endpoint is already connected", 	/* EISCONN */</div><div class='del'>-	"Transport endpoint is not connected", 	/* ENOTCONN */</div><div class='del'>-	"Cannot send after transport endpoint shutdown", 	/* ESHUTDOWN */</div><div class='del'>-	"Too many references: cannot splice", 	/* ETOOMANYREFS */</div><div class='del'>-	"Connection timed out", 		/* ETIMEDOUT */</div><div class='del'>-	"Connection refused", 			/* ECONNREFUSED */</div><div class='del'>-	"Host is down", 			/* EHOSTDOWN */</div><div class='del'>-	"No route to host", 			/* EHOSTUNREACH */</div><div class='del'>-	"Operation already in progress", 	/* EALREADY */</div><div class='del'>-	"Operation now in progress", 		/* EINPROGRESS */</div><div class='del'>-	"Stale NFS file handle", 		/* ESTALE */</div><div class='del'>-	"Structure needs cleaning", 		/* EUCLEAN */</div><div class='del'>-	"Not a XENIX named type file", 		/* ENOTNAM */</div><div class='del'>-	"No XENIX semaphores available", 	/* ENAVAIL */</div><div class='del'>-	"Is a named type file", 		/* EISNAM */</div><div class='del'>-	"Remote I/O error", 			/* EREMOTEIO */</div><div class='del'>-	"Quota exceeded", 			/* EDQUOT */</div><div class='del'>-	"No medium found",			/* ENOMEDIUM */</div><div class='del'>-	"Wrong medium type",			/* EMEDIUMTYPE */</div><div class='del'>-	0</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-const int sys_nerr = ((sizeof (sys_errlist))/(sizeof(char *))-1);</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/errno_location.c b/mdk-stage1/dietlibc/lib/errno_location.c<br/>deleted file mode 100644<br/>index 286f833c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/errno_location.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/errno_location.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-int *__errno_location() { return &amp;errno; }</div><div class='del'>-</div><div class='del'>-int *errno_location() __attribute__((weak,alias("__errno_location")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/exec_lib.c b/mdk-stage1/dietlibc/lib/exec_lib.c<br/>deleted file mode 100644<br/>index 3129224a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/exec_lib.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/exec_lib.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;paths.h&gt;</div><div class='del'>-</div><div class='del'>-extern char **environ;</div><div class='del'>-</div><div class='del'>-int __exec_shell(const char *file, char *const argv[]) {</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  for (i = 0; argv[i]; i++);</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-    char *shell_argv[i + 1];</div><div class='del'>-    shell_argv[0] = _PATH_BSHELL;</div><div class='del'>-    shell_argv[1] = (char *) file;</div><div class='del'>-    for (; i &gt; 1; i--)</div><div class='del'>-      shell_argv[i] = argv[i - 1];</div><div class='del'>-    return execve(_PATH_BSHELL, shell_argv, environ);</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/exec_lib.h b/mdk-stage1/dietlibc/lib/exec_lib.h<br/>deleted file mode 100644<br/>index 0971bd1fb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/exec_lib.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/exec_lib.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#ifndef __EXEC_LIB_H</div><div class='del'>-#define __EXEC_LIB_H</div><div class='del'>-</div><div class='del'>-#include &lt;paths.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __exec_shell(const char *file, char *const argv[]);</div><div class='del'>-</div><div class='del'>-#endif /* __EXEC_LIB_H */</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/execl.c b/mdk-stage1/dietlibc/lib/execl.c<br/>deleted file mode 100644<br/>index 71459e71f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/execl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/execl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int execl( const char *path,...) {</div><div class='del'>-  va_list ap;</div><div class='del'>-  int n,i;</div><div class='del'>-  char **argv,*tmp;</div><div class='del'>-  va_start(ap, path);</div><div class='del'>-  n=1;</div><div class='del'>-  while ((tmp=va_arg(ap,char *)))</div><div class='del'>-    ++n;</div><div class='del'>-  va_end (ap);</div><div class='del'>-  if ((argv=(char **)alloca(n*sizeof(char*)))) {</div><div class='del'>-    va_start(ap, path);</div><div class='del'>-    for (i=0; i&lt;n; ++i)</div><div class='del'>-      argv[i]=va_arg(ap,char *);</div><div class='del'>-    va_end (ap);</div><div class='del'>-    return execve(path,argv,environ);</div><div class='del'>-  }</div><div class='del'>-  __set_errno(ENOMEM);</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/execlp.c b/mdk-stage1/dietlibc/lib/execlp.c<br/>deleted file mode 100644<br/>index 3aea1e960..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/execlp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/execlp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietstdarg.h"</div><div class='del'>-</div><div class='del'>-int execlp(const char* file, const char *arg,...) {</div><div class='del'>-  va_list ap,bak;</div><div class='del'>-  int n,i;</div><div class='del'>-  char **argv,*tmp;</div><div class='del'>-  va_start(ap, arg);</div><div class='del'>-  va_copy(bak,ap);</div><div class='del'>-  n=2;</div><div class='del'>-  while ((tmp=va_arg(ap,char *)))</div><div class='del'>-    ++n;</div><div class='del'>-  va_end (ap);</div><div class='del'>-  if ((argv=(char **)alloca(n*sizeof(char*)))) {</div><div class='del'>-    argv[0]=arg;</div><div class='del'>-    for (i=0; i&lt;n; ++i)</div><div class='del'>-      argv[i+1]=va_arg(bak,char *);</div><div class='del'>-    va_end (bak);</div><div class='del'>-    return execvp(file,argv);</div><div class='del'>-  }</div><div class='del'>-  __set_errno(ENOMEM);</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/execv.c b/mdk-stage1/dietlibc/lib/execv.c<br/>deleted file mode 100644<br/>index efd760253..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/execv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/execv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include "exec_lib.h"</div><div class='del'>-</div><div class='del'>-int execv(const char *file, char *const argv[]) {</div><div class='del'>-  if (execve(file,argv,environ)==-1) {</div><div class='del'>-    if (errno==ENOEXEC) __exec_shell(file,argv);</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/execvp.c b/mdk-stage1/dietlibc/lib/execvp.c<br/>deleted file mode 100644<br/>index 20521d69f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/execvp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/execvp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,38 +0,0 @@</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include "exec_lib.h"</div><div class='del'>-</div><div class='del'>-int execvp(const char *file, char *const argv[]) {</div><div class='del'>-  char *path=getenv("PATH");</div><div class='del'>-  char *cur,*next;</div><div class='del'>-  char buf[PATH_MAX];</div><div class='del'>-  if (strchr((char*)file,'/')) {</div><div class='del'>-    if (execve(file,argv,environ)==-1) {</div><div class='del'>-      if (errno==ENOEXEC) __exec_shell(file,argv);</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if (!path) path=_PATH_DEFPATH;</div><div class='del'>-  for (cur=path; cur; cur=next) {</div><div class='del'>-    next=strchr(cur,':');</div><div class='del'>-    if (!next)</div><div class='del'>-      next=cur+strlen(cur);</div><div class='del'>-    if (next==cur) {</div><div class='del'>-      buf[0]='.';</div><div class='del'>-      cur--;</div><div class='del'>-    } else</div><div class='del'>-      memmove(buf,cur,next-cur);</div><div class='del'>-    buf[next-cur]='/';</div><div class='del'>-    memmove(&amp;buf[next-cur+1],file,strlen(file)+1);</div><div class='del'>-    if (execve(buf,argv,environ)==-1) {</div><div class='del'>-      if (errno==ENOEXEC) return __exec_shell(buf,argv);</div><div class='del'>-      if ((errno!=EACCES) &amp;&amp; (errno!=ENOENT)) return -1;</div><div class='del'>-    }</div><div class='del'>-    if (*next==0) break;</div><div class='del'>-    next++;</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/ftw.c b/mdk-stage1/dietlibc/lib/ftw.c<br/>deleted file mode 100644<br/>index a3c04af9a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/ftw.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/ftw.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,52 +0,0 @@</div><div class='del'>-#include &lt;linux/stat.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;ftw.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int ftw(const char *dir,int (*fn)(const char *file, const struct stat *sb, int flag), int depth) {</div><div class='del'>-  char *cwd;</div><div class='del'>-  int cwdlen;</div><div class='del'>-  DIR *d;</div><div class='del'>-  struct dirent *de;</div><div class='del'>-  struct stat sb;</div><div class='del'>-  if (chdir(dir)) return -1;</div><div class='del'>-  cwd=alloca(PATH_MAX+1);</div><div class='del'>-  if (!getcwd(cwd,PATH_MAX)) return -1;</div><div class='del'>-  cwd[PATH_MAX]=0;</div><div class='del'>-  cwdlen=strlen(cwd);</div><div class='del'>-/*  write(1,"ftw in ",7); puts(cwd); */</div><div class='del'>-  if (!(d=opendir("."))) return -1;</div><div class='del'>-  while ((de=readdir(d))) {</div><div class='del'>-    int res;</div><div class='del'>-    int flag;</div><div class='del'>-    int nlen;</div><div class='del'>-    char *filename;</div><div class='del'>-    if (de-&gt;d_name[0]=='.' &amp;&amp;</div><div class='del'>-	(de-&gt;d_name[1]==0 ||</div><div class='del'>-	(de-&gt;d_name[1]=='.' &amp;&amp; de-&gt;d_name[2]==0))) continue;</div><div class='del'>-    nlen=strlen(de-&gt;d_name);</div><div class='del'>-    filename=alloca(nlen+cwdlen+3);</div><div class='del'>-    memmove(filename,cwd,cwdlen);</div><div class='del'>-    filename[cwdlen]='/';</div><div class='del'>-    memmove(filename+cwdlen+1,de-&gt;d_name,nlen+1);</div><div class='del'>-    if (!lstat(de-&gt;d_name,&amp;sb)) {</div><div class='del'>-      if (S_ISLNK(sb.st_mode)) flag=FTW_SL; else</div><div class='del'>-      if (S_ISDIR(sb.st_mode)) flag=FTW_D; else</div><div class='del'>-      flag=FTW_F;</div><div class='del'>-    } else</div><div class='del'>-      flag=FTW_NS;</div><div class='del'>-    res=fn(filename,&amp;sb,flag);</div><div class='del'>-    if (res) return res;</div><div class='del'>-    if (flag==FTW_D &amp;&amp; depth&gt;0) {</div><div class='del'>-      res=ftw(filename,fn,depth-1);</div><div class='del'>-      chdir(dir);</div><div class='del'>-      if (res) return res;</div><div class='del'>-    }</div><div class='del'>-/*    puts(de-&gt;d_name); */</div><div class='del'>-  }</div><div class='del'>-  closedir(d);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getdomainname.c b/mdk-stage1/dietlibc/lib/getdomainname.c<br/>deleted file mode 100644<br/>index 2554fe4c3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getdomainname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getdomainname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#define _GNU_SOURCE</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-</div><div class='del'>-int getdomainname(char *name,size_t len) {</div><div class='del'>-  struct utsname u;</div><div class='del'>-  int res=uname(&amp;u);</div><div class='del'>-  if (res==0) {</div><div class='del'>-    int i;</div><div class='del'>-    if (len&gt;=_UTSNAME_DOMAIN_LENGTH)</div><div class='del'>-      len=_UTSNAME_DOMAIN_LENGTH;</div><div class='del'>-    for (i=0; i&lt;len; i++)</div><div class='del'>-      name[i]=u.domainname[i];</div><div class='del'>-  }</div><div class='del'>-  return res;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getenv.c b/mdk-stage1/dietlibc/lib/getenv.c<br/>deleted file mode 100644<br/>index fc37e9927..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getenv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getenv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-extern char **environ;</div><div class='del'>-</div><div class='del'>-extern char *getenv(const char *s)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  unsigned int len;</div><div class='del'>-</div><div class='del'>-  if (!environ || !s) return 0;</div><div class='del'>-  len = strlen(s);</div><div class='del'>-  for (i = 0;environ[i];++i)</div><div class='del'>-    if ((memcmp(environ[i],s,len)==0) &amp;&amp; (environ[i][len] == '='))</div><div class='del'>-      return environ[i] + len + 1;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/gethostname.c b/mdk-stage1/dietlibc/lib/gethostname.c<br/>deleted file mode 100644<br/>index ccc0fbc8e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/gethostname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/gethostname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#define _GNU_SOURCE</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-</div><div class='del'>-int gethostname(char *name,size_t len) {</div><div class='del'>-  struct utsname u;</div><div class='del'>-  int res=uname(&amp;u);</div><div class='del'>-  if (res==0) {</div><div class='del'>-    int i;</div><div class='del'>-    if (len&gt;=_UTSNAME_NODENAME_LENGTH)</div><div class='del'>-      len=_UTSNAME_NODENAME_LENGTH;</div><div class='del'>-    for (i=0; i&lt;len; i++)</div><div class='del'>-      name[i]=u.nodename[i];</div><div class='del'>-  }</div><div class='del'>-  return res;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getopt.c b/mdk-stage1/dietlibc/lib/getopt.c<br/>deleted file mode 100644<br/>index 93097122f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getopt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getopt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,118 +0,0 @@</div><div class='del'>-#include "getopt.h"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * by Olaf Dreesen</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int opterr;</div><div class='del'>-</div><div class='del'>-int optind=1;</div><div class='del'>-char *optarg;</div><div class='del'>-</div><div class='del'>-static int opt_unknown=1,opt_unknown_len;</div><div class='del'>-</div><div class='del'>-static int getopt_check(int c,char*o,int ol)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  if (c==':') return 2;</div><div class='del'>-  for (i=0;i&lt;ol;i++)</div><div class='del'>-  {</div><div class='del'>-    if (o[i]==c)</div><div class='del'>-    {</div><div class='del'>-      if (o[i+1]==':') return 1;</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return 2;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void getopt_sort(char*v[],int oi)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  char *tmp, *tmp2=0;</div><div class='del'>-</div><div class='del'>-  if (opt_unknown_len)</div><div class='del'>-  {</div><div class='del'>-    tmp=v[optind-(1+oi)];</div><div class='del'>-    if (oi) tmp2=v[optind-1];</div><div class='del'>-</div><div class='del'>-    for (i=opt_unknown+opt_unknown_len;i&gt;opt_unknown;i--) v[i+oi]=v[i-1];</div><div class='del'>-</div><div class='del'>-    v[opt_unknown++]=tmp;</div><div class='del'>-    if (oi) v[opt_unknown++]=tmp2;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char* nextchar;</div><div class='del'>-int getopt(int c,char*v[],char*o)</div><div class='del'>-{</div><div class='del'>-  int ol=strlen(o);</div><div class='del'>-  int ret=0;</div><div class='del'>-  int oi=0;</div><div class='del'>-</div><div class='del'>-  optarg=0;</div><div class='del'>-</div><div class='del'>-  while (nextchar || (optind&lt;c))</div><div class='del'>-  {</div><div class='del'>-    if (nextchar)</div><div class='del'>-    {</div><div class='del'>-      if ((ret=(*(++nextchar))))</div><div class='del'>-      {</div><div class='del'>-	switch (getopt_check(ret,o,ol))</div><div class='del'>-	{</div><div class='del'>-	case 1:</div><div class='del'>-	  if (*(++nextchar))</div><div class='del'>-	    optarg=nextchar;</div><div class='del'>-	  else</div><div class='del'>-	  {</div><div class='del'>-	    if (optind&lt;c)</div><div class='del'>-	    {</div><div class='del'>-	      oi=1;</div><div class='del'>-	      optarg=v[optind++];</div><div class='del'>-	    }</div><div class='del'>-	    else</div><div class='del'>-	      ret='?';</div><div class='del'>-	  }</div><div class='del'>-	  nextchar=0;</div><div class='del'>-	case 0:</div><div class='del'>-	  if (!nextchar)</div><div class='del'>-	    getopt_sort(v,oi);</div><div class='del'>-	  else</div><div class='del'>-	    if (!(*(nextchar+1)))</div><div class='del'>-	      getopt_sort(v,oi);</div><div class='del'>-	  return ret;</div><div class='del'>-	  break;</div><div class='del'>-	default:</div><div class='del'>-	  return '?';</div><div class='del'>-	  break;</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-	nextchar=0;</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-    {</div><div class='del'>-      if ((v[optind][0]=='-')&amp;&amp;((v[optind][1]!=0)))</div><div class='del'>-      {</div><div class='del'>-	if ((v[optind][1]=='-')&amp;&amp;(v[optind][2]==0))</div><div class='del'>-	{</div><div class='del'>-	  getopt_sort(v,oi);</div><div class='del'>-	  optind=opt_unknown;</div><div class='del'>-	  return -1;</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-	{</div><div class='del'>-	  nextchar=v[optind];</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-      {</div><div class='del'>-	++opt_unknown_len;</div><div class='del'>-      }</div><div class='del'>-      ++optind;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  optind=opt_unknown;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getpeername.c b/mdk-stage1/dietlibc/lib/getpeername.c<br/>deleted file mode 100644<br/>index 8adcddf55..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getpeername.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getpeername.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int getpeername(int a, void * b, int c) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_GETPEERNAME, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c };</div><div class='del'>-  return socketcall(SYS_GETPEERNAME, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getpgrp.c b/mdk-stage1/dietlibc/lib/getpgrp.c<br/>deleted file mode 100644<br/>index ee2ab0257..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getpgrp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getpgrp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-int getpgrp()</div><div class='del'>-{</div><div class='del'>-  return getpgid(0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getservent.c b/mdk-stage1/dietlibc/lib/getservent.c<br/>deleted file mode 100644<br/>index bf25d046b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getservent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getservent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,137 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/mman.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-static int servicesfd=-1;</div><div class='del'>-static char* servicesmap;</div><div class='del'>-static unsigned int serviceslen;</div><div class='del'>-</div><div class='del'>-static char* aliases[10];</div><div class='del'>-</div><div class='del'>-static char *cur;</div><div class='del'>-</div><div class='del'>-/* nameserver	42/tcp		name		# IEN 116 */</div><div class='del'>-struct servent *getservent(void) {</div><div class='del'>-  static struct servent se;</div><div class='del'>-  char *last;</div><div class='del'>-  int aliasidx;</div><div class='del'>-  if (servicesfd&lt;0) {</div><div class='del'>-    servicesfd=open(_PATH_SERVICES,O_RDONLY);</div><div class='del'>-    if (servicesfd&lt;0) return 0;</div><div class='del'>-    serviceslen=lseek(servicesfd,0,SEEK_END);</div><div class='del'>-    servicesmap=mmap(0,serviceslen,PROT_READ|PROT_WRITE,MAP_PRIVATE,servicesfd,0);</div><div class='del'>-    if ((long)servicesmap==(-1)) goto error;</div><div class='del'>-    cur=servicesmap;</div><div class='del'>-  }</div><div class='del'>-  last=servicesmap+serviceslen;</div><div class='del'>-again:</div><div class='del'>-  se.s_name=0;</div><div class='del'>-  se.s_aliases=aliases; aliases[0]=0;</div><div class='del'>-  se.s_port=0;</div><div class='del'>-  se.s_proto=0;</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='#' || *cur=='\n') goto parseerror;</div><div class='del'>-  /* first, the primary name */</div><div class='del'>-  if (!isalpha(*cur)) goto parseerror;</div><div class='del'>-  se.s_name=cur;</div><div class='del'>-  se.s_aliases=aliases;</div><div class='del'>-  while (cur&lt;last &amp;&amp; isalnum(*cur)) cur++;</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='\n') goto parseerror;</div><div class='del'>-  *cur=0; cur++;</div><div class='del'>-  /* second, the port */</div><div class='del'>-  while (cur&lt;last &amp;&amp; isblank(*cur)) cur++;</div><div class='del'>-  while (cur&lt;last &amp;&amp; isdigit(*cur)) {</div><div class='del'>-    se.s_port=se.s_port*10+*cur-'0';</div><div class='del'>-    cur++;</div><div class='del'>-  }</div><div class='del'>-  se.s_port=htons(se.s_port);</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  /* third, "/tcp" or "/udp" */</div><div class='del'>-  if (*cur!='/') goto parseerror;</div><div class='del'>-  cur++;</div><div class='del'>-  se.s_proto=cur;</div><div class='del'>-  while (cur&lt;last &amp;&amp; isalpha(*cur)) ++cur;</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='\n') { *cur++=0; return &amp;se; }</div><div class='del'>-  *cur=0; cur++;</div><div class='del'>-  /* now the aliases */</div><div class='del'>-  for (aliasidx=0;aliasidx&lt;10;++aliasidx) {</div><div class='del'>-    while (cur&lt;last &amp;&amp; isblank(*cur)) ++cur;</div><div class='del'>-    aliases[aliasidx]=cur;</div><div class='del'>-    while (cur&lt;last &amp;&amp; isalpha(*cur)) ++cur;</div><div class='del'>-    if (*cur=='\n') { *cur++=0; ++aliasidx; break; }</div><div class='del'>-    if (cur&gt;=last || !isblank(*cur)) break;</div><div class='del'>-    *cur++=0;</div><div class='del'>-  }</div><div class='del'>-  aliases[aliasidx]=0;</div><div class='del'>-  return &amp;se;</div><div class='del'>-parseerror:</div><div class='del'>-  while (cur&lt;last &amp;&amp; *cur!='\n') cur++;</div><div class='del'>-  cur++;</div><div class='del'>-  goto again;</div><div class='del'>-error:</div><div class='del'>-  if (servicesmap!=(char*)-1) munmap(servicesmap,serviceslen);</div><div class='del'>-  if (servicesfd!=-1) close(servicesfd);</div><div class='del'>-  servicesmap=(char*)-1;</div><div class='del'>-  servicesfd=-1;</div><div class='del'>-  errno=ENOMEM;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setservent(int stayopen) {</div><div class='del'>-  cur=servicesmap;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct servent *getservbyname(const char *name, const char *proto) {</div><div class='del'>-  struct servent *s;</div><div class='del'>-  setservent(0);</div><div class='del'>-  for (s=getservent(); s; s=getservent()) {</div><div class='del'>-    char **tmp;</div><div class='del'>-#if 0</div><div class='del'>-    write(1,"found ",6);</div><div class='del'>-    write(1,s-&gt;s_name,strlen(s-&gt;s_name));</div><div class='del'>-    write(1,"/",1);</div><div class='del'>-    write(1,s-&gt;s_proto,strlen(s-&gt;s_proto));</div><div class='del'>-    write(1,"\n",1);</div><div class='del'>-    if (!strcmp(name,"auth")) {</div><div class='del'>-      tmp=s-&gt;s_aliases;</div><div class='del'>-      write(1,"  aka ",5);</div><div class='del'>-      while (*tmp) {</div><div class='del'>-	write(1,*tmp,strlen(*tmp));</div><div class='del'>-	write(1,", ",2);</div><div class='del'>-	++tmp;</div><div class='del'>-      }</div><div class='del'>-      write(1,"\n",1);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    if (!strcmp(name,s-&gt;s_name) &amp;&amp; !strcmp(proto,s-&gt;s_proto))</div><div class='del'>-      return s;</div><div class='del'>-    tmp=s-&gt;s_aliases;</div><div class='del'>-    while (*tmp)</div><div class='del'>-      if (!strcmp(name,*tmp++)) return s;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct servent *getservbyport(int port, const char *proto) {</div><div class='del'>-  struct servent *s;</div><div class='del'>-  for (s=getservent(); s; s=getservent()) {</div><div class='del'>-    if (port==s-&gt;s_port &amp;&amp; !strcmp(proto,s-&gt;s_proto))</div><div class='del'>-      return s;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void endservent(void) {</div><div class='del'>-  if (servicesmap!=(char*)-1) munmap(servicesmap,serviceslen);</div><div class='del'>-  if (servicesfd!=-1) close(servicesfd);</div><div class='del'>-  servicesmap=(char*)-1;</div><div class='del'>-  servicesfd=-1;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getsockname.c b/mdk-stage1/dietlibc/lib/getsockname.c<br/>deleted file mode 100644<br/>index 61a3ea24a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getsockname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getsockname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int getsockname(int a, void * b, int c) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_GETSOCKNAME, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c };</div><div class='del'>-  return socketcall(SYS_GETSOCKNAME, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/getsockopt.c b/mdk-stage1/dietlibc/lib/getsockopt.c<br/>deleted file mode 100644<br/>index 8c0a57557..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/getsockopt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/getsockopt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int getsockopt(int a, int b, int c, void *d, int e) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_GETSOCKOPT, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, b, c, (long)d, e };</div><div class='del'>-  return socketcall(SYS_GETSOCKOPT, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/htonl.c b/mdk-stage1/dietlibc/lib/htonl.c<br/>deleted file mode 100644<br/>index 490de42c4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/htonl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/htonl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned long int htonl(unsigned long int hostlong) {</div><div class='del'>-#if __BYTE_ORDER==__LITTLE_ENDIAN</div><div class='del'>-  return (hostlong&gt;&gt;24) | ((hostlong&amp;0xff0000)&gt;&gt;8) |</div><div class='del'>-	  ((hostlong&amp;0xff00)&lt;&lt;8) | (hostlong&lt;&lt;24);</div><div class='del'>-#else</div><div class='del'>-  return hostlong;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long int ntohl(unsigned long int hostlong) __attribute__((weak,alias("htonl")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/htons.c b/mdk-stage1/dietlibc/lib/htons.c<br/>deleted file mode 100644<br/>index 765d3bbc5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/htons.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/htons.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned short int htons(unsigned short int hostshort) {</div><div class='del'>-#if __BYTE_ORDER==__LITTLE_ENDIAN</div><div class='del'>-  return ((hostshort&gt;&gt;8)&amp;0xff) | (hostshort&lt;&lt;8);</div><div class='del'>-#else</div><div class='del'>-  return hostshort;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned short int ntohs(unsigned short int hostshort) __attribute__((weak,alias("htons")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/if_indextoname.c b/mdk-stage1/dietlibc/lib/if_indextoname.c<br/>deleted file mode 100644<br/>index e683755f6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/if_indextoname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/if_indextoname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef SOCK_DGRAM</div><div class='del'>-#define SOCK_DGRAM 2</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-char* if_indextoname(unsigned int interface,char* blub) {</div><div class='del'>-  struct ifreq ifr;</div><div class='del'>-  int fd;</div><div class='del'>-</div><div class='del'>-  fd=socket(AF_INET6,SOCK_DGRAM,0);</div><div class='del'>-  if (fd&lt;0) fd=socket(AF_INET,SOCK_DGRAM,0);</div><div class='del'>-  ifr.ifr_ifindex=interface;</div><div class='del'>-  if (ioctl(fd,SIOCGIFNAME,&amp;ifr)==0) {</div><div class='del'>-    int i;</div><div class='del'>-    close(fd);</div><div class='del'>-    for (i=0; i&lt;IFNAMSIZ-1; i++)</div><div class='del'>-      if (!(blub[i]=ifr.ifr_name[i]))</div><div class='del'>-	return blub;</div><div class='del'>-    blub[i]=0;</div><div class='del'>-    return blub;</div><div class='del'>-  }</div><div class='del'>-  close(fd);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/if_nametoindex.c b/mdk-stage1/dietlibc/lib/if_nametoindex.c<br/>deleted file mode 100644<br/>index 5923963b1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/if_nametoindex.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/if_nametoindex.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef SOCK_DGRAM</div><div class='del'>-#define SOCK_DGRAM 2</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int if_nametoindex(char* blub) {</div><div class='del'>-  struct ifreq ifr;</div><div class='del'>-  int fd;</div><div class='del'>-  char *tmp;</div><div class='del'>-  int len=sizeof(ifr.ifr_name);</div><div class='del'>-  fd=socket(AF_INET6,SOCK_DGRAM,0);</div><div class='del'>-  if (fd&lt;0) fd=socket(AF_INET,SOCK_DGRAM,0);</div><div class='del'>-  for (tmp=ifr.ifr_name; len&gt;0; --len) {</div><div class='del'>-    if ((*tmp++=*blub++)==0) break;</div><div class='del'>-  }</div><div class='del'>-  if (ioctl(fd,SIOCGIFINDEX,&amp;ifr)==0) {</div><div class='del'>-    close(fd);</div><div class='del'>-    return ifr.ifr_ifindex;</div><div class='del'>-  }</div><div class='del'>-  close(fd);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isalnum.c b/mdk-stage1/dietlibc/lib/isalnum.c<br/>deleted file mode 100644<br/>index 4d363fab9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isalnum.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isalnum.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __isalnum_ascii(int c) {</div><div class='del'>-  return isalpha(c) || isdigit(c);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isalnum(int c) __attribute__((weak,alias("__isalnum_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isalpha.c b/mdk-stage1/dietlibc/lib/isalpha.c<br/>deleted file mode 100644<br/>index 07ea69696..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isalpha.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isalpha.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __isalpha_ascii(int c) {</div><div class='del'>-  return (c&gt;='a' &amp;&amp; c&lt;='z') || (c&gt;='A' &amp;&amp; c&lt;='Z');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isalpha(int c) __attribute__((weak,alias("__isalpha_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isascii.c b/mdk-stage1/dietlibc/lib/isascii.c<br/>deleted file mode 100644<br/>index e06994783..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isascii.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isascii.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int isascii(int c) {</div><div class='del'>-  return (c &amp; 0x80) == 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isatty.c b/mdk-stage1/dietlibc/lib/isatty.c<br/>deleted file mode 100644<br/>index b31609720..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isatty.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isatty.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#define ioctl libc_ioctl</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#undef ioctl</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-int isatty(int fd)</div><div class='del'>-{</div><div class='del'>-  int save;</div><div class='del'>-  int is_tty;</div><div class='del'>-  struct termios term;</div><div class='del'>-</div><div class='del'>-  save = errno;</div><div class='del'>-  is_tty = ioctl(fd, TCGETS, &amp;term) == 0;</div><div class='del'>-  errno = save;</div><div class='del'>-</div><div class='del'>-  return is_tty;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isblank.c b/mdk-stage1/dietlibc/lib/isblank.c<br/>deleted file mode 100644<br/>index 034e543b1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isblank.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isblank.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int isblank(int ch)</div><div class='del'>-{</div><div class='del'>-  return ((ch==' ')||(ch=='\t'));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/iscntrl.c b/mdk-stage1/dietlibc/lib/iscntrl.c<br/>deleted file mode 100644<br/>index a183a54f1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/iscntrl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/iscntrl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __iscntrl_ascii(int c) {</div><div class='del'>-  return (c&lt;32) || (c==127);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int iscntrl(int c) __attribute__((weak,alias("__iscntrl_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isdigit.c b/mdk-stage1/dietlibc/lib/isdigit.c<br/>deleted file mode 100644<br/>index 8a7c3e801..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isdigit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isdigit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __isdigit_ascii(int c) {</div><div class='del'>-  return (c&gt;='0' &amp;&amp; c&lt;='9');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isdigit(int c) __attribute__((weak,alias("__isdigit_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isgraph.c b/mdk-stage1/dietlibc/lib/isgraph.c<br/>deleted file mode 100644<br/>index 807f90ff0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isgraph.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isgraph.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-int __isgraph_ascii(int c) {</div><div class='del'>-  return (c&gt;=33 &amp;&amp; c&lt;=126);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isgraph(int c) __attribute__((weak,alias("__isgraph_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/islower.c b/mdk-stage1/dietlibc/lib/islower.c<br/>deleted file mode 100644<br/>index 6a9afa519..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/islower.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/islower.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __islower_ascii(int c) {</div><div class='del'>-  return (c&gt;='a' &amp;&amp; c&lt;='z');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int islower(int c) __attribute__((weak,alias("__islower_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isprint.c b/mdk-stage1/dietlibc/lib/isprint.c<br/>deleted file mode 100644<br/>index e980658a5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isprint.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isprint.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-</div><div class='del'>-int __isprint_ascii(int c) {</div><div class='del'>-  return (c&gt;=32 &amp;&amp; c&lt;=126);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isprint(int c) __attribute__((weak,alias("__isprint_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/ispunct.c b/mdk-stage1/dietlibc/lib/ispunct.c<br/>deleted file mode 100644<br/>index 2fd1183b1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/ispunct.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/ispunct.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __ispunct_ascii(int c) {</div><div class='del'>-  return isprint(c) &amp;&amp; !( isalnum(c) || isspace(c) );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int ispunct(int c) __attribute__((weak,alias("__ispunct_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isspace.c b/mdk-stage1/dietlibc/lib/isspace.c<br/>deleted file mode 100644<br/>index 916f784ab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isspace.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isspace.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __isspace_ascii(int ch)</div><div class='del'>-{</div><div class='del'>-  return ((ch==' ')||(ch=='\f')||(ch=='\t')||(ch=='\v')||(ch=='\r')||(ch=='\n'));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isspace(int c) __attribute__((weak,alias("__isspace_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isupper.c b/mdk-stage1/dietlibc/lib/isupper.c<br/>deleted file mode 100644<br/>index 933dfc169..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isupper.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isupper.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int __isupper_ascii(int c) {</div><div class='del'>-  return (c&gt;='A' &amp;&amp; c&lt;='Z');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isupper(int c) __attribute__((weak,alias("__isupper_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/isxdigit.c b/mdk-stage1/dietlibc/lib/isxdigit.c<br/>deleted file mode 100644<br/>index 22a711f2d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/isxdigit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/isxdigit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-int __isxdigit_ascii(int c) {</div><div class='del'>-  return ((c&gt;='0'&amp;&amp;c&lt;='9') || (c&gt;='A'&amp;&amp;c&lt;='F') || (c&gt;='a'&amp;&amp;c&lt;='f'));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int isxdigit(int c) __attribute__((weak,alias("__isxdigit_ascii")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/listen.c b/mdk-stage1/dietlibc/lib/listen.c<br/>deleted file mode 100644<br/>index 56a51be06..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/listen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/listen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int listen(int a, int b) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_LISTEN, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, b, 0 };</div><div class='del'>-  return socketcall(SYS_LISTEN, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/lockf.c b/mdk-stage1/dietlibc/lib/lockf.c<br/>deleted file mode 100644<br/>index 2b1d004ef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/lockf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/lockf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-int lockf(int fd, int cmd, off_t len) {</div><div class='del'>-  struct flock fl;</div><div class='del'>-  fl.l_whence=SEEK_CUR;</div><div class='del'>-  fl.l_start=0;</div><div class='del'>-  fl.l_len=len;</div><div class='del'>-  fl.l_pid=0;</div><div class='del'>-  switch (cmd) {</div><div class='del'>-  case F_TEST:</div><div class='del'>-    if (fcntl(fd,F_GETLK,&amp;fl)&lt;0)</div><div class='del'>-      return -1;</div><div class='del'>-    if (fl.l_type == F_UNLCK || fl.l_pid == getpid ())</div><div class='del'>-      return 0;</div><div class='del'>-    errno=EACCES;</div><div class='del'>-    return -1;</div><div class='del'>-  case F_ULOCK:</div><div class='del'>-    fl.l_type=F_UNLCK;</div><div class='del'>-    cmd=F_SETLK;</div><div class='del'>-    break;</div><div class='del'>-  case F_LOCK:</div><div class='del'>-    fl.l_type = F_WRLCK;</div><div class='del'>-    cmd = F_SETLKW;</div><div class='del'>-    break;</div><div class='del'>-  case F_TLOCK:</div><div class='del'>-    fl.l_type = F_WRLCK;</div><div class='del'>-    cmd = F_SETLK;</div><div class='del'>-    break;</div><div class='del'>-  default:</div><div class='del'>-    errno=EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  return fcntl(fd,cmd,&amp;fl);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/longjmp.c b/mdk-stage1/dietlibc/lib/longjmp.c<br/>deleted file mode 100644<br/>index d0a5719c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/longjmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/longjmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-/* Copyright (C) 1991, 92, 94, 95, 97, 98 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-/* #include &lt;stddef.h&gt; */</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __sigprocmask(int how,void* set,void* oldset);</div><div class='del'>-extern void __longjmp(void* env, int val);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-extern void _longjmp_unwind (jmp_buf env, int val);</div><div class='del'>-*/</div><div class='del'>-/* Set the signal mask to the one specified in ENV, and jump</div><div class='del'>-   to the position specified in ENV, causing the setjmp</div><div class='del'>-   call there to return VAL, or 1 if VAL is 0.  */</div><div class='del'>-void __siglongjmp (sigjmp_buf env, int val)</div><div class='del'>-{</div><div class='del'>-  /* Perform any cleanups needed by the frames being unwound.  */</div><div class='del'>-  /*</div><div class='del'>-  _longjmp_unwind (env, val);</div><div class='del'>-  */</div><div class='del'>-</div><div class='del'>-  if (env[0].__mask_was_saved)</div><div class='del'>-    /* Restore the saved signal mask.  */</div><div class='del'>-    (void) __sigprocmask (SIG_SETMASK, &amp;env[0].__saved_mask,</div><div class='del'>-			  (sigset_t *) NULL);</div><div class='del'>-</div><div class='del'>-  /* Call the machine-dependent function to restore machine state.  */</div><div class='del'>-  __longjmp (env[0].__jmpbuf, val ?: 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void siglongjmp (sigjmp_buf env, int val) __attribute__((weak,alias("__siglongjmp")));</div><div class='del'>-void longjmp (sigjmp_buf env, int val) __attribute__((weak,alias("__siglongjmp")));</div><div class='del'>-void _longjmp (sigjmp_buf env, int val) __attribute__((weak,alias("__siglongjmp")));</div><div class='del'>-void __libc_longjmp (sigjmp_buf env, int val) __attribute__((weak,alias("__siglongjmp")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/lseek64.c b/mdk-stage1/dietlibc/lib/lseek64.c<br/>deleted file mode 100644<br/>index f39e779f9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/lseek64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/lseek64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-loff_t lseek64(int fildes, loff_t offset, int whence) {</div><div class='del'>-  loff_t tmp;</div><div class='del'>-  if (llseek(fildes,offset&gt;&gt;32,offset&amp;0xffffffff,&amp;tmp,whence)) {</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    if (*__errno_location()!=ENOSYS) return -1;</div><div class='del'>-#else</div><div class='del'>-    if (errno!=ENOSYS) return -1;</div><div class='del'>-#endif</div><div class='del'>-    return (loff_t)lseek(fildes,(off_t)offset,whence);</div><div class='del'>-  }</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memccmp.c b/mdk-stage1/dietlibc/lib/memccmp.c<br/>deleted file mode 100644<br/>index 3a8c14f60..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memccmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memccmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#define _POSIX_SOURCE</div><div class='del'>-#define _XOPEN_SOURCE</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-int memccmp(const void *dst, const void *src, int c, size_t count)</div><div class='del'>-{</div><div class='del'>-  register const char *a = dst;</div><div class='del'>-  register const char *b = src;</div><div class='del'>-  while (count--)</div><div class='del'>-  {</div><div class='del'>-    register int res=(*a - *b);</div><div class='del'>-    if (res) return res;</div><div class='del'>-    if (*a==c) return 0;</div><div class='del'>-    ++a; ++b;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memccpy.c b/mdk-stage1/dietlibc/lib/memccpy.c<br/>deleted file mode 100644<br/>index 6d6ac98ab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memccpy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memccpy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#define _POSIX_SOURCE</div><div class='del'>-#define _XOPEN_SOURCE</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-void *memccpy(void *dst, const void *src, int c, size_t count)</div><div class='del'>-{</div><div class='del'>-  char *a = dst;</div><div class='del'>-  const char *b = src;</div><div class='del'>-  while (count--)</div><div class='del'>-  {</div><div class='del'>-    *a++ = *b;</div><div class='del'>-    if (*b==c)</div><div class='del'>-    {</div><div class='del'>-      return (void *)a;</div><div class='del'>-    }</div><div class='del'>-    b++;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memchr.c b/mdk-stage1/dietlibc/lib/memchr.c<br/>deleted file mode 100644<br/>index 93d81328a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memchr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memchr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-char *memchr(const char *s, int c, size_t n) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=n; i; --i)</div><div class='del'>-    if (*s++==c)</div><div class='del'>-      return (char*)s;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memcmp.c b/mdk-stage1/dietlibc/lib/memcmp.c<br/>deleted file mode 100644<br/>index c05a46863..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memcmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memcmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-int memcmp(const void *dst, const void *src, size_t count) {</div><div class='del'>-  register int r;</div><div class='del'>-  register const char *d=dst;</div><div class='del'>-  register const char *s=src;</div><div class='del'>-  while (count--) {</div><div class='del'>-    if ((r=(*d - *s)))</div><div class='del'>-      return r;</div><div class='del'>-    ++d;</div><div class='del'>-    ++s;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int bcmp(const char *a,const char *b,size_t c)	__attribute__((weak,alias("memcmp")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memcpy.c b/mdk-stage1/dietlibc/lib/memcpy.c<br/>deleted file mode 100644<br/>index 0c688b509..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memcpy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memcpy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-void* memcpy(void* dst, const void* src, size_t count) {</div><div class='del'>-  register char *d=dst;</div><div class='del'>-  register const char *s=src;</div><div class='del'>-  ++count;	/* this actually produces better code than using count-- */</div><div class='del'>-  while (--count) {</div><div class='del'>-    *d = *s;</div><div class='del'>-    ++d; ++s;</div><div class='del'>-  }</div><div class='del'>-  return dst;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memmove.c b/mdk-stage1/dietlibc/lib/memmove.c<br/>deleted file mode 100644<br/>index 7adb2be91..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memmove.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memmove.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#define _POSIX_SOURCE</div><div class='del'>-#define _XOPEN_SOURCE</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-void *memmove(void *dst, const void *src, size_t count)</div><div class='del'>-{</div><div class='del'>-  char *a = dst;</div><div class='del'>-  const char *b = src;</div><div class='del'>-  if (src!=dst)</div><div class='del'>-  {</div><div class='del'>-    if (src&gt;dst)</div><div class='del'>-    {</div><div class='del'>-      while (count--) *a++ = *b++;</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-    {</div><div class='del'>-      a+=count-1;</div><div class='del'>-      b+=count-1;</div><div class='del'>-      while (count--) *a-- = *b--;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return dst;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/memset.c b/mdk-stage1/dietlibc/lib/memset.c<br/>deleted file mode 100644<br/>index 5f9ae49ee..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/memset.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/memset.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-void * memset(void * dst, int s, size_t count) {</div><div class='del'>-    register char * a = dst;</div><div class='del'>-    count++;	/* this actually creates smaller code than using count-- */</div><div class='del'>-    while (--count)</div><div class='del'>-	*a++ = s;</div><div class='del'>-    return dst;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/mkfifo.c b/mdk-stage1/dietlibc/lib/mkfifo.c<br/>deleted file mode 100644<br/>index 596efbe27..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/mkfifo.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/mkfifo.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;linux/stat.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-int mkfifo(const char *fn,mode_t mode) {</div><div class='del'>-  return mknod(fn,S_IFIFO|mode,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/msgctl.c b/mdk-stage1/dietlibc/lib/msgctl.c<br/>deleted file mode 100644<br/>index 19ea6d8cf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/msgctl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/msgctl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/msg.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int msgctl(int msqid, int cmd, struct msqid_ds *buf) {</div><div class='del'>-  return __ipc(MSGCTL,msqid,cmd,0,buf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/msgget.c b/mdk-stage1/dietlibc/lib/msgget.c<br/>deleted file mode 100644<br/>index 9bca09ebe..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/msgget.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/msgget.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/msg.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int msgget(key_t key,int flag) {</div><div class='del'>-  return __ipc(MSGGET,key,flag,0,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/msgrcv.c b/mdk-stage1/dietlibc/lib/msgrcv.c<br/>deleted file mode 100644<br/>index b4ae9cc6c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/msgrcv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/msgrcv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/msg.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int msgrcv(int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg) {</div><div class='del'>-  struct ipc_kludge tmp;</div><div class='del'>-  tmp.msgp = msgp;</div><div class='del'>-  tmp.msgtyp = msgtyp;</div><div class='del'>-  return __ipc(MSGRCV,msqid, msgsz, msgflg, &amp;tmp);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/msgsnd.c b/mdk-stage1/dietlibc/lib/msgsnd.c<br/>deleted file mode 100644<br/>index 6203053f0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/msgsnd.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/msgsnd.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/msg.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) {</div><div class='del'>-  return __ipc(MSGSND,msqid, msgsz, msgflg, msgp);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/nop.c b/mdk-stage1/dietlibc/lib/nop.c<br/>deleted file mode 100644<br/>index c05bea813..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/nop.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/nop.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-</div><div class='del'>-int __fflush_stdin()	 __attribute__((weak,alias("__return0")));</div><div class='del'>-int __fflush_stdout()	 __attribute__((weak,alias("__return0")));</div><div class='del'>-int __fflush_stderr()	 __attribute__((weak,alias("__return0")));</div><div class='del'>-</div><div class='del'>-/* used for weak aliases */</div><div class='del'>-int __return0() { return 0; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/open64.c b/mdk-stage1/dietlibc/lib/open64.c<br/>deleted file mode 100644<br/>index f1499d017..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/open64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/open64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef O_LARGEFILE</div><div class='del'>-#define O_LARGEFILE 0</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern int open(const char* file,int oflag,int mode);</div><div class='del'>-</div><div class='del'>-int __libc_open64(const char* file,int oflag,int mode) {</div><div class='del'>-  return open(file,oflag|O_LARGEFILE,mode);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int open64(const char* file,int oflag,int mode) __attribute__((weak,alias("__libc_open64")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/opendir.c b/mdk-stage1/dietlibc/lib/opendir.c<br/>deleted file mode 100644<br/>index 5c0c4a305..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/opendir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/opendir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-DIR *opendir (const char *name) {</div><div class='del'>-  DIR *t=(DIR*)malloc(sizeof(DIR));</div><div class='del'>-  if (t) {</div><div class='del'>-    if ((t-&gt;fd=open(name,O_RDONLY|O_DIRECTORY))&gt;=0) {</div><div class='del'>-      t-&gt;num=t-&gt;cur=0;</div><div class='del'>-    } else {</div><div class='del'>-      free(t);</div><div class='del'>-      t=0;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return t;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/perror.c b/mdk-stage1/dietlibc/lib/perror.c<br/>deleted file mode 100644<br/>index ecab7250b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/perror.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/perror.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern char *sys_errlist[];</div><div class='del'>-extern int sys_nerr;</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-void perror(const char *s) {</div><div class='del'>-  register char *message="[unknown error]";</div><div class='del'>-  write(2,s,strlen(s));</div><div class='del'>-  write(2,": ",2);</div><div class='del'>-  if (errno&gt;=0 &amp;&amp; errno&lt;sys_nerr)</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    message=sys_errlist[*__errno_location()];</div><div class='del'>-#else</div><div class='del'>-    message=sys_errlist[errno];</div><div class='del'>-#endif</div><div class='del'>-  write(2,message,strlen(message));</div><div class='del'>-  write(2,"\n",1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/pread.c b/mdk-stage1/dietlibc/lib/pread.c<br/>deleted file mode 100644<br/>index b922aa93e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/pread.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/pread.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-extern size_t __pread(int fd, void *buf, size_t count, off_t a,off_t b);</div><div class='del'>-</div><div class='del'>-size_t __libc_pread(int fd, void *buf, size_t count, off_t offset) {</div><div class='del'>-  return __pread(fd,buf,count,offset,0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int pread(int fd, void *buf, size_t count, off_t offset) __attribute__((weak,alias("__libc_pread")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/pread64.c b/mdk-stage1/dietlibc/lib/pread64.c<br/>deleted file mode 100644<br/>index e6ba4d103..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/pread64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/pread64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef __NO_STAT64</div><div class='del'>-extern size_t __pread(int fd, void *buf, size_t count, off_t a,off_t b);</div><div class='del'>-</div><div class='del'>-size_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) {</div><div class='del'>-  return __pread(fd,buf,count,__LONG_LONG_PAIR (offset&amp;0xffffffff,offset&gt;&gt;32));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int pread64(int fd, void *buf, size_t count, off_t offset) __attribute__((weak,alias("__libc_pread64")));</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/putenv.c b/mdk-stage1/dietlibc/lib/putenv.c<br/>deleted file mode 100644<br/>index 274b16b0e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/putenv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/putenv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int putenv(const char *string) {</div><div class='del'>-  int len;</div><div class='del'>-  int envc;</div><div class='del'>-  char *tmp;</div><div class='del'>-  const char **ep;</div><div class='del'>-  char **newenv;</div><div class='del'>-  static char **origenv=0;</div><div class='del'>-  if (!origenv) origenv=environ;</div><div class='del'>-  if (!(tmp=strchr(string,'=')))</div><div class='del'>-    len=strlen(string);</div><div class='del'>-  else</div><div class='del'>-    len=tmp-string+1;</div><div class='del'>-  for (envc=0, ep=(const char**)environ; *ep; ++ep) {</div><div class='del'>-    if (!memcmp(string,*ep,len)) { /* found */</div><div class='del'>-      if (!tmp) {</div><div class='del'>-	for (; ep[1]; ++ep) ep[0]=ep[1];</div><div class='del'>-	ep[0]=0;</div><div class='del'>-	return 0;</div><div class='del'>-      }</div><div class='del'>-      *ep=string;</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-    ++envc;</div><div class='del'>-  }</div><div class='del'>-  if (tmp) {</div><div class='del'>-    newenv=(char**)malloc((envc+2)*sizeof(char*));</div><div class='del'>-    if (!newenv) return -1;</div><div class='del'>-    newenv[0]=(char*)string;</div><div class='del'>-    memcpy(newenv+1,environ,(envc+1)*sizeof(char*));</div><div class='del'>-    if (environ!=origenv) free(environ);</div><div class='del'>-    environ=newenv;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/puts.c b/mdk-stage1/dietlibc/lib/puts.c<br/>deleted file mode 100644<br/>index 54415151d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/puts.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/puts.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-int puts(const char *s) {</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  return fwrite(s,1,strlen(s),stdout) &amp;&amp; fputc('\n',stdout);</div><div class='del'>-#else</div><div class='del'>-  return write(1,s,strlen(s)) &amp;&amp; write(1,"\n",1);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/qsort.c b/mdk-stage1/dietlibc/lib/qsort.c<br/>deleted file mode 100644<br/>index 2a8824bf3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/qsort.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/qsort.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,125 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-/* comments:</div><div class='del'>-     1. insertion sort sofort, nicht nachträglich</div><div class='del'>-     2. threshold = 16</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static inline void iswap(void *a,void *b,size_t size) {</div><div class='del'>-  register char *x=a;</div><div class='del'>-  register char *y=b;</div><div class='del'>-  register char *z=x+size;</div><div class='del'>-  while (x&lt;z) {</div><div class='del'>-    register char tmp=*x;</div><div class='del'>-    *x=*y;</div><div class='del'>-    *y=tmp;</div><div class='del'>-    ++x; ++y;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline void swap(void *base,size_t size,size_t a,size_t b) {</div><div class='del'>-  iswap(base+a*size,base+b*size,size);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-extern int array[];</div><div class='del'>-</div><div class='del'>-void dumparray() {</div><div class='del'>-  printf("array now {%d,%d,%d,%d,%d}\n",array[0],array[1],array[2],array[3],array[4]);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void isort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {</div><div class='del'>-  int i;</div><div class='del'>-  while (nmemb&gt;1) {</div><div class='del'>-    char *min=base;</div><div class='del'>-    char *tmp=min+size;</div><div class='del'>-    for (i=1; i&lt;nmemb; ++i) {</div><div class='del'>-      if (compar(tmp,min)&lt;0)</div><div class='del'>-	min=tmp;</div><div class='del'>-      tmp+=size;</div><div class='del'>-    }</div><div class='del'>-    iswap(min,base,size);</div><div class='del'>-    base+=size;</div><div class='del'>-    nmemb-=1;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  char *dbase=base;</div><div class='del'>-  char *dmax=base+(nmemb-1)*size;</div><div class='del'>-  char dmemb=nmemb;</div><div class='del'>-#endif</div><div class='del'>-  static int level=0;</div><div class='del'>-  char* v;	/* pivot */</div><div class='del'>-  char* mid, *max, *min;</div><div class='del'>-  int lmemb;</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-  int left,right;</div><div class='del'>-  left=(int*)base-array;</div><div class='del'>-  right=left+nmemb-1;</div><div class='del'>-  ++level;</div><div class='del'>-  { int i; for (i=0; i&lt;level; ++i) printf("  "); }</div><div class='del'>-  printf("qsort: level %d; base=%p, %dx%d; array[%d..%d]\n",level,base,nmemb,size,left,right);</div><div class='del'>-  assert(left&gt;=0 &amp;&amp; right&lt;=1000);</div><div class='del'>-#endif</div><div class='del'>-  if (nmemb&lt;=8) {</div><div class='del'>-    --level;</div><div class='del'>-    return isort(base,nmemb,size,compar);</div><div class='del'>-  }</div><div class='del'>-  {</div><div class='del'>-    mid=base+(nmemb/2)*size;</div><div class='del'>-    max=base+(nmemb-1)*size;</div><div class='del'>-</div><div class='del'>-    if (compar(base,max)&lt;0)	/* a[left] &lt; a[right] */</div><div class='del'>-      if (compar(base,mid)&lt;0)	/* a[left] &lt; a[med] */</div><div class='del'>-	if (compar(max,mid)&lt;0)	/* a[left] &lt; a[right] &lt; a[med] */</div><div class='del'>-	  v=max;</div><div class='del'>-	else			/* a[left] &lt; a[med] &lt; a[right] */</div><div class='del'>-	  v=mid;</div><div class='del'>-      else			/* a[med] &lt; a[left] &lt; a[right] */</div><div class='del'>-	v=base;</div><div class='del'>-    else			/* a[right] &lt; a[left] */</div><div class='del'>-      if (compar(base,mid)&lt;0)	/* a[right] &lt; a[left] &lt; a[med] */</div><div class='del'>-	v=base;</div><div class='del'>-      else			/* a[right] &lt; a[left] &amp;&amp; a[med] &lt; a[left] */</div><div class='del'>-	if (compar(max,mid)&lt;0)	/* a[right] &lt; a[med] &lt; a[left] */</div><div class='del'>-	  v=mid;</div><div class='del'>-	else</div><div class='del'>-	  v=max;</div><div class='del'>-//    printf("%d %d %d -&gt; median %d\n",*(int*)base,*(int*)mid,*(int*)max,*(int*)v);</div><div class='del'>-  }</div><div class='del'>-  if (v != max)</div><div class='del'>-    iswap(v,max,size);</div><div class='del'>-  v=max;</div><div class='del'>-  min=base; lmemb=0;</div><div class='del'>-  for (;;) {</div><div class='del'>-    while (compar(min,v)&lt;0) { min+=size; ++lmemb; }</div><div class='del'>-    while (compar(max-=size,v)&gt;0) ;</div><div class='del'>-    if (min&gt;=max) break;</div><div class='del'>-    iswap(min,max,size);</div><div class='del'>-  }</div><div class='del'>-  iswap(min,v,size);</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-//    { int i; for (i=0; i&lt;level; ++i) printf("  "); }</div><div class='del'>-//    printf("-=&lt; base=%p, min=%p, nmemb=%d, lmemb=%d (%d)\n",base,min,nmemb,lmemb,(min-(char*)base)/size);</div><div class='del'>-    assert(lmemb==((min-(char*)base)/size));</div><div class='del'>-#endif</div><div class='del'>-  if (min&gt;(char*)base+size) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-    assert(base==dbase);</div><div class='del'>-#endif</div><div class='del'>-//    { int i; for (i=0; i&lt;level; ++i) printf("  "); }</div><div class='del'>-//    printf("+-left %d [%d..%d] of [%d..%d]\n",level+1,left,left+lmemb,left,right);</div><div class='del'>-    qsort(base,lmemb,size,compar);</div><div class='del'>-  }</div><div class='del'>-  if (nmemb&gt;lmemb+1) {</div><div class='del'>-//    { int i; for (i=0; i&lt;level; ++i) printf("  "); }</div><div class='del'>-//    printf("+-right %d [%d..%d] of [%d..%d]\n",level+1,left+lmemb,right,left,right);</div><div class='del'>-    qsort(min+size,nmemb-lmemb-1,size,compar);</div><div class='del'>-  }</div><div class='del'>-  --level;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/raise.c b/mdk-stage1/dietlibc/lib/raise.c<br/>deleted file mode 100644<br/>index 606546034..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/raise.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/raise.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-int raise(int sig) {</div><div class='del'>-  return kill(getpid(),sig);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/rand.c b/mdk-stage1/dietlibc/lib/rand.c<br/>deleted file mode 100644<br/>index 10bfaf94d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/rand.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/rand.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-static unsigned int seed=1;</div><div class='del'>-</div><div class='del'>-int rand() {</div><div class='del'>-  return ((seed = seed * 1103515245 + 12345) % ((unsigned int)RAND_MAX + 1));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void srand(unsigned int i) { seed=i; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/random.c b/mdk-stage1/dietlibc/lib/random.c<br/>deleted file mode 100644<br/>index e7785c455..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/random.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/random.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-static unsigned int seed=1;</div><div class='del'>-</div><div class='del'>-long int random() {</div><div class='del'>-  return ((seed = seed * 1103515245 + 12345) % ((unsigned int)RAND_MAX + 1));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void srandom(unsigned int i) { seed=i; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/readdir.c b/mdk-stage1/dietlibc/lib/readdir.c<br/>deleted file mode 100644<br/>index 689f5d08b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/readdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/readdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct dirent* readdir(DIR *d) {</div><div class='del'>-  if (!d-&gt;num || (d-&gt;cur += ((struct dirent*)(d-&gt;buf+d-&gt;cur))-&gt;d_reclen)&gt;=d-&gt;num) {</div><div class='del'>-    int res=getdents(d-&gt;fd,(struct dirent*)d-&gt;buf,1023);</div><div class='del'>-    if (res&lt;=0) return 0;</div><div class='del'>-    d-&gt;num=res; d-&gt;cur=0;</div><div class='del'>-  }</div><div class='del'>-  return (struct dirent*)(d-&gt;buf+d-&gt;cur);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/reboot.c b/mdk-stage1/dietlibc/lib/reboot.c<br/>deleted file mode 100644<br/>index 7f47a95dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/reboot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/reboot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;sys/reboot.h&gt;</div><div class='del'>-</div><div class='del'>-int __reboot(int magic1, int magic2, int cmd, void * arg);</div><div class='del'>-</div><div class='del'>-int reboot(int cmd, void *arg)</div><div class='del'>-{</div><div class='del'>-  return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, arg);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/recv.c b/mdk-stage1/dietlibc/lib/recv.c<br/>deleted file mode 100644<br/>index bc6b1e5d7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/recv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/recv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_recv(int a, const void * b, size_t c, int flags) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_RECV,(long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c, flags };</div><div class='del'>-  return socketcall(SYS_RECV, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int recv(int a, const void * b, size_t c, int flags)</div><div class='del'>-  __attribute__ ((weak, alias("__libc_recv")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/recvfrom.c b/mdk-stage1/dietlibc/lib/recvfrom.c<br/>deleted file mode 100644<br/>index 802ad665f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/recvfrom.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/recvfrom.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_recvfrom(int a, const void * b, size_t c, int flags, void *to, void *tolen) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_RECVFROM, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c, flags, (long) to, (long) tolen };</div><div class='del'>-  return socketcall(SYS_RECVFROM, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int recvfrom(int a, const void * b, size_t c, int flags, void *to, void *tolen)</div><div class='del'>- __attribute__ ((weak,alias("__libc_recvfrom"))) ;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/recvmsg.c b/mdk-stage1/dietlibc/lib/recvmsg.c<br/>deleted file mode 100644<br/>index c14c58c78..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/recvmsg.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/recvmsg.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_recvmsg(int a, struct msghdr* msg, int flags) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_RECVMSG, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) msg, flags };</div><div class='del'>-  return socketcall(SYS_RECVMSG, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int recvmsg(int a, struct msghdr *msg, int flags)</div><div class='del'>- __attribute__ ((weak,alias("__libc_recvmsg"))) ;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/remove.c b/mdk-stage1/dietlibc/lib/remove.c<br/>deleted file mode 100644<br/>index d5125bfed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/remove.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/remove.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-int remove(const char* filename) {</div><div class='del'>-  if (unlink(filename)) {</div><div class='del'>-    if (errno==EISDIR)</div><div class='del'>-      return rmdir(filename);</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/rewind.c b/mdk-stage1/dietlibc/lib/rewind.c<br/>deleted file mode 100644<br/>index 48434a316..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/rewind.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/rewind.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-void rewind( FILE *stream) {</div><div class='del'>-  fseek(stream, 0L, SEEK_SET);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/rewinddir.c b/mdk-stage1/dietlibc/lib/rewinddir.c<br/>deleted file mode 100644<br/>index addc7bde9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/rewinddir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/rewinddir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-</div><div class='del'>-void rewinddir(DIR *d) {</div><div class='del'>-  if (lseek(d-&gt;fd,0,SEEK_SET) != (off_t)-1)</div><div class='del'>-    d-&gt;num=d-&gt;cur=0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sbrk.c b/mdk-stage1/dietlibc/lib/sbrk.c<br/>deleted file mode 100644<br/>index 945ad5a16..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sbrk.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sbrk.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __brk(void *end_data_segment);</div><div class='del'>-</div><div class='del'>-extern void* __curbrk;</div><div class='del'>-</div><div class='del'>-void* __sbrk(ptrdiff_t increment) {</div><div class='del'>-  void* oldbrk;</div><div class='del'>-  if (__curbrk==0)</div><div class='del'>-    if (__brk(0) &lt; 0)</div><div class='del'>-      return (void*)-1;</div><div class='del'>-  if (increment==0)</div><div class='del'>-    return __curbrk;</div><div class='del'>-  oldbrk=__curbrk;</div><div class='del'>-  if (__brk(oldbrk+increment)&lt;0)</div><div class='del'>-    return (void*)-1;</div><div class='del'>-  return oldbrk;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void* sbrk (ptrdiff_t increment) __attribute__((weak,alias("__sbrk")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/seekdir.c b/mdk-stage1/dietlibc/lib/seekdir.c<br/>deleted file mode 100644<br/>index cf111fbc8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/seekdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/seekdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-</div><div class='del'>-void seekdir(DIR *d,off_t offset) {</div><div class='del'>-  if (lseek(d-&gt;fd,offset,SEEK_SET) != (off_t)-1)</div><div class='del'>-    d-&gt;num=d-&gt;cur=0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/semctl.c b/mdk-stage1/dietlibc/lib/semctl.c<br/>deleted file mode 100644<br/>index ddc0aae95..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/semctl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/semctl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/sem.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int semctl(int semid, int semnum, int cmd, union semun arg) {</div><div class='del'>-  return __ipc(SEMCTL,semid,semnum,cmd,&amp;arg);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/semget.c b/mdk-stage1/dietlibc/lib/semget.c<br/>deleted file mode 100644<br/>index 056aeae04..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/semget.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/semget.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/sem.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int semget(key_t key, int nsems, int semflg) {</div><div class='del'>-  return __ipc(SEMGET,key,nsems,semflg,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/semop.c b/mdk-stage1/dietlibc/lib/semop.c<br/>deleted file mode 100644<br/>index abfde73a7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/semop.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/semop.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/sem.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int semop(int semid,struct sembuf *sops,unsigned nsops) {</div><div class='del'>-  return __ipc(SEMOP,semid,nsops,0,sops);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/send.c b/mdk-stage1/dietlibc/lib/send.c<br/>deleted file mode 100644<br/>index c1adf1b5d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/send.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/send.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_send(int a, const void * b, size_t c, int flags) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SEND, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c, flags };</div><div class='del'>-  return socketcall(SYS_SEND, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int send(int a, const void * b, size_t c, int flags)</div><div class='del'>-  __attribute__ ((weak, alias("__libc_send")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sendmsg.c b/mdk-stage1/dietlibc/lib/sendmsg.c<br/>deleted file mode 100644<br/>index 277265985..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sendmsg.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sendmsg.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_sendmsg(int a, const struct msghdr* msg, int flags) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SENDMSG, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) msg, flags };</div><div class='del'>-  return socketcall(SYS_SENDMSG, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sendmsg(int a, const struct msghdr *msg, int flags)</div><div class='del'>- __attribute__ ((weak,alias("__libc_sendmsg"))) ;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sendto.c b/mdk-stage1/dietlibc/lib/sendto.c<br/>deleted file mode 100644<br/>index 078c010ea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sendto.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sendto.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_sendto(int a, const void * b, size_t c, int flags, void *to, int tolen) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SENDTO, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, (long) b, c, flags, (long) to, tolen };</div><div class='del'>-  return socketcall(SYS_SENDTO, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sendto(int a, const void * b, size_t c, int flags, void *to, int tolen)</div><div class='del'>-  __attribute__ ((weak, alias("__libc_sendto")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/set_errno.c b/mdk-stage1/dietlibc/lib/set_errno.c<br/>deleted file mode 100644<br/>index 6553bc496..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/set_errno.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/set_errno.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-void __set_errno(int error) __attribute__ ((weak));</div><div class='del'>-</div><div class='del'>-void __set_errno(int error)</div><div class='del'>-{</div><div class='del'>-  errno=error;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/setpgrp.c b/mdk-stage1/dietlibc/lib/setpgrp.c<br/>deleted file mode 100644<br/>index 825ca3725..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/setpgrp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/setpgrp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-int setpgrp()</div><div class='del'>-{</div><div class='del'>-  return setpgid(0,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/setsockopt.c b/mdk-stage1/dietlibc/lib/setsockopt.c<br/>deleted file mode 100644<br/>index 781e9c31c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/setsockopt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/setsockopt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int setsockopt(int a, int b, int c, void *d, void *e) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SETSOCKOPT, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, b, c, (long)d, (long) e };</div><div class='del'>-  return socketcall(SYS_SETSOCKOPT, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/shmat.c b/mdk-stage1/dietlibc/lib/shmat.c<br/>deleted file mode 100644<br/>index 63284b1ea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/shmat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/shmat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern void* __ipc();</div><div class='del'>-</div><div class='del'>-void* shmat(int shmid,const void* shmaddr,int shmflg) {</div><div class='del'>-  void* raddr;</div><div class='del'>-  register void* result;</div><div class='del'>-  result=__ipc(SHMAT,shmid,shmflg,&amp;raddr,shmaddr);</div><div class='del'>-  if ((unsigned long)result &lt;= -(unsigned long)SHMLBA)</div><div class='del'>-    result=raddr;</div><div class='del'>-  return result;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/shmctl.c b/mdk-stage1/dietlibc/lib/shmctl.c<br/>deleted file mode 100644<br/>index 8f942f2a4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/shmctl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/shmctl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int shmctl(int shmid, int cmd, struct shmid_ds *buf) {</div><div class='del'>-  return __ipc(SHMCTL,shmid,cmd,0,buf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/shmdt.c b/mdk-stage1/dietlibc/lib/shmdt.c<br/>deleted file mode 100644<br/>index 36db10f08..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/shmdt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/shmdt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int shmdt(const void* shmaddr) {</div><div class='del'>-  return __ipc(SHMDT,0,0,0,shmaddr);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/shmget.c b/mdk-stage1/dietlibc/lib/shmget.c<br/>deleted file mode 100644<br/>index 9b03f5deb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/shmget.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/shmget.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __ipc();</div><div class='del'>-</div><div class='del'>-int shmget(key_t key, int size, int shmflg) {</div><div class='del'>-  return __ipc(SHMGET,key,size,shmflg,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/shutdown.c b/mdk-stage1/dietlibc/lib/shutdown.c<br/>deleted file mode 100644<br/>index 0a6be6c37..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/shutdown.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/shutdown.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int __libc_shutdown(int s, int how) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SHUTDOWN, (long*)&amp;s);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { s, (long) how, 0 };</div><div class='del'>-  return socketcall(SYS_SHUTDOWN, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int shutdown(int s, int how) __attribute__((weak,alias("__libc_shutdown")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigaddset.c b/mdk-stage1/dietlibc/lib/sigaddset.c<br/>deleted file mode 100644<br/>index 8ce69ea77..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigaddset.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigaddset.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#define __KERNEL__</div><div class='del'>-#define sigaddset foobar</div><div class='del'>-#include &lt;asm/signal.h&gt;</div><div class='del'>-#undef sigaddset</div><div class='del'>-</div><div class='del'>-int __sigaddset(sigset_t *set, int signo) {</div><div class='del'>-  unsigned long sig = signo - 1;</div><div class='del'>-  if (_NSIG_WORDS == 1)</div><div class='del'>-    set-&gt;sig[0] |= 1UL &lt;&lt; sig;</div><div class='del'>-  else</div><div class='del'>-    set-&gt;sig[sig / _NSIG_BPW] |= 1UL &lt;&lt; (sig % _NSIG_BPW);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sigaddset (sigset_t *env, int signo) __attribute__((weak,alias("__sigaddset")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigdelset.c b/mdk-stage1/dietlibc/lib/sigdelset.c<br/>deleted file mode 100644<br/>index 2c3385ea8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigdelset.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigdelset.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#define __KERNEL__</div><div class='del'>-#define sigdelset foobar</div><div class='del'>-#include &lt;asm/signal.h&gt;</div><div class='del'>-#undef sigdelset</div><div class='del'>-</div><div class='del'>-int __sigdelset(sigset_t *set, int signo) {</div><div class='del'>-  unsigned long sig = signo - 1;</div><div class='del'>-  if (_NSIG_WORDS == 1)</div><div class='del'>-    set-&gt;sig[0] &amp;= ~(1UL &lt;&lt; sig);</div><div class='del'>-  else</div><div class='del'>-    set-&gt;sig[sig / _NSIG_BPW] &amp;= ~(1UL &lt;&lt; (sig % _NSIG_BPW));</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sigdelset (sigset_t *env, int signo) __attribute__((weak,alias("__sigdelset")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigemptyset.c b/mdk-stage1/dietlibc/lib/sigemptyset.c<br/>deleted file mode 100644<br/>index f4532f96e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigemptyset.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigemptyset.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#define __USE_EXTERN_INLINES 1</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int sigemptyset(sigset_t *set) {</div><div class='del'>-  if (set==NULL) {</div><div class='del'>-    __set_errno(EINVAL);</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  memset(set,0,sizeof(*set));</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigfillset.c b/mdk-stage1/dietlibc/lib/sigfillset.c<br/>deleted file mode 100644<br/>index ddac6e391..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigfillset.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigfillset.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#define __KERNEL__</div><div class='del'>-#include &lt;asm/signal.h&gt;</div><div class='del'>-</div><div class='del'>-int __sigfillset (sigset_t *set) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0; i&lt;_NSIG_WORDS; i++)</div><div class='del'>-    set-&gt;sig[i]=~0;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sigfillset(sigset_t *env) __attribute__((weak,alias("__sigfillset")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigismember.c b/mdk-stage1/dietlibc/lib/sigismember.c<br/>deleted file mode 100644<br/>index 67a258884..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigismember.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigismember.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#define __USE_EXTERN_INLINES 1</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-# define __sigmask(sig) \</div><div class='del'>-  (((unsigned long int) 1) &lt;&lt; (((sig) - 1) % (8 * sizeof (unsigned long int))))</div><div class='del'>-</div><div class='del'>-# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))</div><div class='del'>-</div><div class='del'>-# define _SIGSET_NWORDS	(1024 / (8 * sizeof (unsigned long int)))</div><div class='del'>-typedef struct</div><div class='del'>-  {</div><div class='del'>-    unsigned long int __val[_SIGSET_NWORDS];</div><div class='del'>-  } __sigset_t;</div><div class='del'>-</div><div class='del'>-int __sigismember(const __sigset_t *set, int signo) {</div><div class='del'>-  unsigned long int __mask = __sigmask (signo);</div><div class='del'>-  unsigned long int __word = __sigword (signo);</div><div class='del'>-  return (set-&gt;__val[__word] &amp; __mask);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int sigismember(const sigset_t *env, int signo) __attribute__((weak,alias("__sigismember")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sigjmp.c b/mdk-stage1/dietlibc/lib/sigjmp.c<br/>deleted file mode 100644<br/>index be97c62cc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sigjmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sigjmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.</div><div class='del'>-   This file is part of the GNU C Library.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is free software; you can redistribute it and/or</div><div class='del'>-   modify it under the terms of the GNU Library General Public License as</div><div class='del'>-   published by the Free Software Foundation; either version 2 of the</div><div class='del'>-   License, or (at your option) any later version.</div><div class='del'>-</div><div class='del'>-   The GNU C Library is distributed in the hope that it will be useful,</div><div class='del'>-   but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   Library General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU Library General Public</div><div class='del'>-   License along with the GNU C Library; see the file COPYING.LIB.  If not,</div><div class='del'>-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</div><div class='del'>-   Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/* This function is called by the `sigsetjmp' macro</div><div class='del'>-   before doing a `__setjmp' on ENV[0].__jmpbuf.</div><div class='del'>-   Always return zero.  */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-__sigjmp_save (sigjmp_buf env, int savemask)</div><div class='del'>-{</div><div class='del'>-  env[0].__mask_was_saved = (savemask &amp;&amp;</div><div class='del'>-			     sigprocmask (SIG_BLOCK, (sigset_t *) NULL,</div><div class='del'>-					    (sigset_t*)&amp;env[0].__saved_mask) == 0);</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sleep.c b/mdk-stage1/dietlibc/lib/sleep.c<br/>deleted file mode 100644<br/>index ec5b99533..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sleep.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sleep.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned int sleep(unsigned int secs) {</div><div class='del'>-  struct timespec t;</div><div class='del'>-  t.tv_sec=secs;</div><div class='del'>-  t.tv_nsec=0;</div><div class='del'>-  nanosleep(&amp;t,&amp;t);</div><div class='del'>-  return secs-t.tv_sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/snprintf.c b/mdk-stage1/dietlibc/lib/snprintf.c<br/>deleted file mode 100644<br/>index 096c06115..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/snprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/snprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int snprintf(char *str,size_t size,const char *format,...)</div><div class='del'>-{</div><div class='del'>-  int n;</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsnprintf(str,size,format,arg_ptr);</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/socket.c b/mdk-stage1/dietlibc/lib/socket.c<br/>deleted file mode 100644<br/>index 1684a6a2b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/socket.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/socket.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-</div><div class='del'>-extern int socketcall(int callno,long* args);</div><div class='del'>-</div><div class='del'>-int socket(int a, int b, int c) {</div><div class='del'>-#ifdef __i386__</div><div class='del'>-  return socketcall(SYS_SOCKET, (long*)&amp;a);</div><div class='del'>-#else</div><div class='del'>-  unsigned long args[] = { a, b, c };</div><div class='del'>-  return socketcall(SYS_SOCKET, args);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/speed.c b/mdk-stage1/dietlibc/lib/speed.c<br/>deleted file mode 100644<br/>index a7fcca7c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/speed.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/speed.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,67 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/* Hack around a kernel bug; value must correspond to the one used in tcsetattr.c */</div><div class='del'>-#define IBAUD0	020000000000</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Return the output baud rate stored in *TERMIOS_P.  */</div><div class='del'>-speed_t cfgetospeed (struct termios *termios_p)</div><div class='del'>-{</div><div class='del'>-	return termios_p-&gt;c_cflag &amp; (CBAUD | CBAUDEX);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Return the input baud rate stored in *TERMIOS_P.</div><div class='del'>-   Although for Linux there is no difference between input and output</div><div class='del'>-   speed, the numerical 0 is a special case for the input baud rate. It</div><div class='del'>-   should set the input baud rate to the output baud rate. */</div><div class='del'>-speed_t cfgetispeed (struct termios *termios_p)</div><div class='del'>-{</div><div class='del'>-	return ((termios_p-&gt;c_iflag &amp; IBAUD0)</div><div class='del'>-		? 0 : termios_p-&gt;c_cflag &amp; (CBAUD | CBAUDEX));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Set the output baud rate stored in *TERMIOS_P to SPEED.  */</div><div class='del'>-int cfsetospeed (struct termios *termios_p, speed_t speed)</div><div class='del'>-{</div><div class='del'>-	if ((speed &amp; ~CBAUD) != 0 &amp;&amp; (speed &lt; B57600 || speed &gt; B460800)) {</div><div class='del'>-		errno = EINVAL;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	termios_p-&gt;c_cflag &amp;= ~(CBAUD | CBAUDEX);</div><div class='del'>-	termios_p-&gt;c_cflag |= speed;</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Set the input baud rate stored in *TERMIOS_P to SPEED.</div><div class='del'>-   Although for Linux there is no difference between input and output</div><div class='del'>-   speed, the numerical 0 is a special case for the input baud rate.  It</div><div class='del'>-   should set the input baud rate to the output baud rate.  */</div><div class='del'>-int cfsetispeed (struct termios *termios_p, speed_t speed)</div><div class='del'>-{</div><div class='del'>-	if ((speed &amp; ~CBAUD) != 0 &amp;&amp; (speed &lt; B57600 || speed &gt; B460800)) {</div><div class='del'>-		errno = EINVAL;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (speed == 0)</div><div class='del'>-		termios_p-&gt;c_iflag |= IBAUD0;</div><div class='del'>-	else</div><div class='del'>-	{</div><div class='del'>-		termios_p-&gt;c_iflag &amp;= ~IBAUD0;</div><div class='del'>-		termios_p-&gt;c_cflag &amp;= ~(CBAUD | CBAUDEX);</div><div class='del'>-		termios_p-&gt;c_cflag |= speed;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sprintf.c b/mdk-stage1/dietlibc/lib/sprintf.c<br/>deleted file mode 100644<br/>index b355d01f9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int sprintf(char *dest,const char *format,...)</div><div class='del'>-{</div><div class='del'>-  int n;</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsnprintf(dest,1000000,format,arg_ptr);</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-link_warning("sprintf","warning: Avoid sprintf; use snprintf.  It is more secure and faster.")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sscanf.c b/mdk-stage1/dietlibc/lib/sscanf.c<br/>deleted file mode 100644<br/>index 341e74bba..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sscanf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sscanf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-int vsscanf(const char *str, const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int sscanf(const char *str, const char *format, ...)</div><div class='del'>-{</div><div class='del'>-  int n;</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsscanf(str,format,arg_ptr);</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strcasecmp.c b/mdk-stage1/dietlibc/lib/strcasecmp.c<br/>deleted file mode 100644<br/>index d978488a4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strcasecmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strcasecmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-int strcasecmp(register const char *s,register const char *t) {</div><div class='del'>-  register char x;</div><div class='del'>-</div><div class='del'>-  for (;;) {</div><div class='del'>-    x = tolower(*s); if (x != tolower(*t)) break; if (!x) break; ++s; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    x = tolower(*s); if (x != tolower(*t)) break; if (!x) break; ++s; ++t;</div><div class='del'>-    x = tolower(*s); if (x != tolower(*t)) break; if (!x) break; ++s; ++t;</div><div class='del'>-    x = tolower(*s); if (x != tolower(*t)) break; if (!x) break; ++s; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return ((int)(unsigned int)(unsigned char) x)</div><div class='del'>-       - ((int)(unsigned int)(unsigned char) *t);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strcat.c b/mdk-stage1/dietlibc/lib/strcat.c<br/>deleted file mode 100644<br/>index 8a755afea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strcat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strcat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char* strcat(register char* s,register const char* t)</div><div class='del'>-{</div><div class='del'>-  char *dest=s;</div><div class='del'>-  s+=strlen(s);</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (!(*s = *t)) break; ++s; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    if (!(*s = *t)) break; ++s; ++t;</div><div class='del'>-    if (!(*s = *t)) break; ++s; ++t;</div><div class='del'>-    if (!(*s = *t)) break; ++s; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return dest;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strchr.c b/mdk-stage1/dietlibc/lib/strchr.c<br/>deleted file mode 100644<br/>index 0c2050da6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strchr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strchr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-char *strchr(register const char *t, int c) {</div><div class='del'>-  register char ch;</div><div class='del'>-</div><div class='del'>-  ch = c;</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (*t == ch) break; if (!*t) return 0; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    if (*t == ch) break; if (!*t) return 0; ++t;</div><div class='del'>-    if (*t == ch) break; if (!*t) return 0; ++t;</div><div class='del'>-    if (*t == ch) break; if (!*t) return 0; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return (char*)t;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *index(char *t,int c)	__attribute__((weak,alias("strchr")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strcmp.c b/mdk-stage1/dietlibc/lib/strcmp.c<br/>deleted file mode 100644<br/>index 0db324e66..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strcmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strcmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-int strcmp(register const char *s,register const char *t) {</div><div class='del'>-  register char x;</div><div class='del'>-</div><div class='del'>-  for (;;) {</div><div class='del'>-    x = *s; if (x != *t) break; if (!x) break; ++s; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    x = *s; if (x != *t) break; if (!x) break; ++s; ++t;</div><div class='del'>-    x = *s; if (x != *t) break; if (!x) break; ++s; ++t;</div><div class='del'>-    x = *s; if (x != *t) break; if (!x) break; ++s; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return ((int)(unsigned int)(unsigned char) x)</div><div class='del'>-       - ((int)(unsigned int)(unsigned char) *t);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strcpy.c b/mdk-stage1/dietlibc/lib/strcpy.c<br/>deleted file mode 100644<br/>index 49693c30d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strcpy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strcpy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-char* strcpy(register char* s,register const char* t)</div><div class='del'>-{</div><div class='del'>-  char *dest=s;</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (!(*s = *t)) return dest; ++s; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    if (!(*s = *t)) return dest; ++s; ++t;</div><div class='del'>-    if (!(*s = *t)) return dest; ++s; ++t;</div><div class='del'>-    if (!(*s = *t)) return dest; ++s; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strcspn.c b/mdk-stage1/dietlibc/lib/strcspn.c<br/>deleted file mode 100644<br/>index 37053c72c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strcspn.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strcspn.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-size_t strcspn(const char *s, const char *reject)</div><div class='del'>-{</div><div class='del'>-  size_t l=0;</div><div class='del'>-  int a=1,i,al=strlen(reject);</div><div class='del'>-</div><div class='del'>-  while((a)&amp;&amp;(*s))</div><div class='del'>-  {</div><div class='del'>-    for(i=0;(a)&amp;&amp;(i&lt;al);i++)</div><div class='del'>-      if (*s==reject[i]) a=0;</div><div class='del'>-    if (a) l++;</div><div class='del'>-    s++;</div><div class='del'>-  }</div><div class='del'>-  return l;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strdup.c b/mdk-stage1/dietlibc/lib/strdup.c<br/>deleted file mode 100644<br/>index 6a2ea5f95..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strdup.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strdup.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-char *strdup(const char *s) {</div><div class='del'>-  char *tmp=(char *)malloc(strlen(s)+1);</div><div class='del'>-  if (!tmp) return 0;</div><div class='del'>-  strcpy(tmp,s);</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strerror.c b/mdk-stage1/dietlibc/lib/strerror.c<br/>deleted file mode 100644<br/>index f15b86aae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strerror.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strerror.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-extern char *sys_errlist[];</div><div class='del'>-extern int sys_nerr;</div><div class='del'>-</div><div class='del'>-char *strerror(int errnum) {</div><div class='del'>-  if (errnum&gt;=0 &amp;&amp; errnum&lt;sys_nerr)</div><div class='del'>-    return sys_errlist[errnum];</div><div class='del'>-  return "[unknown error]";</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strlcat.c b/mdk-stage1/dietlibc/lib/strlcat.c<br/>deleted file mode 100644<br/>index fd35ec8af..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strlcat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strlcat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-/*	$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp $	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms, with or without</div><div class='del'>- * modification, are permitted provided that the following conditions</div><div class='del'>- * are met:</div><div class='del'>- * 1. Redistributions of source code must retain the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer.</div><div class='del'>- * 2. Redistributions in binary form must reproduce the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer in the</div><div class='del'>- *    documentation and/or other materials provided with the distribution.</div><div class='del'>- * 3. The name of the author may not be used to endorse or promote products</div><div class='del'>- *    derived from this software without specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL</div><div class='del'>- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</div><div class='del'>- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</div><div class='del'>- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</div><div class='del'>- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR</div><div class='del'>- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</div><div class='del'>- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#if defined(LIBC_SCCS) &amp;&amp; !defined(lint)</div><div class='del'>-static char *rcsid = "$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp $";</div><div class='del'>-#endif /* LIBC_SCCS and not lint */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Appends src to string dst of size siz (unlike strncat, siz is the</div><div class='del'>- * full size of dst, not space left).  At most siz-1 characters</div><div class='del'>- * will be copied.  Always NUL terminates (unless siz == 0).</div><div class='del'>- * Returns strlen(initial dst) + strlen(src); if retval &gt;= siz,</div><div class='del'>- * truncation occurred.</div><div class='del'>- */</div><div class='del'>-size_t strlcat(dst, src, siz)</div><div class='del'>-	char *dst;</div><div class='del'>-	const char *src;</div><div class='del'>-	size_t siz;</div><div class='del'>-{</div><div class='del'>-	register char *d = dst;</div><div class='del'>-	register const char *s = src;</div><div class='del'>-	register size_t n = siz;</div><div class='del'>-	size_t dlen;</div><div class='del'>-</div><div class='del'>-	/* Find the end of dst and adjust bytes left but don't go past end */</div><div class='del'>-	while (*d != '\0' &amp;&amp; n-- != 0)</div><div class='del'>-		d++;</div><div class='del'>-	dlen = d - dst;</div><div class='del'>-	n = siz - dlen;</div><div class='del'>-</div><div class='del'>-	if (n == 0)</div><div class='del'>-		return(dlen + strlen(s));</div><div class='del'>-	while (*s != '\0') {</div><div class='del'>-		if (n != 1) {</div><div class='del'>-			*d++ = *s;</div><div class='del'>-			n--;</div><div class='del'>-		}</div><div class='del'>-		s++;</div><div class='del'>-	}</div><div class='del'>-	*d = '\0';</div><div class='del'>-</div><div class='del'>-	return(dlen + (s - src));	/* count does not include NUL */</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strlcpy.3 b/mdk-stage1/dietlibc/lib/strlcpy.3<br/>deleted file mode 100644<br/>index e00af8d6b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strlcpy.3?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strlcpy.3</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,169 +0,0 @@</div><div class='del'>-.\" $OpenBSD: strlcpy.3,v 1.10 2000/11/06 01:03:25 aaron Exp $</div><div class='del'>-.\"</div><div class='del'>-.\" Copyright (c) 1998, 2000 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;</div><div class='del'>-.\" All rights reserved.</div><div class='del'>-.\"</div><div class='del'>-.\" Redistribution and use in source and binary forms, with or without</div><div class='del'>-.\" modification, are permitted provided that the following conditions</div><div class='del'>-.\" are met:</div><div class='del'>-.\" 1. Redistributions of source code must retain the above copyright</div><div class='del'>-.\"    notice, this list of conditions and the following disclaimer.</div><div class='del'>-.\" 2. Redistributions in binary form must reproduce the above copyright</div><div class='del'>-.\"    notice, this list of conditions and the following disclaimer in the</div><div class='del'>-.\"    documentation and/or other materials provided with the distribution.</div><div class='del'>-.\" 3. The name of the author may not be used to endorse or promote products</div><div class='del'>-.\"    derived from this software without specific prior written permission.</div><div class='del'>-.\"</div><div class='del'>-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,</div><div class='del'>-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>-.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL</div><div class='del'>-.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</div><div class='del'>-.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</div><div class='del'>-.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</div><div class='del'>-.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR</div><div class='del'>-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</div><div class='del'>-.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>-.\"</div><div class='del'>-.Dd June 22, 1998</div><div class='del'>-.Dt STRLCPY 3</div><div class='del'>-.Os</div><div class='del'>-.Sh NAME</div><div class='del'>-.Nm strlcpy ,</div><div class='del'>-.Nm strlcat</div><div class='del'>-.Nd size-bounded string copying and concatenation</div><div class='del'>-.Sh SYNOPSIS</div><div class='del'>-.Fd #include &lt;string.h&gt;</div><div class='del'>-.Ft size_t</div><div class='del'>-.Fn strlcpy "char *dst" "const char *src" "size_t size"</div><div class='del'>-.Ft size_t</div><div class='del'>-.Fn strlcat "char *dst" "const char *src" "size_t size"</div><div class='del'>-.Sh DESCRIPTION</div><div class='del'>-The</div><div class='del'>-.Fn strlcpy</div><div class='del'>-and</div><div class='del'>-.Fn strlcat</div><div class='del'>-functions copy and concatenate strings respectively.</div><div class='del'>-They are designed</div><div class='del'>-to be safer, more consistent, and less error prone replacements for</div><div class='del'>-.Xr strncpy 3</div><div class='del'>-and</div><div class='del'>-.Xr strncat 3 .</div><div class='del'>-Unlike those functions,</div><div class='del'>-.Fn strlcpy</div><div class='del'>-and</div><div class='del'>-.Fn strlcat</div><div class='del'>-take the full size of the buffer (not just the length) and guarantee to</div><div class='del'>-NUL-terminate the result (as long as</div><div class='del'>-.Fa size</div><div class='del'>-is larger than 0 or, in the case of</div><div class='del'>-.Fn strlcat ,</div><div class='del'>-as long as there is at least one byte free in</div><div class='del'>-.Fa dst ) .</div><div class='del'>-Note that you should include a byte for the NUL in</div><div class='del'>-.Fa size .</div><div class='del'>-Also note that</div><div class='del'>-.Fn strlcpy  </div><div class='del'>-and</div><div class='del'>-.Fn strlcat</div><div class='del'>-only operate on true</div><div class='del'>-.Dq C</div><div class='del'>-strings.</div><div class='del'>-This means that for</div><div class='del'>-.Fn strlcpy</div><div class='del'>-.Fa src</div><div class='del'>-must be NUL-terminated and for</div><div class='del'>-.Fn strlcat</div><div class='del'>-both</div><div class='del'>-.Fa src</div><div class='del'>-and</div><div class='del'>-.Fa dst</div><div class='del'>-must be NUL-terminated.</div><div class='del'>-.Pp</div><div class='del'>-The</div><div class='del'>-.Fn strlcpy</div><div class='del'>-function copies up to</div><div class='del'>-.Fa size</div><div class='del'>-- 1 characters from the NUL-terminated string</div><div class='del'>-.Fa src</div><div class='del'>-to</div><div class='del'>-.Fa dst ,</div><div class='del'>-NUL-terminating the result.</div><div class='del'>-.Pp</div><div class='del'>-The</div><div class='del'>-.Fn strlcat</div><div class='del'>-function appends the NUL-terminated string</div><div class='del'>-.Fa src</div><div class='del'>-to the end of</div><div class='del'>-.Fa dst .</div><div class='del'>-It will append at most</div><div class='del'>-.Fa size</div><div class='del'>-- strlen(dst) - 1 bytes, NUL-terminating the result.</div><div class='del'>-.Sh RETURN VALUES</div><div class='del'>-The</div><div class='del'>-.Fn strlcpy</div><div class='del'>-and</div><div class='del'>-.Fn strlcat</div><div class='del'>-functions return the total length of the string they tried to create.</div><div class='del'>-For</div><div class='del'>-.Fn strlcpy</div><div class='del'>-that means the length of</div><div class='del'>-.Fa src .</div><div class='del'>-For</div><div class='del'>-.Fn strlcat</div><div class='del'>-that means the initial length of</div><div class='del'>-.Fa dst</div><div class='del'>-plus</div><div class='del'>-the length of</div><div class='del'>-.Fa src .</div><div class='del'>-While this may seem somewhat confusing it was done to make</div><div class='del'>-truncation detection simple.</div><div class='del'>-.Sh EXAMPLES</div><div class='del'>-The following code fragment illustrates the simple case:</div><div class='del'>-.Bd -literal -offset indent</div><div class='del'>-char *s, *p, buf[BUFSIZ];</div><div class='del'>-</div><div class='del'>-\&amp;...</div><div class='del'>-</div><div class='del'>-(void)strlcpy(buf, s, sizeof(buf));</div><div class='del'>-(void)strlcat(buf, p, sizeof(buf));</div><div class='del'>-.Ed</div><div class='del'>-.Pp</div><div class='del'>-To detect truncation, perhaps while building a pathname, something</div><div class='del'>-like the following might be used:</div><div class='del'>-.Bd -literal -offset indent</div><div class='del'>-char *dir, *file, pname[MAXPATHLEN];</div><div class='del'>-</div><div class='del'>-\&amp;...</div><div class='del'>-</div><div class='del'>-if (strlcpy(pname, dir, sizeof(pname)) &gt;= sizeof(pname))</div><div class='del'>-	goto toolong;</div><div class='del'>-if (strlcat(pname, file, sizeof(pname)) &gt;= sizeof(pname))</div><div class='del'>-	goto toolong;</div><div class='del'>-.Ed</div><div class='del'>-.Pp</div><div class='del'>-Since we know how many characters we copied the first time, we can</div><div class='del'>-speed things up a bit by using a copy instead of an append:</div><div class='del'>-.Bd -literal -offset indent</div><div class='del'>-char *dir, *file, pname[MAXPATHLEN];</div><div class='del'>-size_t n;</div><div class='del'>-</div><div class='del'>-\&amp;...</div><div class='del'>-</div><div class='del'>-n = strlcpy(pname, dir, sizeof(pname));</div><div class='del'>-if (n &gt;= sizeof(pname))</div><div class='del'>-	goto toolong;</div><div class='del'>-if (strlcpy(pname + n, file, sizeof(pname) - n) &gt;= sizeof(pname) - n)</div><div class='del'>-	goto toolong;</div><div class='del'>-.Ed</div><div class='del'>-.Pp</div><div class='del'>-However, one may question the validity of such optimizations, as they</div><div class='del'>-defeat the whole purpose of</div><div class='del'>-.Fn strlcpy</div><div class='del'>-and</div><div class='del'>-.Fn strlcat .</div><div class='del'>-As a matter of fact, the first version of this manual page got it wrong.</div><div class='del'>-.Sh SEE ALSO</div><div class='del'>-.Xr snprintf 3 ,</div><div class='del'>-.Xr strncat 3 ,</div><div class='del'>-.Xr strncpy 3</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strlcpy.c b/mdk-stage1/dietlibc/lib/strlcpy.c<br/>deleted file mode 100644<br/>index b935b9527..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strlcpy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strlcpy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,68 +0,0 @@</div><div class='del'>-/*	$OpenBSD: strlcpy.c,v 1.3 1999/04/24 01:17:37 millert Exp $	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms, with or without</div><div class='del'>- * modification, are permitted provided that the following conditions</div><div class='del'>- * are met:</div><div class='del'>- * 1. Redistributions of source code must retain the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer.</div><div class='del'>- * 2. Redistributions in binary form must reproduce the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer in the</div><div class='del'>- *    documentation and/or other materials provided with the distribution.</div><div class='del'>- * 3. The name of the author may not be used to endorse or promote products</div><div class='del'>- *    derived from this software without specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL</div><div class='del'>- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</div><div class='del'>- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</div><div class='del'>- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</div><div class='del'>- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</div><div class='del'>- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR</div><div class='del'>- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</div><div class='del'>- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#if defined(LIBC_SCCS) &amp;&amp; !defined(lint)</div><div class='del'>-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.3 1999/04/24 01:17:37 millert Exp $";</div><div class='del'>-#endif /* LIBC_SCCS and not lint */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copy src to string dst of size siz.  At most siz-1 characters</div><div class='del'>- * will be copied.  Always NUL terminates (unless siz == 0).</div><div class='del'>- * Returns strlen(src); if retval &gt;= siz, truncation occurred.</div><div class='del'>- */</div><div class='del'>-size_t strlcpy(dst, src, siz)</div><div class='del'>-	char *dst;</div><div class='del'>-	const char *src;</div><div class='del'>-	size_t siz;</div><div class='del'>-{</div><div class='del'>-	register char *d = dst;</div><div class='del'>-	register const char *s = src;</div><div class='del'>-	register size_t n = siz;</div><div class='del'>-</div><div class='del'>-	/* Copy as many bytes as will fit */</div><div class='del'>-	if (n != 0 &amp;&amp; --n != 0) {</div><div class='del'>-		do {</div><div class='del'>-			if ((*d++ = *s++) == 0)</div><div class='del'>-				break;</div><div class='del'>-		} while (--n != 0);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Not enough room in dst, add NUL and traverse rest of src */</div><div class='del'>-	if (n == 0) {</div><div class='del'>-		if (siz != 0)</div><div class='del'>-			*d = '\0';		/* NUL-terminate dst */</div><div class='del'>-		while (*s++)</div><div class='del'>-			;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return(s - src - 1);	/* count does not include NUL */</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strlen.c b/mdk-stage1/dietlibc/lib/strlen.c<br/>deleted file mode 100644<br/>index 56c085dac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strlen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strlen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,47 +0,0 @@</div><div class='del'>-#include &lt;endian.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-size_t strlen(const char *s) {</div><div class='del'>-  register int i;</div><div class='del'>-  if (!s) return 0;</div><div class='del'>-  for (i=0; *s; ++s) ++i;</div><div class='del'>-  return i;</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-static const unsigned long magic = 0x01010101;</div><div class='del'>-</div><div class='del'>-size_t strlen(const char *s)</div><div class='del'>-{</div><div class='del'>-  const char *t = s;</div><div class='del'>-  unsigned long word;</div><div class='del'>-</div><div class='del'>-  if (!s) return 0;</div><div class='del'>-</div><div class='del'>-  /* Byte compare up until word boundary */</div><div class='del'>-  for (; ((unsigned long) t &amp; 3); t++)</div><div class='del'>-    if (!*t) return t - s;</div><div class='del'>-</div><div class='del'>-  /* Word compare */</div><div class='del'>-  do {</div><div class='del'>-    word = *((unsigned long *) t); t += 4;</div><div class='del'>-    word = (word - magic) &amp;~ word;</div><div class='del'>-    word &amp;= (magic &lt;&lt; 7);</div><div class='del'>-  } while (word == 0);</div><div class='del'>-</div><div class='del'>-#if BYTE_ORDER == LITTLE_ENDIAN</div><div class='del'>-  /* word &amp; 0x80808080 == word */</div><div class='del'>-  word = (word - 1) &amp; (magic &lt;&lt; 10);</div><div class='del'>-  word += (word &lt;&lt; 8) + (word &lt;&lt; 16);</div><div class='del'>-  t += word &gt;&gt; 26;</div><div class='del'>-#else</div><div class='del'>-  if ((word &amp; 0x80800000) == 0) {</div><div class='del'>-    word &lt;&lt;= 16;</div><div class='del'>-    t += 2;</div><div class='del'>-  }</div><div class='del'>-  if ((word &amp; 0x80000000) == 0) t += 1;</div><div class='del'>-#endif</div><div class='del'>-  return ((const char *) t) - 4 - s;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strncasecmp.c b/mdk-stage1/dietlibc/lib/strncasecmp.c<br/>deleted file mode 100644<br/>index 8a5445e53..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strncasecmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strncasecmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int strncasecmp(const char *s, const char *t, size_t n) {</div><div class='del'>-  register char x;</div><div class='del'>-  register const char* u=s+n;</div><div class='del'>-  for (;;) {</div><div class='del'>-    x = tolower(*s); if (x!=tolower(*t)) break; if (!x) break; if (++s&gt;=u) return 0; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    x = tolower(*s); if (x!=tolower(*t)) break; if (!x) break; if (++s&gt;=u) return 0; ++t;</div><div class='del'>-    x = tolower(*s); if (x!=tolower(*t)) break; if (!x) break; if (++s&gt;=u) return 0; ++t;</div><div class='del'>-    x = tolower(*s); if (x!=tolower(*t)) break; if (!x) break; if (++s&gt;=u) return 0; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return ((int)(unsigned int)(unsigned char) x)</div><div class='del'>-       - ((int)(unsigned int)(unsigned char) *t);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strncat.c b/mdk-stage1/dietlibc/lib/strncat.c<br/>deleted file mode 100644<br/>index a08e97916..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strncat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strncat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_NON_COMPLIANT_STRNCAT</div><div class='del'>-/* this implementation is not standards compliant.</div><div class='del'>- * the standard says that strncat(dest,"foobar",3) should write 'f', 'o'</div><div class='del'>- * and 'o'.  The programmer is then expected to overwrite the last byte</div><div class='del'>- * with '\0', which is often forgotten.  This implementation makes sure</div><div class='del'>- * the last written bytes is always '\0'. */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-char *strncat(char *s, const char *t, size_t n) {</div><div class='del'>-  char *dest=s;</div><div class='del'>-  register char *max;</div><div class='del'>-  s+=strlen(s);</div><div class='del'>-#ifdef WANT_NON_COMPLIANT_STRNCAT</div><div class='del'>-  max=s+n-1;</div><div class='del'>-#else</div><div class='del'>-  max=s+n;</div><div class='del'>-#endif</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (!(*s = *t)) break; if (++s==max) break; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    if (!(*s = *t)) break; if (++s==max) break; ++t;</div><div class='del'>-    if (!(*s = *t)) break; if (++s==max) break; ++t;</div><div class='del'>-    if (!(*s = *t)) break; if (++s==max) break; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  *s=0;</div><div class='del'>-  return dest;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strncmp.c b/mdk-stage1/dietlibc/lib/strncmp.c<br/>deleted file mode 100644<br/>index 7c08c0fa7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strncmp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strncmp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int strncmp(const char *s1, const char *s2, size_t n) {</div><div class='del'>-  return memccmp(s1,s2,0,n);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strncpy.c b/mdk-stage1/dietlibc/lib/strncpy.c<br/>deleted file mode 100644<br/>index 531387b7f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strncpy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strncpy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#define _POSIX_SOURCE</div><div class='del'>-#define _XOPEN_SOURCE</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *strncpy(char *dest, const char *src, size_t n)</div><div class='del'>-{</div><div class='del'>-  memccpy(dest,src,0,n);</div><div class='del'>-  return dest;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strpbrk.c b/mdk-stage1/dietlibc/lib/strpbrk.c<br/>deleted file mode 100644<br/>index e18fd2a2d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strpbrk.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strpbrk.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *strpbrk(const char *s, const char *accept) {</div><div class='del'>-  register int i,l=strlen(accept);</div><div class='del'>-  for (; *s; s++)</div><div class='del'>-    for (i=0; i&lt;l; i++)</div><div class='del'>-      if (*s == accept[i])</div><div class='del'>-	return (char*)s;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strrchr.c b/mdk-stage1/dietlibc/lib/strrchr.c<br/>deleted file mode 100644<br/>index 1abb655e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strrchr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strrchr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-char *strrchr(const char *t, int c) {</div><div class='del'>-  register char ch;</div><div class='del'>-  register const char *l=0;</div><div class='del'>-</div><div class='del'>-  ch = c;</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (*t == ch) l=t; if (!*t) return (char*)l; ++t;</div><div class='del'>-#ifndef WANT_SMALL_STRING_ROUTINES</div><div class='del'>-    if (*t == ch) l=t; if (!*t) return (char*)l; ++t;</div><div class='del'>-    if (*t == ch) l=t; if (!*t) return (char*)l; ++t;</div><div class='del'>-    if (*t == ch) l=t; if (!*t) return (char*)l; ++t;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-  return (char*)l;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *rindex(const char *t,int c)	__attribute__((weak,alias("strrchr")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strsep.c b/mdk-stage1/dietlibc/lib/strsep.c<br/>deleted file mode 100644<br/>index a1bf1872a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strsep.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strsep.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *strsep(char **stringp, const char *delim) {</div><div class='del'>-  register char *tmp=*stringp;</div><div class='del'>-  register char *tmp2=tmp;</div><div class='del'>-  register const char *tmp3;</div><div class='del'>-  for (tmp2=tmp; *tmp2; ++tmp2) {</div><div class='del'>-    for (tmp3=delim; *tmp3; ++tmp3)</div><div class='del'>-      if (*tmp2==*tmp3) {	/* delimiter found */</div><div class='del'>-	*tmp2=0;</div><div class='del'>-	*stringp=tmp2+1;</div><div class='del'>-	return tmp;</div><div class='del'>-      }</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strspn.c b/mdk-stage1/dietlibc/lib/strspn.c<br/>deleted file mode 100644<br/>index 2b3a4c116..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strspn.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strspn.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-size_t strspn(const char *s, const char *accept)</div><div class='del'>-{</div><div class='del'>-  size_t l=0;</div><div class='del'>-  int a=1,i,al=strlen(accept);</div><div class='del'>-</div><div class='del'>-  while((a)&amp;&amp;(*s))</div><div class='del'>-  {</div><div class='del'>-    for(a=i=0;(!a)&amp;&amp;(i&lt;al);i++)</div><div class='del'>-      if (*s==accept[i]) a=1;</div><div class='del'>-    if (a) l++;</div><div class='del'>-    s++;</div><div class='del'>-  }</div><div class='del'>-  return l;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strstr.c b/mdk-stage1/dietlibc/lib/strstr.c<br/>deleted file mode 100644<br/>index 641d9d7ac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strstr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strstr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *strstr(const char *haystack, const char *needle) {</div><div class='del'>-  int nl=strlen(needle);</div><div class='del'>-  int hl=strlen(haystack);</div><div class='del'>-  int i;</div><div class='del'>-  if (nl&gt;hl) return 0;</div><div class='del'>-  for (i=hl-nl+1; i; --i) {</div><div class='del'>-    if (!memcmp(haystack,needle,nl))</div><div class='del'>-      return (char*)haystack;</div><div class='del'>-    ++haystack;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtod.c b/mdk-stage1/dietlibc/lib/strtod.c<br/>deleted file mode 100644<br/>index cbe983d84..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,52 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-extern char isspace(char c);</div><div class='del'>-</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-static inline char isdigit(char c) { return (c&gt;='0' &amp;&amp; c&lt;='9'); }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-double strtod(const char *nptr, char **endptr) {</div><div class='del'>-  double d=0;</div><div class='del'>-  register const char *c=nptr;</div><div class='del'>-  char neg=0;</div><div class='del'>-  while (*c &amp;&amp; isspace(*c)) ++c;</div><div class='del'>-  switch (*c) {</div><div class='del'>-  case '-': neg=1;</div><div class='del'>-  case '+': c++; break;</div><div class='del'>-  default: break;</div><div class='del'>-  }</div><div class='del'>-  while (isdigit(*c)) {</div><div class='del'>-    d=d*10+(*c-'0');</div><div class='del'>-    ++c;</div><div class='del'>-  }</div><div class='del'>-  if (*c=='.') {</div><div class='del'>-    double factor=.1;</div><div class='del'>-    while (isdigit(*++c)) {</div><div class='del'>-      d=d+(factor*(*c-'0'));</div><div class='del'>-      factor/=10;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if ((*c|32)=='e') {</div><div class='del'>-    int exp=0;</div><div class='del'>-    double factor=10;</div><div class='del'>-    if (c[1]&lt;'0') {</div><div class='del'>-      switch (c[1]) {</div><div class='del'>-      case '-': factor=0.1;</div><div class='del'>-      case '+': c++; break;</div><div class='del'>-      default:</div><div class='del'>-	d=0;</div><div class='del'>-	c=nptr;</div><div class='del'>-	goto done;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    while (isdigit(*++c))</div><div class='del'>-      exp=exp*10+(*c-'0');</div><div class='del'>-    while (exp) {	/* XXX: this introduces rounding errors */</div><div class='del'>-      d*=factor; --exp;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-done:</div><div class='del'>-  if (endptr) *endptr=(char*)c;</div><div class='del'>-  return d;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtok.c b/mdk-stage1/dietlibc/lib/strtok.c<br/>deleted file mode 100644<br/>index 86337da7b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtok.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtok.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-char *strtok_r(char *s, const char *delim, char **ptrptr);</div><div class='del'>-</div><div class='del'>-static char *strtok_pos;</div><div class='del'>-</div><div class='del'>-char *strtok(char *s, const char *delim)</div><div class='del'>-{</div><div class='del'>-  return strtok_r(s,delim,&amp;strtok_pos);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtok_r.c b/mdk-stage1/dietlibc/lib/strtok_r.c<br/>deleted file mode 100644<br/>index 93f9401de..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtok_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtok_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *strtok_r(char *s, const char *delim, char **ptrptr)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  char *tmp=0;</div><div class='del'>-</div><div class='del'>-  if (s) (*ptrptr)=s;</div><div class='del'>-</div><div class='del'>-  if (**ptrptr)</div><div class='del'>-  {</div><div class='del'>-    while(!(i=strcspn(*ptrptr,delim))) (*ptrptr)++;</div><div class='del'>-    if (**ptrptr)</div><div class='del'>-    {</div><div class='del'>-      tmp=(*ptrptr);</div><div class='del'>-      (*ptrptr)+=i;</div><div class='del'>-      if (**ptrptr) *(*ptrptr)++=0;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtol.c b/mdk-stage1/dietlibc/lib/strtol.c<br/>deleted file mode 100644<br/>index ead89f408..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtol.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtol.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-extern unsigned long int strtoul(const char *nptr, char **endptr, int base);</div><div class='del'>-</div><div class='del'>-long int strtol(const char *nptr, char **endptr, int base)</div><div class='del'>-{</div><div class='del'>-  int neg=0;</div><div class='del'>-  unsigned long int v;</div><div class='del'>-</div><div class='del'>-  while(isspace(*nptr)) nptr++;</div><div class='del'>-</div><div class='del'>-  if (*nptr == '-' &amp;&amp; isdigit(nptr[1])) { neg=-1; nptr++; }</div><div class='del'>-  v=strtoul(nptr,endptr,base);</div><div class='del'>-  return (neg?-v:v);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtoll.c b/mdk-stage1/dietlibc/lib/strtoll.c<br/>deleted file mode 100644<br/>index 7b8e28a1d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtoll.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtoll.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-extern unsigned long int strtoull(const char *nptr, char **endptr, int base);</div><div class='del'>-</div><div class='del'>-long int strtoll(const char *nptr, char **endptr, int base)</div><div class='del'>-{</div><div class='del'>-  int neg=0;</div><div class='del'>-  unsigned long long int v;</div><div class='del'>-</div><div class='del'>-  while(isspace(*nptr)) nptr++;</div><div class='del'>-</div><div class='del'>-  if (*nptr == '-' &amp;&amp; isdigit(nptr[1])) { neg=-1; nptr++; }</div><div class='del'>-  v=strtoull(nptr,endptr,base);</div><div class='del'>-  return (neg?-v:v);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtoul.c b/mdk-stage1/dietlibc/lib/strtoul.c<br/>deleted file mode 100644<br/>index 3f93962a9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtoul.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtoul.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-/* static char *num="0123456789abcdefghijklmnopqrstuvwxyz"; */</div><div class='del'>-</div><div class='del'>-unsigned long int strtoul(const char *nptr, char **endptr, int base)</div><div class='del'>-{</div><div class='del'>-  long int v=0;</div><div class='del'>-</div><div class='del'>-  while(isspace(*nptr)) ++nptr;</div><div class='del'>-</div><div class='del'>-  if (*nptr == '+') ++nptr;</div><div class='del'>-  if (!base) {</div><div class='del'>-    if (*nptr=='0') {</div><div class='del'>-      base=8;</div><div class='del'>-      if ((*(nptr+1)=='x')||(*(nptr+1)=='X')) {</div><div class='del'>-	nptr+=2;</div><div class='del'>-	base=16;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-      base=10;</div><div class='del'>-  }</div><div class='del'>-  while(*nptr) {</div><div class='del'>-    register unsigned char c=*nptr;</div><div class='del'>-    c=(c&gt;='a'?c-'a'+10:c&gt;='A'?c-'A'+10:c-'0');</div><div class='del'>-    if (c&gt;=base) break;</div><div class='del'>-    v=v*base+c;</div><div class='del'>-    ++nptr;</div><div class='del'>-  }</div><div class='del'>-  if (endptr) *endptr=(char *)nptr;</div><div class='del'>-  return v;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/strtoull.c b/mdk-stage1/dietlibc/lib/strtoull.c<br/>deleted file mode 100644<br/>index 40818958d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/strtoull.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/strtoull.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned long long int strtoull(const char *nptr, char **endptr, int base)</div><div class='del'>-{</div><div class='del'>-  long long int v=0;</div><div class='del'>-</div><div class='del'>-  while(isspace(*nptr)) ++nptr;</div><div class='del'>-</div><div class='del'>-  if (*nptr == '+') ++nptr;</div><div class='del'>-  if (!base) {</div><div class='del'>-    if (*nptr=='0') {</div><div class='del'>-      base=8;</div><div class='del'>-      if ((*(nptr+1)=='x')||(*(nptr+1)=='X')) {</div><div class='del'>-	nptr+=2;</div><div class='del'>-	base=16;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-      base=10;</div><div class='del'>-  }</div><div class='del'>-  while(*nptr) {</div><div class='del'>-    register unsigned char c=*nptr;</div><div class='del'>-    c=(c&gt;='a'?c-'a'+10:c&gt;='A'?c-'A'+10:c-'0');</div><div class='del'>-    if (c&gt;=base) break;</div><div class='del'>-    v=v*base+c;</div><div class='del'>-    ++nptr;</div><div class='del'>-  }</div><div class='del'>-  if (endptr) *endptr=(char *)nptr;</div><div class='del'>-  return v;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/sys_siglist.c b/mdk-stage1/dietlibc/lib/sys_siglist.c<br/>deleted file mode 100644<br/>index 80d7b3fb0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/sys_siglist.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/sys_siglist.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-const char *const sys_siglist[] =</div><div class='del'>-  {</div><div class='del'>-    "Signal 0",</div><div class='del'>-    "Hangup",</div><div class='del'>-    "Interrupt",</div><div class='del'>-    "Quit",</div><div class='del'>-    "Illegal instruction",</div><div class='del'>-    "Trace/breakpoint trap",</div><div class='del'>-    "IOT trap",</div><div class='del'>-    "EMT trap",</div><div class='del'>-    "Floating point exception",</div><div class='del'>-    "Killed",</div><div class='del'>-    "Bus error",</div><div class='del'>-    "Segmentation fault",</div><div class='del'>-    "Bad system call",</div><div class='del'>-    "Broken pipe",</div><div class='del'>-    "Alarm clock",</div><div class='del'>-    "Terminated",</div><div class='del'>-    "Urgent I/O condition",</div><div class='del'>-    "Stopped (signal)",</div><div class='del'>-    "Stopped",</div><div class='del'>-    "Continued",</div><div class='del'>-    "Child exited",</div><div class='del'>-    "Stopped (tty input)",</div><div class='del'>-    "Stopped (tty output)",</div><div class='del'>-    "I/O possible",</div><div class='del'>-    "CPU time limit exceeded",</div><div class='del'>-    "File size limit exceeded",</div><div class='del'>-    "Virtual timer expired",</div><div class='del'>-    "Profiling timer expired",</div><div class='del'>-    "Window changed",</div><div class='del'>-    "Resource lost",</div><div class='del'>-    "User defined signal 1",</div><div class='del'>-    "User defined signal 2",</div><div class='del'>-    0</div><div class='del'>-  };</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcdrain.c b/mdk-stage1/dietlibc/lib/tcdrain.c<br/>deleted file mode 100644<br/>index 7a760f643..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcdrain.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcdrain.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-int __libc_tcdrain(int fd)</div><div class='del'>-{</div><div class='del'>-  return ioctl(fd, TCSBRK, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int tcdrain(int fd) __attribute__((weak,alias("__libc_tcdrain")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcflush.c b/mdk-stage1/dietlibc/lib/tcflush.c<br/>deleted file mode 100644<br/>index a19fe11d1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcflush.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcflush.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/* Flush pending data on FD.  */</div><div class='del'>-int tcflush(int fd, int queue_selector)</div><div class='del'>-{</div><div class='del'>-	switch (queue_selector) {</div><div class='del'>-	case TCIFLUSH:</div><div class='del'>-		return ioctl(fd, TCFLSH, 0);</div><div class='del'>-	case TCOFLUSH:</div><div class='del'>-		return ioctl(fd, TCFLSH, 1);</div><div class='del'>-	case TCIOFLUSH:</div><div class='del'>-		return ioctl(fd, TCFLSH, 2);</div><div class='del'>-	default:</div><div class='del'>-		errno = EINVAL;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcgetattr.c b/mdk-stage1/dietlibc/lib/tcgetattr.c<br/>deleted file mode 100644<br/>index f35d39442..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcgetattr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcgetattr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-int tcgetattr(int fildes, struct termios *termios_p)</div><div class='del'>-{</div><div class='del'>-  return ioctl(fildes, TCGETS, termios_p);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcgetpgrp.c b/mdk-stage1/dietlibc/lib/tcgetpgrp.c<br/>deleted file mode 100644<br/>index f2a290651..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcgetpgrp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcgetpgrp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-int tcgetpgrp(int fildes)</div><div class='del'>-{</div><div class='del'>-  return ioctl(fildes, TIOCGPGRP);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcsetattr.c b/mdk-stage1/dietlibc/lib/tcsetattr.c<br/>deleted file mode 100644<br/>index cf70354d2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcsetattr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcsetattr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#define tcsetattr libc_tcsetattr</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#undef tcsetattr</div><div class='del'>-</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/* Hack around a kernel bug; value must correspond to the one used in speed.c */</div><div class='del'>-#define IBAUD0	020000000000</div><div class='del'>-</div><div class='del'>-int tcsetattr(int fildes, int optional_actions, struct termios *termios_p)</div><div class='del'>-{</div><div class='del'>-  termios_p-&gt;c_iflag &amp;= ~IBAUD0;</div><div class='del'>-  switch (optional_actions) {</div><div class='del'>-  case TCSANOW:</div><div class='del'>-    return ioctl(fildes, TCSETS, termios_p);</div><div class='del'>-  case TCSADRAIN:</div><div class='del'>-    return ioctl(fildes, TCSETSW, termios_p);</div><div class='del'>-  case TCSAFLUSH:</div><div class='del'>-    return ioctl(fildes, TCSETSF, termios_p);</div><div class='del'>-  default:</div><div class='del'>-    errno = EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tcsetpgrp.c b/mdk-stage1/dietlibc/lib/tcsetpgrp.c<br/>deleted file mode 100644<br/>index 6c40b5c79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tcsetpgrp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tcsetpgrp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-</div><div class='del'>-int tcsetpgrp(int fildes, pid_t pgrpid)</div><div class='del'>-{</div><div class='del'>-  return ioctl(fildes, TIOCSPGRP, &amp;pgrpid);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/telldir.c b/mdk-stage1/dietlibc/lib/telldir.c<br/>deleted file mode 100644<br/>index 58be5d034..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/telldir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/telldir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "dietdirent.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-</div><div class='del'>-off_t telldir(DIR *d) {</div><div class='del'>-  return lseek(d-&gt;fd,0,SEEK_CUR)-d-&gt;num+d-&gt;cur;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/tolower.c b/mdk-stage1/dietlibc/lib/tolower.c<br/>deleted file mode 100644<br/>index 4b7c7cf2d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/tolower.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/tolower.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-inline int tolower(int c) {</div><div class='del'>-  return (c&gt;='A' &amp;&amp; c&lt;='Z')?c-'A'+'a':c;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/toupper.c b/mdk-stage1/dietlibc/lib/toupper.c<br/>deleted file mode 100644<br/>index c048e60bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/toupper.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/toupper.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-inline int toupper(int c) {</div><div class='del'>-  return (c&gt;='a' &amp;&amp; c&lt;='z')?c-'a'+'A':c;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/ttyname.c b/mdk-stage1/dietlibc/lib/ttyname.c<br/>deleted file mode 100644<br/>index a6b479088..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/ttyname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/ttyname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,59 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-</div><div class='del'>-extern int __ltostr(char *s, int size, unsigned long i, int base, char UpCase);</div><div class='del'>-</div><div class='del'>-char *ttyname(int fd) {</div><div class='del'>-#ifdef SLASH_PROC_OK</div><div class='del'>-  char ibuf[20];</div><div class='del'>-  static char obuf[20];</div><div class='del'>-  strcpy(ibuf,"/proc/self/fd/");</div><div class='del'>-  ibuf[__ltostr(ibuf+14,6,fd,10,0)+14]=0;</div><div class='del'>-  if (readlink(ibuf,obuf,sizeof(obuf)-1)&lt;0) return 0;</div><div class='del'>-  return obuf;</div><div class='del'>-#else</div><div class='del'>-  static char buf[20]="/dev/tty";</div><div class='del'>-  struct stat s;</div><div class='del'>-  char *c=buf+8;</div><div class='del'>-  int n;</div><div class='del'>-  if (fstat(fd,&amp;s)) return 0;</div><div class='del'>-  if (S_ISCHR(s.st_mode)) {</div><div class='del'>-    n=minor(s.st_rdev);</div><div class='del'>-    switch (major(s.st_rdev)) {</div><div class='del'>-    case 4:</div><div class='del'>-      buf[5]='t'; buf[7]='y';</div><div class='del'>-      if (n&gt;63) {</div><div class='del'>-	n-=64;</div><div class='del'>-	*c='S';</div><div class='del'>-	++c;</div><div class='del'>-      }</div><div class='del'>-num:</div><div class='del'>-      c[__ltostr(c,6,n,10,0)]=0;</div><div class='del'>-      break;</div><div class='del'>-    case 2:</div><div class='del'>-      buf[5]='p'; buf[7]='y';</div><div class='del'>-      buf[8]='p'-(n&gt;&gt;4);</div><div class='del'>-      buf[9]=n%4+'0';</div><div class='del'>-      if (buf[9]&gt;'9') *c+='a'-'0';</div><div class='del'>-      buf[10]=0;</div><div class='del'>-    case 136:</div><div class='del'>-    case 137:</div><div class='del'>-    case 138:</div><div class='del'>-    case 139:</div><div class='del'>-      buf[5]='p'; buf[7]='s';</div><div class='del'>-      n+=(major(s.st_rdev)-136)&lt;&lt;8;</div><div class='del'>-      *c='/'; ++c;</div><div class='del'>-      goto num;</div><div class='del'>-    default:</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-    return buf;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/usleep.c b/mdk-stage1/dietlibc/lib/usleep.c<br/>deleted file mode 100644<br/>index 494f99233..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/usleep.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/usleep.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-/* nano * 1000 == usecs</div><div class='del'>- * usecs * 1000 == msecs</div><div class='del'>- * msecs * 1000 = secs */</div><div class='del'>-void usleep(unsigned int usecs) {</div><div class='del'>-  struct timespec t;</div><div class='del'>-  t.tv_sec=usecs/1000000;</div><div class='del'>-  t.tv_nsec=(usecs%1000000)*1000;</div><div class='del'>-  nanosleep(&amp;t,&amp;t);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vfork.c b/mdk-stage1/dietlibc/lib/vfork.c<br/>deleted file mode 100644<br/>index 795cddb05..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vfork.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vfork.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-pid_t vfork(void) {</div><div class='del'>-  return fork();</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vfprintf.c b/mdk-stage1/dietlibc/lib/vfprintf.c<br/>deleted file mode 100644<br/>index c33a2404b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vfprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vfprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietstdarg.h"</div><div class='del'>-</div><div class='del'>-int vfprintf(FILE *fstream, const char *format, va_list ap)</div><div class='del'>-{</div><div class='del'>-  char *tmp;</div><div class='del'>-  va_list cp_ap;</div><div class='del'>-  size_t n = 0;</div><div class='del'>-</div><div class='del'>-  va_copy(cp_ap, ap);</div><div class='del'>-  n=vsnprintf(0, 1000000, format, cp_ap);</div><div class='del'>-  tmp=alloca(n+2);</div><div class='del'>-  vsnprintf(tmp, n+1, format, ap);</div><div class='del'>-  fwrite(tmp, n,1, fstream);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vprintf.c b/mdk-stage1/dietlibc/lib/vprintf.c<br/>deleted file mode 100644<br/>index 46ecc47a4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int vprintf(const char *format, va_list ap)</div><div class='del'>-{</div><div class='del'>-  char tmp[1000000];</div><div class='del'>-  size_t n = vsnprintf(tmp, sizeof(tmp), format, ap);</div><div class='del'>-  write(1, tmp, n);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vsnprintf.c b/mdk-stage1/dietlibc/lib/vsnprintf.c<br/>deleted file mode 100644<br/>index f425066e3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vsnprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vsnprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,238 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-extern int __ltostr(char *s, int size, unsigned long i, int base, char UpCase);</div><div class='del'>-extern int __dtostr(double d,char *buf,int maxlen,int prec);</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str, size_t size, const char *format, va_list arg_ptr)</div><div class='del'>-{</div><div class='del'>-  size_t apos,i;</div><div class='del'>-  char ch,buf[1024];</div><div class='del'>-  char *pb;</div><div class='del'>-  char flag_in_sign;</div><div class='del'>-  char flag_hash,flag_zero,flag_left,flag_space,flag_sign,flag_dot,flag_long;</div><div class='del'>-  long number,width,preci,buf_len,pad;</div><div class='del'>-  char padwith;</div><div class='del'>-</div><div class='del'>-  size--;</div><div class='del'>-</div><div class='del'>-  apos=0;</div><div class='del'>-  while (apos&lt;size)</div><div class='del'>-  {</div><div class='del'>-    ch=*format++;</div><div class='del'>-    switch (ch)</div><div class='del'>-    {</div><div class='del'>-    case '%':</div><div class='del'>-      flag_hash=0;</div><div class='del'>-      flag_zero=0;</div><div class='del'>-      flag_left=0;</div><div class='del'>-      flag_space=0;</div><div class='del'>-      flag_sign=0;</div><div class='del'>-      flag_dot=0;</div><div class='del'>-      flag_in_sign=0;</div><div class='del'>-      flag_long=0;</div><div class='del'>-</div><div class='del'>-      width=0;</div><div class='del'>-      padwith=' ';</div><div class='del'>-</div><div class='del'>-inn_vsnprintf:</div><div class='del'>-      if (apos&gt;=size) continue; /* ARGL !!! */</div><div class='del'>-</div><div class='del'>-      ch=*format++;</div><div class='del'>-      switch (ch)</div><div class='del'>-      {</div><div class='del'>-/* Format end ?!? */</div><div class='del'>-      case 0:</div><div class='del'>-	return -1;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-/* Format flag chars */</div><div class='del'>-      case '#':</div><div class='del'>-	flag_hash=1;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case 'l':</div><div class='del'>-	++flag_long;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '0':</div><div class='del'>-	padwith='0';</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '-':</div><div class='del'>-	flag_left=1;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case ' ':</div><div class='del'>-	flag_space=1;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '+':</div><div class='del'>-	flag_sign=1;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '1':</div><div class='del'>-      case '2':</div><div class='del'>-      case '3':</div><div class='del'>-      case '4':</div><div class='del'>-      case '5':</div><div class='del'>-      case '6':</div><div class='del'>-      case '7':</div><div class='del'>-      case '8':</div><div class='del'>-      case '9':</div><div class='del'>-	if(flag_dot) return -1;</div><div class='del'>-	width=strtol(--format,&amp;pb,10);</div><div class='del'>-	format=pb;</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '*':</div><div class='del'>-	width=va_arg(arg_ptr,int);</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-      case '.':</div><div class='del'>-	flag_dot=1;</div><div class='del'>-	if (*format=='*') {</div><div class='del'>-	  preci=va_arg(arg_ptr,int);</div><div class='del'>-	  ++format;</div><div class='del'>-	} else {</div><div class='del'>-	  preci=strtol(format,&amp;pb,10);</div><div class='del'>-	  format=pb;</div><div class='del'>-	}</div><div class='del'>-	goto inn_vsnprintf;</div><div class='del'>-</div><div class='del'>-/* Format conversion chars */</div><div class='del'>-      case 'c':</div><div class='del'>-	ch=(char)va_arg(arg_ptr,int);</div><div class='del'>-      case '%':</div><div class='del'>-	if (str) str[apos]=ch; ++apos;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case 's':</div><div class='del'>-	pb=va_arg(arg_ptr,char *);</div><div class='del'>-#ifdef WANT_NULL_PRINTF</div><div class='del'>-	if (!pb) pb="(null)";</div><div class='del'>-#endif</div><div class='del'>-	buf_len=strlen(pb);</div><div class='del'>-	if (flag_dot &amp;&amp; buf_len&gt;preci) buf_len=preci;</div><div class='del'>-	if (buf_len&gt;size-apos) buf_len=size-apos;</div><div class='del'>-</div><div class='del'>-print_out:</div><div class='del'>-	if (str) {</div><div class='del'>-	  if (width &amp;&amp; (!flag_left))</div><div class='del'>-	  {</div><div class='del'>-	    for (pad=width-buf_len; pad&gt;0; --pad) str[apos++]=padwith;</div><div class='del'>-	  }</div><div class='del'>-	  for(i=0;i&lt;buf_len;++i) { str[apos++]=pb[i]; } /* strncpy */</div><div class='del'>-	  if (width &amp;&amp; (flag_left))</div><div class='del'>-	  {</div><div class='del'>-	    for (pad=width-buf_len; pad&gt;0; --pad) str[apos++]=padwith;</div><div class='del'>-	  }</div><div class='del'>-	} else {</div><div class='del'>-	  if (width) {</div><div class='del'>-	    apos+=width&gt;buf_len?width:buf_len;</div><div class='del'>-	  } else {</div><div class='del'>-	    apos+=size&gt;buf_len?buf_len:size;</div><div class='del'>-	  }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-	/* Numbers */</div><div class='del'>-      case 'b':</div><div class='del'>-	i=2;</div><div class='del'>-	goto num_vsnprintf;</div><div class='del'>-      case 'p':</div><div class='del'>-	flag_hash=1;</div><div class='del'>-	width=sizeof(void *)&lt;&lt;1;</div><div class='del'>-	padwith='0';</div><div class='del'>-	ch='x';</div><div class='del'>-      case 'X':</div><div class='del'>-      case 'x':</div><div class='del'>-	i=16;</div><div class='del'>-	if (flag_hash)</div><div class='del'>-	{</div><div class='del'>-	  if (str) {</div><div class='del'>-	    str[apos++]='0';</div><div class='del'>-	    str[apos++]=ch;</div><div class='del'>-	  } else</div><div class='del'>-	    apos+=2;</div><div class='del'>-	}</div><div class='del'>-	goto num_vsnprintf;</div><div class='del'>-      case 'd':</div><div class='del'>-      case 'i':</div><div class='del'>-	flag_in_sign=1;</div><div class='del'>-      case 'u':</div><div class='del'>-	i=10;</div><div class='del'>-	goto num_vsnprintf;</div><div class='del'>-      case 'o':</div><div class='del'>-	i=8;</div><div class='del'>-	if (flag_hash) { if (str) str[apos]='0'; ++apos; }</div><div class='del'>-</div><div class='del'>-num_vsnprintf:</div><div class='del'>-	if (apos&gt;=size) continue; /* ARGL !!! */</div><div class='del'>-</div><div class='del'>-	if (flag_long)</div><div class='del'>-	  number=va_arg(arg_ptr,long);</div><div class='del'>-	else</div><div class='del'>-	  number=va_arg(arg_ptr,int);</div><div class='del'>-</div><div class='del'>-	if (flag_in_sign &amp;&amp; (number&lt;0))</div><div class='del'>-	{</div><div class='del'>-	  number*=-1;</div><div class='del'>-	  flag_in_sign=2;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	buf_len=__ltostr(buf+1,sizeof(buf)-1,(unsigned long) number,i,0);</div><div class='del'>-	pb=buf+1;</div><div class='del'>-</div><div class='del'>-	if (flag_in_sign==2)</div><div class='del'>-	{</div><div class='del'>-	  *(--pb)='-';</div><div class='del'>-	  buf_len++;</div><div class='del'>-	}</div><div class='del'>-	else if ((flag_in_sign)&amp;&amp;(flag_sign || flag_space))</div><div class='del'>-	{</div><div class='del'>-	  *(--pb)=(flag_sign)?'+':' ';</div><div class='del'>-	  buf_len++;</div><div class='del'>-	}</div><div class='del'>-	goto print_out;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_FLOATING_POINT_IN_PRINTF</div><div class='del'>-      case 'f':</div><div class='del'>-      case 'g':</div><div class='del'>-	{</div><div class='del'>-	  double d=va_arg(arg_ptr,double);</div><div class='del'>-	  buf_len=__dtostr(d,buf,sizeof(buf),width?width:6);</div><div class='del'>-	  if (flag_dot) {</div><div class='del'>-	    char *tmp;</div><div class='del'>-	    if ((tmp=strchr(buf,'.'))) {</div><div class='del'>-	      while (preci&gt;-1 &amp;&amp; *++tmp) --preci;</div><div class='del'>-	      *tmp=0;</div><div class='del'>-	    }</div><div class='del'>-	  }</div><div class='del'>-	  pb=buf;</div><div class='del'>-	  goto print_out;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-      default:</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      break;</div><div class='del'>-    case 0:</div><div class='del'>-      if (str) str[apos]=0;</div><div class='del'>-      return apos;</div><div class='del'>-    default:</div><div class='del'>-      if (str) str[apos]=ch; apos++;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if (str) str[apos]=0;</div><div class='del'>-  return apos;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-link_warning("vsnprintf","warning: the printf functions add several kilobytes of bloat.")</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vsprintf.c b/mdk-stage1/dietlibc/lib/vsprintf.c<br/>deleted file mode 100644<br/>index 10ff04bd7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vsprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vsprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int vsprintf(char *dest,const char *format, va_list arg_ptr)</div><div class='del'>-{</div><div class='del'>-  return vsnprintf(dest,1000000,format,arg_ptr);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/vsscanf.c b/mdk-stage1/dietlibc/lib/vsscanf.c<br/>deleted file mode 100644<br/>index 1c4c9b787..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/vsscanf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/vsscanf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,304 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-const char *skip_ws(const char *str)</div><div class='del'>-{</div><div class='del'>-  while ((*str)&amp;&amp;(isspace(*str))) str++;</div><div class='del'>-  return str;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern double strtod(const char *s,char **f);</div><div class='del'>-</div><div class='del'>-int vsscanf(const char *str, const char *format, va_list arg_ptr)</div><div class='del'>-{</div><div class='del'>-  int n=0,div;</div><div class='del'>-  unsigned char ch;</div><div class='del'>-</div><div class='del'>-  char flag_discard, flag_malloc, flag_half, flag_long, flag_longlong;</div><div class='del'>-  char flag_width;</div><div class='del'>-</div><div class='del'>-  unsigned long width;</div><div class='del'>-</div><div class='del'>-  /* arg_ptr tmps */</div><div class='del'>-#ifdef WANT_FLOATING_POINT_IN_SCANF</div><div class='del'>-  double d,*pd;</div><div class='del'>-  float *pf;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  long l=0,*pl;</div><div class='del'>-  short *ph;</div><div class='del'>-  int *pi;</div><div class='del'>-  char *s;</div><div class='del'>-</div><div class='del'>-  while ((*str)&amp;&amp;(*format))</div><div class='del'>-  {</div><div class='del'>-    const char *prevfmt=format;</div><div class='del'>-    format=skip_ws(format);</div><div class='del'>-    ch=*format++;</div><div class='del'>-    if (!ch) continue;</div><div class='del'>-</div><div class='del'>-    switch (ch)</div><div class='del'>-    {</div><div class='del'>-    case '%':</div><div class='del'>-      div=0;</div><div class='del'>-      flag_discard=0;</div><div class='del'>-      flag_malloc=0;</div><div class='del'>-      flag_half=0;</div><div class='del'>-      flag_long=0;</div><div class='del'>-      flag_longlong=0;</div><div class='del'>-</div><div class='del'>-      flag_width=0;</div><div class='del'>-      width=-1;</div><div class='del'>-</div><div class='del'>-inn_vsscanf:</div><div class='del'>-      ch=*format++;</div><div class='del'>-</div><div class='del'>-      switch (ch)</div><div class='del'>-      {</div><div class='del'>-      case 0:</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-      case '%':</div><div class='del'>-	if (*(str++)!=ch) return n;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      /* flags */</div><div class='del'>-      case '*':</div><div class='del'>-	flag_discard=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-      case 'a':</div><div class='del'>-	flag_malloc=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-      case 'h':</div><div class='del'>-	flag_half=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-      case 'l':</div><div class='del'>-	if (flag_long) flag_longlong=1;</div><div class='del'>-	flag_long=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-	/* longlong ? NOT YET ! */</div><div class='del'>-      case 'q':</div><div class='del'>-      case 'L':</div><div class='del'>-	flag_longlong=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-      case '1':</div><div class='del'>-      case '2':</div><div class='del'>-      case '3':</div><div class='del'>-      case '4':</div><div class='del'>-      case '5':</div><div class='del'>-      case '6':</div><div class='del'>-      case '7':</div><div class='del'>-      case '8':</div><div class='del'>-      case '9':</div><div class='del'>-	width=strtol(format-1,&amp;s,10);</div><div class='del'>-	format=s;</div><div class='del'>-	flag_width=1;</div><div class='del'>-	goto inn_vsscanf;</div><div class='del'>-</div><div class='del'>-      /* conversion */</div><div class='del'>-</div><div class='del'>-      case 'n':</div><div class='del'>-	while (width &amp;&amp; *str)</div><div class='del'>-	{</div><div class='del'>-	  *(s++)=*(str++);</div><div class='del'>-	  --width;</div><div class='del'>-	  l++;</div><div class='del'>-	}</div><div class='del'>-	if (!flag_discard)</div><div class='del'>-	{</div><div class='del'>-	  pl=(long *)va_arg(arg_ptr,long*);</div><div class='del'>-	  *pl=l;</div><div class='del'>-	  ++n;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case 'p':</div><div class='del'>-      case 'X':</div><div class='del'>-      case 'x':</div><div class='del'>-	div+=6;</div><div class='del'>-      case 'd':</div><div class='del'>-	div+=2;</div><div class='del'>-      case 'o':</div><div class='del'>-	div+=8;</div><div class='del'>-      case 'u':</div><div class='del'>-      case 'i':</div><div class='del'>-	if (*(str=skip_ws(str)))</div><div class='del'>-	{</div><div class='del'>-	  l=strtol(str,&amp;s,div);</div><div class='del'>-	  if (str!=s)</div><div class='del'>-	  {</div><div class='del'>-	    if (!flag_discard)</div><div class='del'>-	    {</div><div class='del'>-	      if (flag_long)</div><div class='del'>-	      {</div><div class='del'>-		pl=(long *)va_arg(arg_ptr,long*);</div><div class='del'>-		*pl=l;</div><div class='del'>-	      }</div><div class='del'>-	      else if (flag_half)</div><div class='del'>-	      {</div><div class='del'>-		ph=(short *)va_arg(arg_ptr,short*);</div><div class='del'>-		*ph=l;</div><div class='del'>-	      }</div><div class='del'>-	      else</div><div class='del'>-	      {</div><div class='del'>-		pi=(int *)va_arg(arg_ptr,int*);</div><div class='del'>-		*pi=l;</div><div class='del'>-	      }</div><div class='del'>-	      ++n;</div><div class='del'>-	    }</div><div class='del'>-	    str=s;</div><div class='del'>-	  }</div><div class='del'>-	  else</div><div class='del'>-	    return n;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_FLOATING_POINT_IN_SCANF</div><div class='del'>-      case 'e':</div><div class='del'>-      case 'E':</div><div class='del'>-      case 'f':</div><div class='del'>-      case 'g':</div><div class='del'>-	if (*(str=skip_ws(str)))</div><div class='del'>-	{</div><div class='del'>-	  d=strtod(str,&amp;s);</div><div class='del'>-	  if (str!=s)</div><div class='del'>-	  {</div><div class='del'>-	    if (!flag_discard)</div><div class='del'>-	    {</div><div class='del'>-	      if (flag_long)</div><div class='del'>-	      {</div><div class='del'>-		pd=(double *)va_arg(arg_ptr,double*);</div><div class='del'>-		*pd=d;</div><div class='del'>-	      }</div><div class='del'>-	      else</div><div class='del'>-	      {</div><div class='del'>-		pf=(float *)va_arg(arg_ptr,float*);</div><div class='del'>-		*pf=d;</div><div class='del'>-	      }</div><div class='del'>-	      ++n;</div><div class='del'>-	    }</div><div class='del'>-	    str=s;</div><div class='del'>-	  }</div><div class='del'>-	  else</div><div class='del'>-	    return n;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-      case 'c':</div><div class='del'>-	if (!flag_discard)</div><div class='del'>-	{</div><div class='del'>-	  s=(char *)va_arg(arg_ptr,char*);</div><div class='del'>-	  ++n;</div><div class='del'>-	}</div><div class='del'>-	if (!flag_width) width=1;</div><div class='del'>-	while (width &amp;&amp; *str)</div><div class='del'>-	{</div><div class='del'>-	  if (!flag_discard) *(s++)=*(str);</div><div class='del'>-	  ++str;</div><div class='del'>-	  --width;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case 's':</div><div class='del'>-	if (!flag_discard)</div><div class='del'>-	{</div><div class='del'>-	  s=(char *)va_arg(arg_ptr,char*);</div><div class='del'>-	  ++n;</div><div class='del'>-	}</div><div class='del'>-	if (*(str=skip_ws(str)))</div><div class='del'>-	{</div><div class='del'>-	  while (width &amp;&amp; (!isspace(*str)))</div><div class='del'>-	  {</div><div class='del'>-	    if (!flag_discard) *(s++)=*(str);</div><div class='del'>-	    if (!*str) break;</div><div class='del'>-	    ++str;</div><div class='del'>-	    --width;</div><div class='del'>-	  }</div><div class='del'>-	  *s=0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_CHARACTER_CLASSES_IN_SCANF</div><div class='del'>-      case '[':</div><div class='del'>-	{</div><div class='del'>-	  char cset[256];</div><div class='del'>-	  int flag_not=0;</div><div class='del'>-	  int flag_dash=0;</div><div class='del'>-	  memset(cset,0,sizeof(cset));</div><div class='del'>-	  ch=*format++;</div><div class='del'>-</div><div class='del'>-	  /* first char specials */</div><div class='del'>-	  if (ch=='^')</div><div class='del'>-	  {</div><div class='del'>-	    flag_not=1;</div><div class='del'>-	    ch=*format++;</div><div class='del'>-	  }</div><div class='del'>-	  if ((ch=='-')||(ch==']'))</div><div class='del'>-	  {</div><div class='del'>-	    cset[ch]=1;</div><div class='del'>-	    ch=*format++;</div><div class='del'>-	  }</div><div class='del'>-</div><div class='del'>-	  /* almost all non special chars */</div><div class='del'>-	  for (;(*format) &amp;&amp; (*format!=']');++format) {</div><div class='del'>-	    if (flag_dash)</div><div class='del'>-	    {</div><div class='del'>-	      register unsigned char tmp=*format;</div><div class='del'>-	      for (;ch&lt;=tmp;++ch) cset[ch]=1;</div><div class='del'>-	      flag_dash=0;</div><div class='del'>-	      ch=*(++format);</div><div class='del'>-	    }</div><div class='del'>-	    else if (*format=='-') flag_dash=1;</div><div class='del'>-	    else</div><div class='del'>-	    {</div><div class='del'>-	      cset[ch]=1;</div><div class='del'>-	      ch=*format;</div><div class='del'>-	    }</div><div class='del'>-	  }</div><div class='del'>-</div><div class='del'>-	  /* last char specials */</div><div class='del'>-	  if (flag_dash) cset['-']=1;</div><div class='del'>-	  else cset[ch]=1;</div><div class='del'>-</div><div class='del'>-	  /* like %c or %s */</div><div class='del'>-	  if (!flag_discard)</div><div class='del'>-	  {</div><div class='del'>-	    s=(char *)va_arg(arg_ptr,char*);</div><div class='del'>-	    ++n;</div><div class='del'>-	  }</div><div class='del'>-	  while (width &amp;&amp; (cset[(unsigned char)(*str)]-flag_not))</div><div class='del'>-	  {</div><div class='del'>-	    if (!flag_discard) *(s++)=*(str);</div><div class='del'>-	    if (!*str) break;</div><div class='del'>-	    ++str;</div><div class='del'>-	    --width;</div><div class='del'>-	  }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-#endif</div><div class='del'>-      }</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      if (prevfmt&lt;format) {</div><div class='del'>-	while (prevfmt&lt;format) {</div><div class='del'>-	  if (*str!=*prevfmt) return n;</div><div class='del'>-	  ++str; ++prevfmt;</div><div class='del'>-	}</div><div class='del'>-      } else</div><div class='del'>-	if (*(str++)!=ch) return n;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/wait.c b/mdk-stage1/dietlibc/lib/wait.c<br/>deleted file mode 100644<br/>index 8459af18c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/wait.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/wait.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-</div><div class='del'>-pid_t wait(int *status) {</div><div class='del'>-  return waitpid(-1,status,0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/lib/wait3.c b/mdk-stage1/dietlibc/lib/wait3.c<br/>deleted file mode 100644<br/>index 19e90740c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/lib/wait3.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/lib/wait3.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-</div><div class='del'>-int wait3(int* status,int opts,struct rusage* rusage) {</div><div class='del'>-  return wait4(-1,status,opts,rusage);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/___div.c b/mdk-stage1/dietlibc/libcruft/___div.c<br/>deleted file mode 100644<br/>index d359dc47b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/___div.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/___div.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-div_t div(int numer, int denom) {</div><div class='del'>-  div_t temp;</div><div class='del'>-  temp.quot=numer/denom;</div><div class='del'>-  temp.rem=numer%denom;</div><div class='del'>-  return temp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-link_warning("div","warning: your code uses div(), which is completely superfluous!");</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/dnscruft.c b/mdk-stage1/dietlibc/libcruft/dnscruft.c<br/>deleted file mode 100644<br/>index d7a0efa50..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/dnscruft.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/dnscruft.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,115 +0,0 @@</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-int __dns_fd=-1;</div><div class='del'>-</div><div class='del'>-void __dns_make_fd() {</div><div class='del'>-  int tmp;</div><div class='del'>-  struct sockaddr_in si;</div><div class='del'>-  if (__dns_fd&gt;0) return;</div><div class='del'>-  tmp=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP);</div><div class='del'>-  if (tmp&lt;0) {</div><div class='del'>-	  perror("__dns_make_fd!socket");</div><div class='del'>-	  return;</div><div class='del'>-  }</div><div class='del'>-  si.sin_family=AF_INET;</div><div class='del'>-  si.sin_port=0;</div><div class='del'>-  si.sin_addr.s_addr=INADDR_ANY;</div><div class='del'>-  if (bind(tmp,(struct sockaddr*)&amp;si,sizeof(si))) {</div><div class='del'>-	  perror("__dns_make_fd!bind");</div><div class='del'>-	  return;</div><div class='del'>-  }</div><div class='del'>-  __dns_fd=tmp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int __dns_servers=0;</div><div class='del'>-struct sockaddr __dns_server_ips[8];</div><div class='del'>-</div><div class='del'>-int __dns_search=0;</div><div class='del'>-char *__dns_domains[8];</div><div class='del'>-</div><div class='del'>-void __dns_readstartfiles() {</div><div class='del'>-  int fd;</div><div class='del'>-  char *buf=alloca(4096);</div><div class='del'>-  int len;</div><div class='del'>-  if (__dns_servers&gt;0) return;</div><div class='del'>-  {</div><div class='del'>-    struct sockaddr_in to;</div><div class='del'>-    char *cacheip=getenv("DNSCACHEIP");</div><div class='del'>-    if (cacheip) {</div><div class='del'>-      to.sin_port=htons(53);</div><div class='del'>-      to.sin_family=AF_INET;</div><div class='del'>-      if (inet_aton(cacheip,&amp;to.sin_addr)) {</div><div class='del'>-	memmove(__dns_server_ips,&amp;to,sizeof(struct sockaddr));</div><div class='del'>-	++__dns_servers;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if ((fd=open("/etc/resolv.conf",O_RDONLY))&lt;0) return;</div><div class='del'>-  len=read(fd,buf,4096);</div><div class='del'>-  close(fd);</div><div class='del'>-  {</div><div class='del'>-    char *last=buf+len;</div><div class='del'>-    for (; buf&lt;last;) {</div><div class='del'>-      if (!strncmp(buf,"nameserver",10)) {</div><div class='del'>-	buf+=10;</div><div class='del'>-	while (buf&lt;last &amp;&amp; *buf!='\n') {</div><div class='del'>-	  while (buf&lt;last &amp;&amp; isblank(*buf)) ++buf;</div><div class='del'>-	  {</div><div class='del'>-	    char *tmp=buf;</div><div class='del'>-	    struct sockaddr_in i;</div><div class='del'>-	    while (buf&lt;last &amp;&amp; !isspace(*buf)) ++buf;</div><div class='del'>-	    if (buf&gt;=last) break;</div><div class='del'>-	    *buf=0;</div><div class='del'>-	    if (inet_aton(tmp,&amp;i.sin_addr)) {</div><div class='del'>-	      i.sin_family=AF_INET;</div><div class='del'>-	      i.sin_port=htons(53);</div><div class='del'>-	      memmove(&amp;__dns_server_ips[__dns_servers],&amp;i,sizeof(struct sockaddr));</div><div class='del'>-	      if (__dns_servers&lt;8) ++__dns_servers;</div><div class='del'>-	    }</div><div class='del'>-	  }</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      if (!strncmp(buf,"search",6) || !strncmp(buf,"domain",6)) {</div><div class='del'>-	buf+=6;</div><div class='del'>-      }</div><div class='del'>-      while (buf&lt;last &amp;&amp; *buf!='\n') ++buf;</div><div class='del'>-      while (buf&lt;last &amp;&amp; *buf=='\n') ++buf;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* return length of decoded data or -1 */</div><div class='del'>-int __dns_decodename(unsigned char *packet,int offset,unsigned char *dest,int maxlen) {</div><div class='del'>-  unsigned char *tmp;</div><div class='del'>-  unsigned char *max=dest+maxlen;</div><div class='del'>-  unsigned char *after=packet+offset;</div><div class='del'>-  int ok=0;</div><div class='del'>-  for (tmp=after; maxlen&gt;0&amp;&amp;*tmp; ) {</div><div class='del'>-    if ((*tmp&gt;&gt;6)==3) {		/* goofy DNS decompression */</div><div class='del'>-      unsigned int ofs=((unsigned int)(*tmp&amp;0x3f)&lt;&lt;8)|*(tmp+1);</div><div class='del'>-      if (ofs&gt;=offset) return -1;	/* RFC1035: "pointer to a _prior_ occurrance" */</div><div class='del'>-      if (after&lt;tmp+2) after=tmp+2;</div><div class='del'>-      tmp=packet+ofs;</div><div class='del'>-      ok=0;</div><div class='del'>-    } else {</div><div class='del'>-      unsigned int duh;</div><div class='del'>-      if (dest+*tmp+1&gt;max) return -1;</div><div class='del'>-      for (duh=*tmp; duh&gt;0; --duh)</div><div class='del'>-	*dest++=*++tmp;</div><div class='del'>-      *dest++='.'; ok=1;</div><div class='del'>-      ++tmp;</div><div class='del'>-      if (tmp&gt;after) { after=tmp; if (!*tmp) ++after; }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if (ok) --dest;</div><div class='del'>-  *dest=0;</div><div class='del'>-  return after-packet;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/dnscruft2.c b/mdk-stage1/dietlibc/libcruft/dnscruft2.c<br/>deleted file mode 100644<br/>index b59207072..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/dnscruft2.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/dnscruft2.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,185 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-extern int h_errno;</div><div class='del'>-</div><div class='del'>-static char dnspacket[]="\xfe\xfe\001\000\000\001\000\000\000\000\000\000";</div><div class='del'>-</div><div class='del'>-extern void __dns_make_fd();</div><div class='del'>-extern int __dns_fd;</div><div class='del'>-</div><div class='del'>-extern int __dns_servers;</div><div class='del'>-extern struct sockaddr __dns_server_ips[];</div><div class='del'>-</div><div class='del'>-extern void __dns_readstartfiles();</div><div class='del'>-</div><div class='del'>-extern int __dns_decodename(unsigned char *packet,int offset,unsigned char *dest,int maxlen);</div><div class='del'>-</div><div class='del'>-/* Oh boy, this interface sucks so badly, there are no words for it.</div><div class='del'>- * Not one, not two, but _three_ error signalling methods!  (*h_errnop</div><div class='del'>- * nonzero?  return value nonzero?  *RESULT zero?)  The glibc goons</div><div class='del'>- * really outdid themselves with this one. */</div><div class='del'>-int __dns_gethostbyx_r(const char* name, struct hostent* result,</div><div class='del'>-			char *buf, size_t buflen,</div><div class='del'>-			struct hostent **RESULT, int *h_errnop, int lookfor) {</div><div class='del'>-  int names,ips;</div><div class='del'>-  unsigned char *cur;</div><div class='del'>-  unsigned char *max;</div><div class='del'>-  unsigned char packet[512];</div><div class='del'>-  __dns_make_fd();</div><div class='del'>-</div><div class='del'>-  if (lookfor==1) {</div><div class='del'>-    result-&gt;h_aliases=(char**)(buf+8*4);</div><div class='del'>-    result-&gt;h_addrtype=AF_INET;</div><div class='del'>-    result-&gt;h_length=4;</div><div class='del'>-    result-&gt;h_addr_list=(char**)buf;</div><div class='del'>-  } else {</div><div class='del'>-    result-&gt;h_aliases=(char**)(buf+8*16);</div><div class='del'>-    result-&gt;h_addrtype=AF_INET6;</div><div class='del'>-    result-&gt;h_length=16;</div><div class='del'>-    result-&gt;h_addr_list=(char**)buf;</div><div class='del'>-  }</div><div class='del'>-  result-&gt;h_aliases[0]=0;</div><div class='del'>-</div><div class='del'>-  cur=buf+16*sizeof(char*);</div><div class='del'>-  max=buf+buflen;</div><div class='del'>-  names=ips=0;</div><div class='del'>-</div><div class='del'>-  memmove(packet,dnspacket,12);</div><div class='del'>-  *(unsigned short*)packet=rand();</div><div class='del'>-  {</div><div class='del'>-    unsigned char* x;</div><div class='del'>-    const char* y,* tmp;</div><div class='del'>-    x=packet+12; y=name;</div><div class='del'>-    while (*y) {</div><div class='del'>-      while (*y=='.') ++y;</div><div class='del'>-      for (tmp=y; *tmp &amp;&amp; *tmp!='.'; ++tmp) ;</div><div class='del'>-      *x=tmp-y;</div><div class='del'>-      if (!(tmp-y)) break;</div><div class='del'>-      ++x;</div><div class='del'>-      if (x&gt;=packet+510-(tmp-y)) { *h_errnop=ERANGE; return 1; }</div><div class='del'>-      memmove(x,y,tmp-y);</div><div class='del'>-      x+=tmp-y;</div><div class='del'>-      if (!*tmp) {</div><div class='del'>-	*x=0;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      y=tmp;</div><div class='del'>-    }</div><div class='del'>-    *++x= 0; *++x= lookfor;	/* A */</div><div class='del'>-    *++x= 0; *++x= 1;	/* IN */</div><div class='del'>-    ++x;</div><div class='del'>-    {</div><div class='del'>-      int i;	/* current server */</div><div class='del'>-      int j;	/* timeout count down */</div><div class='del'>-      struct pollfd duh;</div><div class='del'>-      i=0; j=30;</div><div class='del'>-      __dns_readstartfiles();</div><div class='del'>-      duh.fd=__dns_fd;</div><div class='del'>-      duh.events=POLLIN;</div><div class='del'>-      for (j=30; j&gt;0; --j) {</div><div class='del'>-	sendto(__dns_fd,packet,x-packet,0,(struct sockaddr*)&amp;(__dns_server_ips[i]),sizeof(struct sockaddr));</div><div class='del'>-	if (++i &gt; __dns_servers) i=0;</div><div class='del'>-	if (poll(&amp;duh,1,1) == 1) {</div><div class='del'>-	  /* read and parse answer */</div><div class='del'>-	  unsigned char inpkg[1500];</div><div class='del'>-	  /*int len=*/ read(__dns_fd,inpkg,1500);</div><div class='del'>-#if 0</div><div class='del'>-	  {</div><div class='del'>-	    int tft=open("duh",0);</div><div class='del'>-	    read(tft,inpkg,1500);</div><div class='del'>-	    close(tft);</div><div class='del'>-	  }</div><div class='del'>-#endif</div><div class='del'>-	  /* header, question, answer, authority, additional */</div><div class='del'>-	  if (inpkg[0]!=packet[0] || inpkg[1]!=packet[1]) continue;	/* wrong ID */</div><div class='del'>-	  if ((inpkg[2]&amp;0xf9) != 0x81) continue;	/* not answer */</div><div class='del'>-	  if ((inpkg[3]&amp;0x0f) != 0) break;		/* error */</div><div class='del'>-	  tmp=inpkg+12;</div><div class='del'>-	  {</div><div class='del'>-	    char name[257];</div><div class='del'>-	    unsigned short q=((unsigned short)inpkg[4]&lt;&lt;8)+inpkg[5];</div><div class='del'>-	    while (q&gt;0) {</div><div class='del'>-	      while (*tmp) tmp+=*tmp+1;</div><div class='del'>-	      tmp+=5;</div><div class='del'>-	      --q;</div><div class='del'>-	    }</div><div class='del'>-	    q=((unsigned short)inpkg[6]&lt;&lt;8)+inpkg[7];</div><div class='del'>-	    if (q&lt;1) break;</div><div class='del'>-	    while (q&gt;0) {</div><div class='del'>-	      int decofs=__dns_decodename(inpkg,tmp-(char*)inpkg,name,256);</div><div class='del'>-	      if (decofs&lt;0) break;</div><div class='del'>-	      tmp=inpkg+decofs;</div><div class='del'>-	      --q;</div><div class='del'>-	      if (tmp[0]!=0 || tmp[1]!=lookfor ||	/* TYPE != A */</div><div class='del'>-	          tmp[2]!=0 || tmp[3]!=1) {		/* CLASS != IN */</div><div class='del'>-		if (tmp[1]==5) {	/* CNAME */</div><div class='del'>-		  tmp+=10;</div><div class='del'>-		  decofs=__dns_decodename(inpkg,tmp-(char*)inpkg,name,256);</div><div class='del'>-		  if (decofs&lt;0) break;</div><div class='del'>-		  tmp=inpkg+decofs;</div><div class='del'>-		} else</div><div class='del'>-		  break;</div><div class='del'>-		continue;</div><div class='del'>-	      }</div><div class='del'>-	      tmp+=10;	/* skip type, class, TTL and length */</div><div class='del'>-	      {</div><div class='del'>-		int slen;</div><div class='del'>-		if (lookfor==1 || lookfor==28) /* A or AAAA*/ {</div><div class='del'>-		  slen=strlen(name);</div><div class='del'>-		  if (cur+slen+8+(lookfor==28?12:0)&gt;=max) { *h_errnop=NO_RECOVERY; return 1; }</div><div class='del'>-		} else if (lookfor==12) /* PTR */ {</div><div class='del'>-		  decofs=__dns_decodename(inpkg,tmp-(char*)inpkg,name,256);</div><div class='del'>-		  if (decofs&lt;0) break;</div><div class='del'>-		  tmp=inpkg+decofs;</div><div class='del'>-		  slen=strlen(name);</div><div class='del'>-		} else</div><div class='del'>-		  slen=strlen(name);</div><div class='del'>-		strcpy(cur,name);</div><div class='del'>-		if (names==0)</div><div class='del'>-		  result-&gt;h_name=cur;</div><div class='del'>-		else</div><div class='del'>-		  result-&gt;h_aliases[names-1]=cur;</div><div class='del'>-		result-&gt;h_aliases[names]=0;</div><div class='del'>-		++names;</div><div class='del'>-/*		cur+=slen+1; */</div><div class='del'>-		cur+=(slen|3)+1;</div><div class='del'>-		result-&gt;h_addr_list[ips++] = cur;</div><div class='del'>-		if (lookfor==1) /* A */ {</div><div class='del'>-		  *(int*)cur=*(int*)tmp;</div><div class='del'>-		  cur+=4;</div><div class='del'>-		  result-&gt;h_addr_list[ips]=0;</div><div class='del'>-		} else if (lookfor==28) /* AAAA */ {</div><div class='del'>-		  {</div><div class='del'>-		    int i;</div><div class='del'>-		    for (i=0; i&lt;16; ++i) cur[i]=tmp[i];</div><div class='del'>-		  }</div><div class='del'>-		  cur+=16;</div><div class='del'>-		  result-&gt;h_addr_list[ips]=0;</div><div class='del'>-		}</div><div class='del'>-	      }</div><div class='del'>-/*	      puts(name); */</div><div class='del'>-	    }</div><div class='del'>-	  }</div><div class='del'>-/*	  printf("%d answers\n",((unsigned short)inpkg[6]&lt;&lt;8)+inpkg[7]);</div><div class='del'>-	  printf("ok\n");*/</div><div class='del'>-	  *h_errnop=0;</div><div class='del'>-	  *RESULT=result;</div><div class='del'>-	  return 0;</div><div class='del'>-	}</div><div class='del'>-/*kaputt:*/</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/entlib.c b/mdk-stage1/dietlibc/libcruft/entlib.c<br/>deleted file mode 100644<br/>index f88b3f057..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/entlib.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/entlib.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,153 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/lib/entlib.c - Generic delimited-line parsing library</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Jeff Garzik &lt;jgarzik@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is a brand new implementation, based on the interface</div><div class='del'>- * described in man-pages-1.34-1mdk man pages package.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "entlib.h" /* this is our only include */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * __ent_start</div><div class='del'>- *</div><div class='del'>- * Allocates and zeroes the module's state structure,</div><div class='del'>- * and open a handle to /etc/passwd.</div><div class='del'>- *</div><div class='del'>- * Returns -1 on failure and sets errno, or zero for success.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int __ent_start(const char *pathname, struct __ent_state **st_ref)</div><div class='del'>-{</div><div class='del'>-	struct __ent_state *st;</div><div class='del'>-	</div><div class='del'>-	if (*st_ref)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	st = calloc(1, sizeof(*st));</div><div class='del'>-	if (!st) {</div><div class='del'>-		errno = ENOMEM;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	st-&gt;fd = open(pathname, O_RDONLY);</div><div class='del'>-	if (st-&gt;fd == -1) {</div><div class='del'>-		/* errno should have been set by open(2) */</div><div class='del'>-		free(st);</div><div class='del'>-		st = NULL;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	*st_ref = st;</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * __ent_get_line</div><div class='del'>- *</div><div class='del'>- * Eliminates a previous line from the buffer, if any.</div><div class='del'>- * Then reads in a new line from /etc/passwd, if necessary.</div><div class='del'>- *</div><div class='del'>- * Returns -1 on failure, or zero for success.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int __ent_get_line(struct __ent_state *st)</div><div class='del'>-{</div><div class='del'>-	int rc;</div><div class='del'>-</div><div class='del'>-	/* overwrite previous line, by shifting the rest</div><div class='del'>-	 * of the rest to the front of the buffer</div><div class='del'>-	 */</div><div class='del'>-	if (st-&gt;bufptr) {</div><div class='del'>-		unsigned int slop = st-&gt;buflen - st-&gt;bufptr;</div><div class='del'>-		memmove(st-&gt;ent_buf, &amp;st-&gt;ent_buf[st-&gt;bufptr], slop);</div><div class='del'>-		st-&gt;bufptr = 0;</div><div class='del'>-		st-&gt;buflen = slop;</div><div class='del'>-		st-&gt;ent_buf[st-&gt;buflen] = 0; /* null terminate */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (st-&gt;buflen == __ENT_BUFSIZ || strchr(st-&gt;ent_buf, '\n'))</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	rc = read(st-&gt;fd, &amp;st-&gt;ent_buf[st-&gt;buflen], __ENT_BUFSIZ - st-&gt;buflen);</div><div class='del'>-	if (rc &lt; 0)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	st-&gt;buflen += rc;</div><div class='del'>-	if (st-&gt;buflen == 0)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * __ent_split</div><div class='del'>- *</div><div class='del'>- * Splits a string into parts based on a delimiter.</div><div class='del'>- * Stops processing when \n is reached also.</div><div class='del'>- *</div><div class='del'>- * Returns -1 on failure, or zero on success.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int __ent_split(struct __ent_state *st, char **parts,</div><div class='del'>-		int n_parts, int delimiter, int require_exact)</div><div class='del'>-{</div><div class='del'>-	char *s = &amp;st-&gt;ent_buf[st-&gt;bufptr];</div><div class='del'>-	int idx = 0;</div><div class='del'>-</div><div class='del'>-	/* empty list */</div><div class='del'>-	if (!*s) {</div><div class='del'>-		if (!require_exact)</div><div class='del'>-			return 0;</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* scan through string, sticking string pointers</div><div class='del'>-	 * into parts[] as delimiters are found</div><div class='del'>-	 */</div><div class='del'>-	parts[idx++] = s;</div><div class='del'>-	while (*s) {</div><div class='del'>-		st-&gt;bufptr++;</div><div class='del'>-		if (*s == '\n') {</div><div class='del'>-			*s = 0; /* null terminate */</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-		if (*s == delimiter) {</div><div class='del'>-			*s = 0; /* null terminate */</div><div class='del'>-			/* boundary error: too many delimiters */</div><div class='del'>-			if (idx == n_parts)</div><div class='del'>-				return -1;</div><div class='del'>-			s++;</div><div class='del'>-			parts[idx++] = s;</div><div class='del'>-		} else {</div><div class='del'>-			s++;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!require_exact)</div><div class='del'>-		return 0;</div><div class='del'>-	return (n_parts == idx) ? 0 : -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void __ent_set(struct __ent_state *st)</div><div class='del'>-{</div><div class='del'>-	if (!st)</div><div class='del'>-		return;</div><div class='del'>-	st-&gt;buflen = st-&gt;bufptr = 0;</div><div class='del'>-	lseek(st-&gt;fd, 0, SEEK_SET);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void __ent_end(struct __ent_state *st)</div><div class='del'>-{</div><div class='del'>-	if (!st)</div><div class='del'>-		return;</div><div class='del'>-	close(st-&gt;fd);</div><div class='del'>-	free(st);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/entlib.h b/mdk-stage1/dietlibc/libcruft/entlib.h<br/>deleted file mode 100644<br/>index 2659d542e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/entlib.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/entlib.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,44 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/lib/entlib.h - Generic delimited-line parsing library header</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Jeff Garzik &lt;jgarzik@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is a brand new implementation, based on the interface</div><div class='del'>- * described in man-pages-1.34-1mdk man pages package.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __ENTLIB_H</div><div class='del'>-#define __ENTLIB_H</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;	/* for open(2), lseek(2) */</div><div class='del'>-#include &lt;sys/stat.h&gt;	/* for open(2) */</div><div class='del'>-#include &lt;fcntl.h&gt;	/* for open(2) */</div><div class='del'>-#include &lt;unistd.h&gt;	/* for close(2), lseek(2) */</div><div class='del'>-#include &lt;stdlib.h&gt;	/* for calloc(3), free(3) */</div><div class='del'>-#include &lt;errno.h&gt;	/* for errno */</div><div class='del'>-#include &lt;string.h&gt;	/* for memmove(3) */</div><div class='del'>-#include &lt;stdlib.h&gt;	/* for atoi(3) */</div><div class='del'>-#include &lt;paths.h&gt;	/* for the file locations */</div><div class='del'>-</div><div class='del'>-#include &lt;pwd.h&gt;	/* for struct passwd */</div><div class='del'>-#include &lt;grp.h&gt;	/* for struct group */</div><div class='del'>-#include &lt;shadow.h&gt;	/* for struct spwd */</div><div class='del'>-</div><div class='del'>-/* should be a multiple of 64 to create decent alignment */</div><div class='del'>-#define __ENT_BUFSIZ (64 * 2)</div><div class='del'>-#define __ENT_RAW_BUFSIZ (__ENT_BUFSIZ + 2) /* some overlap required */</div><div class='del'>-</div><div class='del'>-struct __ent_state {</div><div class='del'>-	char ent_buf[__ENT_RAW_BUFSIZ];	/* raw file data buffer */</div><div class='del'>-	unsigned int buflen;		/* amount of valid data in ent_buf */</div><div class='del'>-	unsigned int bufptr;		/* next valid position in ent_buf */</div><div class='del'>-	int fd;				/* /etc/passwd file descriptor */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern int __ent_start(const char *pathname, struct __ent_state **st_ref);</div><div class='del'>-extern int __ent_get_line(struct __ent_state *st);</div><div class='del'>-extern int __ent_split(struct __ent_state *st, char **parts, int n_parts, int delimiter, int require_exact);</div><div class='del'>-extern void __ent_set(struct __ent_state *st);</div><div class='del'>-extern void __ent_end(struct __ent_state *st);</div><div class='del'>-</div><div class='del'>-#endif /* __ENTLIB_H */</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getdtablesize.c b/mdk-stage1/dietlibc/libcruft/getdtablesize.c<br/>deleted file mode 100644<br/>index 227354714..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getdtablesize.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getdtablesize.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-</div><div class='del'>-int getdtablesize(void) {</div><div class='del'>-  return OPEN_MAX;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getgrgid.c b/mdk-stage1/dietlibc/libcruft/getgrgid.c<br/>deleted file mode 100644<br/>index 0c223056c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getgrgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getgrgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;grp.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct group *getgrgid(gid_t gid) {</div><div class='del'>-  struct group *tmp;</div><div class='del'>-  setgrent();</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=getgrent();</div><div class='del'>-    if (!tmp) return 0;</div><div class='del'>-    if (tmp-&gt;gr_gid == gid)</div><div class='del'>-      return tmp;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getgrnam.c b/mdk-stage1/dietlibc/libcruft/getgrnam.c<br/>deleted file mode 100644<br/>index 1bdbb42a8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getgrnam.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getgrnam.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;grp.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct group *getgrnam(const char* name) {</div><div class='del'>-  struct group *tmp;</div><div class='del'>-  setgrent();</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=getgrent();</div><div class='del'>-    if (!tmp) return 0;</div><div class='del'>-    if (!strcmp(tmp-&gt;gr_name,name))</div><div class='del'>-      return tmp;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyaddr.c b/mdk-stage1/dietlibc/libcruft/gethostbyaddr.c<br/>deleted file mode 100644<br/>index a4207d44d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyaddr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyaddr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,38 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int h_errno;</div><div class='del'>-</div><div class='del'>-struct hostent* gethostbyaddr(const void *addr, socklen_t len, int type) {</div><div class='del'>-  static struct hostent hostbuf;</div><div class='del'>-  struct hostent *hp;</div><div class='del'>-  size_t hstbuflen;</div><div class='del'>-  char *tmphstbuf;</div><div class='del'>-  int res;</div><div class='del'>-  int herr;</div><div class='del'>-</div><div class='del'>-  hstbuflen = 1024;</div><div class='del'>-  /* Allocate buffer, remember to free it to avoid a memory leakage.  */</div><div class='del'>-  tmphstbuf = malloc (hstbuflen);</div><div class='del'>-</div><div class='del'>-  while ((res = gethostbyaddr_r (addr, len, type, &amp;hostbuf, tmphstbuf, hstbuflen,</div><div class='del'>-				  &amp;hp, &amp;herr)) == ERANGE)</div><div class='del'>-    {</div><div class='del'>-      /* Enlarge the buffer.  */</div><div class='del'>-      hstbuflen *= 2;</div><div class='del'>-      tmphstbuf = realloc (tmphstbuf, hstbuflen);</div><div class='del'>-    }</div><div class='del'>-  /*  Check for errors.  */</div><div class='del'>-  if (res || hp == NULL)</div><div class='del'>-    return NULL;</div><div class='del'>-  return hp;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c b/mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c<br/>deleted file mode 100644<br/>index 37174ab13..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyaddr_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dns_gethostbyx_r(const char* name, struct hostent* result,</div><div class='del'>-			char *buf, size_t buflen,</div><div class='del'>-			struct hostent **RESULT, int *h_errnop, int lookfor);</div><div class='del'>-</div><div class='del'>-static int i2a(char* dest,unsigned int x) {</div><div class='del'>-  register unsigned int tmp=x;</div><div class='del'>-  register int len=0;</div><div class='del'>-  if (x&gt;=100) { *dest++=tmp/100+'0'; tmp=tmp%100; ++len; }</div><div class='del'>-  if (x&gt;=10) { *dest++=tmp/10+'0'; tmp=tmp%10; ++len; }</div><div class='del'>-  *dest++=tmp+'0';</div><div class='del'>-  return len+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Oh boy, this interface sucks so badly, there are no words for it.</div><div class='del'>- * Not one, not two, but _three_ error signalling methods!  (*h_errnop</div><div class='del'>- * nonzero?  return value nonzero?  *RESULT zero?)  The glibc goons</div><div class='del'>- * really outdid themselves with this one. */</div><div class='del'>-int gethostbyaddr_r(const char* addr, size_t length, int format,</div><div class='del'>-		    struct hostent* result, char *buf, size_t buflen,</div><div class='del'>-		    struct hostent **RESULT, int *h_errnop) {</div><div class='del'>-  if (format==AF_INET) {</div><div class='del'>-    char tmpbuf[50];</div><div class='del'>-    char *tmp;</div><div class='del'>-    int res;</div><div class='del'>-    tmp=tmpbuf+i2a(tmpbuf,(unsigned char)addr[3]); *tmp++='.';</div><div class='del'>-    tmp+=i2a(tmp,(unsigned char)addr[2]); *tmp++='.';</div><div class='del'>-    tmp+=i2a(tmp,(unsigned char)addr[1]); *tmp++='.';</div><div class='del'>-    tmp+=i2a(tmp,(unsigned char)addr[0]); strcpy(tmp,".in-addr.arpa");</div><div class='del'>-    res= __dns_gethostbyx_r(tmpbuf,result,buf+4,buflen-4,RESULT,h_errnop,12);	/* 12 == ns_t_ptr */</div><div class='del'>-    if (res==0) {</div><div class='del'>-      result-&gt;h_addr_list[0]=buf;</div><div class='del'>-      result-&gt;h_addr_list[1]=buf;</div><div class='del'>-      *(int*)buf=*(int*)addr;</div><div class='del'>-    }</div><div class='del'>-    return res;</div><div class='del'>-  }</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyname.c b/mdk-stage1/dietlibc/libcruft/gethostbyname.c<br/>deleted file mode 100644<br/>index 5db5bf3c5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,39 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int h_errno;</div><div class='del'>-</div><div class='del'>-struct hostent* gethostbyname (const char *host)</div><div class='del'>-{</div><div class='del'>-  static struct hostent hostbuf;</div><div class='del'>-  struct hostent *hp;</div><div class='del'>-  size_t hstbuflen;</div><div class='del'>-  char *tmphstbuf;</div><div class='del'>-  int res;</div><div class='del'>-  int herr;</div><div class='del'>-</div><div class='del'>-  hstbuflen = 1024;</div><div class='del'>-  /* Allocate buffer, remember to free it to avoid a memory leakage.  */</div><div class='del'>-  tmphstbuf = malloc (hstbuflen);</div><div class='del'>-</div><div class='del'>-  while ((res = gethostbyname_r (host, &amp;hostbuf, tmphstbuf, hstbuflen,</div><div class='del'>-				  &amp;hp, &amp;herr)) == ERANGE)</div><div class='del'>-    {</div><div class='del'>-      /* Enlarge the buffer.  */</div><div class='del'>-      hstbuflen *= 2;</div><div class='del'>-      tmphstbuf = realloc (tmphstbuf, hstbuflen);</div><div class='del'>-    }</div><div class='del'>-  /*  Check for errors.  */</div><div class='del'>-  if (res || hp == NULL)</div><div class='del'>-    return NULL;</div><div class='del'>-  return hp;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyname2.c b/mdk-stage1/dietlibc/libcruft/gethostbyname2.c<br/>deleted file mode 100644<br/>index 3d8296616..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyname2.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyname2.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-extern int h_errno;</div><div class='del'>-</div><div class='del'>-struct hostent* gethostbyname2(const char *host,int AF)</div><div class='del'>-{</div><div class='del'>-  static struct hostent hostbuf;</div><div class='del'>-  struct hostent *hp;</div><div class='del'>-  size_t hstbuflen;</div><div class='del'>-  char *tmphstbuf;</div><div class='del'>-  int res;</div><div class='del'>-  int herr;</div><div class='del'>-</div><div class='del'>-  hstbuflen = 1024;</div><div class='del'>-  /* Allocate buffer, remember to free it to avoid a memory leakage.  */</div><div class='del'>-  tmphstbuf = malloc (hstbuflen);</div><div class='del'>-</div><div class='del'>-  while ((res = gethostbyname2_r (host, AF,&amp;hostbuf, tmphstbuf, hstbuflen,</div><div class='del'>-				  &amp;hp, &amp;herr)) == ERANGE)</div><div class='del'>-    {</div><div class='del'>-      /* Enlarge the buffer.  */</div><div class='del'>-      hstbuflen *= 2;</div><div class='del'>-      tmphstbuf = realloc (tmphstbuf, hstbuflen);</div><div class='del'>-    }</div><div class='del'>-  /*  Check for errors.  */</div><div class='del'>-  if (res || hp == NULL)</div><div class='del'>-    return NULL;</div><div class='del'>-  return hp;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c b/mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c<br/>deleted file mode 100644<br/>index b505ccfbc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyname2_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dns_gethostbyx_r(const char* name, struct hostent* result,</div><div class='del'>-			char *buf, size_t buflen,</div><div class='del'>-			struct hostent **RESULT, int *h_errnop, int lookfor);</div><div class='del'>-</div><div class='del'>-/* Oh boy, this interface sucks so badly, there are no words for it.</div><div class='del'>- * Not one, not two, but _three_ error signalling methods!  (*h_errnop</div><div class='del'>- * nonzero?  return value nonzero?  *RESULT zero?)  The glibc goons</div><div class='del'>- * really outdid themselves with this one. */</div><div class='del'>-int gethostbyname2_r(const char* name, int AF, struct hostent* result,</div><div class='del'>-				char *buf, size_t buflen,</div><div class='del'>-				struct hostent **RESULT, int *h_errnop) {</div><div class='del'>-  int L=strlen(name);</div><div class='del'>-  int lookfor=0;</div><div class='del'>-  switch (AF) {</div><div class='del'>-  case AF_INET: lookfor=1; break;</div><div class='del'>-  case AF_INET6: lookfor=28; break;</div><div class='del'>-  default: *h_errnop=EINVAL; return 1;</div><div class='del'>-  }</div><div class='del'>-  result-&gt;h_name=buf;</div><div class='del'>-  if (buflen&lt;L) { *h_errnop=ERANGE; return 1; }</div><div class='del'>-  strcpy(buf,name);</div><div class='del'>-  return __dns_gethostbyx_r(name,result,buf+L,buflen-L,RESULT,h_errnop,lookfor);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/gethostbyname_r.c b/mdk-stage1/dietlibc/libcruft/gethostbyname_r.c<br/>deleted file mode 100644<br/>index d5a531f0f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/gethostbyname_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/gethostbyname_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-extern int __dns_gethostbyx_r(const char* name, struct hostent* result,</div><div class='del'>-			char *buf, size_t buflen,</div><div class='del'>-			struct hostent **RESULT, int *h_errnop, int lookfor);</div><div class='del'>-</div><div class='del'>-/* Oh boy, this interface sucks so badly, there are no words for it.</div><div class='del'>- * Not one, not two, but _three_ error signalling methods!  (*h_errnop</div><div class='del'>- * nonzero?  return value nonzero?  *RESULT zero?)  The glibc goons</div><div class='del'>- * really outdid themselves with this one. */</div><div class='del'>-int gethostbyname_r(const char* name, struct hostent* result,</div><div class='del'>-				char *buf, size_t buflen,</div><div class='del'>-				struct hostent **RESULT, int *h_errnop) {</div><div class='del'>-  int L=strlen(name);</div><div class='del'>-  result-&gt;h_name=buf;</div><div class='del'>-  if (buflen&lt;L) { *h_errnop=ERANGE; return 1; }</div><div class='del'>-  strcpy(buf,name);</div><div class='del'>-  return __dns_gethostbyx_r(name,result,buf+L,buflen-L,RESULT,h_errnop,1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getlogin.c b/mdk-stage1/dietlibc/libcruft/getlogin.c<br/>deleted file mode 100644<br/>index 359f44d9f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getlogin.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getlogin.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-char* getlogin() {</div><div class='del'>-  return getenv("LOGNAME");</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getpagesize.c b/mdk-stage1/dietlibc/libcruft/getpagesize.c<br/>deleted file mode 100644<br/>index dea4a9693..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getpagesize.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getpagesize.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef PAGE_SIZE</div><div class='del'>-#define PAGE_SIZE 4096</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-size_t __libc_getpagesize(void) {</div><div class='del'>-  return PAGE_SIZE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-size_t getpagesize(void)       __attribute__((weak,alias("__libc_getpagesize")));</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getpass.c b/mdk-stage1/dietlibc/libcruft/getpass.c<br/>deleted file mode 100644<br/>index 3da7cd2b3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getpass.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getpass.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-char *getpass(const char* prompt) {</div><div class='del'>-  struct termios old,tmp;</div><div class='del'>-  int out,in=open("/dev/tty",O_RDWR);</div><div class='del'>-  int doclose=(in&gt;=0);</div><div class='del'>-  static char buf[PASS_MAX];</div><div class='del'>-  if (doclose) { in=0; out=2; } else out=in;</div><div class='del'>-  if (!tcgetattr(in,&amp;old)) {</div><div class='del'>-    tmp=old;</div><div class='del'>-    tmp.c_lflag &amp;= ~(ECHO|ISIG);</div><div class='del'>-    tcsetattr(in,TCSAFLUSH,&amp;tmp);</div><div class='del'>-  }</div><div class='del'>-  write(out,prompt,strlen(prompt));</div><div class='del'>-  {</div><div class='del'>-    int nread,ofs=0;</div><div class='del'>-    for (;;) {</div><div class='del'>-      nread=read(in,buf+ofs,PASS_MAX-ofs);</div><div class='del'>-      if (nread&lt;0) {</div><div class='del'>-	buf[ofs]=0;</div><div class='del'>-	break;</div><div class='del'>-      } else if (ofs+nread&gt;=PASS_MAX) {</div><div class='del'>-	buf[PASS_MAX-1]=0;</div><div class='del'>-	break;</div><div class='del'>-      } else if (buf[ofs+nread-1]=='\n') {</div><div class='del'>-	buf[ofs+nread-1]=0;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      ofs+=nread;</div><div class='del'>-    }</div><div class='del'>-    write(out,"\n",1);</div><div class='del'>-  }</div><div class='del'>-  tcsetattr(in,TCSAFLUSH,&amp;old);</div><div class='del'>-  if (doclose) close(in);</div><div class='del'>-  return buf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getpwnam.c b/mdk-stage1/dietlibc/libcruft/getpwnam.c<br/>deleted file mode 100644<br/>index 53aae74d1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getpwnam.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getpwnam.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct passwd *getpwnam(const char * name) {</div><div class='del'>-  struct passwd *tmp;</div><div class='del'>-  setpwent();</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=getpwent();</div><div class='del'>-    if (!tmp) return 0;</div><div class='del'>-    if (!strcmp(tmp-&gt;pw_name,name))</div><div class='del'>-      return tmp;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getpwuid.c b/mdk-stage1/dietlibc/libcruft/getpwuid.c<br/>deleted file mode 100644<br/>index eef14e6e8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getpwuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getpwuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct passwd *getpwuid(uid_t uid) {</div><div class='del'>-  struct passwd *tmp;</div><div class='del'>-  setpwent();</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=getpwent();</div><div class='del'>-    if (!tmp) return 0;</div><div class='del'>-    if (tmp-&gt;pw_uid==uid)</div><div class='del'>-      return tmp;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/getspnam.c b/mdk-stage1/dietlibc/libcruft/getspnam.c<br/>deleted file mode 100644<br/>index e6573345d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/getspnam.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/getspnam.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;shadow.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-struct spwd *getspnam(const char * name) {</div><div class='del'>-  struct spwd *tmp;</div><div class='del'>-  setspent();</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=getspent();</div><div class='del'>-    if (!tmp) return 0;</div><div class='del'>-    if (!strcmp(tmp-&gt;sp_namp,name))</div><div class='del'>-      return tmp;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/grent.c b/mdk-stage1/dietlibc/libcruft/grent.c<br/>deleted file mode 100644<br/>index 0357657de..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/grent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/grent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,54 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/lib/grent.c - getgrent(3)/setgrent(3)/endgrent(3) implementation</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Jeff Garzik &lt;jgarzik@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is a brand new implementation, based on the interface</div><div class='del'>- * described in man-pages-1.34-1mdk man pages package.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "entlib.h" /* this is our only include */</div><div class='del'>-</div><div class='del'>-#define MAX_GROUP_MEMBERS 16 /* matches Linux kernel task struct */</div><div class='del'>-</div><div class='del'>-static struct __ent_state *st = NULL; /* state held across calls */</div><div class='del'>-static char *gr_mem[MAX_GROUP_MEMBERS+1];</div><div class='del'>-static struct group gr;</div><div class='del'>-</div><div class='del'>-struct group *getgrent(void)</div><div class='del'>-{</div><div class='del'>-	char *parts[4], *grouplist;</div><div class='del'>-	unsigned int bufptr;</div><div class='del'>-</div><div class='del'>-	if (__ent_start(_PATH_GROUP, &amp;st))</div><div class='del'>-		return NULL;</div><div class='del'>-	if (__ent_get_line(st))</div><div class='del'>-		goto err_out;</div><div class='del'>-	if (__ent_split(st, parts, 4, ':', 1) &lt; 0)</div><div class='del'>-		goto err_out;</div><div class='del'>-</div><div class='del'>-	gr.gr_name	= parts[0];</div><div class='del'>-	gr.gr_passwd	= parts[1];</div><div class='del'>-	gr.gr_gid	= (gid_t) atoi(parts[2]);</div><div class='del'>-	grouplist	= parts[3];</div><div class='del'>-</div><div class='del'>-	memset(&amp;gr_mem, 0, sizeof(gr_mem));</div><div class='del'>-	gr.gr_mem = gr_mem;</div><div class='del'>-</div><div class='del'>-	/* rewind bufptr to beginning of group list */</div><div class='del'>-	bufptr = st-&gt;bufptr;</div><div class='del'>-	st-&gt;bufptr = (int) (grouplist - st-&gt;ent_buf);</div><div class='del'>-</div><div class='del'>-	__ent_split(st, gr_mem, MAX_GROUP_MEMBERS, ',', 0);</div><div class='del'>-	st-&gt;bufptr = bufptr;</div><div class='del'>-</div><div class='del'>-	return &amp;gr;</div><div class='del'>-</div><div class='del'>-err_out:</div><div class='del'>-	st-&gt;buflen = st-&gt;bufptr = 0;	/* invalidate file data buffer */</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setgrent(void) { __ent_set(st); }</div><div class='del'>-void endgrent(void) { __ent_end(st); st=NULL; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/h_errno.c b/mdk-stage1/dietlibc/libcruft/h_errno.c<br/>deleted file mode 100644<br/>index 73ead0469..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/h_errno.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/h_errno.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-int h_errno;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/herrno_location.c b/mdk-stage1/dietlibc/libcruft/herrno_location.c<br/>deleted file mode 100644<br/>index 203f73d4b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/herrno_location.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/herrno_location.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-extern int h_errno;</div><div class='del'>-</div><div class='del'>-int *__h_errno_location() { return &amp;h_errno; }</div><div class='del'>-</div><div class='del'>-int *h_errno_location() __attribute__((weak,alias("__h_errno_location")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_addr.c b/mdk-stage1/dietlibc/libcruft/inet_addr.c<br/>deleted file mode 100644<br/>index 0b8531ab1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_addr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_addr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-unsigned long int inet_addr(const char *cp) {</div><div class='del'>-  struct in_addr foo;</div><div class='del'>-  if (inet_aton(cp,&amp;foo))</div><div class='del'>-    return foo.s_addr;</div><div class='del'>-  else</div><div class='del'>-    return (unsigned long int)-1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_aton.c b/mdk-stage1/dietlibc/libcruft/inet_aton.c<br/>deleted file mode 100644<br/>index ac7d9d007..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_aton.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_aton.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-/* inet_aton() converts the Internet host address cp from the standard</div><div class='del'>- * numbers-and-dots  notation  into  binary data  and  stores it in the</div><div class='del'>- * structure that inp points to. inet_aton returns nonzero if the</div><div class='del'>- * address is valid, zero if not. */</div><div class='del'>-</div><div class='del'>-/* problem is, inet_aton is historically quite, uh, lenient.</div><div class='del'>- * the following are all acceptable:</div><div class='del'>- *   0x7f000001 == 127.1 == 127.0.0.1.0 == 127.0.0.1</div><div class='del'>- * btw: 127.0.0.x.y == 127.0.0.(x|y)</div><div class='del'>- * and: 10.1.1 == 10.1.0.1 (huh?!)</div><div class='del'>- * and: 10 == 0.0.0.10 (?!?!?)</div><div class='del'>- * The Berkeley people must have been so stoned that they are still high.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* I hereby disclaim that I wrote this code. */</div><div class='del'>-int inet_aton(const char *cp, struct in_addr *inp) {</div><div class='del'>-  int i;</div><div class='del'>-  unsigned int ip=0;</div><div class='del'>-  char *tmp=(char*)cp;</div><div class='del'>-  for (i=24; ;) {</div><div class='del'>-    long j;</div><div class='del'>-    j=strtol(tmp,&amp;tmp,0);</div><div class='del'>-    if (*tmp==0) {</div><div class='del'>-      ip|=j;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-    if (*tmp=='.') {</div><div class='del'>-      if (j&gt;255) return 0;</div><div class='del'>-      ip|=(j&lt;&lt;i);</div><div class='del'>-      if (i&gt;0) i-=8;</div><div class='del'>-      ++tmp;</div><div class='del'>-      continue;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  inp-&gt;s_addr=htonl(ip);</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_ntoa.c b/mdk-stage1/dietlibc/libcruft/inet_ntoa.c<br/>deleted file mode 100644<br/>index f8c975f7a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_ntoa.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_ntoa.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-extern char *inet_ntoa_r(struct in_addr in,char* buf);</div><div class='del'>-</div><div class='del'>-char *inet_ntoa(struct in_addr in) {</div><div class='del'>-  static char buf[20];</div><div class='del'>-  return inet_ntoa_r(in,buf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c b/mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c<br/>deleted file mode 100644<br/>index dcf0eab7b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_ntoa_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-static unsigned int i2a(char* dest,unsigned int x) {</div><div class='del'>-  register unsigned int tmp=x;</div><div class='del'>-  register unsigned int len=0;</div><div class='del'>-  if (x&gt;=100) { *dest++=tmp/100+'0'; tmp=tmp%100; ++len; }</div><div class='del'>-  if (x&gt;=10) { *dest++=tmp/10+'0'; tmp=tmp%10; ++len; }</div><div class='del'>-  *dest++=tmp+'0';</div><div class='del'>-  return len+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *inet_ntoa_r(struct in_addr in,char* buf) {</div><div class='del'>-  unsigned int len;</div><div class='del'>-  unsigned char *ip=(unsigned char*)&amp;in;</div><div class='del'>-  len=i2a(buf,ip[0]); buf[len]='.'; ++len;</div><div class='del'>-  len+=i2a(buf+ len,ip[1]); buf[len]='.'; ++len;</div><div class='del'>-  len+=i2a(buf+ len,ip[2]); buf[len]='.'; ++len;</div><div class='del'>-  len+=i2a(buf+ len,ip[3]); buf[len]=0;</div><div class='del'>-  return buf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_ntop.c b/mdk-stage1/dietlibc/libcruft/inet_ntop.c<br/>deleted file mode 100644<br/>index 77c47f239..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_ntop.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_ntop.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,75 +0,0 @@</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-extern char *inet_ntoa_r(struct in_addr in,char* buf);</div><div class='del'>-</div><div class='del'>-static const unsigned char V4mappedprefix[12]={0,0,0,0,0,0,0,0,0,0,0xff,0xff};</div><div class='del'>-</div><div class='del'>-static char tohex(char hexdigit) {</div><div class='del'>-  return hexdigit&gt;9?hexdigit+'a'-10:hexdigit+'0';</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int fmt_xlong(char* s,unsigned int i) {</div><div class='del'>-  char* bak=s;</div><div class='del'>-  *s=tohex((i&gt;&gt;12)&amp;0xf); if (s!=bak || *s!='0') ++s;</div><div class='del'>-  *s=tohex((i&gt;&gt;8)&amp;0xf); if (s!=bak || *s!='0') ++s;</div><div class='del'>-  *s=tohex((i&gt;&gt;4)&amp;0xf); if (s!=bak || *s!='0') ++s;</div><div class='del'>-  *s=tohex(i&amp;0xf);</div><div class='del'>-  return s-bak+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned int fmt_ip6(char *s,const char ip[16])</div><div class='del'>-{</div><div class='del'>-  unsigned int len;</div><div class='del'>-  unsigned int i;</div><div class='del'>-  unsigned int temp;</div><div class='del'>-  unsigned int compressing;</div><div class='del'>-  int j;</div><div class='del'>-</div><div class='del'>-  len = 0; compressing = 0;</div><div class='del'>-  for (j=0; j&lt;16; j+=2) {</div><div class='del'>-    if (j==12 &amp;&amp; !memcmp(ip,V4mappedprefix,12)) {</div><div class='del'>-      inet_ntoa_r(*(struct in_addr*)(ip+12),s);</div><div class='del'>-      temp=strlen(s);</div><div class='del'>-      return len+temp;</div><div class='del'>-    }</div><div class='del'>-    temp = ((unsigned long) (unsigned char) ip[j] &lt;&lt; 8) +</div><div class='del'>-            (unsigned long) (unsigned char) ip[j+1];</div><div class='del'>-    if (temp == 0) {</div><div class='del'>-      if (!compressing) {</div><div class='del'>-	compressing=1;</div><div class='del'>-	if (j==0) {</div><div class='del'>-	  *s++=':'; ++len;</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-    } else {</div><div class='del'>-      if (compressing) {</div><div class='del'>-	compressing=0;</div><div class='del'>-	*s++=':'; ++len;</div><div class='del'>-      }</div><div class='del'>-      i = fmt_xlong(s,temp); len += i; s += i;</div><div class='del'>-      if (j&lt;14) {</div><div class='del'>-	*s++ = ':';</div><div class='del'>-	++len;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  *s=0;</div><div class='del'>-  return len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-const char* inet_ntop(int AF, const void *CP, char *BUF, size_t LEN) {</div><div class='del'>-  char buf[100];</div><div class='del'>-  int len;</div><div class='del'>-  if (AF==AF_INET) {</div><div class='del'>-    inet_ntoa_r(*(struct in_addr*)CP,buf);</div><div class='del'>-    len=strlen(buf);</div><div class='del'>-  } else if (AF==AF_INET6) {</div><div class='del'>-    len=fmt_ip6(buf,CP);</div><div class='del'>-  } else</div><div class='del'>-    return 0;</div><div class='del'>-  if (len&lt;LEN) {</div><div class='del'>-    strcpy(BUF,buf);</div><div class='del'>-    return BUF;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/inet_pton.c b/mdk-stage1/dietlibc/libcruft/inet_pton.c<br/>deleted file mode 100644<br/>index d5c17509c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/inet_pton.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/inet_pton.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-static unsigned int scan_ip6(const char *s,char ip[16])</div><div class='del'>-{</div><div class='del'>-  unsigned int i;</div><div class='del'>-  unsigned int len=0;</div><div class='del'>-  unsigned long u;</div><div class='del'>-</div><div class='del'>-  char suffix[16];</div><div class='del'>-  int prefixlen=0;</div><div class='del'>-  int suffixlen=0;</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;16; i++) ip[i]=0;</div><div class='del'>-</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (*s == ':') {</div><div class='del'>-      len++;</div><div class='del'>-      if (s[1] == ':') {	/* Found "::", skip to part 2 */</div><div class='del'>-	s+=2;</div><div class='del'>-	len++;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      s++;</div><div class='del'>-    }</div><div class='del'>-    {</div><div class='del'>-      char *tmp;</div><div class='del'>-      u=strtol(s,&amp;tmp,16);</div><div class='del'>-      i=tmp-s;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!i) return 0;</div><div class='del'>-    if (prefixlen==12 &amp;&amp; s[i]=='.') {</div><div class='del'>-      /* the last 4 bytes may be written as IPv4 address */</div><div class='del'>-      if (inet_aton(s,(struct in_addr*)(ip+12)))</div><div class='del'>-	return i+len;</div><div class='del'>-      else</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ip[prefixlen++] = (u &gt;&gt; 8);</div><div class='del'>-    ip[prefixlen++] = (u &amp; 255);</div><div class='del'>-    s += i; len += i;</div><div class='del'>-    if (prefixlen==16)</div><div class='del'>-      return len;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-/* part 2, after "::" */</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (*s == ':') {</div><div class='del'>-      if (suffixlen==0)</div><div class='del'>-	break;</div><div class='del'>-      s++;</div><div class='del'>-      len++;</div><div class='del'>-    } else if (suffixlen!=0)</div><div class='del'>-      break;</div><div class='del'>-    {</div><div class='del'>-      char *tmp;</div><div class='del'>-      u=strtol(s,&amp;tmp,16);</div><div class='del'>-      i=tmp-s;</div><div class='del'>-    }</div><div class='del'>-    if (!i) {</div><div class='del'>-      len--;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-    if (suffixlen+prefixlen&lt;=12 &amp;&amp; s[i]=='.') {</div><div class='del'>-      if (inet_aton(s,(struct in_addr*)(suffix+suffixlen))) {</div><div class='del'>-	suffixlen+=4;</div><div class='del'>-	len+=strlen(s);</div><div class='del'>-	break;</div><div class='del'>-      } else</div><div class='del'>-	prefixlen=12-suffixlen;	/* make end-of-loop test true */</div><div class='del'>-    }</div><div class='del'>-    suffix[suffixlen++] = (u &gt;&gt; 8);</div><div class='del'>-    suffix[suffixlen++] = (u &amp; 255);</div><div class='del'>-    s += i; len += i;</div><div class='del'>-    if (prefixlen+suffixlen==16)</div><div class='del'>-      break;</div><div class='del'>-  }</div><div class='del'>-  for (i=0; i&lt;suffixlen; i++)</div><div class='del'>-    ip[16-suffixlen+i] = suffix[i];</div><div class='del'>-  return len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int inet_pton(int AF, const char *CP, void *BUF) {</div><div class='del'>-  if (AF==AF_INET) {</div><div class='del'>-    if (!inet_aton(CP,(struct in_addr*)BUF))</div><div class='del'>-      return 0;</div><div class='del'>-  } else if (AF==AF_INET6) {</div><div class='del'>-    if (CP[scan_ip6(CP,BUF)])</div><div class='del'>-      return 0;</div><div class='del'>-  } else {</div><div class='del'>-    errno=EAFNOSUPPORT;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/initgroups.c b/mdk-stage1/dietlibc/libcruft/initgroups.c<br/>deleted file mode 100644<br/>index 7d24866e9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/initgroups.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/initgroups.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;grp.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int initgroups(const char *user, gid_t group) {</div><div class='del'>-  int n=0;</div><div class='del'>-  gid_t grouplist[32];</div><div class='del'>-  struct group *g;</div><div class='del'>-  setgrent();</div><div class='del'>-  while ((g=getgrent())) {</div><div class='del'>-    char **duh=g-&gt;gr_mem;</div><div class='del'>-    while (*duh) {</div><div class='del'>-      if (!strcmp(*duh,user)) {</div><div class='del'>-	grouplist[n]=g-&gt;gr_gid;</div><div class='del'>-	if (++n&gt;=32)</div><div class='del'>-	  break;</div><div class='del'>-      }</div><div class='del'>-      duh++;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return setgroups(n,grouplist);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/mkstemp.c b/mdk-stage1/dietlibc/libcruft/mkstemp.c<br/>deleted file mode 100644<br/>index 3b24ecb54..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/mkstemp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/mkstemp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-int mkstemp(char* template) {</div><div class='del'>-  char *tmp=template+strlen(template)-6;</div><div class='del'>-  int randfd;</div><div class='del'>-  int i,res;</div><div class='del'>-  unsigned int random;</div><div class='del'>-  for (i=0; i&lt;6; ++i) if (tmp[i]!='X') { __set_errno(EINVAL); return -1; }</div><div class='del'>-  randfd=open("/dev/urandom",O_RDONLY);</div><div class='del'>-  for (;;) {</div><div class='del'>-    read(randfd,&amp;random,sizeof(random));</div><div class='del'>-    for (i=0; i&lt;6; ++i) {</div><div class='del'>-      int hexdigit=(random&gt;&gt;(i*5))&amp;0x1f;</div><div class='del'>-      tmp[i]=hexdigit&gt;9?hexdigit+'a'-10:hexdigit+'0';</div><div class='del'>-    }</div><div class='del'>-    res=open(template,O_CREAT|O_RDWR|O_EXCL,0600);</div><div class='del'>-    if (res&gt;=0) return res;</div><div class='del'>-  }</div><div class='del'>-  close(randfd);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/pwent.c b/mdk-stage1/dietlibc/libcruft/pwent.c<br/>deleted file mode 100644<br/>index 30a8a0957..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/pwent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/pwent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/lib/pwent.c - getpwent(3)/setpwent(3)/endpwent(3) implementation</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Jeff Garzik &lt;jgarzik@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is a brand new implementation, based on the interface</div><div class='del'>- * described in man-pages-1.34-1mdk man pages package.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "entlib.h" /* this is our only include */</div><div class='del'>-</div><div class='del'>-static struct __ent_state *st = NULL; /* state held across calls */</div><div class='del'>-static struct passwd pw;</div><div class='del'>-</div><div class='del'>-struct passwd *getpwent(void)</div><div class='del'>-{</div><div class='del'>-	char *parts[7];</div><div class='del'>-</div><div class='del'>-	if (__ent_start(_PATH_PASSWD, &amp;st))</div><div class='del'>-		return NULL;</div><div class='del'>-	if (__ent_get_line(st))</div><div class='del'>-		goto err_out;</div><div class='del'>-	if (__ent_split(st, parts, 7, ':', 1) &lt; 0)</div><div class='del'>-		goto err_out;</div><div class='del'>-</div><div class='del'>-	pw.pw_name	= parts[0];</div><div class='del'>-	pw.pw_passwd	= parts[1];</div><div class='del'>-	pw.pw_uid	= (uid_t) atoi(parts[2]);</div><div class='del'>-	pw.pw_gid	= (gid_t) atoi(parts[3]);</div><div class='del'>-	pw.pw_gecos	= parts[4];</div><div class='del'>-	pw.pw_dir	= parts[5];</div><div class='del'>-	pw.pw_shell	= parts[6];</div><div class='del'>-</div><div class='del'>-	return &amp;pw;</div><div class='del'>-</div><div class='del'>-err_out:</div><div class='del'>-	st-&gt;buflen = st-&gt;bufptr = 0;	/* invalidate file data buffer */</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setpwent(void) { __ent_set(st); }</div><div class='del'>-void endpwent(void) { __ent_end(st); st=NULL; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/res_init.c b/mdk-stage1/dietlibc/libcruft/res_init.c<br/>deleted file mode 100644<br/>index 9322af298..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/res_init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/res_init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-extern int __dns_servers;</div><div class='del'>-extern void __dns_readstartfiles(void);</div><div class='del'>-</div><div class='del'>-int res_init(void) {</div><div class='del'>-  __dns_servers=0;</div><div class='del'>-  __dns_readstartfiles();</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcruft/spent.c b/mdk-stage1/dietlibc/libcruft/spent.c<br/>deleted file mode 100644<br/>index e4beb81e4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcruft/spent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcruft/spent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,45 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/lib/spent.c - getspent(3)/setspent(3)/endspent(3) implementation</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Jeff Garzik &lt;jgarzik@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is a brand new implementation, based on the interface</div><div class='del'>- * described in man-pages-1.34-1mdk man pages package.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include "entlib.h" /* this is our only include */</div><div class='del'>-</div><div class='del'>-static struct __ent_state *st = NULL; /* state held across calls */</div><div class='del'>-static struct spwd sp;</div><div class='del'>-</div><div class='del'>-struct spwd *getspent(void)</div><div class='del'>-{</div><div class='del'>-	char *parts[9];</div><div class='del'>-</div><div class='del'>-	if (__ent_start(_PATH_SHADOW, &amp;st))</div><div class='del'>-		return NULL;</div><div class='del'>-	if (__ent_get_line(st))</div><div class='del'>-		goto err_out;</div><div class='del'>-	if (__ent_split(st, parts, 9, ':', 1) &lt; 0)</div><div class='del'>-		goto err_out;</div><div class='del'>-</div><div class='del'>-	sp.sp_namp	= parts[0];</div><div class='del'>-	sp.sp_pwdp	= parts[1];</div><div class='del'>-	sp.sp_lstchg	= atoi(parts[2]); /* XXX: atol */</div><div class='del'>-	sp.sp_min	= atoi(parts[3]);</div><div class='del'>-	sp.sp_max	= atoi(parts[4]);</div><div class='del'>-	sp.sp_warn	= atoi(parts[5]);</div><div class='del'>-	sp.sp_inact	= atoi(parts[6]);</div><div class='del'>-	sp.sp_expire	= atoi(parts[7]);</div><div class='del'>-	sp.sp_flag	= atoi(parts[8]);</div><div class='del'>-</div><div class='del'>-	return &amp;sp;</div><div class='del'>-</div><div class='del'>-err_out:</div><div class='del'>-	st-&gt;buflen = st-&gt;bufptr = 0;	/* invalidate file data buffer */</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setspent(void) { __ent_set(st); }</div><div class='del'>-void endspent(void) { __ent_end(st); st=NULL; }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libcrypt/crypt.c b/mdk-stage1/dietlibc/libcrypt/crypt.c<br/>deleted file mode 100644<br/>index 933397f5f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libcrypt/crypt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libcrypt/crypt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,309 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/* Initial permutation, */</div><div class='del'>-static char IP[] = {</div><div class='del'>-  57,49,41,33,25,17, 9, 1,</div><div class='del'>-  59,51,43,35,27,19,11, 3,</div><div class='del'>-  61,53,45,37,29,21,13, 5,</div><div class='del'>-  63,55,47,39,31,23,15, 7,</div><div class='del'>-  56,48,40,32,24,16, 8, 0,</div><div class='del'>-  58,50,42,34,26,18,10, 2,</div><div class='del'>-  60,52,44,36,28,20,12, 4,</div><div class='del'>-  62,54,46,38,30,22,14, 6</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Final permutation, FP = IP^(-1) */</div><div class='del'>-static char FP[] = {</div><div class='del'>-  39, 7,47,15,55,23,63,31,</div><div class='del'>-  38, 6,46,14,54,22,62,30,</div><div class='del'>-  37, 5,45,13,53,21,61,29,</div><div class='del'>-  36, 4,44,12,52,20,60,28,</div><div class='del'>-  35, 3,43,11,51,19,59,27,</div><div class='del'>-  34, 2,42,10,50,18,58,26,</div><div class='del'>-  33, 1,41, 9,49,17,57,25,</div><div class='del'>-  32, 0,40, 8,48,16,56,24</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Permuted-choice 1 from the key bits to yield C and D.</div><div class='del'>- * Note that bits 8,16... are left out: They are intended for a parity check.</div><div class='del'>- */</div><div class='del'>-static char PC1_C[] = {</div><div class='del'>-  56,48,40,32,24,16, 8,</div><div class='del'>-   0,57,49,41,33,25,17,</div><div class='del'>-   9, 1,58,50,42,34,26,</div><div class='del'>-  18,10, 2,59,51,43,35</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static char PC1_D[] = {</div><div class='del'>-  62,54,46,38,30,22,14,</div><div class='del'>-   6,61,53,45,37,29,21,</div><div class='del'>-  13, 5,60,52,44,36,28,</div><div class='del'>-  20,12, 4,27,19,11, 3</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Sequence of shifts used for the key schedule. */</div><div class='del'>-static char shifts[] = { 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1 };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Permuted-choice 2, to pick out the bits from the CD array that generate</div><div class='del'>- * the key schedule.</div><div class='del'>- */</div><div class='del'>-static char PC2_C[] = {</div><div class='del'>-  13, 16, 10, 23,  0,  4,  2, 27, 14,  5, 20,  9,</div><div class='del'>-  22, 18, 11,  3, 25,  7, 15,  6, 26, 19, 12,  1</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static char PC2_D[] = {</div><div class='del'>-  12, 23,  2,  8, 18, 26,  1, 11, 22, 16,  4, 19,</div><div class='del'>-  15, 20, 10, 27,  5, 24, 17, 13, 21,  7,  0,  3</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* The C and D arrays used to calculate the key schedule. */</div><div class='del'>-</div><div class='del'>-static char C[28];</div><div class='del'>-static char D[28];</div><div class='del'>-/* The key schedule. Generated from the key. */</div><div class='del'>-static char KS[16][48];</div><div class='del'>-</div><div class='del'>-/* The E bit-selection table. */</div><div class='del'>-static char E[48];</div><div class='del'>-static char e2[] = {</div><div class='del'>-  32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,</div><div class='del'>-   8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,</div><div class='del'>-  16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,</div><div class='del'>-  24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32,  1</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Set up the key schedule from the key. */</div><div class='del'>-void setkey(const char *key)</div><div class='del'>-{</div><div class='del'>-  register int i, j, k;</div><div class='del'>-  int  t;</div><div class='del'>-  int  s;</div><div class='del'>-</div><div class='del'>-  /* First, generate C and D by permuting the key.  The low order bit of each</div><div class='del'>-   * 8-bit char is not used, so C and D are only 28 bits apiece.</div><div class='del'>-   */</div><div class='del'>-  for(i=0; i &lt; 28; i++) {</div><div class='del'>-    C[i] = key[(int)PC1_C[i]];</div><div class='del'>-    D[i] = key[(int)PC1_D[i]];</div><div class='del'>-  }</div><div class='del'>-  /* To generate Ki, rotate C and D according to schedule and pick up a</div><div class='del'>-   * permutation using PC2.</div><div class='del'>-   */</div><div class='del'>-  for(i=0; i &lt; 16; i++) {</div><div class='del'>-    /* rotate. */</div><div class='del'>-    s = shifts[i];</div><div class='del'>-    for(k=0; k &lt; s; k++) {</div><div class='del'>-      t = C[0];</div><div class='del'>-      for(j=0; j &lt; 27; j++)</div><div class='del'>-	C[j] = C[j+1];</div><div class='del'>-      C[27] = t;</div><div class='del'>-      t = D[0];</div><div class='del'>-      for(j=0; j &lt; 27; j++)</div><div class='del'>-	D[j] = D[j+1];</div><div class='del'>-      D[27] = t;</div><div class='del'>-    }</div><div class='del'>-    /* get Ki. Note C and D are concatenated. */</div><div class='del'>-    for(j=0; j &lt; 24; j++) {</div><div class='del'>-      KS[i][j] = C[(int)PC2_C[j]];</div><div class='del'>-      KS[i][j+24] = D[(int)PC2_D[j]];</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 48; i++)</div><div class='del'>-    E[i] = e2[i];</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* The 8 selection functions. For some reason, they give a 0-origin index,</div><div class='del'>- * unlike everything else.</div><div class='del'>- */</div><div class='del'>-static char S[8][64] = {</div><div class='del'>-  {</div><div class='del'>-    14, 4,13, 1, 2,15,11, 8, 3,10, 6,12, 5, 9, 0, 7,</div><div class='del'>-     0,15, 7, 4,14, 2,13, 1,10, 6,12,11, 9, 5, 3, 8,</div><div class='del'>-     4, 1,14, 8,13, 6, 2,11,15,12, 9, 7, 3,10, 5, 0,</div><div class='del'>-    15,12, 8, 2, 4, 9, 1, 7, 5,11, 3,14,10, 0, 6,13</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-    15, 1, 8,14, 6,11, 3, 4, 9, 7, 2,13,12, 0, 5,10,</div><div class='del'>-     3,13, 4, 7,15, 2, 8,14,12, 0, 1,10, 6, 9,11, 5,</div><div class='del'>-     0,14, 7,11,10, 4,13, 1, 5, 8,12, 6, 9, 3, 2,15,</div><div class='del'>-    13, 8,10, 1, 3,15, 4, 2,11, 6, 7,12, 0, 5,14, 9</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-    10, 0, 9,14, 6, 3,15, 5, 1,13,12, 7,11, 4, 2, 8,</div><div class='del'>-    13, 7, 0, 9, 3, 4, 6,10, 2, 8, 5,14,12,11,15, 1,</div><div class='del'>-    13, 6, 4, 9, 8,15, 3, 0,11, 1, 2,12, 5,10,14, 7,</div><div class='del'>-     1,10,13, 0, 6, 9, 8, 7, 4,15,14, 3,11, 5, 2,12</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-     7,13,14, 3, 0, 6, 9,10, 1, 2, 8, 5,11,12, 4,15,</div><div class='del'>-    13, 8,11, 5, 6,15, 0, 3, 4, 7, 2,12, 1,10,14, 9,</div><div class='del'>-    10, 6, 9, 0,12,11, 7,13,15, 1, 3,14, 5, 2, 8, 4,</div><div class='del'>-     3,15, 0, 6,10, 1,13, 8, 9, 4, 5,11,12, 7, 2,14</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-     2,12, 4, 1, 7,10,11, 6, 8, 5, 3,15,13, 0,14, 9,</div><div class='del'>-    14,11, 2,12, 4, 7,13, 1, 5, 0,15,10, 3, 9, 8, 6,</div><div class='del'>-     4, 2, 1,11,10,13, 7, 8,15, 9,12, 5, 6, 3, 0,14,</div><div class='del'>-    11, 8,12, 7, 1,14, 2,13, 6,15, 0, 9,10, 4, 5, 3</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-    12, 1,10,15, 9, 2, 6, 8, 0,13, 3, 4,14, 7, 5,11,</div><div class='del'>-    10,15, 4, 2, 7,12, 9, 5, 6, 1,13,14, 0,11, 3, 8,</div><div class='del'>-     9,14,15, 5, 2, 8,12, 3, 7, 0, 4,10, 1,13,11, 6,</div><div class='del'>-     4, 3, 2,12, 9, 5,15,10,11,14, 1, 7, 6, 0, 8,13</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-     4,11, 2,14,15, 0, 8,13, 3,12, 9, 7, 5,10, 6, 1,</div><div class='del'>-    13, 0,11, 7, 4, 9, 1,10,14, 3, 5,12, 2,15, 8, 6,</div><div class='del'>-     1, 4,11,13,12, 3, 7,14,10,15, 6, 8, 0, 5, 9, 2,</div><div class='del'>-     6,11,13, 8, 1, 4,10, 7, 9, 5, 0,15,14, 2, 3,12</div><div class='del'>-  },</div><div class='del'>-</div><div class='del'>-  {</div><div class='del'>-    13, 2, 8, 4, 6,15,11, 1,10, 9, 3,14, 5, 0,12, 7,</div><div class='del'>-     1,15,13, 8,10, 3, 7, 4,12, 5, 6,11, 0,14, 9, 2,</div><div class='del'>-     7,11, 4, 1, 9,12,14, 2, 0, 6,10,13,15, 3, 5, 8,</div><div class='del'>-     2, 1,14, 7, 4,10, 8,13,15,12, 9, 0, 3, 5, 6,11</div><div class='del'>-  }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* P is a permutation on the selected combination of the current L and key. */</div><div class='del'>-static char P[] = {</div><div class='del'>-  15, 6,19,20, 28,11,27,16,  0,14,22,25,  4,17,30, 9,</div><div class='del'>-   1, 7,23,13, 31,26, 2, 8, 18,12,29, 5, 21,10, 3,24</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* The current block, divided into 2 halves. */</div><div class='del'>-static char L[32], R[32];</div><div class='del'>-static char tempL[32];</div><div class='del'>-static char f[32];</div><div class='del'>-</div><div class='del'>-/* The combination of the key and the input, before selection. */</div><div class='del'>-static char preS[48];</div><div class='del'>-</div><div class='del'>-/* The payoff: encrypt a block. */</div><div class='del'>-void encrypt(char block[64], int edflag)</div><div class='del'>-{</div><div class='del'>-  int  i, ii;</div><div class='del'>-  register int t, j, k;</div><div class='del'>-</div><div class='del'>-  /* First, permute the bits in the input */</div><div class='del'>-  for(j=0; j &lt; 64; j++)</div><div class='del'>-    L[j] = block[(int)IP[j]];</div><div class='del'>-  /* Perform an encryption operation 16 times. */</div><div class='del'>-  for(ii=0; ii &lt; 16; ii++) {</div><div class='del'>-    i = ii;</div><div class='del'>-    /* Save the R array, which will be the new L. */</div><div class='del'>-    for(j=0; j &lt; 32; j++)</div><div class='del'>-      tempL[j] = R[j];</div><div class='del'>-    /* Expand R to 48 bits using the E selector;</div><div class='del'>-     * exclusive-or with the current key bits.</div><div class='del'>-     */</div><div class='del'>-    for(j=0; j &lt; 48; j++)</div><div class='del'>-      preS[j] = R[E[j]-1] ^ KS[i][j];</div><div class='del'>-    /* The pre-select bits are now considered in 8 groups of 6 bits each.</div><div class='del'>-     * The 8 selection functions map these 6-bit quantities into 4-bit</div><div class='del'>-     * quantities and the results permuted to make an f(R, K).</div><div class='del'>-     * The indexing into the selection functions is peculiar;</div><div class='del'>-     * it could be simplified by rewriting the tables.</div><div class='del'>-     */</div><div class='del'>-    for(j=0; j &lt; 8; j++) {</div><div class='del'>-      t = ((j&lt;&lt;1)+j)&lt;&lt;1;</div><div class='del'>-      k = S[j][(preS[t]&lt;&lt;5)+</div><div class='del'>-	 (preS[t+1]&lt;&lt;3)+</div><div class='del'>-	 (preS[t+2]&lt;&lt;2)+</div><div class='del'>-	 (preS[t+3]&lt;&lt;1)+</div><div class='del'>-	 (preS[t+4]   )+</div><div class='del'>-	 (preS[t+5]&lt;&lt;4)];</div><div class='del'>-      t = j &lt;&lt; 2;</div><div class='del'>-      f[t  ] = (k&gt;&gt;3)&amp;01;</div><div class='del'>-      f[t+1] = (k&gt;&gt;2)&amp;01;</div><div class='del'>-      f[t+2] = (k&gt;&gt;1)&amp;01;</div><div class='del'>-      f[t+3] = (k   )&amp;01;</div><div class='del'>-    }</div><div class='del'>-    /* The new R is L ^ f(R, K). The f here has to be permuted first, though. */</div><div class='del'>-    for(j=0; j &lt; 32; j++)</div><div class='del'>-      R[j] = L[j] ^ f[(int)P[j]];</div><div class='del'>-    /* Finally, the new L (the original R) is copied back. */</div><div class='del'>-    for(j=0; j &lt; 32; j++)</div><div class='del'>-      L[j] = tempL[j];</div><div class='del'>-  }</div><div class='del'>-  /* The output L and R are reversed. */</div><div class='del'>-  for(j=0; j &lt; 32; j++) {</div><div class='del'>-    L[j] ^= R[j];</div><div class='del'>-    R[j] ^= L[j];</div><div class='del'>-    L[j] ^= R[j];</div><div class='del'>-  }</div><div class='del'>-  /* The final output gets the inverse permutation of the very original. */</div><div class='del'>-  for(j=0; j &lt; 64; j++)</div><div class='del'>-    block[j] = L[(int)FP[j]];</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * crypt(const char *pw, const char *salt)</div><div class='del'>-{</div><div class='del'>-  register int i, j, c;</div><div class='del'>-  static char block[66], iobuf[16];</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 66; i++)</div><div class='del'>-    block[i] = 0;</div><div class='del'>-  for(i=0; (c= *pw) &amp;&amp; i &lt; 64; pw++) {</div><div class='del'>-    for(j=0; j &lt; 7; j++, i++)</div><div class='del'>-      block[i] = (c&gt;&gt;(6-j)) &amp; 01;</div><div class='del'>-    i++;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  setkey(block);</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 66; i++)</div><div class='del'>-    block[i] = 0;</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 2; i++) {</div><div class='del'>-    c = *salt++;</div><div class='del'>-    iobuf[i] = c;</div><div class='del'>-    if(c &gt; 'Z')</div><div class='del'>-      c -= 6;</div><div class='del'>-    if(c &gt; '9')</div><div class='del'>-      c -= 7;</div><div class='del'>-    c -= '.';</div><div class='del'>-    for(j=0; j &lt; 6; j++) {</div><div class='del'>-      if((c&gt;&gt;j) &amp; 01) {</div><div class='del'>-	int ind1 = (((i&lt;&lt;1)+i)&lt;&lt; 1) + j;</div><div class='del'>-	int ind2 = ind1 + 24;</div><div class='del'>-	E[ind1] ^= E[ind2];</div><div class='del'>-	E[ind2] ^= E[ind1];</div><div class='del'>-	E[ind1] ^= E[ind2];</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 25; i++)</div><div class='del'>-    encrypt(block, 0);</div><div class='del'>-</div><div class='del'>-  for(i=0; i &lt; 11; i++) {</div><div class='del'>-    c = 0;</div><div class='del'>-    for(j=0; j &lt; 6; j++) {</div><div class='del'>-      c &lt;&lt;= 1;</div><div class='del'>-      c |= block[(((i&lt;&lt;1)+i)&lt;&lt;1)+j];</div><div class='del'>-    }</div><div class='del'>-    c += '.';</div><div class='del'>-    if(c &gt; '9')</div><div class='del'>-      c += 7;</div><div class='del'>-    if(c &gt; 'Z')</div><div class='del'>-      c += 6;</div><div class='del'>-    iobuf[i+2] = c;</div><div class='del'>-  }</div><div class='del'>-  iobuf[i+2] = 0;</div><div class='del'>-  if(iobuf[1] == 0)</div><div class='del'>-    iobuf[1] = iobuf[0];</div><div class='del'>-  return(iobuf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/Makefile b/mdk-stage1/dietlibc/libdl/Makefile<br/>deleted file mode 100644<br/>index c0463f887..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-# local "test" make file</div><div class='del'>-</div><div class='del'>-SRC = $(wildcard *.c) test/test.c</div><div class='del'>-OBJ = _dl_jump.o $(SRC:.c=.o)</div><div class='del'>-</div><div class='del'>-#CFLAGS = -Wall -O2</div><div class='del'>-CFLAGS = -g</div><div class='del'>-</div><div class='del'>-%.o : %.S</div><div class='del'>-	$(HOME)/bin/diet gcc $(CFLAGS) -c -o $@ $^</div><div class='del'>-</div><div class='del'>-%.o : %.c</div><div class='del'>-	$(HOME)/bin/diet gcc $(CFLAGS) -c -o $@ $^</div><div class='del'>-</div><div class='del'>-all: test.out</div><div class='del'>-</div><div class='del'>-test.g: test.c</div><div class='del'>-	gcc -o $@ $^ -ldl</div><div class='del'>-</div><div class='del'>-test.out: $(OBJ)</div><div class='del'>-	$(HOME)/bin/diet gcc -o $@ $^</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	$(RM) *.o *.a *.out *~ # *.so</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/README b/mdk-stage1/dietlibc/libdl/README<br/>deleted file mode 100644<br/>index 5d77bde34..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-this is the experimental libdl test-pre-pre-alpha code</div><div class='del'>-</div><div class='del'>-written by Olaf Dreesen</div><div class='del'>-</div><div class='del'>-Shouldn't work yet had some problems with the elf specs...</div><div class='del'>-and more inconsistencies...</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/_dl_int.h b/mdk-stage1/dietlibc/libdl/_dl_int.h<br/>deleted file mode 100644<br/>index 659e6ee0f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/_dl_int.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/_dl_int.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#ifndef ___DL_INT_H__</div><div class='del'>-#define ___DL_INT_H__</div><div class='del'>-</div><div class='del'>-#include &lt;elf.h&gt;</div><div class='del'>-</div><div class='del'>-struct _dl_handle {</div><div class='del'>-  /* basic */</div><div class='del'>-  void *	mem_base;	/* base address of maped *.so */</div><div class='del'>-  unsigned long mem_size;	/* len of mem block */</div><div class='del'>-  unsigned int  lnk_count;	/* reference count */</div><div class='del'>-</div><div class='del'>-  /* symbol resolve helper */</div><div class='del'>-  unsigned long*hash_tab;	/* hash table */</div><div class='del'>-  Elf32_Sym *	dyn_sym_tab;	/* dynamic symbol table */</div><div class='del'>-  char *	dyn_str_tab;	/* dyn_name table */</div><div class='del'>-</div><div class='del'>-  Elf32_Rel *	plt_rel;	/* PLT relocation table */</div><div class='del'>-</div><div class='del'>-  /* FINI */</div><div class='del'>-  void (*fini)(void);</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define HASH_BUCKET_LEN(p)	((p))</div><div class='del'>-#define HASH_BUCKET(p)		((p)+2)</div><div class='del'>-</div><div class='del'>-#define HASH_CHAIN_LEN(p)	((p)+1)</div><div class='del'>-#define HASH_CHAIN(p)		((p)+2+HASH_BUCKET_LEN(p))</div><div class='del'>-</div><div class='del'>-unsigned long elf_hash(const unsigned char *name);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/_dl_jump.S b/mdk-stage1/dietlibc/libdl/_dl_jump.S<br/>deleted file mode 100644<br/>index 134f31ea5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/_dl_jump.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/_dl_jump.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.global _dl_jump</div><div class='del'>-_dl_jump:</div><div class='del'>-	call	do_rel</div><div class='del'>-	pop	%edx</div><div class='del'>-	pop	%edx</div><div class='del'>-	jmp	*%eax</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/_dl_open.c b/mdk-stage1/dietlibc/libdl/_dl_open.c<br/>deleted file mode 100644<br/>index 1f907db21..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/_dl_open.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/_dl_open.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,207 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/mman.h&gt;</div><div class='del'>-#include &lt;dlfcn.h&gt;</div><div class='del'>-#include &lt;linux/elf.h&gt;</div><div class='del'>-</div><div class='del'>-#include "_dl_int.h"</div><div class='del'>-</div><div class='del'>-struct _dl_handle dl_test;</div><div class='del'>-</div><div class='del'>-#define _ELF_DWN_ROUND(ps,n)	((n)&amp;(~((ps)-1)))</div><div class='del'>-#define _ELF_UP_ROUND(ps,n)	((((n)&amp;((ps)-1))?(ps):0)+ _ELF_DWN_ROUND((ps),(n)))</div><div class='del'>-#define _ELF_RST_ROUND(ps,n)	((n)&amp;((ps)-1))</div><div class='del'>-</div><div class='del'>-void _dl_jump();</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * this file is a Q. &amp; D. hack ... don't think this is bug free or meaningfull</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void *do_map_in(void *base, unsigned long length, int flags, int fd, unsigned long offset)</div><div class='del'>-{</div><div class='del'>-  int perm = 0;</div><div class='del'>-  if (flags &amp; PF_X) perm|=PROT_EXEC;</div><div class='del'>-  if (flags &amp; PF_R) perm|=PROT_READ;</div><div class='del'>-  if (flags &amp; PF_W) perm|=PROT_WRITE;</div><div class='del'>-  return mmap(base, length, perm, MAP_PRIVATE|((base)?MAP_FIXED:0), fd, offset);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long do_rel(struct _dl_handle * tmp_dl, unsigned long off)</div><div class='del'>-{</div><div class='del'>-//  struct _dl_handle * tmp_dl = ((void*)*((&amp;off)-1));</div><div class='del'>-  Elf32_Rel *tmp = ((void*)tmp_dl-&gt;plt_rel)+off;</div><div class='del'>-  int sym=ELF32_R_SYM(tmp-&gt;r_info);</div><div class='del'>-  register unsigned long sym_val;</div><div class='del'>-</div><div class='del'>-  printf("do_rel %08x %08x\n",tmp_dl,off);</div><div class='del'>-</div><div class='del'>-  printf ("do_rel %08x+%x\n",tmp_dl-&gt;plt_rel,off);</div><div class='del'>-  printf("do_rel @ %08x with type %d -&gt; %d\n",tmp-&gt;r_offset,ELF32_R_TYPE(tmp-&gt;r_info),sym);</div><div class='del'>-</div><div class='del'>-  printf("do_rel sym %08x\n",tmp_dl-&gt;dyn_sym_tab[sym].st_value);</div><div class='del'>-</div><div class='del'>-  /* modify GOT for REAL symbol */</div><div class='del'>-  sym_val=((unsigned long)(tmp_dl-&gt;mem_base+tmp_dl-&gt;dyn_sym_tab[sym].st_value));</div><div class='del'>-  *((unsigned long*)(tmp_dl-&gt;mem_base+tmp-&gt;r_offset))=sym_val;</div><div class='del'>-</div><div class='del'>-  printf("do_rel sym %08x\n",sym_val);</div><div class='del'>-  /* HOWTO JUMP ?!? */</div><div class='del'>-  return sym_val;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *_dl_open(const char*pathname, int fd, int flag)</div><div class='del'>-{</div><div class='del'>-  int ps=getpagesize();</div><div class='del'>-  int i;</div><div class='del'>-  unsigned char buf[1024];</div><div class='del'>-  char *m=0,*d;</div><div class='del'>-  struct _dl_handle *ret=0;</div><div class='del'>-</div><div class='del'>-  unsigned long l;</div><div class='del'>-</div><div class='del'>-  Elf32_Ehdr *eh;</div><div class='del'>-  Elf32_Phdr *ph;</div><div class='del'>-</div><div class='del'>-  int ld_nr=0;</div><div class='del'>-  Elf32_Phdr *ld[4]={0,0,0,0};</div><div class='del'>-  Elf32_Phdr *dyn=0;</div><div class='del'>-</div><div class='del'>-  if (fd==-1) return 0;</div><div class='del'>-</div><div class='del'>-  printf("_dl_open: %s\n",pathname);</div><div class='del'>-</div><div class='del'>-  read(fd, buf, 1024);</div><div class='del'>-  eh=(Elf32_Ehdr*)buf;</div><div class='del'>-  ph=(Elf32_Phdr*)&amp;buf[eh-&gt;e_phoff];</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;eh-&gt;e_phnum; i++) {</div><div class='del'>-    if (ph[i].p_type==PT_LOAD) {</div><div class='del'>-      ld[ld_nr++]=ph+i;</div><div class='del'>-    }</div><div class='del'>-    if (ph[i].p_type==PT_DYNAMIC) {</div><div class='del'>-      dyn=ph+i;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (ld_nr==1) {</div><div class='del'>-    unsigned long offset = _ELF_DWN_ROUND(ps,ld[0]-&gt;p_offset);</div><div class='del'>-    unsigned long off = _ELF_RST_ROUND(ps,ld[0]-&gt;p_offset);</div><div class='del'>-    unsigned long length = _ELF_UP_ROUND(ps,ld[0]-&gt;p_memsz+off);</div><div class='del'>-    m = (char*)do_map_in(0, length, ld[0]-&gt;p_flags, fd, offset);</div><div class='del'>-</div><div class='del'>-    /* zero pad bss */</div><div class='del'>-    l = ld[0]-&gt;p_offset+ld[0]-&gt;p_filesz;</div><div class='del'>-    memset(m+l,0,length-l);</div><div class='del'>-</div><div class='del'>-    dl_test.mem_base=m;</div><div class='del'>-    dl_test.mem_size=length;</div><div class='del'>-    dl_test.lnk_count=0;</div><div class='del'>-</div><div class='del'>-    ret = &amp;dl_test;</div><div class='del'>-  }</div><div class='del'>-  else if (ld_nr==2) { /* aem... yes Quick &amp; Really Dirty / for the avarage 99% */</div><div class='del'>-    //unsigned long text_addr = _ELF_DWN_ROUND(ps,ld[0]-&gt;p_vaddr);</div><div class='del'>-    unsigned long text_offset = _ELF_DWN_ROUND(ps,ld[0]-&gt;p_offset);</div><div class='del'>-    unsigned long text_off = _ELF_RST_ROUND(ps,ld[0]-&gt;p_offset);</div><div class='del'>-    unsigned long text_size = _ELF_UP_ROUND(ps,ld[0]-&gt;p_memsz+text_off);</div><div class='del'>-</div><div class='del'>-    unsigned long data_addr = _ELF_DWN_ROUND(ps,ld[1]-&gt;p_vaddr);</div><div class='del'>-    unsigned long data_offset = _ELF_DWN_ROUND(ps,ld[1]-&gt;p_offset);</div><div class='del'>-    unsigned long data_off = _ELF_RST_ROUND(ps,ld[1]-&gt;p_offset);</div><div class='del'>-    unsigned long data_size = _ELF_UP_ROUND(ps,ld[1]-&gt;p_memsz+data_off);</div><div class='del'>-    unsigned long data_fsize = _ELF_UP_ROUND(ps,ld[1]-&gt;p_filesz+data_off);</div><div class='del'>-</div><div class='del'>-    /* mmap all mem_blocks for *.so */</div><div class='del'>-    l = text_size+data_size;</div><div class='del'>-</div><div class='del'>-    dl_test.mem_size=l;</div><div class='del'>-</div><div class='del'>-    m = (char*) do_map_in(0,l,ld[0]-&gt;p_flags,fd,text_offset);</div><div class='del'>-</div><div class='del'>-    /* release data,bss part */</div><div class='del'>-    mprotect(m+data_addr, data_size, PROT_NONE);</div><div class='del'>-</div><div class='del'>-    /* mmap data,bss part */</div><div class='del'>-    d = (char*) do_map_in(m+data_addr,data_fsize,ld[1]-&gt;p_flags,fd,data_offset);</div><div class='del'>-</div><div class='del'>-    /* zero pad bss */</div><div class='del'>-    l = data_off+ld[1]-&gt;p_filesz;</div><div class='del'>-    memset(d+l,0,data_size-l);</div><div class='del'>-</div><div class='del'>-    /* more bss ? */</div><div class='del'>-    if (data_size&gt;data_fsize) {</div><div class='del'>-      l = data_size-data_fsize;</div><div class='del'>-      mmap(d+data_fsize, l, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    dl_test.mem_base=m;</div><div class='del'>-    dl_test.lnk_count=0;</div><div class='del'>-    ret = &amp;dl_test;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  printf("_dl_open pre resolv\n");</div><div class='del'>-  if (ret) {</div><div class='del'>-    Elf32_Dyn* dyn_tab = (void*)m+dyn-&gt;p_vaddr;</div><div class='del'>-    void (*init)();</div><div class='del'>-    unsigned long* got=0;</div><div class='del'>-    void* jmprel=0;</div><div class='del'>-    int pltreltype=0;</div><div class='del'>-    int pltrelsize=0;</div><div class='del'>-</div><div class='del'>-    printf("_dl_open IN resolv\n");</div><div class='del'>-    for(i=0;dyn_tab[i].d_tag;i++) {</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_HASH) {</div><div class='del'>-	ret-&gt;hash_tab = (unsigned long*)(m+dyn_tab[i].d_un.d_ptr);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_SYMTAB) {</div><div class='del'>-	ret-&gt;dyn_sym_tab = (Elf32_Sym*)(m+dyn_tab[i].d_un.d_ptr);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_STRTAB) {</div><div class='del'>-	ret-&gt;dyn_str_tab = (char*)(m+dyn_tab[i].d_un.d_ptr);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_FINI) {</div><div class='del'>-	ret-&gt;fini = (void(*)(void))(m+dyn_tab[i].d_un.d_val);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_INIT) {</div><div class='del'>-	init = (void(*)(void))(m+dyn_tab[i].d_un.d_val);</div><div class='del'>-	printf("init @ %08x\n",init);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_PLTGOT) {</div><div class='del'>-	got=(unsigned long*)(m+dyn_tab[i].d_un.d_val);</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_PLTREL) {</div><div class='del'>-	pltreltype=dyn_tab[i].d_un.d_val;</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_PLTRELSZ) {</div><div class='del'>-	pltrelsize=dyn_tab[i].d_un.d_val;</div><div class='del'>-      }</div><div class='del'>-      if (dyn_tab[i].d_tag==DT_JMPREL) {</div><div class='del'>-	jmprel=(m+dyn_tab[i].d_un.d_val);</div><div class='del'>-	dl_test.plt_rel=jmprel;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    /* GOT */</div><div class='del'>-    got[0]+=(unsigned long)m;</div><div class='del'>-    got[1]=(unsigned long)&amp;dl_test;</div><div class='del'>-//    got[2]=(unsigned long)do_rel;</div><div class='del'>-    got[2]=(unsigned long)(_dl_jump);</div><div class='del'>-    /* */</div><div class='del'>-</div><div class='del'>-    if (pltreltype == DT_REL) {</div><div class='del'>-      Elf32_Rel *tmp = jmprel;</div><div class='del'>-      for (;(char*)tmp&lt;(((char*)jmprel)+pltrelsize);(char*)tmp=((char*)tmp)+sizeof(Elf32_Rel)) {</div><div class='del'>-	*((unsigned long*)(m+tmp-&gt;r_offset))+=(unsigned long)m;</div><div class='del'>-//	*((unsigned long*)(m+tmp-&gt;r_offset))+=(unsigned long)do_rel;</div><div class='del'>-	printf("rel @ %08x with type %d -&gt; %d\n",tmp-&gt;r_offset,ELF32_R_TYPE(tmp-&gt;r_info),ELF32_R_SYM(tmp-&gt;r_info));</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  printf("_dl_open post resolv, pre init\n");</div><div class='del'>-    init();</div><div class='del'>-  }</div><div class='del'>-  printf("_dl_open post resolv, init\n");</div><div class='del'>-</div><div class='del'>-  close(fd);</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/_dl_search.c b/mdk-stage1/dietlibc/libdl/_dl_search.c<br/>deleted file mode 100644<br/>index 5e3217d46..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/_dl_search.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/_dl_search.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,84 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;dlfcn.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#define WANT_LD_SO_CONF_SEARCH</div><div class='del'>-</div><div class='del'>-static const char *_dl_search_rpath=0;</div><div class='del'>-void _dl_set_rpath(const char *path) { _dl_search_rpath=path; }</div><div class='del'>-</div><div class='del'>-/* search a colon (semicolon) seperated path for the libraray "filename" */</div><div class='del'>-static int _dl_search_path(char *buf, int len, const char*path, const int pathlen, const char *filename)</div><div class='del'>-{</div><div class='del'>-  int fd,l=len,i=1;</div><div class='del'>-  const char *c,*pe=path+pathlen;</div><div class='del'>-</div><div class='del'>-  if (path) {</div><div class='del'>-    for (c=path; c&lt;pe; c+=i) {</div><div class='del'>-      if ((*c==':')||(*c==';')) ++c;</div><div class='del'>-      i=strcspn(c,":;");</div><div class='del'>-      if (i) {</div><div class='del'>-	strncpy(buf, c, i); buf[i]=0;</div><div class='del'>-	l-=i;</div><div class='del'>-	strncat(buf, "/", l);</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-	buf[0]=0;</div><div class='del'>-      strncat(buf, filename, --l);</div><div class='del'>-//      printf("_dl_search: %s\n",buf);</div><div class='del'>-      if ((fd=open(buf,O_RDONLY))!=-1) return fd;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* parse the SMALL file "conf" for lib directories (aem... hang me if you can :) ) */</div><div class='del'>-static int _dl_search_conf(char *buf, int len, const char *conf, const char *filename)</div><div class='del'>-{</div><div class='del'>-  char ld_so_conf[1024];</div><div class='del'>-  int i,l,fd=open(conf,O_RDONLY);</div><div class='del'>-  if (fd!=-1) {</div><div class='del'>-    l=read(fd,ld_so_conf,sizeof(ld_so_conf)-1);</div><div class='del'>-    ld_so_conf[sizeof(ld_so_conf)-1]=0;</div><div class='del'>-    close(fd);</div><div class='del'>-    if (ld_so_conf[l-1]=='\n') ld_so_conf[--l]=0;</div><div class='del'>-    for (i=0;i&lt;l;i++) if (ld_so_conf[i]=='\n') ld_so_conf[i]=':';</div><div class='del'>-    if ((fd=_dl_search_path(buf,len,ld_so_conf,l,filename))!=-1) return fd;</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int _dl_search(char *buf, int len, const char *filename)</div><div class='del'>-{</div><div class='del'>-  int fd;</div><div class='del'>-</div><div class='del'>-  /* 1. search the LD_RUN_PATH (from the executable */</div><div class='del'>-  if (_dl_search_rpath) {</div><div class='del'>-    if ((fd=_dl_search_path(buf,len,_dl_search_rpath,strlen(_dl_search_rpath),filename))!=-1) return fd;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* 2. IF we have a "secure" enviroment THEN search LD_LIBRARY_PATH */</div><div class='del'>-  if (getuid()==geteuid()) {</div><div class='del'>-    char *p=getenv("LD_LIBRARY_PATH");</div><div class='del'>-    if (p)</div><div class='del'>-      if ((fd=_dl_search_path(buf,len,p,strlen(p),filename))!=-1) return fd;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* 3. search all pathes in the the /etc/diet.ld.conf, a dietlibc extension :) */</div><div class='del'>-  if ((fd=_dl_search_conf(buf,len,"/etc/diet.ld.conf",filename))!=-1) return fd;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LD_SO_CONF_SEARCH</div><div class='del'>-  /* 4. search all pathes in the the /etc/ld.so.conf / can't handle this ...=lib?? crap */</div><div class='del'>-  if ((fd=_dl_search_conf(buf,len,"/etc/ld.so.conf",filename))!=-1) return fd;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  /* default path search */</div><div class='del'>-  {</div><div class='del'>-    const char* def_path="/usr/lib:/lib";</div><div class='del'>-    return _dl_search_path(buf,len,def_path,strlen(def_path),filename);</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/dlclose.c b/mdk-stage1/dietlibc/libdl/dlclose.c<br/>deleted file mode 100644<br/>index 384550c47..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/dlclose.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/dlclose.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include "_dl_int.h"</div><div class='del'>-</div><div class='del'>-int dlclose (void *handle)</div><div class='del'>-{</div><div class='del'>-  if (handle) {</div><div class='del'>-    struct _dl_handle *h = handle;</div><div class='del'>-    if (h-&gt;lnk_count) {</div><div class='del'>-      --h-&gt;lnk_count;</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-    if (munmap(h-&gt;mem_base,h-&gt;mem_size)!=0) return -1;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/dlerror.c b/mdk-stage1/dietlibc/libdl/dlerror.c<br/>deleted file mode 100644<br/>index 1e31bae54..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/dlerror.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/dlerror.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-const char *dlerror(void)</div><div class='del'>-{</div><div class='del'>-  return "HAE ?!?";</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/dlopen.c b/mdk-stage1/dietlibc/libdl/dlopen.c<br/>deleted file mode 100644<br/>index 1693d889f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/dlopen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/dlopen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;dlfcn.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-</div><div class='del'>-int _dl_search(char*buf, int bufsize, const char*filename);</div><div class='del'>-void *_dl_open(const char*pathname, int fd, int flag);</div><div class='del'>-</div><div class='del'>-void *dlopen (const char *filename, int flag)</div><div class='del'>-{</div><div class='del'>-  int fd;</div><div class='del'>-  char buf[PATH_MAX];</div><div class='del'>-  const char *p;</div><div class='del'>-  if (*filename=='/')</div><div class='del'>-    fd=open(p=filename,O_RDONLY);</div><div class='del'>-  else {</div><div class='del'>-    p=buf;</div><div class='del'>-    fd=_dl_search(buf,sizeof(buf),filename);</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return _dl_open(p,fd,flag);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/dlsym.c b/mdk-stage1/dietlibc/libdl/dlsym.c<br/>deleted file mode 100644<br/>index 2af940837..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/dlsym.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/dlsym.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "_dl_int.h"</div><div class='del'>-</div><div class='del'>-void *dlsym(void *handle, char *symbol)</div><div class='del'>-{</div><div class='del'>-  printf("dlsym(%08x,%s) -&gt; %08x\n",handle,symbol,elf_hash(symbol)%17);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libdl/elf_hash.c b/mdk-stage1/dietlibc/libdl/elf_hash.c<br/>deleted file mode 100644<br/>index 463dba0dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libdl/elf_hash.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libdl/elf_hash.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-unsigned long elf_hash(const unsigned char *name)</div><div class='del'>-{</div><div class='del'>-  unsigned long h=0, g;</div><div class='del'>-</div><div class='del'>-  while (*name)</div><div class='del'>-  {</div><div class='del'>-    h = (h&lt;&lt;4) + *(name++);</div><div class='del'>-    if (g = h&amp;0xf0000000) h ^= g&gt;&gt;24;</div><div class='del'>-    h &amp;= ~g;</div><div class='del'>-  }</div><div class='del'>-  return h;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c b/mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c<br/>deleted file mode 100644<br/>index b0c3605b0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/liblatin1/latin1-iscntrl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int iscntrl(int c) {</div><div class='del'>-  return (c&lt;32) || (c&gt;=127 &amp;&amp; c&lt;=160);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c b/mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c<br/>deleted file mode 100644<br/>index c8d4a5df0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/liblatin1/latin1-isgraph.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-int isgraph(int c) {</div><div class='del'>-  return (c&gt;=33 &amp;&amp; c&lt;=126) || (c&gt;=161 &amp;&amp; c&lt;=255);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/liblatin1/latin1-islower.c b/mdk-stage1/dietlibc/liblatin1/latin1-islower.c<br/>deleted file mode 100644<br/>index cab1a5171..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/liblatin1/latin1-islower.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/liblatin1/latin1-islower.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int islower(int c) {</div><div class='del'>-  return (c&gt;='a' &amp;&amp; c&lt;='z') || (c&gt;=223 &amp;&amp; c&lt;=255 &amp;&amp; c!=247);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/liblatin1/latin1-isprint.c b/mdk-stage1/dietlibc/liblatin1/latin1-isprint.c<br/>deleted file mode 100644<br/>index f632483a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/liblatin1/latin1-isprint.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/liblatin1/latin1-isprint.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-</div><div class='del'>-int isprint(int c) {</div><div class='del'>-  return (c&gt;=32 &amp;&amp; c&lt;=126) || (c&gt;=160 &amp;&amp; c&lt;=255);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/liblatin1/latin1-isupper.c b/mdk-stage1/dietlibc/liblatin1/latin1-isupper.c<br/>deleted file mode 100644<br/>index 1c1d59db8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/liblatin1/latin1-isupper.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/liblatin1/latin1-isupper.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-int isupper(int c) {</div><div class='del'>-  return (c&gt;='A' &amp;&amp; c&lt;='Z') || (c&gt;=192 &amp;&amp; c&lt;=222 &amp;&amp; c!=215);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/CHANGES b/mdk-stage1/dietlibc/libpthread/CHANGES<br/>deleted file mode 100644<br/>index d39d990ba..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/CHANGES?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/CHANGES</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,45 +0,0 @@</div><div class='del'>-This is the pthread implementation of dietlibc.</div><div class='del'>-Written from scratch by Olaf Dreesen.</div><div class='del'>-</div><div class='del'>-Thu Apr 12 16:47:12 MEST 2001</div><div class='del'>-</div><div class='del'>-  added conditional variables...</div><div class='del'>-  except pthread_cond_timedwait all should work man-page like</div><div class='del'>-  pthread_cond_timedwait dosen't handle cancel request according to man-page</div><div class='del'>-</div><div class='del'>-  added thread specific key handling (all according to man-page)</div><div class='del'>-</div><div class='del'>-Fri Mar 30 18:47:37 MEST 2001</div><div class='del'>-</div><div class='del'>-  uff found some logic errors and fixed them.</div><div class='del'>-  pthread_create had a problem with user provided stacks.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Fri Mar 23 14:09:54 MET 2001</div><div class='del'>-</div><div class='del'>-  arg.. the kernel-header are so inconsistent...</div><div class='del'>-  on x86 it works on arm and sparc not due to MISSING defines, miss-places</div><div class='del'>-  includes and __KERNEL__ checks....</div><div class='del'>-  the best in this category is that the kernel-header are changed that the</div><div class='del'>-  buggy (g)libc haven't to change... (f..k glibc, the headers HAVE to be</div><div class='del'>-  CONSISTENT)</div><div class='del'>-  a public defined symbol on arch X have to be in Y to unless marked...</div><div class='del'>-  that is mainly speaking SCHED.H ! arg....</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Wed Mar 14 04:28:45 MET 2001</div><div class='del'>-</div><div class='del'>-  I have implemented the "Manager Thread" so that nested thread creation</div><div class='del'>-  works. really ugly stuff... don't look at it unless you're sitting on solid</div><div class='del'>-  ground.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Mon Mar 12 16:16:00 CET 2001</div><div class='del'>-</div><div class='del'>-  first of all:</div><div class='del'>-  I strongly suggest NOT to use it yet, it's very, very, ... very</div><div class='del'>-  experimental. I guess you got the point. there is still much debug code,</div><div class='del'>-  incomplete functions and unusable states....</div><div class='del'>-</div><div class='del'>-  I'm still working on the final alpha...</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/Makefile b/mdk-stage1/dietlibc/libpthread/Makefile<br/>deleted file mode 100644<br/>index 06420f43a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,139 +0,0 @@</div><div class='del'>-all: libpthread.a</div><div class='del'>-</div><div class='del'>-ARCH=$(shell uname -m | sed 's/i[4-9]86/i386/')</div><div class='del'>-</div><div class='del'>-CFLAGS=-pipe</div><div class='del'>-CROSS=</div><div class='del'>-</div><div class='del'>-CC=gcc</div><div class='del'>-</div><div class='del'>-VPATH=../$(ARCH)/</div><div class='del'>-</div><div class='del'>-PTHREAD_OBJS = \</div><div class='del'>-	__testandset.o \</div><div class='del'>- \</div><div class='del'>-	thread_internal.o \</div><div class='del'>-	thread_key.o \</div><div class='del'>- \</div><div class='del'>-	pthread_once.o pthread_spinlock.o \</div><div class='del'>- \</div><div class='del'>-	pthread_create.o pthread_detach.o \</div><div class='del'>-	pthread_join.o pthread_self.o \</div><div class='del'>-	pthread_exit.o \</div><div class='del'>- \</div><div class='del'>-	pthread_cleanup_push.o \</div><div class='del'>-	pthread_cleanup_pop.o \</div><div class='del'>- \</div><div class='del'>-	pthread_attr_getdetachstate.o \</div><div class='del'>-	pthread_attr_getinheritsched.o \</div><div class='del'>-	pthread_attr_getschedparam.o \</div><div class='del'>-	pthread_attr_getschedpolicy.o \</div><div class='del'>-	pthread_attr_getscope.o \</div><div class='del'>-	pthread_attr_getstackaddr.o \</div><div class='del'>-	pthread_attr_getstacksize.o \</div><div class='del'>-	pthread_attr_init.o \</div><div class='del'>-	pthread_attr_setdetachstate.o \</div><div class='del'>-	pthread_attr_setinheritsched.o \</div><div class='del'>-	pthread_attr_setschedparam.o \</div><div class='del'>-	pthread_attr_setschedpolicy.o \</div><div class='del'>-	pthread_attr_setscope.o \</div><div class='del'>-	pthread_attr_setstackaddr.o \</div><div class='del'>-	pthread_attr_setstacksize.o \</div><div class='del'>- \</div><div class='del'>-	pthread_cancel.o pthread_setcancelstate.o \</div><div class='del'>-	pthread_setcanceltype.o pthread_testcancel.o \</div><div class='del'>- \</div><div class='del'>-	pthread_mutex_init.o \</div><div class='del'>-	pthread_mutex_destroy.o \</div><div class='del'>-	pthread_mutex_lock.o \</div><div class='del'>-	pthread_mutex_trylock.o \</div><div class='del'>-	pthread_mutex_unlock.o \</div><div class='del'>- \</div><div class='del'>-	pthread_mutexattr_getkind_np.o \</div><div class='del'>-	pthread_mutexattr_init.o \</div><div class='del'>-	pthread_mutexattr_setkind_np.o \</div><div class='del'>- \</div><div class='del'>-	pthread_condattr.o \</div><div class='del'>-	pthread_cond_broadcast.o \</div><div class='del'>-	pthread_cond_destroy.o \</div><div class='del'>-	pthread_cond_init.o \</div><div class='del'>-	pthread_cond_signal.o \</div><div class='del'>-	pthread_cond_timedwait.o \</div><div class='del'>-	pthread_cond_wait.o \</div><div class='del'>- \</div><div class='del'>-	pthread_key_create.o \</div><div class='del'>-	pthread_key_delete.o \</div><div class='del'>-	pthread_getspecific.o \</div><div class='del'>-	pthread_setspecific.o \</div><div class='del'>- \</div><div class='del'>-	pthread_atfork.o \</div><div class='del'>-	pthread_sys_alloc.o \</div><div class='del'>-	pthread_sys_close.o \</div><div class='del'>-	pthread_sys_create.o \</div><div class='del'>-	pthread_sys_fcntl.o \</div><div class='del'>-	pthread_sys_fsync.o \</div><div class='del'>-	pthread_sys_nanosleep.o \</div><div class='del'>-	pthread_sys_logging.o \</div><div class='del'>-	pthread_sys_open.o \</div><div class='del'>-	pthread_sys_pause.o \</div><div class='del'>-	pthread_sys_read.o \</div><div class='del'>-	pthread_sys_sigsuspend.o \</div><div class='del'>-	pthread_sys_tcdrain.o \</div><div class='del'>-	pthread_sys_waitpid.o \</div><div class='del'>-	pthread_sys_write.o</div><div class='del'>-</div><div class='del'>-%.o : %.c</div><div class='del'>-	$(CC) $(CFLAGS) -c -o $@ $?</div><div class='del'>-</div><div class='del'>-include ../$(ARCH)/Makefile.add</div><div class='del'>-</div><div class='del'>-ifeq ($(CFLAGS),-pipe)</div><div class='del'>-CFLAGS+=-O -fomit-frame-pointer</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-#CFLAGS = -g</div><div class='del'>-CFLAGS += -Wall</div><div class='del'>-</div><div class='del'>-CFLAGS += -I.. -I../include -Wall</div><div class='del'>-</div><div class='del'>-PWD=$(shell pwd)</div><div class='del'>-</div><div class='del'>-.SUFFIXES:</div><div class='del'>-.SUFFIXES: .S .c</div><div class='del'>-</div><div class='del'>-% :: %,v</div><div class='del'>-</div><div class='del'>-%.o: %.S</div><div class='del'>-	$(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $&lt;</div><div class='del'>-</div><div class='del'>-%.o: %.c</div><div class='del'>-	$(CROSS)$(CC) -I. -Iinclude $(CFLAGS) -c $&lt;</div><div class='del'>-#	$(CROSS)strip -x -R .comment -R .note $@</div><div class='del'>-</div><div class='del'>-libpthread.a: $(PTHREAD_OBJS)</div><div class='del'>-	ar cr $@ $^</div><div class='del'>-</div><div class='del'>-libpthread.so: libpthread.a</div><div class='del'>-	$(CROSS)ld -whole-archive -shared -o $@ $^</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	$(RM) *.o *.a *.so *.out *~</div><div class='del'>-</div><div class='del'>-exports: libpthread.a</div><div class='del'>-	nm -g libpthread.a | grep -w T | awk '{ print $$3 }' | sort -u &gt; exports</div><div class='del'>-</div><div class='del'>-.PHONY: test.out</div><div class='del'>-</div><div class='del'>-test.out: test.o libpthread.a $(LIBS)</div><div class='del'>-	$(CROSS)$(CC) -g $(CFLAGS) -nostdlib ../bin-$(ARCH)/start.o -o $@ $^ ../bin-$(ARCH)/dietlibc.a -lgcc</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-.PHONY: sparc ppc mips arm alpha i386</div><div class='del'>-</div><div class='del'>-sparc ppc alpha i386:</div><div class='del'>-	$(MAKE) ARCH=$@ CROSS=$@-linux- all t libdietc.so</div><div class='del'>-</div><div class='del'>-mips arm:</div><div class='del'>-	$(MAKE) ARCH=$@ CROSS=$@-linux-gnu- all t libdietc.so</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/README b/mdk-stage1/dietlibc/libpthread/README<br/>deleted file mode 100644<br/>index 3139c731d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>-LIBPTHREAD</div><div class='del'>-</div><div class='del'>-  This is the pthread implementation of dietlibc.</div><div class='del'>-  Written from scratch by Olaf Dreesen.</div><div class='del'>-</div><div class='del'>-1. STATUS: incomplete but should work (or not... I had a lot of heisen-bugs...)</div><div class='del'>-	On non i386 archs the kernel header have major differences...</div><div class='del'>-	NO workaround yet for this problems...</div><div class='del'>-</div><div class='del'>-It's like linuxthreads a clone base thread implementation.</div><div class='del'>-</div><div class='del'>-I have implemented a "Manager Thread" with all the pain it involves...</div><div class='del'>-Nested thread creation is now working fine...</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2. HOW-TO make this lib:</div><div class='del'>-</div><div class='del'>-	1. generate the dietlibc in the parent directory.</div><div class='del'>-	   and make sure you have WANT_THREAD_SAVE active in the file:</div><div class='del'>-	   dietfeatures.h</div><div class='del'>-</div><div class='del'>-	2. change back here and type make</div><div class='del'>-</div><div class='del'>-	and then you should have a libpthread.a</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-3. NOTES</div><div class='del'>-</div><div class='del'>-NON STANDARD SIGNAL HANDLING for the threads:</div><div class='del'>-</div><div class='del'>-  SIGHUP	the targeted thread is canceled</div><div class='del'>-	depends on the cancel type of the thread.</div><div class='del'>-</div><div class='del'>-	ASYNCHRONOUS: the signal handler will KILL the thread immediately.</div><div class='del'>-</div><div class='del'>-	DEFERRED: the signal handler mark its thread as canceled.</div><div class='del'>-		(only for the sig-handler to do some sane stuff...)</div><div class='del'>-</div><div class='del'>-  SIGTERM	the thread is KILLED</div><div class='del'>-	if the thread signaled is the main thread, then ALL child-threads</div><div class='del'>-	will get a SIGHUP and after some micros a SIGTERM....</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_atfork.c b/mdk-stage1/dietlibc/libpthread/pthread_atfork.c<br/>deleted file mode 100644<br/>index 2dc612dcc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_atfork.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_atfork.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,77 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-#define PTHREAD_NUM_ATFORK 4</div><div class='del'>-</div><div class='del'>-static struct _pthread_fastlock __atfork_struct_lock;</div><div class='del'>-static struct {</div><div class='del'>-  int used;</div><div class='del'>-  void (*prepare)(void);</div><div class='del'>-  void (*parent)(void);</div><div class='del'>-  void (*child)(void);</div><div class='del'>-} pthread_atfork_buf[PTHREAD_NUM_ATFORK];</div><div class='del'>-</div><div class='del'>-int pthread_atfork(void (*prepare)(void),</div><div class='del'>-		   void (*parent)(void),</div><div class='del'>-		   void (*child)(void))</div><div class='del'>-{</div><div class='del'>-  int i,ret=-1;</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  __pthread_lock(&amp;__atfork_struct_lock);</div><div class='del'>-</div><div class='del'>-  for (i=0;i&lt;PTHREAD_NUM_ATFORK; ++i) {</div><div class='del'>-    if (!(pthread_atfork_buf[i].used)) {</div><div class='del'>-      pthread_atfork_buf[i].prepare=prepare;</div><div class='del'>-      pthread_atfork_buf[i].parent=parent;</div><div class='del'>-      pthread_atfork_buf[i].child=child;</div><div class='del'>-      ret=0;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__atfork_struct_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-</div><div class='del'>-  if (ret) (*(__errno_location()))=ENOMEM;</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-pid_t fork(void)</div><div class='del'>-{</div><div class='del'>-  pid_t pid;</div><div class='del'>-  int i=PTHREAD_NUM_ATFORK;</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  __pthread_lock(&amp;__atfork_struct_lock);</div><div class='del'>-</div><div class='del'>-  while (i) {</div><div class='del'>-    if (pthread_atfork_buf[--i].used)</div><div class='del'>-      if (pthread_atfork_buf[i].prepare)</div><div class='del'>-	pthread_atfork_buf[i].prepare();</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  pid=__libc_fork();</div><div class='del'>-</div><div class='del'>-  if (pid&gt;0) {		/* parent */</div><div class='del'>-    for (i=0;i&lt;PTHREAD_NUM_ATFORK;++i)</div><div class='del'>-      if (pthread_atfork_buf[i].used)</div><div class='del'>-	if (pthread_atfork_buf[i].parent)</div><div class='del'>-	  pthread_atfork_buf[i].parent();</div><div class='del'>-  } else if (pid==0) {	/* child */</div><div class='del'>-    for (i=0;i&lt;PTHREAD_NUM_ATFORK;++i)</div><div class='del'>-      if (pthread_atfork_buf[i].used)</div><div class='del'>-	if (pthread_atfork_buf[i].child)</div><div class='del'>-	  pthread_atfork_buf[i].child();</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__atfork_struct_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-</div><div class='del'>-  return pid;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c<br/>deleted file mode 100644<br/>index ccdfc0e47..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getdetachstate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *detachstate=attr-&gt;__detachstate;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c<br/>deleted file mode 100644<br/>index 314fd8ade..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getinheritsched.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *inherit = attr-&gt;__inheritsched;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c<br/>deleted file mode 100644<br/>index f0a9a07d1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getschedparam.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  param-&gt;sched_priority=attr-&gt;__schedparam.sched_priority;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c<br/>deleted file mode 100644<br/>index 53f1bed8c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *policy = attr-&gt;__schedpolicy;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c<br/>deleted file mode 100644<br/>index 99a33110d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getscope.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getscope(const pthread_attr_t *attr, int *scope)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *scope=PTHREAD_SCOPE_SYSTEM;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c<br/>deleted file mode 100644<br/>index d71421901..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getstackaddr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stack)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *stack=attr-&gt;__stackaddr;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c<br/>deleted file mode 100644<br/>index 4785979a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_getstacksize.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *stacksize=attr-&gt;__stacksize;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_init.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_init.c<br/>deleted file mode 100644<br/>index 726e88fe5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_init(pthread_attr_t *attr)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  memset(attr,0,sizeof(pthread_attr_t));</div><div class='del'>-  attr-&gt;__stacksize=PTHREAD_STACK_SIZE;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int pthread_attr_destroy(pthread_attr_t *attr) __attribute__((alias("pthread_attr_init")));</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c<br/>deleted file mode 100644<br/>index 690ad5f8e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setdetachstate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((detachstate == PTHREAD_CREATE_JOINABLE) ||</div><div class='del'>-      (detachstate == PTHREAD_CREATE_DETACHED)) {</div><div class='del'>-    attr-&gt;__detachstate=detachstate;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c<br/>deleted file mode 100644<br/>index f38e6e35e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setinheritsched.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((inherit==PTHREAD_INHERIT_SCHED) ||</div><div class='del'>-      (inherit==PTHREAD_EXPLICIT_SCHED)) {</div><div class='del'>-    attr-&gt;__inheritsched=inherit;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c<br/>deleted file mode 100644<br/>index 833c0111b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setschedparam.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((attr-&gt;__schedpolicy == SCHED_OTHER) &amp;&amp; (param-&gt;sched_priority == 0)) {</div><div class='del'>-    attr-&gt;__schedparam.sched_priority=0;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  if (((attr-&gt;__schedpolicy == SCHED_RR) || (attr-&gt;__schedpolicy == SCHED_RR))</div><div class='del'>-      &amp;&amp; ((param-&gt;sched_priority &gt; 0) &amp;&amp; (param-&gt;sched_priority &lt; 100))) {</div><div class='del'>-    attr-&gt;__schedparam.sched_priority=param-&gt;sched_priority;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c<br/>deleted file mode 100644<br/>index e845bca32..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setschedpolicy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (policy==SCHED_OTHER) {</div><div class='del'>-    attr-&gt;__schedpolicy=policy;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  if ((policy==SCHED_FIFO) || (policy==SCHED_RR)) {</div><div class='del'>-    if (geteuid()==0) {</div><div class='del'>-      attr-&gt;__schedpolicy=policy;</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-    (*(__errno_location()))=ENOTSUP;</div><div class='del'>-  }</div><div class='del'>-  else</div><div class='del'>-    (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c<br/>deleted file mode 100644<br/>index 39088c9b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setscope.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setscope(pthread_attr_t *attr, int scope)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (scope==PTHREAD_SCOPE_SYSTEM) return 0;</div><div class='del'>-</div><div class='del'>-  if (scope==PTHREAD_SCOPE_PROCESS)</div><div class='del'>-    (*(__errno_location()))=ENOTSUP;</div><div class='del'>-  else</div><div class='del'>-    (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c<br/>deleted file mode 100644<br/>index 4b320cd9d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setstackaddr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  attr-&gt;__stackaddr=stack;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c<br/>deleted file mode 100644<br/>index cfbab7747..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_attr_setstacksize.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (stacksize&gt;=PTHREAD_STACK_SIZE) {</div><div class='del'>-    attr-&gt;__stacksize=stacksize;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cancel.c b/mdk-stage1/dietlibc/libpthread/pthread_cancel.c<br/>deleted file mode 100644<br/>index 4c87a3ed1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cancel.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cancel.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cancel(pthread_t th)</div><div class='del'>-{</div><div class='del'>-  pthread_t j;</div><div class='del'>-  _pthread_descr thread;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  j=__find_thread_id(th);</div><div class='del'>-</div><div class='del'>-  if (j==-1) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  thread = __get_thread_struct(j);</div><div class='del'>-</div><div class='del'>-  if (thread==0) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (thread-&gt;cancelstate!=PTHREAD_CANCEL_DISABLE) {</div><div class='del'>-    thread-&gt;canceled=1;</div><div class='del'>-    if (thread-&gt;canceltype!=PTHREAD_CANCEL_DEFERRED) {</div><div class='del'>-      kill(thread-&gt;pid,SIGHUP);</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c b/mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c<br/>deleted file mode 100644<br/>index 641bb6083..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cleanup_pop.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-void pthread_cleanup_pop(int execute)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-  struct thread_cleanup_t tmp;</div><div class='del'>-  int i=PTHREAD_MAX_CLEANUP;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-</div><div class='del'>-  while(i&gt;0) {</div><div class='del'>-    if (this-&gt;cleanup_stack[--i].func) {</div><div class='del'>-      tmp.func=this-&gt;cleanup_stack[i].func;</div><div class='del'>-      tmp.arg=this-&gt;cleanup_stack[i].arg;</div><div class='del'>-      this-&gt;cleanup_stack[i].func=0;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (execute) tmp.func(tmp.arg);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c b/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c<br/>deleted file mode 100644<br/>index cd2aabf71..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cleanup_push.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-void pthread_cleanup_push(void (*func)(void*), void *arg)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;PTHREAD_MAX_CLEANUP; ++i) {</div><div class='del'>-    if (this-&gt;cleanup_stack[i].func==0) {</div><div class='del'>-      this-&gt;cleanup_stack[i].func=func;</div><div class='del'>-      this-&gt;cleanup_stack[i].arg=arg;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c<br/>deleted file mode 100644<br/>index d3c2274f3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_broadcast.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_broadcast(pthread_cond_t *cond)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr tmp;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  __pthread_lock(&amp;(cond-&gt;lock));</div><div class='del'>-  while ((tmp=cond-&gt;wait_chain)) {</div><div class='del'>-    cond-&gt;wait_chain=tmp-&gt;waitnext;</div><div class='del'>-    tmp-&gt;waitnext=0;</div><div class='del'>-    tmp-&gt;waiting=0;</div><div class='del'>-  }</div><div class='del'>-  __pthread_unlock(&amp;(cond-&gt;lock));</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c<br/>deleted file mode 100644<br/>index 9a6cc4f0b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_destroy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_destroy(pthread_cond_t *cond)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (cond-&gt;wait_chain) {</div><div class='del'>-    (*__errno_location())=EBUSY;</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  memset(cond,0,sizeof(pthread_cond_t));</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_init.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_init.c<br/>deleted file mode 100644<br/>index 20b38bef2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  memset(cond,0,sizeof(pthread_cond_t));</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c<br/>deleted file mode 100644<br/>index 60bf2119c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_signal.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_signal(pthread_cond_t *cond)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr tmp=0;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  __pthread_lock(&amp;(cond-&gt;lock));</div><div class='del'>-  if ((tmp=cond-&gt;wait_chain)) cond-&gt;wait_chain=tmp-&gt;waitnext;</div><div class='del'>-  __pthread_unlock(&amp;(cond-&gt;lock));</div><div class='del'>-</div><div class='del'>-  if (tmp) {</div><div class='del'>-    tmp-&gt;waitnext=0;</div><div class='del'>-    tmp-&gt;waiting=0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c<br/>deleted file mode 100644<br/>index 6613f2ca9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_timedwait.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,</div><div class='del'>-			   const struct timespec *abstime)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr tmp;</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-  int ret;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this=__thread_self();</div><div class='del'>-</div><div class='del'>-  /* put in wait-chain */</div><div class='del'>-  __pthread_lock(&amp;(cond-&gt;lock));</div><div class='del'>-  this-&gt;waiting=1;</div><div class='del'>-  if (cond-&gt;wait_chain) {</div><div class='del'>-    for(tmp=cond-&gt;wait_chain;tmp-&gt;waitnext;tmp=tmp-&gt;waitnext);</div><div class='del'>-    tmp-&gt;waitnext=this;</div><div class='del'>-  } else cond-&gt;wait_chain=this;</div><div class='del'>-  __pthread_unlock(&amp;(cond-&gt;lock));</div><div class='del'>-</div><div class='del'>-  /* Aeh yeah / wait till signal */</div><div class='del'>-  pthread_mutex_unlock(mutex);</div><div class='del'>-  ret=nanosleep(abstime,0);</div><div class='del'>-  pthread_mutex_lock(mutex);</div><div class='del'>-</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-</div><div class='del'>-  if (ret) {</div><div class='del'>-    if ((*__errno_location())!=EINTR) return -1;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  (*__errno_location())=ETIMEDOUT;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c b/mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c<br/>deleted file mode 100644<br/>index 0c6c0ae13..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_cond_wait.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr tmp;</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this=__thread_self();</div><div class='del'>-</div><div class='del'>-  /* put in wait-chain */</div><div class='del'>-  __pthread_lock(&amp;(cond-&gt;lock));</div><div class='del'>-  this-&gt;waiting=1;</div><div class='del'>-  if (cond-&gt;wait_chain) {</div><div class='del'>-    for(tmp=cond-&gt;wait_chain;tmp-&gt;waitnext;tmp=tmp-&gt;waitnext);</div><div class='del'>-    tmp-&gt;waitnext=this;</div><div class='del'>-  } else cond-&gt;wait_chain=this;</div><div class='del'>-  __pthread_unlock(&amp;(cond-&gt;lock));</div><div class='del'>-</div><div class='del'>-  /* Aeh yeah / wait till signal */</div><div class='del'>-  pthread_mutex_unlock(mutex);</div><div class='del'>-  while (this-&gt;waiting) {</div><div class='del'>-    __thread_wait_some_time();</div><div class='del'>-    if (this-&gt;canceled) this-&gt;waiting=0;	/* we got a cancel signal */</div><div class='del'>-  }</div><div class='del'>-  pthread_mutex_lock(mutex);</div><div class='del'>-</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_condattr.c b/mdk-stage1/dietlibc/libpthread/pthread_condattr.c<br/>deleted file mode 100644<br/>index c537890ba..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_condattr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_condattr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-</div><div class='del'>-int pthread_condattr_init(pthread_condattr_t *attr)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int pthread_condattr_destroy(pthread_condattr_t *attr)</div><div class='del'>-__attribute__((alias("pthread_condattr_init")));</div><div class='del'>-</div><div class='del'>-int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared)</div><div class='del'>-__attribute__((alias("pthread_condattr_init")));</div><div class='del'>-</div><div class='del'>-int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared)</div><div class='del'>-__attribute__((alias("pthread_condattr_init")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_create.c b/mdk-stage1/dietlibc/libpthread/pthread_create.c<br/>deleted file mode 100644<br/>index b4a499081..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_create.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_create.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,76 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_create (pthread_t *thread, const pthread_attr_t *attr,</div><div class='del'>-		void *(*start_routine) (void *), void *arg)</div><div class='del'>-{</div><div class='del'>-  int ret=0;</div><div class='del'>-  _pthread_descr td;</div><div class='del'>-  pthread_attr_t default_attr;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (start_routine==0) {</div><div class='del'>-    (*(__errno_location()))=EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  td = __thread_get_free();</div><div class='del'>-</div><div class='del'>-  if (td) {</div><div class='del'>-    if (!(attr)) {</div><div class='del'>-      pthread_attr_init(&amp;default_attr);</div><div class='del'>-      attr=&amp;default_attr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((td-&gt;policy!=SCHED_OTHER)&amp;&amp;(td-&gt;priority==0)) {</div><div class='del'>-      (*(__errno_location()))=EINVAL;</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (attr-&gt;__inheritsched==PTHREAD_INHERIT_SCHED) {</div><div class='del'>-      _pthread_descr this = __thread_self();</div><div class='del'>-      td-&gt;policy	= this-&gt;policy;</div><div class='del'>-      td-&gt;priority	= this-&gt;priority;</div><div class='del'>-    } else {</div><div class='del'>-      td-&gt;policy	= attr-&gt;__schedpolicy;</div><div class='del'>-      td-&gt;priority	= attr-&gt;__schedparam.sched_priority;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    td-&gt;func		= start_routine;</div><div class='del'>-    td-&gt;arg		= arg;</div><div class='del'>-</div><div class='del'>-    td-&gt;detached	= attr-&gt;__detachstate;</div><div class='del'>-</div><div class='del'>-    td-&gt;stack_size	= attr-&gt;__stacksize;</div><div class='del'>-</div><div class='del'>-    if (!(td-&gt;stack_addr)) {</div><div class='del'>-      char *stack=(char*)malloc(td-&gt;stack_size);</div><div class='del'>-      if (!(stack)) {</div><div class='del'>-	(*(__errno_location()))=EINVAL;</div><div class='del'>-	return -1;</div><div class='del'>-      }</div><div class='del'>-      td-&gt;stack_begin	= stack;</div><div class='del'>-      td-&gt;stack_addr	= stack+td-&gt;stack_size;</div><div class='del'>-    } else {</div><div class='del'>-      td-&gt;stack_begin	= 0;</div><div class='del'>-      td-&gt;stack_addr	= attr-&gt;__stackaddr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ret = signal_manager_thread(td);</div><div class='del'>-</div><div class='del'>-    if (ret&gt;1)</div><div class='del'>-      *thread=ret;</div><div class='del'>-    else</div><div class='del'>-      __thread_cleanup(td);</div><div class='del'>-  }</div><div class='del'>-  else</div><div class='del'>-    (*(__errno_location()))=EAGAIN;</div><div class='del'>-</div><div class='del'>-  if (ret&lt;2) return -1;</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_detach.c b/mdk-stage1/dietlibc/libpthread/pthread_detach.c<br/>deleted file mode 100644<br/>index c07280389..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_detach.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_detach.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_detach(pthread_t th)</div><div class='del'>-{</div><div class='del'>-  pthread_t j;</div><div class='del'>-  _pthread_descr thread;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  j=__find_thread_id(th);</div><div class='del'>-</div><div class='del'>-  if (j==-1) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  thread = __get_thread_struct(j);</div><div class='del'>-</div><div class='del'>-  if (thread==0) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (thread-&gt;detached) {</div><div class='del'>-    (*(__errno_location()))=EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (!thread-&gt;joined) {</div><div class='del'>-    thread-&gt;detached=1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_exit.c b/mdk-stage1/dietlibc/libpthread/pthread_exit.c<br/>deleted file mode 100644<br/>index 41eac0a33..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_exit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_exit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-void pthread_exit(void *retval)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-  this-&gt;retval = retval;</div><div class='del'>-</div><div class='del'>-  longjmp(this-&gt;jmp_exit,1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_getspecific.c b/mdk-stage1/dietlibc/libpthread/pthread_getspecific.c<br/>deleted file mode 100644<br/>index c2f84c814..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_getspecific.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_getspecific.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-extern struct _thread_key __thread_keys[PTHREAD_KEYS_MAX];</div><div class='del'>-const void *pthread_getspecific(pthread_key_t key)</div><div class='del'>-{</div><div class='del'>-  int id;</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  id=__find_thread_id(getpid());</div><div class='del'>-</div><div class='del'>-  if ((key&lt;PTHREAD_KEYS_MAX) &amp;&amp; (__thread_keys[key].used)) {</div><div class='del'>-    return __thread_keys[key].tkd[id];</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_join.c b/mdk-stage1/dietlibc/libpthread/pthread_join.c<br/>deleted file mode 100644<br/>index 5b295bad1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_join.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_join.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,50 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-</div><div class='del'>-int pthread_join(pthread_t th, void **thread_return)</div><div class='del'>-{</div><div class='del'>-  pthread_t j;</div><div class='del'>-  _pthread_descr this, thread;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-  j=__find_thread_id(th);</div><div class='del'>-</div><div class='del'>-  if (j==-1) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  thread = __get_thread_struct(j);</div><div class='del'>-</div><div class='del'>-  /* error handling */</div><div class='del'>-  if (thread==0) {</div><div class='del'>-    (*(__errno_location()))=ESRCH;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (this==thread) {</div><div class='del'>-    (*(__errno_location()))=EDEADLK;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (thread-&gt;detached || thread-&gt;joined) {</div><div class='del'>-    (*(__errno_location()))=EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  thread-&gt;joined=this;</div><div class='del'>-  this-&gt;join=1;</div><div class='del'>-</div><div class='del'>-  while(this-&gt;join) __thread_wait_some_time();</div><div class='del'>-</div><div class='del'>-  if (thread_return) *thread_return=this-&gt;retval;</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_key_create.c b/mdk-stage1/dietlibc/libpthread/pthread_key_create.c<br/>deleted file mode 100644<br/>index 44fccea6a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_key_create.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_key_create.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-extern struct _pthread_fastlock __thread_keys_lock;</div><div class='del'>-extern struct _thread_key __thread_keys[PTHREAD_KEYS_MAX];</div><div class='del'>-int pthread_key_create(pthread_key_t *key, void (*destructor)(const void*))</div><div class='del'>-{</div><div class='del'>-  int ret=-1,i;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  __pthread_lock(&amp;__thread_keys_lock);</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;PTHREAD_KEYS_MAX; i++) {</div><div class='del'>-    if (!__thread_keys[i].used) {</div><div class='del'>-      __thread_keys[i].used=1;</div><div class='del'>-      __thread_keys[i].destructor=destructor;</div><div class='del'>-      memset(__thread_keys[i].tkd,0,PTHREAD_THREADS_MAX*sizeof(struct _thread_key));</div><div class='del'>-      *key=i;</div><div class='del'>-      ret=0;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__thread_keys_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-</div><div class='del'>-  if (ret) (*__errno_location())=EAGAIN;</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_key_delete.c b/mdk-stage1/dietlibc/libpthread/pthread_key_delete.c<br/>deleted file mode 100644<br/>index b1bc366e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_key_delete.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_key_delete.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-extern struct _thread_key __thread_keys[PTHREAD_KEYS_MAX];</div><div class='del'>-int pthread_key_delete(pthread_key_t key)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if (key&gt;=PTHREAD_KEYS_MAX) {</div><div class='del'>-    (*__errno_location())=EINVAL;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __thread_keys[key].used=0;</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c<br/>deleted file mode 100644<br/>index 33a16abd4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_mutex_destroy(pthread_mutex_t *mutex)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((mutex-&gt;owner)||(mutex-&gt;lock.__spinlock)) {</div><div class='del'>-    (*(__errno_location()))=EBUSY;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c<br/>deleted file mode 100644<br/>index b1797fb20..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutex_init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_mutex_init(pthread_mutex_t *mutex,</div><div class='del'>-			const pthread_mutexattr_t *mutexattr)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  memset(mutex,0,sizeof(pthread_mutex_t));</div><div class='del'>-  if (mutexattr) {</div><div class='del'>-    mutex-&gt;kind=mutexattr-&gt;__mutexkind;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c<br/>deleted file mode 100644<br/>index 0c3ade9e8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutex_lock.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,33 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sched.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-/* will never return EINVAL ! */</div><div class='del'>-</div><div class='del'>-int pthread_mutex_lock(pthread_mutex_t *mutex)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-</div><div class='del'>-  if (this!=mutex-&gt;owner) {</div><div class='del'>-    /* wait for mutex to free */</div><div class='del'>-    __pthread_lock(&amp;(mutex-&gt;lock));</div><div class='del'>-</div><div class='del'>-    mutex-&gt;owner=this;</div><div class='del'>-  }</div><div class='del'>-  else if (mutex-&gt;kind==PTHREAD_MUTEX_ERRORCHECK_NP)</div><div class='del'>-  {</div><div class='del'>-    (*(__errno_location()))=EDEADLK;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (mutex-&gt;kind==PTHREAD_MUTEX_RECURSIVE_NP) ++(mutex-&gt;count);</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c<br/>deleted file mode 100644<br/>index fcf63f75e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutex_trylock.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sched.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-/* will never return EINVAL ! */</div><div class='del'>-</div><div class='del'>-int pthread_mutex_trylock(pthread_mutex_t *mutex)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-</div><div class='del'>-  if (this!=mutex-&gt;owner) {</div><div class='del'>-    /* wait for mutex to free */</div><div class='del'>-    if (__pthread_trylock(&amp;(mutex-&gt;lock))) {</div><div class='del'>-      (*(__errno_location()))=EBUSY;</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    mutex-&gt;owner=this;</div><div class='del'>-  }</div><div class='del'>-  else if (mutex-&gt;kind==PTHREAD_MUTEX_ERRORCHECK_NP)</div><div class='del'>-  {</div><div class='del'>-    (*(__errno_location()))=EDEADLK;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (mutex-&gt;kind==PTHREAD_MUTEX_RECURSIVE_NP) ++(mutex-&gt;count);</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c<br/>deleted file mode 100644<br/>index 0b5a1d0f7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutex_unlock.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,34 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sched.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-/* will never return EINVAL ! */</div><div class='del'>-</div><div class='del'>-int pthread_mutex_unlock(pthread_mutex_t *mutex)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  this = __thread_self();</div><div class='del'>-</div><div class='del'>-  if (this==mutex-&gt;owner) {</div><div class='del'>-    if (mutex-&gt;kind==PTHREAD_MUTEX_RECURSIVE_NP) {</div><div class='del'>-      if (--(mutex-&gt;count))</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    mutex-&gt;owner=0;</div><div class='del'>-    __pthread_unlock(&amp;(mutex-&gt;lock));</div><div class='del'>-  }</div><div class='del'>-  else if (mutex-&gt;kind==PTHREAD_MUTEX_ERRORCHECK_NP)</div><div class='del'>-  {</div><div class='del'>-    (*(__errno_location()))=EPERM;</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c b/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c<br/>deleted file mode 100644<br/>index 63cd9133c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_getkind_np.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr, int *kind)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  *kind=attr-&gt;__mutexkind;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c b/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c<br/>deleted file mode 100644<br/>index ff60e4c74..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,15 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_mutexattr_init(pthread_mutexattr_t *attr)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  attr-&gt;__mutexkind = 0;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) __attribute__((alias ("pthread_mutexattr_init")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c b/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c<br/>deleted file mode 100644<br/>index ac600f8ed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_mutexattr_setkind_np.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind)</div><div class='del'>-{</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((kind==PTHREAD_MUTEX_FAST_NP) || (kind==PTHREAD_MUTEX_RECURSIVE_NP) ||</div><div class='del'>-      (kind==PTHREAD_MUTEX_ERRORCHECK_NP)) {</div><div class='del'>-    attr-&gt;__mutexkind=kind;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_once.c b/mdk-stage1/dietlibc/libpthread/pthread_once.c<br/>deleted file mode 100644<br/>index 16d9cb392..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_once.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_once.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int __pthread_once (pthread_once_t* once_control, void (*init_routine)(void))</div><div class='del'>-{</div><div class='del'>-  if (!(__testandset(once_control))) init_routine();</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-int pthread_once (pthread_once_t* once_control, void (*init_routine)(void)) __attribute__((alias("__pthread_once")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_self.c b/mdk-stage1/dietlibc/libpthread/pthread_self.c<br/>deleted file mode 100644<br/>index 394686dd4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_self.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_self.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-</div><div class='del'>-pthread_t pthread_self() { return getpid(); }</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c b/mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c<br/>deleted file mode 100644<br/>index b906492fb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_setcancelstate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_setcancelstate(int state, int *oldstate)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr thread;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((state==PTHREAD_CANCEL_ENABLE) || (state==PTHREAD_CANCEL_DISABLE))</div><div class='del'>-  {</div><div class='del'>-    thread = __thread_self();</div><div class='del'>-</div><div class='del'>-    if (oldstate) *oldstate = thread-&gt;cancelstate;</div><div class='del'>-    thread-&gt;cancelstate = state;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c b/mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c<br/>deleted file mode 100644<br/>index 03d1f53de..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_setcanceltype.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pthread_setcanceltype(int type, int *oldtype)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr thread;</div><div class='del'>-</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  if ((type==PTHREAD_CANCEL_DEFERRED) || (type==PTHREAD_CANCEL_ASYNCHRONOUS))</div><div class='del'>-  {</div><div class='del'>-    thread = __thread_self();</div><div class='del'>-</div><div class='del'>-    if (oldtype) *oldtype = thread-&gt;canceltype;</div><div class='del'>-    thread-&gt;canceltype = type;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  (*(__errno_location()))=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_setspecific.c b/mdk-stage1/dietlibc/libpthread/pthread_setspecific.c<br/>deleted file mode 100644<br/>index 78339c20b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_setspecific.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_setspecific.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-extern struct _thread_key __thread_keys[PTHREAD_KEYS_MAX];</div><div class='del'>-int pthread_setspecific(pthread_key_t key, const void *value)</div><div class='del'>-{</div><div class='del'>-  int id;</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  id=__find_thread_id(getpid());</div><div class='del'>-  if ((key&lt;PTHREAD_KEYS_MAX) &amp;&amp; (__thread_keys[key].used)) {</div><div class='del'>-    __thread_keys[key].tkd[id]=value;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  (*__errno_location())=EINVAL;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_spinlock.c b/mdk-stage1/dietlibc/libpthread/pthread_spinlock.c<br/>deleted file mode 100644<br/>index 449782adf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_spinlock.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_spinlock.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,38 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-static void __pthread_acquire(int * spinlock)</div><div class='del'>-{</div><div class='del'>-  int cnt = 0;</div><div class='del'>-  struct timespec tm;</div><div class='del'>-</div><div class='del'>-  while (__testandset(spinlock)) {</div><div class='del'>-    if (cnt &lt; MAX_SPIN_COUNT) {</div><div class='del'>-      sched_yield();</div><div class='del'>-      cnt++;</div><div class='del'>-    } else {</div><div class='del'>-      tm.tv_sec = 0;</div><div class='del'>-      tm.tv_nsec = SPIN_SLEEP_DURATION;</div><div class='del'>-      __libc_nanosleep(&amp;tm, 0);</div><div class='del'>-      cnt = 0;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void __pthread_lock(struct _pthread_fastlock * lock)</div><div class='del'>-{</div><div class='del'>-  __pthread_acquire(&amp;lock-&gt;__spinlock);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int __pthread_trylock(struct _pthread_fastlock * lock)</div><div class='del'>-{</div><div class='del'>-  return __testandset(&amp;lock-&gt;__spinlock);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int __pthread_unlock(struct _pthread_fastlock * lock)</div><div class='del'>-{</div><div class='del'>-  return (lock-&gt;__spinlock = 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c<br/>deleted file mode 100644<br/>index 9f7d23d79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_alloc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-static pthread_mutex_t mutex_alloc = PTHREAD_MUTEX_INITIALIZER;</div><div class='del'>-</div><div class='del'>-void free(void *ptr)</div><div class='del'>-{</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  pthread_mutex_lock(&amp;mutex_alloc);</div><div class='del'>-  __libc_free(ptr);</div><div class='del'>-  pthread_mutex_unlock(&amp;mutex_alloc);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *malloc(size_t size)</div><div class='del'>-{</div><div class='del'>-  register void *ret;</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  pthread_mutex_lock(&amp;mutex_alloc);</div><div class='del'>-  ret=__libc_malloc(size);</div><div class='del'>-  pthread_mutex_unlock(&amp;mutex_alloc);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_close.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_close.c<br/>deleted file mode 100644<br/>index 84d5d5f36..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_close.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_close.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int close(int fd)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_close(fd);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_create.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_create.c<br/>deleted file mode 100644<br/>index 9d47844f5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_create.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_create.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int creat(const char *pathname, mode_t mode)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_creat(pathname,mode);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c<br/>deleted file mode 100644<br/>index 99210a488..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_fcntl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int fcntl(int fd, int cmd, void *arg)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_fcntl(fd,cmd,arg);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c<br/>deleted file mode 100644<br/>index a2c995069..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_fsync.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int fsync(int fd)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_fsync(fd);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c<br/>deleted file mode 100644<br/>index 6070ad219..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_logging.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-static pthread_mutex_t mutex_syslog = PTHREAD_MUTEX_INITIALIZER;</div><div class='del'>-</div><div class='del'>-void closelog(void)</div><div class='del'>-{</div><div class='del'>-  pthread_cleanup_push((void(*)(void*))pthread_mutex_unlock,&amp;mutex_syslog);</div><div class='del'>-  pthread_mutex_lock(&amp;mutex_syslog);</div><div class='del'>-  __libc_closelog();</div><div class='del'>-  pthread_cleanup_pop(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void openlog(const char *ident, int option, int facility)</div><div class='del'>-{</div><div class='del'>-  pthread_cleanup_push((void(*)(void*))pthread_mutex_unlock,&amp;mutex_syslog);</div><div class='del'>-  pthread_mutex_lock(&amp;mutex_syslog);</div><div class='del'>-  __libc_openlog(ident, option, facility);</div><div class='del'>-  pthread_cleanup_pop(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void vsyslog(int priority, const char *format, va_list arg_ptr)</div><div class='del'>-{</div><div class='del'>-  pthread_cleanup_push((void(*)(void*))pthread_mutex_unlock,&amp;mutex_syslog);</div><div class='del'>-  pthread_mutex_lock(&amp;mutex_syslog);</div><div class='del'>-  __libc_vsyslog(priority, format, arg_ptr);</div><div class='del'>-  pthread_cleanup_pop(1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c<br/>deleted file mode 100644<br/>index 699de4654..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_nanosleep.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int nanosleep(const struct timespec *req, struct timespec *rem)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_nanosleep(req,rem);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_open.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_open.c<br/>deleted file mode 100644<br/>index 513f6a323..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_open.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_open.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,12 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int __pthread_open(const char *pathname, int flags, mode_t mode)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_open(pathname,flags,mode);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int open(const char *pathname, int flags, ...) __attribute__((alias("__pthread_open")));</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c<br/>deleted file mode 100644<br/>index ab15ead11..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_pause.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int pause()</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_pause();</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_read.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_read.c<br/>deleted file mode 100644<br/>index 60f886003..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_read.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_read.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int read(int fd, void *buf, size_t count)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_read(fd,buf,count);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c<br/>deleted file mode 100644<br/>index 72cd783ae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_sigsuspend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int sigsuspend(const sigset_t *mask)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_sigsuspend(mask);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c<br/>deleted file mode 100644<br/>index 1ac33adfc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_tcdrain.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int tcdrain(int fd)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_tcdrain(fd);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c<br/>deleted file mode 100644<br/>index 76d5ddca7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_waitpid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-pid_t waitpid(pid_t pid, int *status, int options)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_waitpid(pid,status,options);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_sys_write.c b/mdk-stage1/dietlibc/libpthread/pthread_sys_write.c<br/>deleted file mode 100644<br/>index 37541ae42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_sys_write.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_sys_write.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-int write(int fd, const void *buf, size_t count)</div><div class='del'>-{</div><div class='del'>-  __TEST_CANCEL();</div><div class='del'>-  return __libc_write(fd,buf,count);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c b/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c<br/>deleted file mode 100644<br/>index 68f91e743..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/pthread_testcancel.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-void pthread_testcancel()</div><div class='del'>-{</div><div class='del'>-  _pthread_descr thread;</div><div class='del'>-  __THREAD_INIT();</div><div class='del'>-</div><div class='del'>-  thread=__thread_self();</div><div class='del'>-</div><div class='del'>-  if (thread-&gt;canceled) {</div><div class='del'>-    pthread_exit(PTHREAD_CANCELED);</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/test.c b/mdk-stage1/dietlibc/libpthread/test.c<br/>deleted file mode 100644<br/>index 3272c1753..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/test.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/test.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-int ra;</div><div class='del'>-</div><div class='del'>-void test(int sig)</div><div class='del'>-{</div><div class='del'>-  printf("SIGNAL %d in %d\n",sig,getpid());</div><div class='del'>-  fflush(stdout);</div><div class='del'>-  signal(SIGHUP, test);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void* thread(void* arg)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0;i&lt;10; i++)</div><div class='del'>-  {</div><div class='del'>-    printf("child %ld %8p\n", pthread_self(),arg);</div><div class='del'>-    sleep(1);</div><div class='del'>-  }</div><div class='del'>-  return arg;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void* thread2(void *arg)</div><div class='del'>-{</div><div class='del'>-  pthread_t t;</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  printf("child %ld %8p\n", pthread_self(),arg);</div><div class='del'>-  for (i=0; i&lt;3; ++i) {</div><div class='del'>-    printf("child starting next in %d secs %ld %8p\n", 3-i, pthread_self(),arg);</div><div class='del'>-    sleep(1);</div><div class='del'>-  }</div><div class='del'>-  pthread_create(&amp;t,0, thread, (void*)2);</div><div class='del'>-  printf("new child @ %ld\n",t);</div><div class='del'>-  return (void*)t;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int main(int argc, char*argv[])</div><div class='del'>-{</div><div class='del'>-  pthread_t t;</div><div class='del'>-</div><div class='del'>-  signal(SIGHUP, test);</div><div class='del'>-</div><div class='del'>-  pthread_create(&amp;t,0, thread2, 0);</div><div class='del'>-  pthread_create(&amp;t,0, thread, (void *)3);</div><div class='del'>-  pthread_create(&amp;t,0, thread, (void *)1);</div><div class='del'>-</div><div class='del'>-  puts("main");</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-  {</div><div class='del'>-    int i;</div><div class='del'>-    for(i=0;i&lt;4;i++) sleep(1);</div><div class='del'>-  }</div><div class='del'>-#else</div><div class='del'>-  {</div><div class='del'>-    int *tt;</div><div class='del'>-    int i = pthread_join(t,(void*)&amp;tt);</div><div class='del'>-    printf("join %d %p %d\n",i,tt,(*(__errno_location())));</div><div class='del'>-  }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  puts("main exit");</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/thread_internal.c b/mdk-stage1/dietlibc/libpthread/thread_internal.c<br/>deleted file mode 100644<br/>index a93806203..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/thread_internal.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/thread_internal.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,344 +0,0 @@</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;sched.h&gt;</div><div class='del'>-#include &lt;sys/resource.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-static struct _pthread_fastlock __thread_struct_lock = {0};</div><div class='del'>-static struct _pthread_descr_struct threads[PTHREAD_THREADS_MAX];</div><div class='del'>-static int _max_used_thread_id=1;</div><div class='del'>-pthread_once_t __thread_inited;</div><div class='del'>-</div><div class='del'>-static struct _pthread_fastlock __manager_thread_signal_lock = {0};</div><div class='del'>-static struct _pthread_fastlock __manager_thread_data_lock = {1};</div><div class='del'>-static struct _pthread_fastlock __manager_thread_data_go_lock = {1};</div><div class='del'>-</div><div class='del'>-//#define DEBUG</div><div class='del'>-</div><div class='del'>-/* find thread */</div><div class='del'>-int __find_thread_id(int pid)</div><div class='del'>-{</div><div class='del'>-  register int i;</div><div class='del'>-  for (i=0; i&lt;_max_used_thread_id; i++)</div><div class='del'>-    if (threads[i].pid==pid)</div><div class='del'>-      return i;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* get thread */</div><div class='del'>-_pthread_descr __get_thread_struct(int id)</div><div class='del'>-{</div><div class='del'>-  return threads+id;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* thread errno location */</div><div class='del'>-int *__errno_location(void)</div><div class='del'>-{</div><div class='del'>-  int id=0;</div><div class='del'>-  if (__thread_inited) id=__find_thread_id(getpid());</div><div class='del'>-  if (id&lt;0)</div><div class='del'>-    return 0;</div><div class='del'>-  else</div><div class='del'>-    return &amp;threads[id].errno;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* thread self */</div><div class='del'>-_pthread_descr __thread_self()</div><div class='del'>-{</div><div class='del'>-  register int i=__find_thread_id(getpid());</div><div class='del'>-  if (i&lt;0)</div><div class='del'>-    return 0;</div><div class='del'>-  else</div><div class='del'>-    return threads+i;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* allocate a thread slot */</div><div class='del'>-_pthread_descr __thread_get_free()</div><div class='del'>-{</div><div class='del'>-  _pthread_descr ret=0;</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  __pthread_lock(&amp;__thread_struct_lock);</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;PTHREAD_THREADS_MAX; i++) {</div><div class='del'>-    if (threads[i].pid==0) {</div><div class='del'>-      threads[i].pid=1; /* mark as taken */</div><div class='del'>-      ret = threads+i;</div><div class='del'>-      if (i&gt;=_max_used_thread_id) _max_used_thread_id=i+1;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__thread_struct_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* sleep a little (reschedule for this time) */</div><div class='del'>-void __thread_wait_some_time()</div><div class='del'>-{</div><div class='del'>-  struct timespec reg;</div><div class='del'>-  reg.tv_sec=0;</div><div class='del'>-  reg.tv_nsec=SPIN_SLEEP_DURATION;</div><div class='del'>-  __libc_nanosleep(&amp;reg,0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* cleanup a thread struct */</div><div class='del'>-void __thread_cleanup(_pthread_descr th)</div><div class='del'>-{</div><div class='del'>-  /* lib provided stack should be freed */</div><div class='del'>-  if (th-&gt;stack_begin) free(th-&gt;stack_begin);</div><div class='del'>-</div><div class='del'>-  /* an other thread has joined this on */</div><div class='del'>-  if (th-&gt;joined) {</div><div class='del'>-    th-&gt;joined-&gt;retval=th-&gt;retval;</div><div class='del'>-    th-&gt;joined-&gt;join=0;</div><div class='del'>-    th-&gt;joined=0;</div><div class='del'>-  }</div><div class='del'>-  th-&gt;pid=0;	/* mark struct as free */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* SIGHUP handler (thread cnacel) PTHREAD_CANCEL_ASYNCHRONOUS */</div><div class='del'>-static void __thread_cancel_handler(int sig)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr this;</div><div class='del'>-  this = __thread_self();</div><div class='del'>-  this-&gt;canceled=1;</div><div class='del'>-  if (this-&gt;canceltype==PTHREAD_CANCEL_ASYNCHRONOUS)</div><div class='del'>-    pthread_exit(PTHREAD_CANCELED);</div><div class='del'>-  signal( SIGHUP, __thread_cancel_handler );</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* kill ALL threads / other then prime task and manager thread */</div><div class='del'>-static void __kill_all_threads()</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  for (i=2; i&lt;_max_used_thread_id; i++) {</div><div class='del'>-    if (threads[i].pid&gt;1) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-      printf("CANCEL ! %d\n",threads[i].pid);</div><div class='del'>-#endif</div><div class='del'>-      threads[i].canceled=1;</div><div class='del'>-      kill(threads[i].pid, SIGHUP);	/* cancel thread */</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __thread_wait_some_time();</div><div class='del'>-</div><div class='del'>-  for (i=2; i&lt;_max_used_thread_id; i++) {</div><div class='del'>-    if (threads[i].pid&gt;1) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-      printf("KILL ! %d\n",threads[i].pid);</div><div class='del'>-#endif</div><div class='del'>-      kill(threads[i].pid, SIGTERM);	/* KILL thread */</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-__attribute__((weak)) volatile void __thread_start__key(int id) { return; }</div><div class='del'>-__attribute__((weak,alias("__thread_start__key"))) volatile void __thread_exit__key(int id);</div><div class='del'>-</div><div class='del'>-/* support for manager */</div><div class='del'>-static void *__mthread_starter(void *arg)</div><div class='del'>-{</div><div class='del'>-  _pthread_descr td = (_pthread_descr)arg;</div><div class='del'>-  int i = td-&gt;stack_size-4096;</div><div class='del'>-</div><div class='del'>-  /* just to be sure */</div><div class='del'>-  td-&gt;pid=getpid();</div><div class='del'>-</div><div class='del'>-  /* signal handling for a thread */</div><div class='del'>-  signal(SIGTERM, _exit);</div><div class='del'>-  signal(SIGCHLD, SIG_DFL);</div><div class='del'>-  signal(SIGHUP, __thread_cancel_handler );</div><div class='del'>-</div><div class='del'>-  /* limit stack so that we NEVER have to worry */</div><div class='del'>-  setrlimit(RLIMIT_STACK, (struct rlimit *)(&amp;i));</div><div class='del'>-</div><div class='del'>-  /* set scheduler */</div><div class='del'>-  if (td-&gt;policy!=SCHED_OTHER) {</div><div class='del'>-    struct sched_param sp;</div><div class='del'>-    sp.sched_priority=td-&gt;priority;</div><div class='del'>-    sched_setscheduler(td-&gt;pid,td-&gt;policy, &amp;sp);</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* thread_key glue */</div><div class='del'>-  __thread_start__key(td-threads);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  printf("in starter %d, parameter %8p\n", td-&gt;pid, td-&gt;func);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  if (!td-&gt;canceled) {</div><div class='del'>-    if (!(setjmp(td-&gt;jmp_exit))) {</div><div class='del'>-      td-&gt;retval=td-&gt;func(td-&gt;arg);</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-    } else {</div><div class='del'>-      printf("pthread_exit called in %d\n", td-&gt;pid);</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0);</div><div class='del'>-</div><div class='del'>-  /* thread_key glue */</div><div class='del'>-  __thread_exit__key(td-threads);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  printf("end starter %d, retval %8p\n", td-&gt;pid, td-&gt;retval);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  /* wake joined thread and put retval */</div><div class='del'>-  if (td-&gt;joined) {</div><div class='del'>-    td-&gt;joined-&gt;retval=td-&gt;retval;</div><div class='del'>-    td-&gt;joined-&gt;join=0;</div><div class='del'>-    td-&gt;joined=0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* execute all functions on the cleanup-stack */</div><div class='del'>-  for (i=PTHREAD_MAX_CLEANUP;i;) {</div><div class='del'>-    if (td-&gt;cleanup_stack[--i].func) {</div><div class='del'>-      td-&gt;cleanup_stack[i].func(td-&gt;cleanup_stack[i].arg);</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* manager thread and signal handler */</div><div class='del'>-static char __manager_thread_stack[12*1024];</div><div class='del'>-static volatile _pthread_descr __manager_thread_data;</div><div class='del'>-static void __manager_SIGCHLD(int sig)</div><div class='del'>-{</div><div class='del'>-  int pid, status, i;</div><div class='del'>-</div><div class='del'>-  while(1) {</div><div class='del'>-    pid = __libc_waitpid (-1, &amp;status, WNOHANG);</div><div class='del'>-    if (pid &lt;= 0) break;</div><div class='del'>-</div><div class='del'>-    for (i=0; i&lt;_max_used_thread_id; i++) {</div><div class='del'>-      if (threads[i].pid==pid) {</div><div class='del'>-	__thread_cleanup(threads+i);</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void __manager_SIGTERM(int sig)</div><div class='del'>-{</div><div class='del'>-  __kill_all_threads();</div><div class='del'>-  _exit(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void* __manager_thread(void *arg)</div><div class='del'>-{</div><div class='del'>-  struct sigaction sig_action_chld;</div><div class='del'>-  sig_action_chld.sa_handler = __manager_SIGCHLD;</div><div class='del'>-  sigemptyset(&amp;sig_action_chld.sa_mask);</div><div class='del'>-  sig_action_chld.sa_flags = SA_RESTART;</div><div class='del'>-</div><div class='del'>-  sigaction(SIGCHLD, &amp;sig_action_chld, 0);</div><div class='del'>-  signal(SIGTERM, __manager_SIGTERM);</div><div class='del'>-  signal(SIGHUP, SIG_IGN);</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__manager_thread_data_go_lock);	/* release init */</div><div class='del'>-  while(1) {</div><div class='del'>-    do {</div><div class='del'>-      __thread_wait_some_time();</div><div class='del'>-      if (getppid()&lt;0) __manager_SIGTERM(0);</div><div class='del'>-    } while (__pthread_trylock(&amp;__manager_thread_data_lock));</div><div class='del'>-</div><div class='del'>-    __manager_thread_data-&gt;pid =</div><div class='del'>-      __clone(__mthread_starter,</div><div class='del'>-	      __manager_thread_data-&gt;stack_addr,</div><div class='del'>-	      CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD,</div><div class='del'>-	      __manager_thread_data);</div><div class='del'>-    __thread_wait_some_time();</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-    printf("manager new thread %d\n",__manager_thread_data-&gt;pid);</div><div class='del'>-#endif</div><div class='del'>-    __pthread_unlock(&amp;__manager_thread_data_go_lock);	/* release sender */</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* pthread_create bottom half */</div><div class='del'>-int signal_manager_thread(_pthread_descr td)</div><div class='del'>-{</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-</div><div class='del'>-  __pthread_lock(&amp;__manager_thread_signal_lock);	/* lock */</div><div class='del'>-</div><div class='del'>-  __manager_thread_data = td;</div><div class='del'>-  __thread_wait_some_time();</div><div class='del'>-  __pthread_unlock(&amp;__manager_thread_data_lock);	/* signal manager to start */</div><div class='del'>-  __thread_wait_some_time();</div><div class='del'>-  __pthread_lock(&amp;__manager_thread_data_go_lock);	/* wait for manager */</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__manager_thread_signal_lock);	/* unlock */</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-</div><div class='del'>-  return td-&gt;pid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* thread stop */</div><div class='del'>-static void __thread_main_exit()</div><div class='del'>-{</div><div class='del'>-  if (getpid()!=threads[0].pid) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-    printf("A THREAD ? %d\n",getpid());</div><div class='del'>-#endif</div><div class='del'>-    kill(threads[0].pid, SIGTERM);</div><div class='del'>-    while(1) __thread_wait_some_time();</div><div class='del'>-  }</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  else</div><div class='del'>-    printf("EXIT ! %d\n",getpid());</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  /* stop ALL threads */</div><div class='del'>-  kill(threads[1].pid, SIGTERM);</div><div class='del'>-  __thread_wait_some_time();</div><div class='del'>-  __kill_all_threads();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* thread intern init */</div><div class='del'>-void __thread_init()</div><div class='del'>-{</div><div class='del'>-  if (atexit(__thread_main_exit)==-1)</div><div class='del'>-    exit(42);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  printf("INIT ! %d\n",getpid());</div><div class='del'>-  memset(threads,0,sizeof(threads));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  threads[0].pid = getpid();</div><div class='del'>-</div><div class='del'>-  ++_max_used_thread_id;</div><div class='del'>-  threads[1].stack_size=sizeof(__manager_thread_stack);</div><div class='del'>-  threads[1].stack_addr=&amp;__manager_thread_stack[sizeof(__manager_thread_stack)];</div><div class='del'>-  threads[1].stack_begin=0;</div><div class='del'>-  threads[1].func=__manager_thread;</div><div class='del'>-</div><div class='del'>-  threads[1].pid = __clone(__mthread_starter, threads[1].stack_addr,</div><div class='del'>-			   CLONE_VM | CLONE_FS | CLONE_FILES, threads+1);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-  printf("manager thread @ : %d\n",threads[1].pid);</div><div class='del'>-#endif</div><div class='del'>-  __pthread_lock(&amp;__manager_thread_data_go_lock);	/* wait for manager to be ready */</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/thread_internal.h b/mdk-stage1/dietlibc/libpthread/thread_internal.h<br/>deleted file mode 100644<br/>index 5eb3bbd08..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/thread_internal.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/thread_internal.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,131 +0,0 @@</div><div class='del'>-#ifndef __THREAD_INTERNAL_H__</div><div class='del'>-#define __THREAD_INTERNAL_H__</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#ifndef WANT_THREAD_SAFE</div><div class='del'>-#error "the diet libc is not compiled with thread safeness enabled!"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* cleanup */</div><div class='del'>-#define PTHREAD_MAX_CLEANUP 8</div><div class='del'>-struct thread_cleanup_t {</div><div class='del'>-  void (*func)(void*);</div><div class='del'>-  void *arg;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* the thread descriptor / internal */</div><div class='del'>-struct _pthread_descr_struct {</div><div class='del'>-  /* runtime handling */</div><div class='del'>-  struct _pthread_descr_struct *joined; /* a joined thread or NULL */</div><div class='del'>-</div><div class='del'>-  /* conditional variables */</div><div class='del'>-  struct _pthread_descr_struct *waitnext; /* an other waiting thread or NULL */</div><div class='del'>-  int  waiting;			/* internal waiting "lock" */</div><div class='del'>-</div><div class='del'>-  /* thread/process data */</div><div class='del'>-  int  pid;			/* Process id */</div><div class='del'>-</div><div class='del'>-  int  policy;			/* thread scheduling policy */</div><div class='del'>-  int  priority;		/* thread priority */</div><div class='del'>-</div><div class='del'>-  /* errno handling */</div><div class='del'>-  int   errno;</div><div class='del'>-  int h_errno;</div><div class='del'>-</div><div class='del'>-  /* stack handling */</div><div class='del'>-  unsigned int stack_size;	/* stack size for setrlimit */</div><div class='del'>-  void *stack_addr;		/* stack address for clone */</div><div class='del'>-  void *stack_begin;		/* begin of lib-stack / lowest address (free) */</div><div class='del'>-</div><div class='del'>-  /* thread exit handling */</div><div class='del'>-  void  *retval;		/* thread return value */</div><div class='del'>-  int   join;			/* thread waits for other to return */</div><div class='del'>-  jmp_buf jmp_exit;		/* pthread_exit jump */</div><div class='del'>-</div><div class='del'>-  /* thread flags */</div><div class='del'>-  int  detached;		/* thread is detached */</div><div class='del'>-  int  canceled;		/* thread canceled */</div><div class='del'>-</div><div class='del'>-  /* cancel handling */</div><div class='del'>-  int  cancelstate;		/* cancel state */</div><div class='del'>-  int  canceltype;		/* type of cancellation */</div><div class='del'>-</div><div class='del'>-  /* thread basics */</div><div class='del'>-  void* (*func) (void* arg);	/* thread function */</div><div class='del'>-  void* arg;			/* thread argument */</div><div class='del'>-</div><div class='del'>-  /* create thread / manager thread lock */</div><div class='del'>-  struct _pthread_fastlock *manager_lock;</div><div class='del'>-</div><div class='del'>-  /* cleanup stack */</div><div class='del'>-  struct thread_cleanup_t cleanup_stack[PTHREAD_MAX_CLEANUP];</div><div class='del'>-</div><div class='del'>-} __attribute__ ((aligned(32)));</div><div class='del'>-</div><div class='del'>-/* thread keys */</div><div class='del'>-struct _thread_key {</div><div class='del'>-  int used;</div><div class='del'>-  void (*destructor)(const void*);</div><div class='del'>-  const void *tkd[PTHREAD_THREADS_MAX];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* internal stuff */</div><div class='del'>-int __testandset(int *spinlock);</div><div class='del'>-</div><div class='del'>-void __pthread_lock(struct _pthread_fastlock * lock);</div><div class='del'>-int __pthread_trylock(struct _pthread_fastlock * lock);</div><div class='del'>-int __pthread_unlock(struct _pthread_fastlock * lock);</div><div class='del'>-</div><div class='del'>-int __clone(void* (*fn)(void*), void* stack, int flags, void *arg);</div><div class='del'>-</div><div class='del'>-int __find_thread_id(int pid);</div><div class='del'>-_pthread_descr __get_thread_struct(int id);</div><div class='del'>-</div><div class='del'>-_pthread_descr __thread_get_free();</div><div class='del'>-_pthread_descr __thread_self();</div><div class='del'>-</div><div class='del'>-void __thread_cleanup(_pthread_descr th);</div><div class='del'>-</div><div class='del'>-void __thread_wait_some_time();</div><div class='del'>-</div><div class='del'>-#define __NO_ASYNC_CANCEL_BEGIN { int oldtype; pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &amp;oldtype);</div><div class='del'>-#define __NO_ASYNC_CANCEL_END pthread_setcanceltype(oldtype,0); pthread_testcancel(); }</div><div class='del'>-#define __NO_ASYNC_CANCEL_STOP pthread_setcanceltype(oldtype,0); }</div><div class='del'>-</div><div class='del'>-/* manager thread stuff */</div><div class='del'>-int signal_manager_thread(_pthread_descr td);</div><div class='del'>-</div><div class='del'>-/* init stuff */</div><div class='del'>-extern pthread_once_t __thread_inited;</div><div class='del'>-void __thread_init();</div><div class='del'>-#define __THREAD_INIT() __pthread_once(&amp;__thread_inited, __thread_init)</div><div class='del'>-#define __TEST_CANCEL() pthread_testcancel()</div><div class='del'>-</div><div class='del'>-/* diet libc syscalls */</div><div class='del'>-</div><div class='del'>-void  __libc_free(void *ptr);</div><div class='del'>-void *__libc_malloc(size_t size);</div><div class='del'>-</div><div class='del'>-void __libc_closelog(void);</div><div class='del'>-void __libc_openlog(const char *ident, int option, int facility);</div><div class='del'>-void __libc_vsyslog(int priority, const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-pid_t __libc_fork(void);</div><div class='del'>-</div><div class='del'>-int __libc_close(int fd);</div><div class='del'>-int __libc_creat(const char *pathname, mode_t mode);</div><div class='del'>-int __libc_fcntl(int fd, int cmd, void *arg);</div><div class='del'>-int __libc_fsync(int fd);</div><div class='del'>-int __libc_nanosleep(const struct timespec *req, struct timespec *rem);</div><div class='del'>-int __libc_open(const char *pathname, int flags, mode_t mode);</div><div class='del'>-int __libc_pause(void);</div><div class='del'>-int __libc_read(int fd, void *buf, size_t count);</div><div class='del'>-int __libc_sigsuspend(const sigset_t *mask);</div><div class='del'>-int __libc_tcdrain(int fd);</div><div class='del'>-pid_t __libc_waitpid(pid_t pid, int *status, int options);</div><div class='del'>-int __libc_write(int fd, const void *buf, size_t count);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libpthread/thread_key.c b/mdk-stage1/dietlibc/libpthread/thread_key.c<br/>deleted file mode 100644<br/>index b0f719fc9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libpthread/thread_key.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libpthread/thread_key.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,41 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pthread.h&gt;</div><div class='del'>-#include "thread_internal.h"</div><div class='del'>-</div><div class='del'>-struct _pthread_fastlock __thread_keys_lock;</div><div class='del'>-struct _thread_key __thread_keys[PTHREAD_KEYS_MAX];</div><div class='del'>-</div><div class='del'>-void __thread_start__key(int id)</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  __pthread_lock(&amp;__thread_keys_lock);</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;PTHREAD_KEYS_MAX; i++) {</div><div class='del'>-    __thread_keys[i].tkd[id]=0;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__thread_keys_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_END;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void __thread_exit__key(int id)</div><div class='del'>-{</div><div class='del'>-  int i,try;</div><div class='del'>-</div><div class='del'>-  __NO_ASYNC_CANCEL_BEGIN;</div><div class='del'>-  __pthread_lock(&amp;__thread_keys_lock);</div><div class='del'>-</div><div class='del'>-  for (i=0; i&lt;PTHREAD_KEYS_MAX; i++) {</div><div class='del'>-    if ((__thread_keys[i].used) &amp;&amp; (__thread_keys[i].destructor)) {</div><div class='del'>-      for (try=0;__thread_keys[i].tkd[id] &amp;&amp; (try&lt;PTHREAD_DESTRUCTOR_ITERATIONS);++try)</div><div class='del'>-	__thread_keys[i].destructor(__thread_keys[i].tkd[id]);</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  __pthread_unlock(&amp;__thread_keys_lock);</div><div class='del'>-  __NO_ASYNC_CANCEL_STOP;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libregex/rx.c b/mdk-stage1/dietlibc/libregex/rx.c<br/>deleted file mode 100644<br/>index b28358c2e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libregex/rx.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libregex/rx.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,434 +0,0 @@</div><div class='del'>-#include &lt;regex.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/* this is ugly.</div><div class='del'>- * the idea is to build a parse tree, then do some poor man's OOP with a</div><div class='del'>- * generic matcher function call that is always that the start of each</div><div class='del'>- * record, and a next pointer.  When the parse tree is done, we need to</div><div class='del'>- * recursively set the next pointers to point to the part of the parse</div><div class='del'>- * tree that needs to match next.</div><div class='del'>- * This is the prototype of the generic match function call pointer.</div><div class='del'>- * The first argument is the "this" pointer, the second is the text to</div><div class='del'>- * be matched against, ofs is the offset from the start of the matched</div><div class='del'>- * text (so we can match "^") and matches is an array where match</div><div class='del'>- * positions are stored. */</div><div class='del'>-/* now declared in regex.h: */</div><div class='del'>-/* typedef int (*matcher)(void*,const char*,int ofs,regmatch_t* matches,int plus,int eflags); */</div><div class='del'>-</div><div class='del'>-/* one would think that this is approach is an order of magnitude slower</div><div class='del'>- * than the standard NFA approach, but it isn't.  The busybox grep took</div><div class='del'>- * 0.26 seconds for a fixed string compared to 0.19 seconds for the</div><div class='del'>- * glibc regex. */</div><div class='del'>-</div><div class='del'>-/* first part: parse a regex into a parse tree */</div><div class='del'>-struct bracketed {</div><div class='del'>-  unsigned int cc[32];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* now declared in regex.h:</div><div class='del'>-struct regex {</div><div class='del'>-  matcher m;</div><div class='del'>-  void* next;</div><div class='del'>-  int pieces;</div><div class='del'>-  int num;</div><div class='del'>-  struct branch *b;</div><div class='del'>-}; */</div><div class='del'>-</div><div class='del'>-struct atom {</div><div class='del'>-  matcher m;</div><div class='del'>-  void* next;</div><div class='del'>-  enum { EMPTY, REGEX, BRACKET, ANY, LINESTART, LINEEND, WORDSTART, WORDEND, CHAR, } type;</div><div class='del'>-  int bnum;</div><div class='del'>-  union {</div><div class='del'>-    struct regex r;</div><div class='del'>-    struct bracketed b;</div><div class='del'>-    char c;</div><div class='del'>-  } u;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct piece {</div><div class='del'>-  matcher m;</div><div class='del'>-  void* next;</div><div class='del'>-  struct atom a;</div><div class='del'>-  unsigned char min,max;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct branch {</div><div class='del'>-  matcher m;</div><div class='del'>-  void* next;</div><div class='del'>-  int num;</div><div class='del'>-  struct piece *p;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void clearcc(unsigned int* x) {</div><div class='del'>-  memset(x,0,sizeof(*x));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void setcc(unsigned int* x,unsigned int bit) {</div><div class='del'>-  x[bit/32]|=(1&lt;&lt;((bit%32)-1));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int issetcc(unsigned int* x,unsigned int bit) {</div><div class='del'>-  return x[bit/32] &amp; (1&lt;&lt;((bit%32)-1));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parsebracketed(struct bracketed*__restrict__ b,const char*__restrict__ s,regex_t*__restrict__ rx) {</div><div class='del'>-  const char* t;</div><div class='del'>-  int i,negflag=0;</div><div class='del'>-  if (*s!='[') return s;</div><div class='del'>-  t=s+1;</div><div class='del'>-  clearcc(b-&gt;cc);</div><div class='del'>-  if (*t=='^') { negflag=1; ++t; }</div><div class='del'>-  do {</div><div class='del'>-    if (*t==0) return s;</div><div class='del'>-    setcc(b-&gt;cc,rx-&gt;cflags&amp;REG_ICASE?*t:tolower(*t));</div><div class='del'>-    if (t[1]=='-' &amp;&amp; t[2]!=']') {</div><div class='del'>-      for (i=*t+1; i&lt;=t[2]; ++i) setcc(b-&gt;cc,rx-&gt;cflags&amp;REG_ICASE?i:tolower(i));</div><div class='del'>-      t+=2;</div><div class='del'>-    }</div><div class='del'>-    ++t;</div><div class='del'>-  } while (*t!=']');</div><div class='del'>-  if (negflag) for (i=0; i&lt;32; ++i) b-&gt;cc[i]=~b-&gt;cc[i];</div><div class='del'>-  return t+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parseregex(struct regex* r,const char* s,regex_t* rx);</div><div class='del'>-</div><div class='del'>-static int matchatom(void*__restrict__ x,const char*__restrict__ s,int ofs,struct __regex_t*__restrict__ preg,int plus,int eflags) {</div><div class='del'>-  register struct atom* a=(struct atom*)x;</div><div class='del'>-  int matchlen=0;</div><div class='del'>-  switch (a-&gt;type) {</div><div class='del'>-  case EMPTY:</div><div class='del'>-//    printf("matching EMPTY against \"%s\"\n",s);</div><div class='del'>-    preg-&gt;l[a-&gt;bnum].rm_so=preg-&gt;l[a-&gt;bnum].rm_eo=ofs;</div><div class='del'>-    goto match;</div><div class='del'>-  case REGEX:</div><div class='del'>-//    printf("matching REGEX against \"%s\"\n",s);</div><div class='del'>-    if ((matchlen=a-&gt;u.r.m(a,s,ofs,preg,0,eflags))&gt;=0) {</div><div class='del'>-      preg-&gt;l[a-&gt;bnum].rm_so=ofs;</div><div class='del'>-      preg-&gt;l[a-&gt;bnum].rm_eo=ofs+matchlen;</div><div class='del'>-      goto match;</div><div class='del'>-    }</div><div class='del'>-    break;</div><div class='del'>-  case BRACKET:</div><div class='del'>-//    printf("matching BRACKET against \"%s\"\n",s);</div><div class='del'>-    matchlen=1;</div><div class='del'>-    if (*s=='\n' &amp;&amp; (preg-&gt;cflags&amp;REG_NEWLINE)) break;</div><div class='del'>-    if (*s &amp;&amp; issetcc(a-&gt;u.b.cc,(preg-&gt;cflags&amp;REG_ICASE?tolower(*s):*s)))</div><div class='del'>-      goto match;</div><div class='del'>-    break;</div><div class='del'>-  case ANY:</div><div class='del'>-//    printf("matching ANY against \"%s\"\n",s);</div><div class='del'>-    if (*s=='\n' &amp;&amp; (preg-&gt;cflags&amp;REG_NEWLINE)) break;</div><div class='del'>-    matchlen=1;</div><div class='del'>-    if (*s) goto match;</div><div class='del'>-    break;</div><div class='del'>-  case LINESTART:</div><div class='del'>-//    printf("matching LINESTART against \"%s\"\n",s);</div><div class='del'>-    if (ofs==0 &amp;&amp; (eflags&amp;REG_NOTBOL)==0) {</div><div class='del'>-      goto match;</div><div class='del'>-    }</div><div class='del'>-    break;</div><div class='del'>-  case LINEEND:</div><div class='del'>-//    printf("matching LINEEND against \"%s\"\n",s);</div><div class='del'>-    if ((*s &amp;&amp; *s!='\n') || (eflags&amp;REG_NOTEOL)==0) break;</div><div class='del'>-    goto match;</div><div class='del'>-  case WORDSTART:</div><div class='del'>-    if ((ofs==0 || isspace(s[-1])) &amp;&amp; !isspace(*s))</div><div class='del'>-      goto match;</div><div class='del'>-    break;</div><div class='del'>-  case WORDEND:</div><div class='del'>-    if (ofs&gt;0 &amp;&amp; !isspace(s[-1]) &amp;&amp; isspace(*s))</div><div class='del'>-      goto match;</div><div class='del'>-    break;</div><div class='del'>-  case CHAR:</div><div class='del'>-//    printf("matching CHAR %c against \"%s\"\n",a-&gt;u.c,s);</div><div class='del'>-    matchlen=1;</div><div class='del'>-    if (((preg-&gt;cflags&amp;REG_ICASE)?tolower(*s):*s)==a-&gt;u.c) goto match;</div><div class='del'>-    break;</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-match:</div><div class='del'>-  if (a-&gt;next)</div><div class='del'>-    return ((struct atom*)(a-&gt;next))-&gt;m(a-&gt;next,s+matchlen,ofs+matchlen,preg,plus+matchlen,eflags);</div><div class='del'>-  else</div><div class='del'>-    return plus+matchlen;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parseatom(struct atom*__restrict__ a,const char*__restrict__ s,regex_t*__restrict__ rx) {</div><div class='del'>-  const char *tmp;</div><div class='del'>-  a-&gt;m=matchatom;</div><div class='del'>-  a-&gt;bnum=-1;</div><div class='del'>-  switch (*s) {</div><div class='del'>-  case '(':</div><div class='del'>-    a-&gt;bnum=++rx-&gt;brackets;</div><div class='del'>-    if (s[1]==')') {</div><div class='del'>-      a-&gt;type=EMPTY;</div><div class='del'>-      return s+2;</div><div class='del'>-    }</div><div class='del'>-    a-&gt;type=REGEX;</div><div class='del'>-    if ((tmp=parseregex(&amp;a-&gt;u.r,s+1,rx))!=s) {</div><div class='del'>-      if (*tmp==')')</div><div class='del'>-	return tmp+1;</div><div class='del'>-    }</div><div class='del'>-  case 0:</div><div class='del'>-  case '|':</div><div class='del'>-  case ')':</div><div class='del'>-    return s;</div><div class='del'>-  case '[':</div><div class='del'>-    a-&gt;type=BRACKET;</div><div class='del'>-    if ((tmp=parsebracketed(&amp;a-&gt;u.b,s,rx))!=s)</div><div class='del'>-      return tmp;</div><div class='del'>-    return s;</div><div class='del'>-  case '.':</div><div class='del'>-    a-&gt;type=ANY;</div><div class='del'>-    break;</div><div class='del'>-  case '^':</div><div class='del'>-    a-&gt;type=LINESTART;</div><div class='del'>-    break;</div><div class='del'>-  case '$':</div><div class='del'>-    a-&gt;type=LINEEND;</div><div class='del'>-    break;</div><div class='del'>-  case '\\':</div><div class='del'>-    if (!*++s) return s;</div><div class='del'>-    if (*s=='&lt;') {</div><div class='del'>-      a-&gt;type=WORDSTART;</div><div class='del'>-      break;</div><div class='del'>-    } else if (*s=='&gt;') {</div><div class='del'>-      a-&gt;type=WORDEND;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  default:</div><div class='del'>-    a-&gt;type=CHAR;</div><div class='del'>-    a-&gt;u.c=rx-&gt;cflags&amp;REG_ICASE?*s:tolower(*s);</div><div class='del'>-    break;</div><div class='del'>-  }</div><div class='del'>-  return s+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* needs to do "greedy" matching, i.e. match as often as possible */</div><div class='del'>-static int matchpiece(void*__restrict__ x,const char*__restrict__ s,int ofs,struct __regex_t*__restrict__ preg,int plus,int eflags) {</div><div class='del'>-  register struct piece* a=(struct piece*)x;</div><div class='del'>-  int matchlen=0;</div><div class='del'>-  int tmp,num=0;</div><div class='del'>-  unsigned int *offsets=alloca(sizeof(int)*a-&gt;max);</div><div class='del'>-  offsets[0]=0;</div><div class='del'>-//  printf("matchpiece \"%s\"...\n",s);</div><div class='del'>-  /* first, try to match the atom as often as possible, up to a-&gt;max times */</div><div class='del'>-  if (a-&gt;max == 1 &amp;&amp; a-&gt;min == 1)</div><div class='del'>-    return a-&gt;a.m(&amp;a-&gt;a,s+matchlen,ofs+matchlen,preg,0,eflags);</div><div class='del'>-  while (num&lt;a-&gt;max) {</div><div class='del'>-    void* save=a-&gt;a.next;</div><div class='del'>-    a-&gt;a.next=0;</div><div class='del'>-    if ((tmp=a-&gt;a.m(&amp;a-&gt;a,s+matchlen,ofs+matchlen,preg,0,eflags))&gt;=0) {</div><div class='del'>-      a-&gt;a.next=save;</div><div class='del'>-      ++num;</div><div class='del'>-      matchlen+=tmp;</div><div class='del'>-      offsets[num]=tmp;</div><div class='del'>-    } else {</div><div class='del'>-      a-&gt;a.next=save;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if (num&lt;a-&gt;min) return -1;		/* already at minimum matches; signal mismatch */</div><div class='del'>-  /* then, while the rest does not match, back off */</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (a-&gt;next)</div><div class='del'>-      tmp=((struct atom*)(a-&gt;next))-&gt;m(a-&gt;next,s+matchlen,ofs+matchlen,preg,plus+matchlen,eflags);</div><div class='del'>-    else</div><div class='del'>-      tmp=plus+matchlen;</div><div class='del'>-    if (tmp&gt;=0) break;	/* it did match; don't back off any further */</div><div class='del'>-    matchlen-=offsets[num];</div><div class='del'>-    --num;</div><div class='del'>-  }</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parsepiece(struct piece*__restrict__ p,const char*__restrict__ s,regex_t*__restrict__ rx) {</div><div class='del'>-  const char* tmp=parseatom(&amp;p-&gt;a,s,rx);</div><div class='del'>-  if (tmp==s) return s;</div><div class='del'>-  p-&gt;m=matchpiece;</div><div class='del'>-  p-&gt;min=p-&gt;max=1;</div><div class='del'>-  switch (*tmp) {</div><div class='del'>-  case '*': p-&gt;min=0; p-&gt;max=RE_DUP_MAX; break;</div><div class='del'>-  case '+': p-&gt;min=1; p-&gt;max=RE_DUP_MAX; break;</div><div class='del'>-  case '?': p-&gt;min=0; p-&gt;max=1; break;</div><div class='del'>-  case '{':</div><div class='del'>-    if (isdigit(*++tmp)) {</div><div class='del'>-      p-&gt;min=*tmp-'0'; p-&gt;max=RE_DUP_MAX;</div><div class='del'>-      while (isdigit(*++tmp)) p-&gt;min=p-&gt;min*10+*tmp-'0';</div><div class='del'>-      if (*tmp==',') {</div><div class='del'>-	if (isdigit(*++tmp)) {</div><div class='del'>-	  p-&gt;max=*tmp-'0';</div><div class='del'>-	  while (isdigit(*++tmp)) p-&gt;max=p-&gt;max*10+*tmp-'0';</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      if (*tmp!='}') return s;</div><div class='del'>-      ++tmp;</div><div class='del'>-    }</div><div class='del'>-  default:</div><div class='del'>-    return tmp;</div><div class='del'>-  }</div><div class='del'>-  return tmp+1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* trivial, just pass through */</div><div class='del'>-static int matchbranch(void*__restrict__ x,const char*__restrict__ s,int ofs,struct __regex_t*__restrict__ preg,int plus,int eflags) {</div><div class='del'>-  register struct branch* a=(struct branch*)x;</div><div class='del'>-  int tmp;</div><div class='del'>-  tmp=a-&gt;p-&gt;m(a-&gt;p,s,ofs,preg,plus,eflags);</div><div class='del'>-  if (tmp&gt;=0) {</div><div class='del'>-    if (a-&gt;next)</div><div class='del'>-      return ((struct atom*)(a-&gt;next))-&gt;m(a-&gt;next,s+tmp,ofs+tmp,preg,plus+tmp,eflags);</div><div class='del'>-    else</div><div class='del'>-      return plus+tmp;</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parsebranch(struct branch*__restrict__ b,const char*__restrict__ s,regex_t*__restrict__ rx,int*__restrict__ pieces) {</div><div class='del'>-  struct piece p;</div><div class='del'>-  const char *tmp;</div><div class='del'>-  b-&gt;m=matchbranch;</div><div class='del'>-  b-&gt;num=0; b-&gt;p=0;</div><div class='del'>-  for (;;) {</div><div class='del'>-    if (*s=='|') {</div><div class='del'>-      if (b-&gt;num==0) {</div><div class='del'>-	tmp=s+1;</div><div class='del'>-	p.a.type=EMPTY;</div><div class='del'>-	p.min=p.max=1;</div><div class='del'>-      }</div><div class='del'>-    } else {</div><div class='del'>-      tmp=parsepiece(&amp;p,s,rx);</div><div class='del'>-      if (tmp==s) return s;</div><div class='del'>-    }</div><div class='del'>-    if (!(b-&gt;p=realloc(b-&gt;p,++b-&gt;num*sizeof(p)))) return s;</div><div class='del'>-    b-&gt;p[b-&gt;num-1]=p;</div><div class='del'>-    if (*s=='|') { ++tmp; break; }</div><div class='del'>-    s=tmp;</div><div class='del'>-  }</div><div class='del'>-  *pieces+=b-&gt;num;</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* try the branches one by one */</div><div class='del'>-static int matchregex(void*__restrict__ x,const char*__restrict__ s,int ofs,struct __regex_t*__restrict__ preg,int plus,int eflags) {</div><div class='del'>-  register struct regex* a=(struct regex*)x;</div><div class='del'>-  int i,tmp;</div><div class='del'>-  for (i=0; i&lt;a-&gt;num; ++i) {</div><div class='del'>-    tmp=a-&gt;b[i].m(&amp;a-&gt;b[i],s,ofs,preg,plus,eflags);</div><div class='del'>-    if (tmp&gt;=0) {</div><div class='del'>-      if (a-&gt;next)</div><div class='del'>-	return ((struct atom*)(a-&gt;next))-&gt;m(a-&gt;next,s+tmp,ofs+tmp,preg,plus+tmp,eflags);</div><div class='del'>-      else</div><div class='del'>-	return plus+tmp;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char* parseregex(struct regex*__restrict__ r,const char*__restrict__ s,regex_t*__restrict__ p) {</div><div class='del'>-  struct branch b;</div><div class='del'>-  const char *tmp;</div><div class='del'>-  r-&gt;m=matchregex;</div><div class='del'>-  r-&gt;num=0; r-&gt;b=0; r-&gt;pieces=0;</div><div class='del'>-  for (;;) {</div><div class='del'>-    tmp=parsebranch(&amp;b,s,p,&amp;r-&gt;pieces);</div><div class='del'>-    if (tmp==s) return s;</div><div class='del'>-    if (!(r-&gt;b=realloc(r-&gt;b,++r-&gt;num*sizeof(b)))) return s;</div><div class='del'>-    r-&gt;b[r-&gt;num-1]=b;</div><div class='del'>-    s=tmp;</div><div class='del'>-  }</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* The matcher relies on the presence of next pointers, of which the</div><div class='del'>- * parser does not know the correct destination.  So we need an</div><div class='del'>- * additional pass through the data structure that sets the next</div><div class='del'>- * pointers correctly. */</div><div class='del'>-static void regex_putnext(struct regex* r,void* next);</div><div class='del'>-</div><div class='del'>-static void atom_putnext(struct atom*__restrict__ a,void*__restrict__ next) {</div><div class='del'>-  a-&gt;next=next;</div><div class='del'>-  if (a-&gt;type==REGEX)</div><div class='del'>-    regex_putnext(&amp;a-&gt;u.r,next);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void piece_putnext(struct piece*__restrict__ p,void*__restrict__ next) {</div><div class='del'>-  p-&gt;next=next;</div><div class='del'>-  atom_putnext(&amp;p-&gt;a,next);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void branch_putnext(struct branch*__restrict__ b,void*__restrict__ next) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0; i&lt;b-&gt;num-1; ++i)</div><div class='del'>-    piece_putnext(&amp;b-&gt;p[i],&amp;b-&gt;p[i+1]);</div><div class='del'>-  piece_putnext(&amp;b-&gt;p[i],0);</div><div class='del'>-  b-&gt;next=next;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void regex_putnext(struct regex*__restrict__ r,void*__restrict__ next) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0; i&lt;r-&gt;num; ++i)</div><div class='del'>-    branch_putnext(&amp;r-&gt;b[i],next);</div><div class='del'>-  r-&gt;next=next;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int regcomp(regex_t*__restrict__ preg, const char*__restrict__ regex, int cflags) {</div><div class='del'>-  const char* t=parseregex(&amp;preg-&gt;r,regex,preg);</div><div class='del'>-  if (t==regex) return -1;</div><div class='del'>-  regex_putnext(&amp;preg-&gt;r,0);</div><div class='del'>-  preg-&gt;cflags=cflags;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int regexec(const regex_t*__restrict__ preg, const char*__restrict__ string, size_t nmatch, regmatch_t pmatch[], int eflags) {</div><div class='del'>-  int matched;</div><div class='del'>-  const char *orig=string;</div><div class='del'>-  ((regex_t*)preg)-&gt;l=alloca(sizeof(regmatch_t)*(preg-&gt;brackets+1));</div><div class='del'>-  while (*string) {</div><div class='del'>-    matched=preg-&gt;r.m((void*)&amp;preg-&gt;r,string,string-orig,(regex_t*)preg,0,eflags);</div><div class='del'>-    if (matched&gt;=0) {</div><div class='del'>-      if ((preg-&gt;cflags&amp;REG_NOSUB)==0) memmove(pmatch,preg-&gt;l,nmatch*sizeof(regmatch_t));</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-    ++string; eflags|=REG_NOTBOL;</div><div class='del'>-  }</div><div class='del'>-  return REG_NOMATCH;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void regfree(regex_t* preg) {</div><div class='del'>-  int i;</div><div class='del'>-  for (i=0; i&lt;preg-&gt;r.num; ++i) {</div><div class='del'>-    free(preg-&gt;r.b[i].p);</div><div class='del'>-    free(preg-&gt;r.b);</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-size_t regerror(int errcode, const regex_t*__restrict__ preg, char*__restrict__ errbuf, size_t errbuf_size) {</div><div class='del'>-  strncpy(errbuf,"invalid regular expression (sorry)",errbuf_size);</div><div class='del'>-  return strlen(errbuf);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-int main() {</div><div class='del'>-  struct regex r;</div><div class='del'>-  int bnum=-1;</div><div class='del'>-  const char* t=parseregex(&amp;r,"^a*ab$",&amp;bnum);</div><div class='del'>-  regex_putnext(&amp;r,0);</div><div class='del'>-  printf("%d pieces, %s\n",r.pieces,t);</div><div class='del'>-  printf("%d\n",r.m(&amp;r,"aaab",0,0,0));</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/auth_none.c b/mdk-stage1/dietlibc/librpc/auth_none.c<br/>deleted file mode 100644<br/>index 7a4dffe87..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/auth_none.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/auth_none.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,128 +0,0 @@</div><div class='del'>-/* @(#)auth_none.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_none.c</div><div class='del'>- * Creates a client authentication handle for passing "null" </div><div class='del'>- * credentials and verifiers to remote systems. </div><div class='del'>- * </div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc. </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#define MAX_MARSHEL_SIZE 20</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Authenticator operations routines</div><div class='del'>- */</div><div class='del'>-static void authnone_verf();</div><div class='del'>-static void authnone_destroy();</div><div class='del'>-static bool_t authnone_marshal();</div><div class='del'>-static bool_t authnone_validate();</div><div class='del'>-static bool_t authnone_refresh();</div><div class='del'>-</div><div class='del'>-static struct auth_ops ops = {</div><div class='del'>-	authnone_verf,</div><div class='del'>-	authnone_marshal,</div><div class='del'>-	authnone_validate,</div><div class='del'>-	authnone_refresh,</div><div class='del'>-	authnone_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct authnone_private {</div><div class='del'>-	AUTH no_client;</div><div class='del'>-	char marshalled_client[MAX_MARSHEL_SIZE];</div><div class='del'>-	u_int mcnt;</div><div class='del'>-} *authnone_private;</div><div class='del'>-</div><div class='del'>-AUTH *authnone_create()</div><div class='del'>-{</div><div class='del'>-	register struct authnone_private *ap = authnone_private;</div><div class='del'>-	XDR xdr_stream;</div><div class='del'>-	register XDR *xdrs;</div><div class='del'>-</div><div class='del'>-	if (ap == 0) {</div><div class='del'>-		ap = (struct authnone_private *) calloc(1, sizeof(*ap));</div><div class='del'>-		if (ap == 0)</div><div class='del'>-			return (0);</div><div class='del'>-		authnone_private = ap;</div><div class='del'>-	}</div><div class='del'>-	if (!ap-&gt;mcnt) {</div><div class='del'>-		ap-&gt;no_client.ah_cred = ap-&gt;no_client.ah_verf = _null_auth;</div><div class='del'>-		ap-&gt;no_client.ah_ops = &amp;ops;</div><div class='del'>-		xdrs = &amp;xdr_stream;</div><div class='del'>-		xdrmem_create(xdrs, ap-&gt;marshalled_client,</div><div class='del'>-					  (u_int) MAX_MARSHEL_SIZE, XDR_ENCODE);</div><div class='del'>-		(void) xdr_opaque_auth(xdrs, &amp;ap-&gt;no_client.ah_cred);</div><div class='del'>-		(void) xdr_opaque_auth(xdrs, &amp;ap-&gt;no_client.ah_verf);</div><div class='del'>-		ap-&gt;mcnt = XDR_GETPOS(xdrs);</div><div class='del'>-		XDR_DESTROY(xdrs);</div><div class='del'>-	}</div><div class='del'>-	return (&amp;ap-&gt;no_client);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>- /*ARGSUSED*/ static bool_t authnone_marshal(client, xdrs)</div><div class='del'>-AUTH *client;</div><div class='del'>-XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register struct authnone_private *ap = authnone_private;</div><div class='del'>-</div><div class='del'>-	if (ap == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	return ((*xdrs-&gt;x_ops-&gt;x_putbytes) (xdrs,</div><div class='del'>-										ap-&gt;marshalled_client, ap-&gt;mcnt));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void authnone_verf()</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t authnone_validate()</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t authnone_refresh()</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void authnone_destroy()</div><div class='del'>-{</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/auth_unix.c b/mdk-stage1/dietlibc/librpc/auth_unix.c<br/>deleted file mode 100644<br/>index 5daeb5f4a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/auth_unix.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/auth_unix.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,313 +0,0 @@</div><div class='del'>-/* @(#)auth_unix.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_unix.c, Implements UNIX style authentication parameters. </div><div class='del'>- *  </div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * The system is very weak.  The client uses no encryption for it's</div><div class='del'>- * credentials and only sends null verifiers.  The server sends backs</div><div class='del'>- * null verifiers or optionally a verifier that suggests a new short hand</div><div class='del'>- * for the credentials.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#include &lt;rpc/auth_unix.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unix authenticator operations vector</div><div class='del'>- */</div><div class='del'>-static void authunix_nextverf();</div><div class='del'>-static bool_t authunix_marshal();</div><div class='del'>-static bool_t authunix_validate();</div><div class='del'>-static bool_t authunix_refresh();</div><div class='del'>-static void authunix_destroy();</div><div class='del'>-</div><div class='del'>-static struct auth_ops auth_unix_ops = {</div><div class='del'>-	authunix_nextverf,</div><div class='del'>-	authunix_marshal,</div><div class='del'>-	authunix_validate,</div><div class='del'>-	authunix_refresh,</div><div class='del'>-	authunix_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This struct is pointed to by the ah_private field of an auth_handle.</div><div class='del'>- */</div><div class='del'>-struct audata {</div><div class='del'>-	struct opaque_auth au_origcred;	/* original credentials */</div><div class='del'>-	struct opaque_auth au_shcred;	/* short hand cred */</div><div class='del'>-	u_long au_shfaults;			/* short hand cache faults */</div><div class='del'>-	char au_marshed[MAX_AUTH_BYTES];</div><div class='del'>-	u_int au_mpos;				/* xdr pos at end of marshed */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define	AUTH_PRIVATE(auth)	((struct audata *)auth-&gt;ah_private)</div><div class='del'>-</div><div class='del'>-static void marshal_new_auth();</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create a unix style authenticator.</div><div class='del'>- * Returns an auth handle with the given stuff in it.</div><div class='del'>- */</div><div class='del'>-AUTH *authunix_create __P ((char *machname, uid_t uid,</div><div class='del'>-				   gid_t gid, int len,</div><div class='del'>-				   gid_t *aup_gids))</div><div class='del'>-{</div><div class='del'>-	struct authunix_parms aup;</div><div class='del'>-	char mymem[MAX_AUTH_BYTES];</div><div class='del'>-	struct timeval now;</div><div class='del'>-	XDR xdrs;</div><div class='del'>-	register AUTH *auth;</div><div class='del'>-	register struct audata *au;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Allocate and set up auth handle</div><div class='del'>-	 */</div><div class='del'>-	auth = (AUTH *) mem_alloc(sizeof(*auth));</div><div class='del'>-#ifndef KERNEL</div><div class='del'>-	if (auth == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "authunix_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	au = (struct audata *) mem_alloc(sizeof(*au));</div><div class='del'>-#ifndef KERNEL</div><div class='del'>-	if (au == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "authunix_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	auth-&gt;ah_ops = &amp;auth_unix_ops;</div><div class='del'>-	auth-&gt;ah_private = (caddr_t) au;</div><div class='del'>-	auth-&gt;ah_verf = au-&gt;au_shcred = _null_auth;</div><div class='del'>-	au-&gt;au_shfaults = 0;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * fill in param struct from the given params</div><div class='del'>-	 */</div><div class='del'>-	(void) gettimeofday(&amp;now, (struct timezone *) 0);</div><div class='del'>-	aup.aup_time = now.tv_sec;</div><div class='del'>-	aup.aup_machname = machname;</div><div class='del'>-	aup.aup_uid = uid;</div><div class='del'>-	aup.aup_gid = gid;</div><div class='del'>-	aup.aup_len = (u_int) len;</div><div class='del'>-	aup.aup_gids = aup_gids;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Serialize the parameters into origcred</div><div class='del'>-	 */</div><div class='del'>-	xdrmem_create(&amp;xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);</div><div class='del'>-	if (!xdr_authunix_parms(&amp;xdrs, &amp;aup))</div><div class='del'>-		abort();</div><div class='del'>-	au-&gt;au_origcred.oa_length = len = XDR_GETPOS(&amp;xdrs);</div><div class='del'>-	au-&gt;au_origcred.oa_flavor = AUTH_UNIX;</div><div class='del'>-#ifdef KERNEL</div><div class='del'>-	au-&gt;au_origcred.oa_base = mem_alloc((u_int) len);</div><div class='del'>-#else</div><div class='del'>-	if ((au-&gt;au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "authunix_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	bcopy(mymem, au-&gt;au_origcred.oa_base, (u_int) len);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * set auth handle to reflect new cred.</div><div class='del'>-	 */</div><div class='del'>-	auth-&gt;ah_cred = au-&gt;au_origcred;</div><div class='del'>-	marshal_new_auth(auth);</div><div class='del'>-	return (auth);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Returns an auth handle with parameters determined by doing lots of</div><div class='del'>- * syscalls.</div><div class='del'>- */</div><div class='del'>-AUTH *authunix_create_default()</div><div class='del'>-{</div><div class='del'>-	register int len;</div><div class='del'>-	char machname[MAX_MACHINE_NAME + 1];</div><div class='del'>-	register int uid;</div><div class='del'>-	register int gid;</div><div class='del'>-	gid_t gids[NGRPS];</div><div class='del'>-</div><div class='del'>-	if (gethostname(machname, MAX_MACHINE_NAME) == -1)</div><div class='del'>-		abort();</div><div class='del'>-	machname[MAX_MACHINE_NAME] = 0;</div><div class='del'>-	uid = geteuid();</div><div class='del'>-	gid = getegid();</div><div class='del'>-	if ((len = getgroups(NGRPS, gids)) &lt; 0)</div><div class='del'>-		abort();</div><div class='del'>-	return (authunix_create(machname, uid, gid, len, gids));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * authunix operations</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void authunix_nextverf(auth)</div><div class='del'>-AUTH *auth;</div><div class='del'>-{</div><div class='del'>-	/* no action necessary */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t authunix_marshal(auth, xdrs)</div><div class='del'>-AUTH *auth;</div><div class='del'>-XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register struct audata *au = AUTH_PRIVATE(auth);</div><div class='del'>-</div><div class='del'>-	return (XDR_PUTBYTES(xdrs, au-&gt;au_marshed, au-&gt;au_mpos));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t authunix_validate(auth, verf)</div><div class='del'>-register AUTH *auth;</div><div class='del'>-struct opaque_auth verf;</div><div class='del'>-{</div><div class='del'>-	register struct audata *au;</div><div class='del'>-	XDR xdrs;</div><div class='del'>-</div><div class='del'>-	if (verf.oa_flavor == AUTH_SHORT) {</div><div class='del'>-		au = AUTH_PRIVATE(auth);</div><div class='del'>-		xdrmem_create(&amp;xdrs, verf.oa_base, verf.oa_length, XDR_DECODE);</div><div class='del'>-</div><div class='del'>-		if (au-&gt;au_shcred.oa_base != NULL) {</div><div class='del'>-			mem_free(au-&gt;au_shcred.oa_base, au-&gt;au_shcred.oa_length);</div><div class='del'>-			au-&gt;au_shcred.oa_base = NULL;</div><div class='del'>-		}</div><div class='del'>-		if (xdr_opaque_auth(&amp;xdrs, &amp;au-&gt;au_shcred)) {</div><div class='del'>-			auth-&gt;ah_cred = au-&gt;au_shcred;</div><div class='del'>-		} else {</div><div class='del'>-			xdrs.x_op = XDR_FREE;</div><div class='del'>-			(void) xdr_opaque_auth(&amp;xdrs, &amp;au-&gt;au_shcred);</div><div class='del'>-			au-&gt;au_shcred.oa_base = NULL;</div><div class='del'>-			auth-&gt;ah_cred = au-&gt;au_origcred;</div><div class='del'>-		}</div><div class='del'>-		marshal_new_auth(auth);</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t authunix_refresh(auth)</div><div class='del'>-register AUTH *auth;</div><div class='del'>-{</div><div class='del'>-	register struct audata *au = AUTH_PRIVATE(auth);</div><div class='del'>-	struct authunix_parms aup;</div><div class='del'>-	struct timeval now;</div><div class='del'>-	XDR xdrs;</div><div class='del'>-	register int stat;</div><div class='del'>-</div><div class='del'>-	if (auth-&gt;ah_cred.oa_base == au-&gt;au_origcred.oa_base) {</div><div class='del'>-		/* there is no hope.  Punt */</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	au-&gt;au_shfaults++;</div><div class='del'>-</div><div class='del'>-	/* first deserialize the creds back into a struct authunix_parms */</div><div class='del'>-	aup.aup_machname = NULL;</div><div class='del'>-	aup.aup_gids = (gid_t *) NULL;</div><div class='del'>-	xdrmem_create(&amp;xdrs, au-&gt;au_origcred.oa_base,</div><div class='del'>-				  au-&gt;au_origcred.oa_length, XDR_DECODE);</div><div class='del'>-	stat = xdr_authunix_parms(&amp;xdrs, &amp;aup);</div><div class='del'>-	if (!stat)</div><div class='del'>-		goto done;</div><div class='del'>-</div><div class='del'>-	/* update the time and serialize in place */</div><div class='del'>-	(void) gettimeofday(&amp;now, (struct timezone *) 0);</div><div class='del'>-	aup.aup_time = now.tv_sec;</div><div class='del'>-	xdrs.x_op = XDR_ENCODE;</div><div class='del'>-	XDR_SETPOS(&amp;xdrs, 0);</div><div class='del'>-	stat = xdr_authunix_parms(&amp;xdrs, &amp;aup);</div><div class='del'>-	if (!stat)</div><div class='del'>-		goto done;</div><div class='del'>-	auth-&gt;ah_cred = au-&gt;au_origcred;</div><div class='del'>-	marshal_new_auth(auth);</div><div class='del'>-  done:</div><div class='del'>-	/* free the struct authunix_parms created by deserializing */</div><div class='del'>-	xdrs.x_op = XDR_FREE;</div><div class='del'>-	(void) xdr_authunix_parms(&amp;xdrs, &amp;aup);</div><div class='del'>-	XDR_DESTROY(&amp;xdrs);</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void authunix_destroy(auth)</div><div class='del'>-register AUTH *auth;</div><div class='del'>-{</div><div class='del'>-	register struct audata *au = AUTH_PRIVATE(auth);</div><div class='del'>-</div><div class='del'>-	mem_free(au-&gt;au_origcred.oa_base, au-&gt;au_origcred.oa_length);</div><div class='del'>-</div><div class='del'>-	if (au-&gt;au_shcred.oa_base != NULL)</div><div class='del'>-		mem_free(au-&gt;au_shcred.oa_base, au-&gt;au_shcred.oa_length);</div><div class='del'>-</div><div class='del'>-	mem_free(auth-&gt;ah_private, sizeof(struct audata));</div><div class='del'>-</div><div class='del'>-	if (auth-&gt;ah_verf.oa_base != NULL)</div><div class='del'>-		mem_free(auth-&gt;ah_verf.oa_base, auth-&gt;ah_verf.oa_length);</div><div class='del'>-</div><div class='del'>-	mem_free((caddr_t) auth, sizeof(*auth));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Marshals (pre-serializes) an auth struct.</div><div class='del'>- * sets private data, au_marshed and au_mpos</div><div class='del'>- */</div><div class='del'>-static void marshal_new_auth(auth)</div><div class='del'>-register AUTH *auth;</div><div class='del'>-{</div><div class='del'>-	XDR xdr_stream;</div><div class='del'>-	register XDR *xdrs = &amp;xdr_stream;</div><div class='del'>-	register struct audata *au = AUTH_PRIVATE(auth);</div><div class='del'>-</div><div class='del'>-	xdrmem_create(xdrs, au-&gt;au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);</div><div class='del'>-	if ((!xdr_opaque_auth(xdrs, &amp;(auth-&gt;ah_cred))) ||</div><div class='del'>-		(!xdr_opaque_auth(xdrs, &amp;(auth-&gt;ah_verf)))) {</div><div class='del'>-		perror("auth_none.c - Fatal marshalling problem");</div><div class='del'>-	} else {</div><div class='del'>-		au-&gt;au_mpos = XDR_GETPOS(xdrs);</div><div class='del'>-	}</div><div class='del'>-	XDR_DESTROY(xdrs);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/authunix_prot.c b/mdk-stage1/dietlibc/librpc/authunix_prot.c<br/>deleted file mode 100644<br/>index ddcadb808..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/authunix_prot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/authunix_prot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,69 +0,0 @@</div><div class='del'>-/* @(#)authunix_prot.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * authunix_prot.c</div><div class='del'>- * XDR for UNIX style authentication parameters for RPC</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#include &lt;rpc/auth_unix.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR for unix authentication parameters.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_authunix_parms(xdrs, p)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct authunix_parms *p;</div><div class='del'>-{</div><div class='del'>-  int a,b;</div><div class='del'>-</div><div class='del'>-	if (xdr_u_long(xdrs, &amp;(p-&gt;aup_time))</div><div class='del'>-		&amp;&amp; xdr_string(xdrs, &amp;(p-&gt;aup_machname), MAX_MACHINE_NAME)</div><div class='del'>-		&amp;&amp; xdr_int(xdrs, &amp;a)</div><div class='del'>-		&amp;&amp; xdr_int(xdrs, &amp;b)</div><div class='del'>-		&amp;&amp; xdr_array(xdrs, (caddr_t *) &amp; (p-&gt;aup_gids),</div><div class='del'>-					 &amp;(p-&gt;aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int)) {</div><div class='del'>-		p-&gt;aup_uid=(uid_t)a;</div><div class='del'>-		p-&gt;aup_gid=(gid_t)b;</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/bindresvport.c b/mdk-stage1/dietlibc/librpc/bindresvport.c<br/>deleted file mode 100644<br/>index 8b65261dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/bindresvport.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/bindresvport.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,79 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1987 by Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Bind a socket to a privileged IP port</div><div class='del'>- */</div><div class='del'>-int bindresvport(sd, sin)</div><div class='del'>-int sd;</div><div class='del'>-struct sockaddr_in *sin;</div><div class='del'>-{</div><div class='del'>-	int res;</div><div class='del'>-	static short port;</div><div class='del'>-	struct sockaddr_in myaddr;</div><div class='del'>-	extern int errno;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-#define STARTPORT 600</div><div class='del'>-#define ENDPORT (IPPORT_RESERVED - 1)</div><div class='del'>-#define NPORTS	(ENDPORT - STARTPORT + 1)</div><div class='del'>-</div><div class='del'>-	if (sin == (struct sockaddr_in *) 0) {</div><div class='del'>-		sin = &amp;myaddr;</div><div class='del'>-		bzero(sin, sizeof(*sin));</div><div class='del'>-		sin-&gt;sin_family = AF_INET;</div><div class='del'>-	} else if (sin-&gt;sin_family != AF_INET) {</div><div class='del'>-		errno = EPFNOSUPPORT;</div><div class='del'>-		return (-1);</div><div class='del'>-	}</div><div class='del'>-	if (port == 0) {</div><div class='del'>-		port = (getpid() % NPORTS) + STARTPORT;</div><div class='del'>-	}</div><div class='del'>-	res = -1;</div><div class='del'>-	errno = EADDRINUSE;</div><div class='del'>-	for (i = 0; i &lt; NPORTS &amp;&amp; res &lt; 0 &amp;&amp; errno == EADDRINUSE; i++) {</div><div class='del'>-		sin-&gt;sin_port = htons(port++);</div><div class='del'>-		if (port &gt; ENDPORT) {</div><div class='del'>-			port = STARTPORT;</div><div class='del'>-		}</div><div class='del'>-		res = bind(sd, (struct sockaddr*)sin, sizeof(struct sockaddr_in));</div><div class='del'>-	}</div><div class='del'>-	return (res);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_generic.c b/mdk-stage1/dietlibc/librpc/clnt_generic.c<br/>deleted file mode 100644<br/>index 9bb81cc80..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_generic.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_generic.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,112 +0,0 @@</div><div class='del'>-/* @(#)clnt_generic.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";</div><div class='del'>-#endif</div><div class='del'>-/*</div><div class='del'>- * Copyright (C) 1987, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Generic client creation: takes (hostname, program-number, protocol) and</div><div class='del'>- * returns client handle. Default options are set, which the user can </div><div class='del'>- * change using the rpc equivalent of ioctl()'s.</div><div class='del'>- */</div><div class='del'>-CLIENT *clnt_create __P ((const char *hostname, const u_long prog,</div><div class='del'>-				 const u_long vers, const char *proto))</div><div class='del'>-{</div><div class='del'>-	struct hostent *h;</div><div class='del'>-	struct protoent *p;</div><div class='del'>-	struct sockaddr_in sin;</div><div class='del'>-	int sock;</div><div class='del'>-	struct timeval tv;</div><div class='del'>-	CLIENT *client;</div><div class='del'>-</div><div class='del'>-	h = gethostbyname(hostname);</div><div class='del'>-	if (h == NULL) {</div><div class='del'>-		rpc_createerr.cf_stat = RPC_UNKNOWNHOST;</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	if (h-&gt;h_addrtype != AF_INET) {</div><div class='del'>-		/*</div><div class='del'>-		 * Only support INET for now</div><div class='del'>-		 */</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-#ifdef __linux__</div><div class='del'>-	bzero((char *) &amp;sin, sizeof(sin));</div><div class='del'>-#endif</div><div class='del'>-	sin.sin_family = h-&gt;h_addrtype;</div><div class='del'>-	sin.sin_port = 0;</div><div class='del'>-#ifndef __linux__</div><div class='del'>-	bzero(sin.sin_zero, sizeof(sin.sin_zero));</div><div class='del'>-#endif</div><div class='del'>-	bcopy(h-&gt;h_addr, (char *) &amp;sin.sin_addr, h-&gt;h_length);</div><div class='del'>-	p = getprotobyname(proto);</div><div class='del'>-	if (p == NULL) {</div><div class='del'>-		rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	sock = RPC_ANYSOCK;</div><div class='del'>-	switch (p-&gt;p_proto) {</div><div class='del'>-	case IPPROTO_UDP:</div><div class='del'>-		tv.tv_sec = 5;</div><div class='del'>-		tv.tv_usec = 0;</div><div class='del'>-		client = clntudp_create(&amp;sin, prog, vers, tv, &amp;sock);</div><div class='del'>-		if (client == NULL) {</div><div class='del'>-			return (NULL);</div><div class='del'>-		}</div><div class='del'>-		tv.tv_sec = 25;</div><div class='del'>-		clnt_control(client, CLSET_TIMEOUT, (char*)&amp;tv);</div><div class='del'>-		break;</div><div class='del'>-	case IPPROTO_TCP:</div><div class='del'>-		client = clnttcp_create(&amp;sin, prog, vers, &amp;sock, 0, 0);</div><div class='del'>-		if (client == NULL) {</div><div class='del'>-			return (NULL);</div><div class='del'>-		}</div><div class='del'>-		tv.tv_sec = 25;</div><div class='del'>-		tv.tv_usec = 0;</div><div class='del'>-		clnt_control(client, CLSET_TIMEOUT, (char*)&amp;tv);</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	return (client);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_perror.c b/mdk-stage1/dietlibc/librpc/clnt_perror.c<br/>deleted file mode 100644<br/>index 4ede1a43e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_perror.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_perror.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,302 +0,0 @@</div><div class='del'>-/* @(#)clnt_perror.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clnt_perror.c</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/auth.h&gt;</div><div class='del'>-#include &lt;rpc/clnt.h&gt;</div><div class='del'>-</div><div class='del'>-//extern char *sys_errlist[];</div><div class='del'>-//static char *auth_errmsg();</div><div class='del'>-</div><div class='del'>-extern char *strcpy();</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-static char *buf;</div><div class='del'>-</div><div class='del'>-static char *_buf()</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (buf == 0)</div><div class='del'>-		buf = (char *) malloc(256);</div><div class='del'>-	return (buf);</div><div class='del'>-}</div><div class='del'>-#endif	</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Print reply error info</div><div class='del'>- */</div><div class='del'>-char *clnt_sperror __P ((CLIENT *rpch, const char *s))</div><div class='del'>-{</div><div class='del'>-#if 0</div><div class='del'>-	struct rpc_err e;</div><div class='del'>-	void clnt_perrno();</div><div class='del'>-	char *err;</div><div class='del'>-	char *str = _buf();</div><div class='del'>-	char *strstart = str;</div><div class='del'>-</div><div class='del'>-	if (str == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	CLNT_GETERR(rpch, &amp;e);</div><div class='del'>-</div><div class='del'>-	(void) sprintf(str, "%s: ", s);</div><div class='del'>-	str += strlen(str);</div><div class='del'>-</div><div class='del'>-	(void) strcpy(str, clnt_sperrno(e.re_status));</div><div class='del'>-	str += strlen(str);</div><div class='del'>-</div><div class='del'>-	switch (e.re_status) {</div><div class='del'>-	case RPC_SUCCESS:</div><div class='del'>-	case RPC_CANTENCODEARGS:</div><div class='del'>-	case RPC_CANTDECODERES:</div><div class='del'>-	case RPC_TIMEDOUT:</div><div class='del'>-	case RPC_PROGUNAVAIL:</div><div class='del'>-	case RPC_PROCUNAVAIL:</div><div class='del'>-	case RPC_CANTDECODEARGS:</div><div class='del'>-	case RPC_SYSTEMERROR:</div><div class='del'>-	case RPC_UNKNOWNHOST:</div><div class='del'>-	case RPC_UNKNOWNPROTO:</div><div class='del'>-	case RPC_PMAPFAILURE:</div><div class='del'>-	case RPC_PROGNOTREGISTERED:</div><div class='del'>-	case RPC_FAILED:</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_CANTSEND:</div><div class='del'>-	case RPC_CANTRECV:</div><div class='del'>-		(void) sprintf(str, "; errno = %s", sys_errlist[e.re_errno]);</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_VERSMISMATCH:</div><div class='del'>-		(void) sprintf(str,</div><div class='del'>-					   "; low version = %lu, high version = %lu",</div><div class='del'>-					   e.re_vers.low, e.re_vers.high);</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_AUTHERROR:</div><div class='del'>-		err = auth_errmsg(e.re_why);</div><div class='del'>-		(void) sprintf(str, "; why = ");</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		if (err != NULL) {</div><div class='del'>-			(void) sprintf(str, "%s", err);</div><div class='del'>-		} else {</div><div class='del'>-			(void) sprintf(str,</div><div class='del'>-						   "(unknown authentication error - %d)",</div><div class='del'>-						   (int) e.re_why);</div><div class='del'>-		}</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_PROGVERSMISMATCH:</div><div class='del'>-		(void) sprintf(str,</div><div class='del'>-					   "; low version = %lu, high version = %lu",</div><div class='del'>-					   e.re_vers.low, e.re_vers.high);</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	default:					/* unknown */</div><div class='del'>-		(void) sprintf(str,</div><div class='del'>-					   "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2);</div><div class='del'>-		str += strlen(str);</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	(void) sprintf(str, "\n");</div><div class='del'>-	return (strstart);</div><div class='del'>-#endif</div><div class='del'>-	return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void clnt_perror __P ((CLIENT *rpch, const char *s))</div><div class='del'>-{</div><div class='del'>-	(void) fprintf(stderr, "%s", clnt_sperror(rpch, s));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct rpc_errtab {</div><div class='del'>-	enum clnt_stat status;</div><div class='del'>-	char *message;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-static struct rpc_errtab rpc_errlist[] = {</div><div class='del'>-	{RPC_SUCCESS,</div><div class='del'>-	 "RPC: Success"},</div><div class='del'>-	{RPC_CANTENCODEARGS,</div><div class='del'>-	 "RPC: Can't encode arguments"},</div><div class='del'>-	{RPC_CANTDECODERES,</div><div class='del'>-	 "RPC: Can't decode result"},</div><div class='del'>-	{RPC_CANTSEND,</div><div class='del'>-	 "RPC: Unable to send"},</div><div class='del'>-	{RPC_CANTRECV,</div><div class='del'>-	 "RPC: Unable to receive"},</div><div class='del'>-	{RPC_TIMEDOUT,</div><div class='del'>-	 "RPC: Timed out"},</div><div class='del'>-	{RPC_VERSMISMATCH,</div><div class='del'>-	 "RPC: Incompatible versions of RPC"},</div><div class='del'>-	{RPC_AUTHERROR,</div><div class='del'>-	 "RPC: Authentication error"},</div><div class='del'>-	{RPC_PROGUNAVAIL,</div><div class='del'>-	 "RPC: Program unavailable"},</div><div class='del'>-	{RPC_PROGVERSMISMATCH,</div><div class='del'>-	 "RPC: Program/version mismatch"},</div><div class='del'>-	{RPC_PROCUNAVAIL,</div><div class='del'>-	 "RPC: Procedure unavailable"},</div><div class='del'>-	{RPC_CANTDECODEARGS,</div><div class='del'>-	 "RPC: Server can't decode arguments"},</div><div class='del'>-	{RPC_SYSTEMERROR,</div><div class='del'>-	 "RPC: Remote system error"},</div><div class='del'>-	{RPC_UNKNOWNHOST,</div><div class='del'>-	 "RPC: Unknown host"},</div><div class='del'>-	{RPC_UNKNOWNPROTO,</div><div class='del'>-	 "RPC: Unknown protocol"},</div><div class='del'>-	{RPC_PMAPFAILURE,</div><div class='del'>-	 "RPC: Port mapper failure"},</div><div class='del'>-	{RPC_PROGNOTREGISTERED,</div><div class='del'>-	 "RPC: Program not registered"},</div><div class='del'>-	{RPC_FAILED,</div><div class='del'>-	 "RPC: Failed (unspecified error)"}</div><div class='del'>-};</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This interface for use by clntrpc</div><div class='del'>- */</div><div class='del'>-char *clnt_sperrno(stat)</div><div class='del'>-enum clnt_stat stat;</div><div class='del'>-{</div><div class='del'>-#if 0</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; sizeof(rpc_errlist) / sizeof(struct rpc_errtab); i++) {</div><div class='del'>-		if (rpc_errlist[i].status == stat) {</div><div class='del'>-			return (rpc_errlist[i].message);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	return ("RPC: (unknown error code)");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void clnt_perrno(num)</div><div class='del'>-enum clnt_stat num;</div><div class='del'>-{</div><div class='del'>-	(void) fprintf(stderr, "%s", clnt_sperrno(num));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char *clnt_spcreateerror __P ((__const char *s))</div><div class='del'>-{</div><div class='del'>-#if 0</div><div class='del'>-	extern int sys_nerr;</div><div class='del'>-	extern char *sys_errlist[];</div><div class='del'>-	char *str = _buf();</div><div class='del'>-</div><div class='del'>-	if (str == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	(void) sprintf(str, "%s: ", s);</div><div class='del'>-	(void) strcat(str, clnt_sperrno(rpc_createerr.cf_stat));</div><div class='del'>-	switch (rpc_createerr.cf_stat) {</div><div class='del'>-	case RPC_PMAPFAILURE:</div><div class='del'>-		(void) strcat(str, " - ");</div><div class='del'>-		(void) strcat(str, clnt_sperrno(rpc_createerr.cf_error.re_status));</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_SYSTEMERROR:</div><div class='del'>-		(void) strcat(str, " - ");</div><div class='del'>-		if (rpc_createerr.cf_error.re_errno &gt; 0</div><div class='del'>-			&amp;&amp; rpc_createerr.cf_error.re_errno &lt; sys_nerr)</div><div class='del'>-			(void) strcat(str,</div><div class='del'>-						  sys_errlist[rpc_createerr.cf_error.re_errno]);</div><div class='del'>-		else</div><div class='del'>-			(void) sprintf(&amp;str[strlen(str)], "Error %d",</div><div class='del'>-						   rpc_createerr.cf_error.re_errno);</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	(void) strcat(str, "\n");</div><div class='del'>-	return (str);</div><div class='del'>-#endif</div><div class='del'>-	return(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void clnt_pcreateerror __P ((__const char *s))</div><div class='del'>-{</div><div class='del'>-	(void) fprintf(stderr, "%s", clnt_spcreateerror(s));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct auth_errtab {</div><div class='del'>-	enum auth_stat status;</div><div class='del'>-	char *message;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-static struct auth_errtab auth_errlist[] = {</div><div class='del'>-	{AUTH_OK,</div><div class='del'>-	 "Authentication OK"},</div><div class='del'>-	{AUTH_BADCRED,</div><div class='del'>-	 "Invalid client credential"},</div><div class='del'>-	{AUTH_REJECTEDCRED,</div><div class='del'>-	 "Server rejected credential"},</div><div class='del'>-	{AUTH_BADVERF,</div><div class='del'>-	 "Invalid client verifier"},</div><div class='del'>-	{AUTH_REJECTEDVERF,</div><div class='del'>-	 "Server rejected verifier"},</div><div class='del'>-	{AUTH_TOOWEAK,</div><div class='del'>-	 "Client credential too weak"},</div><div class='del'>-	{AUTH_INVALIDRESP,</div><div class='del'>-	 "Invalid server verifier"},</div><div class='del'>-	{AUTH_FAILED,</div><div class='del'>-	 "Failed (unspecified error)"},</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static char *auth_errmsg(stat)</div><div class='del'>-enum auth_stat stat;</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; sizeof(auth_errlist) / sizeof(struct auth_errtab); i++) {</div><div class='del'>-		if (auth_errlist[i].status == stat) {</div><div class='del'>-			return (auth_errlist[i].message);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (NULL);</div><div class='del'>-}</div><div class='del'>-#endif	</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_raw.c b/mdk-stage1/dietlibc/librpc/clnt_raw.c<br/>deleted file mode 100644<br/>index 7479b55d6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_raw.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_raw.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,230 +0,0 @@</div><div class='del'>-/* @(#)clnt_raw.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clnt_raw.c</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * Memory based rpc for simple testing and timing.</div><div class='del'>- * Interface to create an rpc client and server in the same process.</div><div class='del'>- * This lets us similate rpc and get round trip overhead, without</div><div class='del'>- * any interference from the kernal.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-#define MCALL_MSG_SIZE 24</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the "network" we will be moving stuff over.</div><div class='del'>- */</div><div class='del'>-static struct clntraw_private {</div><div class='del'>-	CLIENT client_object;</div><div class='del'>-	XDR xdr_stream;</div><div class='del'>-	char _raw_buf[UDPMSGSIZE];</div><div class='del'>-	char mashl_callmsg[MCALL_MSG_SIZE];</div><div class='del'>-	u_int mcnt;</div><div class='del'>-} *clntraw_private;</div><div class='del'>-</div><div class='del'>-static enum clnt_stat clntraw_call();</div><div class='del'>-static void clntraw_abort();</div><div class='del'>-static void clntraw_geterr();</div><div class='del'>-static bool_t clntraw_freeres();</div><div class='del'>-static bool_t clntraw_control();</div><div class='del'>-static void clntraw_destroy();</div><div class='del'>-</div><div class='del'>-static struct clnt_ops client_ops = {</div><div class='del'>-	clntraw_call,</div><div class='del'>-	clntraw_abort,</div><div class='del'>-	clntraw_geterr,</div><div class='del'>-	clntraw_freeres,</div><div class='del'>-	clntraw_destroy,</div><div class='del'>-	clntraw_control</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-void svc_getreq();</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create a client handle for memory based rpc.</div><div class='del'>- */</div><div class='del'>-CLIENT *clntraw_create(prog, vers)</div><div class='del'>-u_long prog;</div><div class='del'>-u_long vers;</div><div class='del'>-{</div><div class='del'>-	register struct clntraw_private *clp = clntraw_private;</div><div class='del'>-	struct rpc_msg call_msg;</div><div class='del'>-	XDR *xdrs = &amp;clp-&gt;xdr_stream;</div><div class='del'>-	CLIENT *client = &amp;clp-&gt;client_object;</div><div class='del'>-</div><div class='del'>-	if (clp == 0) {</div><div class='del'>-		clp = (struct clntraw_private *) calloc(1, sizeof(*clp));</div><div class='del'>-		if (clp == 0)</div><div class='del'>-			return (0);</div><div class='del'>-		clntraw_private = clp;</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * pre-serialize the staic part of the call msg and stash it away</div><div class='del'>-	 */</div><div class='del'>-	call_msg.rm_direction = CALL;</div><div class='del'>-	call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;</div><div class='del'>-	call_msg.rm_call.cb_prog = prog;</div><div class='del'>-	call_msg.rm_call.cb_vers = vers;</div><div class='del'>-	xdrmem_create(xdrs, clp-&gt;mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);</div><div class='del'>-	if (!xdr_callhdr(xdrs, &amp;call_msg)) {</div><div class='del'>-		perror("clnt_raw.c - Fatal header serialization error.");</div><div class='del'>-	}</div><div class='del'>-	clp-&gt;mcnt = XDR_GETPOS(xdrs);</div><div class='del'>-	XDR_DESTROY(xdrs);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Set xdrmem for client/server shared buffer</div><div class='del'>-	 */</div><div class='del'>-	xdrmem_create(xdrs, clp-&gt;_raw_buf, UDPMSGSIZE, XDR_FREE);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * create client handle</div><div class='del'>-	 */</div><div class='del'>-	client-&gt;cl_ops = &amp;client_ops;</div><div class='del'>-	client-&gt;cl_auth = authnone_create();</div><div class='del'>-	return (client);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum clnt_stat</div><div class='del'>-clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)</div><div class='del'>-CLIENT *h;</div><div class='del'>-u_long proc;</div><div class='del'>-xdrproc_t xargs;</div><div class='del'>-caddr_t argsp;</div><div class='del'>-xdrproc_t xresults;</div><div class='del'>-caddr_t resultsp;</div><div class='del'>-struct timeval timeout;</div><div class='del'>-{</div><div class='del'>-	register struct clntraw_private *clp = clntraw_private;</div><div class='del'>-	register XDR *xdrs = &amp;clp-&gt;xdr_stream;</div><div class='del'>-	struct rpc_msg msg;</div><div class='del'>-	enum clnt_stat status;</div><div class='del'>-	struct rpc_err error;</div><div class='del'>-</div><div class='del'>-	if (clp == 0)</div><div class='del'>-		return (RPC_FAILED);</div><div class='del'>-  call_again:</div><div class='del'>-	/*</div><div class='del'>-	 * send request</div><div class='del'>-	 */</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	((struct rpc_msg *) clp-&gt;mashl_callmsg)-&gt;rm_xid++;</div><div class='del'>-	if ((!XDR_PUTBYTES(xdrs, clp-&gt;mashl_callmsg, clp-&gt;mcnt)) ||</div><div class='del'>-		(!XDR_PUTLONG(xdrs, (long *) &amp;proc)) ||</div><div class='del'>-		(!AUTH_MARSHALL(h-&gt;cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp))) {</div><div class='del'>-		return (RPC_CANTENCODEARGS);</div><div class='del'>-	}</div><div class='del'>-	(void) XDR_GETPOS(xdrs);	/* called just to cause overhead */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * We have to call server input routine here because this is</div><div class='del'>-	 * all going on in one process. Yuk.</div><div class='del'>-	 */</div><div class='del'>-	svc_getreq(1);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * get results</div><div class='del'>-	 */</div><div class='del'>-	xdrs-&gt;x_op = XDR_DECODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	msg.acpted_rply.ar_verf = _null_auth;</div><div class='del'>-	msg.acpted_rply.ar_results.where = resultsp;</div><div class='del'>-	msg.acpted_rply.ar_results.proc = xresults;</div><div class='del'>-	if (!xdr_replymsg(xdrs, &amp;msg))</div><div class='del'>-		return (RPC_CANTDECODERES);</div><div class='del'>-	_seterr_reply(&amp;msg, &amp;error);</div><div class='del'>-	status = error.re_status;</div><div class='del'>-</div><div class='del'>-	if (status == RPC_SUCCESS) {</div><div class='del'>-		if (!AUTH_VALIDATE(h-&gt;cl_auth, &amp;msg.acpted_rply.ar_verf)) {</div><div class='del'>-			status = RPC_AUTHERROR;</div><div class='del'>-		}</div><div class='del'>-	} /* end successful completion */</div><div class='del'>-	else {</div><div class='del'>-		if (AUTH_REFRESH(h-&gt;cl_auth))</div><div class='del'>-			goto call_again;</div><div class='del'>-	}							/* end of unsuccessful completion */</div><div class='del'>-</div><div class='del'>-	if (status == RPC_SUCCESS) {</div><div class='del'>-		if (!AUTH_VALIDATE(h-&gt;cl_auth, &amp;msg.acpted_rply.ar_verf)) {</div><div class='del'>-			status = RPC_AUTHERROR;</div><div class='del'>-		}</div><div class='del'>-		if (msg.acpted_rply.ar_verf.oa_base != NULL) {</div><div class='del'>-			xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-			(void) xdr_opaque_auth(xdrs, &amp;(msg.acpted_rply.ar_verf));</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return (status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntraw_geterr()</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static bool_t clntraw_freeres(cl, xdr_res, res_ptr)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-xdrproc_t xdr_res;</div><div class='del'>-caddr_t res_ptr;</div><div class='del'>-{</div><div class='del'>-	register struct clntraw_private *clp = clntraw_private;</div><div class='del'>-	register XDR *xdrs = &amp;clp-&gt;xdr_stream;</div><div class='del'>-	bool_t rval;</div><div class='del'>-</div><div class='del'>-	if (clp == 0) {</div><div class='del'>-		rval = (bool_t) RPC_FAILED;</div><div class='del'>-		return (rval);</div><div class='del'>-	}</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_res) (xdrs, res_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntraw_abort()</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t clntraw_control()</div><div class='del'>-{</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntraw_destroy()</div><div class='del'>-{</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_simple.c b/mdk-stage1/dietlibc/librpc/clnt_simple.c<br/>deleted file mode 100644<br/>index f309f86ff..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_simple.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_simple.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,116 +0,0 @@</div><div class='del'>-/* @(#)clnt_simple.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * clnt_simple.c</div><div class='del'>- * Simplified front end to rpc.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-static struct callrpc_private {</div><div class='del'>-	CLIENT *client;</div><div class='del'>-	int socket;</div><div class='del'>-	int oldprognum, oldversnum, valid;</div><div class='del'>-	char *oldhost;</div><div class='del'>-} *callrpc_private;</div><div class='del'>-</div><div class='del'>-int callrpc (const char *host, const u_long prognum,</div><div class='del'>-			 const u_long versnum, const u_long procnum,</div><div class='del'>-			 const xdrproc_t inproc, const char *in,</div><div class='del'>-			 const xdrproc_t outproc, char *out)</div><div class='del'>-{</div><div class='del'>-	register struct callrpc_private *crp = callrpc_private;</div><div class='del'>-	struct sockaddr_in server_addr;</div><div class='del'>-	enum clnt_stat clnt_stat;</div><div class='del'>-	struct hostent *hp;</div><div class='del'>-	struct timeval timeout, tottimeout;</div><div class='del'>-</div><div class='del'>-	if (crp == 0) {</div><div class='del'>-		crp = (struct callrpc_private *) calloc(1, sizeof(*crp));</div><div class='del'>-		if (crp == 0)</div><div class='del'>-			return (0);</div><div class='del'>-		callrpc_private = crp;</div><div class='del'>-	}</div><div class='del'>-	if (crp-&gt;oldhost == NULL) {</div><div class='del'>-		crp-&gt;oldhost = malloc(256);</div><div class='del'>-		crp-&gt;oldhost[0] = 0;</div><div class='del'>-		crp-&gt;socket = RPC_ANYSOCK;</div><div class='del'>-	}</div><div class='del'>-	if (crp-&gt;valid &amp;&amp; crp-&gt;oldprognum == prognum</div><div class='del'>-		&amp;&amp; crp-&gt;oldversnum == versnum &amp;&amp; strcmp(crp-&gt;oldhost, host) == 0) {</div><div class='del'>-		/* reuse old client */</div><div class='del'>-	} else {</div><div class='del'>-		crp-&gt;valid = 0;</div><div class='del'>-		(void) close(crp-&gt;socket);</div><div class='del'>-		crp-&gt;socket = RPC_ANYSOCK;</div><div class='del'>-		if (crp-&gt;client) {</div><div class='del'>-			clnt_destroy(crp-&gt;client);</div><div class='del'>-			crp-&gt;client = NULL;</div><div class='del'>-		}</div><div class='del'>-		if ((hp = gethostbyname(host)) == NULL)</div><div class='del'>-			return ((int) RPC_UNKNOWNHOST);</div><div class='del'>-		timeout.tv_usec = 0;</div><div class='del'>-		timeout.tv_sec = 5;</div><div class='del'>-		bcopy(hp-&gt;h_addr, (char *) &amp;server_addr.sin_addr, hp-&gt;h_length);</div><div class='del'>-		server_addr.sin_family = AF_INET;</div><div class='del'>-		server_addr.sin_port = 0;</div><div class='del'>-		if ((crp-&gt;client = clntudp_create(&amp;server_addr, (u_long) prognum,</div><div class='del'>-										  (u_long) versnum, timeout,</div><div class='del'>-										  &amp;crp-&gt;socket)) == NULL)</div><div class='del'>-			return ((int) rpc_createerr.cf_stat);</div><div class='del'>-		crp-&gt;valid = 1;</div><div class='del'>-		crp-&gt;oldprognum = prognum;</div><div class='del'>-		crp-&gt;oldversnum = versnum;</div><div class='del'>-		(void) strcpy(crp-&gt;oldhost, host);</div><div class='del'>-	}</div><div class='del'>-	tottimeout.tv_sec = 25;</div><div class='del'>-	tottimeout.tv_usec = 0;</div><div class='del'>-	clnt_stat = clnt_call(crp-&gt;client, procnum, inproc, (char*)in,</div><div class='del'>-						  outproc, out, tottimeout);</div><div class='del'>-	/* </div><div class='del'>-	 * if call failed, empty cache</div><div class='del'>-	 */</div><div class='del'>-	if (clnt_stat != RPC_SUCCESS)</div><div class='del'>-		crp-&gt;valid = 0;</div><div class='del'>-	return ((int) clnt_stat);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_tcp.c b/mdk-stage1/dietlibc/librpc/clnt_tcp.c<br/>deleted file mode 100644<br/>index 8c39e8933..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_tcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_tcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,463 +0,0 @@</div><div class='del'>-/* @(#)clnt_tcp.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clnt_tcp.c, Implements a TCP/IP based, client side RPC.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * TCP based RPC supports 'batched calls'.</div><div class='del'>- * A sequence of calls may be batched-up in a send buffer.  The rpc call</div><div class='del'>- * return immediately to the client even though the call was not necessarily</div><div class='del'>- * sent.  The batching occurs if the results' xdr routine is NULL (0) AND</div><div class='del'>- * the rpc timeout value is zero (see clnt.h, rpc).</div><div class='del'>- *</div><div class='del'>- * Clients should NOT casually batch calls that in fact return results; that is,</div><div class='del'>- * the server side should be aware that a call is batched and not produce any</div><div class='del'>- * return message.  Batched calls that produce many result messages can</div><div class='del'>- * deadlock (netlock) the client and the server....</div><div class='del'>- *</div><div class='del'>- * Now go hang yourself.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define MCALL_MSG_SIZE 24</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-static int readtcp();</div><div class='del'>-static int writetcp();</div><div class='del'>-</div><div class='del'>-static enum clnt_stat clnttcp_call();</div><div class='del'>-static void clnttcp_abort();</div><div class='del'>-static void clnttcp_geterr();</div><div class='del'>-static bool_t clnttcp_freeres();</div><div class='del'>-static bool_t clnttcp_control();</div><div class='del'>-static void clnttcp_destroy();</div><div class='del'>-</div><div class='del'>-static struct clnt_ops tcp_ops = {</div><div class='del'>-	clnttcp_call,</div><div class='del'>-	clnttcp_abort,</div><div class='del'>-	clnttcp_geterr,</div><div class='del'>-	clnttcp_freeres,</div><div class='del'>-	clnttcp_destroy,</div><div class='del'>-	clnttcp_control</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ct_data {</div><div class='del'>-	int ct_sock;</div><div class='del'>-	bool_t ct_closeit;</div><div class='del'>-	struct timeval ct_wait;</div><div class='del'>-	bool_t ct_waitset;			/* wait set by clnt_control? */</div><div class='del'>-	struct sockaddr_in ct_addr;</div><div class='del'>-	struct rpc_err ct_error;</div><div class='del'>-	char ct_mcall[MCALL_MSG_SIZE];	/* marshalled callmsg */</div><div class='del'>-	u_int ct_mpos;				/* pos after marshal */</div><div class='del'>-	XDR ct_xdrs;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create a client handle for a tcp/ip connection.</div><div class='del'>- * If *sockp&lt;0, *sockp is set to a newly created TCP socket and it is</div><div class='del'>- * connected to raddr.  If *sockp non-negative then</div><div class='del'>- * raddr is ignored.  The rpc/tcp package does buffering</div><div class='del'>- * similar to stdio, so the client must pick send and receive buffer sizes,];</div><div class='del'>- * 0 =&gt; use the default.</div><div class='del'>- * If raddr-&gt;sin_port is 0, then a binder on the remote machine is</div><div class='del'>- * consulted for the right port number.</div><div class='del'>- * NB: *sockp is copied into a private area.</div><div class='del'>- * NB: It is the clients responsibility to close *sockp.</div><div class='del'>- * NB: The rpch-&gt;cl_auth is set null authentication.  Caller may wish to set this</div><div class='del'>- * something more useful.</div><div class='del'>- */</div><div class='del'>-CLIENT *clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)</div><div class='del'>-struct sockaddr_in *raddr;</div><div class='del'>-u_long prog;</div><div class='del'>-u_long vers;</div><div class='del'>-register int *sockp;</div><div class='del'>-u_int sendsz;</div><div class='del'>-u_int recvsz;</div><div class='del'>-{</div><div class='del'>-	CLIENT *h;</div><div class='del'>-	register struct ct_data *ct;</div><div class='del'>-	struct timeval now;</div><div class='del'>-	struct rpc_msg call_msg;</div><div class='del'>-</div><div class='del'>-	h = (CLIENT *) mem_alloc(sizeof(*h));</div><div class='del'>-	if (h == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "clnttcp_create: out of memory\n");</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-	ct = (struct ct_data *) mem_alloc(sizeof(*ct));</div><div class='del'>-	if (ct == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "clnttcp_create: out of memory\n");</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If no port number given ask the pmap for one</div><div class='del'>-	 */</div><div class='del'>-	if (raddr-&gt;sin_port == 0) {</div><div class='del'>-		u_short port;</div><div class='del'>-</div><div class='del'>-		if ((port = pmap_getport(raddr, prog, vers, IPPROTO_TCP)) == 0) {</div><div class='del'>-			mem_free((caddr_t) ct, sizeof(struct ct_data));</div><div class='del'>-</div><div class='del'>-			mem_free((caddr_t) h, sizeof(CLIENT));</div><div class='del'>-			return ((CLIENT *) NULL);</div><div class='del'>-		}</div><div class='del'>-		raddr-&gt;sin_port = htons(port);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If no socket given, open one</div><div class='del'>-	 */</div><div class='del'>-	if (*sockp &lt; 0) {</div><div class='del'>-		*sockp = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);</div><div class='del'>-		(void) bindresvport(*sockp, (struct sockaddr_in *) 0);</div><div class='del'>-		if ((*sockp &lt; 0)</div><div class='del'>-			|| (connect(*sockp, (struct sockaddr *) raddr,</div><div class='del'>-						sizeof(*raddr)) &lt; 0)) {</div><div class='del'>-			rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-			rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-			(void) close(*sockp);</div><div class='del'>-			goto fooy;</div><div class='del'>-		}</div><div class='del'>-		ct-&gt;ct_closeit = TRUE;</div><div class='del'>-	} else {</div><div class='del'>-		ct-&gt;ct_closeit = FALSE;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Set up private data struct</div><div class='del'>-	 */</div><div class='del'>-	ct-&gt;ct_sock = *sockp;</div><div class='del'>-	ct-&gt;ct_wait.tv_usec = 0;</div><div class='del'>-	ct-&gt;ct_waitset = FALSE;</div><div class='del'>-	ct-&gt;ct_addr = *raddr;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Initialize call message</div><div class='del'>-	 */</div><div class='del'>-	(void) gettimeofday(&amp;now, (struct timezone *) 0);</div><div class='del'>-	call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;</div><div class='del'>-	call_msg.rm_direction = CALL;</div><div class='del'>-	call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;</div><div class='del'>-	call_msg.rm_call.cb_prog = prog;</div><div class='del'>-	call_msg.rm_call.cb_vers = vers;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * pre-serialize the staic part of the call msg and stash it away</div><div class='del'>-	 */</div><div class='del'>-	xdrmem_create(&amp;(ct-&gt;ct_xdrs), ct-&gt;ct_mcall, MCALL_MSG_SIZE,</div><div class='del'>-				  XDR_ENCODE);</div><div class='del'>-	if (!xdr_callhdr(&amp;(ct-&gt;ct_xdrs), &amp;call_msg)) {</div><div class='del'>-		if (ct-&gt;ct_closeit) {</div><div class='del'>-			(void) close(*sockp);</div><div class='del'>-		}</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-	ct-&gt;ct_mpos = XDR_GETPOS(&amp;(ct-&gt;ct_xdrs));</div><div class='del'>-	XDR_DESTROY(&amp;(ct-&gt;ct_xdrs));</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Create a client handle which uses xdrrec for serialization</div><div class='del'>-	 * and authnone for authentication.</div><div class='del'>-	 */</div><div class='del'>-	xdrrec_create(&amp;(ct-&gt;ct_xdrs), sendsz, recvsz,</div><div class='del'>-				  (caddr_t) ct, readtcp, writetcp);</div><div class='del'>-	h-&gt;cl_ops = &amp;tcp_ops;</div><div class='del'>-	h-&gt;cl_private = (caddr_t) ct;</div><div class='del'>-	h-&gt;cl_auth = authnone_create();</div><div class='del'>-	return (h);</div><div class='del'>-</div><div class='del'>-  fooy:</div><div class='del'>-	/*</div><div class='del'>-	 * Something goofed, free stuff and barf</div><div class='del'>-	 */</div><div class='del'>-	mem_free((caddr_t) ct, sizeof(struct ct_data));</div><div class='del'>-</div><div class='del'>-	mem_free((caddr_t) h, sizeof(CLIENT));</div><div class='del'>-	return ((CLIENT *) NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum clnt_stat</div><div class='del'>-clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr,</div><div class='del'>-			 timeout)</div><div class='del'>-register CLIENT *h;</div><div class='del'>-u_long proc;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-xdrproc_t xdr_results;</div><div class='del'>-caddr_t results_ptr;</div><div class='del'>-struct timeval timeout;</div><div class='del'>-{</div><div class='del'>-	register struct ct_data *ct = (struct ct_data *) h-&gt;cl_private;</div><div class='del'>-	register XDR *xdrs = &amp;(ct-&gt;ct_xdrs);</div><div class='del'>-	struct rpc_msg reply_msg;</div><div class='del'>-	u_long x_id;</div><div class='del'>-	u_long *msg_x_id = (u_long *) (ct-&gt;ct_mcall);	/* yuk */</div><div class='del'>-	register bool_t shipnow;</div><div class='del'>-	int refreshes = 2;</div><div class='del'>-</div><div class='del'>-	if (!ct-&gt;ct_waitset) {</div><div class='del'>-		ct-&gt;ct_wait = timeout;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	shipnow =</div><div class='del'>-		(xdr_results == (xdrproc_t) 0 &amp;&amp; timeout.tv_sec == 0</div><div class='del'>-		 &amp;&amp; timeout.tv_usec == 0) ? FALSE : TRUE;</div><div class='del'>-</div><div class='del'>-  call_again:</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	ct-&gt;ct_error.re_status = RPC_SUCCESS;</div><div class='del'>-	x_id = ntohl(--(*msg_x_id));</div><div class='del'>-	if ((!XDR_PUTBYTES(xdrs, ct-&gt;ct_mcall, ct-&gt;ct_mpos)) ||</div><div class='del'>-		(!XDR_PUTLONG(xdrs, (long *) &amp;proc)) ||</div><div class='del'>-		(!AUTH_MARSHALL(h-&gt;cl_auth, xdrs)) ||</div><div class='del'>-		(!(*xdr_args) (xdrs, args_ptr))) {</div><div class='del'>-		if (ct-&gt;ct_error.re_status == RPC_SUCCESS)</div><div class='del'>-			ct-&gt;ct_error.re_status = RPC_CANTENCODEARGS;</div><div class='del'>-		(void) xdrrec_endofrecord(xdrs, TRUE);</div><div class='del'>-		return (ct-&gt;ct_error.re_status);</div><div class='del'>-	}</div><div class='del'>-	if (!xdrrec_endofrecord(xdrs, shipnow))</div><div class='del'>-		return (ct-&gt;ct_error.re_status = RPC_CANTSEND);</div><div class='del'>-	if (!shipnow)</div><div class='del'>-		return (RPC_SUCCESS);</div><div class='del'>-	/*</div><div class='del'>-	 * Hack to provide rpc-based message passing</div><div class='del'>-	 */</div><div class='del'>-	if (timeout.tv_sec == 0 &amp;&amp; timeout.tv_usec == 0) {</div><div class='del'>-		return (ct-&gt;ct_error.re_status = RPC_TIMEDOUT);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Keep receiving until we get a valid transaction id</div><div class='del'>-	 */</div><div class='del'>-	xdrs-&gt;x_op = XDR_DECODE;</div><div class='del'>-	while (TRUE) {</div><div class='del'>-		reply_msg.acpted_rply.ar_verf = _null_auth;</div><div class='del'>-		reply_msg.acpted_rply.ar_results.where = NULL;</div><div class='del'>-		reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;</div><div class='del'>-		if (!xdrrec_skiprecord(xdrs))</div><div class='del'>-			return (ct-&gt;ct_error.re_status);</div><div class='del'>-		/* now decode and validate the response header */</div><div class='del'>-		if (!xdr_replymsg(xdrs, &amp;reply_msg)) {</div><div class='del'>-			if (ct-&gt;ct_error.re_status == RPC_SUCCESS)</div><div class='del'>-				continue;</div><div class='del'>-			return (ct-&gt;ct_error.re_status);</div><div class='del'>-		}</div><div class='del'>-		if (reply_msg.rm_xid == x_id)</div><div class='del'>-			break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * process header</div><div class='del'>-	 */</div><div class='del'>-	_seterr_reply(&amp;reply_msg, &amp;(ct-&gt;ct_error));</div><div class='del'>-	if (ct-&gt;ct_error.re_status == RPC_SUCCESS) {</div><div class='del'>-		if (!AUTH_VALIDATE(h-&gt;cl_auth, &amp;reply_msg.acpted_rply.ar_verf)) {</div><div class='del'>-			ct-&gt;ct_error.re_status = RPC_AUTHERROR;</div><div class='del'>-			ct-&gt;ct_error.re_why = AUTH_INVALIDRESP;</div><div class='del'>-		} else if (!(*xdr_results) (xdrs, results_ptr)) {</div><div class='del'>-			if (ct-&gt;ct_error.re_status == RPC_SUCCESS)</div><div class='del'>-				ct-&gt;ct_error.re_status = RPC_CANTDECODERES;</div><div class='del'>-		}</div><div class='del'>-		/* free verifier ... */</div><div class='del'>-		if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {</div><div class='del'>-			xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-			(void) xdr_opaque_auth(xdrs, &amp;(reply_msg.acpted_rply.ar_verf));</div><div class='del'>-		}</div><div class='del'>-	} /* end successful completion */</div><div class='del'>-	else {</div><div class='del'>-		/* maybe our credentials need to be refreshed ... */</div><div class='del'>-		if (refreshes-- &amp;&amp; AUTH_REFRESH(h-&gt;cl_auth))</div><div class='del'>-			goto call_again;</div><div class='del'>-	}							/* end of unsuccessful completion */</div><div class='del'>-	return (ct-&gt;ct_error.re_status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clnttcp_geterr(h, errp)</div><div class='del'>-CLIENT *h;</div><div class='del'>-struct rpc_err *errp;</div><div class='del'>-{</div><div class='del'>-	register struct ct_data *ct = (struct ct_data *) h-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	*errp = ct-&gt;ct_error;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t clnttcp_freeres(cl, xdr_res, res_ptr)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-xdrproc_t xdr_res;</div><div class='del'>-caddr_t res_ptr;</div><div class='del'>-{</div><div class='del'>-	register struct ct_data *ct = (struct ct_data *) cl-&gt;cl_private;</div><div class='del'>-	register XDR *xdrs = &amp;(ct-&gt;ct_xdrs);</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_res) (xdrs, res_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clnttcp_abort()</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t clnttcp_control(cl, request, info)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-int request;</div><div class='del'>-char *info;</div><div class='del'>-{</div><div class='del'>-	register struct ct_data *ct = (struct ct_data *) cl-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	switch (request) {</div><div class='del'>-	case CLSET_TIMEOUT:</div><div class='del'>-		ct-&gt;ct_wait = *(struct timeval *) info;</div><div class='del'>-		ct-&gt;ct_waitset = TRUE;</div><div class='del'>-		break;</div><div class='del'>-	case CLGET_TIMEOUT:</div><div class='del'>-		*(struct timeval *) info = ct-&gt;ct_wait;</div><div class='del'>-		break;</div><div class='del'>-	case CLGET_SERVER_ADDR:</div><div class='del'>-		*(struct sockaddr_in *) info = ct-&gt;ct_addr;</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void clnttcp_destroy(h)</div><div class='del'>-CLIENT *h;</div><div class='del'>-{</div><div class='del'>-	register struct ct_data *ct = (struct ct_data *) h-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	if (ct-&gt;ct_closeit) {</div><div class='del'>-		(void) close(ct-&gt;ct_sock);</div><div class='del'>-	}</div><div class='del'>-	XDR_DESTROY(&amp;(ct-&gt;ct_xdrs));</div><div class='del'>-	mem_free((caddr_t) ct, sizeof(struct ct_data));</div><div class='del'>-</div><div class='del'>-	mem_free((caddr_t) h, sizeof(CLIENT));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Interface between xdr serializer and tcp connection.</div><div class='del'>- * Behaves like the system calls, read &amp; write, but keeps some error state</div><div class='del'>- * around for the rpc level.</div><div class='del'>- */</div><div class='del'>-static int readtcp(ct, buf, len)</div><div class='del'>-register struct ct_data *ct;</div><div class='del'>-caddr_t buf;</div><div class='del'>-register int len;</div><div class='del'>-{</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set mask;</div><div class='del'>-	fd_set readfds;</div><div class='del'>-</div><div class='del'>-	if (len == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	FD_ZERO(&amp;mask);</div><div class='del'>-	FD_SET(ct-&gt;ct_sock, &amp;mask);</div><div class='del'>-#else</div><div class='del'>-	register int mask = 1 &lt;&lt; (ct-&gt;ct_sock);</div><div class='del'>-	int readfds;</div><div class='del'>-</div><div class='del'>-	if (len == 0)</div><div class='del'>-		return (0);</div><div class='del'>-</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	while (TRUE) {</div><div class='del'>-		readfds = mask;</div><div class='del'>-		switch (select</div><div class='del'>-				(_rpc_dtablesize(), &amp;readfds, 0, 0,</div><div class='del'>-				 &amp;(ct-&gt;ct_wait))) {</div><div class='del'>-		case 0:</div><div class='del'>-			ct-&gt;ct_error.re_status = RPC_TIMEDOUT;</div><div class='del'>-			return (-1);</div><div class='del'>-</div><div class='del'>-		case -1:</div><div class='del'>-			if (errno == EINTR)</div><div class='del'>-				continue;</div><div class='del'>-			ct-&gt;ct_error.re_status = RPC_CANTRECV;</div><div class='del'>-			ct-&gt;ct_error.re_errno = errno;</div><div class='del'>-			return (-1);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	switch (len = read(ct-&gt;ct_sock, buf, len)) {</div><div class='del'>-</div><div class='del'>-	case 0:</div><div class='del'>-		/* premature eof */</div><div class='del'>-		ct-&gt;ct_error.re_errno = ECONNRESET;</div><div class='del'>-		ct-&gt;ct_error.re_status = RPC_CANTRECV;</div><div class='del'>-		len = -1;				/* it's really an error */</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case -1:</div><div class='del'>-		ct-&gt;ct_error.re_errno = errno;</div><div class='del'>-		ct-&gt;ct_error.re_status = RPC_CANTRECV;</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	return (len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int writetcp(ct, buf, len)</div><div class='del'>-struct ct_data *ct;</div><div class='del'>-caddr_t buf;</div><div class='del'>-int len;</div><div class='del'>-{</div><div class='del'>-	register int i, cnt;</div><div class='del'>-</div><div class='del'>-	for (cnt = len; cnt &gt; 0; cnt -= i, buf += i) {</div><div class='del'>-		if ((i = write(ct-&gt;ct_sock, buf, cnt)) == -1) {</div><div class='del'>-			ct-&gt;ct_error.re_errno = errno;</div><div class='del'>-			ct-&gt;ct_error.re_status = RPC_CANTSEND;</div><div class='del'>-			return (-1);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (len);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/clnt_udp.c b/mdk-stage1/dietlibc/librpc/clnt_udp.c<br/>deleted file mode 100644<br/>index 7305d3ff1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/clnt_udp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/clnt_udp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,437 +0,0 @@</div><div class='del'>-/* @(#)clnt_udp.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clnt_udp.c, Implements a UDP/IP based, client side RPC.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * UDP bases client side rpc operations</div><div class='del'>- */</div><div class='del'>-static enum clnt_stat clntudp_call();</div><div class='del'>-static void clntudp_abort();</div><div class='del'>-static void clntudp_geterr();</div><div class='del'>-static bool_t clntudp_freeres();</div><div class='del'>-static bool_t clntudp_control();</div><div class='del'>-static void clntudp_destroy();</div><div class='del'>-</div><div class='del'>-static struct clnt_ops udp_ops = {</div><div class='del'>-	clntudp_call,</div><div class='del'>-	clntudp_abort,</div><div class='del'>-	clntudp_geterr,</div><div class='del'>-	clntudp_freeres,</div><div class='del'>-	clntudp_destroy,</div><div class='del'>-	clntudp_control</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * Private data kept per client handle</div><div class='del'>- */</div><div class='del'>-struct cu_data {</div><div class='del'>-	int cu_sock;</div><div class='del'>-	bool_t cu_closeit;</div><div class='del'>-	struct sockaddr_in cu_raddr;</div><div class='del'>-	int cu_rlen;</div><div class='del'>-	struct timeval cu_wait;</div><div class='del'>-	struct timeval cu_total;</div><div class='del'>-	struct rpc_err cu_error;</div><div class='del'>-	XDR cu_outxdrs;</div><div class='del'>-	u_int cu_xdrpos;</div><div class='del'>-	u_int cu_sendsz;</div><div class='del'>-	char *cu_outbuf;</div><div class='del'>-	u_int cu_recvsz;</div><div class='del'>-	char cu_inbuf[1];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create a UDP based client handle.</div><div class='del'>- * If *sockp&lt;0, *sockp is set to a newly created UPD socket.</div><div class='del'>- * If raddr-&gt;sin_port is 0 a binder on the remote machine</div><div class='del'>- * is consulted for the correct port number.</div><div class='del'>- * NB: It is the clients responsibility to close *sockp.</div><div class='del'>- * NB: The rpch-&gt;cl_auth is initialized to null authentication.</div><div class='del'>- *     Caller may wish to set this something more useful.</div><div class='del'>- *</div><div class='del'>- * wait is the amount of time used between retransmitting a call if</div><div class='del'>- * no response has been heard;  retransmition occurs until the actual</div><div class='del'>- * rpc call times out.</div><div class='del'>- *</div><div class='del'>- * sendsz and recvsz are the maximum allowable packet sizes that can be</div><div class='del'>- * sent and received.</div><div class='del'>- */</div><div class='del'>-CLIENT *clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz,</div><div class='del'>-						  recvsz)</div><div class='del'>-struct sockaddr_in *raddr;</div><div class='del'>-u_long program;</div><div class='del'>-u_long version;</div><div class='del'>-struct timeval wait;</div><div class='del'>-register int *sockp;</div><div class='del'>-u_int sendsz;</div><div class='del'>-u_int recvsz;</div><div class='del'>-{</div><div class='del'>-	CLIENT *cl;</div><div class='del'>-	register struct cu_data *cu;</div><div class='del'>-	struct timeval now;</div><div class='del'>-	struct rpc_msg call_msg;</div><div class='del'>-</div><div class='del'>-	cl = (CLIENT *) mem_alloc(sizeof(CLIENT));</div><div class='del'>-	if (cl == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "clntudp_create: out of memory\n");</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-	sendsz = ((sendsz + 3) / 4) * 4;</div><div class='del'>-	recvsz = ((recvsz + 3) / 4) * 4;</div><div class='del'>-	cu = (struct cu_data *) mem_alloc(sizeof(*cu) + sendsz + recvsz);</div><div class='del'>-	if (cu == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "clntudp_create: out of memory\n");</div><div class='del'>-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-		rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-	cu-&gt;cu_outbuf = &amp;cu-&gt;cu_inbuf[recvsz];</div><div class='del'>-</div><div class='del'>-	(void) gettimeofday(&amp;now, (struct timezone *) 0);</div><div class='del'>-	if (raddr-&gt;sin_port == 0) {</div><div class='del'>-		u_short port;</div><div class='del'>-</div><div class='del'>-		if ((port =</div><div class='del'>-			 pmap_getport(raddr, program, version, IPPROTO_UDP)) == 0) {</div><div class='del'>-			goto fooy;</div><div class='del'>-		}</div><div class='del'>-		raddr-&gt;sin_port = htons(port);</div><div class='del'>-	}</div><div class='del'>-	cl-&gt;cl_ops = &amp;udp_ops;</div><div class='del'>-	cl-&gt;cl_private = (caddr_t) cu;</div><div class='del'>-	cu-&gt;cu_raddr = *raddr;</div><div class='del'>-	cu-&gt;cu_rlen = sizeof(cu-&gt;cu_raddr);</div><div class='del'>-	cu-&gt;cu_wait = wait;</div><div class='del'>-	cu-&gt;cu_total.tv_sec = -1;</div><div class='del'>-	cu-&gt;cu_total.tv_usec = -1;</div><div class='del'>-	cu-&gt;cu_sendsz = sendsz;</div><div class='del'>-	cu-&gt;cu_recvsz = recvsz;</div><div class='del'>-	call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;</div><div class='del'>-	call_msg.rm_direction = CALL;</div><div class='del'>-	call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;</div><div class='del'>-	call_msg.rm_call.cb_prog = program;</div><div class='del'>-	call_msg.rm_call.cb_vers = version;</div><div class='del'>-	xdrmem_create(&amp;(cu-&gt;cu_outxdrs), cu-&gt;cu_outbuf, sendsz, XDR_ENCODE);</div><div class='del'>-	if (!xdr_callhdr(&amp;(cu-&gt;cu_outxdrs), &amp;call_msg)) {</div><div class='del'>-		goto fooy;</div><div class='del'>-	}</div><div class='del'>-	cu-&gt;cu_xdrpos = XDR_GETPOS(&amp;(cu-&gt;cu_outxdrs));</div><div class='del'>-	if (*sockp &lt; 0) {</div><div class='del'>-		int dontblock = 1;</div><div class='del'>-</div><div class='del'>-		*sockp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);</div><div class='del'>-		if (*sockp &lt; 0) {</div><div class='del'>-			rpc_createerr.cf_stat = RPC_SYSTEMERROR;</div><div class='del'>-			rpc_createerr.cf_error.re_errno = errno;</div><div class='del'>-			goto fooy;</div><div class='del'>-		}</div><div class='del'>-		/* attempt to bind to prov port */</div><div class='del'>-		(void) bindresvport(*sockp, (struct sockaddr_in *) 0);</div><div class='del'>-		/* the sockets rpc controls are non-blocking */</div><div class='del'>-		(void) ioctl(*sockp, FIONBIO, (char *) &amp;dontblock);</div><div class='del'>-		cu-&gt;cu_closeit = TRUE;</div><div class='del'>-	} else {</div><div class='del'>-		cu-&gt;cu_closeit = FALSE;</div><div class='del'>-	}</div><div class='del'>-	cu-&gt;cu_sock = *sockp;</div><div class='del'>-	cl-&gt;cl_auth = authnone_create();</div><div class='del'>-	return (cl);</div><div class='del'>-  fooy:</div><div class='del'>-	if (cu)</div><div class='del'>-		mem_free((caddr_t) cu, sizeof(*cu) + sendsz + recvsz);</div><div class='del'>-	if (cl)</div><div class='del'>-		mem_free((caddr_t) cl, sizeof(CLIENT));</div><div class='del'>-	return ((CLIENT *) NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-CLIENT *clntudp_create(raddr, program, version, wait, sockp)</div><div class='del'>-struct sockaddr_in *raddr;</div><div class='del'>-u_long program;</div><div class='del'>-u_long version;</div><div class='del'>-struct timeval wait;</div><div class='del'>-register int *sockp;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (clntudp_bufcreate(raddr, program, version, wait, sockp,</div><div class='del'>-							  UDPMSGSIZE, UDPMSGSIZE));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum clnt_stat</div><div class='del'>-clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)</div><div class='del'>-register CLIENT *cl;			/* client handle */</div><div class='del'>-u_long proc;					/* procedure number */</div><div class='del'>-xdrproc_t xargs;				/* xdr routine for args */</div><div class='del'>-caddr_t argsp;					/* pointer to args */</div><div class='del'>-xdrproc_t xresults;				/* xdr routine for results */</div><div class='del'>-caddr_t resultsp;				/* pointer to results */</div><div class='del'>-struct timeval utimeout;		/* seconds to wait before giving up */</div><div class='del'>-{</div><div class='del'>-	register struct cu_data *cu = (struct cu_data *) cl-&gt;cl_private;</div><div class='del'>-	register XDR *xdrs;</div><div class='del'>-	register int outlen;</div><div class='del'>-	register int inlen;</div><div class='del'>-	int fromlen;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set readfds;</div><div class='del'>-	fd_set mask;</div><div class='del'>-#else</div><div class='del'>-	int readfds;</div><div class='del'>-	register int mask;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	struct sockaddr_in from;</div><div class='del'>-	struct rpc_msg reply_msg;</div><div class='del'>-	XDR reply_xdrs;</div><div class='del'>-	struct timeval time_waited;</div><div class='del'>-	bool_t ok;</div><div class='del'>-	int nrefreshes = 2;			/* number of times to refresh cred */</div><div class='del'>-	struct timeval timeout;</div><div class='del'>-</div><div class='del'>-	if (cu-&gt;cu_total.tv_usec == -1) {</div><div class='del'>-		timeout = utimeout;		/* use supplied timeout */</div><div class='del'>-	} else {</div><div class='del'>-		timeout = cu-&gt;cu_total;	/* use default timeout */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	time_waited.tv_sec = 0;</div><div class='del'>-	time_waited.tv_usec = 0;</div><div class='del'>-  call_again:</div><div class='del'>-	xdrs = &amp;(cu-&gt;cu_outxdrs);</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	XDR_SETPOS(xdrs, cu-&gt;cu_xdrpos);</div><div class='del'>-	/*</div><div class='del'>-	 * the transaction is the first thing in the out buffer</div><div class='del'>-	 */</div><div class='del'>-	(*(u_short *) (cu-&gt;cu_outbuf))++;</div><div class='del'>-	if ((!XDR_PUTLONG(xdrs, (long *) &amp;proc)) ||</div><div class='del'>-		(!AUTH_MARSHALL(cl-&gt;cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp)))</div><div class='del'>-		return (cu-&gt;cu_error.re_status = RPC_CANTENCODEARGS);</div><div class='del'>-	outlen = (int) XDR_GETPOS(xdrs);</div><div class='del'>-</div><div class='del'>-  send_again:</div><div class='del'>-	if (sendto(cu-&gt;cu_sock, cu-&gt;cu_outbuf, outlen, 0,</div><div class='del'>-			   (struct sockaddr *) &amp;(cu-&gt;cu_raddr), cu-&gt;cu_rlen)</div><div class='del'>-		!= outlen) {</div><div class='del'>-		cu-&gt;cu_error.re_errno = errno;</div><div class='del'>-		return (cu-&gt;cu_error.re_status = RPC_CANTSEND);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Hack to provide rpc-based message passing</div><div class='del'>-	 */</div><div class='del'>-	if (timeout.tv_sec == 0 &amp;&amp; timeout.tv_usec == 0) {</div><div class='del'>-		return (cu-&gt;cu_error.re_status = RPC_TIMEDOUT);</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * sub-optimal code appears here because we have</div><div class='del'>-	 * some clock time to spare while the packets are in flight.</div><div class='del'>-	 * (We assume that this is actually only executed once.)</div><div class='del'>-	 */</div><div class='del'>-	reply_msg.acpted_rply.ar_verf = _null_auth;</div><div class='del'>-	reply_msg.acpted_rply.ar_results.where = resultsp;</div><div class='del'>-	reply_msg.acpted_rply.ar_results.proc = xresults;</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	FD_ZERO(&amp;mask);</div><div class='del'>-	FD_SET(cu-&gt;cu_sock, &amp;mask);</div><div class='del'>-#else</div><div class='del'>-	mask = 1 &lt;&lt; cu-&gt;cu_sock;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	for (;;) {</div><div class='del'>-		readfds = mask;</div><div class='del'>-		switch (select(_rpc_dtablesize(), &amp;readfds, 0, 0, &amp;(cu-&gt;cu_wait))) {</div><div class='del'>-</div><div class='del'>-		case 0:</div><div class='del'>-			time_waited.tv_sec += cu-&gt;cu_wait.tv_sec;</div><div class='del'>-			time_waited.tv_usec += cu-&gt;cu_wait.tv_usec;</div><div class='del'>-			while (time_waited.tv_usec &gt;= 1000000) {</div><div class='del'>-				time_waited.tv_sec++;</div><div class='del'>-				time_waited.tv_usec -= 1000000;</div><div class='del'>-			}</div><div class='del'>-			if ((time_waited.tv_sec &lt; timeout.tv_sec) ||</div><div class='del'>-				((time_waited.tv_sec == timeout.tv_sec) &amp;&amp;</div><div class='del'>-				 (time_waited.tv_usec &lt; timeout.tv_usec)))</div><div class='del'>-				goto send_again;</div><div class='del'>-			return (cu-&gt;cu_error.re_status = RPC_TIMEDOUT);</div><div class='del'>-</div><div class='del'>-			/*</div><div class='del'>-			 * buggy in other cases because time_waited is not being</div><div class='del'>-			 * updated.</div><div class='del'>-			 */</div><div class='del'>-		case -1:</div><div class='del'>-			if (errno == EINTR)</div><div class='del'>-				continue;</div><div class='del'>-			cu-&gt;cu_error.re_errno = errno;</div><div class='del'>-			return (cu-&gt;cu_error.re_status = RPC_CANTRECV);</div><div class='del'>-		}</div><div class='del'>-		do {</div><div class='del'>-			fromlen = sizeof(struct sockaddr);</div><div class='del'>-</div><div class='del'>-			inlen = recvfrom(cu-&gt;cu_sock, cu-&gt;cu_inbuf,</div><div class='del'>-							 (int) cu-&gt;cu_recvsz, 0,</div><div class='del'>-							 (struct sockaddr *) &amp;from, &amp;fromlen);</div><div class='del'>-		} while (inlen &lt; 0 &amp;&amp; errno == EINTR);</div><div class='del'>-		if (inlen &lt; 0) {</div><div class='del'>-			if (errno == EWOULDBLOCK)</div><div class='del'>-				continue;</div><div class='del'>-			cu-&gt;cu_error.re_errno = errno;</div><div class='del'>-			return (cu-&gt;cu_error.re_status = RPC_CANTRECV);</div><div class='del'>-		}</div><div class='del'>-		if (inlen &lt; sizeof(u_long))</div><div class='del'>-			continue;</div><div class='del'>-		/* see if reply transaction id matches sent id */</div><div class='del'>-		if (*((u_long *) (cu-&gt;cu_inbuf)) != *((u_long *) (cu-&gt;cu_outbuf)))</div><div class='del'>-			continue;</div><div class='del'>-		/* we now assume we have the proper reply */</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * now decode and validate the response</div><div class='del'>-	 */</div><div class='del'>-	xdrmem_create(&amp;reply_xdrs, cu-&gt;cu_inbuf, (u_int) inlen, XDR_DECODE);</div><div class='del'>-	ok = xdr_replymsg(&amp;reply_xdrs, &amp;reply_msg);</div><div class='del'>-	/* XDR_DESTROY(&amp;reply_xdrs);  save a few cycles on noop destroy */</div><div class='del'>-	if (ok) {</div><div class='del'>-		_seterr_reply(&amp;reply_msg, &amp;(cu-&gt;cu_error));</div><div class='del'>-		if (cu-&gt;cu_error.re_status == RPC_SUCCESS) {</div><div class='del'>-			if (!AUTH_VALIDATE(cl-&gt;cl_auth,</div><div class='del'>-							   &amp;reply_msg.acpted_rply.ar_verf)) {</div><div class='del'>-				cu-&gt;cu_error.re_status = RPC_AUTHERROR;</div><div class='del'>-				cu-&gt;cu_error.re_why = AUTH_INVALIDRESP;</div><div class='del'>-			}</div><div class='del'>-			if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {</div><div class='del'>-				xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-				(void) xdr_opaque_auth(xdrs,</div><div class='del'>-									   &amp;(reply_msg.acpted_rply.ar_verf));</div><div class='del'>-			}</div><div class='del'>-		} /* end successful completion */</div><div class='del'>-		else {</div><div class='del'>-			/* maybe our credentials need to be refreshed ... */</div><div class='del'>-			if (nrefreshes &gt; 0 &amp;&amp; AUTH_REFRESH(cl-&gt;cl_auth)) {</div><div class='del'>-				nrefreshes--;</div><div class='del'>-				goto call_again;</div><div class='del'>-			}</div><div class='del'>-		}						/* end of unsuccessful completion */</div><div class='del'>-	} /* end of valid reply message */</div><div class='del'>-	else {</div><div class='del'>-		cu-&gt;cu_error.re_status = RPC_CANTDECODERES;</div><div class='del'>-	}</div><div class='del'>-	return (cu-&gt;cu_error.re_status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntudp_geterr(cl, errp)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-struct rpc_err *errp;</div><div class='del'>-{</div><div class='del'>-	register struct cu_data *cu = (struct cu_data *) cl-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	*errp = cu-&gt;cu_error;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static bool_t clntudp_freeres(cl, xdr_res, res_ptr)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-xdrproc_t xdr_res;</div><div class='del'>-caddr_t res_ptr;</div><div class='del'>-{</div><div class='del'>-	register struct cu_data *cu = (struct cu_data *) cl-&gt;cl_private;</div><div class='del'>-	register XDR *xdrs = &amp;(cu-&gt;cu_outxdrs);</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_res) (xdrs, res_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntudp_abort( /*h */ )</div><div class='del'>-	/*CLIENT *h; */</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t clntudp_control(cl, request, info)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-int request;</div><div class='del'>-char *info;</div><div class='del'>-{</div><div class='del'>-	register struct cu_data *cu = (struct cu_data *) cl-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	switch (request) {</div><div class='del'>-	case CLSET_TIMEOUT:</div><div class='del'>-		cu-&gt;cu_total = *(struct timeval *) info;</div><div class='del'>-		break;</div><div class='del'>-	case CLGET_TIMEOUT:</div><div class='del'>-		*(struct timeval *) info = cu-&gt;cu_total;</div><div class='del'>-		break;</div><div class='del'>-	case CLSET_RETRY_TIMEOUT:</div><div class='del'>-		cu-&gt;cu_wait = *(struct timeval *) info;</div><div class='del'>-		break;</div><div class='del'>-	case CLGET_RETRY_TIMEOUT:</div><div class='del'>-		*(struct timeval *) info = cu-&gt;cu_wait;</div><div class='del'>-		break;</div><div class='del'>-	case CLGET_SERVER_ADDR:</div><div class='del'>-		*(struct sockaddr_in *) info = cu-&gt;cu_raddr;</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void clntudp_destroy(cl)</div><div class='del'>-CLIENT *cl;</div><div class='del'>-{</div><div class='del'>-	register struct cu_data *cu = (struct cu_data *) cl-&gt;cl_private;</div><div class='del'>-</div><div class='del'>-	if (cu-&gt;cu_closeit) {</div><div class='del'>-		(void) close(cu-&gt;cu_sock);</div><div class='del'>-	}</div><div class='del'>-	XDR_DESTROY(&amp;(cu-&gt;cu_outxdrs));</div><div class='del'>-	mem_free((caddr_t) cu, (sizeof(*cu) + cu-&gt;cu_sendsz + cu-&gt;cu_recvsz));</div><div class='del'>-	mem_free((caddr_t) cl, sizeof(CLIENT));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/get_myaddress.c b/mdk-stage1/dietlibc/librpc/get_myaddress.c<br/>deleted file mode 100644<br/>index cd63383d0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/get_myaddress.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/get_myaddress.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,69 +0,0 @@</div><div class='del'>-/* @(#)get_myaddress.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_myaddress.c</div><div class='del'>- *</div><div class='del'>- * Get client's IP address via ioctl.  This avoids using the yellowpages.</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-//#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-/* DO use gethostbyname because it's portable */</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-void get_myaddress(struct sockaddr_in* addr)</div><div class='del'>-{</div><div class='del'>-	char localhost[256 + 1];</div><div class='del'>-	struct hostent *hp;</div><div class='del'>-</div><div class='del'>-	gethostname(localhost, 256);</div><div class='del'>-	if ((hp = gethostbyname(localhost)) == NULL) {</div><div class='del'>-		perror("get_myaddress: gethostbyname");</div><div class='del'>-		exit(1);</div><div class='del'>-	}</div><div class='del'>-	addr-&gt;sin_family = AF_INET;</div><div class='del'>-	bcopy((char *) hp-&gt;h_addr, (char *) &amp;addr-&gt;sin_addr, hp-&gt;h_length);</div><div class='del'>-	addr-&gt;sin_port = htons(PMAPPORT);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/getrpcent.c b/mdk-stage1/dietlibc/librpc/getrpcent.c<br/>deleted file mode 100644<br/>index 5e7f694d2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/getrpcent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/getrpcent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,274 +0,0 @@</div><div class='del'>-/* @(#)getrpcent.c	2.2 88/07/29 4.0 RPCSRC */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)getrpcent.c 1.9 87/08/11  Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1985 by Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Internet version.</div><div class='del'>- */</div><div class='del'>-struct rpcdata {</div><div class='del'>-	FILE *rpcf;</div><div class='del'>-	char *current;</div><div class='del'>-	int currentlen;</div><div class='del'>-	int stayopen;</div><div class='del'>-#define	MAXALIASES	35</div><div class='del'>-	char *rpc_aliases[MAXALIASES];</div><div class='del'>-	struct rpcent rpc;</div><div class='del'>-	char line[BUFSIZ + 1];</div><div class='del'>-	char *domain;</div><div class='del'>-} *rpcdata;</div><div class='del'>-</div><div class='del'>-static struct rpcent *interpret();</div><div class='del'>-struct hostent *gethostent();</div><div class='del'>-char *inet_ntoa();</div><div class='del'>-</div><div class='del'>-#ifndef __linux__</div><div class='del'>-static char *index();</div><div class='del'>-#else</div><div class='del'>-char *index();</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static char RPCDB[] = "/etc/rpc";</div><div class='del'>-</div><div class='del'>-static struct rpcdata *_rpcdata()</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = rpcdata;</div><div class='del'>-</div><div class='del'>-	if (d == 0) {</div><div class='del'>-		d = (struct rpcdata *) calloc(1, sizeof(struct rpcdata));</div><div class='del'>-</div><div class='del'>-		rpcdata = d;</div><div class='del'>-	}</div><div class='del'>-	return (d);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct rpcent *getrpcbynumber(number)</div><div class='del'>-register int number;</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = _rpcdata();</div><div class='del'>-	register struct rpcent *p;</div><div class='del'>-</div><div class='del'>-	if (d == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	setrpcent(0);</div><div class='del'>-	while ((p = getrpcent())) {</div><div class='del'>-		if (p-&gt;r_number == number)</div><div class='del'>-			break;</div><div class='del'>-	}</div><div class='del'>-	endrpcent();</div><div class='del'>-	return (p);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct rpcent *</div><div class='del'>-#ifdef __linux__</div><div class='del'>-getrpcbyname(const char *name)</div><div class='del'>-#else</div><div class='del'>-getrpcbyname(name)</div><div class='del'>-char *name;</div><div class='del'>-#endif</div><div class='del'>-{</div><div class='del'>-	struct rpcent *rpc;</div><div class='del'>-	char **rp;</div><div class='del'>-</div><div class='del'>-	setrpcent(0);</div><div class='del'>-	while ((rpc = getrpcent())) {</div><div class='del'>-		if (strcmp(rpc-&gt;r_name, name) == 0)</div><div class='del'>-			return (rpc);</div><div class='del'>-		for (rp = rpc-&gt;r_aliases; *rp != NULL; rp++) {</div><div class='del'>-			if (strcmp(*rp, name) == 0)</div><div class='del'>-				return (rpc);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	endrpcent();</div><div class='del'>-	return (NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-void</div><div class='del'>-#endif</div><div class='del'>-setrpcent(f)</div><div class='del'>-int f;</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = _rpcdata();</div><div class='del'>-</div><div class='del'>-	if (d == 0)</div><div class='del'>-		return;</div><div class='del'>-	if (d-&gt;rpcf == NULL)</div><div class='del'>-		d-&gt;rpcf = fopen(RPCDB, "r");</div><div class='del'>-	else</div><div class='del'>-		rewind(d-&gt;rpcf);</div><div class='del'>-	if (d-&gt;current)</div><div class='del'>-		free(d-&gt;current);</div><div class='del'>-	d-&gt;current = NULL;</div><div class='del'>-	d-&gt;stayopen |= f;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-void</div><div class='del'>-#endif</div><div class='del'>-endrpcent()</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = _rpcdata();</div><div class='del'>-</div><div class='del'>-	if (d == 0)</div><div class='del'>-		return;</div><div class='del'>-	if (d-&gt;current &amp;&amp; !d-&gt;stayopen) {</div><div class='del'>-		free(d-&gt;current);</div><div class='del'>-		d-&gt;current = NULL;</div><div class='del'>-	}</div><div class='del'>-	if (d-&gt;rpcf &amp;&amp; !d-&gt;stayopen) {</div><div class='del'>-		fclose(d-&gt;rpcf);</div><div class='del'>-		d-&gt;rpcf = NULL;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct rpcent *getrpcent()</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = _rpcdata();</div><div class='del'>-</div><div class='del'>-	if (d == 0)</div><div class='del'>-		return (NULL);</div><div class='del'>-	if (d-&gt;rpcf == NULL &amp;&amp; (d-&gt;rpcf = fopen(RPCDB, "r")) == NULL)</div><div class='del'>-		return (NULL);</div><div class='del'>-	if (fgets(d-&gt;line, BUFSIZ, d-&gt;rpcf) == NULL)</div><div class='del'>-		return (NULL);</div><div class='del'>-	return interpret(d-&gt;line, strlen(d-&gt;line));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-static char *firstwhite(s)</div><div class='del'>-char *s;</div><div class='del'>-{</div><div class='del'>-	char *s1, *s2;</div><div class='del'>-</div><div class='del'>-	s1 = index(s, ' ');</div><div class='del'>-	s2 = index(s, '\t');</div><div class='del'>-	if (s1) {</div><div class='del'>-		if (s2)</div><div class='del'>-			return (s1 &lt; s2) ? s1 : s2;</div><div class='del'>-		else</div><div class='del'>-			return s1;</div><div class='del'>-	} else</div><div class='del'>-		return s2;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static struct rpcent *interpret(const char* val, int len)</div><div class='del'>-{</div><div class='del'>-	register struct rpcdata *d = _rpcdata();</div><div class='del'>-	char *p;</div><div class='del'>-	register char *cp, **q;</div><div class='del'>-</div><div class='del'>-	if (d == 0)</div><div class='del'>-		return 0;</div><div class='del'>-	strncpy(d-&gt;line, val, len);</div><div class='del'>-	p = d-&gt;line;</div><div class='del'>-	d-&gt;line[len] = '\n';</div><div class='del'>-	if (*p == '#')</div><div class='del'>-		return (getrpcent());</div><div class='del'>-	cp = index(p, '#');</div><div class='del'>-	if (cp == NULL) {</div><div class='del'>-		cp = index(p, '\n');</div><div class='del'>-		if (cp == NULL)</div><div class='del'>-			return (getrpcent());</div><div class='del'>-	}</div><div class='del'>-	*cp = '\0';</div><div class='del'>-#ifdef __linux__</div><div class='del'>-	if ((cp = firstwhite(p)))</div><div class='del'>-		*cp++ = 0;</div><div class='del'>-	else</div><div class='del'>-		return (getrpcent());</div><div class='del'>-#else</div><div class='del'>-	cp = index(p, ' ');</div><div class='del'>-	if (cp == NULL) {</div><div class='del'>-		cp = index(p, '\t');</div><div class='del'>-		if (cp == NULL)</div><div class='del'>-			return (getrpcent());</div><div class='del'>-	}</div><div class='del'>-	*cp++ = '\0';</div><div class='del'>-#endif</div><div class='del'>-	/* THIS STUFF IS INTERNET SPECIFIC */</div><div class='del'>-	d-&gt;rpc.r_name = d-&gt;line;</div><div class='del'>-	while (*cp == ' ' || *cp == '\t')</div><div class='del'>-		cp++;</div><div class='del'>-	d-&gt;rpc.r_number = atoi(cp);</div><div class='del'>-	q = d-&gt;rpc.r_aliases = d-&gt;rpc_aliases;</div><div class='del'>-#ifdef __linux__</div><div class='del'>-	if ((cp = firstwhite(cp)))</div><div class='del'>-		*cp++ = '\0';</div><div class='del'>-#else</div><div class='del'>-	cp = index(p, ' ');</div><div class='del'>-	if (cp != NULL)</div><div class='del'>-		*cp++ = '\0';</div><div class='del'>-	else {</div><div class='del'>-		cp = index(p, '\t');</div><div class='del'>-		if (cp != NULL)</div><div class='del'>-			*cp++ = '\0';</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	while (cp &amp;&amp; *cp) {</div><div class='del'>-		if (*cp == ' ' || *cp == '\t') {</div><div class='del'>-			cp++;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		if (q &lt; &amp;(d-&gt;rpc_aliases[MAXALIASES - 1]))</div><div class='del'>-			*q++ = cp;</div><div class='del'>-#ifdef __linux__</div><div class='del'>-		if ((cp = firstwhite(cp)))</div><div class='del'>-			*cp++ = '\0';</div><div class='del'>-#else</div><div class='del'>-		cp = index(p, ' ');</div><div class='del'>-		if (cp != NULL)</div><div class='del'>-			*cp++ = '\0';</div><div class='del'>-		else {</div><div class='del'>-			cp = index(p, '\t');</div><div class='del'>-			if (cp != NULL)</div><div class='del'>-				*cp++ = '\0';</div><div class='del'>-		}</div><div class='del'>-#endif</div><div class='del'>-	}</div><div class='del'>-	*q = NULL;</div><div class='del'>-	return (&amp;d-&gt;rpc);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/getrpcport.c b/mdk-stage1/dietlibc/librpc/getrpcport.c<br/>deleted file mode 100644<br/>index a7085cbe7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/getrpcport.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/getrpcport.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,57 +0,0 @@</div><div class='del'>-/* @(#)getrpcport.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";</div><div class='del'>-#endif</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1985 by Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-</div><div class='del'>-extern int getrpcport (const char * host, u_long prognum,</div><div class='del'>-			   u_long versnum, u_int proto)</div><div class='del'>-{</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-	struct hostent *hp;</div><div class='del'>-</div><div class='del'>-	if ((hp = gethostbyname(host)) == NULL)</div><div class='del'>-		return (0);</div><div class='del'>-	bcopy(hp-&gt;h_addr, (char *) &amp;addr.sin_addr, hp-&gt;h_length);</div><div class='del'>-	addr.sin_family = AF_INET;</div><div class='del'>-	addr.sin_port = 0;</div><div class='del'>-	return (pmap_getport(&amp;addr, prognum, versnum, proto));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_clnt.c b/mdk-stage1/dietlibc/librpc/pmap_clnt.c<br/>deleted file mode 100644<br/>index 428675656..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_clnt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_clnt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,118 +0,0 @@</div><div class='del'>-/* @(#)pmap_clnt.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_clnt.c</div><div class='del'>- * Client interface to pmap rpc service.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-static struct timeval timeout = { 5, 0 };</div><div class='del'>-static struct timeval tottimeout = { 60, 0 };</div><div class='del'>-</div><div class='del'>-void clnt_perror();</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Set a mapping between program,version and port.</div><div class='del'>- * Calls the pmap service remotely to do the mapping.</div><div class='del'>- */</div><div class='del'>-bool_t pmap_set(program, version, protocol, port)</div><div class='del'>-u_long program;</div><div class='del'>-u_long version;</div><div class='del'>-int protocol;</div><div class='del'>-u_short port;</div><div class='del'>-{</div><div class='del'>-	struct sockaddr_in myaddress;</div><div class='del'>-	int socket = -1;</div><div class='del'>-	register CLIENT *client;</div><div class='del'>-	struct pmap parms;</div><div class='del'>-	bool_t rslt;</div><div class='del'>-</div><div class='del'>-	get_myaddress(&amp;myaddress);</div><div class='del'>-	client = clntudp_bufcreate(&amp;myaddress, PMAPPROG, PMAPVERS,</div><div class='del'>-							   timeout, &amp;socket, RPCSMALLMSGSIZE,</div><div class='del'>-							   RPCSMALLMSGSIZE);</div><div class='del'>-	if (client == (CLIENT *) NULL)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	parms.pm_prog = program;</div><div class='del'>-	parms.pm_vers = version;</div><div class='del'>-	parms.pm_prot = protocol;</div><div class='del'>-	parms.pm_port = port;</div><div class='del'>-	if (CLNT_CALL(client, PMAPPROC_SET, (xdrproc_t)xdr_pmap, (caddr_t)&amp;parms, (xdrproc_t)xdr_bool, (caddr_t)&amp;rslt,</div><div class='del'>-				  tottimeout) != RPC_SUCCESS) {</div><div class='del'>-		clnt_perror(client, "Cannot register service");</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	CLNT_DESTROY(client);</div><div class='del'>-	(void) close(socket);</div><div class='del'>-	return (rslt);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Remove the mapping between program,version and port.</div><div class='del'>- * Calls the pmap service remotely to do the un-mapping.</div><div class='del'>- */</div><div class='del'>-bool_t pmap_unset(program, version)</div><div class='del'>-u_long program;</div><div class='del'>-u_long version;</div><div class='del'>-{</div><div class='del'>-	struct sockaddr_in myaddress;</div><div class='del'>-	int socket = -1;</div><div class='del'>-	register CLIENT *client;</div><div class='del'>-	struct pmap parms;</div><div class='del'>-	bool_t rslt;</div><div class='del'>-</div><div class='del'>-	get_myaddress(&amp;myaddress);</div><div class='del'>-	client = clntudp_bufcreate(&amp;myaddress, PMAPPROG, PMAPVERS,</div><div class='del'>-							   timeout, &amp;socket, RPCSMALLMSGSIZE,</div><div class='del'>-							   RPCSMALLMSGSIZE);</div><div class='del'>-	if (client == (CLIENT *) NULL)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	parms.pm_prog = program;</div><div class='del'>-	parms.pm_vers = version;</div><div class='del'>-	parms.pm_port = parms.pm_prot = 0;</div><div class='del'>-	CLNT_CALL(client, PMAPPROC_UNSET, (xdrproc_t)xdr_pmap, (caddr_t)&amp;parms, (xdrproc_t)xdr_bool, (caddr_t)&amp;rslt,</div><div class='del'>-			  tottimeout);</div><div class='del'>-	CLNT_DESTROY(client);</div><div class='del'>-	(void) close(socket);</div><div class='del'>-	return (rslt);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_getmaps.c b/mdk-stage1/dietlibc/librpc/pmap_getmaps.c<br/>deleted file mode 100644<br/>index 6940783fb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_getmaps.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_getmaps.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,85 +0,0 @@</div><div class='del'>-/* @(#)pmap_getmaps.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_getmap.c</div><div class='del'>- * Client interface to pmap rpc service.</div><div class='del'>- * contains pmap_getmaps, which is only tcp service involved</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-//#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#define NAMELEN 255</div><div class='del'>-#define MAX_BROADCAST_SIZE 1400</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Get a copy of the current port maps.</div><div class='del'>- * Calls the pmap service remotely to do get the maps.</div><div class='del'>- */</div><div class='del'>-struct pmaplist *pmap_getmaps(address)</div><div class='del'>-struct sockaddr_in *address;</div><div class='del'>-{</div><div class='del'>-	struct pmaplist *head = (struct pmaplist *) NULL;</div><div class='del'>-	int socket = -1;</div><div class='del'>-	struct timeval minutetimeout;</div><div class='del'>-	register CLIENT *client;</div><div class='del'>-</div><div class='del'>-	minutetimeout.tv_sec = 60;</div><div class='del'>-	minutetimeout.tv_usec = 0;</div><div class='del'>-	address-&gt;sin_port = htons(PMAPPORT);</div><div class='del'>-	client = clnttcp_create(address, PMAPPROG, PMAPVERS, &amp;socket, 50, 500);</div><div class='del'>-	if (client != (CLIENT *) NULL) {</div><div class='del'>-		if (CLNT_CALL(client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_pmaplist,</div><div class='del'>-					  (caddr_t)&amp;head, minutetimeout) != RPC_SUCCESS) {</div><div class='del'>-			clnt_perror(client, "pmap_getmaps rpc problem");</div><div class='del'>-		}</div><div class='del'>-		CLNT_DESTROY(client);</div><div class='del'>-	}</div><div class='del'>-	(void) close(socket);</div><div class='del'>-	address-&gt;sin_port = 0;</div><div class='del'>-	return (head);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_getport.c b/mdk-stage1/dietlibc/librpc/pmap_getport.c<br/>deleted file mode 100644<br/>index 174dca41a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_getport.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_getport.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,90 +0,0 @@</div><div class='del'>-/* @(#)pmap_getport.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_getport.c</div><div class='del'>- * Client interface to pmap rpc service.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-//#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-static struct timeval timeout = { 5, 0 };</div><div class='del'>-static struct timeval tottimeout = { 60, 0 };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Find the mapped port for program,version.</div><div class='del'>- * Calls the pmap service remotely to do the lookup.</div><div class='del'>- * Returns 0 if no map exists.</div><div class='del'>- */</div><div class='del'>-u_short pmap_getport(address, program, version, protocol)</div><div class='del'>-struct sockaddr_in *address;</div><div class='del'>-u_long program;</div><div class='del'>-u_long version;</div><div class='del'>-u_int protocol;</div><div class='del'>-{</div><div class='del'>-	u_short port = 0;</div><div class='del'>-	int socket = -1;</div><div class='del'>-	register CLIENT *client;</div><div class='del'>-	struct pmap parms;</div><div class='del'>-</div><div class='del'>-	address-&gt;sin_port = htons(PMAPPORT);</div><div class='del'>-	client = clntudp_bufcreate(address, PMAPPROG,</div><div class='del'>-							   PMAPVERS, timeout, &amp;socket, RPCSMALLMSGSIZE,</div><div class='del'>-							   RPCSMALLMSGSIZE);</div><div class='del'>-	if (client != (CLIENT *) NULL) {</div><div class='del'>-		parms.pm_prog = program;</div><div class='del'>-		parms.pm_vers = version;</div><div class='del'>-		parms.pm_prot = protocol;</div><div class='del'>-		parms.pm_port = 0;		/* not needed or used */</div><div class='del'>-		if (CLNT_CALL(client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap, (caddr_t)&amp;parms,</div><div class='del'>-					  (xdrproc_t)xdr_u_short, (caddr_t)&amp;port, tottimeout) != RPC_SUCCESS) {</div><div class='del'>-			rpc_createerr.cf_stat = RPC_PMAPFAILURE;</div><div class='del'>-			clnt_geterr(client, &amp;rpc_createerr.cf_error);</div><div class='del'>-		} else if (port == 0) {</div><div class='del'>-			rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;</div><div class='del'>-		}</div><div class='del'>-		CLNT_DESTROY(client);</div><div class='del'>-	}</div><div class='del'>-	(void) close(socket);</div><div class='del'>-	address-&gt;sin_port = 0;</div><div class='del'>-	return (port);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_prot.c b/mdk-stage1/dietlibc/librpc/pmap_prot.c<br/>deleted file mode 100644<br/>index ec8b5af79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_prot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_prot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,58 +0,0 @@</div><div class='del'>-/* @(#)pmap_prot.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_prot.c</div><div class='del'>- * Protocol for the local binder service, or pmap.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-bool_t xdr_pmap(xdrs, regs)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-struct pmap *regs;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (xdr_u_long(xdrs, &amp;regs-&gt;pm_prog) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;regs-&gt;pm_vers) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;regs-&gt;pm_prot))</div><div class='del'>-			return (xdr_u_long(xdrs, &amp;regs-&gt;pm_port));</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_prot2.c b/mdk-stage1/dietlibc/librpc/pmap_prot2.c<br/>deleted file mode 100644<br/>index 870c844ed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_prot2.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_prot2.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,116 +0,0 @@</div><div class='del'>-/* @(#)pmap_prot2.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_prot2.c</div><div class='del'>- * Protocol for the local binder service, or pmap.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * What is going on with linked lists? (!)</div><div class='del'>- * First recall the link list declaration from pmap_prot.h:</div><div class='del'>- *</div><div class='del'>- * struct pmaplist {</div><div class='del'>- *	struct pmap pml_map;</div><div class='del'>- *	struct pmaplist *pml_map;</div><div class='del'>- * };</div><div class='del'>- *</div><div class='del'>- * Compare that declaration with a corresponding xdr declaration that </div><div class='del'>- * is (a) pointer-less, and (b) recursive:</div><div class='del'>- *</div><div class='del'>- * typedef union switch (bool_t) {</div><div class='del'>- * </div><div class='del'>- *	case TRUE: struct {</div><div class='del'>- *		struct pmap;</div><div class='del'>- * 		pmaplist_t foo;</div><div class='del'>- *	};</div><div class='del'>- *</div><div class='del'>- *	case FALSE: struct {};</div><div class='del'>- * } pmaplist_t;</div><div class='del'>- *</div><div class='del'>- * Notice that the xdr declaration has no nxt pointer while</div><div class='del'>- * the C declaration has no bool_t variable.  The bool_t can be</div><div class='del'>- * interpreted as ``more data follows me''; if FALSE then nothing</div><div class='del'>- * follows this bool_t; if TRUE then the bool_t is followed by</div><div class='del'>- * an actual struct pmap, and then (recursively) by the </div><div class='del'>- * xdr union, pamplist_t.  </div><div class='del'>- *</div><div class='del'>- * This could be implemented via the xdr_union primitive, though this</div><div class='del'>- * would cause a one recursive call per element in the list.  Rather than do</div><div class='del'>- * that we can ``unwind'' the recursion</div><div class='del'>- * into a while loop and do the union arms in-place.</div><div class='del'>- *</div><div class='del'>- * The head of the list is what the C programmer wishes to past around</div><div class='del'>- * the net, yet is the data that the pointer points to which is interesting;</div><div class='del'>- * this sounds like a job for xdr_reference!</div><div class='del'>- */</div><div class='del'>-bool_t xdr_pmaplist(XDR* xdrs, struct pmaplist** rp)</div><div class='del'>-{</div><div class='del'>-	/*</div><div class='del'>-	 * more_elements is pre-computed in case the direction is</div><div class='del'>-	 * XDR_ENCODE or XDR_FREE.  more_elements is overwritten by</div><div class='del'>-	 * xdr_bool when the direction is XDR_DECODE.</div><div class='del'>-	 */</div><div class='del'>-	bool_t more_elements;</div><div class='del'>-	register int freeing = (xdrs-&gt;x_op == XDR_FREE);</div><div class='del'>-	register struct pmaplist **next=0;</div><div class='del'>-</div><div class='del'>-	while (TRUE) {</div><div class='del'>-		more_elements = (bool_t) (*rp != NULL);</div><div class='del'>-		if (!xdr_bool(xdrs, &amp;more_elements))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		if (!more_elements)</div><div class='del'>-			return (TRUE);		/* we are done */</div><div class='del'>-		/*</div><div class='del'>-		 * the unfortunate side effect of non-recursion is that in</div><div class='del'>-		 * the case of freeing we must remember the next object</div><div class='del'>-		 * before we free the current object ...</div><div class='del'>-		 */</div><div class='del'>-		if (freeing)</div><div class='del'>-			next = &amp;((*rp)-&gt;pml_next);</div><div class='del'>-		if (!xdr_reference(xdrs, (caddr_t *) rp,</div><div class='del'>-						   (u_int) sizeof(struct pmaplist), (xdrproc_t)xdr_pmap))</div><div class='del'>-			return (FALSE);</div><div class='del'>-</div><div class='del'>-		rp = (freeing) ? next : &amp;((*rp)-&gt;pml_next);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/pmap_rmt.c b/mdk-stage1/dietlibc/librpc/pmap_rmt.c<br/>deleted file mode 100644<br/>index 02efcf91c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/pmap_rmt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/pmap_rmt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,403 +0,0 @@</div><div class='del'>-/* @(#)pmap_rmt.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmap_rmt.c</div><div class='del'>- * Client interface to pmap rpc service.</div><div class='del'>- * remote call and broadcast service</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_rmt.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-//#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#define MAX_BROADCAST_SIZE 1400</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-static struct timeval timeout = { 3, 0 };</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * pmapper remote-call-service interface.</div><div class='del'>- * This routine is used to call the pmapper remote call service</div><div class='del'>- * which will look up a service program in the port maps, and then</div><div class='del'>- * remotely call that routine with the given parameters.  This allows</div><div class='del'>- * programs to do a lookup and call in one step.</div><div class='del'>-*/</div><div class='del'>-enum clnt_stat</div><div class='del'>-pmap_rmtcall(addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout,</div><div class='del'>-			 port_ptr)</div><div class='del'>-struct sockaddr_in *addr;</div><div class='del'>-u_long prog, vers, proc;</div><div class='del'>-xdrproc_t xdrargs, xdrres;</div><div class='del'>-caddr_t argsp, resp;</div><div class='del'>-struct timeval tout;</div><div class='del'>-u_long *port_ptr;</div><div class='del'>-{</div><div class='del'>-	int socket = -1;</div><div class='del'>-	register CLIENT *client;</div><div class='del'>-	struct rmtcallargs a;</div><div class='del'>-	struct rmtcallres r;</div><div class='del'>-	enum clnt_stat stat;</div><div class='del'>-</div><div class='del'>-	addr-&gt;sin_port = htons(PMAPPORT);</div><div class='del'>-	client = clntudp_create(addr, PMAPPROG, PMAPVERS, timeout, &amp;socket);</div><div class='del'>-	if (client != (CLIENT *) NULL) {</div><div class='del'>-		a.prog = prog;</div><div class='del'>-		a.vers = vers;</div><div class='del'>-		a.proc = proc;</div><div class='del'>-		a.args_ptr = argsp;</div><div class='del'>-		a.xdr_args = xdrargs;</div><div class='del'>-		r.port_ptr = port_ptr;</div><div class='del'>-		r.results_ptr = resp;</div><div class='del'>-		r.xdr_results = xdrres;</div><div class='del'>-		stat = CLNT_CALL(client, PMAPPROC_CALLIT, (xdrproc_t)xdr_rmtcall_args, (caddr_t)&amp;a,</div><div class='del'>-						 (xdrproc_t)xdr_rmtcallres, (caddr_t)&amp;r, tout);</div><div class='del'>-		CLNT_DESTROY(client);</div><div class='del'>-	} else {</div><div class='del'>-		stat = RPC_FAILED;</div><div class='del'>-	}</div><div class='del'>-	(void) close(socket);</div><div class='del'>-	addr-&gt;sin_port = 0;</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR remote call arguments</div><div class='del'>- * written for XDR_ENCODE direction only</div><div class='del'>- */</div><div class='del'>-bool_t xdr_rmtcall_args(XDR* xdrs, struct rmtcallargs* cap)</div><div class='del'>-{</div><div class='del'>-	u_int lenposition, argposition, position;</div><div class='del'>-</div><div class='del'>-	if (xdr_u_long(xdrs, &amp;(cap-&gt;prog)) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cap-&gt;vers)) &amp;&amp; xdr_u_long(xdrs, &amp;(cap-&gt;proc))) {</div><div class='del'>-		lenposition = XDR_GETPOS(xdrs);</div><div class='del'>-		if (!xdr_u_long(xdrs, &amp;(cap-&gt;arglen)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		argposition = XDR_GETPOS(xdrs);</div><div class='del'>-		if (!(*(cap-&gt;xdr_args)) (xdrs, cap-&gt;args_ptr))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		position = XDR_GETPOS(xdrs);</div><div class='del'>-		cap-&gt;arglen = (u_long) position - (u_long) argposition;</div><div class='del'>-		XDR_SETPOS(xdrs, lenposition);</div><div class='del'>-		if (!xdr_u_long(xdrs, &amp;(cap-&gt;arglen)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		XDR_SETPOS(xdrs, position);</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR remote call results</div><div class='del'>- * written for XDR_DECODE direction only</div><div class='del'>- */</div><div class='del'>-bool_t xdr_rmtcallres(XDR* xdrs, struct rmtcallres* crp)</div><div class='del'>-{</div><div class='del'>-	caddr_t port_ptr;</div><div class='del'>-</div><div class='del'>-	port_ptr = (caddr_t) crp-&gt;port_ptr;</div><div class='del'>-	if (xdr_reference(xdrs, &amp;port_ptr, sizeof(u_long),</div><div class='del'>-					  (xdrproc_t)xdr_u_long) &amp;&amp; xdr_u_long(xdrs, &amp;crp-&gt;resultslen)) {</div><div class='del'>-		crp-&gt;port_ptr = (u_long *) port_ptr;</div><div class='del'>-		return ((*(crp-&gt;xdr_results)) (xdrs, crp-&gt;results_ptr));</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following is kludged-up support for simple rpc broadcasts.</div><div class='del'>- * Someday a large, complicated system will replace these trivial </div><div class='del'>- * routines which only support udp/ip .</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int getbroadcastnets(addrs, sock, buf)</div><div class='del'>-struct in_addr *addrs;</div><div class='del'>-int sock;						/* any valid socket will do */</div><div class='del'>-char *buf;						/* why allocxate more when we can use existing... */</div><div class='del'>-{</div><div class='del'>-#ifdef __linux__</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-</div><div class='del'>-	get_myaddress(&amp;addr);</div><div class='del'>-#if 1</div><div class='del'>-	printf("%s(%d): no inet_makeaddr()\n", __FILE__, __LINE__);</div><div class='del'>-#else</div><div class='del'>-	addrs[0] = inet_makeaddr(inet_netof(addr.sin_addr), INADDR_ANY);</div><div class='del'>-#endif</div><div class='del'>-	return 1;</div><div class='del'>-#else</div><div class='del'>-	struct ifconf ifc;</div><div class='del'>-	struct ifreq ifreq, *ifr;</div><div class='del'>-	struct sockaddr_in *sin;</div><div class='del'>-	int n, i;</div><div class='del'>-</div><div class='del'>-	ifc.ifc_len = UDPMSGSIZE;</div><div class='del'>-	ifc.ifc_buf = buf;</div><div class='del'>-	if (ioctl(sock, SIOCGIFCONF, (char *) &amp;ifc) &lt; 0) {</div><div class='del'>-		perror("broadcast: ioctl (get interface configuration)");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	ifr = ifc.ifc_req;</div><div class='del'>-	for (i = 0, n = ifc.ifc_len / sizeof(struct ifreq); n &gt; 0; n--, ifr++) {</div><div class='del'>-		ifreq = *ifr;</div><div class='del'>-		if (ioctl(sock, SIOCGIFFLAGS, (char *) &amp;ifreq) &lt; 0) {</div><div class='del'>-			perror("broadcast: ioctl (get interface flags)");</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		if ((ifreq.ifr_flags &amp; IFF_BROADCAST) &amp;&amp;</div><div class='del'>-			(ifreq.ifr_flags &amp; IFF_UP) &amp;&amp;</div><div class='del'>-			ifr-&gt;ifr_addr.sa_family == AF_INET) {</div><div class='del'>-			sin = (struct sockaddr_in *) &amp;ifr-&gt;ifr_addr;</div><div class='del'>-#ifdef SIOCGIFBRDADDR			/* 4.3BSD */</div><div class='del'>-			if (ioctl(sock, SIOCGIFBRDADDR, (char *) &amp;ifreq) &lt; 0) {</div><div class='del'>-#if 1</div><div class='del'>-				printf("%s(%d): no inet_makeaddr()\n", __FILE__, __LINE__);</div><div class='del'>-#else</div><div class='del'>-				addrs[i++] = inet_makeaddr(inet_netof</div><div class='del'>-										   (sin-&gt;sin_addr.s_addr),</div><div class='del'>-										   INADDR_ANY);</div><div class='del'>-#endif</div><div class='del'>-			} else {</div><div class='del'>-				addrs[i++] = ((struct sockaddr_in *)</div><div class='del'>-							  &amp;ifreq.ifr_addr)-&gt;sin_addr;</div><div class='del'>-			}</div><div class='del'>-#else							/* 4.2 BSD */</div><div class='del'>-#if 1</div><div class='del'>-			printf("%s(%d): no inet_makeaddr()\n", __FILE__, __LINE__);</div><div class='del'>-#else</div><div class='del'>-			addrs[i++] = inet_makeaddr(inet_netof</div><div class='del'>-									   (sin-&gt;sin_addr.s_addr), INADDR_ANY);</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (i);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum clnt_stat</div><div class='del'>-clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp,</div><div class='del'>-			   eachresult)</div><div class='del'>-u_long prog;					/* program number */</div><div class='del'>-u_long vers;					/* version number */</div><div class='del'>-u_long proc;					/* procedure number */</div><div class='del'>-xdrproc_t xargs;				/* xdr routine for args */</div><div class='del'>-caddr_t argsp;					/* pointer to args */</div><div class='del'>-xdrproc_t xresults;				/* xdr routine for results */</div><div class='del'>-caddr_t resultsp;				/* pointer to results */</div><div class='del'>-resultproc_t eachresult;		/* call with each result obtained */</div><div class='del'>-{</div><div class='del'>-	enum clnt_stat stat;</div><div class='del'>-	AUTH *unix_auth = authunix_create_default();</div><div class='del'>-	XDR xdr_stream;</div><div class='del'>-	register XDR *xdrs = &amp;xdr_stream;</div><div class='del'>-	int outlen, inlen, fromlen, nets;</div><div class='del'>-	register int sock;</div><div class='del'>-	int on = 1;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set mask;</div><div class='del'>-	fd_set readfds;</div><div class='del'>-#else</div><div class='del'>-	int readfds;</div><div class='del'>-	register int mask;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	register int i;</div><div class='del'>-	bool_t done = FALSE;</div><div class='del'>-	register u_long xid;</div><div class='del'>-	u_long port;</div><div class='del'>-	struct in_addr addrs[20];</div><div class='del'>-	struct sockaddr_in baddr, raddr;	/* broadcast and response addresses */</div><div class='del'>-	struct rmtcallargs a;</div><div class='del'>-	struct rmtcallres r;</div><div class='del'>-	struct rpc_msg msg;</div><div class='del'>-	struct timeval t;</div><div class='del'>-	char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * initialization: create a socket, a broadcast address, and</div><div class='del'>-	 * preserialize the arguments into a send buffer.</div><div class='del'>-	 */</div><div class='del'>-	if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) &lt; 0) {</div><div class='del'>-		perror("Cannot create socket for broadcast rpc");</div><div class='del'>-		stat = RPC_CANTSEND;</div><div class='del'>-		goto done_broad;</div><div class='del'>-	}</div><div class='del'>-#ifdef SO_BROADCAST</div><div class='del'>-	if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &amp;on, sizeof(on)) &lt; 0) {</div><div class='del'>-		perror("Cannot set socket option SO_BROADCAST");</div><div class='del'>-		stat = RPC_CANTSEND;</div><div class='del'>-		goto done_broad;</div><div class='del'>-	}</div><div class='del'>-#endif							/* def SO_BROADCAST */</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	FD_ZERO(&amp;mask);</div><div class='del'>-	FD_SET(sock, &amp;mask);</div><div class='del'>-#else</div><div class='del'>-	mask = (1 &lt;&lt; sock);</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	nets = getbroadcastnets(addrs, sock, inbuf);</div><div class='del'>-	bzero((char *) &amp;baddr, sizeof(baddr));</div><div class='del'>-	baddr.sin_family = AF_INET;</div><div class='del'>-	baddr.sin_port = htons(PMAPPORT);</div><div class='del'>-	baddr.sin_addr.s_addr = htonl(INADDR_ANY);</div><div class='del'>-/*	baddr.sin_addr.S_un.S_addr = htonl(INADDR_ANY); */</div><div class='del'>-	(void) gettimeofday(&amp;t, (struct timezone *) 0);</div><div class='del'>-	msg.rm_xid = xid = getpid() ^ t.tv_sec ^ t.tv_usec;</div><div class='del'>-	t.tv_usec = 0;</div><div class='del'>-	msg.rm_direction = CALL;</div><div class='del'>-	msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;</div><div class='del'>-	msg.rm_call.cb_prog = PMAPPROG;</div><div class='del'>-	msg.rm_call.cb_vers = PMAPVERS;</div><div class='del'>-	msg.rm_call.cb_proc = PMAPPROC_CALLIT;</div><div class='del'>-	msg.rm_call.cb_cred = unix_auth-&gt;ah_cred;</div><div class='del'>-	msg.rm_call.cb_verf = unix_auth-&gt;ah_verf;</div><div class='del'>-	a.prog = prog;</div><div class='del'>-	a.vers = vers;</div><div class='del'>-	a.proc = proc;</div><div class='del'>-	a.xdr_args = xargs;</div><div class='del'>-	a.args_ptr = argsp;</div><div class='del'>-	r.port_ptr = &amp;port;</div><div class='del'>-	r.xdr_results = xresults;</div><div class='del'>-	r.results_ptr = resultsp;</div><div class='del'>-	xdrmem_create(xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);</div><div class='del'>-	if ((!xdr_callmsg(xdrs, &amp;msg)) || (!xdr_rmtcall_args(xdrs, &amp;a))) {</div><div class='del'>-		stat = RPC_CANTENCODEARGS;</div><div class='del'>-		goto done_broad;</div><div class='del'>-	}</div><div class='del'>-	outlen = (int) xdr_getpos(xdrs);</div><div class='del'>-	xdr_destroy(xdrs);</div><div class='del'>-	/*</div><div class='del'>-	 * Basic loop: broadcast a packet and wait a while for response(s).</div><div class='del'>-	 * The response timeout grows larger per iteration.</div><div class='del'>-	 */</div><div class='del'>-	for (t.tv_sec = 4; t.tv_sec &lt;= 14; t.tv_sec += 2) {</div><div class='del'>-		for (i = 0; i &lt; nets; i++) {</div><div class='del'>-			baddr.sin_addr = addrs[i];</div><div class='del'>-			if (sendto(sock, outbuf, outlen, 0,</div><div class='del'>-					   (struct sockaddr *) &amp;baddr,</div><div class='del'>-					   sizeof(struct sockaddr)) != outlen) {</div><div class='del'>-				perror("Cannot send broadcast packet");</div><div class='del'>-				stat = RPC_CANTSEND;</div><div class='del'>-				goto done_broad;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (eachresult == NULL) {</div><div class='del'>-			stat = RPC_SUCCESS;</div><div class='del'>-			goto done_broad;</div><div class='del'>-		}</div><div class='del'>-	  recv_again:</div><div class='del'>-		msg.acpted_rply.ar_verf = _null_auth;</div><div class='del'>-		msg.acpted_rply.ar_results.where = (caddr_t) &amp; r;</div><div class='del'>-		msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_rmtcallres;</div><div class='del'>-		readfds = mask;</div><div class='del'>-		switch (select(_rpc_dtablesize(), &amp;readfds, 0, 0, &amp;t)) {</div><div class='del'>-</div><div class='del'>-		case 0:				/* timed out */</div><div class='del'>-			stat = RPC_TIMEDOUT;</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		case -1:				/* some kind of error */</div><div class='del'>-			if (errno == EINTR)</div><div class='del'>-				goto recv_again;</div><div class='del'>-			perror("Broadcast select problem");</div><div class='del'>-			stat = RPC_CANTRECV;</div><div class='del'>-			goto done_broad;</div><div class='del'>-</div><div class='del'>-		}						/* end of select results switch */</div><div class='del'>-	  try_again:</div><div class='del'>-		fromlen = sizeof(struct sockaddr);</div><div class='del'>-</div><div class='del'>-		inlen = recvfrom(sock, inbuf, UDPMSGSIZE, 0,</div><div class='del'>-						 (struct sockaddr *) &amp;raddr, &amp;fromlen);</div><div class='del'>-		if (inlen &lt; 0) {</div><div class='del'>-			if (errno == EINTR)</div><div class='del'>-				goto try_again;</div><div class='del'>-			perror("Cannot receive reply to broadcast");</div><div class='del'>-			stat = RPC_CANTRECV;</div><div class='del'>-			goto done_broad;</div><div class='del'>-		}</div><div class='del'>-		if (inlen &lt; sizeof(u_long))</div><div class='del'>-			goto recv_again;</div><div class='del'>-		/*</div><div class='del'>-		 * see if reply transaction id matches sent id.</div><div class='del'>-		 * If so, decode the results.</div><div class='del'>-		 */</div><div class='del'>-		xdrmem_create(xdrs, inbuf, (u_int) inlen, XDR_DECODE);</div><div class='del'>-		if (xdr_replymsg(xdrs, &amp;msg)) {</div><div class='del'>-			if ((msg.rm_xid == xid) &amp;&amp;</div><div class='del'>-				(msg.rm_reply.rp_stat == MSG_ACCEPTED) &amp;&amp;</div><div class='del'>-				(msg.acpted_rply.ar_stat == SUCCESS)) {</div><div class='del'>-				raddr.sin_port = htons((u_short) port);</div><div class='del'>-				done = (*eachresult) (resultsp, &amp;raddr);</div><div class='del'>-			}</div><div class='del'>-			/* otherwise, we just ignore the errors ... */</div><div class='del'>-		} else {</div><div class='del'>-#ifdef notdef</div><div class='del'>-			/* some kind of deserialization problem ... */</div><div class='del'>-			if (msg.rm_xid == xid)</div><div class='del'>-				fprintf(stderr, "Broadcast deserialization problem");</div><div class='del'>-			/* otherwise, just random garbage */</div><div class='del'>-#endif</div><div class='del'>-		}</div><div class='del'>-		xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-		msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;</div><div class='del'>-		(void) xdr_replymsg(xdrs, &amp;msg);</div><div class='del'>-		(void) (*xresults) (xdrs, resultsp);</div><div class='del'>-		xdr_destroy(xdrs);</div><div class='del'>-		if (done) {</div><div class='del'>-			stat = RPC_SUCCESS;</div><div class='del'>-			goto done_broad;</div><div class='del'>-		} else {</div><div class='del'>-			goto recv_again;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-  done_broad:</div><div class='del'>-	(void) close(sock);</div><div class='del'>-	AUTH_DESTROY(unix_auth);</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/rpc_callmsg.c b/mdk-stage1/dietlibc/librpc/rpc_callmsg.c<br/>deleted file mode 100644<br/>index 4b3a9880e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/rpc_callmsg.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/rpc_callmsg.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,189 +0,0 @@</div><div class='del'>-/* @(#)rpc_callmsg.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * rpc_callmsg.c</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR a call message</div><div class='del'>- */</div><div class='del'>-bool_t xdr_callmsg(xdrs, cmsg)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct rpc_msg *cmsg;</div><div class='del'>-{</div><div class='del'>-	register int32_t *buf;</div><div class='del'>-	register struct opaque_auth *oa;</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_ENCODE) {</div><div class='del'>-		if (cmsg-&gt;rm_call.cb_cred.oa_length &gt; MAX_AUTH_BYTES) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		if (cmsg-&gt;rm_call.cb_verf.oa_length &gt; MAX_AUTH_BYTES) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT</div><div class='del'>-						 + RNDUP(cmsg-&gt;rm_call.cb_cred.oa_length)</div><div class='del'>-						 + 2 * BYTES_PER_XDR_UNIT</div><div class='del'>-						 + RNDUP(cmsg-&gt;rm_call.cb_verf.oa_length));</div><div class='del'>-		if (buf != NULL) {</div><div class='del'>-			IXDR_PUT_LONG(buf, cmsg-&gt;rm_xid);</div><div class='del'>-			IXDR_PUT_ENUM(buf, cmsg-&gt;rm_direction);</div><div class='del'>-			if (cmsg-&gt;rm_direction != CALL) {</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			IXDR_PUT_LONG(buf, cmsg-&gt;rm_call.cb_rpcvers);</div><div class='del'>-			if (cmsg-&gt;rm_call.cb_rpcvers != RPC_MSG_VERSION) {</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			IXDR_PUT_LONG(buf, cmsg-&gt;rm_call.cb_prog);</div><div class='del'>-			IXDR_PUT_LONG(buf, cmsg-&gt;rm_call.cb_vers);</div><div class='del'>-			IXDR_PUT_LONG(buf, cmsg-&gt;rm_call.cb_proc);</div><div class='del'>-			oa = &amp;cmsg-&gt;rm_call.cb_cred;</div><div class='del'>-			IXDR_PUT_ENUM(buf, oa-&gt;oa_flavor);</div><div class='del'>-			IXDR_PUT_LONG(buf, oa-&gt;oa_length);</div><div class='del'>-			if (oa-&gt;oa_length) {</div><div class='del'>-				bcopy(oa-&gt;oa_base, (caddr_t) buf, oa-&gt;oa_length);</div><div class='del'>-				buf += RNDUP(oa-&gt;oa_length) / sizeof(long);</div><div class='del'>-			}</div><div class='del'>-			oa = &amp;cmsg-&gt;rm_call.cb_verf;</div><div class='del'>-			IXDR_PUT_ENUM(buf, oa-&gt;oa_flavor);</div><div class='del'>-			IXDR_PUT_LONG(buf, oa-&gt;oa_length);</div><div class='del'>-			if (oa-&gt;oa_length) {</div><div class='del'>-				bcopy(oa-&gt;oa_base, (caddr_t) buf, oa-&gt;oa_length);</div><div class='del'>-				/* no real need....</div><div class='del'>-				   buf += RNDUP(oa-&gt;oa_length) / sizeof (long);</div><div class='del'>-				 */</div><div class='del'>-			}</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_DECODE) {</div><div class='del'>-		buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT);</div><div class='del'>-		if (buf != NULL) {</div><div class='del'>-			cmsg-&gt;rm_xid = IXDR_GET_LONG(buf);</div><div class='del'>-			cmsg-&gt;rm_direction = IXDR_GET_ENUM(buf, enum msg_type);</div><div class='del'>-</div><div class='del'>-			if (cmsg-&gt;rm_direction != CALL) {</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			cmsg-&gt;rm_call.cb_rpcvers = IXDR_GET_LONG(buf);</div><div class='del'>-			if (cmsg-&gt;rm_call.cb_rpcvers != RPC_MSG_VERSION) {</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			cmsg-&gt;rm_call.cb_prog = IXDR_GET_LONG(buf);</div><div class='del'>-			cmsg-&gt;rm_call.cb_vers = IXDR_GET_LONG(buf);</div><div class='del'>-			cmsg-&gt;rm_call.cb_proc = IXDR_GET_LONG(buf);</div><div class='del'>-			oa = &amp;cmsg-&gt;rm_call.cb_cred;</div><div class='del'>-			oa-&gt;oa_flavor = IXDR_GET_ENUM(buf, enum_t);</div><div class='del'>-			oa-&gt;oa_length = IXDR_GET_LONG(buf);</div><div class='del'>-			if (oa-&gt;oa_length) {</div><div class='del'>-				if (oa-&gt;oa_length &gt; MAX_AUTH_BYTES) {</div><div class='del'>-					return (FALSE);</div><div class='del'>-				}</div><div class='del'>-				if (oa-&gt;oa_base == NULL) {</div><div class='del'>-					oa-&gt;oa_base = (caddr_t)</div><div class='del'>-						mem_alloc(oa-&gt;oa_length);</div><div class='del'>-				}</div><div class='del'>-				buf = XDR_INLINE(xdrs, RNDUP(oa-&gt;oa_length));</div><div class='del'>-				if (buf == NULL) {</div><div class='del'>-					if (xdr_opaque(xdrs, oa-&gt;oa_base,</div><div class='del'>-								   oa-&gt;oa_length) == FALSE) {</div><div class='del'>-						return (FALSE);</div><div class='del'>-					}</div><div class='del'>-				} else {</div><div class='del'>-					bcopy((caddr_t) buf, oa-&gt;oa_base, oa-&gt;oa_length);</div><div class='del'>-					/* no real need....</div><div class='del'>-					   buf += RNDUP(oa-&gt;oa_length) /</div><div class='del'>-					   sizeof (long);</div><div class='del'>-					 */</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			oa = &amp;cmsg-&gt;rm_call.cb_verf;</div><div class='del'>-			buf = XDR_INLINE(xdrs, 2 * BYTES_PER_XDR_UNIT);</div><div class='del'>-			if (buf == NULL) {</div><div class='del'>-				if (xdr_enum(xdrs, &amp;oa-&gt;oa_flavor) == FALSE ||</div><div class='del'>-					xdr_u_int(xdrs, &amp;oa-&gt;oa_length) == FALSE) {</div><div class='del'>-					return (FALSE);</div><div class='del'>-				}</div><div class='del'>-			} else {</div><div class='del'>-				oa-&gt;oa_flavor = IXDR_GET_ENUM(buf, enum_t);</div><div class='del'>-				oa-&gt;oa_length = IXDR_GET_LONG(buf);</div><div class='del'>-			}</div><div class='del'>-			if (oa-&gt;oa_length) {</div><div class='del'>-				if (oa-&gt;oa_length &gt; MAX_AUTH_BYTES) {</div><div class='del'>-					return (FALSE);</div><div class='del'>-				}</div><div class='del'>-				if (oa-&gt;oa_base == NULL) {</div><div class='del'>-					oa-&gt;oa_base = (caddr_t)</div><div class='del'>-						mem_alloc(oa-&gt;oa_length);</div><div class='del'>-				}</div><div class='del'>-				buf = XDR_INLINE(xdrs, RNDUP(oa-&gt;oa_length));</div><div class='del'>-				if (buf == NULL) {</div><div class='del'>-					if (xdr_opaque(xdrs, oa-&gt;oa_base,</div><div class='del'>-								   oa-&gt;oa_length) == FALSE) {</div><div class='del'>-						return (FALSE);</div><div class='del'>-					}</div><div class='del'>-				} else {</div><div class='del'>-					bcopy((caddr_t) buf, oa-&gt;oa_base, oa-&gt;oa_length);</div><div class='del'>-					/* no real need...</div><div class='del'>-					   buf += RNDUP(oa-&gt;oa_length) /</div><div class='del'>-					   sizeof (long);</div><div class='del'>-					 */</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_xid)) &amp;&amp;</div><div class='del'>-		xdr_enum(xdrs, (enum_t *) &amp; (cmsg-&gt;rm_direction)) &amp;&amp;</div><div class='del'>-		(cmsg-&gt;rm_direction == CALL) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_rpcvers)) &amp;&amp;</div><div class='del'>-		(cmsg-&gt;rm_call.cb_rpcvers == RPC_MSG_VERSION) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_prog)) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_vers)) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_proc)) &amp;&amp;</div><div class='del'>-		xdr_opaque_auth(xdrs, &amp;(cmsg-&gt;rm_call.cb_cred)))</div><div class='del'>-			return (xdr_opaque_auth(xdrs, &amp;(cmsg-&gt;rm_call.cb_verf)));</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/rpc_commondata.c b/mdk-stage1/dietlibc/librpc/rpc_commondata.c<br/>deleted file mode 100644<br/>index 39648d284..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/rpc_commondata.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/rpc_commondata.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>-/* @(#)rpc_commondata.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-/*</div><div class='del'>- * This file should only contain common data (global data) that is exported</div><div class='del'>- * by public interfaces </div><div class='del'>- */</div><div class='del'>-struct opaque_auth _null_auth;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-fd_set svc_fdset;</div><div class='del'>-#else</div><div class='del'>-int svc_fds;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-struct rpc_createerr rpc_createerr;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/rpc_dtablesize.c b/mdk-stage1/dietlibc/librpc/rpc_dtablesize.c<br/>deleted file mode 100644<br/>index b08ebaccd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/rpc_dtablesize.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/rpc_dtablesize.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,50 +0,0 @@</div><div class='del'>-/* @(#)rpc_dtablesize.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Cache the result of getdtablesize(), so we don't have to do an</div><div class='del'>- * expensive system call every time.</div><div class='del'>- */</div><div class='del'>-int _rpc_dtablesize()</div><div class='del'>-{</div><div class='del'>-	static int size;</div><div class='del'>-</div><div class='del'>-	if (size == 0) {</div><div class='del'>-		size = getdtablesize();</div><div class='del'>-	}</div><div class='del'>-	return (size);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/rpc_prot.c b/mdk-stage1/dietlibc/librpc/rpc_prot.c<br/>deleted file mode 100644<br/>index 19a4db27f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/rpc_prot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/rpc_prot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,281 +0,0 @@</div><div class='del'>-/* @(#)rpc_prot.c	2.3 88/08/07 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * rpc_prot.c</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * This set of routines implements the rpc message definition,</div><div class='del'>- * its serializer and some common rpc utility routines.</div><div class='del'>- * The routines are meant for various implementations of rpc -</div><div class='del'>- * they are NOT for the rpc client or rpc service implementations!</div><div class='del'>- * Because authentication stuff is easy and is part of rpc, the opaque</div><div class='del'>- * routines are also in this program.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */</div><div class='del'>-</div><div class='del'>-struct opaque_auth _null_auth;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR an opaque authentication struct</div><div class='del'>- * (see auth.h)</div><div class='del'>- */</div><div class='del'>-bool_t xdr_opaque_auth(xdrs, ap)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct opaque_auth *ap;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (xdr_enum(xdrs, &amp;(ap-&gt;oa_flavor)))</div><div class='del'>-		return (xdr_bytes(xdrs, &amp;ap-&gt;oa_base,</div><div class='del'>-						  &amp;ap-&gt;oa_length, MAX_AUTH_BYTES));</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR a DES block</div><div class='del'>- */</div><div class='del'>-bool_t xdr_des_block(xdrs, blkp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register des_block *blkp;</div><div class='del'>-{</div><div class='del'>-	return (xdr_opaque(xdrs, (caddr_t) blkp, sizeof(des_block)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR the MSG_ACCEPTED part of a reply message union</div><div class='del'>- */</div><div class='del'>-bool_t xdr_accepted_reply(xdrs, ar)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct accepted_reply *ar;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	/* personalized union, rather than calling xdr_union */</div><div class='del'>-	if (!xdr_opaque_auth(xdrs, &amp;(ar-&gt;ar_verf)))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	if (!xdr_enum(xdrs, (enum_t *) &amp; (ar-&gt;ar_stat)))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	switch (ar-&gt;ar_stat) {</div><div class='del'>-</div><div class='del'>-	case SUCCESS:</div><div class='del'>-		return ((*(ar-&gt;ar_results.proc)) (xdrs, ar-&gt;ar_results.where));</div><div class='del'>-</div><div class='del'>-	case PROG_MISMATCH:</div><div class='del'>-		if (!xdr_u_long(xdrs, &amp;(ar-&gt;ar_vers.low)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		return (xdr_u_long(xdrs, &amp;(ar-&gt;ar_vers.high)));</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);				/* TRUE =&gt; open ended set of problems */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR the MSG_DENIED part of a reply message union</div><div class='del'>- */</div><div class='del'>-bool_t xdr_rejected_reply(xdrs, rr)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct rejected_reply *rr;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	/* personalized union, rather than calling xdr_union */</div><div class='del'>-	if (!xdr_enum(xdrs, (enum_t *) &amp; (rr-&gt;rj_stat)))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	switch (rr-&gt;rj_stat) {</div><div class='del'>-</div><div class='del'>-	case RPC_MISMATCH:</div><div class='del'>-		if (!xdr_u_long(xdrs, &amp;(rr-&gt;rj_vers.low)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		return (xdr_u_long(xdrs, &amp;(rr-&gt;rj_vers.high)));</div><div class='del'>-</div><div class='del'>-	case AUTH_ERROR:</div><div class='del'>-		return (xdr_enum(xdrs, (enum_t *) &amp; (rr-&gt;rj_why)));</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct xdr_discrim reply_dscrm[3] = {</div><div class='del'>-	{(int) MSG_ACCEPTED, (xdrproc_t)xdr_accepted_reply},</div><div class='del'>-	{(int) MSG_DENIED, (xdrproc_t)xdr_rejected_reply},</div><div class='del'>-	{__dontcare__, NULL_xdrproc_t}</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR a reply message</div><div class='del'>- */</div><div class='del'>-bool_t xdr_replymsg(xdrs, rmsg)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct rpc_msg *rmsg;</div><div class='del'>-{</div><div class='del'>-	if (xdr_u_long(xdrs, &amp;(rmsg-&gt;rm_xid)) &amp;&amp;</div><div class='del'>-		xdr_enum(xdrs, (enum_t *) &amp; (rmsg-&gt;rm_direction)) &amp;&amp;</div><div class='del'>-		(rmsg-&gt;rm_direction == REPLY))</div><div class='del'>-		return (xdr_union(xdrs, (enum_t *) &amp; (rmsg-&gt;rm_reply.rp_stat),</div><div class='del'>-						  (caddr_t) &amp; (rmsg-&gt;rm_reply.ru), reply_dscrm,</div><div class='del'>-						  NULL_xdrproc_t));</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Serializes the "static part" of a call message header.</div><div class='del'>- * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.</div><div class='del'>- * The rm_xid is not really static, but the user can easily munge on the fly.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_callhdr(xdrs, cmsg)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register struct rpc_msg *cmsg;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	cmsg-&gt;rm_direction = CALL;</div><div class='del'>-	cmsg-&gt;rm_call.cb_rpcvers = RPC_MSG_VERSION;</div><div class='del'>-	if (</div><div class='del'>-		(xdrs-&gt;x_op == XDR_ENCODE) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_xid)) &amp;&amp;</div><div class='del'>-		xdr_enum(xdrs, (enum_t *) &amp; (cmsg-&gt;rm_direction)) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_rpcvers)) &amp;&amp;</div><div class='del'>-		xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_prog)))</div><div class='del'>-			return (xdr_u_long(xdrs, &amp;(cmsg-&gt;rm_call.cb_vers)));</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ************************** Client utility routine ************* */</div><div class='del'>-</div><div class='del'>-static void accepted(acpt_stat, error)</div><div class='del'>-register enum accept_stat acpt_stat;</div><div class='del'>-register struct rpc_err *error;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	switch (acpt_stat) {</div><div class='del'>-</div><div class='del'>-	case PROG_UNAVAIL:</div><div class='del'>-		error-&gt;re_status = RPC_PROGUNAVAIL;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case PROG_MISMATCH:</div><div class='del'>-		error-&gt;re_status = RPC_PROGVERSMISMATCH;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case PROC_UNAVAIL:</div><div class='del'>-		error-&gt;re_status = RPC_PROCUNAVAIL;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case GARBAGE_ARGS:</div><div class='del'>-		error-&gt;re_status = RPC_CANTDECODEARGS;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case SYSTEM_ERR:</div><div class='del'>-		error-&gt;re_status = RPC_SYSTEMERROR;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case SUCCESS:</div><div class='del'>-		error-&gt;re_status = RPC_SUCCESS;</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	/* something's wrong, but we don't know what ... */</div><div class='del'>-	error-&gt;re_status = RPC_FAILED;</div><div class='del'>-	error-&gt;re_lb.s1 = (long) MSG_ACCEPTED;</div><div class='del'>-	error-&gt;re_lb.s2 = (long) acpt_stat;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void rejected(rjct_stat, error)</div><div class='del'>-register enum reject_stat rjct_stat;</div><div class='del'>-register struct rpc_err *error;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	switch (rjct_stat) {</div><div class='del'>-</div><div class='del'>-	case RPC_VERSMISMATCH:</div><div class='del'>-		error-&gt;re_status = RPC_VERSMISMATCH;</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	case AUTH_ERROR:</div><div class='del'>-		error-&gt;re_status = RPC_AUTHERROR;</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	/* something's wrong, but we don't know what ... */</div><div class='del'>-	error-&gt;re_status = RPC_FAILED;</div><div class='del'>-	error-&gt;re_lb.s1 = (long) MSG_DENIED;</div><div class='del'>-	error-&gt;re_lb.s2 = (long) rjct_stat;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * given a reply message, fills in the error</div><div class='del'>- */</div><div class='del'>-void _seterr_reply(msg, error)</div><div class='del'>-register struct rpc_msg *msg;</div><div class='del'>-register struct rpc_err *error;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	/* optimized for normal, SUCCESSful case */</div><div class='del'>-	switch (msg-&gt;rm_reply.rp_stat) {</div><div class='del'>-</div><div class='del'>-	case MSG_ACCEPTED:</div><div class='del'>-		if (msg-&gt;acpted_rply.ar_stat == SUCCESS) {</div><div class='del'>-			error-&gt;re_status = RPC_SUCCESS;</div><div class='del'>-			return;</div><div class='del'>-		};</div><div class='del'>-		accepted(msg-&gt;acpted_rply.ar_stat, error);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case MSG_DENIED:</div><div class='del'>-		rejected(msg-&gt;rjcted_rply.rj_stat, error);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-		error-&gt;re_status = RPC_FAILED;</div><div class='del'>-		error-&gt;re_lb.s1 = (long) (msg-&gt;rm_reply.rp_stat);</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	switch (error-&gt;re_status) {</div><div class='del'>-</div><div class='del'>-	case RPC_VERSMISMATCH:</div><div class='del'>-		error-&gt;re_vers.low = msg-&gt;rjcted_rply.rj_vers.low;</div><div class='del'>-		error-&gt;re_vers.high = msg-&gt;rjcted_rply.rj_vers.high;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_AUTHERROR:</div><div class='del'>-		error-&gt;re_why = msg-&gt;rjcted_rply.rj_why;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case RPC_PROGVERSMISMATCH:</div><div class='del'>-		error-&gt;re_vers.low = msg-&gt;acpted_rply.ar_vers.low;</div><div class='del'>-		error-&gt;re_vers.high = msg-&gt;acpted_rply.ar_vers.high;</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc.c b/mdk-stage1/dietlibc/librpc/svc.c<br/>deleted file mode 100644<br/>index 4fcdb5216..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,479 +0,0 @@</div><div class='del'>-/* @(#)svc.c	2.4 88/08/11 4.0 RPCSRC; from 1.44 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)svc.c 1.41 87/10/13 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc.c, Server-side remote procedure call interface.</div><div class='del'>- *</div><div class='del'>- * There are two sets of procedures here.  The xprt routines are</div><div class='del'>- * for handling transport handles.  The svc routines handle the</div><div class='del'>- * list of service routines.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#ifdef __linux__</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-static SVCXPRT **xports;</div><div class='del'>-#else</div><div class='del'>-#define NOFILE 32</div><div class='del'>-</div><div class='del'>-static SVCXPRT *xports[NOFILE];</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-</div><div class='del'>-#define NULL_SVC ((struct svc_callout *)0)</div><div class='del'>-#define	RQCRED_SIZE	400			/* this size is excessive */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The services list</div><div class='del'>- * Each entry represents a set of procedures (an rpc program).</div><div class='del'>- * The dispatch routine takes request structs and runs the</div><div class='del'>- * apropriate procedure.</div><div class='del'>- */</div><div class='del'>-static struct svc_callout {</div><div class='del'>-	struct svc_callout *sc_next;</div><div class='del'>-	u_long sc_prog;</div><div class='del'>-	u_long sc_vers;</div><div class='del'>-	void (*sc_dispatch) ();</div><div class='del'>-} *svc_head;</div><div class='del'>-</div><div class='del'>-static struct svc_callout *svc_find();</div><div class='del'>-</div><div class='del'>-/* ***************  SVCXPRT related stuff **************** */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Activate a transport handle.</div><div class='del'>- */</div><div class='del'>-void xprt_register(xprt)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	register int sock = xprt-&gt;xp_sock;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	if (xports == NULL) {</div><div class='del'>-		xports = (SVCXPRT **)</div><div class='del'>-			mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *));</div><div class='del'>-	}</div><div class='del'>-	if (sock &lt; _rpc_dtablesize()) {</div><div class='del'>-		xports[sock] = xprt;</div><div class='del'>-		FD_SET(sock, &amp;svc_fdset);</div><div class='del'>-	}</div><div class='del'>-#else</div><div class='del'>-	if (sock &lt; NOFILE) {</div><div class='del'>-		xports[sock] = xprt;</div><div class='del'>-		svc_fds |= (1 &lt;&lt; sock);</div><div class='del'>-	}</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * De-activate a transport handle. </div><div class='del'>- */</div><div class='del'>-void xprt_unregister(xprt)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	register int sock = xprt-&gt;xp_sock;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	if ((sock &lt; _rpc_dtablesize()) &amp;&amp; (xports[sock] == xprt)) {</div><div class='del'>-		xports[sock] = (SVCXPRT *) 0;</div><div class='del'>-		FD_CLR(sock, &amp;svc_fdset);</div><div class='del'>-	}</div><div class='del'>-#else</div><div class='del'>-	if ((sock &lt; NOFILE) &amp;&amp; (xports[sock] == xprt)) {</div><div class='del'>-		xports[sock] = (SVCXPRT *) 0;</div><div class='del'>-		svc_fds &amp;= ~(1 &lt;&lt; sock);</div><div class='del'>-	}</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* ********************** CALLOUT list related stuff ************* */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Add a service program to the callout list.</div><div class='del'>- * The dispatch routine will be called when a rpc request for this</div><div class='del'>- * program number comes in.</div><div class='del'>- */</div><div class='del'>-bool_t svc_register(xprt, prog, vers, dispatch, protocol)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-u_long prog;</div><div class='del'>-u_long vers;</div><div class='del'>-void (*dispatch) ();</div><div class='del'>-rpcprot_t protocol;</div><div class='del'>-{</div><div class='del'>-	struct svc_callout *prev;</div><div class='del'>-	register struct svc_callout *s;</div><div class='del'>-</div><div class='del'>-	if ((s = svc_find(prog, vers, &amp;prev)) != NULL_SVC) {</div><div class='del'>-		if (s-&gt;sc_dispatch == dispatch)</div><div class='del'>-			goto pmap_it;		/* he is registering another xptr */</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	s = (struct svc_callout *) mem_alloc(sizeof(struct svc_callout));</div><div class='del'>-</div><div class='del'>-	if (s == (struct svc_callout *) 0) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	s-&gt;sc_prog = prog;</div><div class='del'>-	s-&gt;sc_vers = vers;</div><div class='del'>-	s-&gt;sc_dispatch = dispatch;</div><div class='del'>-	s-&gt;sc_next = svc_head;</div><div class='del'>-	svc_head = s;</div><div class='del'>-  pmap_it:</div><div class='del'>-	/* now register the information with the local binder service */</div><div class='del'>-	if (protocol) {</div><div class='del'>-		return (pmap_set(prog, vers, protocol, xprt-&gt;xp_port));</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Remove a service program from the callout list.</div><div class='del'>- */</div><div class='del'>-void svc_unregister(prog, vers)</div><div class='del'>-u_long prog;</div><div class='del'>-u_long vers;</div><div class='del'>-{</div><div class='del'>-	struct svc_callout *prev;</div><div class='del'>-	register struct svc_callout *s;</div><div class='del'>-</div><div class='del'>-	if ((s = svc_find(prog, vers, &amp;prev)) == NULL_SVC)</div><div class='del'>-		return;</div><div class='del'>-	if (prev == NULL_SVC) {</div><div class='del'>-		svc_head = s-&gt;sc_next;</div><div class='del'>-	} else {</div><div class='del'>-		prev-&gt;sc_next = s-&gt;sc_next;</div><div class='del'>-	}</div><div class='del'>-	s-&gt;sc_next = NULL_SVC;</div><div class='del'>-	mem_free((char *) s, (u_int) sizeof(struct svc_callout));</div><div class='del'>-</div><div class='del'>-	/* now unregister the information with the local binder service */</div><div class='del'>-	(void) pmap_unset(prog, vers);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Search the callout list for a program number, return the callout</div><div class='del'>- * struct.</div><div class='del'>- */</div><div class='del'>-static struct svc_callout *svc_find(prog, vers, prev)</div><div class='del'>-u_long prog;</div><div class='del'>-u_long vers;</div><div class='del'>-struct svc_callout **prev;</div><div class='del'>-{</div><div class='del'>-	register struct svc_callout *s, *p;</div><div class='del'>-</div><div class='del'>-	p = NULL_SVC;</div><div class='del'>-	for (s = svc_head; s != NULL_SVC; s = s-&gt;sc_next) {</div><div class='del'>-		if ((s-&gt;sc_prog == prog) &amp;&amp; (s-&gt;sc_vers == vers))</div><div class='del'>-			goto done;</div><div class='del'>-		p = s;</div><div class='del'>-	}</div><div class='del'>-  done:</div><div class='del'>-	*prev = p;</div><div class='del'>-	return (s);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ******************* REPLY GENERATION ROUTINES  ************ */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Send a reply to an rpc request</div><div class='del'>- */</div><div class='del'>-bool_t svc_sendreply(xprt, xdr_results, xdr_location)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_results;</div><div class='del'>-caddr_t xdr_location;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = SUCCESS;</div><div class='del'>-	rply.acpted_rply.ar_results.where = xdr_location;</div><div class='del'>-	rply.acpted_rply.ar_results.proc = xdr_results;</div><div class='del'>-	return (SVC_REPLY(xprt, &amp;rply));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * No procedure error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_noproc(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = PROC_UNAVAIL;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Can't decode args error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_decode(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = GARBAGE_ARGS;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Some system error</div><div class='del'>- */</div><div class='del'>-void svcerr_systemerr(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = SYSTEM_ERR;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Authentication error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_auth(xprt, why)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-enum auth_stat why;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_DENIED;</div><div class='del'>-	rply.rjcted_rply.rj_stat = AUTH_ERROR;</div><div class='del'>-	rply.rjcted_rply.rj_why = why;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Auth too weak error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_weakauth(xprt)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	svcerr_auth(xprt, AUTH_TOOWEAK);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Program unavailable error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_noprog(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = PROG_UNAVAIL;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Program version mismatch error reply</div><div class='del'>- */</div><div class='del'>-void svcerr_progvers(xprt, low_vers, high_vers)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-u_long low_vers;</div><div class='del'>-u_long high_vers;</div><div class='del'>-{</div><div class='del'>-	struct rpc_msg rply;</div><div class='del'>-</div><div class='del'>-	rply.rm_direction = REPLY;</div><div class='del'>-	rply.rm_reply.rp_stat = MSG_ACCEPTED;</div><div class='del'>-	rply.acpted_rply.ar_verf = xprt-&gt;xp_verf;</div><div class='del'>-	rply.acpted_rply.ar_stat = PROG_MISMATCH;</div><div class='del'>-	rply.acpted_rply.ar_vers.low = low_vers;</div><div class='del'>-	rply.acpted_rply.ar_vers.high = high_vers;</div><div class='del'>-	SVC_REPLY(xprt, &amp;rply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ******************* SERVER INPUT STUFF ******************* */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Get server side input from some transport.</div><div class='del'>- *</div><div class='del'>- * Statement of authentication parameters management:</div><div class='del'>- * This function owns and manages all authentication parameters, specifically</div><div class='del'>- * the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and</div><div class='del'>- * the "cooked" credentials (rqst-&gt;rq_clntcred).</div><div class='del'>- * However, this function does not know the structure of the cooked</div><div class='del'>- * credentials, so it make the following assumptions: </div><div class='del'>- *   a) the structure is contiguous (no pointers), and</div><div class='del'>- *   b) the cred structure size does not exceed RQCRED_SIZE bytes. </div><div class='del'>- * In all events, all three parameters are freed upon exit from this routine.</div><div class='del'>- * The storage is trivially management on the call stack in user land, but</div><div class='del'>- * is mallocated in kernel land.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void svc_getreq(rdfds)</div><div class='del'>-int rdfds;</div><div class='del'>-{</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set readfds;</div><div class='del'>-</div><div class='del'>-	FD_ZERO(&amp;readfds);</div><div class='del'>-/*#ifdef __linux__*/</div><div class='del'>-#if 0</div><div class='del'>-	readfds = rdfds;</div><div class='del'>-#else</div><div class='del'>-	readfds.fds_bits[0] = rdfds;</div><div class='del'>-#endif</div><div class='del'>-	svc_getreqset(&amp;readfds);</div><div class='del'>-#else</div><div class='del'>-	int readfds = rdfds &amp; svc_fds;</div><div class='del'>-</div><div class='del'>-	svc_getreqset(&amp;readfds);</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void svc_getreqset(readfds)</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-fd_set *readfds;</div><div class='del'>-{</div><div class='del'>-#else</div><div class='del'>-int *readfds;</div><div class='del'>-{</div><div class='del'>-	int readfds_local = *readfds;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	enum xprt_stat stat;</div><div class='del'>-	struct rpc_msg msg;</div><div class='del'>-	int prog_found;</div><div class='del'>-	u_long low_vers;</div><div class='del'>-	u_long high_vers;</div><div class='del'>-	struct svc_req r;</div><div class='del'>-	register SVCXPRT *xprt;</div><div class='del'>-	register u_long mask;</div><div class='del'>-	register int bit;</div><div class='del'>-	register u_long *maskp;</div><div class='del'>-	register int setsize;</div><div class='del'>-	register int sock;</div><div class='del'>-	char cred_area[2 * MAX_AUTH_BYTES + RQCRED_SIZE];</div><div class='del'>-</div><div class='del'>-	msg.rm_call.cb_cred.oa_base = cred_area;</div><div class='del'>-	msg.rm_call.cb_verf.oa_base = &amp;(cred_area[MAX_AUTH_BYTES]);</div><div class='del'>-	r.rq_clntcred = &amp;(cred_area[2 * MAX_AUTH_BYTES]);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	setsize = _rpc_dtablesize();</div><div class='del'>-#ifdef __linux__</div><div class='del'>-/*#define NFDBITS	32*/</div><div class='del'>-	maskp = (u_long *) readfds;</div><div class='del'>-#else</div><div class='del'>-	maskp = (u_long *) readfds-&gt;fds_bits;</div><div class='del'>-#endif</div><div class='del'>-	for (sock = 0; sock &lt; setsize; sock += NFDBITS) {</div><div class='del'>-		for (mask = *maskp++; (bit = ffs(mask)); mask ^= (1 &lt;&lt; (bit - 1))) {</div><div class='del'>-			/* sock has input waiting */</div><div class='del'>-			xprt = xports[sock + bit - 1];</div><div class='del'>-#else</div><div class='del'>-	for (sock = 0; readfds_local != 0; sock++, readfds_local &gt;&gt;= 1) {</div><div class='del'>-		if ((readfds_local &amp; 1) != 0) {</div><div class='del'>-			/* sock has input waiting */</div><div class='del'>-			xprt = xports[sock];</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-			/* now receive msgs from xprtprt (support batch calls) */</div><div class='del'>-			do {</div><div class='del'>-				if (SVC_RECV(xprt, &amp;msg)) {</div><div class='del'>-</div><div class='del'>-					/* now find the exported program and call it */</div><div class='del'>-					register struct svc_callout *s;</div><div class='del'>-					enum auth_stat why;</div><div class='del'>-</div><div class='del'>-					r.rq_xprt = xprt;</div><div class='del'>-					r.rq_prog = msg.rm_call.cb_prog;</div><div class='del'>-					r.rq_vers = msg.rm_call.cb_vers;</div><div class='del'>-					r.rq_proc = msg.rm_call.cb_proc;</div><div class='del'>-					r.rq_cred = msg.rm_call.cb_cred;</div><div class='del'>-					/* first authenticate the message */</div><div class='del'>-					if ((why = _authenticate(&amp;r, &amp;msg)) != AUTH_OK) {</div><div class='del'>-						svcerr_auth(xprt, why);</div><div class='del'>-						goto call_done;</div><div class='del'>-					}</div><div class='del'>-					/* now match message with a registered service */</div><div class='del'>-					prog_found = FALSE;</div><div class='del'>-					low_vers = 0 - 1;</div><div class='del'>-					high_vers = 0;</div><div class='del'>-					for (s = svc_head; s != NULL_SVC; s = s-&gt;sc_next) {</div><div class='del'>-						if (s-&gt;sc_prog == r.rq_prog) {</div><div class='del'>-							if (s-&gt;sc_vers == r.rq_vers) {</div><div class='del'>-								(*s-&gt;sc_dispatch) (&amp;r, xprt);</div><div class='del'>-								goto call_done;</div><div class='del'>-							}	/* found correct version */</div><div class='del'>-							prog_found = TRUE;</div><div class='del'>-							if (s-&gt;sc_vers &lt; low_vers)</div><div class='del'>-								low_vers = s-&gt;sc_vers;</div><div class='del'>-							if (s-&gt;sc_vers &gt; high_vers)</div><div class='del'>-								high_vers = s-&gt;sc_vers;</div><div class='del'>-						}		/* found correct program */</div><div class='del'>-					}</div><div class='del'>-					/*</div><div class='del'>-					 * if we got here, the program or version</div><div class='del'>-					 * is not served ...</div><div class='del'>-					 */</div><div class='del'>-					if (prog_found)</div><div class='del'>-						svcerr_progvers(xprt, low_vers, high_vers);</div><div class='del'>-					else</div><div class='del'>-						svcerr_noprog(xprt);</div><div class='del'>-					/* Fall through to ... */</div><div class='del'>-				}</div><div class='del'>-			  call_done:</div><div class='del'>-				if ((stat = SVC_STAT(xprt)) == XPRT_DIED) {</div><div class='del'>-					SVC_DESTROY(xprt);</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-			} while (stat == XPRT_MOREREQS);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_auth.c b/mdk-stage1/dietlibc/librpc/svc_auth.c<br/>deleted file mode 100644<br/>index 336586d95..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_auth.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_auth.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,115 +0,0 @@</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)svc_auth.c	2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_auth_nodes.c, Server-side rpc authenticator interface,</div><div class='del'>- * *WITHOUT* DES authentication.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svcauthsw is the bdevsw of server side authentication. </div><div class='del'>- * </div><div class='del'>- * Server side authenticators are called from authenticate by</div><div class='del'>- * using the client auth struct flavor field to index into svcauthsw.</div><div class='del'>- * The server auth flavors must implement a routine that looks  </div><div class='del'>- * like: </div><div class='del'>- * </div><div class='del'>- *	enum auth_stat</div><div class='del'>- *	flavorx_auth(rqst, msg)</div><div class='del'>- *		register struct svc_req *rqst; </div><div class='del'>- *		register struct rpc_msg *msg;</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-enum auth_stat _svcauth_null();		/* no authentication */</div><div class='del'>-enum auth_stat _svcauth_unix();		/* unix style (uid, gids) */</div><div class='del'>-enum auth_stat _svcauth_short();	/* short hand unix style */</div><div class='del'>-</div><div class='del'>-static struct {</div><div class='del'>-	enum auth_stat (*authenticator) ();</div><div class='del'>-} svcauthsw[] = {</div><div class='del'>-	{ _svcauth_null },			/* AUTH_NULL */</div><div class='del'>-	{ _svcauth_unix },			/* AUTH_UNIX */</div><div class='del'>-	{ _svcauth_short },			/* AUTH_SHORT */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define	AUTH_MAX	2			/* HIGHEST AUTH NUMBER */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The call rpc message, msg has been obtained from the wire.  The msg contains</div><div class='del'>- * the raw form of credentials and verifiers.  authenticate returns AUTH_OK</div><div class='del'>- * if the msg is successfully authenticated.  If AUTH_OK then the routine also</div><div class='del'>- * does the following things:</div><div class='del'>- * set rqst-&gt;rq_xprt-&gt;verf to the appropriate response verifier;</div><div class='del'>- * sets rqst-&gt;rq_client_cred to the "cooked" form of the credentials.</div><div class='del'>- *</div><div class='del'>- * NB: rqst-&gt;rq_cxprt-&gt;verf must be pre-alloctaed;</div><div class='del'>- * its length is set appropriately.</div><div class='del'>- *</div><div class='del'>- * The caller still owns and is responsible for msg-&gt;u.cmb.cred and</div><div class='del'>- * msg-&gt;u.cmb.verf.  The authentication system retains ownership of</div><div class='del'>- * rqst-&gt;rq_client_cred, the cooked credentials.</div><div class='del'>- *</div><div class='del'>- * There is an assumption that any flavour less than AUTH_NULL is</div><div class='del'>- * invalid.</div><div class='del'>- */</div><div class='del'>-enum auth_stat _authenticate(rqst, msg)</div><div class='del'>-register struct svc_req *rqst;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register int cred_flavor;</div><div class='del'>-</div><div class='del'>-	rqst-&gt;rq_cred = msg-&gt;rm_call.cb_cred;</div><div class='del'>-	rqst-&gt;rq_xprt-&gt;xp_verf.oa_flavor = _null_auth.oa_flavor;</div><div class='del'>-	rqst-&gt;rq_xprt-&gt;xp_verf.oa_length = 0;</div><div class='del'>-	cred_flavor = rqst-&gt;rq_cred.oa_flavor;</div><div class='del'>-	if ((cred_flavor &lt;= AUTH_MAX) &amp;&amp; (cred_flavor &gt;= AUTH_NULL)) {</div><div class='del'>-		return ((*(svcauthsw[cred_flavor].authenticator)) (rqst, msg));</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return (AUTH_REJECTEDCRED);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum auth_stat _svcauth_null( /*rqst, msg */ )</div><div class='del'>-	/*struct svc_req *rqst;</div><div class='del'>-	   struct rpc_msg *msg; */</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (AUTH_OK);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_auth_unix.c b/mdk-stage1/dietlibc/librpc/svc_auth_unix.c<br/>deleted file mode 100644<br/>index 7e0305f0a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_auth_unix.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_auth_unix.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,136 +0,0 @@</div><div class='del'>-/* @(#)svc_auth_unix.c	2.3 88/08/01 4.0 RPCSRC; from 1.28 88/02/08 SMI */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_auth_unix.c</div><div class='del'>- * Handles UNIX flavor authentication parameters on the service side of rpc.</div><div class='del'>- * There are two svc auth implementations here: AUTH_UNIX and AUTH_SHORT.</div><div class='del'>- * _svcauth_unix does full blown unix style uid,gid+gids auth,</div><div class='del'>- * _svcauth_short uses a shorthand auth to index into a cache of longhand auths.</div><div class='del'>- * Note: the shorthand has been gutted for efficiency.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unix longhand authenticator</div><div class='del'>- */</div><div class='del'>-enum auth_stat _svcauth_unix(rqst, msg)</div><div class='del'>-register struct svc_req *rqst;</div><div class='del'>-register struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register enum auth_stat stat;</div><div class='del'>-	XDR xdrs;</div><div class='del'>-	register struct authunix_parms *aup;</div><div class='del'>-	register int32_t *buf;</div><div class='del'>-	struct area {</div><div class='del'>-		struct authunix_parms area_aup;</div><div class='del'>-		char area_machname[MAX_MACHINE_NAME + 1];</div><div class='del'>-		gid_t area_gids[NGRPS];</div><div class='del'>-	} *area;</div><div class='del'>-	u_int auth_len;</div><div class='del'>-	int str_len, gid_len;</div><div class='del'>-	register int i;</div><div class='del'>-</div><div class='del'>-	area = (struct area *) rqst-&gt;rq_clntcred;</div><div class='del'>-	aup = &amp;area-&gt;area_aup;</div><div class='del'>-	aup-&gt;aup_machname = area-&gt;area_machname;</div><div class='del'>-	aup-&gt;aup_gids = area-&gt;area_gids;</div><div class='del'>-	auth_len = (u_int) msg-&gt;rm_call.cb_cred.oa_length;</div><div class='del'>-	xdrmem_create(&amp;xdrs, msg-&gt;rm_call.cb_cred.oa_base, auth_len,</div><div class='del'>-				  XDR_DECODE);</div><div class='del'>-	buf = XDR_INLINE(&amp;xdrs, auth_len);</div><div class='del'>-	if (buf != NULL) {</div><div class='del'>-		aup-&gt;aup_time = IXDR_GET_LONG(buf);</div><div class='del'>-		str_len = IXDR_GET_U_LONG(buf);</div><div class='del'>-		if (str_len &gt; MAX_MACHINE_NAME) {</div><div class='del'>-			stat = AUTH_BADCRED;</div><div class='del'>-			goto done;</div><div class='del'>-		}</div><div class='del'>-		bcopy((caddr_t) buf, aup-&gt;aup_machname, (u_int) str_len);</div><div class='del'>-		aup-&gt;aup_machname[str_len] = 0;</div><div class='del'>-		str_len = RNDUP(str_len);</div><div class='del'>-		buf += str_len / sizeof(long);</div><div class='del'>-</div><div class='del'>-		aup-&gt;aup_uid = IXDR_GET_LONG(buf);</div><div class='del'>-		aup-&gt;aup_gid = IXDR_GET_LONG(buf);</div><div class='del'>-		gid_len = IXDR_GET_U_LONG(buf);</div><div class='del'>-		if (gid_len &gt; NGRPS) {</div><div class='del'>-			stat = AUTH_BADCRED;</div><div class='del'>-			goto done;</div><div class='del'>-		}</div><div class='del'>-		aup-&gt;aup_len = gid_len;</div><div class='del'>-		for (i = 0; i &lt; gid_len; i++) {</div><div class='del'>-			aup-&gt;aup_gids[i] = IXDR_GET_LONG(buf);</div><div class='del'>-		}</div><div class='del'>-		/*</div><div class='del'>-		 * five is the smallest unix credentials structure -</div><div class='del'>-		 * timestamp, hostname len (0), uid, gid, and gids len (0).</div><div class='del'>-		 */</div><div class='del'>-		if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len &gt; auth_len) {</div><div class='del'>-			(void) printf("bad auth_len gid %d str %d auth %d\n",</div><div class='del'>-						  gid_len, str_len, auth_len);</div><div class='del'>-			stat = AUTH_BADCRED;</div><div class='del'>-			goto done;</div><div class='del'>-		}</div><div class='del'>-	} else if (!xdr_authunix_parms(&amp;xdrs, aup)) {</div><div class='del'>-		xdrs.x_op = XDR_FREE;</div><div class='del'>-		(void) xdr_authunix_parms(&amp;xdrs, aup);</div><div class='del'>-		stat = AUTH_BADCRED;</div><div class='del'>-		goto done;</div><div class='del'>-	}</div><div class='del'>-	rqst-&gt;rq_xprt-&gt;xp_verf.oa_flavor = AUTH_NULL;</div><div class='del'>-	rqst-&gt;rq_xprt-&gt;xp_verf.oa_length = 0;</div><div class='del'>-	stat = AUTH_OK;</div><div class='del'>-  done:</div><div class='del'>-	XDR_DESTROY(&amp;xdrs);</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Shorthand unix authenticator</div><div class='del'>- * Looks up longhand in a cache.</div><div class='del'>- */</div><div class='del'>- /*ARGSUSED*/ enum auth_stat _svcauth_short(rqst, msg)</div><div class='del'>-struct svc_req *rqst;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	return (AUTH_REJECTEDCRED);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_raw.c b/mdk-stage1/dietlibc/librpc/svc_raw.c<br/>deleted file mode 100644<br/>index c13ea5e06..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_raw.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_raw.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,159 +0,0 @@</div><div class='del'>-/* @(#)svc_raw.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_raw.c,   This a toy for simple testing and timing.</div><div class='del'>- * Interface to create an rpc client and server in the same UNIX process.</div><div class='del'>- * This lets us similate rpc and get rpc (round trip) overhead, without</div><div class='del'>- * any interference from the kernal.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the "network" that we will be moving data over</div><div class='del'>- */</div><div class='del'>-static struct svcraw_private {</div><div class='del'>-	char _raw_buf[UDPMSGSIZE];</div><div class='del'>-	SVCXPRT server;</div><div class='del'>-	XDR xdr_stream;</div><div class='del'>-	char verf_body[MAX_AUTH_BYTES];</div><div class='del'>-} *svcraw_private;</div><div class='del'>-</div><div class='del'>-static bool_t svcraw_recv();</div><div class='del'>-static enum xprt_stat svcraw_stat();</div><div class='del'>-static bool_t svcraw_getargs();</div><div class='del'>-static bool_t svcraw_reply();</div><div class='del'>-static bool_t svcraw_freeargs();</div><div class='del'>-static void svcraw_destroy();</div><div class='del'>-</div><div class='del'>-static struct xp_ops server_ops = {</div><div class='del'>-	svcraw_recv,</div><div class='del'>-	svcraw_stat,</div><div class='del'>-	svcraw_getargs,</div><div class='del'>-	svcraw_reply,</div><div class='del'>-	svcraw_freeargs,</div><div class='del'>-	svcraw_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-SVCXPRT *svcraw_create()</div><div class='del'>-{</div><div class='del'>-	register struct svcraw_private *srp = svcraw_private;</div><div class='del'>-</div><div class='del'>-	if (srp == 0) {</div><div class='del'>-		srp = (struct svcraw_private *) calloc(1, sizeof(*srp));</div><div class='del'>-		if (srp == 0)</div><div class='del'>-			return (0);</div><div class='del'>-	}</div><div class='del'>-	srp-&gt;server.xp_sock = 0;</div><div class='del'>-	srp-&gt;server.xp_port = 0;</div><div class='del'>-	srp-&gt;server.xp_ops = &amp;server_ops;</div><div class='del'>-	srp-&gt;server.xp_verf.oa_base = srp-&gt;verf_body;</div><div class='del'>-	xdrmem_create(&amp;srp-&gt;xdr_stream, srp-&gt;_raw_buf, UDPMSGSIZE, XDR_FREE);</div><div class='del'>-	return (&amp;srp-&gt;server);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum xprt_stat svcraw_stat()</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (XPRT_IDLE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcraw_recv(xprt, msg)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct svcraw_private *srp = svcraw_private;</div><div class='del'>-	register XDR *xdrs;</div><div class='del'>-</div><div class='del'>-	if (srp == 0)</div><div class='del'>-		return (0);</div><div class='del'>-	xdrs = &amp;srp-&gt;xdr_stream;</div><div class='del'>-	xdrs-&gt;x_op = XDR_DECODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	if (!xdr_callmsg(xdrs, msg))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcraw_reply(xprt, msg)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct svcraw_private *srp = svcraw_private;</div><div class='del'>-	register XDR *xdrs;</div><div class='del'>-</div><div class='del'>-	if (srp == 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	xdrs = &amp;srp-&gt;xdr_stream;</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	if (!xdr_replymsg(xdrs, msg))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	(void) XDR_GETPOS(xdrs);	/* called just for overhead */</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcraw_getargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-	register struct svcraw_private *srp = svcraw_private;</div><div class='del'>-</div><div class='del'>-	if (srp == 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	return ((*xdr_args) (&amp;srp-&gt;xdr_stream, args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcraw_freeargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-	register struct svcraw_private *srp = svcraw_private;</div><div class='del'>-	register XDR *xdrs;</div><div class='del'>-</div><div class='del'>-	if (srp == 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	xdrs = &amp;srp-&gt;xdr_stream;</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_args) (xdrs, args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void svcraw_destroy()</div><div class='del'>-{</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_run.c b/mdk-stage1/dietlibc/librpc/svc_run.c<br/>deleted file mode 100644<br/>index c7150e357..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_run.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_run.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,71 +0,0 @@</div><div class='del'>-/* @(#)svc_run.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the rpc server side idle loop</div><div class='del'>- * Wait for input, call server program.</div><div class='del'>- */</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-void svc_run()</div><div class='del'>-{</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set readfds;</div><div class='del'>-#else</div><div class='del'>-	int readfds;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	extern int errno;</div><div class='del'>-</div><div class='del'>-	for (;;) {</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-		readfds = svc_fdset;</div><div class='del'>-#else</div><div class='del'>-		readfds = svc_fds;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-		switch (select(_rpc_dtablesize(), &amp;readfds, 0, 0, 0)) {</div><div class='del'>-		case -1:</div><div class='del'>-			if (errno == EINTR) {</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			perror("svc_run: - select failed");</div><div class='del'>-			return;</div><div class='del'>-		case 0:</div><div class='del'>-			continue;</div><div class='del'>-		default:</div><div class='del'>-			svc_getreqset(&amp;readfds);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_simple.c b/mdk-stage1/dietlibc/librpc/svc_simple.c<br/>deleted file mode 100644<br/>index 0bb9a19eb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_simple.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_simple.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,144 +0,0 @@</div><div class='del'>-/* @(#)svc_simple.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * svc_simple.c</div><div class='del'>- * Simplified front end to rpc.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-static struct proglst {</div><div class='del'>-	char *(*p_progname) ();</div><div class='del'>-	int p_prognum;</div><div class='del'>-	int p_procnum;</div><div class='del'>-	xdrproc_t p_inproc, p_outproc;</div><div class='del'>-	struct proglst *p_nxt;</div><div class='del'>-} *proglst;</div><div class='del'>-static void universal();</div><div class='del'>-static SVCXPRT *transp;</div><div class='del'>-struct proglst *pl;</div><div class='del'>-</div><div class='del'>-int registerrpc(int prognum, int versnum, int procnum, char *(*progname)(), xdrproc_t inproc, xdrproc_t outproc)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (procnum == NULLPROC) {</div><div class='del'>-		(void) fprintf(stderr,</div><div class='del'>-					   "can't reassign procedure number %d\n", NULLPROC);</div><div class='del'>-		return (-1);</div><div class='del'>-	}</div><div class='del'>-	if (transp == 0) {</div><div class='del'>-		transp = svcudp_create(RPC_ANYSOCK);</div><div class='del'>-		if (transp == NULL) {</div><div class='del'>-			(void) fprintf(stderr, "couldn't create an rpc server\n");</div><div class='del'>-			return (-1);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	(void) pmap_unset((u_long) prognum, (u_long) versnum);</div><div class='del'>-	if (!svc_register(transp, (u_long) prognum, (u_long) versnum,</div><div class='del'>-					  universal, IPPROTO_UDP)) {</div><div class='del'>-		(void) fprintf(stderr, "couldn't register prog %d vers %d\n",</div><div class='del'>-					   prognum, versnum);</div><div class='del'>-		return (-1);</div><div class='del'>-	}</div><div class='del'>-	pl = (struct proglst *) malloc(sizeof(struct proglst));</div><div class='del'>-</div><div class='del'>-	if (pl == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "registerrpc: out of memory\n");</div><div class='del'>-		return (-1);</div><div class='del'>-	}</div><div class='del'>-	pl-&gt;p_progname = progname;</div><div class='del'>-	pl-&gt;p_prognum = prognum;</div><div class='del'>-	pl-&gt;p_procnum = procnum;</div><div class='del'>-	pl-&gt;p_inproc = inproc;</div><div class='del'>-	pl-&gt;p_outproc = outproc;</div><div class='del'>-	pl-&gt;p_nxt = proglst;</div><div class='del'>-	proglst = pl;</div><div class='del'>-	return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void universal(rqstp, transp)</div><div class='del'>-struct svc_req *rqstp;</div><div class='del'>-SVCXPRT *transp;</div><div class='del'>-{</div><div class='del'>-	int prog, proc;</div><div class='del'>-	char *outdata;</div><div class='del'>-	char xdrbuf[UDPMSGSIZE];</div><div class='del'>-	struct proglst *pl;</div><div class='del'>-</div><div class='del'>-	/* </div><div class='del'>-	 * enforce "procnum 0 is echo" convention</div><div class='del'>-	 */</div><div class='del'>-	if (rqstp-&gt;rq_proc == NULLPROC) {</div><div class='del'>-		if (svc_sendreply(transp, (xdrproc_t)xdr_void, (char *) NULL) == FALSE) {</div><div class='del'>-			(void) fprintf(stderr, "xxx\n");</div><div class='del'>-			exit(1);</div><div class='del'>-		}</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	prog = rqstp-&gt;rq_prog;</div><div class='del'>-	proc = rqstp-&gt;rq_proc;</div><div class='del'>-	for (pl = proglst; pl != NULL; pl = pl-&gt;p_nxt)</div><div class='del'>-		if (pl-&gt;p_prognum == prog &amp;&amp; pl-&gt;p_procnum == proc) {</div><div class='del'>-			/* decode arguments into a CLEAN buffer */</div><div class='del'>-			bzero(xdrbuf, sizeof(xdrbuf));	/* required ! */</div><div class='del'>-			if (!svc_getargs(transp, pl-&gt;p_inproc, xdrbuf)) {</div><div class='del'>-				svcerr_decode(transp);</div><div class='del'>-				return;</div><div class='del'>-			}</div><div class='del'>-			outdata = (*(pl-&gt;p_progname)) (xdrbuf);</div><div class='del'>-			if (outdata == NULL &amp;&amp; pl-&gt;p_outproc != (xdrproc_t)xdr_void)</div><div class='del'>-				/* there was an error */</div><div class='del'>-				return;</div><div class='del'>-			if (!svc_sendreply(transp, pl-&gt;p_outproc, outdata)) {</div><div class='del'>-				(void) fprintf(stderr,</div><div class='del'>-							   "trouble replying to prog %d\n",</div><div class='del'>-							   pl-&gt;p_prognum);</div><div class='del'>-				exit(1);</div><div class='del'>-			}</div><div class='del'>-			/* free the decoded arguments */</div><div class='del'>-			(void) svc_freeargs(transp, pl-&gt;p_inproc, xdrbuf);</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-	(void) fprintf(stderr, "never registered prog %d\n", prog);</div><div class='del'>-	exit(1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_tcp.c b/mdk-stage1/dietlibc/librpc/svc_tcp.c<br/>deleted file mode 100644<br/>index 6edafa1b1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_tcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_tcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,406 +0,0 @@</div><div class='del'>-/* @(#)svc_tcp.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_tcp.c, Server side for TCP/IP based RPC. </div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * Actually implements two flavors of transporter -</div><div class='del'>- * a tcp rendezvouser (a listner and connection establisher)</div><div class='del'>- * and a record/tcp stream.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ops vector for TCP/IP based rpc service handle</div><div class='del'>- */</div><div class='del'>-static bool_t svctcp_recv();</div><div class='del'>-static enum xprt_stat svctcp_stat();</div><div class='del'>-static bool_t svctcp_getargs();</div><div class='del'>-static bool_t svctcp_reply();</div><div class='del'>-static bool_t svctcp_freeargs();</div><div class='del'>-static void svctcp_destroy();</div><div class='del'>-</div><div class='del'>-static struct xp_ops svctcp_op = {</div><div class='del'>-	svctcp_recv,</div><div class='del'>-	svctcp_stat,</div><div class='del'>-	svctcp_getargs,</div><div class='del'>-	svctcp_reply,</div><div class='del'>-	svctcp_freeargs,</div><div class='del'>-	svctcp_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ops vector for TCP/IP rendezvous handler</div><div class='del'>- */</div><div class='del'>-static bool_t rendezvous_request();</div><div class='del'>-static enum xprt_stat rendezvous_stat();</div><div class='del'>-</div><div class='del'>-static struct xp_ops svctcp_rendezvous_op = {</div><div class='del'>-	rendezvous_request,</div><div class='del'>-	rendezvous_stat,</div><div class='del'>-	(void*)abort,</div><div class='del'>-	(void*)abort,</div><div class='del'>-	(void*)abort,</div><div class='del'>-	svctcp_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int readtcp(), writetcp();</div><div class='del'>-static SVCXPRT *makefd_xprt();</div><div class='del'>-</div><div class='del'>-struct tcp_rendezvous {			/* kept in xprt-&gt;xp_p1 */</div><div class='del'>-	u_int sendsize;</div><div class='del'>-	u_int recvsize;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct tcp_conn {				/* kept in xprt-&gt;xp_p1 */</div><div class='del'>-	enum xprt_stat strm_stat;</div><div class='del'>-	u_long x_id;</div><div class='del'>-	XDR xdrs;</div><div class='del'>-	char verf_body[MAX_AUTH_BYTES];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Usage:</div><div class='del'>- *	xprt = svctcp_create(sock, send_buf_size, recv_buf_size);</div><div class='del'>- *</div><div class='del'>- * Creates, registers, and returns a (rpc) tcp based transporter.</div><div class='del'>- * Once *xprt is initialized, it is registered as a transporter</div><div class='del'>- * see (svc.h, xprt_register).  This routine returns</div><div class='del'>- * a NULL if a problem occurred.</div><div class='del'>- *</div><div class='del'>- * If sock&lt;0 then a socket is created, else sock is used.</div><div class='del'>- * If the socket, sock is not bound to a port then svctcp_create</div><div class='del'>- * binds it to an arbitrary port.  The routine then starts a tcp</div><div class='del'>- * listener on the socket's associated port.  In any (successful) case,</div><div class='del'>- * xprt-&gt;xp_sock is the registered socket number and xprt-&gt;xp_port is the</div><div class='del'>- * associated port number.</div><div class='del'>- *</div><div class='del'>- * Since tcp streams do buffered io similar to stdio, the caller can specify</div><div class='del'>- * how big the send and receive buffers are via the second and third parms;</div><div class='del'>- * 0 =&gt; use the system default.</div><div class='del'>- */</div><div class='del'>-SVCXPRT *svctcp_create(sock, sendsize, recvsize)</div><div class='del'>-register int sock;</div><div class='del'>-u_int sendsize;</div><div class='del'>-u_int recvsize;</div><div class='del'>-{</div><div class='del'>-	bool_t madesock = FALSE;</div><div class='del'>-	register SVCXPRT *xprt;</div><div class='del'>-	register struct tcp_rendezvous *r;</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-	int len = sizeof(struct sockaddr_in);</div><div class='del'>-</div><div class='del'>-	if (sock == RPC_ANYSOCK) {</div><div class='del'>-		if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) &lt; 0) {</div><div class='del'>-			perror("svc_tcp.c - tcp socket creation problem");</div><div class='del'>-			return ((SVCXPRT *) NULL);</div><div class='del'>-		}</div><div class='del'>-		madesock = TRUE;</div><div class='del'>-	}</div><div class='del'>-	bzero((char *) &amp;addr, sizeof(addr));</div><div class='del'>-	addr.sin_family = AF_INET;</div><div class='del'>-	if (bindresvport(sock, &amp;addr)) {</div><div class='del'>-		addr.sin_port = 0;</div><div class='del'>-		(void) bind(sock, (struct sockaddr *) &amp;addr, len);</div><div class='del'>-	}</div><div class='del'>-	if ((getsockname(sock, (struct sockaddr *) &amp;addr, &amp;len) != 0) ||</div><div class='del'>-		(listen(sock, 2) != 0)) {</div><div class='del'>-		perror("svctcp_.c - cannot getsockname or listen");</div><div class='del'>-		if (madesock)</div><div class='del'>-			(void) close(sock);</div><div class='del'>-		return ((SVCXPRT *) NULL);</div><div class='del'>-	}</div><div class='del'>-	r = (struct tcp_rendezvous *) mem_alloc(sizeof(*r));</div><div class='del'>-	if (r == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svctcp_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	r-&gt;sendsize = sendsize;</div><div class='del'>-	r-&gt;recvsize = recvsize;</div><div class='del'>-	xprt = (SVCXPRT *) mem_alloc(sizeof(SVCXPRT));</div><div class='del'>-	if (xprt == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svctcp_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	xprt-&gt;xp_p2 = NULL;</div><div class='del'>-	xprt-&gt;xp_p1 = (caddr_t) r;</div><div class='del'>-	xprt-&gt;xp_verf = _null_auth;</div><div class='del'>-	xprt-&gt;xp_ops = &amp;svctcp_rendezvous_op;</div><div class='del'>-	xprt-&gt;xp_port = ntohs(addr.sin_port);</div><div class='del'>-	xprt-&gt;xp_sock = sock;</div><div class='del'>-	xprt_register(xprt);</div><div class='del'>-	return (xprt);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Like svtcp_create(), except the routine takes any *open* UNIX file</div><div class='del'>- * descriptor as its first input.</div><div class='del'>- */</div><div class='del'>-SVCXPRT *svcfd_create(fd, sendsize, recvsize)</div><div class='del'>-int fd;</div><div class='del'>-u_int sendsize;</div><div class='del'>-u_int recvsize;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (makefd_xprt(fd, sendsize, recvsize));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static SVCXPRT *makefd_xprt(fd, sendsize, recvsize)</div><div class='del'>-int fd;</div><div class='del'>-u_int sendsize;</div><div class='del'>-u_int recvsize;</div><div class='del'>-{</div><div class='del'>-	register SVCXPRT *xprt;</div><div class='del'>-	register struct tcp_conn *cd;</div><div class='del'>-</div><div class='del'>-	xprt = (SVCXPRT *) mem_alloc(sizeof(SVCXPRT));</div><div class='del'>-	if (xprt == (SVCXPRT *) NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n");</div><div class='del'>-		goto done;</div><div class='del'>-	}</div><div class='del'>-	cd = (struct tcp_conn *) mem_alloc(sizeof(struct tcp_conn));</div><div class='del'>-</div><div class='del'>-	if (cd == (struct tcp_conn *) NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n");</div><div class='del'>-		mem_free((char *) xprt, sizeof(SVCXPRT));</div><div class='del'>-		xprt = (SVCXPRT *) NULL;</div><div class='del'>-		goto done;</div><div class='del'>-	}</div><div class='del'>-	cd-&gt;strm_stat = XPRT_IDLE;</div><div class='del'>-	xdrrec_create(&amp;(cd-&gt;xdrs), sendsize, recvsize,</div><div class='del'>-				  (caddr_t) xprt, readtcp, writetcp);</div><div class='del'>-	xprt-&gt;xp_p2 = NULL;</div><div class='del'>-	xprt-&gt;xp_p1 = (caddr_t) cd;</div><div class='del'>-	xprt-&gt;xp_verf.oa_base = cd-&gt;verf_body;</div><div class='del'>-	xprt-&gt;xp_addrlen = 0;</div><div class='del'>-	xprt-&gt;xp_ops = &amp;svctcp_op;	/* truely deals with calls */</div><div class='del'>-	xprt-&gt;xp_port = 0;			/* this is a connection, not a rendezvouser */</div><div class='del'>-	xprt-&gt;xp_sock = fd;</div><div class='del'>-	xprt_register(xprt);</div><div class='del'>-  done:</div><div class='del'>-	return (xprt);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t rendezvous_request(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	int sock;</div><div class='del'>-	struct tcp_rendezvous *r;</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-	int len;</div><div class='del'>-</div><div class='del'>-	r = (struct tcp_rendezvous *) xprt-&gt;xp_p1;</div><div class='del'>-  again:</div><div class='del'>-	len = sizeof(struct sockaddr_in);</div><div class='del'>-</div><div class='del'>-	if ((sock = accept(xprt-&gt;xp_sock, (struct sockaddr *) &amp;addr,</div><div class='del'>-					   &amp;len)) &lt; 0) {</div><div class='del'>-		if (errno == EINTR)</div><div class='del'>-			goto again;</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * make a new transporter (re-uses xprt)</div><div class='del'>-	 */</div><div class='del'>-	xprt = makefd_xprt(sock, r-&gt;sendsize, r-&gt;recvsize);</div><div class='del'>-	xprt-&gt;xp_raddr = addr;</div><div class='del'>-	xprt-&gt;xp_addrlen = len;</div><div class='del'>-	return (FALSE);				/* there is never an rpc msg to be processed */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum xprt_stat rendezvous_stat()</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (XPRT_IDLE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void svctcp_destroy(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	register struct tcp_conn *cd = (struct tcp_conn *) xprt-&gt;xp_p1;</div><div class='del'>-</div><div class='del'>-	xprt_unregister(xprt);</div><div class='del'>-	(void) close(xprt-&gt;xp_sock);</div><div class='del'>-	if (xprt-&gt;xp_port != 0) {</div><div class='del'>-		/* a rendezvouser socket */</div><div class='del'>-		xprt-&gt;xp_port = 0;</div><div class='del'>-	} else {</div><div class='del'>-		/* an actual connection socket */</div><div class='del'>-		XDR_DESTROY(&amp;(cd-&gt;xdrs));</div><div class='del'>-	}</div><div class='del'>-	mem_free((caddr_t) cd, sizeof(struct tcp_conn));</div><div class='del'>-</div><div class='del'>-	mem_free((caddr_t) xprt, sizeof(SVCXPRT));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * All read operations timeout after 35 seconds.</div><div class='del'>- * A timeout is fatal for the connection.</div><div class='del'>- */</div><div class='del'>-static struct timeval wait_per_try = { 35, 0 };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * reads data from the tcp conection.</div><div class='del'>- * any error is fatal and the connection is closed.</div><div class='del'>- * (And a read of zero bytes is a half closed stream =&gt; error.)</div><div class='del'>- */</div><div class='del'>-static int readtcp(xprt, buf, len)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-caddr_t buf;</div><div class='del'>-register int len;</div><div class='del'>-{</div><div class='del'>-	register int sock = xprt-&gt;xp_sock;</div><div class='del'>-</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	fd_set mask;</div><div class='del'>-	fd_set readfds;</div><div class='del'>-</div><div class='del'>-	FD_ZERO(&amp;mask);</div><div class='del'>-	FD_SET(sock, &amp;mask);</div><div class='del'>-#else</div><div class='del'>-	register int mask = 1 &lt;&lt; sock;</div><div class='del'>-	int readfds;</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	do {</div><div class='del'>-		readfds = mask;</div><div class='del'>-		if (select(_rpc_dtablesize(), &amp;readfds, 0, 0, &amp;wait_per_try) &lt;= 0) {</div><div class='del'>-			if (errno == EINTR) {</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			goto fatal_err;</div><div class='del'>-		}</div><div class='del'>-#ifdef FD_SETSIZE</div><div class='del'>-	} while (!FD_ISSET(sock, &amp;readfds));</div><div class='del'>-#else</div><div class='del'>-	} while (readfds != mask);</div><div class='del'>-#endif							/* def FD_SETSIZE */</div><div class='del'>-	if ((len = read(sock, buf, len)) &gt; 0) {</div><div class='del'>-		return (len);</div><div class='del'>-	}</div><div class='del'>-  fatal_err:</div><div class='del'>-	((struct tcp_conn *) (xprt-&gt;xp_p1))-&gt;strm_stat = XPRT_DIED;</div><div class='del'>-	return (-1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * writes data to the tcp connection.</div><div class='del'>- * Any error is fatal and the connection is closed.</div><div class='del'>- */</div><div class='del'>-static int writetcp(xprt, buf, len)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-caddr_t buf;</div><div class='del'>-int len;</div><div class='del'>-{</div><div class='del'>-	register int i, cnt;</div><div class='del'>-</div><div class='del'>-	for (cnt = len; cnt &gt; 0; cnt -= i, buf += i) {</div><div class='del'>-		if ((i = write(xprt-&gt;xp_sock, buf, cnt)) &lt; 0) {</div><div class='del'>-			((struct tcp_conn *) (xprt-&gt;xp_p1))-&gt;strm_stat = XPRT_DIED;</div><div class='del'>-			return (-1);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum xprt_stat svctcp_stat(xprt)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	register struct tcp_conn *cd = (struct tcp_conn *) (xprt-&gt;xp_p1);</div><div class='del'>-</div><div class='del'>-	if (cd-&gt;strm_stat == XPRT_DIED)</div><div class='del'>-		return (XPRT_DIED);</div><div class='del'>-	if (!xdrrec_eof(&amp;(cd-&gt;xdrs)))</div><div class='del'>-		return (XPRT_MOREREQS);</div><div class='del'>-	return (XPRT_IDLE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svctcp_recv(xprt, msg)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-register struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct tcp_conn *cd = (struct tcp_conn *) (xprt-&gt;xp_p1);</div><div class='del'>-	register XDR *xdrs = &amp;(cd-&gt;xdrs);</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_DECODE;</div><div class='del'>-	(void) xdrrec_skiprecord(xdrs);</div><div class='del'>-	if (xdr_callmsg(xdrs, msg)) {</div><div class='del'>-		cd-&gt;x_id = msg-&gt;rm_xid;</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svctcp_getargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return ((*xdr_args)</div><div class='del'>-			(&amp;(((struct tcp_conn *) (xprt-&gt;xp_p1))-&gt;xdrs), args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svctcp_freeargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-	register XDR *xdrs = &amp;(((struct tcp_conn *) (xprt-&gt;xp_p1))-&gt;xdrs);</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_args) (xdrs, args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svctcp_reply(xprt, msg)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-register struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct tcp_conn *cd = (struct tcp_conn *) (xprt-&gt;xp_p1);</div><div class='del'>-	register XDR *xdrs = &amp;(cd-&gt;xdrs);</div><div class='del'>-	register bool_t stat;</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	msg-&gt;rm_xid = cd-&gt;x_id;</div><div class='del'>-	stat = xdr_replymsg(xdrs, msg);</div><div class='del'>-	(void) xdrrec_endofrecord(xdrs, TRUE);</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/svc_udp.c b/mdk-stage1/dietlibc/librpc/svc_udp.c<br/>deleted file mode 100644<br/>index 1cdb5ce91..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/svc_udp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/svc_udp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,467 +0,0 @@</div><div class='del'>-/* @(#)svc_udp.c	2.2 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * svc_udp.c,</div><div class='del'>- * Server side for UDP/IP based RPC.  (Does some caching in the hopes of</div><div class='del'>- * achieving execute-at-most-once semantics.)</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define rpc_buffer(xprt) ((xprt)-&gt;xp_p1)</div><div class='del'>-#define MAX(a, b)     ((a &gt; b) ? a : b)</div><div class='del'>-</div><div class='del'>-static bool_t svcudp_recv();</div><div class='del'>-static bool_t svcudp_reply();</div><div class='del'>-static enum xprt_stat svcudp_stat();</div><div class='del'>-static bool_t svcudp_getargs();</div><div class='del'>-static bool_t svcudp_freeargs();</div><div class='del'>-static void svcudp_destroy();</div><div class='del'>-</div><div class='del'>-static struct xp_ops svcudp_op = {</div><div class='del'>-	svcudp_recv,</div><div class='del'>-	svcudp_stat,</div><div class='del'>-	svcudp_getargs,</div><div class='del'>-	svcudp_reply,</div><div class='del'>-	svcudp_freeargs,</div><div class='del'>-	svcudp_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * kept in xprt-&gt;xp_p2</div><div class='del'>- */</div><div class='del'>-struct svcudp_data {</div><div class='del'>-	u_int su_iosz;				/* byte size of send.recv buffer */</div><div class='del'>-	u_long su_xid;				/* transaction id */</div><div class='del'>-	XDR su_xdrs;				/* XDR handle */</div><div class='del'>-	char su_verfbody[MAX_AUTH_BYTES];	/* verifier body */</div><div class='del'>-	char *su_cache;				/* cached data, NULL if no cache */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define	su_data(xprt)	((struct svcudp_data *)(xprt-&gt;xp_p2))</div><div class='del'>-</div><div class='del'>-static int cache_get(SVCXPRT* xprt, struct rpc_msg* msg, char** replyp, u_long* replylenp);</div><div class='del'>-static void cache_set(SVCXPRT* xprt, u_long replylen);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Usage:</div><div class='del'>- *	xprt = svcudp_create(sock);</div><div class='del'>- *</div><div class='del'>- * If sock&lt;0 then a socket is created, else sock is used.</div><div class='del'>- * If the socket, sock is not bound to a port then svcudp_create</div><div class='del'>- * binds it to an arbitrary port.  In any (successful) case,</div><div class='del'>- * xprt-&gt;xp_sock is the registered socket number and xprt-&gt;xp_port is the</div><div class='del'>- * associated port number.</div><div class='del'>- * Once *xprt is initialized, it is registered as a transporter;</div><div class='del'>- * see (svc.h, xprt_register).</div><div class='del'>- * The routines returns NULL if a problem occurred.</div><div class='del'>- */</div><div class='del'>-SVCXPRT *svcudp_bufcreate(sock, sendsz, recvsz)</div><div class='del'>-register int sock;</div><div class='del'>-u_int sendsz, recvsz;</div><div class='del'>-{</div><div class='del'>-	bool_t madesock = FALSE;</div><div class='del'>-	register SVCXPRT *xprt;</div><div class='del'>-	register struct svcudp_data *su;</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-	int len = sizeof(struct sockaddr_in);</div><div class='del'>-</div><div class='del'>-	if (sock == RPC_ANYSOCK) {</div><div class='del'>-		if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) &lt; 0) {</div><div class='del'>-			perror("svcudp_create: socket creation problem");</div><div class='del'>-			return ((SVCXPRT *) NULL);</div><div class='del'>-		}</div><div class='del'>-		madesock = TRUE;</div><div class='del'>-	}</div><div class='del'>-	bzero((char *) &amp;addr, sizeof(addr));</div><div class='del'>-	addr.sin_family = AF_INET;</div><div class='del'>-	if (bindresvport(sock, &amp;addr)) {</div><div class='del'>-		addr.sin_port = 0;</div><div class='del'>-		(void) bind(sock, (struct sockaddr *) &amp;addr, len);</div><div class='del'>-	}</div><div class='del'>-	if (getsockname(sock, (struct sockaddr *) &amp;addr, &amp;len) != 0) {</div><div class='del'>-		perror("svcudp_create - cannot getsockname");</div><div class='del'>-		if (madesock)</div><div class='del'>-			(void) close(sock);</div><div class='del'>-		return ((SVCXPRT *) NULL);</div><div class='del'>-	}</div><div class='del'>-	xprt = (SVCXPRT *) mem_alloc(sizeof(SVCXPRT));</div><div class='del'>-	if (xprt == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svcudp_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	su = (struct svcudp_data *) mem_alloc(sizeof(*su));</div><div class='del'>-	if (su == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svcudp_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	su-&gt;su_iosz = ((MAX(sendsz, recvsz) + 3) / 4) * 4;</div><div class='del'>-	if ((rpc_buffer(xprt) = mem_alloc(su-&gt;su_iosz)) == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "svcudp_create: out of memory\n");</div><div class='del'>-		return (NULL);</div><div class='del'>-	}</div><div class='del'>-	xdrmem_create(&amp;(su-&gt;su_xdrs), rpc_buffer(xprt), su-&gt;su_iosz,</div><div class='del'>-				  XDR_DECODE);</div><div class='del'>-	su-&gt;su_cache = NULL;</div><div class='del'>-	xprt-&gt;xp_p2 = (caddr_t) su;</div><div class='del'>-	xprt-&gt;xp_verf.oa_base = su-&gt;su_verfbody;</div><div class='del'>-	xprt-&gt;xp_ops = &amp;svcudp_op;</div><div class='del'>-	xprt-&gt;xp_port = ntohs(addr.sin_port);</div><div class='del'>-	xprt-&gt;xp_sock = sock;</div><div class='del'>-	xprt_register(xprt);</div><div class='del'>-	return (xprt);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-SVCXPRT *svcudp_create(sock)</div><div class='del'>-int sock;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum xprt_stat svcudp_stat(xprt)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (XPRT_IDLE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcudp_recv(xprt, msg)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct svcudp_data *su = su_data(xprt);</div><div class='del'>-	register XDR *xdrs = &amp;(su-&gt;su_xdrs);</div><div class='del'>-	register int rlen;</div><div class='del'>-	char *reply;</div><div class='del'>-	u_long replylen;</div><div class='del'>-</div><div class='del'>-  again:</div><div class='del'>-	xprt-&gt;xp_addrlen = sizeof(struct sockaddr_in);</div><div class='del'>-</div><div class='del'>-	rlen = recvfrom(xprt-&gt;xp_sock, rpc_buffer(xprt), (int) su-&gt;su_iosz,</div><div class='del'>-					0, (struct sockaddr *) &amp;(xprt-&gt;xp_raddr),</div><div class='del'>-					&amp;(xprt-&gt;xp_addrlen));</div><div class='del'>-	if (rlen == -1 &amp;&amp; errno == EINTR)</div><div class='del'>-		goto again;</div><div class='del'>-	if (rlen &lt; 4 * sizeof(u_long))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	xdrs-&gt;x_op = XDR_DECODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	if (!xdr_callmsg(xdrs, msg))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	su-&gt;su_xid = msg-&gt;rm_xid;</div><div class='del'>-	if (su-&gt;su_cache != NULL) {</div><div class='del'>-		if (cache_get(xprt, msg, &amp;reply, &amp;replylen)) {</div><div class='del'>-			(void) sendto(xprt-&gt;xp_sock, reply, (int) replylen, 0,</div><div class='del'>-						  (struct sockaddr *) &amp;xprt-&gt;xp_raddr,</div><div class='del'>-						  xprt-&gt;xp_addrlen);</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcudp_reply(xprt, msg)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-struct rpc_msg *msg;</div><div class='del'>-{</div><div class='del'>-	register struct svcudp_data *su = su_data(xprt);</div><div class='del'>-	register XDR *xdrs = &amp;(su-&gt;su_xdrs);</div><div class='del'>-	register int slen;</div><div class='del'>-	register bool_t stat = FALSE;</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_ENCODE;</div><div class='del'>-	XDR_SETPOS(xdrs, 0);</div><div class='del'>-	msg-&gt;rm_xid = su-&gt;su_xid;</div><div class='del'>-	if (xdr_replymsg(xdrs, msg)) {</div><div class='del'>-		slen = (int) XDR_GETPOS(xdrs);</div><div class='del'>-		if (sendto(xprt-&gt;xp_sock, rpc_buffer(xprt), slen, 0,</div><div class='del'>-				   (struct sockaddr *) &amp;(xprt-&gt;xp_raddr), xprt-&gt;xp_addrlen)</div><div class='del'>-			== slen) {</div><div class='del'>-			stat = TRUE;</div><div class='del'>-			if (su-&gt;su_cache &amp;&amp; slen &gt;= 0) {</div><div class='del'>-				cache_set(xprt, (u_long) slen);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcudp_getargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return ((*xdr_args) (&amp;(su_data(xprt)-&gt;su_xdrs), args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t svcudp_freeargs(xprt, xdr_args, args_ptr)</div><div class='del'>-SVCXPRT *xprt;</div><div class='del'>-xdrproc_t xdr_args;</div><div class='del'>-caddr_t args_ptr;</div><div class='del'>-{</div><div class='del'>-	register XDR *xdrs = &amp;(su_data(xprt)-&gt;su_xdrs);</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = XDR_FREE;</div><div class='del'>-	return ((*xdr_args) (xdrs, args_ptr));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void svcudp_destroy(xprt)</div><div class='del'>-register SVCXPRT *xprt;</div><div class='del'>-{</div><div class='del'>-	register struct svcudp_data *su = su_data(xprt);</div><div class='del'>-</div><div class='del'>-	xprt_unregister(xprt);</div><div class='del'>-	(void) close(xprt-&gt;xp_sock);</div><div class='del'>-	XDR_DESTROY(&amp;(su-&gt;su_xdrs));</div><div class='del'>-	mem_free(rpc_buffer(xprt), su-&gt;su_iosz);</div><div class='del'>-	mem_free((caddr_t) su, sizeof(struct svcudp_data));</div><div class='del'>-</div><div class='del'>-	mem_free((caddr_t) xprt, sizeof(SVCXPRT));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/***********this could be a separate file*********************/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Fifo cache for udp server</div><div class='del'>- * Copies pointers to reply buffers into fifo cache</div><div class='del'>- * Buffers are sent again if retransmissions are detected.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define SPARSENESS 4			/* 75% sparse */</div><div class='del'>-</div><div class='del'>-#define CACHE_PERROR(msg)	\</div><div class='del'>-	(void) fprintf(stderr,"%s\n", msg)</div><div class='del'>-</div><div class='del'>-#define ALLOC(type, size)	\</div><div class='del'>-	(type *) mem_alloc((unsigned) (sizeof(type) * (size)))</div><div class='del'>-</div><div class='del'>-#define BZERO(addr, type, size)	 \</div><div class='del'>-	bzero((char *) addr, sizeof(type) * (int) (size))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * An entry in the cache</div><div class='del'>- */</div><div class='del'>-typedef struct cache_node *cache_ptr;</div><div class='del'>-struct cache_node {</div><div class='del'>-	/*</div><div class='del'>-	 * Index into cache is xid, proc, vers, prog and address</div><div class='del'>-	 */</div><div class='del'>-	u_long cache_xid;</div><div class='del'>-	u_long cache_proc;</div><div class='del'>-	u_long cache_vers;</div><div class='del'>-	u_long cache_prog;</div><div class='del'>-	struct sockaddr_in cache_addr;</div><div class='del'>-	/*</div><div class='del'>-	 * The cached reply and length</div><div class='del'>-	 */</div><div class='del'>-	char *cache_reply;</div><div class='del'>-	u_long cache_replylen;</div><div class='del'>-	/*</div><div class='del'>-	 * Next node on the list, if there is a collision</div><div class='del'>-	 */</div><div class='del'>-	cache_ptr cache_next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The entire cache</div><div class='del'>- */</div><div class='del'>-struct udp_cache {</div><div class='del'>-	u_long uc_size;				/* size of cache */</div><div class='del'>-	cache_ptr *uc_entries;		/* hash table of entries in cache */</div><div class='del'>-	cache_ptr *uc_fifo;			/* fifo list of entries in cache */</div><div class='del'>-	u_long uc_nextvictim;		/* points to next victim in fifo list */</div><div class='del'>-	u_long uc_prog;				/* saved program number */</div><div class='del'>-	u_long uc_vers;				/* saved version number */</div><div class='del'>-	u_long uc_proc;				/* saved procedure number */</div><div class='del'>-	struct sockaddr_in uc_addr;	/* saved caller's address */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * the hashing function</div><div class='del'>- */</div><div class='del'>-#define CACHE_LOC(transp, xid)	\</div><div class='del'>- (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)-&gt;su_cache)-&gt;uc_size))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Enable use of the cache. </div><div class='del'>- * Note: there is no disable.</div><div class='del'>- */</div><div class='del'>-int svcudp_enablecache(SVCXPRT* transp, u_long size)</div><div class='del'>-{</div><div class='del'>-	struct svcudp_data *su = su_data(transp);</div><div class='del'>-	struct udp_cache *uc;</div><div class='del'>-</div><div class='del'>-	if (su-&gt;su_cache != NULL) {</div><div class='del'>-		CACHE_PERROR("enablecache: cache already enabled");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	uc = ALLOC(struct udp_cache, 1);</div><div class='del'>-	if (uc == NULL) {</div><div class='del'>-		CACHE_PERROR("enablecache: could not allocate cache");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	uc-&gt;uc_size = size;</div><div class='del'>-	uc-&gt;uc_nextvictim = 0;</div><div class='del'>-	uc-&gt;uc_entries = ALLOC(cache_ptr, size * SPARSENESS);</div><div class='del'>-	if (uc-&gt;uc_entries == NULL) {</div><div class='del'>-		CACHE_PERROR("enablecache: could not allocate cache data");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	BZERO(uc-&gt;uc_entries, cache_ptr, size * SPARSENESS);</div><div class='del'>-	uc-&gt;uc_fifo = ALLOC(cache_ptr, size);</div><div class='del'>-	if (uc-&gt;uc_fifo == NULL) {</div><div class='del'>-		CACHE_PERROR("enablecache: could not allocate cache fifo");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	BZERO(uc-&gt;uc_fifo, cache_ptr, size);</div><div class='del'>-	su-&gt;su_cache = (char *) uc;</div><div class='del'>-	return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Set an entry in the cache</div><div class='del'>- */</div><div class='del'>-static void cache_set(SVCXPRT* xprt, u_long replylen)</div><div class='del'>-{</div><div class='del'>-	register cache_ptr victim;</div><div class='del'>-	register cache_ptr *vicp;</div><div class='del'>-	register struct svcudp_data *su = su_data(xprt);</div><div class='del'>-	struct udp_cache *uc = (struct udp_cache *) su-&gt;su_cache;</div><div class='del'>-	u_int loc;</div><div class='del'>-	char *newbuf;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Find space for the new entry, either by</div><div class='del'>-	 * reusing an old entry, or by mallocing a new one</div><div class='del'>-	 */</div><div class='del'>-	victim = uc-&gt;uc_fifo[uc-&gt;uc_nextvictim];</div><div class='del'>-	if (victim != NULL) {</div><div class='del'>-		loc = CACHE_LOC(xprt, victim-&gt;cache_xid);</div><div class='del'>-		for (vicp = &amp;uc-&gt;uc_entries[loc];</div><div class='del'>-			 *vicp != NULL &amp;&amp; *vicp != victim;</div><div class='del'>-			 vicp = &amp;(*vicp)-&gt;cache_next);</div><div class='del'>-		if (*vicp == NULL) {</div><div class='del'>-			CACHE_PERROR("cache_set: victim not found");</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-		*vicp = victim-&gt;cache_next;	/* remote from cache */</div><div class='del'>-		newbuf = victim-&gt;cache_reply;</div><div class='del'>-	} else {</div><div class='del'>-		victim = ALLOC(struct cache_node, 1);</div><div class='del'>-</div><div class='del'>-		if (victim == NULL) {</div><div class='del'>-			CACHE_PERROR("cache_set: victim alloc failed");</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-		newbuf = mem_alloc(su-&gt;su_iosz);</div><div class='del'>-		if (newbuf == NULL) {</div><div class='del'>-			CACHE_PERROR("cache_set: could not allocate new rpc_buffer");</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Store it away</div><div class='del'>-	 */</div><div class='del'>-	victim-&gt;cache_replylen = replylen;</div><div class='del'>-	victim-&gt;cache_reply = rpc_buffer(xprt);</div><div class='del'>-	rpc_buffer(xprt) = newbuf;</div><div class='del'>-	xdrmem_create(&amp;(su-&gt;su_xdrs), rpc_buffer(xprt), su-&gt;su_iosz,</div><div class='del'>-				  XDR_ENCODE);</div><div class='del'>-	victim-&gt;cache_xid = su-&gt;su_xid;</div><div class='del'>-	victim-&gt;cache_proc = uc-&gt;uc_proc;</div><div class='del'>-	victim-&gt;cache_vers = uc-&gt;uc_vers;</div><div class='del'>-	victim-&gt;cache_prog = uc-&gt;uc_prog;</div><div class='del'>-	victim-&gt;cache_addr = uc-&gt;uc_addr;</div><div class='del'>-	loc = CACHE_LOC(xprt, victim-&gt;cache_xid);</div><div class='del'>-	victim-&gt;cache_next = uc-&gt;uc_entries[loc];</div><div class='del'>-	uc-&gt;uc_entries[loc] = victim;</div><div class='del'>-	uc-&gt;uc_fifo[uc-&gt;uc_nextvictim++] = victim;</div><div class='del'>-	uc-&gt;uc_nextvictim %= uc-&gt;uc_size;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Try to get an entry from the cache</div><div class='del'>- * return 1 if found, 0 if not found</div><div class='del'>- */</div><div class='del'>-static int cache_get(SVCXPRT* xprt, struct rpc_msg* msg, char** replyp, u_long* replylenp)</div><div class='del'>-{</div><div class='del'>-	u_int loc;</div><div class='del'>-	register cache_ptr ent;</div><div class='del'>-	register struct svcudp_data *su = su_data(xprt);</div><div class='del'>-	register struct udp_cache *uc = (struct udp_cache *) su-&gt;su_cache;</div><div class='del'>-</div><div class='del'>-#	define EQADDR(a1, a2)	(bcmp((char*)&amp;a1, (char*)&amp;a2, sizeof(a1)) == 0)</div><div class='del'>-</div><div class='del'>-	loc = CACHE_LOC(xprt, su-&gt;su_xid);</div><div class='del'>-	for (ent = uc-&gt;uc_entries[loc]; ent != NULL; ent = ent-&gt;cache_next) {</div><div class='del'>-		if (ent-&gt;cache_xid == su-&gt;su_xid &amp;&amp;</div><div class='del'>-			ent-&gt;cache_proc == uc-&gt;uc_proc &amp;&amp;</div><div class='del'>-			ent-&gt;cache_vers == uc-&gt;uc_vers &amp;&amp;</div><div class='del'>-			ent-&gt;cache_prog == uc-&gt;uc_prog &amp;&amp;</div><div class='del'>-			EQADDR(ent-&gt;cache_addr, uc-&gt;uc_addr)) {</div><div class='del'>-			*replyp = ent-&gt;cache_reply;</div><div class='del'>-			*replylenp = ent-&gt;cache_replylen;</div><div class='del'>-			return (1);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * Failed to find entry</div><div class='del'>-	 * Remember a few things so we can do a set later</div><div class='del'>-	 */</div><div class='del'>-	uc-&gt;uc_proc = msg-&gt;rm_call.cb_proc;</div><div class='del'>-	uc-&gt;uc_vers = msg-&gt;rm_call.cb_vers;</div><div class='del'>-	uc-&gt;uc_prog = msg-&gt;rm_call.cb_prog;</div><div class='del'>-	uc-&gt;uc_addr = xprt-&gt;xp_raddr;</div><div class='del'>-	return (0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr.c b/mdk-stage1/dietlibc/librpc/xdr.c<br/>deleted file mode 100644<br/>index 864b47dea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,536 +0,0 @@</div><div class='del'>-/* @(#)xdr.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr.c, Generic XDR routines implementation.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1986, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * These are the "generic" xdr routines used to serialize and de-serialize</div><div class='del'>- * most common data items.  See xdr.h for more info on the interface to</div><div class='del'>- * xdr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * constants specific to the xdr "protocol"</div><div class='del'>- */</div><div class='del'>-#define XDR_FALSE	((long) 0)</div><div class='del'>-#define XDR_TRUE	((long) 1)</div><div class='del'>-#define LASTUNSIGNED	((u_int) 0-1)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * for unit alignment</div><div class='del'>- */</div><div class='del'>-static char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 };</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Free a data structure using XDR</div><div class='del'>- * Not a filter, but a convenient utility nonetheless</div><div class='del'>- */</div><div class='del'>-void xdr_free(xdrproc_t proc, char* objp)</div><div class='del'>-{</div><div class='del'>-	XDR x;</div><div class='del'>-</div><div class='del'>-	x.x_op = XDR_FREE;</div><div class='del'>-	(*proc) (&amp;x, objp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR nothing</div><div class='del'>- */</div><div class='del'>-bool_t xdr_void( /* xdrs, addr */ )</div><div class='del'>-	/* XDR *xdrs; */</div><div class='del'>-	/* caddr_t addr; */</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR integers</div><div class='del'>- */</div><div class='del'>-bool_t xdr_int(XDR* xdrs, int* ip)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-#ifdef lint</div><div class='del'>-	(void) (xdr_short(xdrs, (short *) ip));</div><div class='del'>-	return (xdr_long(xdrs, (long *) ip));</div><div class='del'>-#else</div><div class='del'>-	if (sizeof(int) == sizeof(long)) {</div><div class='del'>-		return (xdr_long(xdrs, (long *) ip));</div><div class='del'>-	} else {</div><div class='del'>-		return (xdr_short(xdrs, (short *) ip));</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR unsigned integers</div><div class='del'>- */</div><div class='del'>-bool_t xdr_u_int(XDR* xdrs, unsigned int* up)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-#ifdef lint</div><div class='del'>-	(void) (xdr_short(xdrs, (short *) up));</div><div class='del'>-	return (xdr_u_long(xdrs, (u_long *) up));</div><div class='del'>-#else</div><div class='del'>-	if (sizeof(u_int) == sizeof(u_long)) {</div><div class='del'>-		return (xdr_u_long(xdrs, (u_long *) up));</div><div class='del'>-	} else {</div><div class='del'>-		return (xdr_short(xdrs, (short *) up));</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR long integers</div><div class='del'>- * same as xdr_u_long - open coded to save a proc call!</div><div class='del'>- */</div><div class='del'>-bool_t xdr_long(XDR* xdrs, long* lp)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_ENCODE)</div><div class='del'>-		return (XDR_PUTLONG(xdrs, lp));</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_DECODE)</div><div class='del'>-		return (XDR_GETLONG(xdrs, lp));</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_FREE)</div><div class='del'>-		return (TRUE);</div><div class='del'>-</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR unsigned long integers</div><div class='del'>- * same as xdr_long - open coded to save a proc call!</div><div class='del'>- */</div><div class='del'>-bool_t xdr_u_long(XDR* xdrs, unsigned long* ulp)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_DECODE)</div><div class='del'>-		return (XDR_GETLONG(xdrs, (long *) ulp));</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_ENCODE)</div><div class='del'>-		return (XDR_PUTLONG(xdrs, (long *) ulp));</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_FREE)</div><div class='del'>-		return (TRUE);</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR short integers</div><div class='del'>- */</div><div class='del'>-bool_t xdr_short(XDR* xdrs, short* sp)</div><div class='del'>-{</div><div class='del'>-	long l;</div><div class='del'>-</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		l = (long) *sp;</div><div class='del'>-		return (XDR_PUTLONG(xdrs, &amp;l));</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if (!XDR_GETLONG(xdrs, &amp;l)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		*sp = (short) l;</div><div class='del'>-		return (TRUE);</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR unsigned short integers</div><div class='del'>- */</div><div class='del'>-bool_t xdr_u_short(XDR* xdrs, unsigned short* usp)</div><div class='del'>-{</div><div class='del'>-	u_long l;</div><div class='del'>-</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		l = (u_long) * usp;</div><div class='del'>-		return (XDR_PUTLONG(xdrs, &amp;l));</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if (!XDR_GETLONG(xdrs, &amp;l)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		*usp = (u_short) l;</div><div class='del'>-		return (TRUE);</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR a char</div><div class='del'>- */</div><div class='del'>-bool_t xdr_char(XDR* xdrs, char* cp)</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	i = (*cp);</div><div class='del'>-	if (!xdr_int(xdrs, &amp;i)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	*cp = i;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR an unsigned char</div><div class='del'>- */</div><div class='del'>-bool_t xdr_u_char(XDR* xdrs, unsigned char* cp)</div><div class='del'>-{</div><div class='del'>-	u_int u;</div><div class='del'>-</div><div class='del'>-	u = (*cp);</div><div class='del'>-	if (!xdr_u_int(xdrs, &amp;u)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	*cp = u;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR booleans</div><div class='del'>- */</div><div class='del'>-bool_t xdr_bool(xdrs, bp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-bool_t *bp;</div><div class='del'>-{</div><div class='del'>-	long lb;</div><div class='del'>-</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		lb = *bp ? XDR_TRUE : XDR_FALSE;</div><div class='del'>-		return (XDR_PUTLONG(xdrs, &amp;lb));</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if (!XDR_GETLONG(xdrs, &amp;lb)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		*bp = (lb == XDR_FALSE) ? FALSE : TRUE;</div><div class='del'>-		return (TRUE);</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR enumerations</div><div class='del'>- */</div><div class='del'>-bool_t xdr_enum(xdrs, ep)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-enum_t *ep;</div><div class='del'>-{</div><div class='del'>-#ifndef lint</div><div class='del'>-	enum sizecheck { SIZEVAL };	/* used to find the size of an enum */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * enums are treated as ints</div><div class='del'>-	 */</div><div class='del'>-	if (sizeof(enum sizecheck) == sizeof(long)) {</div><div class='del'>-		return (xdr_long(xdrs, (long *) ep));</div><div class='del'>-	} else if (sizeof(enum sizecheck) == sizeof(short)) {</div><div class='del'>-		return (xdr_short(xdrs, (short *) ep));</div><div class='del'>-	} else {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-#else</div><div class='del'>-	(void) (xdr_short(xdrs, (short *) ep));</div><div class='del'>-	return (xdr_long(xdrs, (long *) ep));</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR opaque data</div><div class='del'>- * Allows the specification of a fixed size sequence of opaque bytes.</div><div class='del'>- * cp points to the opaque object and cnt gives the byte length.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_opaque(xdrs, cp, cnt)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t cp;</div><div class='del'>-register u_int cnt;</div><div class='del'>-{</div><div class='del'>-	register u_int rndup;</div><div class='del'>-	static char crud[BYTES_PER_XDR_UNIT];</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * if no data we are done</div><div class='del'>-	 */</div><div class='del'>-	if (cnt == 0)</div><div class='del'>-		return (TRUE);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * round byte count to full xdr units</div><div class='del'>-	 */</div><div class='del'>-	rndup = cnt % BYTES_PER_XDR_UNIT;</div><div class='del'>-	if (rndup &gt; 0)</div><div class='del'>-		rndup = BYTES_PER_XDR_UNIT - rndup;</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_DECODE) {</div><div class='del'>-		if (!XDR_GETBYTES(xdrs, cp, cnt)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		if (rndup == 0)</div><div class='del'>-			return (TRUE);</div><div class='del'>-		return (XDR_GETBYTES(xdrs, crud, rndup));</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_ENCODE) {</div><div class='del'>-		if (!XDR_PUTBYTES(xdrs, cp, cnt)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		if (rndup == 0)</div><div class='del'>-			return (TRUE);</div><div class='del'>-		return (XDR_PUTBYTES(xdrs, xdr_zero, rndup));</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_FREE) {</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR counted bytes</div><div class='del'>- * *cpp is a pointer to the bytes, *sizep is the count.</div><div class='del'>- * If *cpp is NULL maxsize bytes are allocated</div><div class='del'>- */</div><div class='del'>-bool_t xdr_bytes(xdrs, cpp, sizep, maxsize)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-char **cpp;</div><div class='del'>-register u_int *sizep;</div><div class='del'>-u_int maxsize;</div><div class='del'>-{</div><div class='del'>-	register char *sp = *cpp;	/* sp is the actual string pointer */</div><div class='del'>-	register u_int nodesize;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * first deal with the length since xdr bytes are counted</div><div class='del'>-	 */</div><div class='del'>-	if (!xdr_u_int(xdrs, sizep)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	nodesize = *sizep;</div><div class='del'>-	if ((nodesize &gt; maxsize) &amp;&amp; (xdrs-&gt;x_op != XDR_FREE)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * now deal with the actual bytes</div><div class='del'>-	 */</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if (nodesize == 0) {</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-		if (sp == NULL) {</div><div class='del'>-			*cpp = sp = (char *) mem_alloc(nodesize);</div><div class='del'>-		}</div><div class='del'>-		if (sp == NULL) {</div><div class='del'>-			(void) fprintf(stderr, "xdr_bytes: out of memory\n");</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		/* fall into ... */</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		return (xdr_opaque(xdrs, sp, nodesize));</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		if (sp != NULL) {</div><div class='del'>-			mem_free(sp, nodesize);</div><div class='del'>-			*cpp = NULL;</div><div class='del'>-		}</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Implemented here due to commonality of the object.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_netobj(xdrs, np)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-struct netobj *np;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return (xdr_bytes(xdrs, &amp;np-&gt;n_bytes, &amp;np-&gt;n_len, MAX_NETOBJ_SZ));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR a descriminated union</div><div class='del'>- * Support routine for discriminated unions.</div><div class='del'>- * You create an array of xdrdiscrim structures, terminated with</div><div class='del'>- * an entry with a null procedure pointer.  The routine gets</div><div class='del'>- * the discriminant value and then searches the array of xdrdiscrims</div><div class='del'>- * looking for that value.  It calls the procedure given in the xdrdiscrim</div><div class='del'>- * to handle the discriminant.  If there is no specific routine a default</div><div class='del'>- * routine may be called.</div><div class='del'>- * If there is no specific or default routine an error is returned.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_union(XDR* xdrs, enum_t* dscmp, char* unp, const struct xdr_discrim* choices, xdrproc_t dfault)</div><div class='del'>-{</div><div class='del'>-	register enum_t dscm;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * we deal with the discriminator;  it's an enum</div><div class='del'>-	 */</div><div class='del'>-	if (!xdr_enum(xdrs, dscmp)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	dscm = *dscmp;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * search choices for a value that matches the discriminator.</div><div class='del'>-	 * if we find one, execute the xdr routine for that value.</div><div class='del'>-	 */</div><div class='del'>-	for (; choices-&gt;proc != NULL_xdrproc_t; choices++) {</div><div class='del'>-		if (choices-&gt;value == dscm)</div><div class='del'>-			return ((*(choices-&gt;proc)) (xdrs, unp, LASTUNSIGNED));</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * no match - execute the default xdr routine if there is one</div><div class='del'>-	 */</div><div class='del'>-	return ((dfault == NULL_xdrproc_t) ? FALSE :</div><div class='del'>-			(*dfault) (xdrs, unp, LASTUNSIGNED));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Non-portable xdr primitives.</div><div class='del'>- * Care should be taken when moving these routines to new architectures.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR null terminated ASCII strings</div><div class='del'>- * xdr_string deals with "C strings" - arrays of bytes that are</div><div class='del'>- * terminated by a NULL character.  The parameter cpp references a</div><div class='del'>- * pointer to storage; If the pointer is null, then the necessary</div><div class='del'>- * storage is allocated.  The last parameter is the max allowed length</div><div class='del'>- * of the string as specified by a protocol.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_string(xdrs, cpp, maxsize)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-char **cpp;</div><div class='del'>-u_int maxsize;</div><div class='del'>-{</div><div class='del'>-	register char *sp = *cpp;	/* sp is the actual string pointer */</div><div class='del'>-	u_int size;</div><div class='del'>-	u_int nodesize;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * first deal with the length since xdr strings are counted-strings</div><div class='del'>-	 */</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		if (sp == NULL) {</div><div class='del'>-			return (TRUE);		/* already free */</div><div class='del'>-		}</div><div class='del'>-		/* fall through... */</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		size = strlen(sp);</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	if (!xdr_u_int(xdrs, &amp;size)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	if (size &gt; maxsize) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	nodesize = size + 1;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * now deal with the actual bytes</div><div class='del'>-	 */</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if (nodesize == 0) {</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-		if (sp == NULL)</div><div class='del'>-			*cpp = sp = (char *) mem_alloc(nodesize);</div><div class='del'>-		if (sp == NULL) {</div><div class='del'>-			(void) fprintf(stderr, "xdr_string: out of memory\n");</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		sp[size] = 0;</div><div class='del'>-		/* fall into ... */</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		return (xdr_opaque(xdrs, sp, size));</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		mem_free(sp, nodesize);</div><div class='del'>-		*cpp = NULL;</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * Wrapper for xdr_string that can be called directly from </div><div class='del'>- * routines like clnt_call</div><div class='del'>- */</div><div class='del'>-bool_t xdr_wrapstring(xdrs, cpp)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-char **cpp;</div><div class='del'>-{</div><div class='del'>-	if (xdr_string(xdrs, cpp, LASTUNSIGNED)) {</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_array.c b/mdk-stage1/dietlibc/librpc/xdr_array.c<br/>deleted file mode 100644<br/>index f8ae12b19..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_array.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_array.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,152 +0,0 @@</div><div class='del'>-/* @(#)xdr_array.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_array.c, Generic XDR routines impelmentation.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * These are the "non-trivial" xdr primitives used to serialize and de-serialize</div><div class='del'>- * arrays.  See xdr.h for more info on the interface to xdr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#define LASTUNSIGNED	((u_int)0-1)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR an array of arbitrary elements</div><div class='del'>- * *addrp is a pointer to the array, *sizep is the number of elements.</div><div class='del'>- * If addrp is NULL (*sizep * elsize) bytes are allocated.</div><div class='del'>- * elsize is the size (in bytes) of each element, and elproc is the</div><div class='del'>- * xdr procedure to call to handle each element of the array.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t *addrp;					/* array pointer */</div><div class='del'>-u_int *sizep;					/* number of elements */</div><div class='del'>-u_int maxsize;					/* max numberof elements */</div><div class='del'>-u_int elsize;					/* size in bytes of each element */</div><div class='del'>-xdrproc_t elproc;				/* xdr routine to handle each element */</div><div class='del'>-{</div><div class='del'>-	register u_int i;</div><div class='del'>-	register caddr_t target = *addrp;</div><div class='del'>-	register u_int c;			/* the actual element count */</div><div class='del'>-	register bool_t stat = TRUE;</div><div class='del'>-	register u_int nodesize;</div><div class='del'>-</div><div class='del'>-	/* like strings, arrays are really counted arrays */</div><div class='del'>-	if (!xdr_u_int(xdrs, sizep)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	c = *sizep;</div><div class='del'>-	if ((c &gt; maxsize) &amp;&amp; (xdrs-&gt;x_op != XDR_FREE)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	nodesize = c * elsize;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * if we are deserializing, we may need to allocate an array.</div><div class='del'>-	 * We also save time by checking for a null array if we are freeing.</div><div class='del'>-	 */</div><div class='del'>-	if (target == NULL)</div><div class='del'>-		switch (xdrs-&gt;x_op) {</div><div class='del'>-		case XDR_DECODE:</div><div class='del'>-			if (c == 0)</div><div class='del'>-				return (TRUE);</div><div class='del'>-			*addrp = target = mem_alloc(nodesize);</div><div class='del'>-			if (target == NULL) {</div><div class='del'>-				(void) fprintf(stderr, "xdr_array: out of memory\n");</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			bzero(target, nodesize);</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case XDR_FREE:</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * now we xdr each element of array</div><div class='del'>-	 */</div><div class='del'>-	for (i = 0; (i &lt; c) &amp;&amp; stat; i++) {</div><div class='del'>-		stat = (*elproc) (xdrs, target, LASTUNSIGNED);</div><div class='del'>-		target += elsize;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * the array may need freeing</div><div class='del'>-	 */</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_FREE) {</div><div class='del'>-		mem_free(*addrp, nodesize);</div><div class='del'>-		*addrp = NULL;</div><div class='del'>-	}</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_vector():</div><div class='del'>- *</div><div class='del'>- * XDR a fixed length array. Unlike variable-length arrays,</div><div class='del'>- * the storage of fixed length arrays is static and unfreeable.</div><div class='del'>- * &gt; basep: base of the array</div><div class='del'>- * &gt; size: size of the array</div><div class='del'>- * &gt; elemsize: size of each element</div><div class='del'>- * &gt; xdr_elem: routine to XDR each element</div><div class='del'>- */</div><div class='del'>-bool_t xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register char *basep;</div><div class='del'>-register u_int nelem;</div><div class='del'>-register u_int elemsize;</div><div class='del'>-register xdrproc_t xdr_elem;</div><div class='del'>-{</div><div class='del'>-	register u_int i;</div><div class='del'>-	register char *elptr;</div><div class='del'>-</div><div class='del'>-	elptr = basep;</div><div class='del'>-	for (i = 0; i &lt; nelem; i++) {</div><div class='del'>-		if (!(*xdr_elem) (xdrs, elptr, LASTUNSIGNED)) {</div><div class='del'>-			return (FALSE);</div><div class='del'>-		}</div><div class='del'>-		elptr += elemsize;</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_float.c b/mdk-stage1/dietlibc/librpc/xdr_float.c<br/>deleted file mode 100644<br/>index f8eb5e99c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_float.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_float.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,284 +0,0 @@</div><div class='del'>-/* @(#)xdr_float.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_float.c, Generic XDR routines impelmentation.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * These are the "floating point" xdr routines used to (de)serialize</div><div class='del'>- * most common data items.  See xdr.h for more info on the interface to</div><div class='del'>- * xdr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * NB: Not portable.</div><div class='del'>- * This routine works on Suns (Sky / 68000's) and Vaxen.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-/* cheat big time */</div><div class='del'>-#define sparc</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef vax</div><div class='del'>-</div><div class='del'>-/* What IEEE single precision floating point looks like on a Vax */</div><div class='del'>-struct ieee_single {</div><div class='del'>-	unsigned int mantissa:23;</div><div class='del'>-	unsigned int exp:8;</div><div class='del'>-	unsigned int sign:1;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Vax single precision floating point */</div><div class='del'>-struct vax_single {</div><div class='del'>-	unsigned int mantissa1:7;</div><div class='del'>-	unsigned int exp:8;</div><div class='del'>-	unsigned int sign:1;</div><div class='del'>-	unsigned int mantissa2:16;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define VAX_SNG_BIAS	0x81</div><div class='del'>-#define IEEE_SNG_BIAS	0x7f</div><div class='del'>-</div><div class='del'>-static struct sgl_limits {</div><div class='del'>-	struct vax_single s;</div><div class='del'>-	struct ieee_single ieee;</div><div class='del'>-} sgl_limits[2] = {</div><div class='del'>-	{ {</div><div class='del'>-	0x7f, 0xff, 0x0, 0xffff},	/* Max Vax */</div><div class='del'>-	{</div><div class='del'>-	0x0, 0xff, 0x0}},			/* Max IEEE */</div><div class='del'>-	{ {</div><div class='del'>-	0x0, 0x0, 0x0, 0x0},		/* Min Vax */</div><div class='del'>-	{</div><div class='del'>-	0x0, 0x0, 0x0}}				/* Min IEEE */</div><div class='del'>-};</div><div class='del'>-#endif							/* vax */</div><div class='del'>-</div><div class='del'>-bool_t xdr_float(xdrs, fp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register float *fp;</div><div class='del'>-{</div><div class='del'>-#if !defined(mc68000) &amp;&amp; !defined(sparc)</div><div class='del'>-	struct ieee_single is;</div><div class='del'>-	struct vax_single vs, *vsp;</div><div class='del'>-	struct sgl_limits *lim;</div><div class='del'>-	int i;</div><div class='del'>-#endif</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-#if defined(mc68000) || defined(sparc)</div><div class='del'>-		return (XDR_PUTLONG(xdrs, (long *) fp));</div><div class='del'>-#else</div><div class='del'>-		vs = *((struct vax_single *) fp);</div><div class='del'>-		for (i = 0, lim = sgl_limits;</div><div class='del'>-</div><div class='del'>-			 i &lt; sizeof(sgl_limits) / sizeof(struct sgl_limits);</div><div class='del'>-			 i++, lim++) {</div><div class='del'>-			if ((vs.mantissa2 == lim-&gt;s.mantissa2) &amp;&amp;</div><div class='del'>-				(vs.exp == lim-&gt;s.exp) &amp;&amp;</div><div class='del'>-				(vs.mantissa1 == lim-&gt;s.mantissa1)) {</div><div class='del'>-				is = lim-&gt;ieee;</div><div class='del'>-				goto shipit;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		is.exp = vs.exp - VAX_SNG_BIAS + IEEE_SNG_BIAS;</div><div class='del'>-		is.mantissa = (vs.mantissa1 &lt;&lt; 16) | vs.mantissa2;</div><div class='del'>-	  shipit:</div><div class='del'>-		is.sign = vs.sign;</div><div class='del'>-		return (XDR_PUTLONG(xdrs, (long *) &amp;is));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-#if defined(mc68000) || defined(sparc)</div><div class='del'>-		return (XDR_GETLONG(xdrs, (long *) fp));</div><div class='del'>-#else</div><div class='del'>-		vsp = (struct vax_single *) fp;</div><div class='del'>-		if (!XDR_GETLONG(xdrs, (long *) &amp;is))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		for (i = 0, lim = sgl_limits;</div><div class='del'>-</div><div class='del'>-			 i &lt; sizeof(sgl_limits) / sizeof(struct sgl_limits);</div><div class='del'>-			 i++, lim++) {</div><div class='del'>-			if ((is.exp == lim-&gt;ieee.exp) &amp;&amp;</div><div class='del'>-				(is.mantissa == lim-&gt;ieee.mantissa)) {</div><div class='del'>-				*vsp = lim-&gt;s;</div><div class='del'>-				goto doneit;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		vsp-&gt;exp = is.exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;</div><div class='del'>-		vsp-&gt;mantissa2 = is.mantissa;</div><div class='del'>-		vsp-&gt;mantissa1 = (is.mantissa &gt;&gt; 16);</div><div class='del'>-	  doneit:</div><div class='del'>-		vsp-&gt;sign = is.sign;</div><div class='del'>-		return (TRUE);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This routine works on Suns (Sky / 68000's) and Vaxen.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef vax</div><div class='del'>-/* What IEEE double precision floating point looks like on a Vax */</div><div class='del'>-struct ieee_double {</div><div class='del'>-	unsigned int mantissa1:20;</div><div class='del'>-	unsigned int exp:11;</div><div class='del'>-	unsigned int sign:1;</div><div class='del'>-	unsigned int mantissa2:32;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Vax double precision floating point */</div><div class='del'>-struct vax_double {</div><div class='del'>-	unsigned int mantissa1:7;</div><div class='del'>-	unsigned int exp:8;</div><div class='del'>-	unsigned int sign:1;</div><div class='del'>-	unsigned int mantissa2:16;</div><div class='del'>-	unsigned int mantissa3:16;</div><div class='del'>-	unsigned int mantissa4:16;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define VAX_DBL_BIAS	0x81</div><div class='del'>-#define IEEE_DBL_BIAS	0x3ff</div><div class='del'>-#define MASK(nbits)	((1 &lt;&lt; nbits) - 1)</div><div class='del'>-</div><div class='del'>-static struct dbl_limits {</div><div class='del'>-	struct vax_double d;</div><div class='del'>-	struct ieee_double ieee;</div><div class='del'>-} dbl_limits[2] = {</div><div class='del'>-	{ {</div><div class='del'>-	0x7f, 0xff, 0x0, 0xffff, 0xffff, 0xffff},	/* Max Vax */</div><div class='del'>-	{</div><div class='del'>-	0x0, 0x7ff, 0x0, 0x0}},		/* Max IEEE */</div><div class='del'>-	{ {</div><div class='del'>-	0x0, 0x0, 0x0, 0x0, 0x0, 0x0},	/* Min Vax */</div><div class='del'>-	{</div><div class='del'>-	0x0, 0x0, 0x0, 0x0}}		/* Min IEEE */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#endif							/* vax */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-bool_t xdr_double(xdrs, dp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-double *dp;</div><div class='del'>-{</div><div class='del'>-	register long *lp;</div><div class='del'>-</div><div class='del'>-#if !defined(mc68000) &amp;&amp; !defined(sparc)</div><div class='del'>-	struct ieee_double id;</div><div class='del'>-	struct vax_double vd;</div><div class='del'>-	register struct dbl_limits *lim;</div><div class='del'>-	int i;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-#if defined(mc68000) || defined(sparc)</div><div class='del'>-		lp = (long *) dp;</div><div class='del'>-#else</div><div class='del'>-		vd = *((struct vax_double *) dp);</div><div class='del'>-		for (i = 0, lim = dbl_limits;</div><div class='del'>-</div><div class='del'>-			 i &lt; sizeof(dbl_limits) / sizeof(struct dbl_limits);</div><div class='del'>-			 i++, lim++) {</div><div class='del'>-			if ((vd.mantissa4 == lim-&gt;d.mantissa4) &amp;&amp;</div><div class='del'>-				(vd.mantissa3 == lim-&gt;d.mantissa3) &amp;&amp;</div><div class='del'>-				(vd.mantissa2 == lim-&gt;d.mantissa2) &amp;&amp;</div><div class='del'>-				(vd.mantissa1 == lim-&gt;d.mantissa1) &amp;&amp;</div><div class='del'>-				(vd.exp == lim-&gt;d.exp)) {</div><div class='del'>-				id = lim-&gt;ieee;</div><div class='del'>-				goto shipit;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;</div><div class='del'>-		id.mantissa1 = (vd.mantissa1 &lt;&lt; 13) | (vd.mantissa2 &gt;&gt; 3);</div><div class='del'>-		id.mantissa2 = ((vd.mantissa2 &amp; MASK(3)) &lt;&lt; 29) |</div><div class='del'>-			(vd.mantissa3 &lt;&lt; 13) | ((vd.mantissa4 &gt;&gt; 3) &amp; MASK(13));</div><div class='del'>-	  shipit:</div><div class='del'>-		id.sign = vd.sign;</div><div class='del'>-		lp = (long *) &amp;id;</div><div class='del'>-#endif</div><div class='del'>-		return (XDR_PUTLONG(xdrs, lp++) &amp;&amp; XDR_PUTLONG(xdrs, lp));</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-#if defined(mc68000) || defined(sparc)</div><div class='del'>-		lp = (long *) dp;</div><div class='del'>-		return (XDR_GETLONG(xdrs, lp++) &amp;&amp; XDR_GETLONG(xdrs, lp));</div><div class='del'>-#else</div><div class='del'>-		lp = (long *) &amp;id;</div><div class='del'>-		if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		for (i = 0, lim = dbl_limits;</div><div class='del'>-</div><div class='del'>-			 i &lt; sizeof(dbl_limits) / sizeof(struct dbl_limits);</div><div class='del'>-			 i++, lim++) {</div><div class='del'>-			if ((id.mantissa2 == lim-&gt;ieee.mantissa2) &amp;&amp;</div><div class='del'>-				(id.mantissa1 == lim-&gt;ieee.mantissa1) &amp;&amp;</div><div class='del'>-				(id.exp == lim-&gt;ieee.exp)) {</div><div class='del'>-				vd = lim-&gt;d;</div><div class='del'>-				goto doneit;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;</div><div class='del'>-		vd.mantissa1 = (id.mantissa1 &gt;&gt; 13);</div><div class='del'>-		vd.mantissa2 = ((id.mantissa1 &amp; MASK(13)) &lt;&lt; 3) |</div><div class='del'>-			(id.mantissa2 &gt;&gt; 29);</div><div class='del'>-		vd.mantissa3 = (id.mantissa2 &gt;&gt; 13);</div><div class='del'>-		vd.mantissa4 = (id.mantissa2 &lt;&lt; 3);</div><div class='del'>-	  doneit:</div><div class='del'>-		vd.sign = id.sign;</div><div class='del'>-		*dp = *((double *) &amp;vd);</div><div class='del'>-		return (TRUE);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	case XDR_FREE:</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_mem.c b/mdk-stage1/dietlibc/librpc/xdr_mem.c<br/>deleted file mode 100644<br/>index 755f6abf1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_mem.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_mem.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,180 +0,0 @@</div><div class='del'>-/* @(#)xdr_mem.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_mem.h, XDR implementation using memory buffers.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * If you have some data to be interpreted as external data representation</div><div class='del'>- * or to be converted to external data representation in a memory buffer,</div><div class='del'>- * then this is the package for you.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_getlong();</div><div class='del'>-static bool_t xdrmem_putlong();</div><div class='del'>-static bool_t xdrmem_getbytes();</div><div class='del'>-static bool_t xdrmem_putbytes();</div><div class='del'>-static u_int xdrmem_getpos();</div><div class='del'>-static bool_t xdrmem_setpos();</div><div class='del'>-static int32_t *xdrmem_inline();</div><div class='del'>-static void xdrmem_destroy();</div><div class='del'>-</div><div class='del'>-static struct xdr_ops xdrmem_ops = {</div><div class='del'>-	xdrmem_getlong,</div><div class='del'>-	xdrmem_putlong,</div><div class='del'>-	xdrmem_getbytes,</div><div class='del'>-	xdrmem_putbytes,</div><div class='del'>-	xdrmem_getpos,</div><div class='del'>-	xdrmem_setpos,</div><div class='del'>-	xdrmem_inline,</div><div class='del'>-	xdrmem_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The procedure xdrmem_create initializes a stream descriptor for a</div><div class='del'>- * memory buffer.  </div><div class='del'>- */</div><div class='del'>-void xdrmem_create(xdrs, addr, size, op)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t addr;</div><div class='del'>-u_int size;</div><div class='del'>-enum xdr_op op;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = op;</div><div class='del'>-	xdrs-&gt;x_ops = &amp;xdrmem_ops;</div><div class='del'>-	xdrs-&gt;x_private = xdrs-&gt;x_base = addr;</div><div class='del'>-	xdrs-&gt;x_handy = size;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void xdrmem_destroy( /*xdrs */ )</div><div class='del'>-	/*XDR *xdrs; */</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_getlong(xdrs, lp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-long *lp;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((xdrs-&gt;x_handy -= sizeof(long)) &lt; 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-</div><div class='del'>-	*lp = (long) ntohl((u_long) (*((long *) (xdrs-&gt;x_private))));</div><div class='del'>-	xdrs-&gt;x_private += sizeof(long);</div><div class='del'>-</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_putlong(xdrs, lp)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-long *lp;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((xdrs-&gt;x_handy -= sizeof(long)) &lt; 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-</div><div class='del'>-	*(long *) xdrs-&gt;x_private = (long) htonl((u_long) (*lp));</div><div class='del'>-	xdrs-&gt;x_private += sizeof(long);</div><div class='del'>-</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_getbytes(xdrs, addr, len)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t addr;</div><div class='del'>-register u_int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((xdrs-&gt;x_handy -= len) &lt; 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	bcopy(xdrs-&gt;x_private, addr, len);</div><div class='del'>-	xdrs-&gt;x_private += len;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_putbytes(xdrs, addr, len)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t addr;</div><div class='del'>-register u_int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((xdrs-&gt;x_handy -= len) &lt; 0)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	bcopy(addr, xdrs-&gt;x_private, len);</div><div class='del'>-	xdrs-&gt;x_private += len;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_int xdrmem_getpos(xdrs)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return ((u_int) xdrs-&gt;x_private - (u_int) xdrs-&gt;x_base);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrmem_setpos(xdrs, pos)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-u_int pos;</div><div class='del'>-{</div><div class='del'>-	register caddr_t newaddr = xdrs-&gt;x_base + pos;</div><div class='del'>-	register caddr_t lastaddr = xdrs-&gt;x_private + xdrs-&gt;x_handy;</div><div class='del'>-</div><div class='del'>-	if ((long) newaddr &gt; (long) lastaddr)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	xdrs-&gt;x_private = newaddr;</div><div class='del'>-	xdrs-&gt;x_handy = (int) lastaddr - (int) newaddr;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int32_t *xdrmem_inline(xdrs, len)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-int len;</div><div class='del'>-{</div><div class='del'>-	int32_t *buf = 0;</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_handy &gt;= len) {</div><div class='del'>-		xdrs-&gt;x_handy -= len;</div><div class='del'>-		buf = (int32_t *) xdrs-&gt;x_private;</div><div class='del'>-		xdrs-&gt;x_private += len;</div><div class='del'>-	}</div><div class='del'>-	return (buf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_rec.c b/mdk-stage1/dietlibc/librpc/xdr_rec.c<br/>deleted file mode 100644<br/>index 83e800f5e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_rec.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_rec.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,573 +0,0 @@</div><div class='del'>-/* @(#)xdr_rec.c	2.2 88/08/01 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"</div><div class='del'>- * layer above tcp (for rpc's use).</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * These routines interface XDRSTREAMS to a tcp/ip connection.</div><div class='del'>- * There is a record marking layer between the xdr stream</div><div class='del'>- * and the tcp transport level.  A record is composed on one or more</div><div class='del'>- * record fragments.  A record fragment is a thirty-two bit header followed</div><div class='del'>- * by n bytes of data, where n is contained in the header.  The header</div><div class='del'>- * is represented as a htonl(u_long).  Thegh order bit encodes</div><div class='del'>- * whether or not the fragment is the last fragment of the record</div><div class='del'>- * (1 =&gt; fragment is last, 0 =&gt; more fragments to follow. </div><div class='del'>- * The other 31 bits encode the byte length of the fragment.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-extern long lseek();</div><div class='del'>-</div><div class='del'>-static u_int fix_buf_size();</div><div class='del'>-</div><div class='del'>-static bool_t xdrrec_getlong();</div><div class='del'>-static bool_t xdrrec_putlong();</div><div class='del'>-static bool_t xdrrec_getbytes();</div><div class='del'>-static bool_t xdrrec_putbytes();</div><div class='del'>-static u_int xdrrec_getpos();</div><div class='del'>-static bool_t xdrrec_setpos();</div><div class='del'>-static int32_t *xdrrec_inline();</div><div class='del'>-static void xdrrec_destroy();</div><div class='del'>-</div><div class='del'>-static struct xdr_ops xdrrec_ops = {</div><div class='del'>-	xdrrec_getlong,</div><div class='del'>-	xdrrec_putlong,</div><div class='del'>-	xdrrec_getbytes,</div><div class='del'>-	xdrrec_putbytes,</div><div class='del'>-	xdrrec_getpos,</div><div class='del'>-	xdrrec_setpos,</div><div class='del'>-	xdrrec_inline,</div><div class='del'>-	xdrrec_destroy</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A record is composed of one or more record fragments.</div><div class='del'>- * A record fragment is a two-byte header followed by zero to</div><div class='del'>- * 2**32-1 bytes.  The header is treated as a long unsigned and is</div><div class='del'>- * encode/decoded to the network via htonl/ntohl.  The low order 31 bits</div><div class='del'>- * are a byte count of the fragment.  The highest order bit is a boolean:</div><div class='del'>- * 1 =&gt; this fragment is the last fragment of the record,</div><div class='del'>- * 0 =&gt; this fragment is followed by more fragment(s).</div><div class='del'>- *</div><div class='del'>- * The fragment/record machinery is not general;  it is constructed to</div><div class='del'>- * meet the needs of xdr and rpc based on tcp.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define LAST_FRAG ((u_long)(1 &lt;&lt; 31))</div><div class='del'>-</div><div class='del'>-typedef struct rec_strm {</div><div class='del'>-	caddr_t tcp_handle;</div><div class='del'>-	caddr_t the_buffer;</div><div class='del'>-	/*</div><div class='del'>-	 * out-goung bits</div><div class='del'>-	 */</div><div class='del'>-	int (*writeit) ();</div><div class='del'>-	caddr_t out_base;			/* output buffer (points to frag header) */</div><div class='del'>-	caddr_t out_finger;			/* next output position */</div><div class='del'>-	caddr_t out_boundry;		/* data cannot up to this address */</div><div class='del'>-	u_long *frag_header;		/* beginning of curren fragment */</div><div class='del'>-	bool_t frag_sent;			/* true if buffer sent in middle of record */</div><div class='del'>-	/*</div><div class='del'>-	 * in-coming bits</div><div class='del'>-	 */</div><div class='del'>-	int (*readit) ();</div><div class='del'>-	u_long in_size;				/* fixed size of the input buffer */</div><div class='del'>-	caddr_t in_base;</div><div class='del'>-	caddr_t in_finger;			/* location of next byte to be had */</div><div class='del'>-	caddr_t in_boundry;			/* can read up to this location */</div><div class='del'>-	long fbtbc;					/* fragment bytes to be consumed */</div><div class='del'>-	bool_t last_frag;</div><div class='del'>-	u_int sendsize;</div><div class='del'>-	u_int recvsize;</div><div class='del'>-} RECSTREAM;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create an xdr handle for xdrrec</div><div class='del'>- * xdrrec_create fills in xdrs.  Sendsize and recvsize are</div><div class='del'>- * send and recv buffer sizes (0 =&gt; use default).</div><div class='del'>- * tcp_handle is an opaque handle that is passed as the first parameter to</div><div class='del'>- * the procedures readit and writeit.  Readit and writeit are read and</div><div class='del'>- * write respectively.   They are like the system</div><div class='del'>- * calls expect that they take an opaque handle rather than an fd.</div><div class='del'>- */</div><div class='del'>-void xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-register u_int sendsize;</div><div class='del'>-register u_int recvsize;</div><div class='del'>-caddr_t tcp_handle;</div><div class='del'>-int (*readit) ();				/* like read, but pass it a tcp_handle, not sock */</div><div class='del'>-int (*writeit) ();				/* like write, but pass it a tcp_handle, not sock */</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) mem_alloc(sizeof(RECSTREAM));</div><div class='del'>-</div><div class='del'>-	if (rstrm == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "xdrrec_create: out of memory\n");</div><div class='del'>-		/* </div><div class='del'>-		 *  This is bad.  Should rework xdrrec_create to </div><div class='del'>-		 *  return a handle, and in this case return NULL</div><div class='del'>-		 */</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * adjust sizes and allocate buffer quad byte aligned</div><div class='del'>-	 */</div><div class='del'>-	rstrm-&gt;sendsize = sendsize = fix_buf_size(sendsize);</div><div class='del'>-	rstrm-&gt;recvsize = recvsize = fix_buf_size(recvsize);</div><div class='del'>-	rstrm-&gt;the_buffer =</div><div class='del'>-		mem_alloc(sendsize + recvsize + BYTES_PER_XDR_UNIT);</div><div class='del'>-	if (rstrm-&gt;the_buffer == NULL) {</div><div class='del'>-		(void) fprintf(stderr, "xdrrec_create: out of memory\n");</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	for (rstrm-&gt;out_base = rstrm-&gt;the_buffer;</div><div class='del'>-		 (u_int) rstrm-&gt;out_base % BYTES_PER_XDR_UNIT != 0;</div><div class='del'>-		 rstrm-&gt;out_base++);</div><div class='del'>-	rstrm-&gt;in_base = rstrm-&gt;out_base + sendsize;</div><div class='del'>-	/*</div><div class='del'>-	 * now the rest ...</div><div class='del'>-	 */</div><div class='del'>-	xdrs-&gt;x_ops = &amp;xdrrec_ops;</div><div class='del'>-	xdrs-&gt;x_private = (caddr_t) rstrm;</div><div class='del'>-	rstrm-&gt;tcp_handle = tcp_handle;</div><div class='del'>-	rstrm-&gt;readit = readit;</div><div class='del'>-	rstrm-&gt;writeit = writeit;</div><div class='del'>-	rstrm-&gt;out_finger = rstrm-&gt;out_boundry = rstrm-&gt;out_base;</div><div class='del'>-	rstrm-&gt;frag_header = (u_long *) rstrm-&gt;out_base;</div><div class='del'>-	rstrm-&gt;out_finger += sizeof(u_long);</div><div class='del'>-	rstrm-&gt;out_boundry += sendsize;</div><div class='del'>-	rstrm-&gt;frag_sent = FALSE;</div><div class='del'>-	rstrm-&gt;in_size = recvsize;</div><div class='del'>-	rstrm-&gt;in_boundry = rstrm-&gt;in_base;</div><div class='del'>-	rstrm-&gt;in_finger = (rstrm-&gt;in_boundry += recvsize);</div><div class='del'>-	rstrm-&gt;fbtbc = 0;</div><div class='del'>-	rstrm-&gt;last_frag = TRUE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The reoutines defined below are the xdr ops which will go into the</div><div class='del'>- * xdr handle filled in by xdrrec_create.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static bool_t xdrrec_getlong(xdrs, lp)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-long *lp;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-	register long *buflp = (long *) (rstrm-&gt;in_finger);</div><div class='del'>-	long mylong;</div><div class='del'>-</div><div class='del'>-	/* first try the inline, fast case */</div><div class='del'>-	if ((rstrm-&gt;fbtbc &gt;= sizeof(long)) &amp;&amp;</div><div class='del'>-		(((int) rstrm-&gt;in_boundry - (int) buflp) &gt;= sizeof(long))) {</div><div class='del'>-		*lp = (long) ntohl((u_long) (*buflp));</div><div class='del'>-		rstrm-&gt;fbtbc -= sizeof(long);</div><div class='del'>-		rstrm-&gt;in_finger += sizeof(long);</div><div class='del'>-	} else {</div><div class='del'>-		if (!xdrrec_getbytes(xdrs, (caddr_t) &amp; mylong, sizeof(long)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-</div><div class='del'>-		*lp = (long) ntohl((u_long) mylong);</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Internal useful routines</div><div class='del'>- */</div><div class='del'>-static bool_t flush_out(RECSTREAM* rstrm, bool_t eor)</div><div class='del'>-{</div><div class='del'>-	register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;</div><div class='del'>-	register u_long len = (u_long) (rstrm-&gt;out_finger) -</div><div class='del'>-		(u_long) (rstrm-&gt;frag_header) - sizeof(u_long);</div><div class='del'>-</div><div class='del'>-	*(rstrm-&gt;frag_header) = htonl(len | eormask);</div><div class='del'>-	len = (u_long) (rstrm-&gt;out_finger) - (u_long) (rstrm-&gt;out_base);</div><div class='del'>-	if ((*(rstrm-&gt;writeit)) (rstrm-&gt;tcp_handle, rstrm-&gt;out_base, (int) len)</div><div class='del'>-		!= (int) len)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	rstrm-&gt;frag_header = (u_long *) rstrm-&gt;out_base;</div><div class='del'>-	rstrm-&gt;out_finger = (caddr_t) rstrm-&gt;out_base + sizeof(u_long);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t</div><div class='del'>-/* knows nothing about records!  Only about input buffers */</div><div class='del'>-fill_input_buf(rstrm)</div><div class='del'>-register RECSTREAM *rstrm;</div><div class='del'>-{</div><div class='del'>-	register caddr_t where;</div><div class='del'>-	u_int i;</div><div class='del'>-	register int len;</div><div class='del'>-</div><div class='del'>-	where = rstrm-&gt;in_base;</div><div class='del'>-	i = (u_int) rstrm-&gt;in_boundry % BYTES_PER_XDR_UNIT;</div><div class='del'>-	where += i;</div><div class='del'>-	len = rstrm-&gt;in_size - i;</div><div class='del'>-	if ((len = (*(rstrm-&gt;readit)) (rstrm-&gt;tcp_handle, where, len)) == -1)</div><div class='del'>-		return (FALSE);</div><div class='del'>-	rstrm-&gt;in_finger = where;</div><div class='del'>-	where += len;</div><div class='del'>-	rstrm-&gt;in_boundry = where;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t</div><div class='del'>-/* knows nothing about records!  Only about input buffers */</div><div class='del'>-get_input_bytes(rstrm, addr, len)</div><div class='del'>-register RECSTREAM *rstrm;</div><div class='del'>-register caddr_t addr;</div><div class='del'>-register int len;</div><div class='del'>-{</div><div class='del'>-	register int current;</div><div class='del'>-</div><div class='del'>-	while (len &gt; 0) {</div><div class='del'>-		current = (int) rstrm-&gt;in_boundry - (int) rstrm-&gt;in_finger;</div><div class='del'>-		if (current == 0) {</div><div class='del'>-			if (!fill_input_buf(rstrm))</div><div class='del'>-				return (FALSE);</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		current = (len &lt; current) ? len : current;</div><div class='del'>-		bcopy(rstrm-&gt;in_finger, addr, current);</div><div class='del'>-		rstrm-&gt;in_finger += current;</div><div class='del'>-		addr += current;</div><div class='del'>-		len -= current;</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t</div><div class='del'>-/* next two bytes of the input stream are treated as a header */</div><div class='del'>-set_input_fragment(rstrm)</div><div class='del'>-register RECSTREAM *rstrm;</div><div class='del'>-{</div><div class='del'>-	u_long header;</div><div class='del'>-</div><div class='del'>-	if (!get_input_bytes(rstrm, (caddr_t) &amp; header, sizeof(header)))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	header = (long) ntohl(header);</div><div class='del'>-	rstrm-&gt;last_frag = ((header &amp; LAST_FRAG) == 0) ? FALSE : TRUE;</div><div class='del'>-	rstrm-&gt;fbtbc = header &amp; (~LAST_FRAG);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t</div><div class='del'>-/* consumes input bytes; knows nothing about records! */</div><div class='del'>-skip_input_bytes(rstrm, cnt)</div><div class='del'>-register RECSTREAM *rstrm;</div><div class='del'>-long cnt;</div><div class='del'>-{</div><div class='del'>-	register int current;</div><div class='del'>-</div><div class='del'>-	while (cnt &gt; 0) {</div><div class='del'>-		current = (int) rstrm-&gt;in_boundry - (int) rstrm-&gt;in_finger;</div><div class='del'>-		if (current == 0) {</div><div class='del'>-			if (!fill_input_buf(rstrm))</div><div class='del'>-				return (FALSE);</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		current = (cnt &lt; current) ? cnt : current;</div><div class='del'>-		rstrm-&gt;in_finger += current;</div><div class='del'>-		cnt -= current;</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_int fix_buf_size(s)</div><div class='del'>-register u_int s;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (s &lt; 100)</div><div class='del'>-		s = 4000;</div><div class='del'>-	return (RNDUP(s));</div><div class='del'>-}</div><div class='del'>-static bool_t xdrrec_putlong(xdrs, lp)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-long *lp;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-	register long *dest_lp = ((long *) (rstrm-&gt;out_finger));</div><div class='del'>-</div><div class='del'>-	if ((rstrm-&gt;out_finger += sizeof(long)) &gt; rstrm-&gt;out_boundry) {</div><div class='del'>-		/*</div><div class='del'>-		 * this case should almost never happen so the code is</div><div class='del'>-		 * inefficient</div><div class='del'>-		 */</div><div class='del'>-		rstrm-&gt;out_finger -= sizeof(long);</div><div class='del'>-</div><div class='del'>-		rstrm-&gt;frag_sent = TRUE;</div><div class='del'>-		if (!flush_out(rstrm, FALSE))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		dest_lp = ((long *) (rstrm-&gt;out_finger));</div><div class='del'>-		rstrm-&gt;out_finger += sizeof(long);</div><div class='del'>-	}</div><div class='del'>-	*dest_lp = (long) htonl((u_long) (*lp));</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t</div><div class='del'>-/* must manage buffers, fragments, and records */</div><div class='del'>-xdrrec_getbytes(xdrs, addr, len)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-register caddr_t addr;</div><div class='del'>-register u_int len;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-	register int current;</div><div class='del'>-</div><div class='del'>-	while (len &gt; 0) {</div><div class='del'>-		current = rstrm-&gt;fbtbc;</div><div class='del'>-		if (current == 0) {</div><div class='del'>-			if (rstrm-&gt;last_frag)</div><div class='del'>-				return (FALSE);</div><div class='del'>-			if (!set_input_fragment(rstrm))</div><div class='del'>-				return (FALSE);</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		current = (len &lt; current) ? len : current;</div><div class='del'>-		if (!get_input_bytes(rstrm, addr, current))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		addr += current;</div><div class='del'>-		rstrm-&gt;fbtbc -= current;</div><div class='del'>-		len -= current;</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrrec_putbytes(xdrs, addr, len)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-register caddr_t addr;</div><div class='del'>-register u_int len;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-	register int current;</div><div class='del'>-</div><div class='del'>-	while (len &gt; 0) {</div><div class='del'>-		current = (u_int) rstrm-&gt;out_boundry - (u_int) rstrm-&gt;out_finger;</div><div class='del'>-		current = (len &lt; current) ? len : current;</div><div class='del'>-		bcopy(addr, rstrm-&gt;out_finger, current);</div><div class='del'>-		rstrm-&gt;out_finger += current;</div><div class='del'>-		addr += current;</div><div class='del'>-		len -= current;</div><div class='del'>-		if (rstrm-&gt;out_finger == rstrm-&gt;out_boundry) {</div><div class='del'>-			rstrm-&gt;frag_sent = TRUE;</div><div class='del'>-			if (!flush_out(rstrm, FALSE))</div><div class='del'>-				return (FALSE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_int xdrrec_getpos(xdrs)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) xdrs-&gt;x_private;</div><div class='del'>-	register long pos;</div><div class='del'>-</div><div class='del'>-	pos = lseek((int) rstrm-&gt;tcp_handle, (long) 0, 1);</div><div class='del'>-	if (pos != -1)</div><div class='del'>-		switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-		case XDR_ENCODE:</div><div class='del'>-			pos += rstrm-&gt;out_finger - rstrm-&gt;out_base;</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case XDR_DECODE:</div><div class='del'>-			pos -= rstrm-&gt;in_boundry - rstrm-&gt;in_finger;</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		default:</div><div class='del'>-			pos = (u_int) - 1;</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	return ((u_int) pos);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrrec_setpos(xdrs, pos)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-u_int pos;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) xdrs-&gt;x_private;</div><div class='del'>-	u_int currpos = xdrrec_getpos(xdrs);</div><div class='del'>-	int delta = currpos - pos;</div><div class='del'>-	caddr_t newpos;</div><div class='del'>-</div><div class='del'>-	if ((int) currpos != -1)</div><div class='del'>-		switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-		case XDR_ENCODE:</div><div class='del'>-			newpos = rstrm-&gt;out_finger - delta;</div><div class='del'>-			if ((newpos &gt; (caddr_t) (rstrm-&gt;frag_header)) &amp;&amp;</div><div class='del'>-				(newpos &lt; rstrm-&gt;out_boundry)) {</div><div class='del'>-				rstrm-&gt;out_finger = newpos;</div><div class='del'>-				return (TRUE);</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case XDR_DECODE:</div><div class='del'>-			newpos = rstrm-&gt;in_finger - delta;</div><div class='del'>-			if ((delta &lt; (int) (rstrm-&gt;fbtbc)) &amp;&amp;</div><div class='del'>-				(newpos &lt;= rstrm-&gt;in_boundry) &amp;&amp;</div><div class='del'>-				(newpos &gt;= rstrm-&gt;in_base)) {</div><div class='del'>-				rstrm-&gt;in_finger = newpos;</div><div class='del'>-				rstrm-&gt;fbtbc -= delta;</div><div class='del'>-				return (TRUE);</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int32_t *xdrrec_inline(xdrs, len)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-int len;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) xdrs-&gt;x_private;</div><div class='del'>-	int32_t *buf = NULL;</div><div class='del'>-</div><div class='del'>-	switch (xdrs-&gt;x_op) {</div><div class='del'>-</div><div class='del'>-	case XDR_ENCODE:</div><div class='del'>-		if ((rstrm-&gt;out_finger + len) &lt;= rstrm-&gt;out_boundry) {</div><div class='del'>-			buf = (int32_t *) rstrm-&gt;out_finger;</div><div class='del'>-			rstrm-&gt;out_finger += len;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case XDR_DECODE:</div><div class='del'>-		if ((len &lt;= rstrm-&gt;fbtbc) &amp;&amp;</div><div class='del'>-			((rstrm-&gt;in_finger + len) &lt;= rstrm-&gt;in_boundry)) {</div><div class='del'>-			buf = (int32_t *) rstrm-&gt;in_finger;</div><div class='del'>-			rstrm-&gt;fbtbc -= len;</div><div class='del'>-			rstrm-&gt;in_finger += len;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	return (buf);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void xdrrec_destroy(xdrs)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) xdrs-&gt;x_private;</div><div class='del'>-</div><div class='del'>-	mem_free(rstrm-&gt;the_buffer,</div><div class='del'>-			 rstrm-&gt;sendsize + rstrm-&gt;recvsize + BYTES_PER_XDR_UNIT);</div><div class='del'>-	mem_free((caddr_t) rstrm, sizeof(RECSTREAM));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Exported routines to manage xdr records</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Before reading (deserializing from the stream, one should always call</div><div class='del'>- * this procedure to guarantee proper record alignment.</div><div class='del'>- */</div><div class='del'>-bool_t xdrrec_skiprecord(xdrs)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-</div><div class='del'>-	while (rstrm-&gt;fbtbc &gt; 0 || (!rstrm-&gt;last_frag)) {</div><div class='del'>-		if (!skip_input_bytes(rstrm, rstrm-&gt;fbtbc))</div><div class='del'>-			return (FALSE);</div><div class='del'>-		rstrm-&gt;fbtbc = 0;</div><div class='del'>-		if ((!rstrm-&gt;last_frag) &amp;&amp; (!set_input_fragment(rstrm)))</div><div class='del'>-			return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	rstrm-&gt;last_frag = FALSE;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Look ahead fuction.</div><div class='del'>- * Returns TRUE iff there is no more input in the buffer </div><div class='del'>- * after consuming the rest of the current record.</div><div class='del'>- */</div><div class='del'>-bool_t xdrrec_eof(xdrs)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-</div><div class='del'>-	while (rstrm-&gt;fbtbc &gt; 0 || (!rstrm-&gt;last_frag)) {</div><div class='del'>-		if (!skip_input_bytes(rstrm, rstrm-&gt;fbtbc))</div><div class='del'>-			return (TRUE);</div><div class='del'>-		rstrm-&gt;fbtbc = 0;</div><div class='del'>-		if ((!rstrm-&gt;last_frag) &amp;&amp; (!set_input_fragment(rstrm)))</div><div class='del'>-			return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	if (rstrm-&gt;in_finger == rstrm-&gt;in_boundry)</div><div class='del'>-		return (TRUE);</div><div class='del'>-	return (FALSE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The client must tell the package when an end-of-record has occurred.</div><div class='del'>- * The second paraemters tells whether the record should be flushed to the</div><div class='del'>- * (output) tcp stream.  (This let's the package support batched or</div><div class='del'>- * pipelined procedure calls.)  TRUE =&gt; immmediate flush to tcp connection.</div><div class='del'>- */</div><div class='del'>-bool_t xdrrec_endofrecord(xdrs, sendnow)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-bool_t sendnow;</div><div class='del'>-{</div><div class='del'>-	register RECSTREAM *rstrm = (RECSTREAM *) (xdrs-&gt;x_private);</div><div class='del'>-	register u_long len;		/* fragment length */</div><div class='del'>-</div><div class='del'>-	if (sendnow || rstrm-&gt;frag_sent ||</div><div class='del'>-		((u_long) rstrm-&gt;out_finger + sizeof(u_long) &gt;=</div><div class='del'>-		 (u_long) rstrm-&gt;out_boundry)) {</div><div class='del'>-		rstrm-&gt;frag_sent = FALSE;</div><div class='del'>-		return (flush_out(rstrm, TRUE));</div><div class='del'>-	}</div><div class='del'>-	len = (u_long) (rstrm-&gt;out_finger) - (u_long) (rstrm-&gt;frag_header) -</div><div class='del'>-		sizeof(u_long);</div><div class='del'>-	*(rstrm-&gt;frag_header) = htonl((u_long) len | LAST_FRAG);</div><div class='del'>-	rstrm-&gt;frag_header = (u_long *) rstrm-&gt;out_finger;</div><div class='del'>-	rstrm-&gt;out_finger += sizeof(u_long);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_reference.c b/mdk-stage1/dietlibc/librpc/xdr_reference.c<br/>deleted file mode 100644<br/>index 7715d821c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_reference.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_reference.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,130 +0,0 @@</div><div class='del'>-/* @(#)xdr_reference.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_reference.c, Generic XDR routines impelmentation.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1987, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * These are the "non-trivial" xdr primitives used to serialize and de-serialize</div><div class='del'>- * "pointers".  See xdr.h for more info on the interface to xdr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#define LASTUNSIGNED	((u_int)0-1)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XDR an indirect pointer</div><div class='del'>- * xdr_reference is for recursively translating a structure that is</div><div class='del'>- * referenced by a pointer inside the structure that is currently being</div><div class='del'>- * translated.  pp references a pointer to storage. If *pp is null</div><div class='del'>- * the  necessary storage is allocated.</div><div class='del'>- * size is the sizeof the referneced structure.</div><div class='del'>- * proc is the routine to handle the referenced structure.</div><div class='del'>- */</div><div class='del'>-bool_t xdr_reference(xdrs, pp, size, proc)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-caddr_t *pp;					/* the pointer to work on */</div><div class='del'>-u_int size;						/* size of the object pointed to */</div><div class='del'>-xdrproc_t proc;					/* xdr routine to handle the object */</div><div class='del'>-{</div><div class='del'>-	register caddr_t loc = *pp;</div><div class='del'>-	register bool_t stat;</div><div class='del'>-</div><div class='del'>-	if (loc == NULL)</div><div class='del'>-		switch (xdrs-&gt;x_op) {</div><div class='del'>-		case XDR_FREE:</div><div class='del'>-			return (TRUE);</div><div class='del'>-</div><div class='del'>-		case XDR_DECODE:</div><div class='del'>-			*pp = loc = (caddr_t) mem_alloc(size);</div><div class='del'>-			if (loc == NULL) {</div><div class='del'>-				(void) fprintf(stderr, "xdr_reference: out of memory\n");</div><div class='del'>-				return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			bzero(loc, (int) size);</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	stat = (*proc) (xdrs, loc, LASTUNSIGNED);</div><div class='del'>-</div><div class='del'>-	if (xdrs-&gt;x_op == XDR_FREE) {</div><div class='del'>-		mem_free(loc, size);</div><div class='del'>-		*pp = NULL;</div><div class='del'>-	}</div><div class='del'>-	return (stat);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_pointer():</div><div class='del'>- *</div><div class='del'>- * XDR a pointer to a possibly recursive data structure. This</div><div class='del'>- * differs with xdr_reference in that it can serialize/deserialiaze</div><div class='del'>- * trees correctly.</div><div class='del'>- *</div><div class='del'>- *  What's sent is actually a union:</div><div class='del'>- *</div><div class='del'>- *  union object_pointer switch (boolean b) {</div><div class='del'>- *  case TRUE: object_data data;</div><div class='del'>- *  case FALSE: void nothing;</div><div class='del'>- *  }</div><div class='del'>- *</div><div class='del'>- * &gt; objpp: Pointer to the pointer to the object.</div><div class='del'>- * &gt; obj_size: size of the object.</div><div class='del'>- * &gt; xdr_obj: routine to XDR an object.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-bool_t xdr_pointer(xdrs, objpp, obj_size, xdr_obj)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-char **objpp;</div><div class='del'>-u_int obj_size;</div><div class='del'>-xdrproc_t xdr_obj;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	bool_t more_data;</div><div class='del'>-</div><div class='del'>-	more_data = (*objpp != NULL);</div><div class='del'>-	if (!xdr_bool(xdrs, &amp;more_data)) {</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	if (!more_data) {</div><div class='del'>-		*objpp = NULL;</div><div class='del'>-		return (TRUE);</div><div class='del'>-	}</div><div class='del'>-	return (xdr_reference(xdrs, objpp, obj_size, xdr_obj));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/librpc/xdr_stdio.c b/mdk-stage1/dietlibc/librpc/xdr_stdio.c<br/>deleted file mode 100644<br/>index e3190e0a9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/librpc/xdr_stdio.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/librpc/xdr_stdio.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,187 +0,0 @@</div><div class='del'>-/* @(#)xdr_stdio.c	2.1 88/07/29 4.0 RPCSRC */</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user.</div><div class='del'>- * </div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- * </div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- * </div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- * </div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- * </div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-#if !defined(lint) &amp;&amp; defined(SCCSIDS)</div><div class='del'>-static char sccsid[] =</div><div class='del'>-</div><div class='del'>-	"@(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * xdr_stdio.c, XDR implementation on standard i/o file.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1984, Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * This set of routines implements a XDR on a stdio stream.</div><div class='del'>- * XDR_ENCODE serializes onto the stream, XDR_DECODE de-serializes</div><div class='del'>- * from the stream.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/types.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;rpc/xdr.h&gt;</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_getlong();</div><div class='del'>-static bool_t xdrstdio_putlong();</div><div class='del'>-static bool_t xdrstdio_getbytes();</div><div class='del'>-static bool_t xdrstdio_putbytes();</div><div class='del'>-static u_int xdrstdio_getpos();</div><div class='del'>-static bool_t xdrstdio_setpos();</div><div class='del'>-static int32_t *xdrstdio_inline();</div><div class='del'>-static void xdrstdio_destroy();</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ops vector for stdio type XDR</div><div class='del'>- */</div><div class='del'>-static struct xdr_ops xdrstdio_ops = {</div><div class='del'>-	xdrstdio_getlong,			/* deseraialize a long int */</div><div class='del'>-	xdrstdio_putlong,			/* seraialize a long int */</div><div class='del'>-	xdrstdio_getbytes,			/* deserialize counted bytes */</div><div class='del'>-	xdrstdio_putbytes,			/* serialize counted bytes */</div><div class='del'>-	xdrstdio_getpos,			/* get offset in the stream */</div><div class='del'>-	xdrstdio_setpos,			/* set offset in the stream */</div><div class='del'>-	xdrstdio_inline,			/* prime stream for inline macros */</div><div class='del'>-	xdrstdio_destroy			/* destroy stream */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Initialize a stdio xdr stream.</div><div class='del'>- * Sets the xdr stream handle xdrs for use on the stream file.</div><div class='del'>- * Operation flag is set to op.</div><div class='del'>- */</div><div class='del'>-void xdrstdio_create(xdrs, file, op)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-FILE *file;</div><div class='del'>-enum xdr_op op;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	xdrs-&gt;x_op = op;</div><div class='del'>-	xdrs-&gt;x_ops = &amp;xdrstdio_ops;</div><div class='del'>-	xdrs-&gt;x_private = (caddr_t) file;</div><div class='del'>-	xdrs-&gt;x_handy = 0;</div><div class='del'>-	xdrs-&gt;x_base = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Destroy a stdio xdr stream.</div><div class='del'>- * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.</div><div class='del'>- */</div><div class='del'>-static void xdrstdio_destroy(xdrs)</div><div class='del'>-register XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-	(void) fflush((FILE *) xdrs-&gt;x_private);</div><div class='del'>-	/* xx should we close the file ?? */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_getlong(xdrs, lp)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-register long *lp;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if (fread((caddr_t) lp, sizeof(long), 1, (FILE *) xdrs-&gt;x_private) !=</div><div class='del'>-		1) return (FALSE);</div><div class='del'>-</div><div class='del'>-#ifndef mc68000</div><div class='del'>-	*lp = ntohl(*lp);</div><div class='del'>-#endif</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_putlong(xdrs, lp)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-long *lp;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-#ifndef mc68000</div><div class='del'>-	long mycopy = htonl(*lp);</div><div class='del'>-</div><div class='del'>-	lp = &amp;mycopy;</div><div class='del'>-#endif</div><div class='del'>-	if (fwrite((caddr_t) lp, sizeof(long), 1, (FILE *) xdrs-&gt;x_private) !=</div><div class='del'>-		1) return (FALSE);</div><div class='del'>-</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_getbytes(xdrs, addr, len)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-caddr_t addr;</div><div class='del'>-u_int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((len != 0)</div><div class='del'>-		&amp;&amp; (fread(addr, (int) len, 1, (FILE *) xdrs-&gt;x_private) != 1))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_putbytes(xdrs, addr, len)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-caddr_t addr;</div><div class='del'>-u_int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	if ((len != 0)</div><div class='del'>-		&amp;&amp; (fwrite(addr, (int) len, 1, (FILE *) xdrs-&gt;x_private) != 1))</div><div class='del'>-		return (FALSE);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_int xdrstdio_getpos(xdrs)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return ((u_int) ftell((FILE *) xdrs-&gt;x_private));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static bool_t xdrstdio_setpos(xdrs, pos)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-u_int pos;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	return ((fseek((FILE *) xdrs-&gt;x_private, (long) pos, 0) &lt; 0) ?</div><div class='del'>-			FALSE : TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int32_t *xdrstdio_inline(xdrs, len)</div><div class='del'>-XDR *xdrs;</div><div class='del'>-u_int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Must do some work to implement this: must insure</div><div class='del'>-	 * enough data in the underlying stdio buffer,</div><div class='del'>-	 * that the buffer is aligned so that we can indirect through a</div><div class='del'>-	 * long *, and stuff this pointer in xdrs-&gt;x_buf.  Doing</div><div class='del'>-	 * a fread or fwrite to a scratch buffer would defeat</div><div class='del'>-	 * most of the gains to be had here and require storage</div><div class='del'>-	 * management on this buffer, so we don't do this.</div><div class='del'>-	 */</div><div class='del'>-	return (NULL);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libshell/fnmatch.c b/mdk-stage1/dietlibc/libshell/fnmatch.c<br/>deleted file mode 100644<br/>index 4e7664510..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libshell/fnmatch.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libshell/fnmatch.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,74 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;fnmatch.h&gt;</div><div class='del'>-</div><div class='del'>-#define NOTFIRST 128</div><div class='del'>-</div><div class='del'>-static int match(char c,char d,int flags) {</div><div class='del'>-  if (flags&amp;FNM_CASEFOLD)</div><div class='del'>-    return (tolower(c)==tolower(d));</div><div class='del'>-  else</div><div class='del'>-    return (c==d);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int fnmatch(const char *pattern, const char *string, int flags) {</div><div class='del'>-  if (*string==0) {</div><div class='del'>-    while (*pattern=='*') ++pattern;</div><div class='del'>-    return (!!*pattern);</div><div class='del'>-  }</div><div class='del'>-  if (*string=='.' &amp;&amp; *pattern!='.' &amp;&amp; (flags&amp;FNM_PERIOD)) {</div><div class='del'>-    /* don't match if FNM_PERIOD and this is the first char */</div><div class='del'>-    if ((flags&amp;FNM_PERIOD) &amp;&amp; (!(flags&amp;NOTFIRST)))</div><div class='del'>-      return 1;</div><div class='del'>-    /* don't match if FNM_PERIOD and FNM_FILE_NAME and previous was '/' */</div><div class='del'>-    if ((flags&amp;(FNM_FILE_NAME|FNM_PERIOD)) &amp;&amp; string[-1]=='/')</div><div class='del'>-      return 1;</div><div class='del'>-  }</div><div class='del'>-  flags|=NOTFIRST;</div><div class='del'>-  switch (*pattern) {</div><div class='del'>-  case '[':</div><div class='del'>-    ++pattern;</div><div class='del'>-    while (*pattern &amp;&amp; *pattern!=']') {</div><div class='del'>-      if (flags&amp;FNM_PATHNAME || *string!='/') {</div><div class='del'>-	int res=0;</div><div class='del'>-	if (pattern[1]=='-') {</div><div class='del'>-	  if (*string&gt;=*pattern &amp;&amp; *string&lt;=pattern[2]) res=1;</div><div class='del'>-	  if (flags&amp;FNM_CASEFOLD) {</div><div class='del'>-	    if (tolower(*string)&gt;=tolower(*pattern) &amp;&amp; tolower(*string)&lt;=tolower(pattern[2])) res=1;</div><div class='del'>-	  }</div><div class='del'>-	} else</div><div class='del'>-	  res=match(*pattern,*string,flags);</div><div class='del'>-	if (res) {</div><div class='del'>-	  while (*pattern &amp;&amp; *pattern!=']') ++pattern;</div><div class='del'>-	  return fnmatch(pattern+1,string+1,flags);</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      ++pattern;</div><div class='del'>-    }</div><div class='del'>-    break;</div><div class='del'>-  case '\\':</div><div class='del'>-    if (flags&amp;FNM_NOESCAPE) {</div><div class='del'>-      if (*string=='\\')</div><div class='del'>-	return fnmatch(pattern+1,string+1,flags);</div><div class='del'>-    } else {</div><div class='del'>-      if (*string==pattern[1])</div><div class='del'>-	return fnmatch(pattern+2,string+1,flags);</div><div class='del'>-    }</div><div class='del'>-    break;</div><div class='del'>-  case '*':</div><div class='del'>-    if (!pattern[1] || fnmatch(pattern+1,string,flags)==0)</div><div class='del'>-      return 0;</div><div class='del'>-    else</div><div class='del'>-      if (*string!='/')</div><div class='del'>-	return fnmatch(pattern,string+1,flags);</div><div class='del'>-    break;</div><div class='del'>-  case 0:</div><div class='del'>-    if (*string==0 || (*string=='/' &amp;&amp; (flags&amp;FNM_LEADING_DIR)))</div><div class='del'>-      return 0;</div><div class='del'>-    break;</div><div class='del'>-  default:</div><div class='del'>-    if (match(*pattern,*string,flags))</div><div class='del'>-      return fnmatch(pattern+1,string+1,flags);</div><div class='del'>-    break;</div><div class='del'>-  }</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libshell/glob.c b/mdk-stage1/dietlibc/libshell/glob.c<br/>deleted file mode 100644<br/>index 34d09d87a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libshell/glob.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libshell/glob.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,350 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * dietlibc/libshell/glob.c</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 Guillaume Cottenceau &lt;gc@mandrakesoft.com&gt;</div><div class='del'>- *</div><div class='del'>- * This is free software, licensed under the Gnu General Public License.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * unsupported: GLOB_BRACE GLOB_ALTDIRFUNC GLOB_MAGCHAR</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define DEBUG(x)</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;fnmatch.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;glob.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* If i18n, should be using strcoll */</div><div class='del'>-static int cmp_func(const void * a, const void * b)</div><div class='del'>-{</div><div class='del'>-	const char *const s1 = *(const char *const * const) a;</div><div class='del'>-	const char *const s2 = *(const char *const * const) b;</div><div class='del'>-	if (s1 == NULL)</div><div class='del'>-		return 1;</div><div class='del'>-	if (s2 == NULL)</div><div class='del'>-		return -1;</div><div class='del'>-	return strcmp(s1, s2);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Like `glob', but PATTERN is a final pathname component,</div><div class='del'>-   and matches are searched for in DIRECTORY.</div><div class='del'>-   The GLOB_NOSORT bit in FLAGS is ignored.  No sorting is ever done.</div><div class='del'>-   The GLOB_APPEND flag is assumed to be set (always appends).</div><div class='del'>-   Prepends DIRECTORY in constructed PGLOB. */</div><div class='del'>-static int glob_in_dir(const char *pattern, const char *directory, int flags,</div><div class='del'>-		       int errfunc(const char * epath, int eerrno),</div><div class='del'>-		       glob_t *pglob)</div><div class='del'>-{</div><div class='del'>-	DIR *dp = opendir(directory);</div><div class='del'>-	int nfound = 0;</div><div class='del'>-</div><div class='del'>-	int i;</div><div class='del'>-	char * ptr;</div><div class='del'>-</div><div class='del'>-	void close_dir_keep_errno(void) {</div><div class='del'>-		int save = errno;</div><div class='del'>-		if (dp)</div><div class='del'>-			closedir (dp);</div><div class='del'>-		__set_errno(save);</div><div class='del'>-	}</div><div class='del'>-	int add_entry(const char * name) {</div><div class='del'>-		pglob-&gt;gl_pathv	= (char **) realloc(pglob-&gt;gl_pathv,</div><div class='del'>-						    (pglob-&gt;gl_pathc + pglob-&gt;gl_offs + 2)</div><div class='del'>-						    * sizeof (char *));</div><div class='del'>-		if (pglob-&gt;gl_pathv == NULL)</div><div class='del'>-			return 1;</div><div class='del'>-		pglob-&gt;gl_pathv[pglob-&gt;gl_offs + pglob-&gt;gl_pathc] = strdup(name);</div><div class='del'>-		pglob-&gt;gl_pathv[pglob-&gt;gl_offs + pglob-&gt;gl_pathc + 1] = NULL;</div><div class='del'>-		pglob-&gt;gl_pathc++;</div><div class='del'>-		nfound++;</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	void build_fullname(char * fullname, int fullnamesize, const char * directory, const char * filename) {</div><div class='del'>-		if (!strcmp(directory, "/"))</div><div class='del'>-			snprintf(fullname, fullnamesize, "/%s", filename);</div><div class='del'>-		else if (!strcmp(directory, "."))</div><div class='del'>-			snprintf(fullname, fullnamesize, "%s", filename);</div><div class='del'>-		else</div><div class='del'>-			snprintf(fullname, fullnamesize, "%s/%s", directory, filename);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!dp) {</div><div class='del'>-		if (errno != ENOTDIR</div><div class='del'>-		    &amp;&amp; ((errfunc != NULL &amp;&amp; (*errfunc) (directory, errno))</div><div class='del'>-			|| (flags &amp; GLOB_ERR)))</div><div class='del'>-		      return GLOB_ABORTED;</div><div class='del'>-	} else {</div><div class='del'>-		int fnm_flags = ((!(flags &amp; GLOB_PERIOD) ? FNM_PERIOD : 0)</div><div class='del'>-				 | ((flags &amp; GLOB_NOESCAPE) ? FNM_NOESCAPE : 0));</div><div class='del'>-		struct dirent *ep;</div><div class='del'>-		while ((ep = readdir(dp))) {</div><div class='del'>-			i = strlen(directory) + strlen(ep-&gt;d_name) + 2;</div><div class='del'>-			ptr = (char *) alloca(i);</div><div class='del'>-			build_fullname(ptr, i, directory, ep-&gt;d_name);</div><div class='del'>-			if (flags &amp; GLOB_ONLYDIR) {</div><div class='del'>-				struct stat statr;</div><div class='del'>-				if (stat(ptr, &amp;statr) || !S_ISDIR(statr.st_mode))</div><div class='del'>-					continue;</div><div class='del'>-			}</div><div class='del'>-			if (fnmatch(pattern, ep-&gt;d_name, fnm_flags) == 0)</div><div class='del'>-				if (add_entry(ptr))</div><div class='del'>-					goto memory_error;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close_dir_keep_errno();</div><div class='del'>-</div><div class='del'>-	if (nfound != 0)</div><div class='del'>-		pglob-&gt;gl_flags = flags;</div><div class='del'>-	else if (flags &amp; GLOB_NOCHECK) {</div><div class='del'>-		/* nfound == 0 */</div><div class='del'>-		i = strlen(directory) + strlen(pattern) + 2;</div><div class='del'>-		ptr = (char *) alloca(i);</div><div class='del'>-		build_fullname(ptr, i, directory, pattern);</div><div class='del'>-		if (add_entry(ptr))</div><div class='del'>-			goto memory_error;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return (nfound == 0) ? GLOB_NOMATCH : 0;</div><div class='del'>-</div><div class='del'>- memory_error:</div><div class='del'>-	/* We're in trouble since we can't free the already allocated memory. [allocated from strdup(filame)]</div><div class='del'>-	 * Well, after all, when malloc returns NULL we're already in a bad mood, and no doubt the</div><div class='del'>-	 * program will manage to segfault by itself very soon :-). */</div><div class='del'>-	close_dir_keep_errno();</div><div class='del'>-	return GLOB_NOSPACE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int glob(const char *pattern, int flags, int errfunc(const char * epath, int eerrno), glob_t *pglob)</div><div class='del'>-{</div><div class='del'>-	char * pattern_;</div><div class='del'>-	char * filename;</div><div class='del'>-	char * dirname;</div><div class='del'>-	size_t oldcount;</div><div class='del'>-	struct stat statr;</div><div class='del'>-</div><div class='del'>-	size_t i; /* tmp variables are declared here to save a bit of object space */</div><div class='del'>-	int j, k;    /* */</div><div class='del'>-	char * ptr, * ptr2;</div><div class='del'>-</div><div class='del'>-	if (pattern == NULL || pglob == NULL || (flags &amp; ~__GLOB_FLAGS) != 0) {</div><div class='del'>-		__set_errno (EINVAL);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!(flags &amp; GLOB_DOOFFS))</div><div class='del'>-		pglob-&gt;gl_offs = 0;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	/* Duplicate pattern so I can make modif to it later (to handle</div><div class='del'>-           TILDE stuff replacing old contents, and to null-terminate the</div><div class='del'>-           directory) */</div><div class='del'>-	pattern_ = alloca(strlen(pattern) + 1);</div><div class='del'>-	strcpy(pattern_, pattern);</div><div class='del'>-</div><div class='del'>-	/* Check for TILDE stuff */</div><div class='del'>-	if ((flags &amp; (GLOB_TILDE|GLOB_TILDE_CHECK)) &amp;&amp; pattern_[0] == '~') {</div><div class='del'>-		char * home_dir = NULL;</div><div class='del'>-		if (pattern_[1] == '\0' || pattern_[1] == '/') {</div><div class='del'>-			/* She's asking for ~, her homedir */</div><div class='del'>-			home_dir = getenv("HOME");</div><div class='del'>-		} else {</div><div class='del'>-			/* She's asking for another one's homedir */</div><div class='del'>-			struct passwd * p;</div><div class='del'>-			ptr2 = alloca(strlen(pattern_) + 1);</div><div class='del'>-			strcpy(ptr2, pattern_ + 1);</div><div class='del'>-			ptr = strchr(ptr2, '/');</div><div class='del'>-			if (ptr != NULL)</div><div class='del'>-				*ptr = '\0';</div><div class='del'>-			if (((p = getpwnam(ptr2)) != NULL))</div><div class='del'>-				home_dir = p-&gt;pw_dir;</div><div class='del'>-		}</div><div class='del'>-		if (home_dir != NULL) {</div><div class='del'>-			i = strlen(home_dir) + strlen(pattern_); /* pessimistic (the ~ case) */</div><div class='del'>-			ptr = alloca(i);</div><div class='del'>-			strncpy(ptr, home_dir, i);</div><div class='del'>-			ptr2 = pattern_ + 1;</div><div class='del'>-			while (*ptr2 != '/' &amp;&amp; *ptr2 != '\0')</div><div class='del'>-				ptr2++;</div><div class='del'>-			strncat(ptr, ptr2, i);</div><div class='del'>-			pattern_ = ptr;</div><div class='del'>-		} else if (flags &amp; GLOB_TILDE_CHECK)</div><div class='del'>-			return GLOB_NOMATCH;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Find the filename */</div><div class='del'>-	filename = strrchr(pattern_, '/');</div><div class='del'>-</div><div class='del'>-	if (filename == NULL) {</div><div class='del'>-		/* We have no '/' in the pattern */</div><div class='del'>-		filename = pattern_;</div><div class='del'>-		dirname = ".";</div><div class='del'>-	} else if (filename == pattern_) {</div><div class='del'>-		/* "/pattern".  */</div><div class='del'>-		dirname = "/";</div><div class='del'>-		filename++;</div><div class='del'>-	} else {</div><div class='del'>-		dirname = pattern_;</div><div class='del'>-		filename++;</div><div class='del'>-		/* allow dirname to be null terminated */</div><div class='del'>-		*(filename-1) = '\0';</div><div class='del'>-</div><div class='del'>-		if (filename[0] == '\0' &amp;&amp; strcmp(pattern_, "/")) {</div><div class='del'>-			/* "pattern/".  Expand "pattern", appending slashes.  */</div><div class='del'>-			j = glob(dirname, flags | GLOB_MARK, errfunc, pglob);</div><div class='del'>-			if (j == 0)</div><div class='del'>-				pglob-&gt;gl_flags = ((pglob-&gt;gl_flags &amp; ~GLOB_MARK)</div><div class='del'>-						   | (flags &amp; GLOB_MARK));</div><div class='del'>-			return j;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	</div><div class='del'>-	/* Reserve memory for pglob */</div><div class='del'>-	if (!(flags &amp; GLOB_APPEND)) {</div><div class='del'>-		pglob-&gt;gl_pathc = 0;</div><div class='del'>-		if (!(flags &amp; GLOB_DOOFFS))</div><div class='del'>-			pglob-&gt;gl_pathv = NULL;</div><div class='del'>-		else {</div><div class='del'>-			pglob-&gt;gl_pathv = (char **) malloc((pglob-&gt;gl_offs + 1) * sizeof (char *));</div><div class='del'>-			if (pglob-&gt;gl_pathv == NULL)</div><div class='del'>-				return GLOB_NOSPACE;</div><div class='del'>-			for (i = 0; i &lt;= pglob-&gt;gl_offs; i++)</div><div class='del'>-				pglob-&gt;gl_pathv[i] = NULL;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	oldcount = pglob-&gt;gl_pathc + pglob-&gt;gl_offs;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	/* Begin real work */</div><div class='del'>-	if (!strcmp(dirname, "/") || !strcmp(dirname, ".")</div><div class='del'>-	    || (!strchr(dirname, '*') &amp;&amp; !strchr(dirname, '?') &amp;&amp; !strchr(dirname, '['))) {</div><div class='del'>-		/* Approx of a terminal state, glob directly in dir. */</div><div class='del'>-		j = glob_in_dir(filename, dirname, flags, errfunc, pglob);</div><div class='del'>-		if (j != 0)</div><div class='del'>-			return j;</div><div class='del'>-	} else {</div><div class='del'>-		/* We are not in a terminal state, so we have to glob for</div><div class='del'>-		   the directory, and then glob for the pattern in each</div><div class='del'>-		   directory found. */</div><div class='del'>-		glob_t dirs;</div><div class='del'>-</div><div class='del'>-		j = glob(dirname, ((flags &amp; (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE | GLOB_ALTDIRFUNC))</div><div class='del'>-				   | GLOB_NOSORT | GLOB_ONLYDIR),</div><div class='del'>-			 errfunc, &amp;dirs);</div><div class='del'>-		if (j != 0)</div><div class='del'>-			return j;</div><div class='del'>-</div><div class='del'>-		/* We have successfully globbed the directory name.</div><div class='del'>-		   For each name we found, call glob_in_dir on it and FILENAME,</div><div class='del'>-		   appending the results to PGLOB.  */</div><div class='del'>-		for (i = 0; i &lt; dirs.gl_pathc; i++) {</div><div class='del'>-			j = glob_in_dir(filename, dirs.gl_pathv[i], ((flags | GLOB_APPEND) &amp; ~GLOB_NOCHECK),</div><div class='del'>-					errfunc, pglob);</div><div class='del'>-			if (j == GLOB_NOMATCH)</div><div class='del'>-				/* No matches in this directory.  Try the next.  */</div><div class='del'>-				continue;</div><div class='del'>-			if (j != 0) {</div><div class='del'>-				globfree(&amp;dirs);</div><div class='del'>-				globfree(pglob);</div><div class='del'>-				return j;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* We have ignored the GLOB_NOCHECK flag in the `glob_in_dir' calls.</div><div class='del'>-		   But if we have not found any matching entry and the GLOB_NOCHECK</div><div class='del'>-		   flag was set we must return the list consisting of the disrectory</div><div class='del'>-		   names followed by the filename.  */</div><div class='del'>-		if (pglob-&gt;gl_pathc + pglob-&gt;gl_offs == oldcount)</div><div class='del'>-		{</div><div class='del'>-			/* No matches.  */</div><div class='del'>-			if (flags &amp; GLOB_NOCHECK)</div><div class='del'>-			{</div><div class='del'>-				for (i = 0; i &lt; dirs.gl_pathc; i++) {</div><div class='del'>-					if (stat(dirs.gl_pathv[i], &amp;statr) || !S_ISDIR(statr.st_mode))</div><div class='del'>-						continue;</div><div class='del'>-</div><div class='del'>-					/* stat is okay, we will add the entry, but before let's resize the pathv */</div><div class='del'>-					j = pglob-&gt;gl_pathc + pglob-&gt;gl_offs;</div><div class='del'>-					pglob-&gt;gl_pathv = (char **) realloc(pglob-&gt;gl_pathv, (j + 2) * sizeof (char *));</div><div class='del'>-					if (pglob-&gt;gl_pathv == NULL) {</div><div class='del'>-						globfree (&amp;dirs);</div><div class='del'>-						return GLOB_NOSPACE;</div><div class='del'>-					}</div><div class='del'>-</div><div class='del'>-					/* okay now we add the new entry */</div><div class='del'>-					k = strlen(dirs.gl_pathv[i]) + 1 + strlen(filename) + 1;</div><div class='del'>-					if ((pglob-&gt;gl_pathv[j] = malloc(k)) == NULL) {</div><div class='del'>-						globfree(&amp;dirs);</div><div class='del'>-						globfree(pglob);</div><div class='del'>-						return GLOB_NOSPACE;</div><div class='del'>-					}</div><div class='del'>-					snprintf(pglob-&gt;gl_pathv[j], k, "%s/%s", dirs.gl_pathv[i], filename);</div><div class='del'>-					pglob-&gt;gl_pathc++;</div><div class='del'>-					pglob-&gt;gl_pathv[j+1] = NULL;</div><div class='del'>-				}</div><div class='del'>-			} else {</div><div class='del'>-				globfree(&amp;dirs);</div><div class='del'>-				return GLOB_NOMATCH;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		globfree (&amp;dirs);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if (flags &amp; GLOB_MARK) {</div><div class='del'>-		for (i = oldcount; i &lt; pglob-&gt;gl_pathc + pglob-&gt;gl_offs; i++)</div><div class='del'>-			if (!stat(pglob-&gt;gl_pathv[i], &amp;statr) &amp;&amp; S_ISDIR(statr.st_mode)) {</div><div class='del'>-				size_t len = strlen(pglob-&gt;gl_pathv[i]) + 2;</div><div class='del'>-				ptr = realloc(pglob-&gt;gl_pathv[i], len);</div><div class='del'>-				if (ptr == NULL) {</div><div class='del'>-					globfree(pglob);</div><div class='del'>-					return GLOB_NOSPACE;</div><div class='del'>-				}</div><div class='del'>-				strcpy(&amp;ptr[len - 2], "/");</div><div class='del'>-				pglob-&gt;gl_pathv[i] = ptr;</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!(flags &amp; GLOB_NOSORT)) {</div><div class='del'>-		qsort(&amp;pglob-&gt;gl_pathv[oldcount],</div><div class='del'>-		      pglob-&gt;gl_pathc + pglob-&gt;gl_offs - oldcount,</div><div class='del'>-		      sizeof(char *), cmp_func);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Free storage allocated in PGLOB by a previous `glob' call.  */</div><div class='del'>-void globfree (glob_t * pglob)</div><div class='del'>-{</div><div class='del'>-  if (pglob-&gt;gl_pathv != NULL) {</div><div class='del'>-      size_t i;</div><div class='del'>-      for (i = 0; i &lt; pglob-&gt;gl_pathc; i++)</div><div class='del'>-	      if (pglob-&gt;gl_pathv[pglob-&gt;gl_offs + i] != NULL)</div><div class='del'>-		      free((void *) pglob-&gt;gl_pathv[pglob-&gt;gl_offs + i]);</div><div class='del'>-      free((void *) pglob-&gt;gl_pathv);</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libshell/realpath.c b/mdk-stage1/dietlibc/libshell/realpath.c<br/>deleted file mode 100644<br/>index 1377018e5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libshell/realpath.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libshell/realpath.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-char *realpath(const char *path, char *resolved_path) {</div><div class='del'>-  int fd=open(".",O_RDONLY);</div><div class='del'>-  char *tmp="";</div><div class='del'>-  if (chdir(path)) {</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    if (*__errno_location()==ENOTDIR)</div><div class='del'>-#else</div><div class='del'>-    if (errno==ENOTDIR)</div><div class='del'>-#endif</div><div class='del'>-    {</div><div class='del'>-      if ((tmp=strrchr(path,'/'))) {</div><div class='del'>-	memmove(resolved_path,path,tmp-path);</div><div class='del'>-	resolved_path[tmp-path]=0;</div><div class='del'>-	if (chdir(resolved_path)) { resolved_path=0; goto abort; }</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-  if (!getcwd(resolved_path,PATH_MAX)) { resolved_path=0; goto abort; }</div><div class='del'>-  strcat(resolved_path,tmp);</div><div class='del'>-abort:</div><div class='del'>-  fchdir(fd);</div><div class='del'>-  close(fd);</div><div class='del'>-  return resolved_path;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/clearerr.c b/mdk-stage1/dietlibc/libstdio/clearerr.c<br/>deleted file mode 100644<br/>index 8bde8c702..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/clearerr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/clearerr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-</div><div class='del'>-void clearerr( FILE *stream) {</div><div class='del'>-  stream-&gt;flags&amp;=~(ERRORINDICATOR|EOFINDICATOR);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fclose.c b/mdk-stage1/dietlibc/libstdio/fclose.c<br/>deleted file mode 100644<br/>index a955c6086..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fclose.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fclose.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-int fclose(FILE *stream) {</div><div class='del'>-  int res;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  FILE *f,*fl;</div><div class='del'>-#endif</div><div class='del'>-  if (!stream)</div><div class='del'>-	  return EOF;</div><div class='del'>-  fflush(stream);</div><div class='del'>-  res=close(stream-&gt;fd);</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  for (fl=0,f=__stdio_root; f; fl=f,f=f-&gt;next)</div><div class='del'>-    if (f==stream) {</div><div class='del'>-      if (fl)</div><div class='del'>-	fl-&gt;next=f-&gt;next;</div><div class='del'>-      else</div><div class='del'>-	__stdio_root=f-&gt;next;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-  free(stream);</div><div class='del'>-  return res;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fdglue.c b/mdk-stage1/dietlibc/libstdio/fdglue.c<br/>deleted file mode 100644<br/>index 1c3918f1f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fdglue.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fdglue.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,52 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-extern int __stdio_atexit;</div><div class='del'>-extern void __stdio_flushall();</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int __stdio_parse_mode(const char *mode) {</div><div class='del'>-  int f=0;</div><div class='del'>-  for (;;) {</div><div class='del'>-    switch (*mode) {</div><div class='del'>-    case 0: return f;</div><div class='del'>-    case 'b': break;</div><div class='del'>-    case 'r': f=O_RDONLY; break;</div><div class='del'>-    case 'w': f=O_WRONLY|O_CREAT|O_TRUNC; break;</div><div class='del'>-    case 'a': f=O_WRONLY|O_CREAT|O_APPEND; break;</div><div class='del'>-    case '+': f=(f&amp;(~O_WRONLY))|O_RDWR; break;</div><div class='del'>-    }</div><div class='del'>-    ++mode;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-FILE* __stdio_init_file(int fd) {</div><div class='del'>-  FILE *tmp=(FILE*)malloc(sizeof(FILE));</div><div class='del'>-  if (!tmp) {</div><div class='del'>-    close(fd);</div><div class='del'>-    errno=ENOMEM;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  tmp-&gt;fd=fd;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  tmp-&gt;bm=0;</div><div class='del'>-  tmp-&gt;bs=0;</div><div class='del'>-#endif</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  tmp-&gt;ungotten = 0;</div><div class='del'>-#endif</div><div class='del'>-  tmp-&gt;flags=0;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  if (__stdio_atexit==0) {</div><div class='del'>-    __stdio_atexit=1;</div><div class='del'>-    atexit(__stdio_flushall);</div><div class='del'>-  }</div><div class='del'>-  tmp-&gt;next=__stdio_root;</div><div class='del'>-  __stdio_root=tmp;</div><div class='del'>-#endif</div><div class='del'>-  return tmp;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fdopen.c b/mdk-stage1/dietlibc/libstdio/fdopen.c<br/>deleted file mode 100644<br/>index aee14fb0c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fdopen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fdopen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define SEEK_END 2</div><div class='del'>-</div><div class='del'>-int __stdio_parse_mode(const char *mode);</div><div class='del'>-FILE* __stdio_init_file(int fd);</div><div class='del'>-</div><div class='del'>-FILE *fdopen (int filedes, const char *mode) {</div><div class='del'>-  int f=0;	/* O_RDONLY, O_WRONLY or O_RDWR */</div><div class='del'>-  int fd;</div><div class='del'>-</div><div class='del'>-  f=__stdio_parse_mode(mode);</div><div class='del'>-  if ((fd=filedes)&lt;0) return 0;</div><div class='del'>-  {</div><div class='del'>-	  FILE * ret = __stdio_init_file(fd);</div><div class='del'>-	  ret-&gt;flags |= UNSEEKABLE;</div><div class='del'>-	  return ret;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/feof.c b/mdk-stage1/dietlibc/libstdio/feof.c<br/>deleted file mode 100644<br/>index b7e86fe3b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/feof.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/feof.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-int feof(FILE *stream) {</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  /* yuck!!! */</div><div class='del'>-  if (stream-&gt;ungotten) return 0;</div><div class='del'>-#endif</div><div class='del'>-  return (stream-&gt;flags&amp;EOFINDICATOR);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/ferror.c b/mdk-stage1/dietlibc/libstdio/ferror.c<br/>deleted file mode 100644<br/>index e86873be0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/ferror.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/ferror.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-int ferror(FILE *stream) {</div><div class='del'>-  return (stream-&gt;flags&amp;ERRORINDICATOR);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fflush.c b/mdk-stage1/dietlibc/libstdio/fflush.c<br/>deleted file mode 100644<br/>index 7078e04f4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fflush.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fflush.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,62 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-FILE *__stdio_root;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-int __stdio_atexit=0;</div><div class='del'>-</div><div class='del'>-void __stdio_flushall() {</div><div class='del'>-  fflush(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern int __fflush_stdin();</div><div class='del'>-extern int __fflush_stdout();</div><div class='del'>-extern int __fflush_stderr();</div><div class='del'>-</div><div class='del'>-int fflush(FILE *stream) {</div><div class='del'>-  if (stream==0) {</div><div class='del'>-    int res;</div><div class='del'>-    FILE *f;</div><div class='del'>-    __fflush_stdin();</div><div class='del'>-    __fflush_stdout();</div><div class='del'>-    __fflush_stderr();</div><div class='del'>-    for (res=0, f=__stdio_root; f; f=f-&gt;next)</div><div class='del'>-      if (fflush(f))</div><div class='del'>-	res=-1;</div><div class='del'>-    return res;</div><div class='del'>-  }</div><div class='del'>-  if (stream-&gt;flags&amp;BUFINPUT) {</div><div class='del'>-    register int tmp;</div><div class='del'>-    if ((tmp=stream-&gt;bm-stream-&gt;bs)) lseek(stream-&gt;fd,tmp,SEEK_CUR);</div><div class='del'>-  } else</div><div class='del'>-    if (stream-&gt;bm &amp;&amp; write(stream-&gt;fd,stream-&gt;buf,stream-&gt;bm)!=stream-&gt;bm) {</div><div class='del'>-      stream-&gt;flags|=ERRORINDICATOR;</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-  stream-&gt;bm=0;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int __fflush4(FILE *stream,int next) {</div><div class='del'>-  if (!__stdio_atexit) {</div><div class='del'>-    __stdio_atexit=1;</div><div class='del'>-    atexit(__stdio_flushall);</div><div class='del'>-  }</div><div class='del'>-  if ((stream-&gt;flags&amp;BUFINPUT)!=next) {</div><div class='del'>-    int res=fflush(stream);</div><div class='del'>-    stream-&gt;flags=(stream-&gt;flags&amp;~BUFINPUT)|next;</div><div class='del'>-    return res;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-int fflush(FILE *stream) {</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-link_warning("fflush","warning: your code uses stdio (several kilobytes of bloat).")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fgetc.c b/mdk-stage1/dietlibc/libstdio/fgetc.c<br/>deleted file mode 100644<br/>index 90d83961a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fgetc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fgetc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern int feof(FILE *stream);</div><div class='del'>-</div><div class='del'>-int fgetc(FILE *stream) {</div><div class='del'>-  unsigned char c;</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  if (stream-&gt;ungotten) {</div><div class='del'>-    stream-&gt;ungotten=0;</div><div class='del'>-    return stream-&gt;ungetbuf;</div><div class='del'>-  }</div><div class='del'>-#endif</div><div class='del'>-  if (feof(stream))</div><div class='del'>-    return EOF;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  if (__fflush4(stream,BUFINPUT)) return EOF;</div><div class='del'>-  if (stream-&gt;bm&gt;=stream-&gt;bs) {</div><div class='del'>-    int len=read(stream-&gt;fd,stream-&gt;buf,BUFSIZE);</div><div class='del'>-    if (len==0) {</div><div class='del'>-      stream-&gt;flags|=EOFINDICATOR;</div><div class='del'>-      return EOF;</div><div class='del'>-    } else if (len&lt;0) {</div><div class='del'>-      stream-&gt;flags|=ERRORINDICATOR;</div><div class='del'>-      return EOF;</div><div class='del'>-    }</div><div class='del'>-    stream-&gt;bm=0;</div><div class='del'>-    stream-&gt;bs=len;</div><div class='del'>-  }</div><div class='del'>-  c=stream-&gt;buf[stream-&gt;bm];</div><div class='del'>-  ++stream-&gt;bm;</div><div class='del'>-  return c;</div><div class='del'>-#else</div><div class='del'>-  if (read(stream-&gt;fd,&amp;c,1)!=1) {</div><div class='del'>-    stream-&gt;flags|=ERRORINDICATOR;</div><div class='del'>-    return EOF;</div><div class='del'>-  }</div><div class='del'>-  return c;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fgets.c b/mdk-stage1/dietlibc/libstdio/fgets.c<br/>deleted file mode 100644<br/>index c613d452d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fgets.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fgets.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-</div><div class='del'>-extern int ferror(FILE *stream);</div><div class='del'>-</div><div class='del'>-char *fgets(char *s, int size, FILE *stream) {</div><div class='del'>-  char *orig=s;</div><div class='del'>-  int l;</div><div class='del'>-  for (l=size; l&gt;0;) {</div><div class='del'>-    int c=fgetc(stream);</div><div class='del'>-    if (c==EOF) break;</div><div class='del'>-    *s=c;</div><div class='del'>-    ++s;</div><div class='del'>-    --l;</div><div class='del'>-    if (c=='\n') break;</div><div class='del'>-  }</div><div class='del'>-  if (l==size || ferror(stream))</div><div class='del'>-    return 0;</div><div class='del'>-  *s=0;</div><div class='del'>-  return orig;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fileno.c b/mdk-stage1/dietlibc/libstdio/fileno.c<br/>deleted file mode 100644<br/>index f021d3881..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fileno.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fileno.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-int fileno(FILE *stream) {</div><div class='del'>-  return stream-&gt;fd;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fopen.c b/mdk-stage1/dietlibc/libstdio/fopen.c<br/>deleted file mode 100644<br/>index aac17be42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fopen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fopen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define SEEK_END 2</div><div class='del'>-</div><div class='del'>-extern int __stdio_atexit;</div><div class='del'>-extern void __stdio_flushall();</div><div class='del'>-</div><div class='del'>-extern int __stdio_parse_mode(const char *mode);</div><div class='del'>-extern FILE* __stdio_init_file(int fd);</div><div class='del'>-</div><div class='del'>-FILE *fopen (const char *path, const char *mode) {</div><div class='del'>-  int f=0;	/* O_RDONLY, O_WRONLY or O_RDWR */</div><div class='del'>-  int fd;</div><div class='del'>-</div><div class='del'>-  f=__stdio_parse_mode(mode);</div><div class='del'>-  if ((fd=open(path,f,0666))&lt;0)</div><div class='del'>-    return 0;</div><div class='del'>-  return __stdio_init_file(fd);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fprintf.c b/mdk-stage1/dietlibc/libstdio/fprintf.c<br/>deleted file mode 100644<br/>index 237fd1e51..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-extern int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int fprintf(FILE *f,const char *format,...) {</div><div class='del'>-  int n;</div><div class='del'>-  char *printf_buf;</div><div class='del'>-/*  char printf_buf[1024]; */</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsnprintf(0,1000000,format,arg_ptr);</div><div class='del'>-/*  write(1,printf_buf,strlen(printf_buf)); */</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  va_start (arg_ptr, format);</div><div class='del'>-  printf_buf=alloca(n+2);</div><div class='del'>-  n=vsnprintf(printf_buf,n+1,format,arg_ptr);</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  fwrite(printf_buf,n,1,f);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fputc.c b/mdk-stage1/dietlibc/libstdio/fputc.c<br/>deleted file mode 100644<br/>index b816f7c4d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fputc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fputc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#ifndef WANT_BUFFERED_STDIO</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int fputc(int c, FILE *stream) {</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  if (__fflush4(stream,0)) return EOF;</div><div class='del'>-  if (stream-&gt;bm&gt;=BUFSIZE-1)</div><div class='del'>-    if (fflush(stream)) return EOF;</div><div class='del'>-  stream-&gt;buf[stream-&gt;bm]=c;</div><div class='del'>-  ++stream-&gt;bm;</div><div class='del'>-  if ((stream-&gt;flags&amp;BUFLINEWISE) &amp;&amp; c=='\n')	/* puke */</div><div class='del'>-    if (fflush(stream)) return EOF;</div><div class='del'>-#else</div><div class='del'>-  write(stream-&gt;fd,&amp;c,1);</div><div class='del'>-#endif</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fputs.c b/mdk-stage1/dietlibc/libstdio/fputs.c<br/>deleted file mode 100644<br/>index 51ee9a96e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fputs.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fputs.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-int fputs(const char *s, FILE *stream) {</div><div class='del'>-  return fwrite(s,strlen(s),1,stream);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fread.c b/mdk-stage1/dietlibc/libstdio/fread.c<br/>deleted file mode 100644<br/>index 29afa1489..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fread.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fread.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream) {</div><div class='del'>-  int res;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  unsigned long i,j;</div><div class='del'>-  j=size*nmemb;</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  if (stream-&gt;ungotten) {</div><div class='del'>-    *(char*)ptr=stream-&gt;ungetbuf;</div><div class='del'>-    ptr=((char*)ptr)+1;</div><div class='del'>-    --j;</div><div class='del'>-  }</div><div class='del'>-  if (!j) return 1;</div><div class='del'>-#endif</div><div class='del'>-  for (i=0; i&lt;j; ++i) {</div><div class='del'>-    res=fgetc(stream);</div><div class='del'>-    if (res==EOF)</div><div class='del'>-      return i/size;</div><div class='del'>-    else</div><div class='del'>-      ((unsigned char*)ptr)[i]=(unsigned char)res;</div><div class='del'>-  }</div><div class='del'>-  return nmemb;</div><div class='del'>-#else</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  unsigned long j=size*nmemb;</div><div class='del'>-#endif</div><div class='del'>-  fflush(stream);</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-  if (stream-&gt;ungotten) {</div><div class='del'>-    *(char*)ptr=stream-&gt;ungetbuf;</div><div class='del'>-    ptr=((char*)ptr)+1;</div><div class='del'>-    --j;</div><div class='del'>-  }</div><div class='del'>-  if (!j) return 1;</div><div class='del'>-  res=read(stream-&gt;fd,ptr,j);</div><div class='del'>-#else</div><div class='del'>-  res=read(stream-&gt;fd,ptr,size*nmemb);</div><div class='del'>-#endif</div><div class='del'>-  if (res&lt;0) {</div><div class='del'>-    stream-&gt;flags|=ERRORINDICATOR;</div><div class='del'>-    return 0;</div><div class='del'>-  } else if (res&lt;size*nmemb)</div><div class='del'>-	  if (!(stream-&gt;flags &amp; UNSEEKABLE)</div><div class='del'>-	      || ((stream-&gt;flags &amp; UNSEEKABLE) &amp;&amp; res == 0))</div><div class='del'>-		  stream-&gt;flags|=EOFINDICATOR;</div><div class='del'>-  return res/size;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/freopen.c b/mdk-stage1/dietlibc/libstdio/freopen.c<br/>deleted file mode 100644<br/>index 8d4644a10..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/freopen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/freopen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-FILE *freopen (const char *path, const char *mode, FILE *stream) {</div><div class='del'>-  fclose(stream);</div><div class='del'>-  stream=fopen(path,mode);</div><div class='del'>-  return stream;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fseek.c b/mdk-stage1/dietlibc/libstdio/fseek.c<br/>deleted file mode 100644<br/>index 5bb96bc6e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fseek.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fseek.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-long fseek(FILE *stream, long offset, int whence) {</div><div class='del'>-  fflush(stream);</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  stream-&gt;bm=0; stream-&gt;bs=0;</div><div class='del'>-#endif</div><div class='del'>-  stream-&gt;flags&amp;=~(ERRORINDICATOR|EOFINDICATOR);</div><div class='del'>-  return (lseek(stream-&gt;fd,offset,whence));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/ftell.c b/mdk-stage1/dietlibc/libstdio/ftell.c<br/>deleted file mode 100644<br/>index 42d2c9f26..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/ftell.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/ftell.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-long ftell(FILE *stream) {</div><div class='del'>-  fflush(stream);</div><div class='del'>-  return (lseek(stream-&gt;fd,0,SEEK_CUR));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/fwrite.c b/mdk-stage1/dietlibc/libstdio/fwrite.c<br/>deleted file mode 100644<br/>index 5691661a5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/fwrite.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/fwrite.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream) {</div><div class='del'>-  int res;</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  long len=size*nmemb;</div><div class='del'>-  long i;</div><div class='del'>-  if (len&gt;BUFSIZE || (stream-&gt;flags&amp;NOBUF)) {</div><div class='del'>-    if (!(stream-&gt;flags&amp;NOBUF)) fflush(stream);</div><div class='del'>-    res=write(stream-&gt;fd,ptr,size*nmemb);</div><div class='del'>-  } else {</div><div class='del'>-    register const unsigned char *c=ptr;</div><div class='del'>-    for (i=size*nmemb; i&gt;0; --i,++c)</div><div class='del'>-      if (fputc(*c,stream)) {</div><div class='del'>-	res=-1;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-    res=size*nmemb;</div><div class='del'>-  }</div><div class='del'>-#else</div><div class='del'>-  res=write(stream-&gt;fd,ptr,size*nmemb);</div><div class='del'>-#endif</div><div class='del'>-  if (res&lt;0) {</div><div class='del'>-    stream-&gt;flags|=ERRORINDICATOR;</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  return size?res/size:0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/printf.c b/mdk-stage1/dietlibc/libstdio/printf.c<br/>deleted file mode 100644<br/>index 571420dc3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/printf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/printf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-</div><div class='del'>-int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int printf(const char *format,...)</div><div class='del'>-{</div><div class='del'>-  int n;</div><div class='del'>-  char *printf_buf;</div><div class='del'>-/*  char printf_buf[1024]; */</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsnprintf(0,1000000,format,arg_ptr);</div><div class='del'>-/*  write(1,printf_buf,strlen(printf_buf)); */</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  va_start (arg_ptr, format);</div><div class='del'>-  printf_buf=alloca(n+2);</div><div class='del'>-  n=vsnprintf(printf_buf,n+1,format,arg_ptr);</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  fwrite(printf_buf,n,1,stdout);</div><div class='del'>-#else</div><div class='del'>-  write(1,printf_buf,n);</div><div class='del'>-#endif</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/putchar.c b/mdk-stage1/dietlibc/libstdio/putchar.c<br/>deleted file mode 100644<br/>index 7e5285a48..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/putchar.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/putchar.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#undef putchar</div><div class='del'>-int putchar(int c) {</div><div class='del'>-  return fputc(c,stdout);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/setvbuf.c b/mdk-stage1/dietlibc/libstdio/setvbuf.c<br/>deleted file mode 100644<br/>index d0b1b7640..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/setvbuf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/setvbuf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-int setvbuf(FILE *stream, char *buf, int flags , size_t size) {</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-  switch (flags) {</div><div class='del'>-  case _IONBF: stream-&gt;flags = (stream-&gt;flags &amp; ~(BUFLINEWISE)) | NOBUF; break;</div><div class='del'>-  case _IOLBF: stream-&gt;flags = (stream-&gt;flags &amp; ~(BUFLINEWISE|NOBUF)) | BUFLINEWISE; break;</div><div class='del'>-  case _IOFBF: stream-&gt;flags = stream-&gt;flags &amp; ~(NOBUF | BUFLINEWISE); break;</div><div class='del'>-  default: return -1;</div><div class='del'>-  }</div><div class='del'>-#endif</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-link_warning("setvbuf","setvbuf does not implement changing the buffer in diet libc.")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/stderr.c b/mdk-stage1/dietlibc/libstdio/stderr.c<br/>deleted file mode 100644<br/>index a82b1b727..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/stderr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/stderr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-static FILE __stderr = { 2, NOBUF, 0, 0 };</div><div class='del'>-</div><div class='del'>-int __fflush_stderr() {</div><div class='del'>-  return fflush(stderr);</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-static FILE __stderr = { 2, 0 };</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-FILE *stderr=&amp;__stderr;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/stdin.c b/mdk-stage1/dietlibc/libstdio/stdin.c<br/>deleted file mode 100644<br/>index 2db82f9ab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/stdin.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/stdin.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,13 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-static FILE __stdin = { 0, BUFINPUT, 0, 0 };</div><div class='del'>-</div><div class='del'>-int __fflush_stdin() {</div><div class='del'>-  return fflush(stdin);</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-static FILE __stdin = { 0, 0 };</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-FILE *stdin=&amp;__stdin;</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/stdout.c b/mdk-stage1/dietlibc/libstdio/stdout.c<br/>deleted file mode 100644<br/>index 481fb1014..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/stdout.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/stdout.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-#include &lt;dietstdio.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_BUFFERED_STDIO</div><div class='del'>-static FILE __stdout = { 1, BUFLINEWISE, 0, 0 };</div><div class='del'>-</div><div class='del'>-int __fflush_stdout() {</div><div class='del'>-  return fflush(stdout);</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-static FILE __stdout = { 1, 0 };</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-FILE *stdout=&amp;__stdout;</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libstdio/ungetc.c b/mdk-stage1/dietlibc/libstdio/ungetc.c<br/>deleted file mode 100644<br/>index ae03e9381..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libstdio/ungetc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libstdio/ungetc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_UNGETC</div><div class='del'>-int ungetc(int c, FILE *stream) {</div><div class='del'>-  if (stream-&gt;ungotten)</div><div class='del'>-    return EOF;</div><div class='del'>-  stream-&gt;ungotten=1;</div><div class='del'>-  stream-&gt;ungetbuf=(char)(unsigned char)c;</div><div class='del'>-  return c;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/asctime.c b/mdk-stage1/dietlibc/libugly/asctime.c<br/>deleted file mode 100644<br/>index e1fcc8706..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/asctime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/asctime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-static char buf[25];</div><div class='del'>-</div><div class='del'>-char *asctime(const struct tm *timeptr) {</div><div class='del'>-  return asctime_r(timeptr,buf);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/asctime_r.c b/mdk-stage1/dietlibc/libugly/asctime_r.c<br/>deleted file mode 100644<br/>index 46325927c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/asctime_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/asctime_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,29 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-static const char days[] = "Sun Mon Tue Wed Thu Fri Sat ";</div><div class='del'>-static const char months[] = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ";</div><div class='del'>-</div><div class='del'>-static void num2str(char *c,int i) {</div><div class='del'>-  c[0]=i/10+'0';</div><div class='del'>-  c[1]=i%10+'0';</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *asctime_r(const struct tm *t, char *buf) {</div><div class='del'>-  /* "Wed Jun 30 21:49:08 1993\n" */</div><div class='del'>-  *(int*)buf=*(int*)(days+(t-&gt;tm_wday&lt;&lt;2));</div><div class='del'>-  *(int*)(buf+4)=*(int*)(months+(t-&gt;tm_mon&lt;&lt;2));</div><div class='del'>-  num2str(buf+8,t-&gt;tm_mday);</div><div class='del'>-  if (buf[8]=='0') buf[8]=' ';</div><div class='del'>-  buf[10]=' ';</div><div class='del'>-  num2str(buf+11,t-&gt;tm_hour);</div><div class='del'>-  if (buf[11]=='0') buf[11]=' ';</div><div class='del'>-  buf[13]=':';</div><div class='del'>-  num2str(buf+14,t-&gt;tm_min);</div><div class='del'>-  buf[16]=':';</div><div class='del'>-  num2str(buf+17,t-&gt;tm_sec);</div><div class='del'>-  buf[19]=' ';</div><div class='del'>-  num2str(buf+20,(t-&gt;tm_year+1900)/100);</div><div class='del'>-  num2str(buf+22,(t-&gt;tm_year+1900)%100);</div><div class='del'>-  buf[24]='\n';</div><div class='del'>-  return buf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/asprintf.c b/mdk-stage1/dietlibc/libugly/asprintf.c<br/>deleted file mode 100644<br/>index d10c20b4a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/asprintf.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/asprintf.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-extern int vsnprintf (char *str,size_t size,const char *format, va_list arg_ptr);</div><div class='del'>-</div><div class='del'>-int asprintf(char **s, const char *format,...)</div><div class='del'>-{</div><div class='del'>-  int n;</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  n=vsnprintf(0,1000000,format,arg_ptr);</div><div class='del'>-  va_end (arg_ptr);</div><div class='del'>-  va_start (arg_ptr, format);</div><div class='del'>-  if ((*s=malloc(n+2))) {</div><div class='del'>-    n=vsnprintf(*s,n+1,format,arg_ptr);</div><div class='del'>-    va_end(arg_ptr);</div><div class='del'>-    return n;</div><div class='del'>-  }</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/ctime.c b/mdk-stage1/dietlibc/libugly/ctime.c<br/>deleted file mode 100644<br/>index a0e12d673..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/ctime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/ctime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-char *ctime(const time_t *timep) {</div><div class='del'>-  return asctime(localtime(timep));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/daemon.c b/mdk-stage1/dietlibc/libugly/daemon.c<br/>deleted file mode 100644<br/>index 6748cc3c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/daemon.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/daemon.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;paths.h&gt;</div><div class='del'>-</div><div class='del'>-#include "daemon.h"</div><div class='del'>-</div><div class='del'>-int daemon (int nochdir,int noclose)</div><div class='del'>-{</div><div class='del'>-   int fd;</div><div class='del'>-   switch (fork ())</div><div class='del'>-         {</div><div class='del'>-          case -1:</div><div class='del'>-                return (-1);</div><div class='del'>-          case 0:</div><div class='del'>-                break;</div><div class='del'>-          default:</div><div class='del'>-                _exit (0);</div><div class='del'>-         }</div><div class='del'>-   if (setsid () == -1)</div><div class='del'>-         return (-1);</div><div class='del'>-   if (!nochdir) chdir ("/");</div><div class='del'>-   if (!noclose)</div><div class='del'>-         {</div><div class='del'>-                fd = open (_PATH_DEVNULL,O_RDWR,0);</div><div class='del'>-                if (fd == -1) return (-1);</div><div class='del'>-                dup2 (fd,STDIN_FILENO);</div><div class='del'>-                dup2 (fd,STDOUT_FILENO);</div><div class='del'>-                dup2 (fd,STDERR_FILENO);</div><div class='del'>-                close (fd);</div><div class='del'>-         }</div><div class='del'>-   return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/endmntent.c b/mdk-stage1/dietlibc/libugly/endmntent.c<br/>deleted file mode 100644<br/>index 00ade38e5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/endmntent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/endmntent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;mntent.h&gt;</div><div class='del'>-</div><div class='del'>-int endmntent(FILE *filep) {</div><div class='del'>-  return fclose(filep);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/facilitynames.c b/mdk-stage1/dietlibc/libugly/facilitynames.c<br/>deleted file mode 100644<br/>index 8b0e1f21f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/facilitynames.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/facilitynames.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#include &lt;sys/syslog.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef INTERNAL_MARK</div><div class='del'>-#define INTERNAL_MARK 0x300</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-CODE facilitynames[] =</div><div class='del'>-  {</div><div class='del'>-    { "auth", LOG_AUTH },</div><div class='del'>-    { "authpriv", LOG_AUTHPRIV },</div><div class='del'>-    { "cron", LOG_CRON },</div><div class='del'>-    { "daemon", LOG_DAEMON },</div><div class='del'>-    { "ftp", LOG_FTP },</div><div class='del'>-    { "kern", LOG_KERN },</div><div class='del'>-    { "lpr", LOG_LPR },</div><div class='del'>-    { "mail", LOG_MAIL },</div><div class='del'>-    { "mark", INTERNAL_MARK },		/* INTERNAL */</div><div class='del'>-    { "news", LOG_NEWS },</div><div class='del'>-    { "security", LOG_AUTH },		/* DEPRECATED */</div><div class='del'>-    { "syslog", LOG_SYSLOG },</div><div class='del'>-    { "user", LOG_USER },</div><div class='del'>-    { "uucp", LOG_UUCP },</div><div class='del'>-    { "local0", LOG_LOCAL0 },</div><div class='del'>-    { "local1", LOG_LOCAL1 },</div><div class='del'>-    { "local2", LOG_LOCAL2 },</div><div class='del'>-    { "local3", LOG_LOCAL3 },</div><div class='del'>-    { "local4", LOG_LOCAL4 },</div><div class='del'>-    { "local5", LOG_LOCAL5 },</div><div class='del'>-    { "local6", LOG_LOCAL6 },</div><div class='del'>-    { "local7", LOG_LOCAL7 },</div><div class='del'>-    { 0, -1 }</div><div class='del'>-  };</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/getmntent.c b/mdk-stage1/dietlibc/libugly/getmntent.c<br/>deleted file mode 100644<br/>index 250a77b7f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/getmntent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/getmntent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;mntent.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-struct mntent *getmntent(FILE *filep) {</div><div class='del'>-  static struct mntent m;</div><div class='del'>-  char buf[1024];</div><div class='del'>-  do {</div><div class='del'>-    char *tmp=buf;</div><div class='del'>-    int num;</div><div class='del'>-    fgets(buf,1024,filep);</div><div class='del'>-/* "/dev/ide/host0/bus0/target0/lun0/part2 / reiserfs defaults 1 1" */</div><div class='del'>-    for (num=0; num&lt;6; ++num) {</div><div class='del'>-      switch (num) {</div><div class='del'>-      case 0: m.mnt_fsname=tmp; break;</div><div class='del'>-      case 1: m.mnt_dir=tmp; break;</div><div class='del'>-      case 2: m.mnt_type=tmp; break;</div><div class='del'>-      case 3: m.mnt_opts=tmp; break;</div><div class='del'>-      case 4: m.mnt_freq=strtol(tmp,&amp;tmp,0); if (*tmp!=' ') continue; break;</div><div class='del'>-      case 5: m.mnt_passno=strtol(tmp,&amp;tmp,0); if (*tmp=='\n') return &amp;m; break;</div><div class='del'>-      }</div><div class='del'>-      if ((tmp=strchr(tmp,' '))) {</div><div class='del'>-	if (num&lt;4) *tmp++=0;</div><div class='del'>-	while (*tmp==' ') ++tmp;</div><div class='del'>-      } else</div><div class='del'>-	continue;</div><div class='del'>-    }</div><div class='del'>-  } while (1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/getprotoent.c b/mdk-stage1/dietlibc/libugly/getprotoent.c<br/>deleted file mode 100644<br/>index a648e2307..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/getprotoent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/getprotoent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,130 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/mman.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-static int protofd=-1;</div><div class='del'>-static char* protomap;</div><div class='del'>-static unsigned int protolen;</div><div class='del'>-</div><div class='del'>-static char* aliases[10];</div><div class='del'>-</div><div class='del'>-static char *cur;</div><div class='del'>-</div><div class='del'>-/* ip	0	IP		# internet protocol, pseudo protocol number */</div><div class='del'>-struct protoent *getprotoent(void) {</div><div class='del'>-  static struct protoent pe;</div><div class='del'>-  char *last;</div><div class='del'>-  int aliasidx;</div><div class='del'>-  if (protofd&lt;0) {</div><div class='del'>-    protofd=open(_PATH_SERVICES,O_RDONLY);</div><div class='del'>-    if (protofd&lt;0) return 0;</div><div class='del'>-    protolen=lseek(protofd,0,SEEK_END);</div><div class='del'>-    protomap=mmap(0,protolen,PROT_READ|PROT_WRITE,MAP_PRIVATE,protofd,0);</div><div class='del'>-    if ((long)protomap==(-1)) goto error;</div><div class='del'>-    cur=protomap;</div><div class='del'>-  }</div><div class='del'>-  last=protomap+protolen;</div><div class='del'>-again:</div><div class='del'>-  pe.p_name=0;</div><div class='del'>-  pe.p_aliases=aliases; aliases[0]=0;</div><div class='del'>-  pe.p_proto=0;</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='#' || *cur=='\n') goto parseerror;</div><div class='del'>-  /* first, the primary name */</div><div class='del'>-  if (!isalpha(*cur)) goto parseerror;</div><div class='del'>-  pe.p_name=cur;</div><div class='del'>-  pe.p_aliases=aliases;</div><div class='del'>-  while (cur&lt;last &amp;&amp; isalnum(*cur)) cur++;</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='\n') goto parseerror;</div><div class='del'>-  *cur=0; cur++;</div><div class='del'>-  /* second, the protocol number */</div><div class='del'>-  while (cur&lt;last &amp;&amp; isblank(*cur)) cur++;</div><div class='del'>-  while (cur&lt;last &amp;&amp; isdigit(*cur)) {</div><div class='del'>-    pe.p_proto=pe.p_proto*10+*cur-'0';</div><div class='del'>-    cur++;</div><div class='del'>-  }</div><div class='del'>-/*  pe.p_proto=htons(pe.s_proto); */</div><div class='del'>-  if (cur&gt;=last) return 0;</div><div class='del'>-  if (*cur=='\n') { *cur++=0; return &amp;pe; }</div><div class='del'>-  *cur=0; cur++;</div><div class='del'>-  /* now the aliases */</div><div class='del'>-  for (aliasidx=0;aliasidx&lt;10;++aliasidx) {</div><div class='del'>-    while (cur&lt;last &amp;&amp; isblank(*cur)) ++cur;</div><div class='del'>-    aliases[aliasidx]=cur;</div><div class='del'>-    while (cur&lt;last &amp;&amp; isalpha(*cur)) ++cur;</div><div class='del'>-    if (*cur=='\n') { *cur++=0; ++aliasidx; break; }</div><div class='del'>-    if (cur&gt;=last || !isblank(*cur)) break;</div><div class='del'>-    *cur++=0;</div><div class='del'>-  }</div><div class='del'>-  aliases[aliasidx]=0;</div><div class='del'>-  return &amp;pe;</div><div class='del'>-parseerror:</div><div class='del'>-  while (cur&lt;last &amp;&amp; *cur!='\n') cur++;</div><div class='del'>-  cur++;</div><div class='del'>-  goto again;</div><div class='del'>-error:</div><div class='del'>-  if (protomap!=(char*)-1) munmap(protomap,protolen);</div><div class='del'>-  if (protofd!=-1) close(protofd);</div><div class='del'>-  protomap=(char*)-1;</div><div class='del'>-  protofd=-1;</div><div class='del'>-  errno=ENOMEM;</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setprotoent(int stayopen) {</div><div class='del'>-  cur=protomap;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct protoent *getprotobyname(const char *name) {</div><div class='del'>-  struct protoent *s;</div><div class='del'>-  setprotoent(0);</div><div class='del'>-  for (s=getprotoent(); s; s=getprotoent()) {</div><div class='del'>-    char **tmp;</div><div class='del'>-#if 0</div><div class='del'>-    write(1,"found ",6);</div><div class='del'>-    write(1,s-&gt;p_name,strlen(s-&gt;p_name));</div><div class='del'>-    write(1,"/",1);</div><div class='del'>-    write(1,s-&gt;p_proto,strlen(s-&gt;p_proto));</div><div class='del'>-    write(1,"\n",1);</div><div class='del'>-    if (!strcmp(name,"auth")) {</div><div class='del'>-      tmp=s-&gt;p_aliases;</div><div class='del'>-      write(1,"  aka ",5);</div><div class='del'>-      while (*tmp) {</div><div class='del'>-	write(1,*tmp,strlen(*tmp));</div><div class='del'>-	write(1,", ",2);</div><div class='del'>-	++tmp;</div><div class='del'>-      }</div><div class='del'>-      write(1,"\n",1);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    if (!strcmp(name,s-&gt;p_name))</div><div class='del'>-      return s;</div><div class='del'>-    tmp=s-&gt;p_aliases;</div><div class='del'>-    while (*tmp)</div><div class='del'>-      if (!strcmp(name,*tmp++)) return s;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct protoent *getprotobynumber(int proto) {</div><div class='del'>-  struct protoent *s;</div><div class='del'>-  for (s=getprotoent(); s; s=getprotoent()) {</div><div class='del'>-    if (proto==s-&gt;p_proto)</div><div class='del'>-      return s;</div><div class='del'>-  }</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void endprotoent(void) {</div><div class='del'>-  if (protomap!=(char*)-1) munmap(protomap,protolen);</div><div class='del'>-  if (protofd!=-1) close(protofd);</div><div class='del'>-  protomap=(char*)-1;</div><div class='del'>-  protofd=-1;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/gmtime.c b/mdk-stage1/dietlibc/libugly/gmtime.c<br/>deleted file mode 100644<br/>index d33af7972..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/gmtime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/gmtime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-struct tm* gmtime(const time_t *t) {</div><div class='del'>-  static struct tm tmp;</div><div class='del'>-  return gmtime_r(t,&amp;tmp);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/gmtime_r.c b/mdk-stage1/dietlibc/libugly/gmtime_r.c<br/>deleted file mode 100644<br/>index c102d10fa..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/gmtime_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/gmtime_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-/* seconds per day */</div><div class='del'>-#define SPD 24*60*60</div><div class='del'>-</div><div class='del'>-extern unsigned int __spm[];</div><div class='del'>-</div><div class='del'>-struct tm *gmtime_r(const time_t *timep, struct tm *r) {</div><div class='del'>-  time_t i;</div><div class='del'>-  register time_t work=*timep%(SPD);</div><div class='del'>-  r-&gt;tm_sec=work%60; work/=60;</div><div class='del'>-  r-&gt;tm_min=work%60; r-&gt;tm_hour=work/60;</div><div class='del'>-  work=*timep/(SPD);</div><div class='del'>-  r-&gt;tm_wday=(4+work)%7;</div><div class='del'>-  for (i=1970; ; ++i) {</div><div class='del'>-    register time_t k=__isleap(i)?366:365;</div><div class='del'>-    if (work&gt;k)</div><div class='del'>-      work-=k;</div><div class='del'>-    else</div><div class='del'>-      break;</div><div class='del'>-  }</div><div class='del'>-  r-&gt;tm_year=i-1900;</div><div class='del'>-  r-&gt;tm_yday=work;</div><div class='del'>-</div><div class='del'>-  r-&gt;tm_mday=1;</div><div class='del'>-  if (__isleap(i) &amp;&amp; (work&gt;58)) {</div><div class='del'>-    if (work==59) r-&gt;tm_mday=2; /* 29.2. */</div><div class='del'>-    work-=1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  for (i=11; i &amp;&amp; __spm[i]&gt;work; --i) ;</div><div class='del'>-  r-&gt;tm_mon=i;</div><div class='del'>-  r-&gt;tm_mday+=work-__spm[i];</div><div class='del'>-  return r;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/isleap.c b/mdk-stage1/dietlibc/libugly/isleap.c<br/>deleted file mode 100644<br/>index dcfa1ced6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/isleap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/isleap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-int __isleap(int year) {</div><div class='del'>-  /* every fourth year is a leap year except for century years that are</div><div class='del'>-   * not divisible by 400. */</div><div class='del'>-/*  return (year % 4 == 0 &amp;&amp; (year % 100 != 0 || year % 400 == 0)); */</div><div class='del'>-  return (!(year%4) &amp;&amp; ((year%100) || !(year%400)));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/localtime.c b/mdk-stage1/dietlibc/libugly/localtime.c<br/>deleted file mode 100644<br/>index 6fa6acf8a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/localtime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/localtime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-struct tm* localtime(const time_t* t) {</div><div class='del'>-  static struct tm tmp;</div><div class='del'>-  return localtime_r(t,&amp;tmp);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/localtime_r.c b/mdk-stage1/dietlibc/libugly/localtime_r.c<br/>deleted file mode 100644<br/>index d4bc073ce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/localtime_r.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/localtime_r.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_TZFILE_PARSER</div><div class='del'>-extern void __maplocaltime();</div><div class='del'>-extern time_t __tzfile_map(time_t t, int *isdst);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct tm* localtime_r(const time_t* t, struct tm* r) {</div><div class='del'>-  time_t tmp;</div><div class='del'>-#ifdef WANT_TZFILE_PARSER</div><div class='del'>-  __maplocaltime();</div><div class='del'>-  tmp=__tzfile_map(*t,&amp;r-&gt;tm_isdst);</div><div class='del'>-#else</div><div class='del'>-  struct timezone tz;</div><div class='del'>-  gettimeofday(0, &amp;tz);</div><div class='del'>-  tmp=*t-tz.tz_minuteswest*60L;</div><div class='del'>-#endif</div><div class='del'>-  return gmtime_r(&amp;tmp,r);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/logging.c b/mdk-stage1/dietlibc/libugly/logging.c<br/>deleted file mode 100644<br/>index 69c2c2337..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/logging.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/logging.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,211 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;asm/socket.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-#define _PATH_CONSOLE	"/dev/console"</div><div class='del'>-#define BUF_SIZE 512	/* messagebuffer size (&gt;= 200) */</div><div class='del'>-</div><div class='del'>-#define MAX_LOGTAG 80</div><div class='del'>-</div><div class='del'>-/* those have to be global *sigh* */</div><div class='del'>-static volatile int	connected = 0;  /* have done connect */</div><div class='del'>-static volatile int	LogMask = 0xff; /* mask of priorities to be logged */</div><div class='del'>-static char		LogTag[MAX_LOGTAG];	/* string to tag the entry with */</div><div class='del'>-static int		LogFile = -1;   /* fd for log */</div><div class='del'>-static int		LogType = SOCK_DGRAM; /* type of socket connection */</div><div class='del'>-static int		LogFacility = LOG_USER; /* default facility code */</div><div class='del'>-static int		LogStat;	/* status bits, set by openlog() */</div><div class='del'>-extern char		*__progname;	/* Program name, from crt0. */</div><div class='del'>-static struct sockaddr	SyslogAddr;	/* AF_UNIX address of local logger */</div><div class='del'>-</div><div class='del'>-static void closelog_intern(void)</div><div class='del'>-{</div><div class='del'>-  if (!connected) return;</div><div class='del'>-  close(LogFile);</div><div class='del'>-  LogFile = -1;</div><div class='del'>-  connected = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void closelog(void)</div><div class='del'>-{</div><div class='del'>-  closelog_intern();</div><div class='del'>-</div><div class='del'>-  LogTag[0]=0;</div><div class='del'>-  LogType = SOCK_DGRAM;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void openlog_intern(int option, int facility)</div><div class='del'>-{</div><div class='del'>-  LogStat = option;</div><div class='del'>-  if (facility &amp;&amp; ((facility &amp; ~LOG_FACMASK) == 0))</div><div class='del'>-    LogFacility = facility;</div><div class='del'>-</div><div class='del'>-  /* yep, there is a continue inside ;) */</div><div class='del'>-  while(1) {</div><div class='del'>-    if (LogFile == -1) {</div><div class='del'>-      SyslogAddr.sa_family = AF_UNIX;</div><div class='del'>-      strncpy(SyslogAddr.sa_data, _PATH_LOG, sizeof(SyslogAddr.sa_data));</div><div class='del'>-      if (LogStat &amp; LOG_NDELAY)</div><div class='del'>-      {</div><div class='del'>-	if ((LogFile = socket(AF_UNIX, LogType, 0)) == -1) return;</div><div class='del'>-	fcntl(LogFile, F_SETFD, 1);</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-    if ((LogFile != -1) &amp;&amp; !connected) {</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-      int old_errno = (*(__errno_location()));</div><div class='del'>-#else</div><div class='del'>-      int old_errno=errno;</div><div class='del'>-#endif</div><div class='del'>-      if(connect(LogFile, &amp;SyslogAddr, sizeof(SyslogAddr)) == -1) {</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-	int saved_errno = (*(__errno_location()));</div><div class='del'>-#else</div><div class='del'>-	int saved_errno=errno;</div><div class='del'>-#endif</div><div class='del'>-	close(LogFile);</div><div class='del'>-	LogFile = -1;</div><div class='del'>-	if((LogType == SOCK_DGRAM) &amp;&amp; (saved_errno == EPROTOTYPE)) {</div><div class='del'>-	  /* retry with SOCK_STREAM instead of SOCK_DGRAM */</div><div class='del'>-	  LogType = SOCK_STREAM;</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-	  (*(__errno_location()))=old_errno;</div><div class='del'>-#else</div><div class='del'>-	  errno=old_errno;</div><div class='del'>-#endif</div><div class='del'>-	  continue;</div><div class='del'>-	}</div><div class='del'>-      }</div><div class='del'>-      else connected = 1;</div><div class='del'>-    }</div><div class='del'>-    break;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* has to be secured against multiple, simultanious call's in threaded environment */</div><div class='del'>-void openlog(const char *ident, int option, int facility)</div><div class='del'>-{</div><div class='del'>-  if (ident) {</div><div class='del'>-    strncpy(LogTag,ident,MAX_LOGTAG);</div><div class='del'>-    LogTag[MAX_LOGTAG-1]=0;</div><div class='del'>-  }</div><div class='del'>-  openlog_intern(option, facility);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int setlogmask(int mask)</div><div class='del'>-{</div><div class='del'>-  int old = LogMask;</div><div class='del'>-  if (mask) LogMask = mask;</div><div class='del'>-  return old;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void vsyslog(int priority, const char *format, va_list arg_ptr)</div><div class='del'>-{</div><div class='del'>-  char buffer[BUF_SIZE];</div><div class='del'>-  char time_buf[20];</div><div class='del'>-  int buflen, headerlen;</div><div class='del'>-  time_t now;</div><div class='del'>-  struct tm now_tm;</div><div class='del'>-  pid_t pid;</div><div class='del'>-  int fd;</div><div class='del'>-  int sigpipe;</div><div class='del'>-  struct sigaction action, oldaction;</div><div class='del'>-  struct sigaction *oldaction_ptr = NULL;</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-  int saved_errno = (*(__errno_location()));</div><div class='del'>-#else</div><div class='del'>-  int saved_errno = errno;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  /* check for invalid priority/facility bits */</div><div class='del'>-  if (priority &amp; ~(LOG_PRIMASK|LOG_FACMASK)) {</div><div class='del'>-    syslog(LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID, "syslog: unknown facility/priorityority: %x", priority);</div><div class='del'>-    priority &amp;= LOG_PRIMASK|LOG_FACMASK;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* check priority against setlogmask */</div><div class='del'>-  if ((LOG_MASK(LOG_PRI(priority)) &amp;&amp; LogMask) == 0) return;</div><div class='del'>-</div><div class='del'>-  /* Set default facility if none specified. */</div><div class='del'>-  if ((priority &amp; LOG_FACMASK) == 0) priority |= LogFacility;</div><div class='del'>-</div><div class='del'>-  pid = getpid();</div><div class='del'>-  time(&amp;now);</div><div class='del'>-  strftime(time_buf, 20, "%h %e %T", localtime_r (&amp;now, &amp;now_tm));</div><div class='del'>-</div><div class='del'>-  if (LogStat &amp; LOG_PID)</div><div class='del'>-    headerlen = snprintf(buffer, 130, "&lt;%d&gt;%s %s[%d]: ", priority, time_buf, LogTag, pid);</div><div class='del'>-  else</div><div class='del'>-    headerlen = snprintf(buffer, 130, "&lt;%d&gt;%s %s: ", priority, time_buf, LogTag);</div><div class='del'>-</div><div class='del'>-  if (!LogTag[0]) {</div><div class='del'>-    if ((LogStat &amp; LOG_PID) != LOG_PID)</div><div class='del'>-      headerlen = snprintf(buffer, 130, "&lt;%d&gt;%s (unknown)[%d]: ", priority, time_buf, pid);</div><div class='del'>-    strcat(buffer+headerlen, "syslog without openlog w/ ident, please check code!");</div><div class='del'>-    buflen = 41;</div><div class='del'>-  }</div><div class='del'>-  else {</div><div class='del'>-#ifdef WANT_THREAD_SAFE</div><div class='del'>-    (*(__errno_location()))=saved_errno;</div><div class='del'>-#else</div><div class='del'>-    errno=saved_errno;</div><div class='del'>-#endif</div><div class='del'>-    buflen = vsnprintf(buffer+headerlen, BUF_SIZE - headerlen, format, arg_ptr);</div><div class='del'>-  }</div><div class='del'>-  if (LogStat &amp; LOG_PERROR) {</div><div class='del'>-    write(1, buffer+headerlen, buflen);</div><div class='del'>-    if (buffer[headerlen+buflen] != '\n') write(1,"\n", 1);</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* prepare for broken connection */</div><div class='del'>-  memset(&amp;action, 0, sizeof(action));</div><div class='del'>-  action.sa_handler = SIG_IGN;</div><div class='del'>-  sigemptyset(&amp;action.sa_mask);</div><div class='del'>-</div><div class='del'>-  if ((sigpipe = sigaction (SIGPIPE, &amp;action, &amp;oldaction))==0)</div><div class='del'>-    oldaction_ptr = &amp;oldaction;</div><div class='del'>-</div><div class='del'>-  if (!connected) openlog_intern(LogStat | LOG_NDELAY, 0);</div><div class='del'>-</div><div class='del'>-  /* If we have a SOCK_STREAM connection, also send ASCII NUL as a</div><div class='del'>-   * record terminator. */</div><div class='del'>-  if (LogType == SOCK_STREAM) buflen++;</div><div class='del'>-</div><div class='del'>-  if (!connected || (send(LogFile, buffer, buflen+headerlen, 0) != buflen+headerlen)) {</div><div class='del'>-    if (LogType == SOCK_STREAM) buflen--;</div><div class='del'>-    closelog_intern();</div><div class='del'>-    /*</div><div class='del'>-     * Output the message to the console; don't worry about blocking,</div><div class='del'>-     * if console blocks everything will.  Make sure the error reported</div><div class='del'>-     * is the one from the syslogd failure.</div><div class='del'>-     */</div><div class='del'>-    if ((LogStat &amp; LOG_CONS) &amp;&amp;</div><div class='del'>-       ((fd = open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) &gt;= 0))</div><div class='del'>-    {</div><div class='del'>-      write(fd, buffer, buflen+headerlen);</div><div class='del'>-      write(fd, "\r\n", 2);</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (sigpipe == 0)</div><div class='del'>-    sigaction(SIGPIPE, &amp;oldaction, (struct sigaction *) NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void syslog(int priority, const char *format, ...)</div><div class='del'>-{</div><div class='del'>-  va_list arg_ptr;</div><div class='del'>-  va_start(arg_ptr, format);</div><div class='del'>-  vsyslog(priority, format, arg_ptr);</div><div class='del'>-  va_end(arg_ptr);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/mktime.c b/mdk-stage1/dietlibc/libugly/mktime.c<br/>deleted file mode 100644<br/>index ee4dab6c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/mktime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/mktime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-/* seconds per day */</div><div class='del'>-#define SPD 24*60*60</div><div class='del'>-</div><div class='del'>-extern unsigned int __spm[];</div><div class='del'>-</div><div class='del'>-time_t mktime(struct tm *t) {</div><div class='del'>-  time_t x=0;</div><div class='del'>-  unsigned int i;</div><div class='del'>-  if (t-&gt;tm_year&lt;70) return (time_t)(-1);</div><div class='del'>-  for (i=70; i&lt;t-&gt;tm_year; ++i) {</div><div class='del'>-    x+=__isleap(i+1900)?366:365;</div><div class='del'>-  }</div><div class='del'>-  t-&gt;tm_yday=__spm[t-&gt;tm_mon] + t-&gt;tm_mday-1 + ((t-&gt;tm_mon&gt;2) &amp;&amp; __isleap(t-&gt;tm_year)?1:0);</div><div class='del'>-  x+=t-&gt;tm_yday;</div><div class='del'>-  /* x is now the number of days since Jan 1 1970 */</div><div class='del'>-  t-&gt;tm_wday=(4+x)%7;</div><div class='del'>-  x = x*SPD + t-&gt;tm_hour*60*60 + t-&gt;tm_min*60 + t-&gt;tm_sec;</div><div class='del'>-  return x;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/pclose.c b/mdk-stage1/dietlibc/libugly/pclose.c<br/>deleted file mode 100644<br/>index e33076c19..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/pclose.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/pclose.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-</div><div class='del'>-int pclose(FILE *f) {</div><div class='del'>-  int status;</div><div class='del'>-  fclose(f);</div><div class='del'>-  if (waitpid(f-&gt;popen_kludge,&amp;status,0)&gt;=0)</div><div class='del'>-    return status;</div><div class='del'>-  return -1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/popen.c b/mdk-stage1/dietlibc/libugly/popen.c<br/>deleted file mode 100644<br/>index e0e441495..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/popen.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/popen.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-#include "dietstdio.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-extern char **environ;</div><div class='del'>-</div><div class='del'>-FILE *popen(const char *command, const char *type) {</div><div class='del'>-  int pfd[2];</div><div class='del'>-  int fd0;</div><div class='del'>-  pid_t pid;</div><div class='del'>-  if (pipe(pfd)&lt;0) return 0;</div><div class='del'>-  fd0=(*type=='r');</div><div class='del'>-  if ((pid=vfork())&lt;0) {</div><div class='del'>-    close(pfd[0]);</div><div class='del'>-    close(pfd[1]);</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  if (!pid) {	/* child */</div><div class='del'>-    char *argv[]={"sh","-c",0,0};</div><div class='del'>-    close(pfd[!fd0]); close(fd0);</div><div class='del'>-    dup2(pfd[fd0],fd0); close(pfd[fd0]);</div><div class='del'>-    argv[2]=(char*)command;</div><div class='del'>-    execve("/bin/sh",argv,environ);</div><div class='del'>-    _exit(255);</div><div class='del'>-  }</div><div class='del'>-  close(pfd[fd0]);</div><div class='del'>-  {</div><div class='del'>-    register FILE* f;</div><div class='del'>-    if ((f=fdopen(pfd[!fd0],type)))</div><div class='del'>-      f-&gt;popen_kludge=pid;</div><div class='del'>-    return f;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/prioritynames.c b/mdk-stage1/dietlibc/libugly/prioritynames.c<br/>deleted file mode 100644<br/>index 87a99b76d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/prioritynames.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/prioritynames.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,22 +0,0 @@</div><div class='del'>-#include &lt;sys/syslog.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef INTERNAL_NOPRI</div><div class='del'>-#define INTERNAL_NOPRI 0x10</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-CODE prioritynames[] =</div><div class='del'>-  {</div><div class='del'>-    { "alert", LOG_ALERT },</div><div class='del'>-    { "crit", LOG_CRIT },</div><div class='del'>-    { "debug", LOG_DEBUG },</div><div class='del'>-    { "emerg", LOG_EMERG },</div><div class='del'>-    { "err", LOG_ERR },</div><div class='del'>-    { "error", LOG_ERR },		/* DEPRECATED */</div><div class='del'>-    { "info", LOG_INFO },</div><div class='del'>-    { "none", INTERNAL_NOPRI },		/* INTERNAL */</div><div class='del'>-    { "notice", LOG_NOTICE },</div><div class='del'>-    { "panic", LOG_EMERG },		/* DEPRECATED */</div><div class='del'>-    { "warn", LOG_WARNING },		/* DEPRECATED */</div><div class='del'>-    { "warning", LOG_WARNING },</div><div class='del'>-    { 0, -1 }</div><div class='del'>-  };</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/setenv.c b/mdk-stage1/dietlibc/libugly/setenv.c<br/>deleted file mode 100644<br/>index bf47cdb79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/setenv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/setenv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;dietwarning.h&gt;</div><div class='del'>-link_warning("setenv","setenv calls malloc.  Avoid it in small programs.");</div><div class='del'>-</div><div class='del'>-int setenv(const char *name, const char *value, int overwrite) {</div><div class='del'>-  char *c=malloc(strlen(name)+strlen(value)+3);</div><div class='del'>-  if (getenv(name)) {</div><div class='del'>-    if (!overwrite) return 0;</div><div class='del'>-    unsetenv(name);</div><div class='del'>-  }</div><div class='del'>-  strcpy(c,name);</div><div class='del'>-  strcat(c,"=");</div><div class='del'>-  strcat(c,value);</div><div class='del'>-  return putenv(c);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/setmntent.c b/mdk-stage1/dietlibc/libugly/setmntent.c<br/>deleted file mode 100644<br/>index a91d3902b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/setmntent.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/setmntent.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;mntent.h&gt;</div><div class='del'>-</div><div class='del'>-FILE *setmntent(const char *filename, const char *type) {</div><div class='del'>-  return fopen(filename,type);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/strftime.c b/mdk-stage1/dietlibc/libugly/strftime.c<br/>deleted file mode 100644<br/>index b7e750ab1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/strftime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/strftime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,182 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-static char *sweekdays[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};</div><div class='del'>-static char *weekdays[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};</div><div class='del'>-static char *smonths[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};</div><div class='del'>-static char *months[]={"January","February","March","April","May","June","July","August","September","October","November","December"};</div><div class='del'>-static char *ampm[]={"am","pm","AM","PM"};</div><div class='del'>-</div><div class='del'>-static int i2a(char* dest,unsigned int x) {</div><div class='del'>-  register unsigned int tmp=x;</div><div class='del'>-  register int len=0;</div><div class='del'>-  *dest++=tmp/10+'0'; tmp=tmp%10; ++len;</div><div class='del'>-  *dest++=tmp+'0';</div><div class='del'>-  return 2;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int i2as(char* dest,unsigned int x) {</div><div class='del'>-  int len=i2a(dest,x);</div><div class='del'>-  if (*dest=='0') *dest=' ';</div><div class='del'>-  return len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) {</div><div class='del'>-  char *t=s;</div><div class='del'>-  const char *src;</div><div class='del'>-  char buf[5];</div><div class='del'>-  while (*format) {</div><div class='del'>-    switch (*format) {</div><div class='del'>-    case 0: break;</div><div class='del'>-    case '%':</div><div class='del'>-      switch (*++format) {</div><div class='del'>-      case '%': *t='%'; ++t; break;</div><div class='del'>-      case 'a': src=sweekdays[tm-&gt;tm_wday]; goto append;</div><div class='del'>-      case 'A': src=weekdays[tm-&gt;tm_wday]; goto append;</div><div class='del'>-      case 'h':</div><div class='del'>-      case 'b': src=smonths[tm-&gt;tm_mon]; goto append;</div><div class='del'>-      case 'B': src=months[tm-&gt;tm_mon]; goto append;</div><div class='del'>-      case 'c': t+=strftime(t,max-(t-s),"%b %a %d %k:%M:%S %Z %Y",tm); break;</div><div class='del'>-      case 'C': buf[i2a(buf,(tm-&gt;tm_year+1900)/100)]=0; src=buf; goto append;</div><div class='del'>-      case 'd': buf[i2a(buf,tm-&gt;tm_mday)]=0; src=buf; goto append;</div><div class='del'>-      case 'e': buf[i2as(buf,tm-&gt;tm_mday)]=0; src=buf; goto append;</div><div class='del'>-      case 'H': buf[i2a(buf,tm-&gt;tm_hour)]=0; src=buf; goto append;</div><div class='del'>-      case 'I': buf[i2a(buf,tm-&gt;tm_hour%12)]=0; src=buf; goto append;</div><div class='del'>-      case 'j': buf[i2a(buf,tm-&gt;tm_yday)]=0; src=buf; goto append;</div><div class='del'>-      case 'k': buf[i2as(buf,tm-&gt;tm_hour)]=0; src=buf; goto append;</div><div class='del'>-      case 'l': buf[i2as(buf,tm-&gt;tm_hour%12)]=0; src=buf; goto append;</div><div class='del'>-      case 'm': buf[i2a(buf,tm-&gt;tm_mon+1)]=0; src=buf; goto append;</div><div class='del'>-      case 'M': buf[i2a(buf,tm-&gt;tm_min)]=0; src=buf; goto append;</div><div class='del'>-      case 'n': *t='\n'; break;</div><div class='del'>-      case 'p': src=ampm[tm-&gt;tm_hour&gt;11?3:2]; goto append;</div><div class='del'>-      case 'P': src=ampm[tm-&gt;tm_hour&gt;11?1:0]; goto append;</div><div class='del'>-      case 'r': t+=strftime(t,max-(t-s),"%I:%M:%S %p",tm); break;</div><div class='del'>-      case 'R': t+=strftime(t,max-(t-s),"%H:%M",tm); break;</div><div class='del'>-      case 'S': buf[i2a(buf,tm-&gt;tm_sec)]=0; src=buf; goto append;</div><div class='del'>-      case 't': *t='\t'; break;</div><div class='del'>-      case 'T': t+=strftime(t,max-(t-s),"%H:%M:%S",tm); break;</div><div class='del'>-      case 'u': buf[i2a(buf,tm-&gt;tm_wday?tm-&gt;tm_wday:7)]=0; src=buf; goto append;</div><div class='del'>-      case 'w': buf[i2a(buf,tm-&gt;tm_wday)]=0; src=buf; goto append;</div><div class='del'>-      case 'x': t+=strftime(t,max-(t-s),"%b %a %d",tm); break;</div><div class='del'>-      case 'X': t+=strftime(t,max-(t-s),"%k:%M:%S",tm); break;</div><div class='del'>-      case 'y': buf[i2a(buf,tm-&gt;tm_year%100)]=0; src=buf; goto append;</div><div class='del'>-      case 'Y': i2a(buf,(tm-&gt;tm_year+1900)/100); buf[i2a(buf+2,(tm-&gt;tm_year%100))+2]=0; src=buf; goto append;</div><div class='del'>-      case 'Z': src="GMT"; goto append; /* hehe */</div><div class='del'>-append:</div><div class='del'>-      while (*src &amp;&amp; t&lt;s+max) { *t=*src; ++t; ++src; }</div><div class='del'>-      };</div><div class='del'>-      break;</div><div class='del'>-    default:</div><div class='del'>-      *t=*format; ++t;</div><div class='del'>-    }</div><div class='del'>-    ++format;</div><div class='del'>-    if (t&gt;=s+max) break;</div><div class='del'>-    continue;</div><div class='del'>-  }</div><div class='del'>-  *t=0; return t-s;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-       %u     The day of the week as a decimal,  range  1  to  7,</div><div class='del'>-              Monday being 1.  See also %w. (SU)</div><div class='del'>-</div><div class='del'>-       %U     The  week  number  of the current year as a decimal</div><div class='del'>-              number, range 00 to 53,  starting  with  the  first</div><div class='del'>-              Sunday as the first day of week 01. See also %V and</div><div class='del'>-              %W.</div><div class='del'>-</div><div class='del'>-       %V     The ISO 8601:1988 week number of the  current  year</div><div class='del'>-              as  a  decimal number, range 01 to 53, where week 1</div><div class='del'>-              is the first week that has at least 4 days  in  the</div><div class='del'>-              current  year,  and with Monday as the first day of</div><div class='del'>-              the week. See also %U and %W. (SU)</div><div class='del'>-</div><div class='del'>-       %w     The day of the week as a decimal,  range  0  to  6,</div><div class='del'>-              Sunday being 0.  See also %u.</div><div class='del'>-</div><div class='del'>-       %W     The  week  number  of the current year as a decimal</div><div class='del'>-              number, range 00 to 53,  starting  with  the  first</div><div class='del'>-              Monday as the first day of week 01.</div><div class='del'>-</div><div class='del'>-       %x     The  preferred  date representation for the current</div><div class='del'>-              locale without the time.</div><div class='del'>-</div><div class='del'>-       %X     The preferred time representation for  the  current</div><div class='del'>-              locale without the date.</div><div class='del'>-</div><div class='del'>-       %y     The  year  as  a  decimal  number without a century</div><div class='del'>-              (range 00 to 99).</div><div class='del'>-</div><div class='del'>-       %Y     The year as a decimal number including the century.</div><div class='del'>-</div><div class='del'>-       %z     The time-zone as hour offset from GMT.  Required to</div><div class='del'>-              emit RFC822-conformant dates (using "%a, %d  %b  %Y</div><div class='del'>-              %H:%M:%S %z"). (GNU)</div><div class='del'>-</div><div class='del'>-       %Z     The time zone or name or abbreviation.</div><div class='del'>-</div><div class='del'>-       %+     The date and time in date(1) format. (TZ)</div><div class='del'>-</div><div class='del'>-       %%     A literal `%' character.</div><div class='del'>-</div><div class='del'>-       Some  conversion  specifiers  can be modified by preceding</div><div class='del'>-       them by the E or O modifier to indicate that  an  alterna­</div><div class='del'>-       tive  format should be used.  If the alternative format or</div><div class='del'>-       specification does not exist for the current  locale,  the</div><div class='del'>-       behaviour will be as if the unmodified conversion specifi­</div><div class='del'>-       cation were used. (SU) The Single Unix Specification  men­</div><div class='del'>-       tions  %Ec,  %EC,  %Ex, %EX, %Ry, %EY, %Od, %Oe, %OH, %OI,</div><div class='del'>-       %Om, %OM, %OS, %Ou, %OU, %OV, %Ow,  %OW,  %Oy,  where  the</div><div class='del'>-       effect  of  the  O  modifier is to use alternative numeric</div><div class='del'>-       symbols (say, roman numerals), and that of the E  modifier</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-GNU                       29 March 1999                         3</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STRFTIME(3)         Linux Programmer's Manual         STRFTIME(3)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-       is to use a locale-dependent alternative representation.</div><div class='del'>-</div><div class='del'>-       The  broken-down time structure tm is defined in &lt;time.h&gt;.</div><div class='del'>-       See also ctime(3).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-RETURN VALUE</div><div class='del'>-       The strftime() function returns the number  of  characters</div><div class='del'>-       placed  in  the array s, not including the terminating NUL</div><div class='del'>-       character, provided the string, including the  terminating</div><div class='del'>-       NUL,  fits.   Otherwise, it returns 0, and the contents of</div><div class='del'>-       the array is undefined.  (Thus at least since libc  4.4.4;</div><div class='del'>-       very  old  versions  of  libc,  such  as libc 4.4.1, would</div><div class='del'>-       return max if the array was too small.)</div><div class='del'>-</div><div class='del'>-       Note that the return value 0 does not necessarily indicate</div><div class='del'>-       an  error; for example, in many locales %p yields an empty</div><div class='del'>-       string.</div><div class='del'>-</div><div class='del'>-ENVIRONMENT</div><div class='del'>-       The environment variables TZ and LC_TIME are used.</div><div class='del'>-</div><div class='del'>-CONFORMING TO</div><div class='del'>-       ANSI C, SVID 3, ISO 9899.   There  are  strict  inclusions</div><div class='del'>-       between the set of conversions given in ANSI C (unmarked),</div><div class='del'>-       those given in the Single Unix Specification (marked  SU),</div><div class='del'>-       those  given  in Olson's timezone package (marked TZ), and</div><div class='del'>-       those given in glibc (marked GNU), except that %+  is  not</div><div class='del'>-       supported  in glibc2. On the other hand glibc2 has several</div><div class='del'>-       more extensions.  POSIX.1 only refers to ANSI  C;  POSIX.2</div><div class='del'>-       describes  under  date(1)  several  extensions  that could</div><div class='del'>-       apply to strftime as well.</div><div class='del'>-</div><div class='del'>-SEE ALSO</div><div class='del'>-       date(1), time(2), ctime(3), setlocale(3), sprintf(3)</div><div class='del'>-</div><div class='del'>-*/</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/strsignal.c b/mdk-stage1/dietlibc/libugly/strsignal.c<br/>deleted file mode 100644<br/>index 54314d2c7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/strsignal.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/strsignal.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,92 +0,0 @@</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-/* F....ng Kernel haeder is damn broken... */</div><div class='del'>-#ifndef _NSIG</div><div class='del'>-#define _NSIG 64</div><div class='del'>-#endif</div><div class='del'>-#include &lt;asm/signal.h&gt;</div><div class='del'>-</div><div class='del'>-char * strsignal(int sig) {</div><div class='del'>-  if (sig==SIGHUP)</div><div class='del'>-    return "Hangup";</div><div class='del'>-  else if (sig==SIGINT)</div><div class='del'>-    return "Interrupt";</div><div class='del'>-  else if (sig==SIGQUIT)</div><div class='del'>-    return "Quit";</div><div class='del'>-  else if (sig==SIGILL)</div><div class='del'>-    return "Illegal instruction";</div><div class='del'>-  else if (sig==SIGTRAP)</div><div class='del'>-    return "Trace/breakpoint trap";</div><div class='del'>-  else if (sig==SIGABRT)</div><div class='del'>-    return "Aborted";</div><div class='del'>-  else if (sig==SIGFPE)</div><div class='del'>-    return "Floating point exception";</div><div class='del'>-  else if (sig==SIGKILL)</div><div class='del'>-    return "Killed";</div><div class='del'>-  else if (sig==SIGBUS)</div><div class='del'>-    return "Bus error";</div><div class='del'>-  else if (sig==SIGSEGV)</div><div class='del'>-    return "Segmentation fault";</div><div class='del'>-  else if (sig==SIGPIPE)</div><div class='del'>-    return "Broken pipe";</div><div class='del'>-  else if (sig==SIGALRM)</div><div class='del'>-    return "Alarm clock";</div><div class='del'>-  else if (sig==SIGTERM)</div><div class='del'>-    return "Terminated";</div><div class='del'>-  else if (sig==SIGURG)</div><div class='del'>-    return "Urgent I/O condition";</div><div class='del'>-  else if (sig==SIGSTOP)</div><div class='del'>-    return "Stopped (signal)";</div><div class='del'>-  else if (sig==SIGTSTP)</div><div class='del'>-    return "Stopped";</div><div class='del'>-  else if (sig==SIGCONT)</div><div class='del'>-    return "Continue";</div><div class='del'>-  else if (sig==SIGCHLD)</div><div class='del'>-    return "Child exited";</div><div class='del'>-  else if (sig==SIGTTIN)</div><div class='del'>-    return "Stopped (tty input)";</div><div class='del'>-  else if (sig==SIGTTOU)</div><div class='del'>-    return "Stopped (tty output)";</div><div class='del'>-  else if (sig==SIGIO)</div><div class='del'>-    return "I/O possible";</div><div class='del'>-  else if (sig==SIGXCPU)</div><div class='del'>-    return "CPU time limit exceeded";</div><div class='del'>-  else if (sig==SIGXFSZ)</div><div class='del'>-    return "File size limit exceeded";</div><div class='del'>-  else if (sig==SIGVTALRM)</div><div class='del'>-    return "Virtual timer expired";</div><div class='del'>-  else if (sig==SIGPROF)</div><div class='del'>-    return "Profiling timer expired";</div><div class='del'>-  else if (sig==SIGWINCH)</div><div class='del'>-    return "Window changed";</div><div class='del'>-  else if (sig==SIGUSR1)</div><div class='del'>-    return "User defined signal 1";</div><div class='del'>-  else if (sig==SIGUSR2)</div><div class='del'>-    return "User defined signal 1";</div><div class='del'>-#ifdef SIGEMT</div><div class='del'>-  else if (sig==SIGEMT)</div><div class='del'>-    return "EMT trap";</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGSYS</div><div class='del'>-  else if (sig==SIGSYS)</div><div class='del'>-    return "Bad system call";</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGSTKFLT</div><div class='del'>-  else if (sig==SIGSTKFLT)</div><div class='del'>-    return "Stack fault";</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGINFO</div><div class='del'>-  else if (sig==SIGINFO)</div><div class='del'>-    return "Information request";</div><div class='del'>-#elif defined(SIGPWR) &amp;&amp; (!defined(SIGLOST) || (SIGPWR!=SIGLOST))</div><div class='del'>-  else if (sig==SIGPWR)</div><div class='del'>-    return "Power falure";</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGLOST</div><div class='del'>-  else if (sig==SIGLOST)</div><div class='del'>-    return "Resource lost";</div><div class='del'>-#endif</div><div class='del'>-  else if ((sig&gt;=SIGRTMIN)&amp;&amp;(sig&lt;=SIGRTMAX))</div><div class='del'>-    return "Real time signal";</div><div class='del'>-  else</div><div class='del'>-    return "(unknown signal)";</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/system.c b/mdk-stage1/dietlibc/libugly/system.c<br/>deleted file mode 100644<br/>index b9eea20eb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/system.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/system.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,69 +0,0 @@</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-#define SHELL_PATH      "/bin/sh"       /* Path of the shell.  */</div><div class='del'>-#define SHELL_NAME      "sh"            /* Name to give it.  */</div><div class='del'>-</div><div class='del'>-extern char **environ;</div><div class='del'>-</div><div class='del'>-int __libc_fork();</div><div class='del'>-int __libc_waitpid(int pid, int *status, int options);</div><div class='del'>-int execve(const char*filename, char *const argv[], char *const envp[]);</div><div class='del'>-void __set_errno(int errno);</div><div class='del'>-int sigaction(int signum,  const  struct  sigaction  *act, struct sigaction *oldact);</div><div class='del'>-</div><div class='del'>-int __libc_system (const char *line)</div><div class='del'>-{</div><div class='del'>-  struct sigaction sa, intr, quit;</div><div class='del'>-  int save,pid,ret=-1;</div><div class='del'>-</div><div class='del'>-  if (line == 0) return __libc_system("exit 0") == 0;</div><div class='del'>-</div><div class='del'>-  sa.sa_handler = SIG_IGN;</div><div class='del'>-  sa.sa_flags = 0;</div><div class='del'>-  sigemptyset (&amp;sa.sa_mask);</div><div class='del'>-</div><div class='del'>-  if (sigaction(SIGINT,  &amp;sa, &amp;intr)&lt;0) return -1;</div><div class='del'>-  if (sigaction(SIGQUIT, &amp;sa, &amp;quit)&lt;0) {</div><div class='del'>-    save = errno;</div><div class='del'>-    sigaction (SIGINT, &amp;intr, (struct sigaction*)0);</div><div class='del'>-    __set_errno (save);</div><div class='del'>-    return -1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  pid=__libc_fork();</div><div class='del'>-  if (pid&gt;0)</div><div class='del'>-  { /* parent */</div><div class='del'>-    int n;</div><div class='del'>-    do</div><div class='del'>-      n=__libc_waitpid(pid, &amp;ret, 0);</div><div class='del'>-    while ((n==-1) &amp;&amp; (errno==EINTR));</div><div class='del'>-    if (n!=pid) ret=-1;</div><div class='del'>-  }</div><div class='del'>-  else if (!pid)</div><div class='del'>-  { /* child */</div><div class='del'>-    const char *nargs[4];</div><div class='del'>-    nargs[0] = SHELL_NAME;</div><div class='del'>-    nargs[1] = "-c";</div><div class='del'>-    nargs[2] = line;</div><div class='del'>-    nargs[3] = 0;</div><div class='del'>-</div><div class='del'>-    sigaction(SIGINT,  &amp;intr, (struct sigaction*)0);</div><div class='del'>-    sigaction(SIGQUIT, &amp;quit, (struct sigaction*)0);</div><div class='del'>-</div><div class='del'>-    execve(SHELL_PATH,(char *const *)nargs, environ);</div><div class='del'>-    _exit(127);</div><div class='del'>-  }</div><div class='del'>-  save = errno;</div><div class='del'>-  sigaction (SIGINT,  &amp;intr, (struct sigaction *)0);</div><div class='del'>-  sigaction (SIGQUIT, &amp;quit, (struct sigaction *)0);</div><div class='del'>-  __set_errno(save);</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int system (const char *line) __attribute__((weak,alias("__libc_system")));</div><div class='del'>-</div><div class='del'>-link_warning("system","warning: system() is a security risk.  Use fork and execvp instead!")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/time_table_spd.c b/mdk-stage1/dietlibc/libugly/time_table_spd.c<br/>deleted file mode 100644<br/>index bfe1cf86d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/time_table_spd.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/time_table_spd.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,17 +0,0 @@</div><div class='del'>-</div><div class='del'>-/* seconds per month -- nonleap! */</div><div class='del'>-const unsigned int __spm[12] =</div><div class='del'>-  { 0,</div><div class='del'>-    (31),</div><div class='del'>-    (31+28),</div><div class='del'>-    (31+28+31),</div><div class='del'>-    (31+28+31+30),</div><div class='del'>-    (31+28+31+30+31),</div><div class='del'>-    (31+28+31+30+31+30),</div><div class='del'>-    (31+28+31+30+31+30+31),</div><div class='del'>-    (31+28+31+30+31+30+31+31),</div><div class='del'>-    (31+28+31+30+31+30+31+31+30),</div><div class='del'>-    (31+28+31+30+31+30+31+31+30+31),</div><div class='del'>-    (31+28+31+30+31+30+31+31+30+31+30),</div><div class='del'>-  };</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/tzfile.c b/mdk-stage1/dietlibc/libugly/tzfile.c<br/>deleted file mode 100644<br/>index 5702d4bea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/tzfile.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/tzfile.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,86 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;sys/mman.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef WANT_TZFILE_PARSER</div><div class='del'>-static char *tzfile=0;</div><div class='del'>-static int tzlen=-1;</div><div class='del'>-</div><div class='del'>-void __maplocaltime() {</div><div class='del'>-  int fd;</div><div class='del'>-  unsigned int len;</div><div class='del'>-  if (tzlen&gt;=0) return;</div><div class='del'>-  tzlen=0;</div><div class='del'>-  if ((fd=open("/etc/localtime",O_RDONLY))&lt;0) return;</div><div class='del'>-  len=lseek(fd,0,SEEK_END);</div><div class='del'>-  if ((tzfile=mmap(0,len,PROT_READ,MAP_SHARED,fd,0))==MAP_FAILED) return;</div><div class='del'>-  close(fd);</div><div class='del'>-  if (ntohl(*(int*)tzfile) != 0x545a6966) return;</div><div class='del'>-  tzlen=len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *tzset(void)	__attribute__((weak,alias("__maplocaltime")));</div><div class='del'>-</div><div class='del'>-static unsigned long __myntohl(const unsigned char* c) {</div><div class='del'>-  return (((unsigned long)c[0])&lt;&lt;24) +</div><div class='del'>-         (((unsigned long)c[1])&lt;&lt;16) +</div><div class='del'>-         (((unsigned long)c[2])&lt;&lt;8) +</div><div class='del'>-         ((unsigned long)c[3]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-time_t __tzfile_map(time_t t, int *isdst) {</div><div class='del'>-  /* "TZif" plus 16 reserved bytes. */</div><div class='del'>-  char *tmp;</div><div class='del'>-  int i;</div><div class='del'>-  int tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt, tzh_timecnt, tzh_typecnt, tzh_charcnt;</div><div class='del'>-  *isdst=0;</div><div class='del'>-  if (!tzfile) return t;</div><div class='del'>-  tzh_ttisgmtcnt=ntohl(*(int*)(tzfile+20));</div><div class='del'>-  tzh_ttisstdcnt=ntohl(*(int*)(tzfile+24));</div><div class='del'>-  tzh_leapcnt=ntohl(*(int*)(tzfile+28));</div><div class='del'>-  tzh_timecnt=ntohl(*(int*)(tzfile+32));</div><div class='del'>-  tzh_typecnt=ntohl(*(int*)(tzfile+36));</div><div class='del'>-  tzh_charcnt=ntohl(*(int*)(tzfile+40));</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-  tmp=tzfile+20+6*4;</div><div class='del'>-  printf("ttisgmtcnt %d ttisstdcnt %d leapcnt %d timecnt %d typecnt %d charcnt %d\n",tzh_ttisgmtcnt,tzh_ttisstdcnt, tzh_leapcnt, tzh_timecnt, tzh_typecnt, tzh_charcnt);</div><div class='del'>-  printf("transition times: ");</div><div class='del'>-  for (i=0; i&lt;tzh_timecnt; ++i) {</div><div class='del'>-    printf("%s%lu",i?", ":"",ntohl(*(int*)tmp)); tmp+=4;</div><div class='del'>-  }</div><div class='del'>-  printf("\n");</div><div class='del'>-  printf("indices: ");</div><div class='del'>-  for (i=0; i&lt;tzh_timecnt; ++i) {</div><div class='del'>-    printf("%s%d",i?", ":"",*tmp); ++tmp;</div><div class='del'>-  }</div><div class='del'>-  printf("\n");</div><div class='del'>-  printf("transition times: ");</div><div class='del'>-  for (i=0; i&lt;tzh_typecnt; ++i) {</div><div class='del'>-    printf("%s(%lu,%d,%d)",i?", ":"",ntohl(*(int*)tmp),tmp[4],tmp[5]); tmp+=6;</div><div class='del'>-  }</div><div class='del'>-  printf("\n");</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  tmp=tzfile+20+6*4;</div><div class='del'>-  for (i=0; i&lt;tzh_timecnt; ++i)</div><div class='del'>-    if ((time_t)__myntohl(tmp+i*4) &gt;= t) {</div><div class='del'>-/*      printf("match at %d\n",i); */</div><div class='del'>-      tmp+=tzh_timecnt*4;</div><div class='del'>-      i=tmp[i-1];</div><div class='del'>-/*      printf("using index %d\n",i); */</div><div class='del'>-      tmp+=tzh_timecnt;</div><div class='del'>-      tmp+=i*6;</div><div class='del'>-/*      printf("(%lu,%d,%d)\n",ntohl(*(int*)tmp),tmp[4],tmp[5]); */</div><div class='del'>-      *isdst=tmp[4];</div><div class='del'>-      return t+__myntohl(tmp);</div><div class='del'>-    }</div><div class='del'>-  return t;</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-void tzset(void)	__attribute__((weak,alias("return0")));</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/libugly/unsetenv.c b/mdk-stage1/dietlibc/libugly/unsetenv.c<br/>deleted file mode 100644<br/>index 46e880271..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/libugly/unsetenv.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/libugly/unsetenv.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-void unsetenv(const char *name) {</div><div class='del'>-  putenv(name);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/Makefile.add b/mdk-stage1/dietlibc/ppc/Makefile.add<br/>deleted file mode 100644<br/>index 641cf1ade..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/Makefile.add?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/Makefile.add</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-</div><div class='del'>-CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os</div><div class='del'>-VPATH:=ppc:syscalls.s:$(VPATH)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/__longjmp.S b/mdk-stage1/dietlibc/ppc/__longjmp.S<br/>deleted file mode 100644<br/>index 8113eeeea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/__longjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/__longjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,59 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef PIC</div><div class='del'>-#define JUMPTARGET(name) name##@plt</div><div class='del'>-#else</div><div class='del'>-#define JUMPTARGET(name) name</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-.global __longjmp</div><div class='del'>-.type __longjmp,@function</div><div class='del'>-.align 2</div><div class='del'>-__longjmp:</div><div class='del'>-	lwz 1,(JB_GPR1*4)(3)</div><div class='del'>-	lwz 2,(JB_GPR2*4)(3)</div><div class='del'>-	lwz 0,(JB_LR*4)(3)</div><div class='del'>-	lwz 14,((JB_GPRS+0)*4)(3)</div><div class='del'>-	lfd 14,((JB_FPRS+0*2)*4)(3)</div><div class='del'>-	lwz 15,((JB_GPRS+1)*4)(3)</div><div class='del'>-	lfd 15,((JB_FPRS+1*2)*4)(3)</div><div class='del'>-	lwz 16,((JB_GPRS+2)*4)(3)</div><div class='del'>-	lfd 16,((JB_FPRS+2*2)*4)(3)</div><div class='del'>-	lwz 17,((JB_GPRS+3)*4)(3)</div><div class='del'>-	lfd 17,((JB_FPRS+3*2)*4)(3)</div><div class='del'>-	lwz 18,((JB_GPRS+4)*4)(3)</div><div class='del'>-	lfd 18,((JB_FPRS+4*2)*4)(3)</div><div class='del'>-	lwz 19,((JB_GPRS+5)*4)(3)</div><div class='del'>-	lfd 19,((JB_FPRS+5*2)*4)(3)</div><div class='del'>-	lwz 20,((JB_GPRS+6)*4)(3)</div><div class='del'>-	lfd 20,((JB_FPRS+6*2)*4)(3)</div><div class='del'>-	mtlr 0</div><div class='del'>-	lwz 21,((JB_GPRS+7)*4)(3)</div><div class='del'>-	lfd 21,((JB_FPRS+7*2)*4)(3)</div><div class='del'>-	lwz 22,((JB_GPRS+8)*4)(3)</div><div class='del'>-	lfd 22,((JB_FPRS+8*2)*4)(3)</div><div class='del'>-	lwz 0,(JB_CR*4)(3)</div><div class='del'>-	lwz 23,((JB_GPRS+9)*4)(3)</div><div class='del'>-	lfd 23,((JB_FPRS+9*2)*4)(3)</div><div class='del'>-	lwz 24,((JB_GPRS+10)*4)(3)</div><div class='del'>-	lfd 24,((JB_FPRS+10*2)*4)(3)</div><div class='del'>-	lwz 25,((JB_GPRS+11)*4)(3)</div><div class='del'>-	lfd 25,((JB_FPRS+11*2)*4)(3)</div><div class='del'>-	mtcrf 0xFF,0</div><div class='del'>-	lwz 26,((JB_GPRS+12)*4)(3)</div><div class='del'>-	lfd 26,((JB_FPRS+12*2)*4)(3)</div><div class='del'>-	lwz 27,((JB_GPRS+13)*4)(3)</div><div class='del'>-	lfd 27,((JB_FPRS+13*2)*4)(3)</div><div class='del'>-	lwz 28,((JB_GPRS+14)*4)(3)</div><div class='del'>-	lfd 28,((JB_FPRS+14*2)*4)(3)</div><div class='del'>-	lwz 29,((JB_GPRS+15)*4)(3)</div><div class='del'>-	lfd 29,((JB_FPRS+15*2)*4)(3)</div><div class='del'>-	lwz 30,((JB_GPRS+16)*4)(3)</div><div class='del'>-	lfd 30,((JB_FPRS+16*2)*4)(3)</div><div class='del'>-	lwz 31,((JB_GPRS+17)*4)(3)</div><div class='del'>-	lfd 31,((JB_FPRS+17*2)*4)(3)</div><div class='del'>-	mr 3,4</div><div class='del'>-	blr</div><div class='del'>-.size __longjmp,.-__longjmp</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/__testandset.S b/mdk-stage1/dietlibc/ppc/__testandset.S<br/>deleted file mode 100644<br/>index a6063fbb2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/__testandset.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/__testandset.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,11 +0,0 @@</div><div class='del'>-.global __testandset</div><div class='del'>-.type __testandset,@function</div><div class='del'>-.align 2</div><div class='del'>-__testandset:</div><div class='del'>-	lwarx	5,0,3</div><div class='del'>-	add	0,4,5</div><div class='del'>-	stwcx	0,0,3</div><div class='del'>-	bne	__testandset</div><div class='del'>-	blr</div><div class='del'>-.size __testandset,.-__testandset</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/mmap.c b/mdk-stage1/dietlibc/ppc/mmap.c<br/>deleted file mode 100644<br/>index 25d2926b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/mmap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/mmap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-int mmap(void*start,size_t length,int prot,int flags,int fd,off_t offset) {</div><div class='del'>-  unsigned long __sc_ret, __sc_err;</div><div class='del'>-  {</div><div class='del'>-    register unsigned long __sc_0 __asm__ ("r0");</div><div class='del'>-    register unsigned long __sc_3 __asm__ ("r3");</div><div class='del'>-    register unsigned long __sc_4 __asm__ ("r4");</div><div class='del'>-    register unsigned long __sc_5 __asm__ ("r5");</div><div class='del'>-    register unsigned long __sc_6 __asm__ ("r6");</div><div class='del'>-    register unsigned long __sc_7 __asm__ ("r7");</div><div class='del'>-    register unsigned long __sc_8 __asm__ ("r8");</div><div class='del'>-</div><div class='del'>-    __sc_3 = (unsigned long) (start);</div><div class='del'>-    __sc_4 = (unsigned long) (length);</div><div class='del'>-    __sc_5 = (unsigned long) (prot);</div><div class='del'>-    __sc_6 = (unsigned long) (flags);</div><div class='del'>-    __sc_7 = (unsigned long) (fd);</div><div class='del'>-    __sc_8 = (unsigned long) (offset);</div><div class='del'>-    __sc_0 = __NR_mmap;</div><div class='del'>-    __asm__ __volatile__</div><div class='del'>-	    ("sc           \n\t"</div><div class='del'>-	      "mfcr %1      "</div><div class='del'>-	    : "=&amp;r" (__sc_3), "=&amp;r" (__sc_0)</div><div class='del'>-	    : "0"   (__sc_3), "1"   (__sc_0),</div><div class='del'>-	      "r"   (__sc_4),</div><div class='del'>-	      "r"   (__sc_5),</div><div class='del'>-	      "r"   (__sc_6),</div><div class='del'>-	      "r"   (__sc_7),</div><div class='del'>-	      "r"   (__sc_8)</div><div class='del'>-	    : __syscall_clobbers);</div><div class='del'>-    __sc_ret = __sc_3;</div><div class='del'>-    __sc_err = __sc_0;</div><div class='del'>-  }</div><div class='del'>-  __syscall_return (int);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/setjmp.S b/mdk-stage1/dietlibc/ppc/setjmp.S<br/>deleted file mode 100644<br/>index 50fa2bdd4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/setjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/setjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,56 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef PIC</div><div class='del'>-#define JUMPTARGET(name) name##@plt</div><div class='del'>-#else</div><div class='del'>-#define JUMPTARGET(name) name</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-.global __sigsetjmp</div><div class='del'>-.type __sigsetjmp,@function</div><div class='del'>-.align 2</div><div class='del'>-__sigsetjmp:</div><div class='del'>-        stw  1,(JB_GPR1*4)(3)</div><div class='del'>-        mflr 0</div><div class='del'>-        stw  2,(JB_GPR2*4)(3)</div><div class='del'>-        stw  14,((JB_GPRS+0)*4)(3)</div><div class='del'>-        stfd 14,((JB_FPRS+0*2)*4)(3)</div><div class='del'>-        stw  0,(JB_LR*4)(3)</div><div class='del'>-        stw  15,((JB_GPRS+1)*4)(3)</div><div class='del'>-        stfd 15,((JB_FPRS+1*2)*4)(3)</div><div class='del'>-        mfcr 0</div><div class='del'>-        stw  16,((JB_GPRS+2)*4)(3)</div><div class='del'>-        stfd 16,((JB_FPRS+2*2)*4)(3)</div><div class='del'>-        stw  0,(JB_CR*4)(3)</div><div class='del'>-        stw  17,((JB_GPRS+3)*4)(3)</div><div class='del'>-        stfd 17,((JB_FPRS+3*2)*4)(3)</div><div class='del'>-        stw  18,((JB_GPRS+4)*4)(3)</div><div class='del'>-        stfd 18,((JB_FPRS+4*2)*4)(3)</div><div class='del'>-        stw  19,((JB_GPRS+5)*4)(3)</div><div class='del'>-        stfd 19,((JB_FPRS+5*2)*4)(3)</div><div class='del'>-        stw  20,((JB_GPRS+6)*4)(3)</div><div class='del'>-        stfd 20,((JB_FPRS+6*2)*4)(3)</div><div class='del'>-        stw  21,((JB_GPRS+7)*4)(3)</div><div class='del'>-        stfd 21,((JB_FPRS+7*2)*4)(3)</div><div class='del'>-        stw  22,((JB_GPRS+8)*4)(3)</div><div class='del'>-        stfd 22,((JB_FPRS+8*2)*4)(3)</div><div class='del'>-        stw  23,((JB_GPRS+9)*4)(3)</div><div class='del'>-        stfd 23,((JB_FPRS+9*2)*4)(3)</div><div class='del'>-        stw  24,((JB_GPRS+10)*4)(3)</div><div class='del'>-        stfd 24,((JB_FPRS+10*2)*4)(3)</div><div class='del'>-        stw  25,((JB_GPRS+11)*4)(3)</div><div class='del'>-        stfd 25,((JB_FPRS+11*2)*4)(3)</div><div class='del'>-        stw  26,((JB_GPRS+12)*4)(3)</div><div class='del'>-        stfd 26,((JB_FPRS+12*2)*4)(3)</div><div class='del'>-        stw  27,((JB_GPRS+13)*4)(3)</div><div class='del'>-        stfd 27,((JB_FPRS+13*2)*4)(3)</div><div class='del'>-        stw  28,((JB_GPRS+14)*4)(3)</div><div class='del'>-        stfd 28,((JB_FPRS+14*2)*4)(3)</div><div class='del'>-        stw  29,((JB_GPRS+15)*4)(3)</div><div class='del'>-        stfd 29,((JB_FPRS+15*2)*4)(3)</div><div class='del'>-        stw  30,((JB_GPRS+16)*4)(3)</div><div class='del'>-        stfd 30,((JB_FPRS+16*2)*4)(3)</div><div class='del'>-        stw  31,((JB_GPRS+17)*4)(3)</div><div class='del'>-        stfd 31,((JB_FPRS+17*2)*4)(3)</div><div class='del'>-        b JUMPTARGET (__sigjmp_save)</div><div class='del'>-.size __sigsetjmp,.-__sigsetjmp</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/start.S b/mdk-stage1/dietlibc/ppc/start.S<br/>deleted file mode 100644<br/>index c7afeecd2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/start.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/start.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,44 +0,0 @@</div><div class='del'>-#include "start.h"</div><div class='del'>-</div><div class='del'>-#ifdef __powerpc__</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global _start</div><div class='del'>-.type _start,@function</div><div class='del'>-_start:</div><div class='del'>- /* Save the stack pointer, in case we're statically linked under Linux.  */</div><div class='del'>-	mr      9,1</div><div class='del'>- /* Set up an initial stack frame, and clear the LR.  */</div><div class='del'>-	clrrwi  1,1,4</div><div class='del'>-	li      0,0</div><div class='del'>-	stwu    1,-16(1)</div><div class='del'>-	mtlr    0</div><div class='del'>-	stw     0,0(1)</div><div class='del'>-</div><div class='del'>- /* r9 enthält den initialen Stackpointer.</div><div class='del'>-    argc = (r9)</div><div class='del'>-    argv = (r9+4)</div><div class='del'>-    envp = argv+(argc+1)*4 */</div><div class='del'>-</div><div class='del'>-	lwzu	3,0(9)	/* argc */</div><div class='del'>-	addi	4,9,4	/* argv */</div><div class='del'>-	add	5,0,3	/* argc... */</div><div class='del'>-	addi	5,5,1	/* argc+1...*/</div><div class='del'>-	slwi	5,5,2	/* (argc+1)*4 */</div><div class='del'>-	add	5,5,4	/* argv+(argc+1)*4 */</div><div class='del'>-</div><div class='del'>-	lis	6,environ@ha</div><div class='del'>-	stw	5,environ@l(6)</div><div class='del'>-</div><div class='del'>-	bl	main</div><div class='del'>-	b	exit</div><div class='del'>-.size _start,.-_start</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Define a symbol for the first piece of initialized data.  */</div><div class='del'>-        .section ".data"</div><div class='del'>-__data_start:</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/ppc/unified.S b/mdk-stage1/dietlibc/ppc/unified.S<br/>deleted file mode 100644<br/>index d2b419f0b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/ppc/unified.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/ppc/unified.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-#include &lt;dietfeatures.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __unified_syscall</div><div class='del'>-__unified_syscall:</div><div class='del'>-	sc</div><div class='del'>-	mfcr	0</div><div class='del'>-	andis.	9,0,4096</div><div class='del'>-	mr	0,3</div><div class='del'>-	beq	.L1</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	bl	__set_errno</div><div class='del'>-#else</div><div class='del'>-	lis	9,errno@ha</div><div class='del'>-	stw	3,errno@l(9)</div><div class='del'>-#endif</div><div class='del'>-	li	0,-1</div><div class='del'>-.L1:</div><div class='del'>-	mr	3,0</div><div class='del'>-	blr</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/Makefile.add b/mdk-stage1/dietlibc/sparc/Makefile.add<br/>deleted file mode 100644<br/>index 0de05b1db..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/Makefile.add?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/Makefile.add</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-</div><div class='del'>-CFLAGS+=-mcpu=supersparc -Os</div><div class='del'>-VPATH:=sparc:syscalls.s:$(VPATH)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/__longjmp.S b/mdk-stage1/dietlibc/sparc/__longjmp.S<br/>deleted file mode 100644<br/>index 72e001a2f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/__longjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/__longjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,67 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-#define JB_SP  0</div><div class='del'>-#define JB_FP  1</div><div class='del'>-#define JB_PC  2</div><div class='del'>-</div><div class='del'>-#define ENV(base,reg) [%base + (reg * 4)]</div><div class='del'>-#define ST_FLUSH_WINDOWS 3</div><div class='del'>-#define RW_FP [%fp + 0x48]</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __longjmp</div><div class='del'>-__longjmp:</div><div class='del'>-	/* Store our arguments in global registers so we can still</div><div class='del'>-	   use them while unwinding frames and their register windows.  */</div><div class='del'>-</div><div class='del'>-	ld ENV(o0,JB_FP), %g3   /* Cache target FP in register %g3.  */</div><div class='del'>-	mov %o0, %g1            /* ENV in %g1 */</div><div class='del'>-	orcc %o1, %g0, %g2      /* VAL in %g2 */</div><div class='del'>-	be,a 0f                 /* Branch if zero; else skip delay slot.  */</div><div class='del'>-	 mov 1, %g2             /* Delay slot only hit if zero: VAL = 1.  */</div><div class='del'>-0:</div><div class='del'>-	xor %fp, %g3, %o0</div><div class='del'>-	add %fp, 512, %o1</div><div class='del'>-	andncc %o0, 4095, %o0</div><div class='del'>-	bne .Lthread</div><div class='del'>-	 cmp %o1, %g3</div><div class='del'>-	bl .Lthread</div><div class='del'>-</div><div class='del'>-	/* Now we will loop, unwinding the register windows up the stack</div><div class='del'>-	   until the restored %fp value matches the target value in %g3.  */</div><div class='del'>-</div><div class='del'>-.Lloop:</div><div class='del'>-	cmp %fp, %g3            /* Have we reached the target frame? */</div><div class='del'>-	bl,a .Lloop             /* Loop while current fp is below target.  */</div><div class='del'>-	 restore                /* Unwind register window in delay slot.  */</div><div class='del'>-	be,a .Lfound            /* Better have hit it exactly.  */</div><div class='del'>-	 ld ENV(g1,JB_SP), %o0  /* Delay slot: extract target SP.  */</div><div class='del'>-</div><div class='del'>-.Lthread:</div><div class='del'>-	/*</div><div class='del'>-	 * Do a "flush register windows trap".  The trap handler in the</div><div class='del'>-	 * kernel writes all the register windows to their stack slots, and</div><div class='del'>-	 * marks them all as invalid (needing to be sucked up from the</div><div class='del'>-	 * stack when used).  This ensures that all information needed to</div><div class='del'>-	 * unwind to these callers is in memory, not in the register</div><div class='del'>-	 * windows.</div><div class='del'>-	 */</div><div class='del'>-	ta      ST_FLUSH_WINDOWS</div><div class='del'>-	ld      ENV(g1,JB_PC), %o7 /* Set return PC. */</div><div class='del'>-	ld      ENV(g1,JB_SP), %fp /* Set saved SP on restore below. */</div><div class='del'>-	sub     %fp, 64, %sp    /* Allocate a register frame. */</div><div class='del'>-	st      %g3, RW_FP      /* Set saved FP on restore below. */</div><div class='del'>-	retl</div><div class='del'>-	 restore %g2, 0, %o0    /* Restore values from above register frame. */</div><div class='del'>-</div><div class='del'>-.Lfound:</div><div class='del'>-	/* We have unwound register windows so %fp matches the target.  */</div><div class='del'>-	mov %o0, %sp            /* OK, install new SP.  */</div><div class='del'>-</div><div class='del'>-.Lsp_ok:</div><div class='del'>-	ld ENV(g1,JB_PC), %o0   /* Extract target return PC.  */</div><div class='del'>-	jmp %o0 + 8             /* Return there.  */</div><div class='del'>-	 mov %g2, %o0           /* Delay slot: set return value.  */</div><div class='del'>-</div><div class='del'>-.size __longjmp, . - __longjmp</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/__testandset.S b/mdk-stage1/dietlibc/sparc/__testandset.S<br/>deleted file mode 100644<br/>index 84f6cf597..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/__testandset.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/__testandset.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-.text</div><div class='del'>-.align 4</div><div class='del'>-.global __testandset</div><div class='del'>-__testandset:</div><div class='del'>-	retl</div><div class='del'>-	ldstub	[%o0], %o0</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/clone.S b/mdk-stage1/dietlibc/sparc/clone.S<br/>deleted file mode 100644<br/>index 58b438249..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/clone.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/clone.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,45 +0,0 @@</div><div class='del'>-#include &lt;asm/errno.h&gt;</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.align 4</div><div class='del'>-.weak clone</div><div class='del'>-clone:</div><div class='del'>-.global __clone</div><div class='del'>-__clone:</div><div class='del'>-	save	%sp, -96, %sp</div><div class='del'>-</div><div class='del'>-	tst	%i0		/* check for function pointer */</div><div class='del'>-	be	.Lerror</div><div class='del'>-	tst	%i1		/* check for stack pointer */</div><div class='del'>-	be	.Lerror</div><div class='del'>-	nop</div><div class='del'>-</div><div class='del'>-	mov	%i1, %o1	/* child-stack */</div><div class='del'>-	mov	%i2, %o0	/* clone-flags */</div><div class='del'>-	mov	__NR_clone, %g1</div><div class='del'>-	ta	0x10		/* syscall: clone */</div><div class='del'>-	bcs	.Lerror</div><div class='del'>-</div><div class='del'>-	tst	%o1</div><div class='del'>-	bne	.Lstart		/* we are the child :) */</div><div class='del'>-	nop</div><div class='del'>-	mov	%o0, %i0	/* return child pid */</div><div class='del'>-	ret</div><div class='del'>-	restore</div><div class='del'>-</div><div class='del'>-.Lerror:</div><div class='del'>-	call	__errno_location</div><div class='del'>-	nop</div><div class='del'>-	mov	EINVAL, %l0</div><div class='del'>-	st	%l0, [%o0]</div><div class='del'>-	ret</div><div class='del'>-	restore	%g0, -1, %o0</div><div class='del'>-</div><div class='del'>-.Lstart:</div><div class='del'>-	call	%i0		/* call child-function */</div><div class='del'>-	mov	%i3, %o0	/* put arg in the right place for the child */</div><div class='del'>-</div><div class='del'>-	call	_exit		/* child returned */</div><div class='del'>-	nop</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/fork.S b/mdk-stage1/dietlibc/sparc/fork.S<br/>deleted file mode 100644<br/>index 869c9b30c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/fork.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/fork.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.weak fork</div><div class='del'>-fork:</div><div class='del'>-.global __libc_fork</div><div class='del'>-__libc_fork:</div><div class='del'>-	mov	2, %g1</div><div class='del'>-	ta	0x10</div><div class='del'>-	bcc,a	1f</div><div class='del'>-	nop</div><div class='del'>-	save	%sp, -96, %sp</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	call	__errno_location</div><div class='del'>-	nop</div><div class='del'>-#else</div><div class='del'>-	sethi	%hi(errno), %o0</div><div class='del'>-	or	%o0, %lo(errno), %o0</div><div class='del'>-#endif</div><div class='del'>-	st	%i0, [ %o0 ]</div><div class='del'>-	retl</div><div class='del'>-	restore	%g0, -1, %o0</div><div class='del'>-1:	dec	%o1</div><div class='del'>-	retl</div><div class='del'>-	and	%o0, %o1, %o0</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/mmap.c b/mdk-stage1/dietlibc/sparc/mmap.c<br/>deleted file mode 100644<br/>index 25ebdc24e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/mmap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/mmap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,43 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define __SYSCALL_STRING                                                \</div><div class='del'>-        "ta     0x10;"                                                  \</div><div class='del'>-        "bcs    2f;"                                                    \</div><div class='del'>-        " nop;"                                                         \</div><div class='del'>-        "1:"                                                            \</div><div class='del'>-        ".subsection 2;"                                                \</div><div class='del'>-        "2:"                                                            \</div><div class='del'>-        "save   %%sp, -192, %%sp;"                                      \</div><div class='del'>-        "call   __errno_location;"                                      \</div><div class='del'>-        " nop;"                                                         \</div><div class='del'>-        "st     %%i0,[%%o0];"                                           \</div><div class='del'>-        "ba     1b;"                                                    \</div><div class='del'>-        " restore %%g0, -1, %%o0;"                                      \</div><div class='del'>-        ".previous;"</div><div class='del'>-</div><div class='del'>-#define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g7",                \</div><div class='del'>-        "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",                 \</div><div class='del'>-        "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",           \</div><div class='del'>-        "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",         \</div><div class='del'>-        "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",         \</div><div class='del'>-        "cc", "memory"</div><div class='del'>-</div><div class='del'>-#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6)             \</div><div class='del'>-({                                                                      \</div><div class='del'>-        register long __o0 __asm__ ("o0") = (long)(arg1);               \</div><div class='del'>-        register long __o1 __asm__ ("o1") = (long)(arg2);               \</div><div class='del'>-        register long __o2 __asm__ ("o2") = (long)(arg3);               \</div><div class='del'>-        register long __o3 __asm__ ("o3") = (long)(arg4);               \</div><div class='del'>-        register long __o4 __asm__ ("o4") = (long)(arg5);               \</div><div class='del'>-        register long __o5 __asm__ ("o5") = (long)(arg6);               \</div><div class='del'>-        register long __g1 __asm__ ("g1") = __NR_##name;                \</div><div class='del'>-        __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) :          \</div><div class='del'>-                 "0" (__g1), "1" (__o0), "r" (__o1), "r" (__o2),        \</div><div class='del'>-                 "r" (__o3), "r" (__o4), "r" (__o5) :                   \</div><div class='del'>-                 __SYSCALL_CLOBBERS);                                   \</div><div class='del'>-        __o0;                                                           \</div><div class='del'>-})</div><div class='del'>-int mmap(void*start,size_t length,int prot,int flags,int fd,off_t offset) {</div><div class='del'>-  return inline_syscall6(mmap,start,length,prot,flags,fd,offset);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/pipe.S b/mdk-stage1/dietlibc/sparc/pipe.S<br/>deleted file mode 100644<br/>index 820da2570..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/pipe.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/pipe.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global pipe</div><div class='del'>-pipe:</div><div class='del'>-	mov	%o0, %o2</div><div class='del'>-	mov	__NR_pipe, %g1</div><div class='del'>-	ta 0x10</div><div class='del'>-	bcc,a	1f</div><div class='del'>-	nop</div><div class='del'>-	save	%sp, -96, %sp</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	call	__errno_location</div><div class='del'>-	nop</div><div class='del'>-#else</div><div class='del'>-	sethi	%hi(errno), %o0</div><div class='del'>-	or	%o0, %lo(errno), %o0</div><div class='del'>-#endif</div><div class='del'>-	st	%i0, [ %o0 ]</div><div class='del'>-	ret</div><div class='del'>-	restore	%g0, -1, %o0</div><div class='del'>-</div><div class='del'>-1:	st	%o0, [ %o2 ]</div><div class='del'>-	st	%o1, [ %o2 + 4 ]</div><div class='del'>-	retl</div><div class='del'>-	mov	%g0, %o0</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/setjmp.S b/mdk-stage1/dietlibc/sparc/setjmp.S<br/>deleted file mode 100644<br/>index efc5a7013..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/setjmp.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/setjmp.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-</div><div class='del'>-#define JB_SP  0</div><div class='del'>-#define JB_FP  1</div><div class='del'>-#define JB_PC  2</div><div class='del'>-</div><div class='del'>-#define ST_FLUSH_WINDOWS        0x03</div><div class='del'>-</div><div class='del'>-.section	.rodata</div><div class='del'>-.text</div><div class='del'>-.globl __setjmp</div><div class='del'>-__setjmp:</div><div class='del'>-        b       1f</div><div class='del'>-         set    0, %o1</div><div class='del'>-.size __setjmp,.-__setjmp</div><div class='del'>-</div><div class='del'>-.globl setjmp</div><div class='del'>-setjmp:</div><div class='del'>-        set     1, %o1</div><div class='del'>-.size setjmp,.-setjmp</div><div class='del'>-</div><div class='del'>-.globl __sigsetjmp</div><div class='del'>-__sigsetjmp:</div><div class='del'>-1:</div><div class='del'>-        /* Save our PC, SP and FP.  Save the signal mask if requested with</div><div class='del'>-           a tail-call for simplicity; it always returns zero.  */</div><div class='del'>-        ta      ST_FLUSH_WINDOWS</div><div class='del'>-</div><div class='del'>-        st      %o7, [%o0 + (JB_PC * 4)]</div><div class='del'>-        st      %sp, [%o0 + (JB_SP * 4)]</div><div class='del'>-        st      %fp, [%o0 + (JB_FP * 4)]</div><div class='del'>-</div><div class='del'>-        mov     %o7, %g1</div><div class='del'>-        call    __sigjmp_save</div><div class='del'>-         mov    %g1, %o7</div><div class='del'>-.size __sigsetjmp,.-__sigsetjmp</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/shmat.c b/mdk-stage1/dietlibc/sparc/shmat.c<br/>deleted file mode 100644<br/>index 73b2d89a9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/shmat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/shmat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ipc.h&gt;</div><div class='del'>-#include &lt;sys/shm.h&gt;</div><div class='del'>-#include &lt;asm/ipc.h&gt;</div><div class='del'>-</div><div class='del'>-extern void* __ipc();</div><div class='del'>-</div><div class='del'>-#ifndef PAGE_SIZE</div><div class='del'>-#define PAGE_SIZE 4096</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void* shmat(int shmid,const void* shmaddr,int shmflg) {</div><div class='del'>-  void* raddr;</div><div class='del'>-  register void* result;</div><div class='del'>-  result=__ipc(SHMAT,shmid,shmflg,&amp;raddr,shmaddr);</div><div class='del'>-  if ((unsigned long)result &lt;= -(unsigned long)PAGE_SIZE)</div><div class='del'>-    result=raddr;</div><div class='del'>-  return result;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/start.S b/mdk-stage1/dietlibc/sparc/start.S<br/>deleted file mode 100644<br/>index e948aaddc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/start.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/start.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#include "start.h"</div><div class='del'>-</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-        .section ".text"</div><div class='del'>-        .align 4</div><div class='del'>-        .global _start</div><div class='del'>-        .type _start,@function</div><div class='del'>-_start:</div><div class='del'>-</div><div class='del'>-  /* Terminate the stack frame, and reserve space for functions to</div><div class='del'>-     drop their arguments.  */</div><div class='del'>-        mov     %g0, %fp</div><div class='del'>-        sub     %sp, 6*4, %sp</div><div class='del'>-</div><div class='del'>-  /* Extract the arguments and environment as encoded on the stack.  The</div><div class='del'>-     argument info starts after one register window (16 words) past the SP.  */</div><div class='del'>-        ld      [%sp+22*4], %o0</div><div class='del'>-        add     %sp, 23*4, %o1</div><div class='del'>-	add	%o1, %o0, %o2</div><div class='del'>-	add	%o2, %o0, %o2</div><div class='del'>-	add	%o2, %o0, %o2</div><div class='del'>-	add	%o2, %o0, %o2</div><div class='del'>-	add	%o2, 4, %o2</div><div class='del'>-</div><div class='del'>-	sethi   %hi(environ), %o3</div><div class='del'>-	or      %o3, %lo(environ), %o3</div><div class='del'>-	st	%o2, [%o3]</div><div class='del'>-</div><div class='del'>-  /* When starting a binary via the dynamic linker, %g1 contains the</div><div class='del'>-     address of the shared library termination function, which will be</div><div class='del'>-     registered with atexit().  If we are statically linked, this will</div><div class='del'>-     be NULL.  */</div><div class='del'>-</div><div class='del'>-  /* Let libc do the rest of the initialization, and call main.  */</div><div class='del'>-	call	main</div><div class='del'>-        mov     %g1, %o5</div><div class='del'>-</div><div class='del'>-	b	exit</div><div class='del'>-	mov %o0, %i0</div><div class='del'>-</div><div class='del'>-  /* Die very horribly if exit returns.  */</div><div class='del'>-        unimp</div><div class='del'>-</div><div class='del'>-        .size _start, .-_start</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/udiv.S b/mdk-stage1/dietlibc/sparc/udiv.S<br/>deleted file mode 100644<br/>index 87479e7bd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/udiv.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/udiv.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,363 +0,0 @@</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-   /* This file is generated from divrem.m4; DO NOT EDIT! */</div><div class='del'>-/*</div><div class='del'>- * Division and remainder, from Appendix E of the Sparc Version 8</div><div class='del'>- * Architecture Manual, with fixes from Gordon Irlam.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Input: dividend and divisor in %o0 and %o1 respectively.</div><div class='del'>- *</div><div class='del'>- * m4 parameters:</div><div class='del'>- *  .udiv	name of function to generate</div><div class='del'>- *  div		div=div =&gt; %o0 / %o1; div=rem =&gt; %o0 % %o1</div><div class='del'>- *  false		false=true =&gt; signed; false=false =&gt; unsigned</div><div class='del'>- *</div><div class='del'>- * Algorithm parameters:</div><div class='del'>- *  N		how many bits per iteration we try to get (4)</div><div class='del'>- *  WORDSIZE	total number of bits (32)</div><div class='del'>- *</div><div class='del'>- * Derived constants:</div><div class='del'>- *  TOPBITS	number of bits in the top decade of a number</div><div class='del'>- *</div><div class='del'>- * Important variables:</div><div class='del'>- *  Q		the partial quotient under development (initially 0)</div><div class='del'>- *  R		the remainder so far, initially the dividend</div><div class='del'>- *  ITER	number of main division loop iterations required;</div><div class='del'>- *		equal to ceil(log2(quotient) / N).  Note that this</div><div class='del'>- *		is the log base (2^N) of the quotient.</div><div class='del'>- *  V		the current comparand, initially divisor*2^(ITER*N-1)</div><div class='del'>- *</div><div class='del'>- * Cost:</div><div class='del'>- *  Current estimate for non-large dividend is</div><div class='del'>- *	ceil(log2(quotient) / N) * (10 + 7N/2) + C</div><div class='del'>- *  A large dividend is one greater than 2^(31-TOPBITS) and takes a</div><div class='del'>- *  different path, as the upper bits of the quotient must be developed</div><div class='del'>- *  one bit at a time.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define C_LABEL(name) name:</div><div class='del'>-</div><div class='del'>-#define C_SYMBOL_NAME(name) name</div><div class='del'>-</div><div class='del'>-#define ENTRY(name) \</div><div class='del'>-        .global C_SYMBOL_NAME(name); \</div><div class='del'>-        .align 4;\</div><div class='del'>-        C_LABEL(name);\</div><div class='del'>-        .type name,@function;</div><div class='del'>-</div><div class='del'>-#define LOC(name)  . ## L ## name</div><div class='del'>-</div><div class='del'>-#define END(name) \</div><div class='del'>-        .size name, . - name</div><div class='del'>-</div><div class='del'>-#define ST_DIV0                 0x02</div><div class='del'>-</div><div class='del'>-ENTRY(.udiv)</div><div class='del'>-</div><div class='del'>-	! Ready to divide.  Compute size of quotient; scale comparand.</div><div class='del'>-	orcc	%o1, %g0, %o5</div><div class='del'>-	bne	1f</div><div class='del'>-	mov	%o0, %o3</div><div class='del'>-</div><div class='del'>-		! Divide by zero trap.  If it returns, return 0 (about as</div><div class='del'>-		! wrong as possible, but that is what SunOS does...).</div><div class='del'>-		ta	ST_DIV0</div><div class='del'>-		retl</div><div class='del'>-		clr	%o0</div><div class='del'>-</div><div class='del'>-1:</div><div class='del'>-	cmp	%o3, %o5			! if %o1 exceeds %o0, done</div><div class='del'>-	blu	LOC(got_result)		! (and algorithm fails otherwise)</div><div class='del'>-	clr	%o2</div><div class='del'>-	sethi	%hi(1 &lt;&lt; (32 - 4 - 1)), %g1</div><div class='del'>-	cmp	%o3, %g1</div><div class='del'>-	blu	LOC(not_really_big)</div><div class='del'>-	clr	%o4</div><div class='del'>-</div><div class='del'>-	! Here the dividend is &gt;= 2**(31-N) or so.  We must be careful here,</div><div class='del'>-	! as our usual N-at-a-shot divide step will cause overflow and havoc.</div><div class='del'>-	! The number of bits in the result here is N*ITER+SC, where SC &lt;= N.</div><div class='del'>-	! Compute ITER in an unorthodox manner: know we need to shift V into</div><div class='del'>-	! the top decade: so do not even bother to compare to R.</div><div class='del'>-	1:</div><div class='del'>-		cmp	%o5, %g1</div><div class='del'>-		bgeu	3f</div><div class='del'>-		mov	1, %g2</div><div class='del'>-		sll	%o5, 4, %o5</div><div class='del'>-		b	1b</div><div class='del'>-		add	%o4, 1, %o4</div><div class='del'>-</div><div class='del'>-	! Now compute %g2.</div><div class='del'>-	2:	addcc	%o5, %o5, %o5</div><div class='del'>-		bcc	LOC(not_too_big)</div><div class='del'>-		add	%g2, 1, %g2</div><div class='del'>-</div><div class='del'>-		! We get here if the %o1 overflowed while shifting.</div><div class='del'>-		! This means that %o3 has the high-order bit set.</div><div class='del'>-		! Restore %o5 and subtract from %o3.</div><div class='del'>-		sll	%g1, 4, %g1	! high order bit</div><div class='del'>-		srl	%o5, 1, %o5		! rest of %o5</div><div class='del'>-		add	%o5, %g1, %o5</div><div class='del'>-		b	LOC(do_single_div)</div><div class='del'>-		sub	%g2, 1, %g2</div><div class='del'>-</div><div class='del'>-	LOC(not_too_big):</div><div class='del'>-	3:	cmp	%o5, %o3</div><div class='del'>-		blu	2b</div><div class='del'>-		nop</div><div class='del'>-		be	LOC(do_single_div)</div><div class='del'>-		nop</div><div class='del'>-	/* NB: these are commented out in the V8-Sparc manual as well */</div><div class='del'>-	/* (I do not understand this) */</div><div class='del'>-	! %o5 &gt; %o3: went too far: back up 1 step</div><div class='del'>-	!	srl	%o5, 1, %o5</div><div class='del'>-	!	dec	%g2</div><div class='del'>-	! do single-bit divide steps</div><div class='del'>-	!</div><div class='del'>-	! We have to be careful here.  We know that %o3 &gt;= %o5, so we can do the</div><div class='del'>-	! first divide step without thinking.  BUT, the others are conditional,</div><div class='del'>-	! and are only done if %o3 &gt;= 0.  Because both %o3 and %o5 may have the high-</div><div class='del'>-	! order bit set in the first step, just falling into the regular</div><div class='del'>-	! division loop will mess up the first time around.</div><div class='del'>-	! So we unroll slightly...</div><div class='del'>-	LOC(do_single_div):</div><div class='del'>-		subcc	%g2, 1, %g2</div><div class='del'>-		bl	LOC(end_regular_divide)</div><div class='del'>-		nop</div><div class='del'>-		sub	%o3, %o5, %o3</div><div class='del'>-		mov	1, %o2</div><div class='del'>-		b	LOC(end_single_divloop)</div><div class='del'>-		nop</div><div class='del'>-	LOC(single_divloop):</div><div class='del'>-		sll	%o2, 1, %o2</div><div class='del'>-		bl	1f</div><div class='del'>-		srl	%o5, 1, %o5</div><div class='del'>-		! %o3 &gt;= 0</div><div class='del'>-		sub	%o3, %o5, %o3</div><div class='del'>-		b	2f</div><div class='del'>-		add	%o2, 1, %o2</div><div class='del'>-	1:	! %o3 &lt; 0</div><div class='del'>-		add	%o3, %o5, %o3</div><div class='del'>-		sub	%o2, 1, %o2</div><div class='del'>-	2:</div><div class='del'>-	LOC(end_single_divloop):</div><div class='del'>-		subcc	%g2, 1, %g2</div><div class='del'>-		bge	LOC(single_divloop)</div><div class='del'>-		tst	%o3</div><div class='del'>-		b,a	LOC(end_regular_divide)</div><div class='del'>-</div><div class='del'>-LOC(not_really_big):</div><div class='del'>-1:</div><div class='del'>-	sll	%o5, 4, %o5</div><div class='del'>-	cmp	%o5, %o3</div><div class='del'>-	bleu	1b</div><div class='del'>-	addcc	%o4, 1, %o4</div><div class='del'>-	be	LOC(got_result)</div><div class='del'>-	sub	%o4, 1, %o4</div><div class='del'>-</div><div class='del'>-	tst	%o3	! set up for initial iteration</div><div class='del'>-LOC(divloop):</div><div class='del'>-	sll	%o2, 4, %o2</div><div class='del'>-		! depth 1, accumulated bits 0</div><div class='del'>-	bl	LOC(1.16)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 2, accumulated bits 1</div><div class='del'>-	bl	LOC(2.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits 3</div><div class='del'>-	bl	LOC(3.19)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 7</div><div class='del'>-	bl	LOC(4.23)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (7*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.23):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (7*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.19):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 5</div><div class='del'>-	bl	LOC(4.21)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (5*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.21):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (5*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(2.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits 1</div><div class='del'>-	bl	LOC(3.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 3</div><div class='del'>-	bl	LOC(4.19)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (3*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.19):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (3*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 1</div><div class='del'>-	bl	LOC(4.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (1*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (1*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(1.16):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 2, accumulated bits -1</div><div class='del'>-	bl	LOC(2.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits -1</div><div class='del'>-	bl	LOC(3.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -1</div><div class='del'>-	bl	LOC(4.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-1*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-1*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -3</div><div class='del'>-	bl	LOC(4.13)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-3*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.13):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-3*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(2.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits -3</div><div class='del'>-	bl	LOC(3.13)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -5</div><div class='del'>-	bl	LOC(4.11)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-5*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.11):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-5*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.13):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -7</div><div class='del'>-	bl	LOC(4.9)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-7*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.9):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-7*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	9:</div><div class='del'>-LOC(end_regular_divide):</div><div class='del'>-	subcc	%o4, 1, %o4</div><div class='del'>-	bge	LOC(divloop)</div><div class='del'>-	tst	%o3</div><div class='del'>-	bl,a	LOC(got_result)</div><div class='del'>-	! non-restoring fixup here (one instruction only!)</div><div class='del'>-	sub	%o2, 1, %o2</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-LOC(got_result):</div><div class='del'>-</div><div class='del'>-	retl</div><div class='del'>-	mov %o2, %o0</div><div class='del'>-</div><div class='del'>-END(.udiv)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/umul.S b/mdk-stage1/dietlibc/sparc/umul.S<br/>deleted file mode 100644<br/>index 15038ab2a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/umul.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/umul.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,170 +0,0 @@</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-/*</div><div class='del'>- * Unsigned multiply.  Returns %o0 * %o1 in %o1%o0 (i.e., %o1 holds the</div><div class='del'>- * upper 32 bits of the 64-bit product).</div><div class='del'>- *</div><div class='del'>- * This code optimizes short (less than 13-bit) multiplies.  Short</div><div class='del'>- * multiplies require 25 instruction cycles, and long ones require</div><div class='del'>- * 45 instruction cycles.</div><div class='del'>- *</div><div class='del'>- * On return, overflow has occurred (%o1 is not zero) if and only if</div><div class='del'>- * the Z condition code is clear, allowing, e.g., the following:</div><div class='del'>- *</div><div class='del'>- *	call	.umul</div><div class='del'>- *	nop</div><div class='del'>- *	bnz	overflow	(or tnz)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define C_LABEL(name) name:</div><div class='del'>-</div><div class='del'>-#define C_SYMBOL_NAME(name) name</div><div class='del'>-</div><div class='del'>-#define ENTRY(name) \</div><div class='del'>-        .global C_SYMBOL_NAME(name); \</div><div class='del'>-        .align 4;\</div><div class='del'>-        C_LABEL(name);\</div><div class='del'>-        .type name,@function;</div><div class='del'>-</div><div class='del'>-#define LOC(name)  . ## L ## name</div><div class='del'>-</div><div class='del'>-#define END(name) \</div><div class='del'>-        .size name, . - name</div><div class='del'>-</div><div class='del'>-ENTRY(.umul)</div><div class='del'>-	or	%o0, %o1, %o4</div><div class='del'>-	mov	%o0, %y			! multiplier -&gt; Y</div><div class='del'>-	andncc	%o4, 0xfff, %g0		! test bits 12..31 of *both* args</div><div class='del'>-	be	LOC(mul_shortway)	! if zero, can do it the short way</div><div class='del'>-	 andcc	%g0, %g0, %o4		! zero the partial product; clear N &amp; V</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Long multiply.  32 steps, followed by a final shift step.</div><div class='del'>-	 */</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 1</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 2</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 3</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 4</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 5</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 6</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 7</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 8</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 9</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 10</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 11</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 12</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 13</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 14</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 15</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 16</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 17</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 18</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 19</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 20</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 21</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 22</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 23</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 24</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 25</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 26</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 27</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 28</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 29</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 30</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 31</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 32</div><div class='del'>-	mulscc	%o4, %g0, %o4	! final shift</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Normally, with the shift-and-add approach, if both numbers are</div><div class='del'>-	 * positive you get the correct result.  With 32-bit two's-complement</div><div class='del'>-	 * numbers, -x is represented as</div><div class='del'>-	 *</div><div class='del'>-	 *		  x		    32</div><div class='del'>-	 *	( 2  -  ------ ) mod 2  *  2</div><div class='del'>-	 *		   32</div><div class='del'>-	 *		  2</div><div class='del'>-	 *</div><div class='del'>-	 * (the `mod 2' subtracts 1 from 1.bbbb).  To avoid lots of 2^32s,</div><div class='del'>-	 * we can treat this as if the radix point were just to the left</div><div class='del'>-	 * of the sign bit (multiply by 2^32), and get</div><div class='del'>-	 *</div><div class='del'>-	 *	-x  =  (2 - x) mod 2</div><div class='del'>-	 *</div><div class='del'>-	 * Then, ignoring the `mod 2's for convenience:</div><div class='del'>-	 *</div><div class='del'>-	 *   x *  y	= xy</div><div class='del'>-	 *  -x *  y	= 2y - xy</div><div class='del'>-	 *   x * -y	= 2x - xy</div><div class='del'>-	 *  -x * -y	= 4 - 2x - 2y + xy</div><div class='del'>-	 *</div><div class='del'>-	 * For signed multiplies, we subtract (x &lt;&lt; 32) from the partial</div><div class='del'>-	 * product to fix this problem for negative multipliers (see mul.s).</div><div class='del'>-	 * Because of the way the shift into the partial product is calculated</div><div class='del'>-	 * (N xor V), this term is automatically removed for the multiplicand,</div><div class='del'>-	 * so we don't have to adjust.</div><div class='del'>-	 *</div><div class='del'>-	 * But for unsigned multiplies, the high order bit wasn't a sign bit,</div><div class='del'>-	 * and the correction is wrong.  So for unsigned multiplies where the</div><div class='del'>-	 * high order bit is one, we end up with xy - (y &lt;&lt; 32).  To fix it</div><div class='del'>-	 * we add y &lt;&lt; 32.</div><div class='del'>-	 */</div><div class='del'>-#if 0</div><div class='del'>-	tst	%o1</div><div class='del'>-	bl,a	1f		! if %o1 &lt; 0 (high order bit = 1),</div><div class='del'>-	 add	%o4, %o0, %o4	! %o4 += %o0 (add y to upper half)</div><div class='del'>-1:	rd	%y, %o0		! get lower half of product</div><div class='del'>-	retl</div><div class='del'>-	 addcc	%o4, %g0, %o1	! put upper half in place and set Z for %o1==0</div><div class='del'>-#else</div><div class='del'>-	/* Faster code from tege@sics.se.  */</div><div class='del'>-	sra	%o1, 31, %o2	! make mask from sign bit</div><div class='del'>-	and	%o0, %o2, %o2	! %o2 = 0 or %o0, depending on sign of %o1</div><div class='del'>-	rd	%y, %o0		! get lower half of product</div><div class='del'>-	retl</div><div class='del'>-	 addcc	%o4, %o2, %o1	! add compensation and put upper half in place</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-LOC(mul_shortway):</div><div class='del'>-	/*</div><div class='del'>-	 * Short multiply.  12 steps, followed by a final shift step.</div><div class='del'>-	 * The resulting bits are off by 12 and (32-12) = 20 bit positions,</div><div class='del'>-	 * but there is no problem with %o0 being negative (unlike above),</div><div class='del'>-	 * and overflow is impossible (the answer is at most 24 bits long).</div><div class='del'>-	 */</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 1</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 2</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 3</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 4</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 5</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 6</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 7</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 8</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 9</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 10</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 11</div><div class='del'>-	mulscc	%o4, %o1, %o4	! 12</div><div class='del'>-	mulscc	%o4, %g0, %o4	! final shift</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * %o4 has 20 of the bits that should be in the result; %y has</div><div class='del'>-	 * the bottom 12 (as %y's top 12).  That is:</div><div class='del'>-	 *</div><div class='del'>-	 *	  %o4		    %y</div><div class='del'>-	 * +----------------+----------------+</div><div class='del'>-	 * | -12- |   -20-  | -12- |   -20-  |</div><div class='del'>-	 * +------(---------+------)---------+</div><div class='del'>-	 *	   -----result-----</div><div class='del'>-	 *</div><div class='del'>-	 * The 12 bits of %o4 left of the `result' area are all zero;</div><div class='del'>-	 * in fact, all top 20 bits of %o4 are zero.</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	rd	%y, %o5</div><div class='del'>-	sll	%o4, 12, %o0	! shift middle bits left 12</div><div class='del'>-	srl	%o5, 20, %o5	! shift low bits right 20</div><div class='del'>-	or	%o5, %o0, %o0</div><div class='del'>-	retl</div><div class='del'>-	 addcc	%g0, %g0, %o1	! %o1 = zero, and set Z</div><div class='del'>-</div><div class='del'>-END(.umul)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/unified.S b/mdk-stage1/dietlibc/sparc/unified.S<br/>deleted file mode 100644<br/>index 3cd609da5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/unified.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/unified.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,28 +0,0 @@</div><div class='del'>-#include &lt;dietfeatures.h&gt;</div><div class='del'>-</div><div class='del'>-.text</div><div class='del'>-.global __unified_syscall</div><div class='del'>-__unified_syscall:</div><div class='del'>-	ta	0x10</div><div class='del'>-</div><div class='del'>-	bcc	1f</div><div class='del'>-	save	%sp, -104, %sp</div><div class='del'>-</div><div class='del'>-	neg	%i0, %i0</div><div class='del'>-1:</div><div class='del'>-	add	%i0, 0xff, %l2</div><div class='del'>-	cmp	%l2, 0xfe</div><div class='del'>-	bgu	2f</div><div class='del'>-	neg	%i0, %l3</div><div class='del'>-#ifdef WANT_THREAD_SAVE</div><div class='del'>-	call	__errno_location</div><div class='del'>-	nop</div><div class='del'>-#else</div><div class='del'>-	sethi	%hi(errno), %o0</div><div class='del'>-	or	%o0, %lo(errno), %o0</div><div class='del'>-#endif</div><div class='del'>-	st	%l3, [ %o0 ]</div><div class='del'>-	mov	-1, %i0</div><div class='del'>-2:</div><div class='del'>-	ret</div><div class='del'>-	restore</div><div class='head'>diff --git a/mdk-stage1/dietlibc/sparc/urem.S b/mdk-stage1/dietlibc/sparc/urem.S<br/>deleted file mode 100644<br/>index 943cb7873..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/sparc/urem.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/sparc/urem.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,362 +0,0 @@</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-   /* This file is generated from divrem.m4; DO NOT EDIT! */</div><div class='del'>-/*</div><div class='del'>- * Division and remainder, from Appendix E of the Sparc Version 8</div><div class='del'>- * Architecture Manual, with fixes from Gordon Irlam.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Input: dividend and divisor in %o0 and %o1 respectively.</div><div class='del'>- *</div><div class='del'>- * m4 parameters:</div><div class='del'>- *  .urem	name of function to generate</div><div class='del'>- *  rem		rem=div =&gt; %o0 / %o1; rem=rem =&gt; %o0 % %o1</div><div class='del'>- *  false		false=true =&gt; signed; false=false =&gt; unsigned</div><div class='del'>- *</div><div class='del'>- * Algorithm parameters:</div><div class='del'>- *  N		how many bits per iteration we try to get (4)</div><div class='del'>- *  WORDSIZE	total number of bits (32)</div><div class='del'>- *</div><div class='del'>- * Derived constants:</div><div class='del'>- *  TOPBITS	number of bits in the top decade of a number</div><div class='del'>- *</div><div class='del'>- * Important variables:</div><div class='del'>- *  Q		the partial quotient under development (initially 0)</div><div class='del'>- *  R		the remainder so far, initially the dividend</div><div class='del'>- *  ITER	number of main division loop iterations required;</div><div class='del'>- *		equal to ceil(log2(quotient) / N).  Note that this</div><div class='del'>- *		is the log base (2^N) of the quotient.</div><div class='del'>- *  V		the current comparand, initially divisor*2^(ITER*N-1)</div><div class='del'>- *</div><div class='del'>- * Cost:</div><div class='del'>- *  Current estimate for non-large dividend is</div><div class='del'>- *	ceil(log2(quotient) / N) * (10 + 7N/2) + C</div><div class='del'>- *  A large dividend is one greater than 2^(31-TOPBITS) and takes a</div><div class='del'>- *  different path, as the upper bits of the quotient must be developed</div><div class='del'>- *  one bit at a time.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define C_LABEL(name) name:</div><div class='del'>-</div><div class='del'>-#define C_SYMBOL_NAME(name) name</div><div class='del'>-</div><div class='del'>-#define ENTRY(name) \</div><div class='del'>-        .global C_SYMBOL_NAME(name); \</div><div class='del'>-        .align 4;\</div><div class='del'>-        C_LABEL(name);\</div><div class='del'>-        .type name,@function;</div><div class='del'>-</div><div class='del'>-#define LOC(name)  . ## L ## name</div><div class='del'>-</div><div class='del'>-#define END(name) \</div><div class='del'>-        .size name, . - name</div><div class='del'>-</div><div class='del'>-#define ST_DIV0                 0x02</div><div class='del'>-</div><div class='del'>-ENTRY(.urem)</div><div class='del'>-</div><div class='del'>-	! Ready to divide.  Compute size of quotient; scale comparand.</div><div class='del'>-	orcc	%o1, %g0, %o5</div><div class='del'>-	bne	1f</div><div class='del'>-	mov	%o0, %o3</div><div class='del'>-</div><div class='del'>-		! Divide by zero trap.  If it returns, return 0 (about as</div><div class='del'>-		! wrong as possible, but that is what SunOS does...).</div><div class='del'>-		ta	ST_DIV0</div><div class='del'>-		retl</div><div class='del'>-		clr	%o0</div><div class='del'>-</div><div class='del'>-1:</div><div class='del'>-	cmp	%o3, %o5			! if %o1 exceeds %o0, done</div><div class='del'>-	blu	LOC(got_result)		! (and algorithm fails otherwise)</div><div class='del'>-	clr	%o2</div><div class='del'>-	sethi	%hi(1 &lt;&lt; (32 - 4 - 1)), %g1</div><div class='del'>-	cmp	%o3, %g1</div><div class='del'>-	blu	LOC(not_really_big)</div><div class='del'>-	clr	%o4</div><div class='del'>-</div><div class='del'>-	! Here the dividend is &gt;= 2**(31-N) or so.  We must be careful here,</div><div class='del'>-	! as our usual N-at-a-shot divide step will cause overflow and havoc.</div><div class='del'>-	! The number of bits in the result here is N*ITER+SC, where SC &lt;= N.</div><div class='del'>-	! Compute ITER in an unorthodox manner: know we need to shift V into</div><div class='del'>-	! the top decade: so do not even bother to compare to R.</div><div class='del'>-	1:</div><div class='del'>-		cmp	%o5, %g1</div><div class='del'>-		bgeu	3f</div><div class='del'>-		mov	1, %g2</div><div class='del'>-		sll	%o5, 4, %o5</div><div class='del'>-		b	1b</div><div class='del'>-		add	%o4, 1, %o4</div><div class='del'>-</div><div class='del'>-	! Now compute %g2.</div><div class='del'>-	2:	addcc	%o5, %o5, %o5</div><div class='del'>-		bcc	LOC(not_too_big)</div><div class='del'>-		add	%g2, 1, %g2</div><div class='del'>-</div><div class='del'>-		! We get here if the %o1 overflowed while shifting.</div><div class='del'>-		! This means that %o3 has the high-order bit set.</div><div class='del'>-		! Restore %o5 and subtract from %o3.</div><div class='del'>-		sll	%g1, 4, %g1	! high order bit</div><div class='del'>-		srl	%o5, 1, %o5		! rest of %o5</div><div class='del'>-		add	%o5, %g1, %o5</div><div class='del'>-		b	LOC(do_single_div)</div><div class='del'>-		sub	%g2, 1, %g2</div><div class='del'>-</div><div class='del'>-	LOC(not_too_big):</div><div class='del'>-	3:	cmp	%o5, %o3</div><div class='del'>-		blu	2b</div><div class='del'>-		nop</div><div class='del'>-		be	LOC(do_single_div)</div><div class='del'>-		nop</div><div class='del'>-	/* NB: these are commented out in the V8-Sparc manual as well */</div><div class='del'>-	/* (I do not understand this) */</div><div class='del'>-	! %o5 &gt; %o3: went too far: back up 1 step</div><div class='del'>-	!	srl	%o5, 1, %o5</div><div class='del'>-	!	dec	%g2</div><div class='del'>-	! do single-bit divide steps</div><div class='del'>-	!</div><div class='del'>-	! We have to be careful here.  We know that %o3 &gt;= %o5, so we can do the</div><div class='del'>-	! first divide step without thinking.  BUT, the others are conditional,</div><div class='del'>-	! and are only done if %o3 &gt;= 0.  Because both %o3 and %o5 may have the high-</div><div class='del'>-	! order bit set in the first step, just falling into the regular</div><div class='del'>-	! division loop will mess up the first time around.</div><div class='del'>-	! So we unroll slightly...</div><div class='del'>-	LOC(do_single_div):</div><div class='del'>-		subcc	%g2, 1, %g2</div><div class='del'>-		bl	LOC(end_regular_divide)</div><div class='del'>-		nop</div><div class='del'>-		sub	%o3, %o5, %o3</div><div class='del'>-		mov	1, %o2</div><div class='del'>-		b	LOC(end_single_divloop)</div><div class='del'>-		nop</div><div class='del'>-	LOC(single_divloop):</div><div class='del'>-		sll	%o2, 1, %o2</div><div class='del'>-		bl	1f</div><div class='del'>-		srl	%o5, 1, %o5</div><div class='del'>-		! %o3 &gt;= 0</div><div class='del'>-		sub	%o3, %o5, %o3</div><div class='del'>-		b	2f</div><div class='del'>-		add	%o2, 1, %o2</div><div class='del'>-	1:	! %o3 &lt; 0</div><div class='del'>-		add	%o3, %o5, %o3</div><div class='del'>-		sub	%o2, 1, %o2</div><div class='del'>-	2:</div><div class='del'>-	LOC(end_single_divloop):</div><div class='del'>-		subcc	%g2, 1, %g2</div><div class='del'>-		bge	LOC(single_divloop)</div><div class='del'>-		tst	%o3</div><div class='del'>-		b,a	LOC(end_regular_divide)</div><div class='del'>-</div><div class='del'>-LOC(not_really_big):</div><div class='del'>-1:</div><div class='del'>-	sll	%o5, 4, %o5</div><div class='del'>-	cmp	%o5, %o3</div><div class='del'>-	bleu	1b</div><div class='del'>-	addcc	%o4, 1, %o4</div><div class='del'>-	be	LOC(got_result)</div><div class='del'>-	sub	%o4, 1, %o4</div><div class='del'>-</div><div class='del'>-	tst	%o3	! set up for initial iteration</div><div class='del'>-LOC(divloop):</div><div class='del'>-	sll	%o2, 4, %o2</div><div class='del'>-		! depth 1, accumulated bits 0</div><div class='del'>-	bl	LOC(1.16)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 2, accumulated bits 1</div><div class='del'>-	bl	LOC(2.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits 3</div><div class='del'>-	bl	LOC(3.19)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 7</div><div class='del'>-	bl	LOC(4.23)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (7*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.23):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (7*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.19):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 5</div><div class='del'>-	bl	LOC(4.21)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (5*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.21):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (5*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(2.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits 1</div><div class='del'>-	bl	LOC(3.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 3</div><div class='del'>-	bl	LOC(4.19)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (3*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.19):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (3*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits 1</div><div class='del'>-	bl	LOC(4.17)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (1*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.17):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (1*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(1.16):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 2, accumulated bits -1</div><div class='del'>-	bl	LOC(2.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits -1</div><div class='del'>-	bl	LOC(3.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -1</div><div class='del'>-	bl	LOC(4.15)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-1*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-1*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -3</div><div class='del'>-	bl	LOC(4.13)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-3*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.13):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-3*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(2.15):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 3, accumulated bits -3</div><div class='del'>-	bl	LOC(3.13)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -5</div><div class='del'>-	bl	LOC(4.11)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-5*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.11):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-5*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-LOC(3.13):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-			! depth 4, accumulated bits -7</div><div class='del'>-	bl	LOC(4.9)</div><div class='del'>-	srl	%o5,1,%o5</div><div class='del'>-	! remainder is positive</div><div class='del'>-	subcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-7*2+1), %o2</div><div class='del'>-	</div><div class='del'>-LOC(4.9):</div><div class='del'>-	! remainder is negative</div><div class='del'>-	addcc	%o3,%o5,%o3</div><div class='del'>-		b	9f</div><div class='del'>-		add	%o2, (-7*2-1), %o2</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	9:</div><div class='del'>-LOC(end_regular_divide):</div><div class='del'>-	subcc	%o4, 1, %o4</div><div class='del'>-	bge	LOC(divloop)</div><div class='del'>-	tst	%o3</div><div class='del'>-	bl,a	LOC(got_result)</div><div class='del'>-	! non-restoring fixup here (one instruction only!)</div><div class='del'>-	add	%o3, %o1, %o3</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-LOC(got_result):</div><div class='del'>-</div><div class='del'>-	retl</div><div class='del'>-	mov %o3, %o0</div><div class='del'>-</div><div class='del'>-END(.urem)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/start.h b/mdk-stage1/dietlibc/start.h<br/>deleted file mode 100644<br/>index 7f9e6be28..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/start.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/start.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,14 +0,0 @@</div><div class='del'>-.section ".bss"</div><div class='del'>-.align 8</div><div class='del'>-</div><div class='del'>-.weak errno</div><div class='del'>-errno:</div><div class='del'>-.global __errno</div><div class='del'>-__errno:</div><div class='del'>-	.long 0</div><div class='del'>-</div><div class='del'>-.weak environ</div><div class='del'>-environ:</div><div class='del'>-.global __environ</div><div class='del'>-__environ:</div><div class='del'>-	.long 0</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/_llseek.c b/mdk-stage1/dietlibc/syscalls.c/_llseek.c<br/>deleted file mode 100644<br/>index fdf49eba5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/_llseek.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/_llseek.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t*,res,uint,wh);</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/_newselect.c b/mdk-stage1/dietlibc/syscalls.c/_newselect.c<br/>deleted file mode 100644<br/>index cb42193bd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/_newselect.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/_newselect.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval);</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/access.c b/mdk-stage1/dietlibc/syscalls.c/access.c<br/>deleted file mode 100644<br/>index 80944733a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/access.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/access.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,access,const char*,pathname,int,mode)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/chdir.c b/mdk-stage1/dietlibc/syscalls.c/chdir.c<br/>deleted file mode 100644<br/>index a679f528d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/chdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/chdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,chdir,void*,path)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/chmod.c b/mdk-stage1/dietlibc/syscalls.c/chmod.c<br/>deleted file mode 100644<br/>index 80ad33b40..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/chmod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/chmod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,chmod,const char * ,path,mode_t,mode)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/chown.c b/mdk-stage1/dietlibc/syscalls.c/chown.c<br/>deleted file mode 100644<br/>index 5a9352684..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/chown.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/chown.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,chown,char*,path,uid_t,owner,gid_t,group)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/chroot.c b/mdk-stage1/dietlibc/syscalls.c/chroot.c<br/>deleted file mode 100644<br/>index ab39f7ebe..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/chroot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/chroot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,chroot,void*,path)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/clone.c b/mdk-stage1/dietlibc/syscalls.c/clone.c<br/>deleted file mode 100644<br/>index 985eee4c8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/clone.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/clone.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#warning "No CLONE support yet"</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/close.c b/mdk-stage1/dietlibc/syscalls.c/close.c<br/>deleted file mode 100644<br/>index a7d7f0076..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/close.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/close.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,close,int,fd)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/dup.c b/mdk-stage1/dietlibc/syscalls.c/dup.c<br/>deleted file mode 100644<br/>index 9c28f0bd6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/dup.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/dup.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,dup,int,fd)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/dup2.c b/mdk-stage1/dietlibc/syscalls.c/dup2.c<br/>deleted file mode 100644<br/>index 399314aa8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/dup2.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/dup2.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,dup2,int,one,int,two)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/execve.c b/mdk-stage1/dietlibc/syscalls.c/execve.c<br/>deleted file mode 100644<br/>index c2bac0117..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/execve.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/execve.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,execve,const char *,fn,void *,argv,void *,envp)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/exit.c b/mdk-stage1/dietlibc/syscalls.c/exit.c<br/>deleted file mode 100644<br/>index 87087c939..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/exit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/exit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,exit,int,exitcode)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fchdir.c b/mdk-stage1/dietlibc/syscalls.c/fchdir.c<br/>deleted file mode 100644<br/>index b3a41dc7a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fchdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fchdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,fchdir,int,fd)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fchmod.c b/mdk-stage1/dietlibc/syscalls.c/fchmod.c<br/>deleted file mode 100644<br/>index 09e52b6c7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fchmod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fchmod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,fchmod,int,filedes,mode_t,mode)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fchown.c b/mdk-stage1/dietlibc/syscalls.c/fchown.c<br/>deleted file mode 100644<br/>index 58923a137..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fchown.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fchown.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,fchown,int,fd,uid_t,owner,gid_t,group)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fcntl.c b/mdk-stage1/dietlibc/syscalls.c/fcntl.c<br/>deleted file mode 100644<br/>index b21be9531..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fcntl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fcntl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,fcntl,int,fd,int,cmd,long,arg)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/flock.c b/mdk-stage1/dietlibc/syscalls.c/flock.c<br/>deleted file mode 100644<br/>index 6fcb336ef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/flock.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/flock.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,flock,int,fd,int,op)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fork.c b/mdk-stage1/dietlibc/syscalls.c/fork.c<br/>deleted file mode 100644<br/>index 1d4b892b6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fork.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fork.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifndef __sparc__</div><div class='del'>-</div><div class='del'>-_syscall0(int,fork)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/fsync.c b/mdk-stage1/dietlibc/syscalls.c/fsync.c<br/>deleted file mode 100644<br/>index db6198b8a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/fsync.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/fsync.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,fsync,int,fd)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/ftruncate.c b/mdk-stage1/dietlibc/syscalls.c/ftruncate.c<br/>deleted file mode 100644<br/>index 5f002a899..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/ftruncate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/ftruncate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,ftruncate,int,fd,off_t,length)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getcwd.c b/mdk-stage1/dietlibc/syscalls.c/getcwd.c<br/>deleted file mode 100644<br/>index 9e5e4a3e2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getcwd.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getcwd.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-/* this syscall exists since Linux 2.1.92 */</div><div class='del'>-</div><div class='del'>-_syscall2(int,getcwd,char*,buf,unsigned long,size)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getdents.c b/mdk-stage1/dietlibc/syscalls.c/getdents.c<br/>deleted file mode 100644<br/>index be941b21e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getdents.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getdents.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int, getdents, unsigned int, fd, void *, dirp, unsigned int, count);</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getegid.c b/mdk-stage1/dietlibc/syscalls.c/getegid.c<br/>deleted file mode 100644<br/>index 3213d640c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getegid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getegid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(gid_t,getegid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/geteuid.c b/mdk-stage1/dietlibc/syscalls.c/geteuid.c<br/>deleted file mode 100644<br/>index 5b31a3cca..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/geteuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/geteuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(uid_t,geteuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getgid.c b/mdk-stage1/dietlibc/syscalls.c/getgid.c<br/>deleted file mode 100644<br/>index 2f7d96286..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(gid_t,getgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getgroups.c b/mdk-stage1/dietlibc/syscalls.c/getgroups.c<br/>deleted file mode 100644<br/>index 3e4d6797a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getgroups.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getgroups.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,getgroups,int,size,int*,list)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getpgid.c b/mdk-stage1/dietlibc/syscalls.c/getpgid.c<br/>deleted file mode 100644<br/>index 0b4ff528b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getpgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getpgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(pid_t,getpgid,pid_t,pid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getpid.c b/mdk-stage1/dietlibc/syscalls.c/getpid.c<br/>deleted file mode 100644<br/>index d60a8db9a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getpid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getpid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(int,getpid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getppid.c b/mdk-stage1/dietlibc/syscalls.c/getppid.c<br/>deleted file mode 100644<br/>index ee87a8eae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getppid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getppid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(int,getppid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getpriority.c b/mdk-stage1/dietlibc/syscalls.c/getpriority.c<br/>deleted file mode 100644<br/>index 6f94bcf42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getpriority.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getpriority.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,getpriority,int,which,int,who)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getresgid.c b/mdk-stage1/dietlibc/syscalls.c/getresgid.c<br/>deleted file mode 100644<br/>index 264ec7dce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getresgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getresgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_getresgid</div><div class='del'>-</div><div class='del'>-_syscall3(int,getresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getresuid.c b/mdk-stage1/dietlibc/syscalls.c/getresuid.c<br/>deleted file mode 100644<br/>index 74e2daec2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getresuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getresuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __getresuid</div><div class='del'>-</div><div class='del'>-_syscall3(int,getresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getrlimit.c b/mdk-stage1/dietlibc/syscalls.c/getrlimit.c<br/>deleted file mode 100644<br/>index 635b2baf4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getrlimit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getrlimit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,getrlimit,int,resource,void*,rlim)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getrusage.c b/mdk-stage1/dietlibc/syscalls.c/getrusage.c<br/>deleted file mode 100644<br/>index 815d3e617..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getrusage.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getrusage.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,getrusage,int,who,void*,rusage)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getsid.c b/mdk-stage1/dietlibc/syscalls.c/getsid.c<br/>deleted file mode 100644<br/>index 69974c36c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getsid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getsid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(pid_t,getsid,pid_t,pid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c b/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c<br/>deleted file mode 100644<br/>index 5f4931a0c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/gettimeofday.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,gettimeofday,struct timeval *,tv,void *,tz)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/getuid.c b/mdk-stage1/dietlibc/syscalls.c/getuid.c<br/>deleted file mode 100644<br/>index bf38447a6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/getuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/getuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(uid_t,getuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/ioctl.c b/mdk-stage1/dietlibc/syscalls.c/ioctl.c<br/>deleted file mode 100644<br/>index 1612109d3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/ioctl.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/ioctl.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,ioctl,int,fd,int,request,void *,argp)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/kill.c b/mdk-stage1/dietlibc/syscalls.c/kill.c<br/>deleted file mode 100644<br/>index e56b0ac1b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/kill.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/kill.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,kill,pid_t,pid,int,sig)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/lchown.c b/mdk-stage1/dietlibc/syscalls.c/lchown.c<br/>deleted file mode 100644<br/>index 976d2ee1f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/lchown.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/lchown.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,lchown,char*,path,uid_t,owner,gid_t,group)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/link.c b/mdk-stage1/dietlibc/syscalls.c/link.c<br/>deleted file mode 100644<br/>index ab9b427d9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/link.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/link.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,link,const char *,a,const char *,b)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/lseek.c b/mdk-stage1/dietlibc/syscalls.c/lseek.c<br/>deleted file mode 100644<br/>index 9925a2185..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/lseek.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/lseek.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(unsigned long,lseek,int,fd,unsigned long,offset,int,whence)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/mkdir.c b/mdk-stage1/dietlibc/syscalls.c/mkdir.c<br/>deleted file mode 100644<br/>index aac682c99..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/mkdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/mkdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,mkdir,void*,path,mode_t,mode)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/mknod.c b/mdk-stage1/dietlibc/syscalls.c/mknod.c<br/>deleted file mode 100644<br/>index 00e836b73..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/mknod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/mknod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,mknod,const char*,pathname,mode_t,mode,dev_t,dev)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/mount.c b/mdk-stage1/dietlibc/syscalls.c/mount.c<br/>deleted file mode 100644<br/>index 2d71ee812..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/mount.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/mount.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall5(int,mount,const char *,spec,const char *,dir,const char *,type,unsigned long,rwflag,const void *,data);</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/mprotect.c b/mdk-stage1/dietlibc/syscalls.c/mprotect.c<br/>deleted file mode 100644<br/>index 634a12089..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/mprotect.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/mprotect.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,mprotect,const void *,addr, size_t, len, int, prot)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/mremap.c b/mdk-stage1/dietlibc/syscalls.c/mremap.c<br/>deleted file mode 100644<br/>index 37d066bac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/mremap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/mremap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall4(int,mremap,void*,old_address,size_t,old_size,size_t,new_size,unsigned long,flags)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/munmap.c b/mdk-stage1/dietlibc/syscalls.c/munmap.c<br/>deleted file mode 100644<br/>index 40bc98270..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/munmap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/munmap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,munmap,void*,start,size_t,len)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/nanosleep.c b/mdk-stage1/dietlibc/syscalls.c/nanosleep.c<br/>deleted file mode 100644<br/>index 71aca1f09..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/nanosleep.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/nanosleep.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,nanosleep,struct timeval *,in,struct timeval *,out)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/open.c b/mdk-stage1/dietlibc/syscalls.c/open.c<br/>deleted file mode 100644<br/>index 8b3ccfcc3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/open.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/open.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,open,const char *,fn,int,flags,mode_t,mode)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/pipe.c b/mdk-stage1/dietlibc/syscalls.c/pipe.c<br/>deleted file mode 100644<br/>index 42197c881..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/pipe.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/pipe.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,pipe,int *,filedes)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/poll.c b/mdk-stage1/dietlibc/syscalls.c/poll.c<br/>deleted file mode 100644<br/>index 10d0d1f78..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/poll.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/poll.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,poll,void *,ufds,int,nfds,int,timeout)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/read.c b/mdk-stage1/dietlibc/syscalls.c/read.c<br/>deleted file mode 100644<br/>index f5532054e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/read.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/read.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,read,int,fd,const char *,buf,unsigned long,count)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/readlink.c b/mdk-stage1/dietlibc/syscalls.c/readlink.c<br/>deleted file mode 100644<br/>index 482f8fe27..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/readlink.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/readlink.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-</div><div class='del'>-_syscall3(int,readlink,char*,path,char*,buf,size_t,bufsiz)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/reboot.c b/mdk-stage1/dietlibc/syscalls.c/reboot.c<br/>deleted file mode 100644<br/>index 0ad474894..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/reboot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/reboot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,reboot,int,magic,int,magic_too,int,flag)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/rename.c b/mdk-stage1/dietlibc/syscalls.c/rename.c<br/>deleted file mode 100644<br/>index f86d50728..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/rename.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/rename.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,rename,char*,oldpath,char*,newpath)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/rmdir.c b/mdk-stage1/dietlibc/syscalls.c/rmdir.c<br/>deleted file mode 100644<br/>index 303885264..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/rmdir.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/rmdir.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,rmdir,void*,path)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setdomainname.c b/mdk-stage1/dietlibc/syscalls.c/setdomainname.c<br/>deleted file mode 100644<br/>index 83d3aa8b8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setdomainname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setdomainname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setdomainname,const char *,name,int,len)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setgid.c b/mdk-stage1/dietlibc/syscalls.c/setgid.c<br/>deleted file mode 100644<br/>index 1f7263aeb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,setgid,int,gid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setgroups.c b/mdk-stage1/dietlibc/syscalls.c/setgroups.c<br/>deleted file mode 100644<br/>index fed3b85c1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setgroups.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setgroups.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setgroups,int,size,const int*,list)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sethostname.c b/mdk-stage1/dietlibc/syscalls.c/sethostname.c<br/>deleted file mode 100644<br/>index e4b736f87..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sethostname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sethostname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,sethostname,const char *,name,int,len)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setitimer.c b/mdk-stage1/dietlibc/syscalls.c/setitimer.c<br/>deleted file mode 100644<br/>index 28935cab7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setitimer.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setitimer.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,setitimer,int,which,void *,value,void *,ovalue)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setpgid.c b/mdk-stage1/dietlibc/syscalls.c/setpgid.c<br/>deleted file mode 100644<br/>index 66fbf82dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setpgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setpgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setpgid,int,name,int,len)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setpriority.c b/mdk-stage1/dietlibc/syscalls.c/setpriority.c<br/>deleted file mode 100644<br/>index bc04227d2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setpriority.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setpriority.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,setpriority,int,which,int,who,int,prio)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setregid.c b/mdk-stage1/dietlibc/syscalls.c/setregid.c<br/>deleted file mode 100644<br/>index c6911aca8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setregid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setregid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setregid,gid_t,rgid,gid_t,egid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setresgid.c b/mdk-stage1/dietlibc/syscalls.c/setresgid.c<br/>deleted file mode 100644<br/>index 817fd2942..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setresgid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setresgid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_setresgid</div><div class='del'>-</div><div class='del'>-_syscall3(int,setresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setresuid.c b/mdk-stage1/dietlibc/syscalls.c/setresuid.c<br/>deleted file mode 100644<br/>index 7073d8ac2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setresuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setresuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_setresuid</div><div class='del'>-</div><div class='del'>-_syscall3(int,setresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setreuid.c b/mdk-stage1/dietlibc/syscalls.c/setreuid.c<br/>deleted file mode 100644<br/>index c0c23a12d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setreuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setreuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setreuid,uid_t,ruid,uid_t,euid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setrlimit.c b/mdk-stage1/dietlibc/syscalls.c/setrlimit.c<br/>deleted file mode 100644<br/>index 213234282..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setrlimit.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setrlimit.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,setrlimit,int,resource,void*,rlim)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setsid.c b/mdk-stage1/dietlibc/syscalls.c/setsid.c<br/>deleted file mode 100644<br/>index 4b35a1316..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setsid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setsid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(pid_t,setsid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/setuid.c b/mdk-stage1/dietlibc/syscalls.c/setuid.c<br/>deleted file mode 100644<br/>index 620876c9f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/setuid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/setuid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,setuid,int,uid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sigaction.c b/mdk-stage1/dietlibc/syscalls.c/sigaction.c<br/>deleted file mode 100644<br/>index cfa5c683f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sigaction.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sigaction.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,sigaction,int,signum,void*,act,void*,oldact)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/signal.c b/mdk-stage1/dietlibc/syscalls.c/signal.c<br/>deleted file mode 100644<br/>index 1a913be45..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/signal.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/signal.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,signal,int,num,void *,len)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sigpending.c b/mdk-stage1/dietlibc/syscalls.c/sigpending.c<br/>deleted file mode 100644<br/>index 08fb23991..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sigpending.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sigpending.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,sigpending,void*,set)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c b/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c<br/>deleted file mode 100644<br/>index e9dcc2d67..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sigprocmask.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,sigprocmask,int,how,void*,set,void*,oldset)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c b/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c<br/>deleted file mode 100644<br/>index 0fe90e623..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sigsuspend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,sigsuspend,void*,mask)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/socketcall.c b/mdk-stage1/dietlibc/syscalls.c/socketcall.c<br/>deleted file mode 100644<br/>index eee1ae86d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/socketcall.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/socketcall.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,socketcall,int,code,unsigned long *, args)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/swapoff.c b/mdk-stage1/dietlibc/syscalls.c/swapoff.c<br/>deleted file mode 100644<br/>index e1daa89a9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/swapoff.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/swapoff.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,swapoff,const char *,fn)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/swapon.c b/mdk-stage1/dietlibc/syscalls.c/swapon.c<br/>deleted file mode 100644<br/>index 543e41e79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/swapon.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/swapon.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,swapon,const char*,path,int,swapflags)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/symlink.c b/mdk-stage1/dietlibc/syscalls.c/symlink.c<br/>deleted file mode 100644<br/>index b3f4d0b1c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/symlink.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/symlink.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,symlink,const char *,a,const char *,b)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/sync.c b/mdk-stage1/dietlibc/syscalls.c/sync.c<br/>deleted file mode 100644<br/>index cca17461f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/sync.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/sync.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(int,sync)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/syslog.c b/mdk-stage1/dietlibc/syscalls.c/syslog.c<br/>deleted file mode 100644<br/>index aace870ea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/syslog.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/syslog.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,syslog,int, type, char *, buf, int, len);</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/time.c b/mdk-stage1/dietlibc/syscalls.c/time.c<br/>deleted file mode 100644<br/>index dc15b28f9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/time.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/time.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(time_t,time,time_t*,path)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/truncate.c b/mdk-stage1/dietlibc/syscalls.c/truncate.c<br/>deleted file mode 100644<br/>index 721bd7134..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/truncate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/truncate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,truncate,const char*,path,off_t,length)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/umask.c b/mdk-stage1/dietlibc/syscalls.c/umask.c<br/>deleted file mode 100644<br/>index 506038243..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/umask.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/umask.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,umask,mode_t,mask)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/umount.c b/mdk-stage1/dietlibc/syscalls.c/umount.c<br/>deleted file mode 100644<br/>index 4d3ef7637..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/umount.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/umount.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,umount,const char *,dir)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/uname.c b/mdk-stage1/dietlibc/syscalls.c/uname.c<br/>deleted file mode 100644<br/>index 68f135007..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/uname.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/uname.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,uname,void *,utsname)</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/unlink.c b/mdk-stage1/dietlibc/syscalls.c/unlink.c<br/>deleted file mode 100644<br/>index 860ccebbf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/unlink.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/unlink.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall1(int,unlink,const char *,fn)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/utime.c b/mdk-stage1/dietlibc/syscalls.c/utime.c<br/>deleted file mode 100644<br/>index 185bdf9e8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/utime.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/utime.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall2(int,utime,void*,filename,void*,buf)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/vhangup.c b/mdk-stage1/dietlibc/syscalls.c/vhangup.c<br/>deleted file mode 100644<br/>index bb0669765..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/vhangup.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/vhangup.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall0(int,vhangup)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/wait4.c b/mdk-stage1/dietlibc/syscalls.c/wait4.c<br/>deleted file mode 100644<br/>index 4ae7eabcd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/wait4.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/wait4.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall4(int,wait4,pid_t,pid,int *,status,int,opts,void *,rusage)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/waitpid.c b/mdk-stage1/dietlibc/syscalls.c/waitpid.c<br/>deleted file mode 100644<br/>index b7167f9ce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/waitpid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/waitpid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,waitpid,int,pid,int *,status,int,options)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.c/write.c b/mdk-stage1/dietlibc/syscalls.c/write.c<br/>deleted file mode 100644<br/>index d1f7347d5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.c/write.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.c/write.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-_syscall3(int,write,int,fd,const char *,buf,unsigned long,count)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.h b/mdk-stage1/dietlibc/syscalls.h<br/>deleted file mode 100644<br/>index eba7a3c00..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,142 +0,0 @@</div><div class='del'>-#ifdef __ASSEMBLER__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __i386__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	movb $__NR_##name,%al; \</div><div class='del'>-	jmp __unified_syscall</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	movb $__NR_##name,%al; \</div><div class='del'>-	jmp __unified_syscall</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	b __unified_syscall; \</div><div class='del'>-	mov __NR_##name, %g1</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	b __unified_syscall; \</div><div class='del'>-	mov __NR_##name, %g1</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __powerpc__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	li	0,__NR_##name; \</div><div class='del'>-	b __unified_syscall</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	li	0,__NR_##name; \</div><div class='del'>-	b __unified_syscall</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __mips__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym; \</div><div class='del'>-.ent sym; \</div><div class='del'>-sym: \</div><div class='del'>-	li	$2,__NR_##name; \</div><div class='del'>-	la	$25,__unified_syscall; \</div><div class='del'>-	jr	$25; \</div><div class='del'>-.end sym</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.global sym; \</div><div class='del'>-.ent sym; \</div><div class='del'>-sym: \</div><div class='del'>-	li	$2,__NR_##name; \</div><div class='del'>-	la	$25,__unified_syscall; \</div><div class='del'>-	jr	$25; \</div><div class='del'>-.end sym</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __arm__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	swi	__NR_##name; \</div><div class='del'>-	b	__unified_syscall</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text; \</div><div class='del'>-.global sym; \</div><div class='del'>-sym: \</div><div class='del'>-	swi	__NR_##name; \</div><div class='del'>-	b	__unified_syscall</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-</div><div class='del'>-#define syscall_weak(name,wsym,sym) \</div><div class='del'>-.text ; \</div><div class='del'>-.align 2 ; \</div><div class='del'>-.weak wsym; \</div><div class='del'>-.type wsym,@function ; \</div><div class='del'>-wsym: ; \</div><div class='del'>-.global sym ; \</div><div class='del'>-.type sym,@function ; \</div><div class='del'>-sym: ; \</div><div class='del'>-        lda     $0, __NR_##name($31) ; \</div><div class='del'>-        br      __unified_syscall</div><div class='del'>-</div><div class='del'>-#define syscall(name,sym) \</div><div class='del'>-.text ; \</div><div class='del'>-.align 2 ; \</div><div class='del'>-.global sym ; \</div><div class='del'>-.type sym,@function ; \</div><div class='del'>-sym: ; \</div><div class='del'>-        lda     $0, __NR_##name($31) ; \</div><div class='del'>-        br      __unified_syscall</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/__getpagesize.S b/mdk-stage1/dietlibc/syscalls.s/__getpagesize.S<br/>deleted file mode 100644<br/>index c9fd97898..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/__getpagesize.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/__getpagesize.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_getpagesize</div><div class='del'>-syscall(getpagesize,getpagesize)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/__pread.S b/mdk-stage1/dietlibc/syscalls.s/__pread.S<br/>deleted file mode 100644<br/>index ad47c7873..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/__pread.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/__pread.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(pread,__pread,__libc__pread)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/__reboot.S b/mdk-stage1/dietlibc/syscalls.s/__reboot.S<br/>deleted file mode 100644<br/>index 0de4f25b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/__reboot.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/__reboot.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(reboot,__reboot)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/_llseek.S b/mdk-stage1/dietlibc/syscalls.s/_llseek.S<br/>deleted file mode 100644<br/>index 3e240d822..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/_llseek.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/_llseek.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(_llseek,_llseek)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/access.S b/mdk-stage1/dietlibc/syscalls.s/access.S<br/>deleted file mode 100644<br/>index d1edafd8c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/access.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/access.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(access,access)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/brk.S b/mdk-stage1/dietlibc/syscalls.s/brk.S<br/>deleted file mode 100644<br/>index 6e21810bd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/brk.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/brk.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(brk,__diet_brk)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/chdir.S b/mdk-stage1/dietlibc/syscalls.s/chdir.S<br/>deleted file mode 100644<br/>index 204f3dd6c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/chdir.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/chdir.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(chdir,chdir)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/chmod.S b/mdk-stage1/dietlibc/syscalls.s/chmod.S<br/>deleted file mode 100644<br/>index c1b85f5a4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/chmod.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/chmod.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(chmod,chmod)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/chown.S b/mdk-stage1/dietlibc/syscalls.s/chown.S<br/>deleted file mode 100644<br/>index daac3bf13..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/chown.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/chown.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(chown,chown)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/chroot.S b/mdk-stage1/dietlibc/syscalls.s/chroot.S<br/>deleted file mode 100644<br/>index 65de1e473..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/chroot.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/chroot.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(chroot,chroot)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/close.S b/mdk-stage1/dietlibc/syscalls.s/close.S<br/>deleted file mode 100644<br/>index 361ca5272..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/close.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/close.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(close,close,__libc_close)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/dup.S b/mdk-stage1/dietlibc/syscalls.s/dup.S<br/>deleted file mode 100644<br/>index b2977fd43..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/dup.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/dup.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(dup,dup)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/dup2.S b/mdk-stage1/dietlibc/syscalls.s/dup2.S<br/>deleted file mode 100644<br/>index 774bfbfe7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/dup2.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/dup2.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(dup2,dup2)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/execve.S b/mdk-stage1/dietlibc/syscalls.s/execve.S<br/>deleted file mode 100644<br/>index ff952ae7d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/execve.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/execve.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(execve,execve)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/exit.S b/mdk-stage1/dietlibc/syscalls.s/exit.S<br/>deleted file mode 100644<br/>index 11c989529..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/exit.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/exit.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(exit,exit,_exit)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fchdir.S b/mdk-stage1/dietlibc/syscalls.s/fchdir.S<br/>deleted file mode 100644<br/>index 0aeaf610b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fchdir.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fchdir.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(fchdir,fchdir)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fchmod.S b/mdk-stage1/dietlibc/syscalls.s/fchmod.S<br/>deleted file mode 100644<br/>index 30bc2e210..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fchmod.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fchmod.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(fchmod,fchmod)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fchown.S b/mdk-stage1/dietlibc/syscalls.s/fchown.S<br/>deleted file mode 100644<br/>index bc2a296ea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fchown.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fchown.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(fchown,fchown)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fcntl.S b/mdk-stage1/dietlibc/syscalls.s/fcntl.S<br/>deleted file mode 100644<br/>index 2285929a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fcntl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fcntl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(fcntl,fcntl,__libc_fcntl)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/flock.S b/mdk-stage1/dietlibc/syscalls.s/flock.S<br/>deleted file mode 100644<br/>index 7b4daeff7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/flock.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/flock.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(flock,flock)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fork.S b/mdk-stage1/dietlibc/syscalls.s/fork.S<br/>deleted file mode 100644<br/>index b40c3f708..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fork.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fork.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(fork,fork,__libc_fork)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fstat.S b/mdk-stage1/dietlibc/syscalls.s/fstat.S<br/>deleted file mode 100644<br/>index 9dd465cda..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fstat.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fstat.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(fstat,fstat)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fstat64.S b/mdk-stage1/dietlibc/syscalls.s/fstat64.S<br/>deleted file mode 100644<br/>index 0c7a41609..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fstat64.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fstat64.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-syscall(fstat64,__dietlibc_fstat64)</div><div class='del'>-#else</div><div class='del'>-syscall(fstat64,fstat64)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fstatfs.S b/mdk-stage1/dietlibc/syscalls.s/fstatfs.S<br/>deleted file mode 100644<br/>index a23c8770c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fstatfs.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fstatfs.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(fstatfs,fstatfs)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/fsync.S b/mdk-stage1/dietlibc/syscalls.s/fsync.S<br/>deleted file mode 100644<br/>index 66af59ef9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/fsync.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/fsync.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(fsync,fsync,__libc_fsync)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/ftruncate.S b/mdk-stage1/dietlibc/syscalls.s/ftruncate.S<br/>deleted file mode 100644<br/>index dde57a615..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/ftruncate.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/ftruncate.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(ftruncate,ftruncate)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getcwd.S b/mdk-stage1/dietlibc/syscalls.s/getcwd.S<br/>deleted file mode 100644<br/>index e13262f20..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getcwd.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getcwd.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getcwd,__syscall_getcwd)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getdents.S b/mdk-stage1/dietlibc/syscalls.s/getdents.S<br/>deleted file mode 100644<br/>index f476e939d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getdents.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getdents.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getdents,getdents)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getdents64.S b/mdk-stage1/dietlibc/syscalls.s/getdents64.S<br/>deleted file mode 100644<br/>index 16859addf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getdents64.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getdents64.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_getdents64</div><div class='del'>-syscall(getdents64,getdents64)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getegid.S b/mdk-stage1/dietlibc/syscalls.s/getegid.S<br/>deleted file mode 100644<br/>index 64843ee35..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getegid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getegid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getegid,getegid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/geteuid.S b/mdk-stage1/dietlibc/syscalls.s/geteuid.S<br/>deleted file mode 100644<br/>index 55dc00981..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/geteuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/geteuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(geteuid,geteuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getgid.S b/mdk-stage1/dietlibc/syscalls.s/getgid.S<br/>deleted file mode 100644<br/>index 39f092685..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getgid,getgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getgroups.S b/mdk-stage1/dietlibc/syscalls.s/getgroups.S<br/>deleted file mode 100644<br/>index b4c57689c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getgroups.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getgroups.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getgroups,getgroups)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getitimer.S b/mdk-stage1/dietlibc/syscalls.s/getitimer.S<br/>deleted file mode 100644<br/>index 9a2084080..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getitimer.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getitimer.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getitimer,getitimer)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getpgid.S b/mdk-stage1/dietlibc/syscalls.s/getpgid.S<br/>deleted file mode 100644<br/>index e568f060f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getpgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getpgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getpgid,getpgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getpid.S b/mdk-stage1/dietlibc/syscalls.s/getpid.S<br/>deleted file mode 100644<br/>index 093884785..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getpid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getpid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getpid,getpid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getppid.S b/mdk-stage1/dietlibc/syscalls.s/getppid.S<br/>deleted file mode 100644<br/>index b05e64ae3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getppid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getppid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getppid,getppid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getpriority.S b/mdk-stage1/dietlibc/syscalls.s/getpriority.S<br/>deleted file mode 100644<br/>index 848b27ed7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getpriority.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getpriority.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getpriority,getpriority)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getresgid.S b/mdk-stage1/dietlibc/syscalls.s/getresgid.S<br/>deleted file mode 100644<br/>index a1d873c15..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getresgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getresgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_getresgid</div><div class='del'>-</div><div class='del'>-syscall(getresgid,getresgid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getresuid.S b/mdk-stage1/dietlibc/syscalls.s/getresuid.S<br/>deleted file mode 100644<br/>index 62f6d764f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getresuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getresuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __getresuid</div><div class='del'>-</div><div class='del'>-syscall(getresuid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getrlimit.S b/mdk-stage1/dietlibc/syscalls.s/getrlimit.S<br/>deleted file mode 100644<br/>index 1c63c0196..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getrlimit.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getrlimit.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getrlimit,getrlimit)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getrusage.S b/mdk-stage1/dietlibc/syscalls.s/getrusage.S<br/>deleted file mode 100644<br/>index 2972c4938..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getrusage.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getrusage.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getrusage,getrusage)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getsid.S b/mdk-stage1/dietlibc/syscalls.s/getsid.S<br/>deleted file mode 100644<br/>index cf5cce9d5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getsid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getsid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getsid,getsid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/gettimeofday.S b/mdk-stage1/dietlibc/syscalls.s/gettimeofday.S<br/>deleted file mode 100644<br/>index f364b787a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/gettimeofday.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/gettimeofday.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(gettimeofday,gettimeofday)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/getuid.S b/mdk-stage1/dietlibc/syscalls.s/getuid.S<br/>deleted file mode 100644<br/>index c53c25a7a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/getuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/getuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(getuid,getuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/ioctl.S b/mdk-stage1/dietlibc/syscalls.s/ioctl.S<br/>deleted file mode 100644<br/>index 463d319dc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/ioctl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/ioctl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(ioctl,ioctl)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/ioperm.S b/mdk-stage1/dietlibc/syscalls.s/ioperm.S<br/>deleted file mode 100644<br/>index 0acfde07a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/ioperm.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/ioperm.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(ioperm,ioperm)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/iopl.S b/mdk-stage1/dietlibc/syscalls.s/iopl.S<br/>deleted file mode 100644<br/>index 06a6c53fb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/iopl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/iopl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_iopl</div><div class='del'>-syscall(iopl,iopl)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/ipc.S b/mdk-stage1/dietlibc/syscalls.s/ipc.S<br/>deleted file mode 100644<br/>index 40479400d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/ipc.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/ipc.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(ipc,__ipc)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/kill.S b/mdk-stage1/dietlibc/syscalls.s/kill.S<br/>deleted file mode 100644<br/>index eb466dd33..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/kill.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/kill.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(kill,kill)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/lchown.S b/mdk-stage1/dietlibc/syscalls.s/lchown.S<br/>deleted file mode 100644<br/>index 19dfefaef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/lchown.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/lchown.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(lchown,lchown)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/link.S b/mdk-stage1/dietlibc/syscalls.s/link.S<br/>deleted file mode 100644<br/>index 8015d11c8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/link.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/link.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(link,link)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/llseek.S b/mdk-stage1/dietlibc/syscalls.s/llseek.S<br/>deleted file mode 100644<br/>index 0318b492e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/llseek.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/llseek.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR__llseek</div><div class='del'>-syscall(_llseek,llseek)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/lseek.S b/mdk-stage1/dietlibc/syscalls.s/lseek.S<br/>deleted file mode 100644<br/>index 93707a22a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/lseek.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/lseek.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(lseek,lseek,__libc_lseek)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/lstat.S b/mdk-stage1/dietlibc/syscalls.s/lstat.S<br/>deleted file mode 100644<br/>index 5720161c0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/lstat.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/lstat.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(lstat,lstat)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/lstat64.S b/mdk-stage1/dietlibc/syscalls.s/lstat64.S<br/>deleted file mode 100644<br/>index 33fd5ab94..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/lstat64.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/lstat64.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-syscall(lstat64,__dietlibc_lstat64)</div><div class='del'>-#else</div><div class='del'>-syscall(lstat64,lstat64)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mkdir.S b/mdk-stage1/dietlibc/syscalls.s/mkdir.S<br/>deleted file mode 100644<br/>index d6214ee46..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mkdir.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mkdir.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mkdir,mkdir)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mknod.S b/mdk-stage1/dietlibc/syscalls.s/mknod.S<br/>deleted file mode 100644<br/>index c1b2af12d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mknod.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mknod.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mknod,mknod)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mlockall.S b/mdk-stage1/dietlibc/syscalls.s/mlockall.S<br/>deleted file mode 100644<br/>index 6ad0eef9d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mlockall.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mlockall.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mlockall,mlockall)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mount.S b/mdk-stage1/dietlibc/syscalls.s/mount.S<br/>deleted file mode 100644<br/>index 2fd845561..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mount.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mount.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mount,mount)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mprotect.S b/mdk-stage1/dietlibc/syscalls.s/mprotect.S<br/>deleted file mode 100644<br/>index 73e9a8e17..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mprotect.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mprotect.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mprotect,mprotect)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/mremap.S b/mdk-stage1/dietlibc/syscalls.s/mremap.S<br/>deleted file mode 100644<br/>index 259ccec99..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/mremap.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/mremap.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(mremap,mremap)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/munlockall.S b/mdk-stage1/dietlibc/syscalls.s/munlockall.S<br/>deleted file mode 100644<br/>index 776811dea..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/munlockall.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/munlockall.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(munlockall,munlockall)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/munmap.S b/mdk-stage1/dietlibc/syscalls.s/munmap.S<br/>deleted file mode 100644<br/>index b43a7b22d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/munmap.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/munmap.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(munmap,munmap)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/nanosleep.S b/mdk-stage1/dietlibc/syscalls.s/nanosleep.S<br/>deleted file mode 100644<br/>index 279a52604..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/nanosleep.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/nanosleep.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(nanosleep,nanosleep,__libc_nanosleep)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/nice.S b/mdk-stage1/dietlibc/syscalls.s/nice.S<br/>deleted file mode 100644<br/>index 7d3f740b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/nice.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/nice.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(nice,nice)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/open.S b/mdk-stage1/dietlibc/syscalls.s/open.S<br/>deleted file mode 100644<br/>index 280efd0d9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/open.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/open.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(open,open,__libc_open)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/pause.S b/mdk-stage1/dietlibc/syscalls.s/pause.S<br/>deleted file mode 100644<br/>index cdf42cabd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/pause.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/pause.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(pause,pause,__libc_pause)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/personality.S b/mdk-stage1/dietlibc/syscalls.s/personality.S<br/>deleted file mode 100644<br/>index 34b467084..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/personality.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/personality.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_personality</div><div class='del'>-syscall(personality,personality)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/pipe.S b/mdk-stage1/dietlibc/syscalls.s/pipe.S<br/>deleted file mode 100644<br/>index 03994d055..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/pipe.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/pipe.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(pipe,pipe)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/poll.S b/mdk-stage1/dietlibc/syscalls.s/poll.S<br/>deleted file mode 100644<br/>index 359f55ddd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/poll.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/poll.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(poll,poll)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/ptrace.s b/mdk-stage1/dietlibc/syscalls.s/ptrace.s<br/>deleted file mode 100644<br/>index 392e6a4ed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/ptrace.s?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/ptrace.s</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(ptrace,ptrace)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/pwrite.S b/mdk-stage1/dietlibc/syscalls.s/pwrite.S<br/>deleted file mode 100644<br/>index f52ead7b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/pwrite.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/pwrite.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(pwrite,__pwrite)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/query_module.S b/mdk-stage1/dietlibc/syscalls.s/query_module.S<br/>deleted file mode 100644<br/>index cb2f1d852..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/query_module.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/query_module.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_query_module</div><div class='del'>-syscall(query_module,query_module)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/read.S b/mdk-stage1/dietlibc/syscalls.s/read.S<br/>deleted file mode 100644<br/>index 33fdb7531..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/read.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/read.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(read,read,__libc_read)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/readlink.S b/mdk-stage1/dietlibc/syscalls.s/readlink.S<br/>deleted file mode 100644<br/>index 850e77c4e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/readlink.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/readlink.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(readlink,readlink)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/readv.S b/mdk-stage1/dietlibc/syscalls.s/readv.S<br/>deleted file mode 100644<br/>index 757c26bfb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/readv.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/readv.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(readv,readv)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/rename.S b/mdk-stage1/dietlibc/syscalls.s/rename.S<br/>deleted file mode 100644<br/>index f92f1dc5d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/rename.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/rename.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(rename,rename)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/rmdir.S b/mdk-stage1/dietlibc/syscalls.s/rmdir.S<br/>deleted file mode 100644<br/>index 341216e8c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/rmdir.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/rmdir.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(rmdir,rmdir)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S b/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S<br/>deleted file mode 100644<br/>index caf403672..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_get_priority_max.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_get_priority_max,sched_get_priority_max)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S b/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S<br/>deleted file mode 100644<br/>index a0c3337dc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_get_priority_min.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_get_priority_min,sched_get_priority_min)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_getparam.S b/mdk-stage1/dietlibc/syscalls.s/sched_getparam.S<br/>deleted file mode 100644<br/>index 7190a40ae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_getparam.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_getparam.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_getparam,sched_getparam)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S b/mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S<br/>deleted file mode 100644<br/>index 08709b65e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_getscheduler.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_getscheduler,sched_getscheduler)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S b/mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S<br/>deleted file mode 100644<br/>index 150b9a98d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_rr_get_interval.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_rr_get_interval,sched_rr_get_interval)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_setparam.S b/mdk-stage1/dietlibc/syscalls.s/sched_setparam.S<br/>deleted file mode 100644<br/>index 3a6dd1dcc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_setparam.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_setparam.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_setparam,sched_setparam)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S b/mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S<br/>deleted file mode 100644<br/>index 27869d6ce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_setscheduler.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_setscheduler,sched_setscheduler)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sched_yield.S b/mdk-stage1/dietlibc/syscalls.s/sched_yield.S<br/>deleted file mode 100644<br/>index ccb9ac1d0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sched_yield.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sched_yield.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sched_yield,sched_yield)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/select.S b/mdk-stage1/dietlibc/syscalls.s/select.S<br/>deleted file mode 100644<br/>index f585d0449..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/select.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/select.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(select,select)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sendfile.S b/mdk-stage1/dietlibc/syscalls.s/sendfile.S<br/>deleted file mode 100644<br/>index 12d6195dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sendfile.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sendfile.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-#include "dietwarning.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(sendfile,sendfile,__libc_sendfile)</div><div class='del'>-</div><div class='del'>-link_warning(sendfile,"sendfile is not portable and does not support large files")</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setdomainname.S b/mdk-stage1/dietlibc/syscalls.s/setdomainname.S<br/>deleted file mode 100644<br/>index eaade25da..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setdomainname.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setdomainname.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setdomainname,setdomainname)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setgid.S b/mdk-stage1/dietlibc/syscalls.s/setgid.S<br/>deleted file mode 100644<br/>index 69b18a9c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setgid,setgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setgroups.S b/mdk-stage1/dietlibc/syscalls.s/setgroups.S<br/>deleted file mode 100644<br/>index ce8e800a6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setgroups.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setgroups.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setgroups,setgroups)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sethostname.S b/mdk-stage1/dietlibc/syscalls.s/sethostname.S<br/>deleted file mode 100644<br/>index 7616d4848..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sethostname.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sethostname.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sethostname,sethostname)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setitimer.S b/mdk-stage1/dietlibc/syscalls.s/setitimer.S<br/>deleted file mode 100644<br/>index bcb0623ba..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setitimer.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setitimer.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setitimer,setitimer)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setpgid.S b/mdk-stage1/dietlibc/syscalls.s/setpgid.S<br/>deleted file mode 100644<br/>index e93db31dc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setpgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setpgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setpgid,setpgid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setpriority.S b/mdk-stage1/dietlibc/syscalls.s/setpriority.S<br/>deleted file mode 100644<br/>index 57d7bc388..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setpriority.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setpriority.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setpriority,setpriority)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setregid.S b/mdk-stage1/dietlibc/syscalls.s/setregid.S<br/>deleted file mode 100644<br/>index 3a7abbc28..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setregid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setregid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setregid,setregid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setresgid.S b/mdk-stage1/dietlibc/syscalls.s/setresgid.S<br/>deleted file mode 100644<br/>index 64cbac94e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setresgid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setresgid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __setresgid</div><div class='del'>-</div><div class='del'>-syscall(setresgid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setresuid.S b/mdk-stage1/dietlibc/syscalls.s/setresuid.S<br/>deleted file mode 100644<br/>index 20b6abee9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setresuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setresuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __setresuid</div><div class='del'>-</div><div class='del'>-syscall(setresuid)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setreuid.S b/mdk-stage1/dietlibc/syscalls.s/setreuid.S<br/>deleted file mode 100644<br/>index 33ca8deed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setreuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setreuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setreuid,setreuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setrlimit.S b/mdk-stage1/dietlibc/syscalls.s/setrlimit.S<br/>deleted file mode 100644<br/>index 605105658..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setrlimit.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setrlimit.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setrlimit,setrlimit)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setsid.S b/mdk-stage1/dietlibc/syscalls.s/setsid.S<br/>deleted file mode 100644<br/>index d1ef1c58e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setsid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setsid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setsid,setsid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/setuid.S b/mdk-stage1/dietlibc/syscalls.s/setuid.S<br/>deleted file mode 100644<br/>index d20571cbf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/setuid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/setuid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(setuid,setuid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sigaction.S b/mdk-stage1/dietlibc/syscalls.s/sigaction.S<br/>deleted file mode 100644<br/>index 32382870c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sigaction.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sigaction.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sigaction,sigaction)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sigaltstack.S b/mdk-stage1/dietlibc/syscalls.s/sigaltstack.S<br/>deleted file mode 100644<br/>index b07d90f40..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sigaltstack.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sigaltstack.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(sigaltstack,sigaltstack,__sigaltstack)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/signal.S b/mdk-stage1/dietlibc/syscalls.s/signal.S<br/>deleted file mode 100644<br/>index 86c4d5db0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/signal.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/signal.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(signal,signal)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sigpending.S b/mdk-stage1/dietlibc/syscalls.s/sigpending.S<br/>deleted file mode 100644<br/>index 08715bef5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sigpending.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sigpending.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sigpending,sigpending)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S b/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S<br/>deleted file mode 100644<br/>index 07f5b9d26..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sigprocmask.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sigprocmask.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(sigprocmask,sigprocmask,__sigprocmask)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S b/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S<br/>deleted file mode 100644<br/>index 062264ab6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sigsuspend.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sigsuspend.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(sigsuspend,sigsuspend,__libc_sigsuspend)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/socketcall.S b/mdk-stage1/dietlibc/syscalls.s/socketcall.S<br/>deleted file mode 100644<br/>index 5837c049a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/socketcall.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/socketcall.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(socketcall,socketcall)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/stat.S b/mdk-stage1/dietlibc/syscalls.s/stat.S<br/>deleted file mode 100644<br/>index 2aa3bc088..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/stat.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/stat.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(stat,stat)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/stat64.S b/mdk-stage1/dietlibc/syscalls.s/stat64.S<br/>deleted file mode 100644<br/>index 734fcab20..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/stat64.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/stat64.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-#include "dietfeatures.h"</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef WANT_LARGEFILE_BACKCOMPAT</div><div class='del'>-syscall(stat64,__dietlibc_stat64)</div><div class='del'>-#else</div><div class='del'>-syscall(stat64,stat64)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/statfs.S b/mdk-stage1/dietlibc/syscalls.s/statfs.S<br/>deleted file mode 100644<br/>index 7560f569d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/statfs.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/statfs.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(statfs,statfs)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/stime.S b/mdk-stage1/dietlibc/syscalls.s/stime.S<br/>deleted file mode 100644<br/>index 9d9f5bf0a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/stime.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/stime.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(stime,stime)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/swapoff.S b/mdk-stage1/dietlibc/syscalls.s/swapoff.S<br/>deleted file mode 100644<br/>index f75ec94e0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/swapoff.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/swapoff.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(swapoff,swapoff)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/swapon.S b/mdk-stage1/dietlibc/syscalls.s/swapon.S<br/>deleted file mode 100644<br/>index d10594168..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/swapon.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/swapon.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(swapon,swapon)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/symlink.S b/mdk-stage1/dietlibc/syscalls.s/symlink.S<br/>deleted file mode 100644<br/>index 07a6a7fdc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/symlink.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/symlink.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(symlink,symlink)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sync.S b/mdk-stage1/dietlibc/syscalls.s/sync.S<br/>deleted file mode 100644<br/>index 1ee021693..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sync.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sync.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sync,sync)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sysctl.S b/mdk-stage1/dietlibc/syscalls.s/sysctl.S<br/>deleted file mode 100644<br/>index 536e62b3d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sysctl.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sysctl.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-#ifdef __NR_sysctl</div><div class='del'>-syscall(sysctl,_sysctl)</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/sysinfo.S b/mdk-stage1/dietlibc/syscalls.s/sysinfo.S<br/>deleted file mode 100644<br/>index eaec7941e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/sysinfo.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/sysinfo.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(sysinfo,sysinfo)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/syslog.S b/mdk-stage1/dietlibc/syscalls.s/syslog.S<br/>deleted file mode 100644<br/>index 6af3c4eac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/syslog.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/syslog.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(syslog,__syscall_syslog)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/time.S b/mdk-stage1/dietlibc/syscalls.s/time.S<br/>deleted file mode 100644<br/>index 26c79091c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/time.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/time.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(time,time)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/times.S b/mdk-stage1/dietlibc/syscalls.s/times.S<br/>deleted file mode 100644<br/>index dcc8a6dd0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/times.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/times.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(times,times)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/truncate.S b/mdk-stage1/dietlibc/syscalls.s/truncate.S<br/>deleted file mode 100644<br/>index 7052bdcee..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/truncate.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/truncate.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(truncate,truncate)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/umask.S b/mdk-stage1/dietlibc/syscalls.s/umask.S<br/>deleted file mode 100644<br/>index 9f8ffeda6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/umask.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/umask.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(umask,umask)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/umount.S b/mdk-stage1/dietlibc/syscalls.s/umount.S<br/>deleted file mode 100644<br/>index 4a423d964..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/umount.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/umount.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(umount,umount)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/umount2.S b/mdk-stage1/dietlibc/syscalls.s/umount2.S<br/>deleted file mode 100644<br/>index 4cdd6a200..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/umount2.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/umount2.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(umount2,umount2)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/uname.S b/mdk-stage1/dietlibc/syscalls.s/uname.S<br/>deleted file mode 100644<br/>index a460d2aa6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/uname.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/uname.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(uname,uname)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/unlink.S b/mdk-stage1/dietlibc/syscalls.s/unlink.S<br/>deleted file mode 100644<br/>index bd6713061..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/unlink.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/unlink.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(unlink,unlink)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/utime.S b/mdk-stage1/dietlibc/syscalls.s/utime.S<br/>deleted file mode 100644<br/>index 08cd22158..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/utime.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/utime.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(utime,utime)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/vhangup.S b/mdk-stage1/dietlibc/syscalls.s/vhangup.S<br/>deleted file mode 100644<br/>index 6e2d1d343..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/vhangup.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/vhangup.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(vhangup,vhangup)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/wait4.S b/mdk-stage1/dietlibc/syscalls.s/wait4.S<br/>deleted file mode 100644<br/>index ca6773569..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/wait4.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/wait4.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(wait4,wait4)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/waitpid.S b/mdk-stage1/dietlibc/syscalls.s/waitpid.S<br/>deleted file mode 100644<br/>index 5cdc18afb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/waitpid.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/waitpid.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(waitpid,waitpid,__libc_waitpid)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/write.S b/mdk-stage1/dietlibc/syscalls.s/write.S<br/>deleted file mode 100644<br/>index ba20395df..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/write.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/write.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall_weak(write,write,__libc_write)</div><div class='head'>diff --git a/mdk-stage1/dietlibc/syscalls.s/writev.S b/mdk-stage1/dietlibc/syscalls.s/writev.S<br/>deleted file mode 100644<br/>index 8ec7aa6b0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dietlibc/syscalls.s/writev.S?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dietlibc/syscalls.s/writev.S</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,3 +0,0 @@</div><div class='del'>-#include "syscalls.h"</div><div class='del'>-</div><div class='del'>-syscall(writev,writev)</div><div class='head'>diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c<br/>deleted file mode 100644<br/>index a9a31d3d7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/disk.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/disk.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,343 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-#include "probing.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "mount.h"</div><div class='del'>-#include "lomount.h"</div><div class='del'>-#include "automatic.h"</div><div class='del'>-</div><div class='del'>-#include "disk.h"</div><div class='del'>-</div><div class='del'>-struct partition_detection_anchor {</div><div class='del'>-	off_t offset;</div><div class='del'>-	const char * anchor;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int seek_and_compare(int fd, struct partition_detection_anchor anch)</div><div class='del'>-{</div><div class='del'>-	char buf[500];</div><div class='del'>-	size_t count;</div><div class='del'>-	if (lseek(fd, anch.offset, SEEK_SET) == (off_t)-1) {</div><div class='del'>-		log_perror("seek failed");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	count = read(fd, buf, strlen(anch.anchor));</div><div class='del'>-	if (count != strlen(anch.anchor)) {</div><div class='del'>-		log_perror("read failed");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	buf[count] = '\0';</div><div class='del'>-	if (strcmp(anch.anchor, buf))</div><div class='del'>-		return 1;</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static const char * detect_partition_type(char * dev)</div><div class='del'>-{</div><div class='del'>-	struct partition_detection_info {</div><div class='del'>-		const char * name;</div><div class='del'>-		struct partition_detection_anchor anchor0;</div><div class='del'>-		struct partition_detection_anchor anchor1;</div><div class='del'>-		struct partition_detection_anchor anchor2;</div><div class='del'>-	};</div><div class='del'>-	struct partition_detection_info partitions_signatures[] = { </div><div class='del'>-		{ "Linux Swap", { 4086, "SWAP-SPACE" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "Linux Swap", { 4086, "SWAPSPACE2" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "Ext2", { 0x438, "\x53\xEF" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "ReiserFS", { 0x10034, "ReIsErFs" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "ReiserFS", { 0x10034, "ReIsEr2Fs" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "XFS", { 0, "XFSB" }, { 0x200, "XAGF" }, { 0x400, "XAGI" } },</div><div class='del'>-		{ "JFS", { 0x8000, "JFS1" }, { 0, NULL }, { 0, NULL } },</div><div class='del'>-		{ "NTFS", { 0x1FE, "\x55\xAA" }, { 0x3, "NTFS" }, { 0, NULL } },</div><div class='del'>-		{ "FAT32", { 0x1FE, "\x55\xAA" }, { 0x52, "FAT32" }, { 0, NULL } },</div><div class='del'>-		{ "FAT", { 0x1FE, "\x55\xAA" }, { 0x36, "FAT" }, { 0, NULL } },</div><div class='del'>-		{ "Linux LVM", { 0, "HM\1\0" }, { 0, NULL }, { 0, NULL } }</div><div class='del'>-	};</div><div class='del'>-	int partitions_signatures_nb = sizeof(partitions_signatures) / sizeof(struct partition_detection_info);</div><div class='del'>-	int i;</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	char device_fullname[50];</div><div class='del'>-	strcpy(device_fullname, "/dev/");</div><div class='del'>-	strcat(device_fullname, dev);</div><div class='del'>-</div><div class='del'>-	if (ensure_dev_exists(device_fullname))</div><div class='del'>-		return NULL;</div><div class='del'>-	log_message("guessing type of %s", device_fullname);</div><div class='del'>-</div><div class='del'>-	if ((fd = open(device_fullname, O_RDONLY, 0)) &lt; 0) {</div><div class='del'>-		log_perror("open");</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	for (i=0; i&lt;partitions_signatures_nb; i++) {</div><div class='del'>-		int results = seek_and_compare(fd, partitions_signatures[i].anchor0);</div><div class='del'>-		if (results == -1)</div><div class='del'>-			goto detect_partition_type_end;</div><div class='del'>-		if (results == 1)</div><div class='del'>-			continue;</div><div class='del'>-		if (!partitions_signatures[i].anchor1.anchor)</div><div class='del'>-			goto detect_partition_found_it;</div><div class='del'>-</div><div class='del'>-		results = seek_and_compare(fd, partitions_signatures[i].anchor1);</div><div class='del'>-		if (results == -1)</div><div class='del'>-			goto detect_partition_type_end;</div><div class='del'>-		if (results == 1)</div><div class='del'>-			continue;</div><div class='del'>-		if (!partitions_signatures[i].anchor2.anchor)</div><div class='del'>-			goto detect_partition_found_it;</div><div class='del'>-</div><div class='del'>-		results = seek_and_compare(fd, partitions_signatures[i].anchor2);</div><div class='del'>-		if (results == -1)</div><div class='del'>-			goto detect_partition_type_end;</div><div class='del'>-		if (results == 1)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-	detect_partition_found_it:</div><div class='del'>-		return partitions_signatures[i].name;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>- detect_partition_type_end:</div><div class='del'>-	close(fd);</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char * disk_extract_list_directory(char * direct)</div><div class='del'>-{</div><div class='del'>-	char ** full = list_directory(direct);</div><div class='del'>-	char tmp[2000] = "";</div><div class='del'>-	int i;</div><div class='del'>-	for (i=0; i&lt;5 ; i++) {</div><div class='del'>-		if (!full || !*full)</div><div class='del'>-			break;</div><div class='del'>-		strcat(tmp, *full);</div><div class='del'>-		strcat(tmp, "\n");</div><div class='del'>-		full++;</div><div class='del'>-	}</div><div class='del'>-	return strdup(tmp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum return_type try_with_device(char *dev_name)</div><div class='del'>-{</div><div class='del'>-	char * questions_location[] = { "Directory or ISO image", NULL };</div><div class='del'>-	char * questions_location_auto[] = { "directory", NULL };</div><div class='del'>-	static char ** answers_location = NULL;</div><div class='del'>-	char device_fullname[50];</div><div class='del'>-	char location_full[500];</div><div class='del'>-</div><div class='del'>-	char * disk_own_mount = "/tmp/hdimage";</div><div class='del'>-</div><div class='del'>-	int major, minor, blocks;</div><div class='del'>-	char name[100];</div><div class='del'>-</div><div class='del'>-	char buf[512];</div><div class='del'>-	FILE * f;</div><div class='del'>-	char * parts[50];</div><div class='del'>-	char * parts_comments[50];</div><div class='del'>-	struct stat statbuf;</div><div class='del'>-	int i = 0;</div><div class='del'>-	enum return_type results;</div><div class='del'>-	char * choice;</div><div class='del'>-</div><div class='del'>-	if (!(f = fopen("/proc/partitions", "rb")) || !fgets(buf, sizeof(buf), f) || !fgets(buf, sizeof(buf), f)) {</div><div class='del'>-		log_perror(dev_name);</div><div class='del'>-		stg1_error_message("Could not read partitions information.");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (fgets(buf, sizeof(buf), f)) {</div><div class='del'>-		bzero(name, sizeof(name));</div><div class='del'>-		sscanf(buf, " %d %d %d %s", &amp;major, &amp;minor, &amp;blocks, name);</div><div class='del'>-		if ((strstr(name, dev_name) == name) &amp;&amp; (blocks &gt; 1) &amp;&amp; (name[strlen(dev_name)] != '\0')) {</div><div class='del'>-			const char * partition_type = detect_partition_type(name);</div><div class='del'>-			parts[i] = strdup(name);</div><div class='del'>-			parts_comments[i] = (char *) malloc(sizeof(char) * 100);</div><div class='del'>-			sprintf(parts_comments[i], "size: %d Mbytes", blocks &gt;&gt; 10);</div><div class='del'>-			if (partition_type) {</div><div class='del'>-				strcat(parts_comments[i], ", type: ");</div><div class='del'>-				strcat(parts_comments[i], partition_type);</div><div class='del'>-			}</div><div class='del'>-			i++;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	parts[i] = NULL;</div><div class='del'>-	fclose(f);</div><div class='del'>-</div><div class='del'>-	if (parts[0] == NULL) {</div><div class='del'>-		stg1_error_message("No partitions found.");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = ask_from_list_comments_auto("Please choose the partition where " DISTRIB_NAME " is copied.",</div><div class='del'>-					      parts, parts_comments, &amp;choice, "partition", parts);</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	strcpy(device_fullname, "/dev/");</div><div class='del'>-	strcat(device_fullname, choice);</div><div class='del'>-</div><div class='del'>-	if (my_mount(device_fullname, disk_own_mount, "ext2", 0) == -1 &amp;&amp;</div><div class='del'>-	    my_mount(device_fullname, disk_own_mount, "vfat", 0) == -1 &amp;&amp;</div><div class='del'>-	    my_mount(device_fullname, disk_own_mount, "reiserfs", 0) == -1) {</div><div class='del'>-		stg1_error_message("I can't find a valid filesystem (tried: ext2, vfat, reiserfs).");</div><div class='del'>-		return try_with_device(dev_name);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ask_from_entries_auto("Please enter the directory (or ISO image file) containing the " DISTRIB_NAME " Distribution.",</div><div class='del'>-				  questions_location, &amp;answers_location, 24, questions_location_auto, NULL) != RETURN_OK) {</div><div class='del'>-		umount(disk_own_mount);</div><div class='del'>-		return try_with_device(dev_name);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	strcpy(location_full, disk_own_mount);</div><div class='del'>-	strcat(location_full, "/");</div><div class='del'>-	strcat(location_full, answers_location[0]);</div><div class='del'>-</div><div class='del'>-	if (access(location_full, R_OK)) {</div><div class='del'>-		stg1_error_message("Directory or ISO image file could not be found on partition.\n"</div><div class='del'>-			      "Here's a short extract of the files in the root of the partition:\n"</div><div class='del'>-			      "%s", disk_extract_list_directory(disk_own_mount));</div><div class='del'>-		umount(disk_own_mount);</div><div class='del'>-		return try_with_device(dev_name);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	unlink(IMAGE_LOCATION);</div><div class='del'>-</div><div class='del'>-	if (!stat(location_full, &amp;statbuf) &amp;&amp; !S_ISDIR(statbuf.st_mode)) {</div><div class='del'>-		log_message("%s exists and is not a directory, assuming this is an ISO image", location_full);</div><div class='del'>-		if (lomount(location_full, IMAGE_LOCATION)) {</div><div class='del'>-			stg1_error_message("Could not mount file %s as an ISO image of the " DISTRIB_NAME " Distribution.", answers_location[0]);</div><div class='del'>-			umount(disk_own_mount);</div><div class='del'>-			return try_with_device(dev_name);</div><div class='del'>-		}</div><div class='del'>-	} else</div><div class='del'>-		symlink(location_full, IMAGE_LOCATION);</div><div class='del'>-</div><div class='del'>-	if (IS_SPECIAL_STAGE2 || ramdisk_possible()) {</div><div class='del'>-		/* RAMDISK install */</div><div class='del'>-		if (access(IMAGE_LOCATION RAMDISK_LOCATION, R_OK)) {</div><div class='del'>-			stg1_error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "</div><div class='del'>-				      "(I need the subdirectory " RAMDISK_LOCATION ")\n"</div><div class='del'>-				      "Here's a short extract of the files in the directory:\n"</div><div class='del'>-				      "%s", disk_extract_list_directory(IMAGE_LOCATION));</div><div class='del'>-			loumount();</div><div class='del'>-			umount(disk_own_mount);</div><div class='del'>-			return try_with_device(dev_name);</div><div class='del'>-		}</div><div class='del'>-		if (load_ramdisk() != RETURN_OK) {</div><div class='del'>-			stg1_error_message("Could not load program into memory.");</div><div class='del'>-			loumount();</div><div class='del'>-			umount(disk_own_mount);</div><div class='del'>-			return try_with_device(dev_name);</div><div class='del'>-		}</div><div class='del'>-	} else {</div><div class='del'>-		/* LIVE install */</div><div class='del'>-		char p;</div><div class='del'>-		if (access(IMAGE_LOCATION LIVE_LOCATION, R_OK)) {</div><div class='del'>-			stg1_error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "</div><div class='del'>-				      "(I need the subdirectory " LIVE_LOCATION ")\n"</div><div class='del'>-				      "Here's a short extract of the files in the directory:\n"</div><div class='del'>-				      "%s", disk_extract_list_directory(IMAGE_LOCATION));</div><div class='del'>-			loumount();</div><div class='del'>-			umount(disk_own_mount);</div><div class='del'>-			return try_with_device(dev_name);</div><div class='del'>-		}</div><div class='del'>-		if (readlink(IMAGE_LOCATION LIVE_LOCATION "/usr/bin/runinstall2", &amp;p, 1) != 1) {</div><div class='del'>-			stg1_error_message("The " DISTRIB_NAME " Distribution seems to be copied on a Windows partition. "</div><div class='del'>-				      "You need more memory to perform an installation from a Windows partition. "</div><div class='del'>-				      "Another solution if to copy the " DISTRIB_NAME " Distribution on a Linux partition.");</div><div class='del'>-			loumount();</div><div class='del'>-			umount(disk_own_mount);</div><div class='del'>-			return try_with_device(dev_name);</div><div class='del'>-		}</div><div class='del'>-		log_message("found the " DISTRIB_NAME " Installation, good news!");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (IS_RESCUE) {</div><div class='del'>-		loumount();</div><div class='del'>-		umount(disk_own_mount);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	method_name = strdup("disk");</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum return_type disk_prepare(void)</div><div class='del'>-{</div><div class='del'>-	char ** medias, ** ptr, ** medias_models;</div><div class='del'>-	char * choice;</div><div class='del'>-	int i, count = 0;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	my_insmod("sd_mod", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-	</div><div class='del'>-	get_medias(DISK, &amp;medias, &amp;medias_models, BUS_ANY);</div><div class='del'>-</div><div class='del'>-	ptr = medias;</div><div class='del'>-	while (ptr &amp;&amp; *ptr) {</div><div class='del'>-		count++;</div><div class='del'>-		ptr++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count == 0) {</div><div class='del'>-		stg1_error_message("No DISK drive found.");</div><div class='del'>-		i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-		if (i == RETURN_BACK)</div><div class='del'>-			return RETURN_BACK;</div><div class='del'>-		return disk_prepare();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count == 1) {</div><div class='del'>-		results = try_with_device(*medias);</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			return RETURN_OK;</div><div class='del'>-		i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-		if (i == RETURN_BACK)</div><div class='del'>-			return RETURN_BACK;</div><div class='del'>-		return disk_prepare();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = ask_from_list_comments_auto("Please choose the DISK drive on which you copied the " DISTRIB_NAME " Distribution.",</div><div class='del'>-					      medias, medias_models, &amp;choice, "disk", medias);</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	results = try_with_device(choice);</div><div class='del'>-	if (results == RETURN_OK)</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-	i = ask_insmod(SCSI_ADAPTERS);</div><div class='del'>-	if (i == RETURN_BACK)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-	return disk_prepare();</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/disk.h b/mdk-stage1/disk.h<br/>deleted file mode 100644<br/>index 54213cf68..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/disk.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/disk.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _DISK_H_</div><div class='del'>-#define _DISK_H_</div><div class='del'>-</div><div class='del'>-enum return_type disk_prepare(void);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c<br/>deleted file mode 100644<br/>index d1e67c78d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dns.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dns.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,213 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-// dietlibc can do hostname lookup, whereas glibc can't when linked statically :-(</div><div class='del'>-</div><div class='del'>-#ifdef __LIBC_DIETLIBC__</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-</div><div class='del'>-#include "network.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-</div><div class='del'>-#include "dns.h"</div><div class='del'>-</div><div class='del'>-int mygethostbyname(char * name, struct in_addr * addr)</div><div class='del'>-{</div><div class='del'>-	struct hostent * h = gethostbyname(name);</div><div class='del'>-	if (!h) {</div><div class='del'>-		if (domain) {</div><div class='del'>-			// gethostbyname from dietlibc doesn't support domain handling</div><div class='del'>-			char fully_qualified[500];</div><div class='del'>-			sprintf(fully_qualified, "%s.%s", name, domain);</div><div class='del'>-			h = gethostbyname(fully_qualified);</div><div class='del'>-			if (!h) {</div><div class='del'>-				log_message("unknown host %s", name);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-		} else</div><div class='del'>-			return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (h-&gt;h_addr_list &amp;&amp; (h-&gt;h_addr_list)[0]) {</div><div class='del'>-		memcpy(addr, (h-&gt;h_addr_list)[0], sizeof(*addr));</div><div class='del'>-		log_message("is-at: %s", inet_ntoa(*addr));</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * mygethostbyaddr(char * ipnum)</div><div class='del'>-{</div><div class='del'>-	struct in_addr in;</div><div class='del'>-	struct hostent * host;</div><div class='del'>-	if (!inet_aton(ipnum, &amp;in))</div><div class='del'>-		return NULL;</div><div class='del'>-	host = gethostbyaddr(&amp;in, strlen((void *) &amp;in), AF_INET);</div><div class='del'>-	if (host &amp;&amp; host-&gt;h_name)</div><div class='del'>-		return host-&gt;h_name;</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#else // __LIBC_DIETLIBC__</div><div class='del'>-</div><div class='del'>-#include &lt;alloca.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;resolv.h&gt;</div><div class='del'>-#include &lt;arpa/nameser.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "log.h"</div><div class='del'>-</div><div class='del'>-#include "dns.h"</div><div class='del'>-</div><div class='del'>-/* This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so */</div><div class='del'>-</div><div class='del'>-union dns_response {</div><div class='del'>-    HEADER hdr;</div><div class='del'>-    u_char buf[PACKETSZ];</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static int do_query(char * query, int queryType, char ** domainName, struct in_addr * ipNum)</div><div class='del'>-{</div><div class='del'>-	int len, ancount, type;</div><div class='del'>-	u_char * data, * end;</div><div class='del'>-	char name[MAXDNAME];</div><div class='del'>-	union dns_response response;</div><div class='del'>-	</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-	/* from jj: */</div><div class='del'>-	/* We have to wait till ethernet negotiation is done */</div><div class='del'>-	_res.retry = 3;</div><div class='del'>-#else</div><div class='del'>-	_res.retry = 2;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	len = res_search(query, C_IN, queryType, (void *) &amp;response, sizeof(response));</div><div class='del'>-	if (len &lt;= 0)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	if (ntohs(response.hdr.rcode) != NOERROR)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	ancount = ntohs(response.hdr.ancount);</div><div class='del'>-	if (ancount &lt; 1)</div><div class='del'>-		return -1;</div><div class='del'>-	</div><div class='del'>-	data = response.buf + sizeof(HEADER);</div><div class='del'>-	end = response.buf + len;</div><div class='del'>-	</div><div class='del'>-	/* skip the question */</div><div class='del'>-	data += dn_skipname(data, end) + QFIXEDSZ;</div><div class='del'>-</div><div class='del'>-	/* parse the answer(s) */</div><div class='del'>-	while (--ancount &gt;= 0 &amp;&amp; data &lt; end) {</div><div class='del'>-</div><div class='del'>-		/* skip the domain name portion of the RR record */</div><div class='del'>-		data += dn_skipname(data, end);</div><div class='del'>-</div><div class='del'>-		/* get RR information */</div><div class='del'>-		GETSHORT(type, data);</div><div class='del'>-		data += INT16SZ; /* skipp class */</div><div class='del'>-		data += INT32SZ; /* skipp TTL */</div><div class='del'>-		GETSHORT(len,  data);</div><div class='del'>-</div><div class='del'>-		if (type == T_PTR) {</div><div class='del'>-			/* we got a pointer */</div><div class='del'>-			len = dn_expand(response.buf, end, data, name, sizeof(name));</div><div class='del'>-			if (len &lt;= 0) return -1;</div><div class='del'>-			if (queryType == T_PTR &amp;&amp; domainName) {</div><div class='del'>-				/* we wanted a pointer */</div><div class='del'>-				*domainName = malloc(strlen(name) + 1);</div><div class='del'>-				strcpy(*domainName, name);</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-		} else if (type == T_A) {</div><div class='del'>-			/* we got an address */</div><div class='del'>-			if (queryType == T_A &amp;&amp; ipNum) {</div><div class='del'>-				/* we wanted an address */</div><div class='del'>-				memcpy(ipNum, data, sizeof(*ipNum));</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		</div><div class='del'>-		/* move ahead to next RR */</div><div class='del'>-		data += len;</div><div class='del'>-	} </div><div class='del'>-	</div><div class='del'>-	return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * mygethostbyaddr(char * ipnum) {</div><div class='del'>-	int rc;</div><div class='del'>-	char * result;</div><div class='del'>-	char * strbuf;</div><div class='del'>-	char * chptr;</div><div class='del'>-	char * splits[4];</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	_res.retry = 1;</div><div class='del'>-	</div><div class='del'>-	strbuf = alloca(strlen(ipnum) + 1);</div><div class='del'>-	strcpy(strbuf, ipnum);</div><div class='del'>-	</div><div class='del'>-	ipnum = alloca(strlen(strbuf) + 20);</div><div class='del'>-	</div><div class='del'>-	for (i = 0; i &lt; 4; i++) {</div><div class='del'>-		chptr = strbuf;</div><div class='del'>-		while (*chptr &amp;&amp; *chptr != '.')</div><div class='del'>-			chptr++;</div><div class='del'>-		*chptr = '\0';</div><div class='del'>-		</div><div class='del'>-		if (chptr - strbuf &gt; 3) return NULL;</div><div class='del'>-		splits[i] = strbuf;</div><div class='del'>-		strbuf = chptr + 1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	sprintf(ipnum, "%s.%s.%s.%s.in-addr.arpa", splits[3], splits[2], splits[1], splits[0]);</div><div class='del'>-	</div><div class='del'>-	rc = do_query(ipnum, T_PTR, &amp;result, NULL);</div><div class='del'>-	</div><div class='del'>-	if (rc) </div><div class='del'>-		return NULL;</div><div class='del'>-	else</div><div class='del'>-		return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int mygethostbyname(char * name, struct in_addr * addr) {</div><div class='del'>-	int rc = do_query(name, T_A, NULL, addr);</div><div class='del'>-	if (!rc)</div><div class='del'>-		log_message("is-at %s", inet_ntoa(*addr));</div><div class='del'>-	return rc;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/dns.h b/mdk-stage1/dns.h<br/>deleted file mode 100644<br/>index 97af9c08a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/dns.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/dns.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,30 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef H_DNS</div><div class='del'>-#define H_DNS </div><div class='del'>-</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-int mygethostbyname(char * name, struct in_addr * addr);</div><div class='del'>-char * mygethostbyaddr(char * ipnum);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/doc/HACKING b/mdk-stage1/doc/HACKING<br/>deleted file mode 100644<br/>index d196c8010..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/HACKING?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/HACKING</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,31 +0,0 @@</div><div class='del'>-If you have to boot pretty often, you'll appreciate to speed the things up</div><div class='del'>-a little.</div><div class='del'>-</div><div class='del'>-Here's what we use: the GRUB feature to boot from the network using the</div><div class='del'>-DHCP protocol and the TFTP protocol.</div><div class='del'>-</div><div class='del'>-Here's the "menu.lst" to do that:</div><div class='del'>-</div><div class='del'>--=-=--</div><div class='del'>-</div><div class='del'>-timeout 0</div><div class='del'>-</div><div class='del'>-title linux</div><div class='del'>-dhcp</div><div class='del'>-tftpserver 192.168.1.17</div><div class='del'>-kernel (nd)/tftpboot/gc/vmlinuz ramdisk=32000 vga=788</div><div class='del'>-initrd (nd)/tftpboot/gc/network.rdz</div><div class='del'>-</div><div class='del'>--=-=--</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The option "tftpserver" is used to override the tftpserver address given</div><div class='del'>-as an answer by the DHCP server. That way, you'll not need to bother your</div><div class='del'>-system administrator to modify his dhcp server configuration.</div><div class='del'>-</div><div class='del'>-The directory /tftpboot seems to be the only one defaultly accepted by the</div><div class='del'>-server, and its subdirs.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Of course, your GRUB needs to be compiled with the specific code for your</div><div class='del'>-network card; use ./configure --help in the GRUB build dir for more infos.</div><div class='head'>diff --git a/mdk-stage1/doc/README b/mdk-stage1/doc/README<br/>deleted file mode 100644<br/>index 09edce6c2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,185 +0,0 @@</div><div class='del'>--------------------------------------------------------</div><div class='del'>-*  Stage1 of the Mandrake Linux installation program  *</div><div class='del'>--------------------------------------------------------</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-[ Author ]</div><div class='del'>-</div><div class='del'>-	Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-[ Copyright ]</div><div class='del'>-</div><div class='del'>-	Copyright 2000 MandrakeSoft</div><div class='del'>-</div><div class='del'>-	Partially inspired by Redhat stuff (install from 5.x and 7.x) copyright</div><div class='del'>-	Red Hat Software, and Debian stuff (boot-floppies) copyright by their</div><div class='del'>-	respective holders.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-[ Licence ]</div><div class='del'>-</div><div class='del'>-	This program is free software; you can redistribute it and/or modify</div><div class='del'>-	it under the terms of the GNU General Public License as published by</div><div class='del'>-	the Free Software Foundation; either version 2 of the License, or</div><div class='del'>-	(at your option) any later version.</div><div class='del'>-	</div><div class='del'>-	This program is distributed in the hope that it will be useful,</div><div class='del'>-	but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</div><div class='del'>-	GNU General Public License for more details.</div><div class='del'>-	</div><div class='del'>-	You should have received a copy of the GNU General Public License</div><div class='del'>-	along with this program; if not, write to the Free Software</div><div class='del'>-	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	*** WARNING! ***</div><div class='del'>-</div><div class='del'>-	This General Public License does not permit incorporating any part</div><div class='del'>-	of this program as a library into proprietary programs.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-[ Online ]</div><div class='del'>-</div><div class='del'>-	http://us.mandrakesoft.com/~gc/html/stage1.html</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-[ Purpose ]</div><div class='del'>-</div><div class='del'>-	This code will take the control of the computer after that Linux</div><div class='del'>-	kernel booted properly, and will try to run the main installer</div><div class='del'>-	(also known as "stage 2") from a series of different media</div><div class='del'>-	including harddrive, cdrom, and network.</div><div class='del'>-</div><div class='del'>-	Use the source, Luke.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-                -=-=-- Okay, now, more details --=-=-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	[ Installing Mandrake Linux ]</div><div class='del'>-</div><div class='del'>-Per default, just insert your Mandrake Linux Installation CD into your</div><div class='del'>-CDROM tray, be sure your system BIOS is configured to boot on your CDROM,</div><div class='del'>-and that's all.</div><div class='del'>-</div><div class='del'>-If you have multiple CDROM drives and the installer can't autodetect in</div><div class='del'>-which CDROM drive is the disc, it may ask you to choose the correct drive,</div><div class='del'>-between your CDROM drives.</div><div class='del'>-</div><div class='del'>-Also, if you want to install from an SCSI CDROM, the installer should</div><div class='del'>-detect your SCSI adapter; if it fails you may have to select the right</div><div class='del'>-driver and/or supply additional parameters.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Position of the problem ]</div><div class='del'>-</div><div class='del'>-The need for alternate installation methods come with more specific</div><div class='del'>-hardware configuration and/or need for frequent updates of the Installer</div><div class='del'>-software.</div><div class='del'>-</div><div class='del'>-All of these methods will require to use a special boot disk. The method</div><div class='del'>-is to download it and then to copy it "physically" to a floppy with the</div><div class='del'>-command:</div><div class='del'>-</div><div class='del'>-# dd if=&lt;boot-disk&gt; of=/dev/fd0</div><div class='del'>-</div><div class='del'>-Our boot disks are called "cdrom.img", "network.img", etc.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Installation from CDROM ]</div><div class='del'>-</div><div class='del'>-The first situation you may encounter is an old BIOS which does not permit</div><div class='del'>-you to boot from your CDROM drive.</div><div class='del'>-</div><div class='del'>-In that case, you'll need to use the "cdrom.img" image file. The steps are</div><div class='del'>-the same as with CDROM boot, and everything should be automatic.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Installation from DISK ]</div><div class='del'>-</div><div class='del'>-If you like trying occasionnally our development version, the Cooker, one</div><div class='del'>-of the easiest way is to grab a local copy of the Distribution on one of</div><div class='del'>-your local hard drives, and to install from that location.</div><div class='del'>-</div><div class='del'>-At present time, you can install from IDE or SCSI drives, from Linux</div><div class='del'>-(ext2), Windows (vfat) or Reiserfs partition.</div><div class='del'>-</div><div class='del'>-In that case, you'll need to use the "hd.img" image file. The dialogs will</div><div class='del'>-ask you to choose the DISK drive to use to install from, then the</div><div class='del'>-partition on which you copied the Distribution, then the location</div><div class='del'>-(directory) in which you copied the Distribution.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Installation from NETWORK ]</div><div class='del'>-</div><div class='del'>-For convenience, you can also install from a NFS volume, from a FTP</div><div class='del'>-server, or from a HTTP server. NFS installs are maybe the fastest</div><div class='del'>-and most convenient possible, so if you need to do frequent and/or</div><div class='del'>-multiple installs, you may like this option.</div><div class='del'>-</div><div class='del'>-In that case, you'll need to use the "network.img" image file. If you have</div><div class='del'>-PCI network card(s), you'll probably have to only setup your network</div><div class='del'>-options. If not, you'll have to choose the appropriate driver(s) and/or</div><div class='del'>-optional parameters. Supported network configurations include static IP</div><div class='del'>-allocation and DHCP automatic configuration.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Installation from PCMCIA ]</div><div class='del'>-</div><div class='del'>-If you want to perform an installation on your laptop that is not based on</div><div class='del'>-local IDE CDROM or DISK, nor on built-in network card, but on PCMCIA</div><div class='del'>-extension (probably a network adapter or CDROM drive), you'll need the</div><div class='del'>-"pcmcia.img" image file.</div><div class='del'>-</div><div class='del'>-PCMCIA services should automatically start and be transparent to you.</div><div class='del'>-Then, you'll follow the instructions according to your preferred</div><div class='del'>-installation method.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	[ Monitoring a stage1 session ]</div><div class='del'>-</div><div class='del'>-Linux supports virtual consoles. You can switch between them by issueing</div><div class='del'>-Ctrl+Alt+Fx key, in which 'x' is the number of the console. Here's console</div><div class='del'>-occupancy during stage1.</div><div class='del'>-</div><div class='del'>-(#1) The user-interface of the stage1 is on the first console. In case of</div><div class='del'>-newt interaction, it's provided with a neat blue and black color scheme,</div><div class='del'>-and nice widgets. In case of stdio interaction (cdrom and disk installs),</div><div class='del'>-it's more basic but still usable :-).</div><div class='del'>-</div><div class='del'>-(#2) A shell is provided on second console in some cases (you need to</div><div class='del'>-compile it with -DSPAWN_SHELL and you need to provide a valid shell in the</div><div class='del'>-initrd) and of course it's not in, in image files of Mandrake Linux</div><div class='del'>-releases because it's too much diskspace.</div><div class='del'>-</div><div class='del'>-(#3) The log is printed out on the third console. This is the location</div><div class='del'>-where you can find most valuable information, prefixed by a '*'. See</div><div class='del'>-"log.h" for calls that print things out to the log.</div><div class='del'>-</div><div class='del'>-(#4) The kernel messages are printed on the fourth console. There is a</div><div class='del'>-process forked very early in the init (the program before the stage1)</div><div class='del'>-which monitors /proc/kmsg for new kernel messages. Also, syslog stuff (the</div><div class='del'>-logs commited by the programs) should appear on the /dev/log Unix socket,</div><div class='del'>-this is also printed on this console.</div><div class='del'>-</div><div class='del'>-(#5) Former place for the stderr of insmod calls. It's not used anymore.</div><div class='del'>-</div><div class='del'>-(#6) Place where a trivial interactive communication with the stage1 is</div><div class='del'>-set up if the parameter -DSPAWN_INTERACTIVE is compiled in. Basically, you</div><div class='del'>-can set switches such as "expert" and "rescue" on the fly with this</div><div class='del'>-feature. It's implemented with a fork and a Unix pipe.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-        [ Rescueing a system ]</div><div class='del'>-</div><div class='del'>-Since Mandrake Linux 7.1, we provide a rescue system through each of the</div><div class='del'>-previously described methods. You don't need a special "rescue.img" file.</div><div class='del'>-Just hit "F1" at boot time, type in "rescue", and follow the first steps</div><div class='del'>-of the installation according to the method you chose (choose</div><div class='del'>-disks/partitions for disk method, network parameters for network method,</div><div class='del'>-etc). Then, you'll end up with a workable system, very useful to rescue a</div><div class='del'>-damaged system, or do other basic actions.</div><div class='head'>diff --git a/mdk-stage1/doc/TECH-INFOS b/mdk-stage1/doc/TECH-INFOS<br/>deleted file mode 100644<br/>index 074b35d31..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/TECH-INFOS?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/TECH-INFOS</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,91 +0,0 @@</div><div class='del'>-</div><div class='del'>-| (*) Automatic install</div><div class='del'>-\----------------------</div><div class='del'>-</div><div class='del'>-This feature is used to replace redhat kickstart. It uses the kernel</div><div class='del'>-parameter "automatic" with keywords separated with commas and colons, on</div><div class='del'>-the following genres:</div><div class='del'>-</div><div class='del'>-	automatic=method:nfs,network:static,ip:192.168.1.24,server:192.168.1.7,directory:/stable/i586</div><div class='del'>-</div><div class='del'>-	automatic=method:ftp,network:dhcp,server:ftp.ciril.fr,directory:/pub/linux/mandrake-devel/cooker</div><div class='del'>-</div><div class='del'>-	automatic=method:ftp,network:dhcp,server:companyserver,directory:/mdkinst,user:XXX,pass:XXX</div><div class='del'>-</div><div class='del'>-	automatic=method:ftp,interface:eth1,network:dhcp,...</div><div class='del'>-</div><div class='del'>-	automatic=method:ftp,network:adsl,adsluser:XXX,adslpass:XXX,...</div><div class='del'>-</div><div class='del'>-	automatic=method:cdrom</div><div class='del'>-</div><div class='del'>-	automatic=method:disk,disk:hdb,partition:hdb7</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The keywords correspond to each "virtual" question answered automatically,</div><div class='del'>-either from a list or from a free field.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Keywords are:</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-`method' &lt;- (nfs,ftp,http,cdrom,disk)</div><div class='del'>-</div><div class='del'>-if nfs/ftp/http:</div><div class='del'>-</div><div class='del'>-    `network' &lt;- (static,dhcp,adsl)</div><div class='del'>-</div><div class='del'>-    if multiple interfaces detected:</div><div class='del'>-</div><div class='del'>-        `interface' &lt;- (list-of-detected-interfaces)</div><div class='del'>-</div><div class='del'>-    fi</div><div class='del'>-</div><div class='del'>-    if static:</div><div class='del'>-</div><div class='del'>-        `ip', `dns', `gateway', `netmask' (free fields)</div><div class='del'>-</div><div class='del'>-    elsif adsl:</div><div class='del'>-</div><div class='del'>-	`adsluser', `adslpass' (free field)</div><div class='del'>-</div><div class='del'>-    fi</div><div class='del'>-</div><div class='del'>-    if resolving fails:</div><div class='del'>-</div><div class='del'>-        `hostname', `domain' (free fields)</div><div class='del'>-</div><div class='del'>-    fi   </div><div class='del'>-</div><div class='del'>-    `server', `directory' (free fields)</div><div class='del'>-</div><div class='del'>-    if ftp:</div><div class='del'>-</div><div class='del'>-        `user', `pass' (free fields)</div><div class='del'>-</div><div class='del'>-    fi</div><div class='del'>-</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-if disk:</div><div class='del'>-</div><div class='del'>-    `disk' &lt;- (list-of-detected-disks)</div><div class='del'>-</div><div class='del'>-    `partition' &lt;- (list-of-detected-partitions)</div><div class='del'>-</div><div class='del'>-    `directory' (free fields)</div><div class='del'>-</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-You may use shorter versions of keywords (it helps reducing size of</div><div class='del'>-commandline), please find each keyword short-alias counterpart in file</div><div class='del'>-../automatic.c under the identifier named "short_aliases".</div><div class='del'>-</div><div class='del'>-This gives for example for:</div><div class='del'>-</div><div class='del'>-	automatic=method:nfs,network:static,ip:192.168.1.24,server:192.168.1.7,directory:/stable/i586</div><div class='del'>-==&gt;</div><div class='del'>-	automatic=met:nfs,net:static,ip:192.168.1.24,ser:192.168.1.7,dir:/stable/i586</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/doc/UPDATEMODULES b/mdk-stage1/doc/UPDATEMODULES<br/>deleted file mode 100644<br/>index 89d86d365..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/UPDATEMODULES?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/UPDATEMODULES</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,74 +0,0 @@</div><div class='del'>-This is the documentation for the "Update Modules" (Update Drivers)</div><div class='del'>-feature.</div><div class='del'>-</div><div class='del'>-This feature aims to propose new modules or replacement modules for the</div><div class='del'>-install. This is useful when there is a firmware update for a given</div><div class='del'>-driver, an additional driver needed for something, etc.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-You must use a floppy disk with e2fs filesystem (NOT vfat/windows</div><div class='del'>-formatted). Use "mke2fs /dev/fd0" on your own box to format a floppy with</div><div class='del'>-e2fs filesystem.</div><div class='del'>-</div><div class='del'>-This disk may contain a number of kernel modules on the root (e.g. not in</div><div class='del'>-a subdirectory); some of them may replace existing modules, some of them</div><div class='del'>-may be added. This disk must contain a special file, named "to_load", on</div><div class='del'>-the root (not in a subdirectory). This file will contain a series of</div><div class='del'>-module names, with optional module options; the program will try to load</div><div class='del'>-all these modules one after another, using file on the floppy if present,</div><div class='del'>-else using file within standard module repository ("marfile" on the boot</div><div class='del'>-floppy). It can contain comments, these are strictly defined by the</div><div class='del'>-presence of a hash (#) character on column 0 of any line.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Here's a typical scenario:</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-1. Boot the floppy (or cdrom) with the option "updatemodules"</div><div class='del'>-</div><div class='del'>-   (you may do that by pressing F1 then entering "linux updatemodules")</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2. At the very beginning of the User Interface, you are asked to insert</div><div class='del'>-   the Update Modules disk. Insert the Update Modules disk and press</div><div class='del'>-   Enter.</div><div class='del'>-</div><div class='del'>---=----=----=----=----=----=----=----=----=--</div><div class='del'>-Our example disk contains:</div><div class='del'>-</div><div class='del'>-[root@obiwan mnt]# ll floppy/</div><div class='del'>-total 77</div><div class='del'>-drwxr-xr-x    2 root     root        12288 Jul 26 12:02 lost+found/</div><div class='del'>--rw-r--r--    1 root     root         9051 Jul 26 12:43 msdos.o</div><div class='del'>--rw-r--r--    1 root     root        13660 Jul 26 12:04 ppa.o</div><div class='del'>--rw-r--r--    1 root     root           54 Jul 26 12:46 to_load</div><div class='del'>--rw-r--r--    1 root     root        32108 Jul 26 12:04 uhci.o</div><div class='del'>--rw-r--r--    1 root     root         6572 Jul 26 12:04 wacom.o</div><div class='del'>-[root@obiwan mnt]# cat floppy/to_load </div><div class='del'>-# Update Drivers description file</div><div class='del'>-3c59x</div><div class='del'>-# fat is a dep for msdos</div><div class='del'>-fat</div><div class='del'>-# updated msdos (handling of 9+4 filenames)</div><div class='del'>-msdos</div><div class='del'>-ppa</div><div class='del'>-# ISA network card needing options</div><div class='del'>-ne io=0x300 irq=7</div><div class='del'>-[root@obiwan mnt]# </div><div class='del'>---=----=----=----=----=----=----=----=----=--</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-3. The program reads the special file "to_load" and processes the files.</div><div class='del'>-</div><div class='del'>-	a- 3c59x   loaded from the marfile on the boot floppy</div><div class='del'>-	b- fat     loaded from the marfile on the boot floppy</div><div class='del'>-	c- msdos   loaded from the update modules floppy</div><div class='del'>-	d- ppa     loaded from the update modules floppy</div><div class='del'>-        e- ne      loaded from the marfile on the boot floppy</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-!!! Beware !!!, the dependencies are not handled automatically in</div><div class='del'>-the case of load from the update modules floppy, that's why on</div><div class='del'>-our example we need to load "fat" from the standard modules</div><div class='del'>-before "msdos" from the update floppy.</div><div class='head'>diff --git a/mdk-stage1/doc/WHY-DIETLIBC b/mdk-stage1/doc/WHY-DIETLIBC<br/>deleted file mode 100644<br/>index e7c526b49..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/WHY-DIETLIBC?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/WHY-DIETLIBC</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,50 +0,0 @@</div><div class='del'>-(the dietlibc is a replacement for the glibc, which aim is to produce</div><div class='del'>-smaller statically linked binaries)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The use for dietlibc in the stage1 was clear because currently used</div><div class='del'>-install process on x86 is from a 1.44 Mbytes floppy. On this floppy we</div><div class='del'>-need to fit the kernel, modules (scsi and network access), and the code to</div><div class='del'>-do the basic things to load the stage2. The only part on which we could</div><div class='del'>-progress was the code.</div><div class='del'>-</div><div class='del'>-As always, figures demonstrate evidences. Here are the size of the</div><div class='del'>-binaries used for the cdrom, disk, network and full floppy installs, using</div><div class='del'>-newt as the UI library:</div><div class='del'>-</div><div class='del'>-	- with glibc</div><div class='del'>-</div><div class='del'>--rwxr-xr-x    1 gc       gc         569448 May 15 15:29 stage1-cdrom</div><div class='del'>--rwxr-xr-x    1 gc       gc         572264 May 15 15:29 stage1-disk</div><div class='del'>--rwxr-xr-x    1 gc       gc         624712 May 15 15:30 stage1-network</div><div class='del'>--rwxr-xr-x    1 gc       gc         720360 May 15 15:29 stage1-full</div><div class='del'>-</div><div class='del'>-	- with dietlibc</div><div class='del'>-</div><div class='del'>--rwxr-xr-x    1 gc       gc         169332 May 15 14:26 stage1-cdrom</div><div class='del'>--rwxr-xr-x    1 gc       gc         172180 May 15 14:26 stage1-disk</div><div class='del'>--rwxr-xr-x    1 gc       gc         198612 May 15 14:26 stage1-network</div><div class='del'>--rwxr-xr-x    1 gc       gc         251764 May 15 14:26 stage1-full</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-The `stage1-full' binary has code for many things, most notably: data</div><div class='del'>-decrunching (bzlib), archive extraction (in-house format), module loading</div><div class='del'>-(insmod from busybox), PCI detection, ide and scsi handling,</div><div class='del'>-cdrom/disk/loopback mounting, DHCP client negociation (redhat+grub), NFS</div><div class='del'>-mounting (util-linux), FTP and HTTP transmission (redhat), pcmcia</div><div class='del'>-initializing (pcmcia-cs), UI interaction (slang/newt); with use of the</div><div class='del'>-dietlibc, the binary is only 250 kbytes!</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Due to the modular coding, it is also possible to choose to not use</div><div class='del'>-slang/newt as the UI, but a stdio-only UI. In that case, the binaries get</div><div class='del'>-even smaller:</div><div class='del'>-</div><div class='del'>--rwxr-xr-x    1 gc       gc         104500 May 15 15:46 stage1-cdrom*</div><div class='del'>--rwxr-xr-x    1 gc       gc         107348 May 15 15:46 stage1-disk*</div><div class='del'>--rwxr-xr-x    1 gc       gc         133972 May 15 15:47 stage1-network*</div><div class='del'>--rwxr-xr-x    1 gc       gc         187348 May 15 15:46 stage1-full*</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-gc [Tue May 15 15:58:34 2001]
\ No newline at end of file</div><div class='head'>diff --git a/mdk-stage1/doc/documented..frontend.h b/mdk-stage1/doc/documented..frontend.h<br/>deleted file mode 100644<br/>index 10417ef3b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/doc/documented..frontend.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/doc/documented..frontend.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,69 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Using high-level UI.</div><div class='del'>- *</div><div class='del'>- * These functions are frontend-independant: your program won't know each</div><div class='del'>- * `frontend' (e.g. each way to grab user input) will be used.</div><div class='del'>- *</div><div class='del'>- * Then you may link your binary against any `frontend' that implement all</div><div class='del'>- * these functions (and possibly necessary libraries).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef _FRONTEND_H_</div><div class='del'>-#define _FRONTEND_H_</div><div class='del'>-</div><div class='del'>-/* this must be called before anything else */</div><div class='del'>-void init_frontend(void);</div><div class='del'>-</div><div class='del'>-/* this must be called before exit of program */</div><div class='del'>-void finish_frontend(void);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void info_message(char *msg, ...) __attribute__ ((format (printf, 1, 2))); /* (blocks program) */</div><div class='del'>-</div><div class='del'>-void error_message(char *msg, ...) __attribute__ ((format (printf, 1, 2))); /* (blocks program) */</div><div class='del'>-</div><div class='del'>-/* (doesn't block program) </div><div class='del'>- * (this is not necessarily stackable, e.g. only one wait_message at a time) */</div><div class='del'>-void wait_message(char *msg, ...) __attribute__ ((format (printf, 1, 2)));</div><div class='del'>-</div><div class='del'>-/* call this to finish the wait on wait_message */</div><div class='del'>-void remove_wait_message(void);</div><div class='del'>-</div><div class='del'>-/* monitor progression of something (downloading a file, etc)</div><div class='del'>- * if size of progression is unknown, use `0' */</div><div class='del'>-void init_progression(char *msg, int size);</div><div class='del'>-void update_progression(int current_size);</div><div class='del'>-void end_progression(void);</div><div class='del'>-</div><div class='del'>-enum frontend_return { RETURN_OK, RETURN_BACK, RETURN_ERROR };</div><div class='del'>-</div><div class='del'>-/* Yes == RETURN_OK    No == RETURN_ERROR    Back == RETURN_BACK */</div><div class='del'>-enum frontend_return ask_yes_no(char *msg);</div><div class='del'>-</div><div class='del'>-/* [elems] NULL terminated array of char*</div><div class='del'>- * [choice] address of a (unitialized) char* */</div><div class='del'>-enum frontend_return ask_from_list(char *msg, char ** elems, char ** choice);</div><div class='del'>-</div><div class='del'>-enum frontend_return ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice);</div><div class='del'>-</div><div class='del'>-/* [questions] NULL terminated array of char*</div><div class='del'>- * [answers] address of a (unitialized) char**, will contain a non-NULL terminated array of char*</div><div class='del'>- * [callback_func] function called at most when the answers change; it can examine the array of char* and assign some new char* */</div><div class='del'>-enum frontend_return ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size, void (*callback_func)(char ** strings));</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/frontend-common.c b/mdk-stage1/frontend-common.c<br/>deleted file mode 100644<br/>index fac4bccd0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/frontend-common.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/frontend-common.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,47 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;probing.h&gt;</div><div class='del'>-</div><div class='del'>-#include "frontend.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void info_message(char *msg, ...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-	va_start(args, msg);</div><div class='del'>-	vinfo_message(msg, args);</div><div class='del'>-	va_end(args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void wait_message(char *msg, ...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-	va_start(args, msg);</div><div class='del'>-	vwait_message(msg, args);</div><div class='del'>-	va_end(args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void error_message(char *msg, ...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-	va_start(args, msg);</div><div class='del'>-	verror_message(msg, args);</div><div class='del'>-	va_end(args);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/frontend.h b/mdk-stage1/frontend.h<br/>deleted file mode 100644<br/>index 4f2d112b7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/frontend.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/frontend.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * For doc please read doc/documented..frontend.h</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _FRONTEND_H_</div><div class='del'>-#define _FRONTEND_H_</div><div class='del'>-</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type { RETURN_OK, RETURN_BACK, RETURN_ERROR };</div><div class='del'>-</div><div class='del'>-void init_frontend(char * welcome_msg);</div><div class='del'>-void finish_frontend(void);</div><div class='del'>-</div><div class='del'>-void error_message(char *msg, ...) __attribute__ ((format (printf, 1, 2))); /* blocking */</div><div class='del'>-void info_message(char *msg, ...) __attribute__ ((format (printf, 1, 2))); /* blocking */</div><div class='del'>-void wait_message(char *msg, ...) __attribute__ ((format (printf, 1, 2))); /* non-blocking */</div><div class='del'>-void remove_wait_message(void);</div><div class='del'>-</div><div class='del'>-void init_progression(char *msg, int size);</div><div class='del'>-void update_progression(int current_size);</div><div class='del'>-void end_progression(void);</div><div class='del'>-</div><div class='del'>-enum return_type ask_yes_no(char *msg);</div><div class='del'>-enum return_type ask_from_list(char *msg, char ** elems, char ** choice);</div><div class='del'>-enum return_type ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice);</div><div class='del'>-enum return_type ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size, void (*callback_func)(char ** strings));</div><div class='del'>-</div><div class='del'>-void suspend_to_console(void);</div><div class='del'>-void resume_from_suspend(void);</div><div class='del'>-</div><div class='del'>-void verror_message(char *msg, va_list ap);</div><div class='del'>-void vinfo_message(char *msg, va_list ap);</div><div class='del'>-void vwait_message(char *msg, va_list ap);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/init-data/emptyboot.img.bz2 b/mdk-stage1/init-data/emptyboot.img.bz2<br/>deleted file mode 100644<br/>index 6ae939c1b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-data/emptyboot.img.bz2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-data/emptyboot.img.bz2</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/mdk-stage1/init-data/msgboot-blank.img.bz2 b/mdk-stage1/init-data/msgboot-blank.img.bz2<br/>deleted file mode 100644<br/>index a572093d9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-data/msgboot-blank.img.bz2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-data/msgboot-blank.img.bz2</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2 b/mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2<br/>deleted file mode 100644<br/>index 9d5d276fb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-data/msgboot-graphicallogo-2880.img.bz2</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/mdk-stage1/init-data/msgboot-graphicallogo.img.bz2 b/mdk-stage1/init-data/msgboot-graphicallogo.img.bz2<br/>deleted file mode 100644<br/>index 1ec92be76..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-data/msgboot-graphicallogo.img.bz2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-data/msgboot-graphicallogo.img.bz2</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/mdk-stage1/init-data/msgboot.img.bz2 b/mdk-stage1/init-data/msgboot.img.bz2<br/>deleted file mode 100644<br/>index e06018f11..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-data/msgboot.img.bz2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-data/msgboot.img.bz2</a><br/>+++ /dev/null</div>Binary files differ<div class='head'>diff --git a/mdk-stage1/init-libc-headers.h b/mdk-stage1/init-libc-headers.h<br/>deleted file mode 100644<br/>index 01761e869..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init-libc-headers.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init-libc-headers.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,44 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;linux/un.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;sys/resource.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-#include &lt;sys/select.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef SOCK_STREAM</div><div class='del'>-#define SOCK_STREAM 1</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static inline _syscall3(int, syslog, int, type, char *, bufp, int, len);</div><div class='del'>-static inline _syscall3(int, reboot, int, magic, int, magic2, int, flag);</div><div class='head'>diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c<br/>deleted file mode 100644<br/>index dc4239ac3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/init.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/init.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,468 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef INIT_HEADERS</div><div class='del'>-#include "init-libc-headers.h"</div><div class='del'>-#else</div><div class='del'>-#include INIT_HEADERS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "config-stage1.h"</div><div class='del'>-</div><div class='del'>-#if defined(__powerpc__)</div><div class='del'>-#define TIOCSCTTY     0x540</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-char * env[] = {</div><div class='del'>-	"PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sbin:/mnt/usr/sbin:/mnt/bin:/mnt/usr/bin",</div><div class='del'>-	"LD_LIBRARY_PATH=/lib:/usr/lib:/mnt/lib:/mnt/usr/lib:/usr/X11R6/lib:/mnt/usr/X11R6/lib",</div><div class='del'>-	"HOME=/",</div><div class='del'>-	"TERM=linux",</div><div class='del'>-	"TERMINFO=/etc/terminfo",</div><div class='del'>-	NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * this needs to handle the following cases:</div><div class='del'>- *</div><div class='del'>- *	1) run from a CD root filesystem</div><div class='del'>- *	2) run from a read only nfs rooted filesystem</div><div class='del'>- *      3) run from a floppy</div><div class='del'>- *	4) run from a floppy that's been loaded into a ramdisk </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int testing;</div><div class='del'>-int klog_pid;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void fatal_error(char *msg)</div><div class='del'>-{</div><div class='del'>-	printf("FATAL ERROR IN INIT: %s\n\nI can't recover from this, please reboot manually and send bugreport.\n", msg);</div><div class='del'>-	while (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void print_error(char *msg)</div><div class='del'>-{</div><div class='del'>-	printf("E: %s\n", msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void print_warning(char *msg)</div><div class='del'>-{</div><div class='del'>-	printf("W: %s\n", msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void print_int_init(int fd, int i)</div><div class='del'>-{</div><div class='del'>-	char buf[10];</div><div class='del'>-	char * chptr = buf + 9;</div><div class='del'>-	int j = 0;</div><div class='del'>-	</div><div class='del'>-	if (i &lt; 0)</div><div class='del'>-	{</div><div class='del'>-		write(1, "-", 1);</div><div class='del'>-		i = -1 * i;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	while (i)</div><div class='del'>-	{</div><div class='del'>-		*chptr-- = '0' + (i % 10);</div><div class='del'>-		j++;</div><div class='del'>-		i = i / 10;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	write(fd, chptr + 1, j);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void print_str_init(int fd, char * string)</div><div class='del'>-{</div><div class='del'>-	write(fd, string, strlen(string));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* fork to:</div><div class='del'>- *   (1) watch /proc/kmsg and copy the stuff to /dev/tty4</div><div class='del'>- *   (2) listens to /dev/log and copy also this stuff (log from programs)</div><div class='del'>- */</div><div class='del'>-void doklog()</div><div class='del'>-{</div><div class='del'>-	fd_set readset, unixs;</div><div class='del'>-	int in, out, i;</div><div class='del'>-	int log;</div><div class='del'>-	int s;</div><div class='del'>-	int sock = -1;</div><div class='del'>-	struct sockaddr_un sockaddr;</div><div class='del'>-	char buf[1024];</div><div class='del'>-	int readfd;</div><div class='del'>-</div><div class='del'>-	/* open kernel message logger */</div><div class='del'>-	in = open("/proc/kmsg", O_RDONLY,0);</div><div class='del'>-	if (in &lt; 0) {</div><div class='del'>-		print_error("could not open /proc/kmsg");</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((log = open("/tmp/syslog", O_WRONLY | O_CREAT, 0644)) &lt; 0) {</div><div class='del'>-		print_error("error opening /tmp/syslog");</div><div class='del'>-		sleep(5);</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((klog_pid = fork())) {</div><div class='del'>-		close(in);</div><div class='del'>-		close(log);</div><div class='del'>-		return;</div><div class='del'>-	} else {</div><div class='del'>-		close(0); </div><div class='del'>-		close(1);</div><div class='del'>-		close(2);</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	out = open("/dev/tty4", O_WRONLY, 0);</div><div class='del'>-	if (out &lt; 0) </div><div class='del'>-		print_warning("couldn't open tty for syslog -- still using /tmp/syslog\n");</div><div class='del'>-</div><div class='del'>-	/* now open the syslog socket */</div><div class='del'>-// ############# LINUX 2.4 /dev/log IS BUGGED! --&gt; apparently the syslogs can't reach me, and it's full up after a while</div><div class='del'>-//	  sockaddr.sun_family = AF_UNIX;</div><div class='del'>-//	  strncpy(sockaddr.sun_path, "/dev/log", UNIX_PATH_MAX);</div><div class='del'>-//	  sock = socket(AF_UNIX, SOCK_STREAM, 0);</div><div class='del'>-//	  if (sock &lt; 0) {</div><div class='del'>-//		  printf("error creating socket: %d\n", errno);</div><div class='del'>-//		  sleep(5);</div><div class='del'>-//	  }</div><div class='del'>-//</div><div class='del'>-//	  print_str_init(log, "] got socket\n");</div><div class='del'>-//	  if (bind(sock, (struct sockaddr *) &amp;sockaddr, sizeof(sockaddr.sun_family) + strlen(sockaddr.sun_path)))	{</div><div class='del'>-//		  print_str_init(log, "] bind error: ");</div><div class='del'>-//		  print_int_init(log, errno);</div><div class='del'>-//		  print_str_init(log, "\n");</div><div class='del'>-//		  sleep(//	  }</div><div class='del'>-//</div><div class='del'>-//	  print_str_init(log, "] bound socket\n");</div><div class='del'>-//	  chmod("/dev/log", 0666);</div><div class='del'>-//	  if (listen(sock, 5)) {</div><div class='del'>-//		  print_str_init(log, "] listen error: ");</div><div class='del'>-//		  print_int_init(log, errno);</div><div class='del'>-//		  print_str_init(log, "\n");</div><div class='del'>-//		  sleep(5);</div><div class='del'>-//	  }</div><div class='del'>-</div><div class='del'>-	/* disable on-console syslog output */</div><div class='del'>-	syslog(8, NULL, 1);</div><div class='del'>-</div><div class='del'>-	print_str_init(log, "] kernel/system logger ok\n");</div><div class='del'>-	FD_ZERO(&amp;unixs);</div><div class='del'>-	while (1) {</div><div class='del'>-		memcpy(&amp;readset, &amp;unixs, sizeof(unixs));</div><div class='del'>-</div><div class='del'>-		if (sock &gt;= 0)</div><div class='del'>-			FD_SET(sock, &amp;readset);</div><div class='del'>-		FD_SET(in, &amp;readset);</div><div class='del'>-		</div><div class='del'>-		i = select(20, &amp;readset, NULL, NULL, NULL);</div><div class='del'>-		if (i &lt;= 0)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		/* has /proc/kmsg things to tell us? */</div><div class='del'>-		if (FD_ISSET(in, &amp;readset)) {</div><div class='del'>-			i = read(in, buf, sizeof(buf));</div><div class='del'>-			if (i &gt; 0) {</div><div class='del'>-				if (out &gt;= 0)</div><div class='del'>-					write(out, buf, i);</div><div class='del'>-				write(log, buf, i);</div><div class='del'>-			}</div><div class='del'>-		} </div><div class='del'>-</div><div class='del'>-		/* examine some fd's in the hope to find some syslog outputs from programs */</div><div class='del'>-		for (readfd = 0; readfd &lt; 20; ++readfd) {</div><div class='del'>-			if (FD_ISSET(readfd, &amp;readset) &amp;&amp; FD_ISSET(readfd, &amp;unixs)) {</div><div class='del'>-				i = read(readfd, buf, sizeof(buf));</div><div class='del'>-				if (i &gt; 0) {</div><div class='del'>-					/* grep out the output of RPM telling that it installed/removed some packages */</div><div class='del'>-					if (!strstr(buf, "mdk installed") &amp;&amp; !strstr(buf, "mdk removed")) {</div><div class='del'>-						if (out &gt;= 0)</div><div class='del'>-							write(out, buf, i);</div><div class='del'>-						write(log, buf, i);</div><div class='del'>-					}</div><div class='del'>-				} else if (i == 0) {</div><div class='del'>-					/* socket closed */</div><div class='del'>-					close(readfd);</div><div class='del'>-					FD_CLR(readfd, &amp;unixs);</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* the socket has moved, new stuff to do */</div><div class='del'>-		if (sock &gt;= 0 &amp;&amp; FD_ISSET(sock, &amp;readset)) {</div><div class='del'>-			s = sizeof(sockaddr);</div><div class='del'>-			readfd = accept(sock, (struct sockaddr *) &amp;sockaddr, &amp;s);</div><div class='del'>-			if (readfd &lt; 0) {</div><div class='del'>-				char * msg_error = "] error in accept\n";</div><div class='del'>-				if (out &gt;= 0)</div><div class='del'>-					write(out, msg_error, strlen(msg_error));</div><div class='del'>-				write(log, msg_error, strlen(msg_error));</div><div class='del'>-				close(sock);</div><div class='del'>-				sock = -1;</div><div class='del'>-			}</div><div class='del'>-			else</div><div class='del'>-				FD_SET(readfd, &amp;unixs);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define LOOP_CLR_FD	0x4C01</div><div class='del'>-</div><div class='del'>-void del_loop(char *device) </div><div class='del'>-{</div><div class='del'>-	int fd;</div><div class='del'>-	if ((fd = open(device, O_RDONLY, 0)) &lt; 0) {</div><div class='del'>-		printf("del_loop open failed\n");</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(fd, LOOP_CLR_FD, 0) &lt; 0) {</div><div class='del'>-		printf("del_loop ioctl failed");</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close(fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct filesystem</div><div class='del'>-{</div><div class='del'>-	char * dev;</div><div class='del'>-	char * name;</div><div class='del'>-	char * fs;</div><div class='del'>-	int mounted;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* attempt to unmount all filesystems in /proc/mounts */</div><div class='del'>-void unmount_filesystems(void)</div><div class='del'>-{</div><div class='del'>-	int fd, size;</div><div class='del'>-	char buf[65535];			/* this should be big enough */</div><div class='del'>-	char *p;</div><div class='del'>-	struct filesystem fs[500];</div><div class='del'>-	int numfs = 0;</div><div class='del'>-	int i, nb;</div><div class='del'>-	</div><div class='del'>-	printf("unmounting filesystems...\n"); </div><div class='del'>-	</div><div class='del'>-	fd = open("/proc/mounts", O_RDONLY, 0);</div><div class='del'>-	if (fd &lt; 1) {</div><div class='del'>-		print_error("failed to open /proc/mounts");</div><div class='del'>-		sleep(2);</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	size = read(fd, buf, sizeof(buf) - 1);</div><div class='del'>-	buf[size] = '\0';</div><div class='del'>-</div><div class='del'>-	close(fd);</div><div class='del'>-</div><div class='del'>-	p = buf;</div><div class='del'>-	while (*p) {</div><div class='del'>-		fs[numfs].mounted = 1;</div><div class='del'>-		fs[numfs].dev = p;</div><div class='del'>-		while (*p != ' ') p++;</div><div class='del'>-		*p++ = '\0';</div><div class='del'>-		fs[numfs].name = p;</div><div class='del'>-		while (*p != ' ') p++;</div><div class='del'>-		*p++ = '\0';</div><div class='del'>-		fs[numfs].fs = p;</div><div class='del'>-		while (*p != ' ') p++;</div><div class='del'>-		*p++ = '\0';</div><div class='del'>-		while (*p != '\n') p++;</div><div class='del'>-		p++;</div><div class='del'>-		if (strcmp(fs[numfs].name, "/") != 0) numfs++; /* skip if root, no need to take initrd root in account */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Pixel's ultra-optimized sorting algorithm:</div><div class='del'>-	   multiple passes trying to umount everything until nothing moves</div><div class='del'>-	   anymore (a.k.a holy shotgun method) */</div><div class='del'>-	do {</div><div class='del'>-		nb = 0;</div><div class='del'>-		for (i = 0; i &lt; numfs; i++) {</div><div class='del'>-			/*printf("trying with %s\n", fs[i].name);*/</div><div class='del'>-			if (fs[i].mounted &amp;&amp; umount(fs[i].name) == 0) { </div><div class='del'>-				if (strncmp(fs[i].dev + sizeof("/dev/") - 1, "loop",</div><div class='del'>-					    sizeof("loop") - 1) == 0)</div><div class='del'>-					del_loop(fs[i].dev);</div><div class='del'>-				</div><div class='del'>-				printf("\t%s\n", fs[i].name);</div><div class='del'>-				fs[i].mounted = 0;</div><div class='del'>-				nb++;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	} while (nb);</div><div class='del'>-	</div><div class='del'>-	for (i = nb = 0; i &lt; numfs; i++)</div><div class='del'>-		if (fs[i].mounted) {</div><div class='del'>-			printf("\t%s umount failed\n", fs[i].name);</div><div class='del'>-			if (strcmp(fs[i].fs, "ext2") == 0) nb++; /* don't count not-ext2 umount failed */</div><div class='del'>-		}</div><div class='del'>-	</div><div class='del'>-	if (nb) {</div><div class='del'>-		printf("failed to umount some filesystems\n");</div><div class='del'>-		while (1);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int exit_value_rescue = 66;</div><div class='del'>-</div><div class='del'>-int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-	pid_t installpid, childpid;</div><div class='del'>-	int wait_status;</div><div class='del'>-	int fd;</div><div class='del'>-	int abnormal_termination = 0;</div><div class='del'>-	int end_stage2 = 0;</div><div class='del'>-</div><div class='del'>-	/* getpid() != 1 should work, by linuxrc tends to get a larger pid */</div><div class='del'>-	testing = (getpid() &gt; 50);</div><div class='del'>-</div><div class='del'>-	if (!testing) {</div><div class='del'>-		/* turn off screen blanking */</div><div class='del'>-		printf("\033[9;0]");</div><div class='del'>-		printf("\033[8]");</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-		printf("*** TESTING MODE ***\n");</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	printf("\n\t\t\t\033[1;40mWelcome to \033[1;36mMandrake\033[0;39m Linux\n\n");</div><div class='del'>-	</div><div class='del'>-	if (!testing) {</div><div class='del'>-		if (mount("/proc", "/proc", "proc", 0, NULL))</div><div class='del'>-			fatal_error("Unable to mount proc filesystem");</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-</div><div class='del'>-	/* ignore Control-C and keyboard stop signals */</div><div class='del'>-	signal(SIGINT, SIG_IGN);</div><div class='del'>-	signal(SIGTSTP, SIG_IGN);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if (!testing) {</div><div class='del'>-		fd = open("/dev/tty1", O_RDWR, 0);</div><div class='del'>-		if (fd &lt; 0)</div><div class='del'>-			/* try with devfs */</div><div class='del'>-			fd = open("/dev/vc/1", O_RDWR, 0);</div><div class='del'>-		</div><div class='del'>-		if (fd &lt; 0)</div><div class='del'>-			fatal_error("failed to open /dev/tty1 and /dev/vc/1");</div><div class='del'>-		</div><div class='del'>-		dup2(fd, 0);</div><div class='del'>-		dup2(fd, 1);</div><div class='del'>-		dup2(fd, 2);</div><div class='del'>-		close(fd);</div><div class='del'>-	}</div><div class='del'>-		</div><div class='del'>-</div><div class='del'>-	/* I set me up as session leader (probably not necessary?) */</div><div class='del'>-	setsid();</div><div class='del'>-	if (ioctl(0, TIOCSCTTY, NULL))</div><div class='del'>-		print_error("could not set new controlling tty");</div><div class='del'>-</div><div class='del'>-	if (!testing) {</div><div class='del'>-		char my_hostname[] = "localhost.localdomain";</div><div class='del'>-		sethostname(my_hostname, sizeof(my_hostname));</div><div class='del'>-		/* the default domainname (as of 2.0.35) is "(none)", which confuses </div><div class='del'>-		   glibc */</div><div class='del'>-		setdomainname("", 0);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!testing) </div><div class='del'>-		doklog();</div><div class='del'>-</div><div class='del'>-	/* Go into normal init mode - keep going, and then do a orderly shutdown</div><div class='del'>-	   when:</div><div class='del'>-	   </div><div class='del'>-	   1) install exits</div><div class='del'>-	   2) we receive a SIGHUP </div><div class='del'>-	*/</div><div class='del'>-</div><div class='del'>-	printf("If more people were to meet doing raklets, this planet\n");</div><div class='del'>-	printf("would be a safer place.\n");</div><div class='del'>-	printf("\n");</div><div class='del'>-	printf("Running install...\n"); </div><div class='del'>-	</div><div class='del'>-	if (!(installpid = fork())) {</div><div class='del'>-		/* child */</div><div class='del'>-		char * child_argv[2];</div><div class='del'>-		child_argv[0] = "/sbin/stage1";</div><div class='del'>-		child_argv[1] = NULL;</div><div class='del'>-</div><div class='del'>-		execve(child_argv[0], child_argv, env);</div><div class='del'>-		printf("error in exec of stage1 :-(\n");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (!end_stage2) {</div><div class='del'>-		childpid = wait4(-1, &amp;wait_status, 0, NULL);</div><div class='del'>-		if (childpid == installpid)</div><div class='del'>-			end_stage2 = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 &amp;&amp; WEXITSTATUS(wait_status) != exit_value_rescue)) {</div><div class='del'>-		printf("install exited abnormally :-( ");</div><div class='del'>-		if (WIFSIGNALED(wait_status))</div><div class='del'>-			printf("-- received signal %d", WTERMSIG(wait_status));</div><div class='del'>-		printf("\n");</div><div class='del'>-		abnormal_termination = 1;</div><div class='del'>-	} else if (WIFEXITED(wait_status) &amp;&amp; WEXITSTATUS(wait_status) == exit_value_rescue) {</div><div class='del'>-		kill(klog_pid, 9);</div><div class='del'>-		printf("exiting init -- giving hand to rescue\n");</div><div class='del'>-		return 0;</div><div class='del'>-        } else</div><div class='del'>-		printf("install succeeded\n");</div><div class='del'>-</div><div class='del'>-	if (testing)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	sync(); sync();</div><div class='del'>-</div><div class='del'>-	printf("sending termination signals...");</div><div class='del'>-	kill(-1, 15);</div><div class='del'>-	sleep(2);</div><div class='del'>-	printf("done\n");</div><div class='del'>-</div><div class='del'>-	printf("sending kill signals...");</div><div class='del'>-	kill(-1, 9);</div><div class='del'>-	sleep(2);</div><div class='del'>-	printf("done\n");</div><div class='del'>-</div><div class='del'>-	unmount_filesystems();</div><div class='del'>-</div><div class='del'>-	if (!abnormal_termination) {</div><div class='del'>-		printf("rebooting system\n");</div><div class='del'>-		sleep(2);</div><div class='del'>-		reboot(0xfee1dead, 672274793, 0x01234567);</div><div class='del'>-	} else {</div><div class='del'>-		printf("you may safely reboot your system\n");</div><div class='del'>-		while (1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/.cvsignore b/mdk-stage1/insmod-busybox/.cvsignore<br/>deleted file mode 100644<br/>index 26a2c08c9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2 +0,0 @@</div><div class='del'>-insmod</div><div class='del'>-insmod-DIET</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/Config.h b/mdk-stage1/insmod-busybox/Config.h<br/>deleted file mode 100644<br/>index 8388416b7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/Config.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/Config.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,132 +0,0 @@</div><div class='del'>-/* vi: set sw=4 ts=4: */</div><div class='del'>-// This file defines the feature set to be compiled into busybox.</div><div class='del'>-// When you turn things off here, they won't be compiled in at all.</div><div class='del'>-//</div><div class='del'>-//// This file is parsed by sed. You MUST use single line comments.</div><div class='del'>-//   i.e.  //#define BB_BLAH</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-// BusyBox Applications</div><div class='del'>-#define BB_INSMOD</div><div class='del'>-// End of Applications List</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-// ---------------------------------------------------------</div><div class='del'>-// This is where feature definitions go.  Generally speaking,</div><div class='del'>-// turning this stuff off makes things a bit smaller (and less </div><div class='del'>-// pretty/useful).</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,</div><div class='del'>-// thereby eliminating the need for the /proc filesystem and thereby saving</div><div class='del'>-// lots and lots memory for more important things.  You can not use this and</div><div class='del'>-// USE_PROCFS at the same time...  NOTE:  If you enable this feature, you</div><div class='del'>-// _must_ have patched the kernel to include the devps patch that is included</div><div class='del'>-// in the busybox/kernel-patches directory.  You will also need to create some</div><div class='del'>-// device special files in /dev on your embedded system:</div><div class='del'>-//        mknod /dev/mtab c 10 22</div><div class='del'>-//        mknod /dev/ps c 10 21</div><div class='del'>-// I emailed Linus and this patch will not be going into the stock kernel.</div><div class='del'>-//#define BB_FEATURE_USE_DEVPS_PATCH</div><div class='del'>-//</div><div class='del'>-// enable features that use the /proc filesystem (apps that </div><div class='del'>-// break without this will tell you on compile)...</div><div class='del'>-// You can't use this and BB_FEATURE_USE_DEVPS_PATCH </div><div class='del'>-// at the same time...</div><div class='del'>-#define BB_FEATURE_USE_PROCFS</div><div class='del'>-</div><div class='del'>-//</div><div class='del'>-// Enable tab completion in the shell (not yet </div><div class='del'>-// working very well -- so don't turn this on)</div><div class='del'>-//#define BB_FEATURE_SH_TAB_COMPLETION</div><div class='del'>-//</div><div class='del'>-//Turn on extra fbset options</div><div class='del'>-//#define BB_FEATURE_FBSET_FANCY</div><div class='del'>-//</div><div class='del'>-//Turn on fbset readmode support</div><div class='del'>-//#define BB_FEATURE_FBSET_READMODE</div><div class='del'>-//</div><div class='del'>-// You must enable one or both of these features</div><div class='del'>-// Support installing modules from pre 2.1 kernels</div><div class='del'>-//#define BB_FEATURE_INSMOD_OLD_KERNEL</div><div class='del'>-// Support installing modules from kernel versions after 2.1.18</div><div class='del'>-#define BB_FEATURE_INSMOD_NEW_KERNEL</div><div class='del'>-//</div><div class='del'>-// Support module version checking</div><div class='del'>-//#define BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-//</div><div class='del'>-// Support for Minix filesystem, version 2</div><div class='del'>-//#define BB_FEATURE_MINIX2</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-// Enable busybox --install [-s]</div><div class='del'>-// to create links (or symlinks) for all the commands that are </div><div class='del'>-// compiled into the binary.  (needs /proc filesystem)</div><div class='del'>-// #define BB_FEATURE_INSTALLER</div><div class='del'>-//</div><div class='del'>-// Clean up all memory before exiting -- usually not needed</div><div class='del'>-// as the OS can clean up...  Don't enable this unless you</div><div class='del'>-// have a really good reason for cleaning things up manually.</div><div class='del'>-//#define BB_FEATURE_CLEAN_UP</div><div class='del'>-//</div><div class='del'>-// End of Features List</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//</div><div class='del'>-//---------------------------------------------------</div><div class='del'>-// Nothing beyond this point should ever be touched by </div><div class='del'>-// mere mortals so leave this stuff alone.</div><div class='del'>-//</div><div class='del'>-#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT</div><div class='del'>-#define BB_MTAB</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#if defined BB_FEATURE_SH_COMMAND_EDITING &amp;&amp; defined BB_SH</div><div class='del'>-#define BB_CMDEDIT</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#ifdef BB_KILLALL</div><div class='del'>-#ifndef BB_KILL</div><div class='del'>-#define BB_KILL</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#ifdef BB_FEATURE_LINUXRC</div><div class='del'>-#ifndef BB_INIT</div><div class='del'>-#define BB_INIT</div><div class='del'>-#endif</div><div class='del'>-#define BB_LINUXRC</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#ifdef BB_GZIP</div><div class='del'>-#ifndef BB_GUNZIP</div><div class='del'>-#define BB_GUNZIP</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#if defined BB_MOUNT &amp;&amp; defined BB_FEATURE_NFSMOUNT</div><div class='del'>-#define BB_NFSMOUNT</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#if defined BB_FEATURE_SH_COMMAND_EDITING</div><div class='del'>-#ifndef BB_FEATURE_USE_TERMIOS</div><div class='del'>-#define BB_FEATURE_USE_TERMIOS</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#if defined BB_FEATURE_AUTOWIDTH</div><div class='del'>-#ifndef BB_FEATURE_USE_TERMIOS</div><div class='del'>-#define BB_FEATURE_USE_TERMIOS</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-//</div><div class='del'>-#if defined BB_INSMOD</div><div class='del'>-#ifndef BB_FEATURE_INSMOD_OLD_KERNEL</div><div class='del'>-#define BB_FEATURE_INSMOD_NEW_KERNEL</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/Makefile b/mdk-stage1/insmod-busybox/Makefile<br/>deleted file mode 100644<br/>index c8649ae0d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,65 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    insmod from busybox (i386 only)</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Copyright (C) 1999,2000 by Lineo, inc.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: insmod insmod-DIET libinsmod.a libinsmod-DIET.a</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o insmod insmod-DIET libinsmod.a libinsmod-DIET.a</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-FLAGS = -c -Wall -Os -fomit-frame-pointer -D_GNU_SOURCE -DBB_VER='"0.47"' -DBB_BT='"2000.12.06-14:02+0000"'</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-insmod: insmod-frontend.o insmod.o utility-standalone.o</div><div class='del'>-	gcc -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-insmod-DIET: insmod-frontend-DIET.o insmod-DIET.o utility-standalone-DIET.o</div><div class='del'>-	gcc $(DIETLIBC_LDFLAGS_STAGE1) -o $@ $^ $(DIETLIBC_LIBC)</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-libinsmod.a: insmod.o utility.o</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-libinsmod-DIET.a: insmod-DIET.o utility-DIET.o</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-insmod-frontend.o: insmod-frontend.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(GLIBC_INCLUDES) insmod-frontend.c</div><div class='del'>-</div><div class='del'>-insmod-frontend-DIET.o: insmod-frontend.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(DIETLIBC_INCLUDES) -o $@ insmod-frontend.c</div><div class='del'>-</div><div class='del'>-utility.o: utility.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(GLIBC_INCLUDES) utility.c</div><div class='del'>-</div><div class='del'>-utility-DIET.o: utility.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(DIETLIBC_INCLUDES) -o $@ utility.c</div><div class='del'>-</div><div class='del'>-utility-standalone.o: utility.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(GLIBC_INCLUDES) -o $@ -D_STANDALONE_ utility.c</div><div class='del'>-</div><div class='del'>-utility-standalone-DIET.o: utility.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(DIETLIBC_INCLUDES) -o $@ -D_STANDALONE_ utility.c</div><div class='del'>-</div><div class='del'>-insmod.o: insmod.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(GLIBC_INCLUDES) insmod.c</div><div class='del'>-</div><div class='del'>-insmod-DIET.o: insmod.c busybox.h</div><div class='del'>-	gcc $(FLAGS) $(DIETLIBC_INCLUDES) -o $@ insmod.c</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/README b/mdk-stage1/insmod-busybox/README<br/>deleted file mode 100644<br/>index 06695074a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,8 +0,0 @@</div><div class='del'>-This insmod code comes from busybox-0.47</div><div class='del'>-</div><div class='del'>-ftp://ftp.lineo.com/pub/busybox</div><div class='del'>-</div><div class='del'>-It is cool but works only for ix86 architecture.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-gc</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/busybox.h b/mdk-stage1/insmod-busybox/busybox.h<br/>deleted file mode 100644<br/>index a2d620c8b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/busybox.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/busybox.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,467 +0,0 @@</div><div class='del'>-/* vi: set sw=4 ts=4: */</div><div class='del'>-/*</div><div class='del'>- * Busybox main internal header file</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify</div><div class='del'>- * it under the terms of the GNU General Public License as published by</div><div class='del'>- * the Free Software Foundation; either version 2 of the License, or</div><div class='del'>- * (at your option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful,</div><div class='del'>- * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</div><div class='del'>- *</div><div class='del'>- * Based in part on code from sash, Copyright (c) 1999 by David I. Bell </div><div class='del'>- * Permission has been granted to redistribute this code under the GPL.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-#ifndef	_BB_INTERNAL_H_</div><div class='del'>-#define	_BB_INTERNAL_H_    1</div><div class='del'>-</div><div class='del'>-#include "Config.h"</div><div class='del'>-</div><div class='del'>-#ifdef DMALLOC</div><div class='del'>-#include "dmalloc.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-/* for the _syscall() macros */</div><div class='del'>-#include &lt;sys/syscall.h&gt;</div><div class='del'>-#include &lt;linux/unistd.h&gt;</div><div class='del'>-#include &lt;linux/kernel.h&gt;</div><div class='del'>-</div><div class='del'>-/* Some useful definitions */</div><div class='del'>-#define FALSE   ((int) 1)</div><div class='del'>-#define TRUE    ((int) 0)</div><div class='del'>-</div><div class='del'>-/* for mtab.c */</div><div class='del'>-#define MTAB_GETMOUNTPT '1'</div><div class='del'>-#define MTAB_GETDEVICE  '2'</div><div class='del'>-</div><div class='del'>-#define BUF_SIZE        8192</div><div class='del'>-#define EXPAND_ALLOC    1024</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define isBlank(ch)     (((ch) == ' ') || ((ch) == '\t'))</div><div class='del'>-#define isDecimal(ch)   (((ch) &gt;= '0') &amp;&amp; ((ch) &lt;= '9'))</div><div class='del'>-#define isOctal(ch)     (((ch) &gt;= '0') &amp;&amp; ((ch) &lt;= '7'))</div><div class='del'>-#define isWildCard(ch)  (((ch) == '*') || ((ch) == '?') || ((ch) == '['))</div><div class='del'>-</div><div class='del'>-/* Macros for min/max.  */</div><div class='del'>-#ifndef MIN</div><div class='del'>-#define	MIN(a,b) (((a)&lt;(b))?(a):(b))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef MAX</div><div class='del'>-#define	MAX(a,b) (((a)&gt;(b))?(a):(b))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* I don't like nested includes, but the string and io functions are used</div><div class='del'>- * too often</div><div class='del'>- */</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#if !defined(NO_STRING_H) || defined(STDC_HEADERS)</div><div class='del'>-#  include &lt;string.h&gt;</div><div class='del'>-#  if !defined(STDC_HEADERS) &amp;&amp; !defined(NO_MEMORY_H) &amp;&amp; !defined(__GNUC__)</div><div class='del'>-#    include &lt;memory.h&gt;</div><div class='del'>-#  endif</div><div class='del'>-#  define memzero(s, n)     memset ((void *)(s), 0, (n))</div><div class='del'>-#else</div><div class='del'>-#  include &lt;strings.h&gt;</div><div class='del'>-#  define strchr            index</div><div class='del'>-#  define strrchr           rindex</div><div class='del'>-#  define memcpy(d, s, n)   bcopy((s), (d), (n))</div><div class='del'>-#  define memcmp(s1, s2, n) bcmp((s1), (s2), (n))</div><div class='del'>-#  define memzero(s, n)     bzero((s), (n))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum Location {</div><div class='del'>-	_BB_DIR_ROOT = 0,</div><div class='del'>-	_BB_DIR_BIN,</div><div class='del'>-	_BB_DIR_SBIN,</div><div class='del'>-	_BB_DIR_USR_BIN,</div><div class='del'>-	_BB_DIR_USR_SBIN</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct BB_applet {</div><div class='del'>-	const	char*	name;</div><div class='del'>-	int	(*main)(int argc, char** argv);</div><div class='del'>-	enum	Location	location;</div><div class='del'>-	const	char*	usage;</div><div class='del'>-};</div><div class='del'>-/* From busybox.c */</div><div class='del'>-extern const struct BB_applet applets[];</div><div class='del'>-</div><div class='del'>-extern int ar_main(int argc, char **argv);</div><div class='del'>-extern int basename_main(int argc, char **argv);</div><div class='del'>-extern int bogomips_main(int argc, char **argv);</div><div class='del'>-extern int busybox_main(int argc, char** argv);</div><div class='del'>-extern int cat_main(int argc, char** argv);</div><div class='del'>-extern int chmod_chown_chgrp_main(int argc, char** argv);</div><div class='del'>-extern int chroot_main(int argc, char** argv);</div><div class='del'>-extern int chvt_main(int argc, char** argv);</div><div class='del'>-extern int clear_main(int argc, char** argv);</div><div class='del'>-extern int cp_mv_main(int argc, char** argv);</div><div class='del'>-extern int cut_main(int argc, char** argv);</div><div class='del'>-extern int date_main(int argc, char** argv);</div><div class='del'>-extern int dc_main(int argc, char** argv);</div><div class='del'>-extern int dd_main(int argc, char** argv);</div><div class='del'>-extern int dirname_main(int argc, char** argv);</div><div class='del'>-extern int deallocvt_main(int argc, char** argv);</div><div class='del'>-extern int df_main(int argc, char** argv);</div><div class='del'>-extern int dmesg_main(int argc, char** argv);</div><div class='del'>-extern int dos2unix_main(int argc, char** argv);</div><div class='del'>-extern int du_main(int argc, char** argv);</div><div class='del'>-extern int dumpkmap_main(int argc, char** argv);</div><div class='del'>-extern int dutmp_main(int argc, char** argv);</div><div class='del'>-extern int echo_main(int argc, char** argv);</div><div class='del'>-extern int expr_main(int argc, char** argv);</div><div class='del'>-extern int false_main(int argc, char** argv);</div><div class='del'>-extern int fbset_main(int argc, char** argv);</div><div class='del'>-extern int fdisk_main(int argc, char** argv);</div><div class='del'>-extern int fdflush_main(int argc, char **argv);</div><div class='del'>-extern int fsck_minix_main(int argc, char **argv);</div><div class='del'>-extern int find_main(int argc, char** argv);</div><div class='del'>-extern int free_main(int argc, char** argv);</div><div class='del'>-extern int freeramdisk_main(int argc, char** argv);</div><div class='del'>-extern int getopt_main(int argc, char** argv);</div><div class='del'>-extern int grep_main(int argc, char** argv);</div><div class='del'>-extern int gunzip_main (int argc, char** argv);</div><div class='del'>-extern int gzip_main(int argc, char** argv);</div><div class='del'>-extern int halt_main(int argc, char** argv);</div><div class='del'>-extern int head_main(int argc, char** argv);</div><div class='del'>-extern int hostid_main(int argc, char** argv);</div><div class='del'>-extern int hostname_main(int argc, char** argv);</div><div class='del'>-extern int id_main(int argc, char** argv);</div><div class='del'>-extern int init_main(int argc, char** argv);</div><div class='del'>-extern int insmod_main(int argc, char** argv);</div><div class='del'>-extern int kill_main(int argc, char** argv);</div><div class='del'>-extern int length_main(int argc, char** argv);</div><div class='del'>-extern int ln_main(int argc, char** argv);</div><div class='del'>-extern int loadacm_main(int argc, char** argv);</div><div class='del'>-extern int loadfont_main(int argc, char** argv);</div><div class='del'>-extern int loadkmap_main(int argc, char** argv);</div><div class='del'>-extern int losetup_main(int argc, char** argv);</div><div class='del'>-extern int logger_main(int argc, char **argv);</div><div class='del'>-extern int logname_main(int argc, char **argv);</div><div class='del'>-extern int ls_main(int argc, char** argv);</div><div class='del'>-extern int lsmod_main(int argc, char** argv);</div><div class='del'>-extern int makedevs_main(int argc, char** argv);</div><div class='del'>-extern int md5sum_main(int argc, char** argv);</div><div class='del'>-extern int mkdir_main(int argc, char** argv);</div><div class='del'>-extern int mkfifo_main(int argc, char **argv);</div><div class='del'>-extern int mkfs_minix_main(int argc, char **argv);</div><div class='del'>-extern int mknod_main(int argc, char** argv);</div><div class='del'>-extern int mkswap_main(int argc, char** argv);</div><div class='del'>-extern int mktemp_main(int argc, char **argv);</div><div class='del'>-extern int nc_main(int argc, char** argv);</div><div class='del'>-extern int more_main(int argc, char** argv);</div><div class='del'>-extern int mount_main(int argc, char** argv);</div><div class='del'>-extern int mt_main(int argc, char** argv);</div><div class='del'>-extern int nslookup_main(int argc, char **argv);</div><div class='del'>-extern int ping_main(int argc, char **argv);</div><div class='del'>-extern int poweroff_main(int argc, char **argv);</div><div class='del'>-extern int printf_main(int argc, char** argv);</div><div class='del'>-extern int ps_main(int argc, char** argv);</div><div class='del'>-extern int pwd_main(int argc, char** argv);</div><div class='del'>-extern int rdate_main(int argc, char** argv);</div><div class='del'>-extern int reboot_main(int argc, char** argv);</div><div class='del'>-extern int renice_main(int argc, char** argv);</div><div class='del'>-extern int reset_main(int argc, char** argv);</div><div class='del'>-extern int rm_main(int argc, char** argv);</div><div class='del'>-extern int rmdir_main(int argc, char **argv);</div><div class='del'>-extern int rmmod_main(int argc, char** argv);</div><div class='del'>-extern int sed_main(int argc, char** argv);</div><div class='del'>-extern int sfdisk_main(int argc, char** argv);</div><div class='del'>-extern int setkeycodes_main(int argc, char** argv);</div><div class='del'>-extern int shell_main(int argc, char** argv);</div><div class='del'>-extern int sleep_main(int argc, char** argv);</div><div class='del'>-extern int sort_main(int argc, char** argv);</div><div class='del'>-extern int swap_on_off_main(int argc, char** argv);</div><div class='del'>-extern int sync_main(int argc, char** argv);</div><div class='del'>-extern int syslogd_main(int argc, char **argv);</div><div class='del'>-extern int tail_main(int argc, char** argv);</div><div class='del'>-extern int tar_main(int argc, char** argv);</div><div class='del'>-extern int tee_main(int argc, char** argv);</div><div class='del'>-extern int test_main(int argc, char** argv);</div><div class='del'>-extern int telnet_main(int argc, char** argv);</div><div class='del'>-extern int touch_main(int argc, char** argv);</div><div class='del'>-extern int tr_main(int argc, char** argv);</div><div class='del'>-extern int true_main(int argc, char** argv);</div><div class='del'>-extern int tput_main(int argc, char** argv);</div><div class='del'>-extern int tryopen_main(int argc, char** argv);</div><div class='del'>-extern int tty_main(int argc, char** argv);</div><div class='del'>-extern int umount_main(int argc, char** argv);</div><div class='del'>-extern int uname_main(int argc, char** argv);</div><div class='del'>-extern int uniq_main(int argc, char** argv);</div><div class='del'>-extern int unix2dos_main(int argc, char** argv);</div><div class='del'>-extern int unrpm_main(int argc, char** argv);</div><div class='del'>-extern int update_main(int argc, char** argv);</div><div class='del'>-extern int uptime_main(int argc, char** argv);</div><div class='del'>-extern int usleep_main(int argc, char** argv);</div><div class='del'>-extern int uuencode_main(int argc, char** argv);</div><div class='del'>-extern int uudecode_main(int argc, char** argv);</div><div class='del'>-extern int wc_main(int argc, char** argv);</div><div class='del'>-extern int wget_main(int argc, char** argv);</div><div class='del'>-extern int which_main(int argc, char** argv);</div><div class='del'>-extern int whoami_main(int argc, char** argv);</div><div class='del'>-extern int xargs_main(int argc, char** argv);</div><div class='del'>-extern int yes_main(int argc, char** argv);</div><div class='del'>-</div><div class='del'>-extern const char ar_usage[];</div><div class='del'>-extern const char basename_usage[];</div><div class='del'>-extern const char cat_usage[];</div><div class='del'>-extern const char chgrp_usage[];</div><div class='del'>-extern const char chmod_usage[];</div><div class='del'>-extern const char chown_usage[];</div><div class='del'>-extern const char chroot_usage[];</div><div class='del'>-extern const char chvt_usage[];</div><div class='del'>-extern const char clear_usage[];</div><div class='del'>-extern const char cp_usage[];</div><div class='del'>-extern const char cut_usage[];</div><div class='del'>-extern const char date_usage[];</div><div class='del'>-extern const char dc_usage[];</div><div class='del'>-extern const char dd_usage[];</div><div class='del'>-extern const char deallocvt_usage[];</div><div class='del'>-extern const char df_usage[];</div><div class='del'>-extern const char dirname_usage[];</div><div class='del'>-extern const char dmesg_usage[];</div><div class='del'>-extern const char dos2unix_usage[];</div><div class='del'>-extern const char du_usage[];</div><div class='del'>-extern const char dumpkmap_usage[];</div><div class='del'>-extern const char dutmp_usage[];</div><div class='del'>-extern const char echo_usage[];</div><div class='del'>-extern const char expr_usage[];</div><div class='del'>-extern const char false_usage[];</div><div class='del'>-extern const char fdflush_usage[];</div><div class='del'>-extern const char find_usage[];</div><div class='del'>-extern const char free_usage[];</div><div class='del'>-extern const char freeramdisk_usage[];</div><div class='del'>-extern const char fsck_minix_usage[];</div><div class='del'>-extern const char grep_usage[];</div><div class='del'>-extern const char gunzip_usage[];</div><div class='del'>-extern const char gzip_usage[];</div><div class='del'>-extern const char halt_usage[];</div><div class='del'>-extern const char head_usage[];</div><div class='del'>-extern const char hostid_usage[];</div><div class='del'>-extern const char hostname_usage[];</div><div class='del'>-extern const char id_usage[];</div><div class='del'>-extern const char insmod_usage[];</div><div class='del'>-extern const char kill_usage[];</div><div class='del'>-extern const char killall_usage[];</div><div class='del'>-extern const char length_usage[];</div><div class='del'>-extern const char ln_usage[];</div><div class='del'>-extern const char loadacm_usage[];</div><div class='del'>-extern const char loadfont_usage[];</div><div class='del'>-extern const char loadkmap_usage[];</div><div class='del'>-extern const char logger_usage[];</div><div class='del'>-extern const char logname_usage[];</div><div class='del'>-extern const char ls_usage[];</div><div class='del'>-extern const char lsmod_usage[];</div><div class='del'>-extern const char makedevs_usage[];</div><div class='del'>-extern const char md5sum_usage[];</div><div class='del'>-extern const char mkdir_usage[];</div><div class='del'>-extern const char mkfifo_usage[];</div><div class='del'>-extern const char mkfs_minix_usage[];</div><div class='del'>-extern const char mknod_usage[];</div><div class='del'>-extern const char mkswap_usage[];</div><div class='del'>-extern const char mktemp_usage[];</div><div class='del'>-extern const char more_usage[];</div><div class='del'>-extern const char mount_usage[]; </div><div class='del'>-extern const char mt_usage[];</div><div class='del'>-extern const char mv_usage[];</div><div class='del'>-extern const char nc_usage[];</div><div class='del'>-extern const char nslookup_usage[];</div><div class='del'>-extern const char ping_usage[];</div><div class='del'>-extern const char poweroff_usage[];</div><div class='del'>-extern const char printf_usage[];</div><div class='del'>-extern const char ps_usage[];</div><div class='del'>-extern const char pwd_usage[];</div><div class='del'>-extern const char rdate_usage[];</div><div class='del'>-extern const char reboot_usage[];</div><div class='del'>-extern const char renice_usage[];</div><div class='del'>-extern const char reset_usage[];</div><div class='del'>-extern const char rm_usage[];</div><div class='del'>-extern const char rmdir_usage[];</div><div class='del'>-extern const char rmmod_usage[];</div><div class='del'>-extern const char sed_usage[];</div><div class='del'>-extern const char setkeycodes_usage[];</div><div class='del'>-extern const char shell_usage[];</div><div class='del'>-extern const char sleep_usage[];</div><div class='del'>-extern const char sort_usage[];</div><div class='del'>-extern const char swapoff_usage[];</div><div class='del'>-extern const char swapon_usage[];</div><div class='del'>-extern const char sync_usage[];</div><div class='del'>-extern const char syslogd_usage[];</div><div class='del'>-extern const char tail_usage[];</div><div class='del'>-extern const char tar_usage[];</div><div class='del'>-extern const char tee_usage[];</div><div class='del'>-extern const char telnet_usage[];</div><div class='del'>-extern const char test_usage[];</div><div class='del'>-extern const char touch_usage[];</div><div class='del'>-extern const char tr_usage[];</div><div class='del'>-extern const char true_usage[];</div><div class='del'>-extern const char tty_usage[];</div><div class='del'>-extern const char umount_usage[];</div><div class='del'>-extern const char uname_usage[];</div><div class='del'>-extern const char uniq_usage[];</div><div class='del'>-extern const char unix2dos_usage[];</div><div class='del'>-extern const char unrpm_usage[];</div><div class='del'>-extern const char update_usage[];</div><div class='del'>-extern const char uptime_usage[];</div><div class='del'>-extern const char usleep_usage[];</div><div class='del'>-extern const char uudecode_usage[];</div><div class='del'>-extern const char uuencode_usage[];</div><div class='del'>-extern const char wc_usage[];</div><div class='del'>-extern const char wget_usage[];</div><div class='del'>-extern const char which_usage[];</div><div class='del'>-extern const char whoami_usage[];</div><div class='del'>-extern const char xargs_usage[];</div><div class='del'>-extern const char yes_usage[];</div><div class='del'>-</div><div class='del'>-extern const char *applet_name;</div><div class='del'>-</div><div class='del'>-extern void usage(const char *usage) __attribute__ ((noreturn));</div><div class='del'>-extern void errorMsg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));</div><div class='del'>-extern void logperror(char *s);</div><div class='del'>-extern void fatalError(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));</div><div class='del'>-</div><div class='del'>-const char *modeString(int mode);</div><div class='del'>-const char *timeString(time_t timeVal);</div><div class='del'>-int isDirectory(const char *name, const int followLinks, struct stat *statBuf);</div><div class='del'>-int isDevice(const char *name);</div><div class='del'>-</div><div class='del'>-typedef struct ino_dev_hash_bucket_struct {</div><div class='del'>-  struct ino_dev_hash_bucket_struct *next;</div><div class='del'>-  ino_t ino;</div><div class='del'>-  dev_t dev;</div><div class='del'>-  char name[1];</div><div class='del'>-} ino_dev_hashtable_bucket_t;</div><div class='del'>-int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);</div><div class='del'>-void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);</div><div class='del'>-void reset_ino_dev_hashtable(void);</div><div class='del'>-</div><div class='del'>-int copyFile(const char *srcName, const char *destName,</div><div class='del'>-		 int setModes, int followLinks, int forceFlag);</div><div class='del'>-int copySubFile(int srcFd, int dstFd, size_t remaining);</div><div class='del'>-char *buildName(const char *dirName, const char *fileName);</div><div class='del'>-int makeString(int argc, const char **argv, char *buf, int bufLen);</div><div class='del'>-char *getChunk(int size);</div><div class='del'>-char *chunkstrdup(const char *str);</div><div class='del'>-void freeChunks(void);</div><div class='del'>-int fullWrite(int fd, const char *buf, int len);</div><div class='del'>-int fullRead(int fd, char *buf, int len);</div><div class='del'>-int recursiveAction(const char *fileName, int recurse, int followLinks, int depthFirst,</div><div class='del'>-	  int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData),</div><div class='del'>-	  int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData),</div><div class='del'>-	  void* userData);</div><div class='del'>-</div><div class='del'>-extern int createPath (const char *name, int mode);</div><div class='del'>-extern int parse_mode( const char* s, mode_t* theMode);</div><div class='del'>-</div><div class='del'>-extern int get_kernel_revision(void);</div><div class='del'>-</div><div class='del'>-extern int get_console_fd(char* tty_name);</div><div class='del'>-extern struct mntent *findMountPoint(const char *name, const char *table);</div><div class='del'>-extern void write_mtab(char* blockDevice, char* directory, </div><div class='del'>-	char* filesystemType, long flags, char* string_flags);</div><div class='del'>-extern void erase_mtab(const char * name);</div><div class='del'>-extern void mtab_read(void);</div><div class='del'>-extern char *mtab_first(void **iter);</div><div class='del'>-extern char *mtab_next(void **iter);</div><div class='del'>-extern char *mtab_getinfo(const char *match, const char which);</div><div class='del'>-extern int check_wildcard_match(const char* text, const char* pattern);</div><div class='del'>-extern long getNum (const char *cp);</div><div class='del'>-extern pid_t* findPidByName( char* pidName);</div><div class='del'>-extern int find_real_root_device_name(char* name);</div><div class='del'>-extern char *get_line_from_file(FILE *file);</div><div class='del'>-extern void print_file(FILE *file);</div><div class='del'>-extern int print_file_by_name(char *filename);</div><div class='del'>-extern char process_escape_sequence(char **ptr);</div><div class='del'>-extern char *get_last_path_component(char *path);</div><div class='del'>-// extern void xregcomp(regex_t *preg, const char *regex, int cflags);</div><div class='del'>-</div><div class='del'>-#ifndef DMALLOC </div><div class='del'>-extern void *xmalloc (size_t size);</div><div class='del'>-extern void *xrealloc(void *old, size_t size);</div><div class='del'>-extern void *xcalloc(size_t nmemb, size_t size);</div><div class='del'>-extern char *xstrdup (const char *s);</div><div class='del'>-#endif</div><div class='del'>-extern char *xstrndup (const char *s, int n);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* These parse entries in /etc/passwd and /etc/group.  This is desirable</div><div class='del'>- * for BusyBox since we want to avoid using the glibc NSS stuff, which</div><div class='del'>- * increases target size and is often not needed embedded systems.  */</div><div class='del'>-extern long my_getpwnam(char *name);</div><div class='del'>-extern long my_getgrnam(char *name);</div><div class='del'>-extern void my_getpwuid(char *name, long uid);</div><div class='del'>-extern void my_getgrgid(char *group, long gid);</div><div class='del'>-extern long my_getpwnamegid(char *name);</div><div class='del'>-</div><div class='del'>-extern int device_open(char *device, int mode);</div><div class='del'>-</div><div class='del'>-#if defined BB_FEATURE_MOUNT_LOOP</div><div class='del'>-extern int del_loop(const char *device);</div><div class='del'>-extern int set_loop(const char *device, const char *file, int offset, int *loopro);</div><div class='del'>-extern char *find_unused_loop_device (void);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if (__GLIBC__ &lt; 2) &amp;&amp; (defined BB_SYSLOGD || defined BB_INIT)</div><div class='del'>-extern int vdprintf(int d, const char *format, va_list ap);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_NFSMOUNT</div><div class='del'>-int nfsmount(const char *spec, const char *node, int *flags,</div><div class='del'>-	     char **extra_opts, char **mount_opts, int running_bg);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef RB_POWER_OFF</div><div class='del'>-/* Stop system and switch power off if possible.  */</div><div class='del'>-#define RB_POWER_OFF   0x4321fedc</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Include our own copy of struct sysinfo to avoid binary compatability</div><div class='del'>- * problems with Linux 2.4, which changed things.  Grumble, grumble. */</div><div class='del'>-//struct sysinfo {</div><div class='del'>-//	  long uptime;			/* Seconds since boot */</div><div class='del'>-//	  unsigned long loads[3];		/* 1, 5, and 15 minute load averages */</div><div class='del'>-//	  unsigned long totalram;		/* Total usable main memory size */</div><div class='del'>-//	  unsigned long freeram;		/* Available memory size */</div><div class='del'>-//	  unsigned long sharedram;	/* Amount of shared memory */</div><div class='del'>-//	  unsigned long bufferram;	/* Memory used by buffers */</div><div class='del'>-//	  unsigned long totalswap;	/* Total swap space size */</div><div class='del'>-//	  unsigned long freeswap;		/* swap space still available */</div><div class='del'>-//	  unsigned short procs;		/* Number of current processes */</div><div class='del'>-//	  unsigned long totalhigh;	/* Total high memory size */</div><div class='del'>-//	  unsigned long freehigh;		/* Available high memory size */</div><div class='del'>-//	  unsigned int mem_unit;		/* Memory unit size in bytes */</div><div class='del'>-//	  char _f[20-2*sizeof(long)-sizeof(int)];	/* Padding: libc5 uses this.. */</div><div class='del'>-//};</div><div class='del'>-extern int sysinfo (struct sysinfo* info);</div><div class='del'>-</div><div class='del'>-/* Bit map related macros -- libc5 doens't provide these... sigh.  */</div><div class='del'>-#ifndef setbit</div><div class='del'>-#define NBBY            CHAR_BIT</div><div class='del'>-#define setbit(a,i)     ((a)[(i)/NBBY] |= 1&lt;&lt;((i)%NBBY))</div><div class='del'>-#define clrbit(a,i)     ((a)[(i)/NBBY] &amp;= ~(1&lt;&lt;((i)%NBBY)))</div><div class='del'>-#define isset(a,i)      ((a)[(i)/NBBY] &amp; (1&lt;&lt;((i)%NBBY)))</div><div class='del'>-#define isclr(a,i)      (((a)[(i)/NBBY] &amp; (1&lt;&lt;((i)%NBBY))) == 0)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _BB_INTERNAL_H_ */</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/insmod-frontend.c b/mdk-stage1/insmod-busybox/insmod-frontend.c<br/>deleted file mode 100644<br/>index 3e5d6b3d7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/insmod-frontend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/insmod-frontend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int insmod_main( int argc, char **argv);</div><div class='del'>-</div><div class='del'>-int main( int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	printf("Using insmod provided by busybox.\n");</div><div class='del'>-	return insmod_main(argc, argv);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/insmod.c b/mdk-stage1/insmod-busybox/insmod.c<br/>deleted file mode 100644<br/>index bdf7ba5f7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/insmod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/insmod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2951 +0,0 @@</div><div class='del'>-/* vi: set sw=4 ts=4: */</div><div class='del'>-/*</div><div class='del'>- * Mini insmod implementation for busybox</div><div class='del'>- *</div><div class='del'>- * Copyright (C) 1999,2000 by Lineo, inc.</div><div class='del'>- * Written by Erik Andersen &lt;andersen@lineo.com&gt;</div><div class='del'>- * and Ron Alder &lt;alder@lineo.com&gt;</div><div class='del'>- *</div><div class='del'>- * Modified by Bryan Rittmeyer &lt;bryan@ixiacom.com&gt; to support SH4</div><div class='del'>- * and (theoretically) SH3. Note that there is still no true</div><div class='del'>- * multiple architecture support. You just get SH3|SH4|i386, despite</div><div class='del'>- * the mention of ARM and m68k--which may or may not work (but</div><div class='del'>- * almost certainly do not, due to at least MATCH_MACHINE). I have</div><div class='del'>- * only tested SH4 in little endian mode.</div><div class='del'>- *</div><div class='del'>- * Based almost entirely on the Linux modutils-2.3.11 implementation.</div><div class='del'>- *   Copyright 1996, 1997 Linux International.</div><div class='del'>- *   New implementation contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>- *   Based on original work by Bjorn Ekwall &lt;bj0rn@blox.se&gt;</div><div class='del'>- *   Restructured (and partly rewritten) by:</div><div class='del'>- *   Björn Ekwall &lt;bj0rn@blox.se&gt; February 1999</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify</div><div class='del'>- * it under the terms of the GNU General Public License as published by</div><div class='del'>- * the Free Software Foundation; either version 2 of the License, or</div><div class='del'>- * (at your option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful,</div><div class='del'>- * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include "../insmod.h"</div><div class='del'>-#include "busybox.h"</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-//--------modutils module.h, lines 45-242</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-/* Definitions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_MODULE_H</div><div class='del'>-#define MODUTILS_MODULE_H 1</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-/* This file contains the structures used by the 2.0 and 2.1 kernels.</div><div class='del'>-   We do not use the kernel headers directly because we do not wish</div><div class='del'>-   to be dependant on a particular kernel version to compile insmod.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The structures used by Linux 2.0.  */</div><div class='del'>-</div><div class='del'>-/* The symbol format used by get_kernel_syms(2).  */</div><div class='del'>-struct old_kernel_sym</div><div class='del'>-{</div><div class='del'>-  unsigned long value;</div><div class='del'>-  char name[60];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module_ref</div><div class='del'>-{</div><div class='del'>-  unsigned long module;		/* kernel addresses */</div><div class='del'>-  unsigned long next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module_symbol</div><div class='del'>-{</div><div class='del'>-  unsigned long addr;</div><div class='del'>-  unsigned long name;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_symbol_table</div><div class='del'>-{</div><div class='del'>-  int size;			/* total, including string table!!! */</div><div class='del'>-  int n_symbols;</div><div class='del'>-  int n_refs;</div><div class='del'>-  struct old_module_symbol symbol[0]; /* actual size defined by n_symbols */</div><div class='del'>-  struct old_module_ref ref[0];	/* actual size defined by n_refs */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_mod_routines</div><div class='del'>-{</div><div class='del'>-  unsigned long init;</div><div class='del'>-  unsigned long cleanup;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module</div><div class='del'>-{</div><div class='del'>-  unsigned long next;</div><div class='del'>-  unsigned long ref;		/* the list of modules that refer to me */</div><div class='del'>-  unsigned long symtab;</div><div class='del'>-  unsigned long name;</div><div class='del'>-  int size;			/* size of module in pages */</div><div class='del'>-  unsigned long addr;		/* address of module */</div><div class='del'>-  int state;</div><div class='del'>-  unsigned long cleanup;	/* cleanup routine */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Sent to init_module(2) or'ed into the code size parameter.  */</div><div class='del'>-#define OLD_MOD_AUTOCLEAN 0x40000000 /* big enough, but no sign problems... */</div><div class='del'>-</div><div class='del'>-int get_kernel_syms(struct old_kernel_sym *);</div><div class='del'>-int old_sys_init_module(const char *name, char *code, unsigned codesize,</div><div class='del'>-			struct old_mod_routines *, struct old_symbol_table *);</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* For sizeof() which are related to the module platform and not to the</div><div class='del'>-   environment isnmod is running in, use sizeof_xx instead of sizeof(xx).  */</div><div class='del'>-</div><div class='del'>-#define tgt_sizeof_char		sizeof(char)</div><div class='del'>-#define tgt_sizeof_short	sizeof(short)</div><div class='del'>-#define tgt_sizeof_int		sizeof(int)</div><div class='del'>-#define tgt_sizeof_long		sizeof(long)</div><div class='del'>-#define tgt_sizeof_char_p	sizeof(char *)</div><div class='del'>-#define tgt_sizeof_void_p	sizeof(void *)</div><div class='del'>-#define tgt_long		long</div><div class='del'>-</div><div class='del'>-#if defined(__sparc__) &amp;&amp; !defined(__sparc_v9__) &amp;&amp; defined(ARCH_sparc64)</div><div class='del'>-#undef tgt_sizeof_long</div><div class='del'>-#undef tgt_sizeof_char_p</div><div class='del'>-#undef tgt_sizeof_void_p</div><div class='del'>-#undef tgt_long</div><div class='del'>-#define tgt_sizeof_long		8</div><div class='del'>-#define tgt_sizeof_char_p	8</div><div class='del'>-#define tgt_sizeof_void_p	8</div><div class='del'>-#define tgt_long		long long</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The structures used in Linux 2.1.  */</div><div class='del'>-</div><div class='del'>-/* Note: new_module_symbol does not use tgt_long intentionally */</div><div class='del'>-struct new_module_symbol</div><div class='del'>-{</div><div class='del'>-  unsigned long value;</div><div class='del'>-  unsigned long name;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct new_module_persist;</div><div class='del'>-</div><div class='del'>-struct new_module_ref</div><div class='del'>-{</div><div class='del'>-  unsigned tgt_long dep;		/* kernel addresses */</div><div class='del'>-  unsigned tgt_long ref;</div><div class='del'>-  unsigned tgt_long next_ref;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct new_module</div><div class='del'>-{</div><div class='del'>-  unsigned tgt_long size_of_struct;	/* == sizeof(module) */</div><div class='del'>-  unsigned tgt_long next;</div><div class='del'>-  unsigned tgt_long name;</div><div class='del'>-  unsigned tgt_long size;</div><div class='del'>-</div><div class='del'>-  tgt_long usecount;</div><div class='del'>-  unsigned tgt_long flags;		/* AUTOCLEAN et al */</div><div class='del'>-</div><div class='del'>-  unsigned nsyms;</div><div class='del'>-  unsigned ndeps;</div><div class='del'>-</div><div class='del'>-  unsigned tgt_long syms;</div><div class='del'>-  unsigned tgt_long deps;</div><div class='del'>-  unsigned tgt_long refs;</div><div class='del'>-  unsigned tgt_long init;</div><div class='del'>-  unsigned tgt_long cleanup;</div><div class='del'>-  unsigned tgt_long ex_table_start;</div><div class='del'>-  unsigned tgt_long ex_table_end;</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-  unsigned tgt_long gp;</div><div class='del'>-#endif</div><div class='del'>-  /* Everything after here is extension.  */</div><div class='del'>-  unsigned tgt_long persist_start;</div><div class='del'>-  unsigned tgt_long persist_end;</div><div class='del'>-  unsigned tgt_long can_unload;</div><div class='del'>-  unsigned tgt_long runsize;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct new_module_info</div><div class='del'>-{</div><div class='del'>-  unsigned long addr;</div><div class='del'>-  unsigned long size;</div><div class='del'>-  unsigned long flags;</div><div class='del'>-	   long usecount;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Bits of module.flags.  */</div><div class='del'>-#define NEW_MOD_RUNNING		1</div><div class='del'>-#define NEW_MOD_DELETED		2</div><div class='del'>-#define NEW_MOD_AUTOCLEAN	4</div><div class='del'>-#define NEW_MOD_VISITED		8</div><div class='del'>-#define NEW_MOD_USED_ONCE	16</div><div class='del'>-</div><div class='del'>-int new_sys_init_module(const char *name, const struct new_module *);</div><div class='del'>-int query_module(const char *name, int which, void *buf, size_t bufsize,</div><div class='del'>-		 size_t *ret);</div><div class='del'>-</div><div class='del'>-/* Values for query_module's which.  */</div><div class='del'>-</div><div class='del'>-#define QM_MODULES	1</div><div class='del'>-#define QM_DEPS		2</div><div class='del'>-#define QM_REFS		3</div><div class='del'>-#define QM_SYMBOLS	4</div><div class='del'>-#define QM_INFO		5</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The system calls unchanged between 2.0 and 2.1.  */</div><div class='del'>-</div><div class='del'>-unsigned long create_module(const char *, size_t);</div><div class='del'>-int delete_module(const char *);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif /* module.h */</div><div class='del'>-</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-//--------end of modutils module.h</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-//--------modutils obj.h, lines 253-462</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-/* Elf object file loading and relocation routines.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_OBJ_H</div><div class='del'>-#define MODUTILS_OBJ_H 1</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-/* The relocatable object is manipulated using elfin types.  */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;elf.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Machine-specific elf macros for i386 et al.  */</div><div class='del'>-</div><div class='del'>-/* the SH changes have only been tested on the SH4 in =little endian= mode */</div><div class='del'>-/* I'm not sure about big endian, so let's warn: */</div><div class='del'>-</div><div class='del'>-#if (defined(__SH4__) || defined(__SH3__)) &amp;&amp; defined(__BIG_ENDIAN__)</div><div class='del'>-#error insmod.c may require changes for use on big endian SH4/SH3</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* it may or may not work on the SH1/SH2... So let's error on those</div><div class='del'>-   also */</div><div class='del'>-#if (defined(__sh__) &amp;&amp; (!(defined(__SH3__) || defined(__SH4__))))</div><div class='del'>-#error insmod.c may require changes for non-SH3/SH4 use</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x) (x == EM_SH)</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-/* presumably we can use these for anything but the SH */</div><div class='del'>-/* this is the previous behavior, but it does result in</div><div class='del'>-   insmod.c being broken on anything except i386 */</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_386)</div><div class='del'>-#define SHT_RELM	SHT_REL</div><div class='del'>-#define Elf32_RelM	Elf32_Rel</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef ElfW</div><div class='del'>-# if ELFCLASSM == ELFCLASS32</div><div class='del'>-#  define ElfW(x)  Elf32_ ## x</div><div class='del'>-#  define ELFW(x)  ELF32_ ## x</div><div class='del'>-# else</div><div class='del'>-#  define ElfW(x)  Elf64_ ## x</div><div class='del'>-#  define ELFW(x)  ELF64_ ## x</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* For some reason this is missing from libc5.  */</div><div class='del'>-#ifndef ELF32_ST_INFO</div><div class='del'>-# define ELF32_ST_INFO(bind, type)       (((bind) &lt;&lt; 4) + ((type) &amp; 0xf))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef ELF64_ST_INFO</div><div class='del'>-# define ELF64_ST_INFO(bind, type)       (((bind) &lt;&lt; 4) + ((type) &amp; 0xf))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct obj_string_patch;</div><div class='del'>-struct obj_symbol_patch;</div><div class='del'>-</div><div class='del'>-struct obj_section</div><div class='del'>-{</div><div class='del'>-  ElfW(Shdr) header;</div><div class='del'>-  const char *name;</div><div class='del'>-  char *contents;</div><div class='del'>-  struct obj_section *load_next;</div><div class='del'>-  int idx;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol *next;	/* hash table link */</div><div class='del'>-  const char *name;</div><div class='del'>-  unsigned long value;</div><div class='del'>-  unsigned long size;</div><div class='del'>-  int secidx;			/* the defining section index/module */</div><div class='del'>-  int info;</div><div class='del'>-  int ksymidx;			/* for export to the kernel symtab */</div><div class='del'>-  int referenced;		/* actually used in the link */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Hardcode the hash table size.  We shouldn't be needing so many</div><div class='del'>-   symbols that we begin to degrade performance, and we get a big win</div><div class='del'>-   by giving the compiler a constant divisor.  */</div><div class='del'>-</div><div class='del'>-#define HASH_BUCKETS  521</div><div class='del'>-</div><div class='del'>-struct obj_file</div><div class='del'>-{</div><div class='del'>-  ElfW(Ehdr) header;</div><div class='del'>-  ElfW(Addr) baseaddr;</div><div class='del'>-  struct obj_section **sections;</div><div class='del'>-  struct obj_section *load_order;</div><div class='del'>-  struct obj_section **load_order_search_start;</div><div class='del'>-  struct obj_string_patch *string_patches;</div><div class='del'>-  struct obj_symbol_patch *symbol_patches;</div><div class='del'>-  int (*symbol_cmp)(const char *, const char *);</div><div class='del'>-  unsigned long (*symbol_hash)(const char *);</div><div class='del'>-  unsigned long local_symtab_size;</div><div class='del'>-  struct obj_symbol **local_symtab;</div><div class='del'>-  struct obj_symbol *symtab[HASH_BUCKETS];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-{</div><div class='del'>-  obj_reloc_ok,</div><div class='del'>-  obj_reloc_overflow,</div><div class='del'>-  obj_reloc_dangerous,</div><div class='del'>-  obj_reloc_unhandled</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_string_patch</div><div class='del'>-{</div><div class='del'>-  struct obj_string_patch *next;</div><div class='del'>-  int reloc_secidx;</div><div class='del'>-  ElfW(Addr) reloc_offset;</div><div class='del'>-  ElfW(Addr) string_offset;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_symbol_patch</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol_patch *next;</div><div class='del'>-  int reloc_secidx;</div><div class='del'>-  ElfW(Addr) reloc_offset;</div><div class='del'>-  struct obj_symbol *sym;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Generic object manipulation routines.  */</div><div class='del'>-</div><div class='del'>-unsigned long obj_elf_hash(const char *);</div><div class='del'>-</div><div class='del'>-unsigned long obj_elf_hash_n(const char *, unsigned long len);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_add_symbol (struct obj_file *f, const char *name,</div><div class='del'>-				   unsigned long symidx, int info, int secidx,</div><div class='del'>-				   ElfW(Addr) value, unsigned long size);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_find_symbol (struct obj_file *f,</div><div class='del'>-					 const char *name);</div><div class='del'>-</div><div class='del'>-ElfW(Addr) obj_symbol_final_value(struct obj_file *f,</div><div class='del'>-				  struct obj_symbol *sym);</div><div class='del'>-</div><div class='del'>-void obj_set_symbol_compare(struct obj_file *f,</div><div class='del'>-			    int (*cmp)(const char *, const char *),</div><div class='del'>-			    unsigned long (*hash)(const char *));</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_find_section (struct obj_file *f,</div><div class='del'>-					   const char *name);</div><div class='del'>-</div><div class='del'>-void obj_insert_section_load_order (struct obj_file *f,</div><div class='del'>-				    struct obj_section *sec);</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section (struct obj_file *f,</div><div class='del'>-						const char *name,</div><div class='del'>-						unsigned long align,</div><div class='del'>-						unsigned long size);</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section_first (struct obj_file *f,</div><div class='del'>-						      const char *name,</div><div class='del'>-						      unsigned long align,</div><div class='del'>-						      unsigned long size);</div><div class='del'>-</div><div class='del'>-void *obj_extend_section (struct obj_section *sec, unsigned long more);</div><div class='del'>-</div><div class='del'>-int obj_string_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		     const char *string);</div><div class='del'>-</div><div class='del'>-int obj_symbol_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		     struct obj_symbol *sym);</div><div class='del'>-</div><div class='del'>-int obj_check_undefineds(struct obj_file *f);</div><div class='del'>-</div><div class='del'>-void obj_allocate_commons(struct obj_file *f);</div><div class='del'>-</div><div class='del'>-unsigned long obj_load_size (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-int obj_relocate (struct obj_file *f, ElfW(Addr) base);</div><div class='del'>-</div><div class='del'>-struct obj_file *obj_load(FILE *f);</div><div class='del'>-</div><div class='del'>-int obj_create_image (struct obj_file *f, char *image);</div><div class='del'>-</div><div class='del'>-/* Architecture specific manipulation routines.  */</div><div class='del'>-</div><div class='del'>-struct obj_file *arch_new_file (void);</div><div class='del'>-</div><div class='del'>-struct obj_section *arch_new_section (void);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *arch_new_symbol (void);</div><div class='del'>-</div><div class='del'>-enum obj_reloc arch_apply_relocation (struct obj_file *f,</div><div class='del'>-				      struct obj_section *targsec,</div><div class='del'>-				      struct obj_section *symsec,</div><div class='del'>-				      struct obj_symbol *sym,</div><div class='del'>-				      ElfW(RelM) *rel, ElfW(Addr) value);</div><div class='del'>-</div><div class='del'>-int arch_create_got (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-struct new_module;</div><div class='del'>-int arch_init_module (struct obj_file *f, struct new_module *);</div><div class='del'>-</div><div class='del'>-#endif /* obj.h */</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-//--------end of modutils obj.h</div><div class='del'>-//----------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define _PATH_MODULES	"/lib/modules"</div><div class='del'>-#define STRVERSIONLEN	32</div><div class='del'>-</div><div class='del'>-#if !defined(BB_FEATURE_INSMOD_NEW_KERNEL) &amp;&amp; !defined(BB_FEATURE_INSMOD_OLD_KERNEL)</div><div class='del'>-#error "Must have ether BB_FEATURE_INSMOD_NEW_KERNEL or BB_FEATURE_INSMOD_OLD_KERNEL defined"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-int flag_force_load = 1;</div><div class='del'>-int flag_autoclean = 0;</div><div class='del'>-int flag_export = 1;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* previously, these were named i386_* but since we could be</div><div class='del'>-   compiling for the sh, I've renamed them to the more general</div><div class='del'>-   arch_* These structures are the same between the x86 and SH, </div><div class='del'>-   and we can't support anything else right now anyway. In the</div><div class='del'>-   future maybe they should be #if defined'd */</div><div class='del'>-</div><div class='del'>-struct arch_got_entry {</div><div class='del'>-	int offset;</div><div class='del'>-	unsigned offset_done:1;</div><div class='del'>-	unsigned reloc_done:1;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct arch_file {</div><div class='del'>-	struct obj_file root;</div><div class='del'>-	struct obj_section *got;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct arch_symbol {</div><div class='del'>-	struct obj_symbol root;</div><div class='del'>-	struct arch_got_entry gotent;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct external_module {</div><div class='del'>-	const char *name;</div><div class='del'>-	ElfW(Addr) addr;</div><div class='del'>-	int used;</div><div class='del'>-	size_t nsyms;</div><div class='del'>-	struct new_module_symbol *syms;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct new_module_symbol *ksyms;</div><div class='del'>-size_t nksyms;</div><div class='del'>-</div><div class='del'>-struct external_module *ext_modules;</div><div class='del'>-int n_ext_modules;</div><div class='del'>-int n_ext_modules_used;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Some firendly syscalls to cheer everyone's day...  */</div><div class='del'>-#define __NR_new_sys_init_module  __NR_init_module</div><div class='del'>-_syscall2(int, new_sys_init_module, const char *, name,</div><div class='del'>-		  const struct new_module *, info)</div><div class='del'>-#define __NR_old_sys_init_module  __NR_init_module</div><div class='del'>-_syscall5(int, old_sys_init_module, const char *, name, char *, code,</div><div class='del'>-		  unsigned, codesize, struct old_mod_routines *, routines,</div><div class='del'>-		  struct old_symbol_table *, symtab)</div><div class='del'>-#ifndef BB_RMMOD</div><div class='del'>-_syscall1(int, delete_module, const char *, name)</div><div class='del'>-#else</div><div class='del'>-extern int delete_module(const char *);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* This is kind of troublesome. See, we don't actually support</div><div class='del'>-   the m68k or the arm the same way we support i386 and (now)</div><div class='del'>-   sh. In doing my SH patch, I just assumed that whatever works</div><div class='del'>-   for i386 also works for m68k and arm since currently insmod.c</div><div class='del'>-   does nothing special for them. If this isn't true, the below</div><div class='del'>-   line is rather misleading IMHO, and someone should either</div><div class='del'>-   change it or add more proper architecture-dependent support</div><div class='del'>-   for these boys.</div><div class='del'>-</div><div class='del'>-   -- Bryan Rittmeyer &lt;bryan@ixiacom.com&gt;                    */</div><div class='del'>-</div><div class='del'>-#if defined(__i386__) || defined(__m68k__) || defined(__arm__)</div><div class='del'>-/* Jump through hoops to fixup error return codes */</div><div class='del'>-#define __NR__create_module  __NR_create_module</div><div class='del'>-static inline _syscall2(long, _create_module, const char *, name, size_t,</div><div class='del'>-						size)</div><div class='del'>-unsigned long create_module(const char *name, size_t size)</div><div class='del'>-{</div><div class='del'>-	long ret = _create_module(name, size);</div><div class='del'>-</div><div class='del'>-	if (ret == -1 &amp;&amp; errno &gt; 125) {</div><div class='del'>-		ret = -errno;</div><div class='del'>-		errno = 0;</div><div class='del'>-	}</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-_syscall2(unsigned long, create_module, const char *, name, size_t, size)</div><div class='del'>-#endif</div><div class='del'>-static char m_filename[BUFSIZ + 1] = "\0";</div><div class='del'>-static char m_fullName[BUFSIZ + 1] = "\0";</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *arch_new_file(void)</div><div class='del'>-{</div><div class='del'>-	struct arch_file *f;</div><div class='del'>-	f = xmalloc(sizeof(*f));</div><div class='del'>-	f-&gt;got = NULL;</div><div class='del'>-	return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *arch_new_section(void)</div><div class='del'>-{</div><div class='del'>-	return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *arch_new_symbol(void)</div><div class='del'>-{</div><div class='del'>-	struct arch_symbol *sym;</div><div class='del'>-	sym = xmalloc(sizeof(*sym));</div><div class='del'>-	memset(&amp;sym-&gt;gotent, 0, sizeof(sym-&gt;gotent));</div><div class='del'>-	return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation(struct obj_file *f,</div><div class='del'>-					  struct obj_section *targsec,</div><div class='del'>-					  struct obj_section *symsec,</div><div class='del'>-					  struct obj_symbol *sym,</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-		                          Elf32_Rela * rel, Elf32_Addr v)</div><div class='del'>-#else</div><div class='del'>-					  Elf32_Rel * rel, Elf32_Addr v)</div><div class='del'>-#endif</div><div class='del'>-{</div><div class='del'>-	struct arch_file *ifile = (struct arch_file *) f;</div><div class='del'>-	struct arch_symbol *isym = (struct arch_symbol *) sym;</div><div class='del'>-</div><div class='del'>-	Elf32_Addr *loc = (Elf32_Addr *) (targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-	Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-	Elf32_Addr got = ifile-&gt;got ? ifile-&gt;got-&gt;header.sh_addr : 0;</div><div class='del'>-</div><div class='del'>-	enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-	switch (ELF32_R_TYPE(rel-&gt;r_info)) {</div><div class='del'>-</div><div class='del'>-/* even though these constants seem to be the same for</div><div class='del'>-   the i386 and the sh, we "#if define" them for clarity</div><div class='del'>-   and in case that ever changes */</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-	case R_SH_NONE:</div><div class='del'>-#else</div><div class='del'>-	case R_386_NONE:</div><div class='del'>-#endif</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-	case R_SH_DIR32:</div><div class='del'>-#else</div><div class='del'>-	case R_386_32:</div><div class='del'>-#endif</div><div class='del'>-		*loc += v;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-        case R_SH_REL32:</div><div class='del'>-#else</div><div class='del'>-	case R_386_PLT32:</div><div class='del'>-	case R_386_PC32:</div><div class='del'>-#endif</div><div class='del'>-		*loc += v - dot;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-        case R_SH_PLT32:</div><div class='del'>-                *loc = v - dot;</div><div class='del'>-                break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-        case R_SH_GLOB_DAT:</div><div class='del'>-        case R_SH_JMP_SLOT:</div><div class='del'>-               	*loc = v;</div><div class='del'>-                break;</div><div class='del'>-#else</div><div class='del'>-	case R_386_GLOB_DAT:</div><div class='del'>-	case R_386_JMP_SLOT:</div><div class='del'>-		*loc = v;</div><div class='del'>-		break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-        case R_SH_RELATIVE:</div><div class='del'>-	        *loc += f-&gt;baseaddr + rel-&gt;r_addend;</div><div class='del'>-                break;</div><div class='del'>-#else</div><div class='del'>-        case R_386_RELATIVE:</div><div class='del'>-		*loc += f-&gt;baseaddr;</div><div class='del'>-		break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-        case R_SH_GOTPC:</div><div class='del'>-		assert(got != 0);</div><div class='del'>-		*loc += got - dot + rel-&gt;r_addend;;</div><div class='del'>-		break;</div><div class='del'>-#else</div><div class='del'>-	case R_386_GOTPC:</div><div class='del'>-		assert(got != 0);</div><div class='del'>-		*loc += got - dot;</div><div class='del'>-		break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-	case R_SH_GOT32:</div><div class='del'>- 		assert(isym != NULL);</div><div class='del'>- 		if (!isym-&gt;gotent.reloc_done) {</div><div class='del'>- 			isym-&gt;gotent.reloc_done = 1;</div><div class='del'>- 			*(Elf32_Addr *) (ifile-&gt;got-&gt;contents + isym-&gt;gotent.offset) =</div><div class='del'>- 				v;</div><div class='del'>- 		}</div><div class='del'>-		*loc += isym-&gt;gotent.offset + rel-&gt;r_addend;</div><div class='del'>- 		break;</div><div class='del'>-#else</div><div class='del'>-	case R_386_GOT32:</div><div class='del'>-		assert(isym != NULL);</div><div class='del'>-		if (!isym-&gt;gotent.reloc_done) {</div><div class='del'>-			isym-&gt;gotent.reloc_done = 1;</div><div class='del'>-			*(Elf32_Addr *) (ifile-&gt;got-&gt;contents + isym-&gt;gotent.offset) =</div><div class='del'>-				v;</div><div class='del'>-		}</div><div class='del'>-		*loc += isym-&gt;gotent.offset;</div><div class='del'>-		break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-	case R_SH_GOTOFF:</div><div class='del'>-#else</div><div class='del'>-	case R_386_GOTOFF:</div><div class='del'>-#endif</div><div class='del'>-		assert(got != 0);</div><div class='del'>-		*loc += v - got;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-		ret = obj_reloc_unhandled;</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int arch_create_got(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct arch_file *ifile = (struct arch_file *) f;</div><div class='del'>-	int i, n, offset = 0, gotneeded = 0;</div><div class='del'>-</div><div class='del'>-	n = ifile-&gt;root.header.e_shnum;</div><div class='del'>-	for (i = 0; i &lt; n; ++i) {</div><div class='del'>-		struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-		Elf32_Rela *rel, *relend;</div><div class='del'>-#else</div><div class='del'>-		Elf32_Rel *rel, *relend;</div><div class='del'>-#endif</div><div class='del'>-		Elf32_Sym *symtab;</div><div class='del'>-		const char *strtab;</div><div class='del'>-</div><div class='del'>-		relsec = ifile-&gt;root.sections[i];</div><div class='del'>-		if (relsec-&gt;header.sh_type != SHT_REL)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		symsec = ifile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-		strsec = ifile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-		rel = (Elf32_Rela *) relsec-&gt;contents;</div><div class='del'>-		relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf32_Rela));</div><div class='del'>-#else</div><div class='del'>-		rel = (Elf32_Rel *) relsec-&gt;contents;</div><div class='del'>-		relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf32_Rel));</div><div class='del'>-#endif</div><div class='del'>-		symtab = (Elf32_Sym *) symsec-&gt;contents;</div><div class='del'>-		strtab = (const char *) strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-		for (; rel &lt; relend; ++rel) {</div><div class='del'>-			Elf32_Sym *extsym;</div><div class='del'>-			struct arch_symbol *intsym;</div><div class='del'>-			const char *name;</div><div class='del'>-</div><div class='del'>-			switch (ELF32_R_TYPE(rel-&gt;r_info)) {</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-			case R_SH_GOTPC:</div><div class='del'>-			case R_SH_GOTOFF:</div><div class='del'>-#else</div><div class='del'>-			case R_386_GOTPC:</div><div class='del'>-			case R_386_GOTOFF:</div><div class='del'>-#endif</div><div class='del'>-				gotneeded = 1;</div><div class='del'>-			default:</div><div class='del'>-				continue;</div><div class='del'>-</div><div class='del'>-#if defined(__sh__)</div><div class='del'>-			case R_SH_GOT32:</div><div class='del'>-#else</div><div class='del'>-			case R_386_GOT32:</div><div class='del'>-#endif</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			extsym = &amp;symtab[ELF32_R_SYM(rel-&gt;r_info)];</div><div class='del'>-			if (extsym-&gt;st_name)</div><div class='del'>-				name = strtab + extsym-&gt;st_name;</div><div class='del'>-			else</div><div class='del'>-				name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-			intsym =</div><div class='del'>-				(struct arch_symbol *) obj_find_symbol(&amp;ifile-&gt;root, name);</div><div class='del'>-</div><div class='del'>-			if (!intsym-&gt;gotent.offset_done) {</div><div class='del'>-				intsym-&gt;gotent.offset_done = 1;</div><div class='del'>-				intsym-&gt;gotent.offset = offset;</div><div class='del'>-				offset += 4;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (offset &gt; 0 || gotneeded)</div><div class='del'>-		ifile-&gt;got =</div><div class='del'>-			obj_create_alloced_section(&amp;ifile-&gt;root, ".got", 4, offset);</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int arch_init_module(struct obj_file *f, struct new_module *mod)</div><div class='del'>-{</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* Standard ELF hash function.  */</div><div class='del'>-inline unsigned long obj_elf_hash_n(const char *name, unsigned long n)</div><div class='del'>-{</div><div class='del'>-	unsigned long h = 0;</div><div class='del'>-	unsigned long g;</div><div class='del'>-	unsigned char ch;</div><div class='del'>-</div><div class='del'>-	while (n &gt; 0) {</div><div class='del'>-		ch = *name++;</div><div class='del'>-		h = (h &lt;&lt; 4) + ch;</div><div class='del'>-		if ((g = (h &amp; 0xf0000000)) != 0) {</div><div class='del'>-			h ^= g &gt;&gt; 24;</div><div class='del'>-			h &amp;= ~g;</div><div class='del'>-		}</div><div class='del'>-		n--;</div><div class='del'>-	}</div><div class='del'>-	return h;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long obj_elf_hash(const char *name)</div><div class='del'>-{</div><div class='del'>-	return obj_elf_hash_n(name, strlen(name));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-/* Get the kernel version in the canonical integer form.  */</div><div class='del'>-</div><div class='del'>-static int get_kernel_version(char str[STRVERSIONLEN])</div><div class='del'>-{</div><div class='del'>-	struct utsname uts_info;</div><div class='del'>-	char *p, *q;</div><div class='del'>-	int a, b, c;</div><div class='del'>-</div><div class='del'>-	if (uname(&amp;uts_info) &lt; 0)</div><div class='del'>-		return -1;</div><div class='del'>-	strncpy(str, uts_info.release, STRVERSIONLEN);</div><div class='del'>-	p = uts_info.release;</div><div class='del'>-</div><div class='del'>-	a = strtoul(p, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	b = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	c = strtoul(p + 1, &amp;q, 10);</div><div class='del'>-	if (p + 1 == q)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return a &lt;&lt; 16 | b &lt;&lt; 8 | c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* String comparison for non-co-versioned kernel and module.  */</div><div class='del'>-</div><div class='del'>-static int ncv_strcmp(const char *a, const char *b)</div><div class='del'>-{</div><div class='del'>-	size_t alen = strlen(a), blen = strlen(b);</div><div class='del'>-</div><div class='del'>-	if (blen == alen + 10 &amp;&amp; b[alen] == '_' &amp;&amp; b[alen + 1] == 'R')</div><div class='del'>-		return strncmp(a, b, alen);</div><div class='del'>-	else if (alen == blen + 10 &amp;&amp; a[blen] == '_' &amp;&amp; a[blen + 1] == 'R')</div><div class='del'>-		return strncmp(a, b, blen);</div><div class='del'>-	else</div><div class='del'>-		return strcmp(a, b);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* String hashing for non-co-versioned kernel and module.  Here</div><div class='del'>-   we are simply forced to drop the crc from the hash.  */</div><div class='del'>-</div><div class='del'>-static unsigned long ncv_symbol_hash(const char *str)</div><div class='del'>-{</div><div class='del'>-	size_t len = strlen(str);</div><div class='del'>-	if (len &gt; 10 &amp;&amp; str[len - 10] == '_' &amp;&amp; str[len - 9] == 'R')</div><div class='del'>-		len -= 10;</div><div class='del'>-	return obj_elf_hash_n(str, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_set_symbol_compare(struct obj_file *f,</div><div class='del'>-					   int (*cmp) (const char *, const char *),</div><div class='del'>-					   unsigned long (*hash) (const char *))</div><div class='del'>-{</div><div class='del'>-	if (cmp)</div><div class='del'>-		f-&gt;symbol_cmp = cmp;</div><div class='del'>-	if (hash) {</div><div class='del'>-		struct obj_symbol *tmptab[HASH_BUCKETS], *sym, *next;</div><div class='del'>-		int i;</div><div class='del'>-</div><div class='del'>-		f-&gt;symbol_hash = hash;</div><div class='del'>-</div><div class='del'>-		memcpy(tmptab, f-&gt;symtab, sizeof(tmptab));</div><div class='del'>-		memset(f-&gt;symtab, 0, sizeof(f-&gt;symtab));</div><div class='del'>-</div><div class='del'>-		for (i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-			for (sym = tmptab[i]; sym; sym = next) {</div><div class='del'>-				unsigned long h = hash(sym-&gt;name) % HASH_BUCKETS;</div><div class='del'>-				next = sym-&gt;next;</div><div class='del'>-				sym-&gt;next = f-&gt;symtab[h];</div><div class='del'>-				f-&gt;symtab[h] = sym;</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif							/* BB_FEATURE_INSMOD_VERSION_CHECKING */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_add_symbol(struct obj_file *f, const char *name,</div><div class='del'>-								  unsigned long symidx, int info,</div><div class='del'>-								  int secidx, ElfW(Addr) value,</div><div class='del'>-								  unsigned long size)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	unsigned long hash = f-&gt;symbol_hash(name) % HASH_BUCKETS;</div><div class='del'>-	int n_type = ELFW(ST_TYPE) (info);</div><div class='del'>-	int n_binding = ELFW(ST_BIND) (info);</div><div class='del'>-</div><div class='del'>-	for (sym = f-&gt;symtab[hash]; sym; sym = sym-&gt;next)</div><div class='del'>-		if (f-&gt;symbol_cmp(sym-&gt;name, name) == 0) {</div><div class='del'>-			int o_secidx = sym-&gt;secidx;</div><div class='del'>-			int o_info = sym-&gt;info;</div><div class='del'>-			int o_type = ELFW(ST_TYPE) (o_info);</div><div class='del'>-			int o_binding = ELFW(ST_BIND) (o_info);</div><div class='del'>-</div><div class='del'>-			/* A redefinition!  Is it legal?  */</div><div class='del'>-</div><div class='del'>-			if (secidx == SHN_UNDEF)</div><div class='del'>-				return sym;</div><div class='del'>-			else if (o_secidx == SHN_UNDEF)</div><div class='del'>-				goto found;</div><div class='del'>-			else if (n_binding == STB_GLOBAL &amp;&amp; o_binding == STB_LOCAL) {</div><div class='del'>-				/* Cope with local and global symbols of the same name</div><div class='del'>-				   in the same object file, as might have been created</div><div class='del'>-				   by ld -r.  The only reason locals are now seen at this</div><div class='del'>-				   level at all is so that we can do semi-sensible things</div><div class='del'>-				   with parameters.  */</div><div class='del'>-</div><div class='del'>-				struct obj_symbol *nsym, **p;</div><div class='del'>-</div><div class='del'>-				nsym = arch_new_symbol();</div><div class='del'>-				nsym-&gt;next = sym-&gt;next;</div><div class='del'>-				nsym-&gt;ksymidx = -1;</div><div class='del'>-</div><div class='del'>-				/* Excise the old (local) symbol from the hash chain.  */</div><div class='del'>-				for (p = &amp;f-&gt;symtab[hash]; *p != sym; p = &amp;(*p)-&gt;next)</div><div class='del'>-					continue;</div><div class='del'>-				*p = sym = nsym;</div><div class='del'>-				goto found;</div><div class='del'>-			} else if (n_binding == STB_LOCAL) {</div><div class='del'>-				/* Another symbol of the same name has already been defined.</div><div class='del'>-				   Just add this to the local table.  */</div><div class='del'>-				sym = arch_new_symbol();</div><div class='del'>-				sym-&gt;next = NULL;</div><div class='del'>-				sym-&gt;ksymidx = -1;</div><div class='del'>-				f-&gt;local_symtab[symidx] = sym;</div><div class='del'>-				goto found;</div><div class='del'>-			} else if (n_binding == STB_WEAK)</div><div class='del'>-				return sym;</div><div class='del'>-			else if (o_binding == STB_WEAK)</div><div class='del'>-				goto found;</div><div class='del'>-			/* Don't unify COMMON symbols with object types the programmer</div><div class='del'>-			   doesn't expect.  */</div><div class='del'>-			else if (secidx == SHN_COMMON</div><div class='del'>-					 &amp;&amp; (o_type == STT_NOTYPE || o_type == STT_OBJECT))</div><div class='del'>-				return sym;</div><div class='del'>-			else if (o_secidx == SHN_COMMON</div><div class='del'>-					 &amp;&amp; (n_type == STT_NOTYPE || n_type == STT_OBJECT))</div><div class='del'>-				goto found;</div><div class='del'>-			else {</div><div class='del'>-				/* Don't report an error if the symbol is coming from</div><div class='del'>-				   the kernel or some external module.  */</div><div class='del'>-				if (secidx &lt;= SHN_HIRESERVE)</div><div class='del'>-					errorMsg("%s multiply defined", name);</div><div class='del'>-				return sym;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	/* Completely new symbol.  */</div><div class='del'>-	sym = arch_new_symbol();</div><div class='del'>-	sym-&gt;next = f-&gt;symtab[hash];</div><div class='del'>-	f-&gt;symtab[hash] = sym;</div><div class='del'>-	sym-&gt;ksymidx = -1;</div><div class='del'>-</div><div class='del'>-	if (ELFW(ST_BIND) (info) == STB_LOCAL)</div><div class='del'>-		f-&gt;local_symtab[symidx] = sym;</div><div class='del'>-</div><div class='del'>-  found:</div><div class='del'>-	sym-&gt;name = name;</div><div class='del'>-	sym-&gt;value = value;</div><div class='del'>-	sym-&gt;size = size;</div><div class='del'>-	sym-&gt;secidx = secidx;</div><div class='del'>-	sym-&gt;info = info;</div><div class='del'>-</div><div class='del'>-	return sym;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_find_symbol(struct obj_file *f, const char *name)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	unsigned long hash = f-&gt;symbol_hash(name) % HASH_BUCKETS;</div><div class='del'>-</div><div class='del'>-	for (sym = f-&gt;symtab[hash]; sym; sym = sym-&gt;next)</div><div class='del'>-		if (f-&gt;symbol_cmp(sym-&gt;name, name) == 0)</div><div class='del'>-			return sym;</div><div class='del'>-</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-ElfW(Addr)</div><div class='del'>-	obj_symbol_final_value(struct obj_file * f, struct obj_symbol * sym)</div><div class='del'>-{</div><div class='del'>-	if (sym) {</div><div class='del'>-		if (sym-&gt;secidx &gt;= SHN_LORESERVE)</div><div class='del'>-			return sym-&gt;value;</div><div class='del'>-</div><div class='del'>-		return sym-&gt;value + f-&gt;sections[sym-&gt;secidx]-&gt;header.sh_addr;</div><div class='del'>-	} else {</div><div class='del'>-		/* As a special case, a NULL sym has value zero.  */</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_find_section(struct obj_file *f, const char *name)</div><div class='del'>-{</div><div class='del'>-	int i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; n; ++i)</div><div class='del'>-		if (strcmp(f-&gt;sections[i]-&gt;name, name) == 0)</div><div class='del'>-			return f-&gt;sections[i];</div><div class='del'>-</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int obj_load_order_prio(struct obj_section *a)</div><div class='del'>-{</div><div class='del'>-	unsigned long af, ac;</div><div class='del'>-</div><div class='del'>-	af = a-&gt;header.sh_flags;</div><div class='del'>-</div><div class='del'>-	ac = 0;</div><div class='del'>-	if (a-&gt;name[0] != '.' || strlen(a-&gt;name) != 10 ||</div><div class='del'>-		strcmp(a-&gt;name + 5, ".init"))</div><div class='del'>-		ac |= 32;</div><div class='del'>-	if (af &amp; SHF_ALLOC)</div><div class='del'>-		ac |= 16;</div><div class='del'>-	if (!(af &amp; SHF_WRITE))</div><div class='del'>-		ac |= 8;</div><div class='del'>-	if (af &amp; SHF_EXECINSTR)</div><div class='del'>-		ac |= 4;</div><div class='del'>-	if (a-&gt;header.sh_type != SHT_NOBITS)</div><div class='del'>-		ac |= 2;</div><div class='del'>-</div><div class='del'>-	return ac;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_insert_section_load_order(struct obj_file *f, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-	struct obj_section **p;</div><div class='del'>-	int prio = obj_load_order_prio(sec);</div><div class='del'>-	for (p = f-&gt;load_order_search_start; *p; p = &amp;(*p)-&gt;load_next)</div><div class='del'>-		if (obj_load_order_prio(*p) &lt; prio)</div><div class='del'>-			break;</div><div class='del'>-	sec-&gt;load_next = *p;</div><div class='del'>-	*p = sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section(struct obj_file *f,</div><div class='del'>-											   const char *name,</div><div class='del'>-											   unsigned long align,</div><div class='del'>-											   unsigned long size)</div><div class='del'>-{</div><div class='del'>-	int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	f-&gt;sections = xrealloc(f-&gt;sections, (newidx + 1) * sizeof(sec));</div><div class='del'>-	f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-	memset(sec, 0, sizeof(*sec));</div><div class='del'>-	sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-	sec-&gt;header.sh_flags = SHF_WRITE | SHF_ALLOC;</div><div class='del'>-	sec-&gt;header.sh_size = size;</div><div class='del'>-	sec-&gt;header.sh_addralign = align;</div><div class='del'>-	sec-&gt;name = name;</div><div class='del'>-	sec-&gt;idx = newidx;</div><div class='del'>-	if (size)</div><div class='del'>-		sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-	obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-	return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section_first(struct obj_file *f,</div><div class='del'>-													 const char *name,</div><div class='del'>-													 unsigned long align,</div><div class='del'>-													 unsigned long size)</div><div class='del'>-{</div><div class='del'>-	int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	f-&gt;sections = xrealloc(f-&gt;sections, (newidx + 1) * sizeof(sec));</div><div class='del'>-	f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-	memset(sec, 0, sizeof(*sec));</div><div class='del'>-	sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-	sec-&gt;header.sh_flags = SHF_WRITE | SHF_ALLOC;</div><div class='del'>-	sec-&gt;header.sh_size = size;</div><div class='del'>-	sec-&gt;header.sh_addralign = align;</div><div class='del'>-	sec-&gt;name = name;</div><div class='del'>-	sec-&gt;idx = newidx;</div><div class='del'>-	if (size)</div><div class='del'>-		sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-	sec-&gt;load_next = f-&gt;load_order;</div><div class='del'>-	f-&gt;load_order = sec;</div><div class='del'>-	if (f-&gt;load_order_search_start == &amp;f-&gt;load_order)</div><div class='del'>-		f-&gt;load_order_search_start = &amp;sec-&gt;load_next;</div><div class='del'>-</div><div class='del'>-	return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *obj_extend_section(struct obj_section *sec, unsigned long more)</div><div class='del'>-{</div><div class='del'>-	unsigned long oldsize = sec-&gt;header.sh_size;</div><div class='del'>-	sec-&gt;contents = xrealloc(sec-&gt;contents, sec-&gt;header.sh_size += more);</div><div class='del'>-	return sec-&gt;contents + oldsize;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Conditionally add the symbols from the given symbol set to the</div><div class='del'>-   new module.  */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-add_symbols_from(</div><div class='del'>-				 struct obj_file *f,</div><div class='del'>-				 int idx, struct new_module_symbol *syms, size_t nsyms)</div><div class='del'>-{</div><div class='del'>-	struct new_module_symbol *s;</div><div class='del'>-	size_t i;</div><div class='del'>-	int used = 0;</div><div class='del'>-</div><div class='del'>-	for (i = 0, s = syms; i &lt; nsyms; ++i, ++s) {</div><div class='del'>-</div><div class='del'>-		/* Only add symbols that are already marked external.  If we</div><div class='del'>-		   override locals we may cause problems for argument initialization.</div><div class='del'>-		   We will also create a false dependency on the module.  */</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-</div><div class='del'>-		sym = obj_find_symbol(f, (char *) s-&gt;name);</div><div class='del'>-		if (sym &amp;&amp; !ELFW(ST_BIND) (sym-&gt;info) == STB_LOCAL) {</div><div class='del'>-			sym = obj_add_symbol(f, (char *) s-&gt;name, -1,</div><div class='del'>-								 ELFW(ST_INFO) (STB_GLOBAL, STT_NOTYPE),</div><div class='del'>-								 idx, s-&gt;value, 0);</div><div class='del'>-			/* Did our symbol just get installed?  If so, mark the</div><div class='del'>-			   module as "used".  */</div><div class='del'>-			if (sym-&gt;secidx == idx)</div><div class='del'>-				used = 1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return used;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void add_kernel_symbols(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct external_module *m;</div><div class='del'>-	int i, nused = 0;</div><div class='del'>-</div><div class='del'>-	/* Add module symbols first.  */</div><div class='del'>-</div><div class='del'>-	for (i = 0, m = ext_modules; i &lt; n_ext_modules; ++i, ++m)</div><div class='del'>-		if (m-&gt;nsyms</div><div class='del'>-			&amp;&amp; add_symbols_from(f, SHN_HIRESERVE + 2 + i, m-&gt;syms,</div><div class='del'>-								m-&gt;nsyms)) m-&gt;used = 1, ++nused;</div><div class='del'>-</div><div class='del'>-	n_ext_modules_used = nused;</div><div class='del'>-</div><div class='del'>-	/* And finally the symbols from the kernel proper.  */</div><div class='del'>-</div><div class='del'>-	if (nksyms)</div><div class='del'>-		add_symbols_from(f, SHN_HIRESERVE + 1, ksyms, nksyms);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char *get_modinfo_value(struct obj_file *f, const char *key)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	char *p, *v, *n, *ep;</div><div class='del'>-	size_t klen = strlen(key);</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".modinfo");</div><div class='del'>-	if (sec == NULL)</div><div class='del'>-		return NULL;</div><div class='del'>-	p = sec-&gt;contents;</div><div class='del'>-	ep = p + sec-&gt;header.sh_size;</div><div class='del'>-	while (p &lt; ep) {</div><div class='del'>-		v = strchr(p, '=');</div><div class='del'>-		n = strchr(p, '\0');</div><div class='del'>-		if (v) {</div><div class='del'>-			if (p + klen == v &amp;&amp; strncmp(p, key, klen) == 0)</div><div class='del'>-				return v + 1;</div><div class='del'>-		} else {</div><div class='del'>-			if (p + klen == n &amp;&amp; strcmp(p, key) == 0)</div><div class='del'>-				return n;</div><div class='del'>-		}</div><div class='del'>-		p = n + 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* Functions relating to module loading in pre 2.1 kernels.  */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-old_process_module_arguments(struct obj_file *f, int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	while (argc &gt; 0) {</div><div class='del'>-		char *p, *q;</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-		int *loc;</div><div class='del'>-</div><div class='del'>-		p = *argv;</div><div class='del'>-		if ((q = strchr(p, '=')) == NULL) {</div><div class='del'>-			argc--;</div><div class='del'>-			continue;</div><div class='del'>-                }</div><div class='del'>-		*q++ = '\0';</div><div class='del'>-</div><div class='del'>-		sym = obj_find_symbol(f, p);</div><div class='del'>-</div><div class='del'>-		/* Also check that the parameter was not resolved from the kernel.  */</div><div class='del'>-		if (sym == NULL || sym-&gt;secidx &gt; SHN_HIRESERVE) {</div><div class='del'>-			errorMsg("symbol for parameter %s not found", p);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		loc = (int *) (f-&gt;sections[sym-&gt;secidx]-&gt;contents + sym-&gt;value);</div><div class='del'>-</div><div class='del'>-		/* Do C quoting if we begin with a ".  */</div><div class='del'>-		if (*q == '"') {</div><div class='del'>-			char *r, *str;</div><div class='del'>-</div><div class='del'>-			str = alloca(strlen(q));</div><div class='del'>-			for (r = str, q++; *q != '"'; ++q, ++r) {</div><div class='del'>-				if (*q == '\0') {</div><div class='del'>-					errorMsg("improperly terminated string argument for %s", p);</div><div class='del'>-					return 0;</div><div class='del'>-				} else if (*q == '\\')</div><div class='del'>-					switch (*++q) {</div><div class='del'>-					case 'a':</div><div class='del'>-						*r = '\a';</div><div class='del'>-						break;</div><div class='del'>-					case 'b':</div><div class='del'>-						*r = '\b';</div><div class='del'>-						break;</div><div class='del'>-					case 'e':</div><div class='del'>-						*r = '\033';</div><div class='del'>-						break;</div><div class='del'>-					case 'f':</div><div class='del'>-						*r = '\f';</div><div class='del'>-						break;</div><div class='del'>-					case 'n':</div><div class='del'>-						*r = '\n';</div><div class='del'>-						break;</div><div class='del'>-					case 'r':</div><div class='del'>-						*r = '\r';</div><div class='del'>-						break;</div><div class='del'>-					case 't':</div><div class='del'>-						*r = '\t';</div><div class='del'>-						break;</div><div class='del'>-</div><div class='del'>-					case '0':</div><div class='del'>-					case '1':</div><div class='del'>-					case '2':</div><div class='del'>-					case '3':</div><div class='del'>-					case '4':</div><div class='del'>-					case '5':</div><div class='del'>-					case '6':</div><div class='del'>-					case '7':</div><div class='del'>-						{</div><div class='del'>-							int c = *q - '0';</div><div class='del'>-							if (q[1] &gt;= '0' &amp;&amp; q[1] &lt;= '7') {</div><div class='del'>-								c = (c * 8) + *++q - '0';</div><div class='del'>-								if (q[1] &gt;= '0' &amp;&amp; q[1] &lt;= '7')</div><div class='del'>-									c = (c * 8) + *++q - '0';</div><div class='del'>-							}</div><div class='del'>-							*r = c;</div><div class='del'>-						}</div><div class='del'>-						break;</div><div class='del'>-</div><div class='del'>-					default:</div><div class='del'>-						*r = *q;</div><div class='del'>-						break;</div><div class='del'>-				} else</div><div class='del'>-					*r = *q;</div><div class='del'>-			}</div><div class='del'>-			*r = '\0';</div><div class='del'>-			obj_string_patch(f, sym-&gt;secidx, sym-&gt;value, str);</div><div class='del'>-		} else if (*q &gt;= '0' &amp;&amp; *q &lt;= '9') {</div><div class='del'>-			do</div><div class='del'>-				*loc++ = strtoul(q, &amp;q, 0);</div><div class='del'>-			while (*q++ == ',');</div><div class='del'>-		} else {</div><div class='del'>-			char *contents = f-&gt;sections[sym-&gt;secidx]-&gt;contents;</div><div class='del'>-			char *loc = contents + sym-&gt;value;</div><div class='del'>-			char *r;			/* To search for commas */</div><div class='del'>-</div><div class='del'>-			/* Break the string with comas */</div><div class='del'>-			while ((r = strchr(q, ',')) != (char *) NULL) {</div><div class='del'>-				*r++ = '\0';</div><div class='del'>-				obj_string_patch(f, sym-&gt;secidx, loc - contents, q);</div><div class='del'>-				loc += sizeof(char *);</div><div class='del'>-				q = r;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			/* last part */</div><div class='del'>-			obj_string_patch(f, sym-&gt;secidx, loc - contents, q);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		argc--, argv++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-static int old_is_module_checksummed(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	return obj_find_symbol(f, "Using_Versions") != NULL;</div><div class='del'>-}</div><div class='del'>-/* Get the module's kernel version in the canonical integer form.  */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-old_get_module_version(struct obj_file *f, char str[STRVERSIONLEN])</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	char *p, *q;</div><div class='del'>-	int a, b, c;</div><div class='del'>-</div><div class='del'>-	sym = obj_find_symbol(f, "kernel_version");</div><div class='del'>-	if (sym == NULL)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	p = f-&gt;sections[sym-&gt;secidx]-&gt;contents + sym-&gt;value;</div><div class='del'>-	strncpy(str, p, STRVERSIONLEN);</div><div class='del'>-</div><div class='del'>-	a = strtoul(p, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	b = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	c = strtoul(p + 1, &amp;q, 10);</div><div class='del'>-	if (p + 1 == q)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return a &lt;&lt; 16 | b &lt;&lt; 8 | c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif   /* BB_FEATURE_INSMOD_VERSION_CHECKING */</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_OLD_KERNEL</div><div class='del'>-</div><div class='del'>-/* Fetch all the symbols and divvy them up as appropriate for the modules.  */</div><div class='del'>-</div><div class='del'>-static int old_get_kernel_symbols(const char *m_name)</div><div class='del'>-{</div><div class='del'>-	struct old_kernel_sym *ks, *k;</div><div class='del'>-	struct new_module_symbol *s;</div><div class='del'>-	struct external_module *mod;</div><div class='del'>-	int nks, nms, nmod, i;</div><div class='del'>-</div><div class='del'>-	nks = get_kernel_syms(NULL);</div><div class='del'>-	if (nks &lt; 0) {</div><div class='del'>-		errorMsg("get_kernel_syms: %s: %s", m_name, strerror(errno));</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	ks = k = xmalloc(nks * sizeof(*ks));</div><div class='del'>-</div><div class='del'>-	if (get_kernel_syms(ks) != nks) {</div><div class='del'>-		logperror("inconsistency with get_kernel_syms -- is someone else "</div><div class='del'>-			   "playing with modules?");</div><div class='del'>-		free(ks);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Collect the module information.  */</div><div class='del'>-</div><div class='del'>-	mod = NULL;</div><div class='del'>-	nmod = -1;</div><div class='del'>-</div><div class='del'>-	while (k-&gt;name[0] == '#' &amp;&amp; k-&gt;name[1]) {</div><div class='del'>-		struct old_kernel_sym *k2;</div><div class='del'>-		struct new_module_symbol *s;</div><div class='del'>-</div><div class='del'>-		/* Find out how many symbols this module has.  */</div><div class='del'>-		for (k2 = k + 1; k2-&gt;name[0] != '#'; ++k2)</div><div class='del'>-			continue;</div><div class='del'>-		nms = k2 - k - 1;</div><div class='del'>-</div><div class='del'>-		mod = xrealloc(mod, (++nmod + 1) * sizeof(*mod));</div><div class='del'>-		mod[nmod].name = k-&gt;name + 1;</div><div class='del'>-		mod[nmod].addr = k-&gt;value;</div><div class='del'>-		mod[nmod].used = 0;</div><div class='del'>-		mod[nmod].nsyms = nms;</div><div class='del'>-		mod[nmod].syms = s = (nms ? xmalloc(nms * sizeof(*s)) : NULL);</div><div class='del'>-</div><div class='del'>-		for (i = 0, ++k; i &lt; nms; ++i, ++s, ++k) {</div><div class='del'>-			s-&gt;name = (unsigned long) k-&gt;name;</div><div class='del'>-			s-&gt;value = k-&gt;value;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		k = k2;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	ext_modules = mod;</div><div class='del'>-	n_ext_modules = nmod + 1;</div><div class='del'>-</div><div class='del'>-	/* Now collect the symbols for the kernel proper.  */</div><div class='del'>-</div><div class='del'>-	if (k-&gt;name[0] == '#')</div><div class='del'>-		++k;</div><div class='del'>-</div><div class='del'>-	nksyms = nms = nks - (k - ks);</div><div class='del'>-	ksyms = s = (nms ? xmalloc(nms * sizeof(*s)) : NULL);</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; nms; ++i, ++s, ++k) {</div><div class='del'>-		s-&gt;name = (unsigned long) k-&gt;name;</div><div class='del'>-		s-&gt;value = k-&gt;value;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Return the kernel symbol checksum version, or zero if not used.  */</div><div class='del'>-</div><div class='del'>-static int old_is_kernel_checksummed(void)</div><div class='del'>-{</div><div class='del'>-	/* Using_Versions is the first symbol.  */</div><div class='del'>-	if (nksyms &gt; 0</div><div class='del'>-		&amp;&amp; strcmp((char *) ksyms[0].name,</div><div class='del'>-				  "Using_Versions") == 0) return ksyms[0].value;</div><div class='del'>-	else</div><div class='del'>-		return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int old_create_mod_use_count(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	sec = obj_create_alloced_section_first(f, ".moduse", sizeof(long),</div><div class='del'>-										   sizeof(long));</div><div class='del'>-</div><div class='del'>-	obj_add_symbol(f, "mod_use_count_", -1,</div><div class='del'>-				   ELFW(ST_INFO) (STB_LOCAL, STT_OBJECT), sec-&gt;idx, 0,</div><div class='del'>-				   sizeof(long));</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-old_init_module(const char *m_name, struct obj_file *f,</div><div class='del'>-				unsigned long m_size)</div><div class='del'>-{</div><div class='del'>-	char *image;</div><div class='del'>-	struct old_mod_routines routines;</div><div class='del'>-	struct old_symbol_table *symtab;</div><div class='del'>-	int ret;</div><div class='del'>-</div><div class='del'>-	/* Create the symbol table */</div><div class='del'>-	{</div><div class='del'>-		int nsyms = 0, strsize = 0, total;</div><div class='del'>-</div><div class='del'>-		/* Size things first... */</div><div class='del'>-		if (flag_export) {</div><div class='del'>-			int i;</div><div class='del'>-			for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-				struct obj_symbol *sym;</div><div class='del'>-				for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-					if (ELFW(ST_BIND) (sym-&gt;info) != STB_LOCAL</div><div class='del'>-						&amp;&amp; sym-&gt;secidx &lt;= SHN_HIRESERVE) </div><div class='del'>-					{</div><div class='del'>-						sym-&gt;ksymidx = nsyms++;</div><div class='del'>-						strsize += strlen(sym-&gt;name) + 1;</div><div class='del'>-					}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		total = (sizeof(struct old_symbol_table)</div><div class='del'>-				 + nsyms * sizeof(struct old_module_symbol)</div><div class='del'>-				 + n_ext_modules_used * sizeof(struct old_module_ref)</div><div class='del'>-				 + strsize);</div><div class='del'>-		symtab = xmalloc(total);</div><div class='del'>-		symtab-&gt;size = total;</div><div class='del'>-		symtab-&gt;n_symbols = nsyms;</div><div class='del'>-		symtab-&gt;n_refs = n_ext_modules_used;</div><div class='del'>-</div><div class='del'>-		if (flag_export &amp;&amp; nsyms) {</div><div class='del'>-			struct old_module_symbol *ksym;</div><div class='del'>-			char *str;</div><div class='del'>-			int i;</div><div class='del'>-</div><div class='del'>-			ksym = symtab-&gt;symbol;</div><div class='del'>-			str = ((char *) ksym + nsyms * sizeof(struct old_module_symbol)</div><div class='del'>-				   + n_ext_modules_used * sizeof(struct old_module_ref));</div><div class='del'>-</div><div class='del'>-			for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-				struct obj_symbol *sym;</div><div class='del'>-				for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-					if (sym-&gt;ksymidx &gt;= 0) {</div><div class='del'>-						ksym-&gt;addr = obj_symbol_final_value(f, sym);</div><div class='del'>-						ksym-&gt;name =</div><div class='del'>-							(unsigned long) str - (unsigned long) symtab;</div><div class='del'>-</div><div class='del'>-						str = stpcpy(str, sym-&gt;name) + 1;</div><div class='del'>-						ksym++;</div><div class='del'>-					}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (n_ext_modules_used) {</div><div class='del'>-			struct old_module_ref *ref;</div><div class='del'>-			int i;</div><div class='del'>-</div><div class='del'>-			ref = (struct old_module_ref *)</div><div class='del'>-				((char *) symtab-&gt;symbol + nsyms * sizeof(struct old_module_symbol));</div><div class='del'>-</div><div class='del'>-			for (i = 0; i &lt; n_ext_modules; ++i)</div><div class='del'>-				if (ext_modules[i].used)</div><div class='del'>-					ref++-&gt;module = ext_modules[i].addr;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Fill in routines.  */</div><div class='del'>-</div><div class='del'>-	routines.init =</div><div class='del'>-		obj_symbol_final_value(f, obj_find_symbol(f, "init_module"));</div><div class='del'>-	routines.cleanup =</div><div class='del'>-		obj_symbol_final_value(f, obj_find_symbol(f, "cleanup_module"));</div><div class='del'>-</div><div class='del'>-	/* Whew!  All of the initialization is complete.  Collect the final</div><div class='del'>-	   module image and give it to the kernel.  */</div><div class='del'>-</div><div class='del'>-	image = xmalloc(m_size);</div><div class='del'>-	obj_create_image(f, image);</div><div class='del'>-</div><div class='del'>-	/* image holds the complete relocated module, accounting correctly for</div><div class='del'>-	   mod_use_count.  However the old module kernel support assume that</div><div class='del'>-	   it is receiving something which does not contain mod_use_count.  */</div><div class='del'>-	ret = old_sys_init_module(m_name, image + sizeof(long),</div><div class='del'>-							  m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN</div><div class='del'>-										: 0), &amp;routines, symtab);</div><div class='del'>-	if (ret)</div><div class='del'>-		errorMsg("init_module: %s: %s", m_name, strerror(errno));</div><div class='del'>-</div><div class='del'>-	free(image);</div><div class='del'>-	free(symtab);</div><div class='del'>-</div><div class='del'>-	return ret == 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#define old_create_mod_use_count(x) TRUE</div><div class='del'>-#define old_init_module(x, y, z) TRUE</div><div class='del'>-</div><div class='del'>-#endif							/* BB_FEATURE_INSMOD_OLD_KERNEL */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* Functions relating to module loading after 2.1.18.  */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-new_process_module_arguments(struct obj_file *f, int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	while (argc &gt; 0) {</div><div class='del'>-		char *p, *q, *key;</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-		char *contents, *loc;</div><div class='del'>-		int min, max, n;</div><div class='del'>-</div><div class='del'>-		p = *argv;</div><div class='del'>-		if ((q = strchr(p, '=')) == NULL) {</div><div class='del'>-			argc--;</div><div class='del'>-			continue;</div><div class='del'>-                }</div><div class='del'>-</div><div class='del'>-		key = alloca(q - p + 6);</div><div class='del'>-		memcpy(key, "parm_", 5);</div><div class='del'>-		memcpy(key + 5, p, q - p);</div><div class='del'>-		key[q - p + 5] = 0;</div><div class='del'>-</div><div class='del'>-		p = get_modinfo_value(f, key);</div><div class='del'>-		key += 5;</div><div class='del'>-		if (p == NULL) {</div><div class='del'>-			errorMsg("invalid parameter %s", key);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		sym = obj_find_symbol(f, key);</div><div class='del'>-</div><div class='del'>-		/* Also check that the parameter was not resolved from the kernel.  */</div><div class='del'>-		if (sym == NULL || sym-&gt;secidx &gt; SHN_HIRESERVE) {</div><div class='del'>-			errorMsg("symbol for parameter %s not found", key);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (isdigit(*p)) {</div><div class='del'>-			min = strtoul(p, &amp;p, 10);</div><div class='del'>-			if (*p == '-')</div><div class='del'>-				max = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-			else</div><div class='del'>-				max = min;</div><div class='del'>-		} else</div><div class='del'>-			min = max = 1;</div><div class='del'>-</div><div class='del'>-		contents = f-&gt;sections[sym-&gt;secidx]-&gt;contents;</div><div class='del'>-		loc = contents + sym-&gt;value;</div><div class='del'>-		n = (*++q != '\0');</div><div class='del'>-</div><div class='del'>-		while (1) {</div><div class='del'>-			if ((*p == 's') || (*p == 'c')) {</div><div class='del'>-				char *str;</div><div class='del'>-</div><div class='del'>-				/* Do C quoting if we begin with a ", else slurp the lot.  */</div><div class='del'>-				if (*q == '"') {</div><div class='del'>-					char *r;</div><div class='del'>-</div><div class='del'>-					str = alloca(strlen(q));</div><div class='del'>-					for (r = str, q++; *q != '"'; ++q, ++r) {</div><div class='del'>-						if (*q == '\0') {</div><div class='del'>-							errorMsg("improperly terminated string argument for %s",</div><div class='del'>-									key);</div><div class='del'>-							return 0;</div><div class='del'>-						} else if (*q == '\\')</div><div class='del'>-							switch (*++q) {</div><div class='del'>-							case 'a':</div><div class='del'>-								*r = '\a';</div><div class='del'>-								break;</div><div class='del'>-							case 'b':</div><div class='del'>-								*r = '\b';</div><div class='del'>-								break;</div><div class='del'>-							case 'e':</div><div class='del'>-								*r = '\033';</div><div class='del'>-								break;</div><div class='del'>-							case 'f':</div><div class='del'>-								*r = '\f';</div><div class='del'>-								break;</div><div class='del'>-							case 'n':</div><div class='del'>-								*r = '\n';</div><div class='del'>-								break;</div><div class='del'>-							case 'r':</div><div class='del'>-								*r = '\r';</div><div class='del'>-								break;</div><div class='del'>-							case 't':</div><div class='del'>-								*r = '\t';</div><div class='del'>-								break;</div><div class='del'>-</div><div class='del'>-							case '0':</div><div class='del'>-							case '1':</div><div class='del'>-							case '2':</div><div class='del'>-							case '3':</div><div class='del'>-							case '4':</div><div class='del'>-							case '5':</div><div class='del'>-							case '6':</div><div class='del'>-							case '7':</div><div class='del'>-								{</div><div class='del'>-									int c = *q - '0';</div><div class='del'>-									if (q[1] &gt;= '0' &amp;&amp; q[1] &lt;= '7') {</div><div class='del'>-										c = (c * 8) + *++q - '0';</div><div class='del'>-										if (q[1] &gt;= '0' &amp;&amp; q[1] &lt;= '7')</div><div class='del'>-											c = (c * 8) + *++q - '0';</div><div class='del'>-									}</div><div class='del'>-									*r = c;</div><div class='del'>-								}</div><div class='del'>-								break;</div><div class='del'>-</div><div class='del'>-							default:</div><div class='del'>-								*r = *q;</div><div class='del'>-								break;</div><div class='del'>-						} else</div><div class='del'>-							*r = *q;</div><div class='del'>-					}</div><div class='del'>-					*r = '\0';</div><div class='del'>-					++q;</div><div class='del'>-				} else {</div><div class='del'>-					char *r;</div><div class='del'>-</div><div class='del'>-					/* In this case, the string is not quoted. We will break</div><div class='del'>-					   it using the coma (like for ints). If the user wants to</div><div class='del'>-					   include comas in a string, he just has to quote it */</div><div class='del'>-</div><div class='del'>-					/* Search the next coma */</div><div class='del'>-					r = strchr(q, ',');</div><div class='del'>-</div><div class='del'>-					/* Found ? */</div><div class='del'>-					if (r != (char *) NULL) {</div><div class='del'>-						/* Recopy the current field */</div><div class='del'>-						str = alloca(r - q + 1);</div><div class='del'>-						memcpy(str, q, r - q);</div><div class='del'>-</div><div class='del'>-						/* I don't know if it is usefull, as the previous case</div><div class='del'>-						   doesn't null terminate the string ??? */</div><div class='del'>-						str[r - q] = '\0';</div><div class='del'>-</div><div class='del'>-						/* Keep next fields */</div><div class='del'>-						q = r;</div><div class='del'>-					} else {</div><div class='del'>-						/* last string */</div><div class='del'>-						str = q;</div><div class='del'>-						q = "";</div><div class='del'>-					}</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-				if (*p == 's') {</div><div class='del'>-					/* Normal string */</div><div class='del'>-					obj_string_patch(f, sym-&gt;secidx, loc - contents, str);</div><div class='del'>-					loc += tgt_sizeof_char_p;</div><div class='del'>-				} else {</div><div class='del'>-					/* Array of chars (in fact, matrix !) */</div><div class='del'>-					unsigned long charssize;	/* size of each member */</div><div class='del'>-</div><div class='del'>-					/* Get the size of each member */</div><div class='del'>-					/* Probably we should do that outside the loop ? */</div><div class='del'>-					if (!isdigit(*(p + 1))) {</div><div class='del'>-						errorMsg("parameter type 'c' for %s must be followed by"</div><div class='del'>-								" the maximum size", key);</div><div class='del'>-						return 0;</div><div class='del'>-					}</div><div class='del'>-					charssize = strtoul(p + 1, (char **) NULL, 10);</div><div class='del'>-</div><div class='del'>-					/* Check length */</div><div class='del'>-					if (strlen(str) &gt;= charssize) {</div><div class='del'>-						errorMsg("string too long for %s (max %ld)", key,</div><div class='del'>-								charssize - 1);</div><div class='del'>-						return 0;</div><div class='del'>-					}</div><div class='del'>-</div><div class='del'>-					/* Copy to location */</div><div class='del'>-					strcpy((char *) loc, str);</div><div class='del'>-					loc += charssize;</div><div class='del'>-				}</div><div class='del'>-			} else {</div><div class='del'>-				long v = strtoul(q, &amp;q, 0);</div><div class='del'>-				switch (*p) {</div><div class='del'>-				case 'b':</div><div class='del'>-					*loc++ = v;</div><div class='del'>-					break;</div><div class='del'>-				case 'h':</div><div class='del'>-					*(short *) loc = v;</div><div class='del'>-					loc += tgt_sizeof_short;</div><div class='del'>-					break;</div><div class='del'>-				case 'i':</div><div class='del'>-					*(int *) loc = v;</div><div class='del'>-					loc += tgt_sizeof_int;</div><div class='del'>-					break;</div><div class='del'>-				case 'l':</div><div class='del'>-					*(long *) loc = v;</div><div class='del'>-					loc += tgt_sizeof_long;</div><div class='del'>-					break;</div><div class='del'>-</div><div class='del'>-				default:</div><div class='del'>-					errorMsg("unknown parameter type '%c' for %s", *p, key);</div><div class='del'>-					return 0;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		  retry_end_of_value:</div><div class='del'>-			switch (*q) {</div><div class='del'>-			case '\0':</div><div class='del'>-				goto end_of_arg;</div><div class='del'>-</div><div class='del'>-			case ' ':</div><div class='del'>-			case '\t':</div><div class='del'>-			case '\n':</div><div class='del'>-			case '\r':</div><div class='del'>-				++q;</div><div class='del'>-				goto retry_end_of_value;</div><div class='del'>-</div><div class='del'>-			case ',':</div><div class='del'>-				if (++n &gt; max) {</div><div class='del'>-					errorMsg("too many values for %s (max %d)", key, max);</div><div class='del'>-					return 0;</div><div class='del'>-				}</div><div class='del'>-				++q;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			default:</div><div class='del'>-				errorMsg("invalid argument syntax for %s", key);</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	  end_of_arg:</div><div class='del'>-		if (n &lt; min) {</div><div class='del'>-			errorMsg("too few values for %s (min %d)", key, min);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		argc--, argv++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-static int new_is_module_checksummed(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	const char *p = get_modinfo_value(f, "using_checksums");</div><div class='del'>-	if (p)</div><div class='del'>-		return atoi(p);</div><div class='del'>-	else</div><div class='del'>-		return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Get the module's kernel version in the canonical integer form.  */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-new_get_module_version(struct obj_file *f, char str[STRVERSIONLEN])</div><div class='del'>-{</div><div class='del'>-	char *p, *q;</div><div class='del'>-	int a, b, c;</div><div class='del'>-</div><div class='del'>-	p = get_modinfo_value(f, "kernel_version");</div><div class='del'>-	if (p == NULL)</div><div class='del'>-		return -1;</div><div class='del'>-	strncpy(str, p, STRVERSIONLEN);</div><div class='del'>-</div><div class='del'>-	a = strtoul(p, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	b = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	c = strtoul(p + 1, &amp;q, 10);</div><div class='del'>-	if (p + 1 == q)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return a &lt;&lt; 16 | b &lt;&lt; 8 | c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif   /* BB_FEATURE_INSMOD_VERSION_CHECKING */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_NEW_KERNEL</div><div class='del'>-</div><div class='del'>-/* Fetch the loaded modules, and all currently exported symbols.  */</div><div class='del'>-</div><div class='del'>-static int new_get_kernel_symbols(void)</div><div class='del'>-{</div><div class='del'>-	char *module_names, *mn;</div><div class='del'>-	struct external_module *modules, *m;</div><div class='del'>-	struct new_module_symbol *syms, *s;</div><div class='del'>-	size_t ret, bufsize, nmod, nsyms, i, j;</div><div class='del'>-</div><div class='del'>-	/* Collect the loaded modules.  */</div><div class='del'>-</div><div class='del'>-	module_names = xmalloc(bufsize = 256);</div><div class='del'>-  retry_modules_load:</div><div class='del'>-	if (query_module(NULL, QM_MODULES, module_names, bufsize, &amp;ret)) {</div><div class='del'>-		if (errno == ENOSPC) {</div><div class='del'>-			module_names = xrealloc(module_names, bufsize = ret);</div><div class='del'>-			goto retry_modules_load;</div><div class='del'>-		}</div><div class='del'>-		errorMsg("QM_MODULES: %s", strerror(errno));</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	n_ext_modules = nmod = ret;</div><div class='del'>-	ext_modules = modules = xmalloc(nmod * sizeof(*modules));</div><div class='del'>-	memset(modules, 0, nmod * sizeof(*modules));</div><div class='del'>-</div><div class='del'>-	/* Collect the modules' symbols.  */</div><div class='del'>-</div><div class='del'>-	for (i = 0, mn = module_names, m = modules;</div><div class='del'>-		 i &lt; nmod; ++i, ++m, mn += strlen(mn) + 1) {</div><div class='del'>-		struct new_module_info info;</div><div class='del'>-</div><div class='del'>-		if (query_module(mn, QM_INFO, &amp;info, sizeof(info), &amp;ret)) {</div><div class='del'>-			if (errno == ENOENT) {</div><div class='del'>-				/* The module was removed out from underneath us.  */</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			errorMsg("query_module: QM_INFO: %s: %s", mn, strerror(errno));</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		syms = xmalloc(bufsize = 1024);</div><div class='del'>-	  retry_mod_sym_load:</div><div class='del'>-		if (query_module(mn, QM_SYMBOLS, syms, bufsize, &amp;ret)) {</div><div class='del'>-			switch (errno) {</div><div class='del'>-			case ENOSPC:</div><div class='del'>-				syms = xrealloc(syms, bufsize = ret);</div><div class='del'>-				goto retry_mod_sym_load;</div><div class='del'>-			case ENOENT:</div><div class='del'>-				/* The module was removed out from underneath us.  */</div><div class='del'>-				continue;</div><div class='del'>-			default:</div><div class='del'>-				errorMsg("query_module: QM_SYMBOLS: %s: %s", mn, strerror(errno));</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		nsyms = ret;</div><div class='del'>-</div><div class='del'>-		m-&gt;name = mn;</div><div class='del'>-		m-&gt;addr = info.addr;</div><div class='del'>-		m-&gt;nsyms = nsyms;</div><div class='del'>-		m-&gt;syms = syms;</div><div class='del'>-</div><div class='del'>-		for (j = 0, s = syms; j &lt; nsyms; ++j, ++s) {</div><div class='del'>-			s-&gt;name += (unsigned long) syms;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Collect the kernel's symbols.  */</div><div class='del'>-</div><div class='del'>-	syms = xmalloc(bufsize = 16 * 1024);</div><div class='del'>-  retry_kern_sym_load:</div><div class='del'>-	if (query_module(NULL, QM_SYMBOLS, syms, bufsize, &amp;ret)) {</div><div class='del'>-		if (errno == ENOSPC) {</div><div class='del'>-			syms = xrealloc(syms, bufsize = ret);</div><div class='del'>-			goto retry_kern_sym_load;</div><div class='del'>-		}</div><div class='del'>-		errorMsg("kernel: QM_SYMBOLS: %s", strerror(errno));</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	nksyms = nsyms = ret;</div><div class='del'>-	ksyms = syms;</div><div class='del'>-</div><div class='del'>-	for (j = 0, s = syms; j &lt; nsyms; ++j, ++s) {</div><div class='del'>-		s-&gt;name += (unsigned long) syms;</div><div class='del'>-	}</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Return the kernel symbol checksum version, or zero if not used.  */</div><div class='del'>-</div><div class='del'>-static int new_is_kernel_checksummed(void)</div><div class='del'>-{</div><div class='del'>-	struct new_module_symbol *s;</div><div class='del'>-	size_t i;</div><div class='del'>-</div><div class='del'>-	/* Using_Versions is not the first symbol, but it should be in there.  */</div><div class='del'>-</div><div class='del'>-	for (i = 0, s = ksyms; i &lt; nksyms; ++i, ++s)</div><div class='del'>-		if (strcmp((char *) s-&gt;name, "Using_Versions") == 0)</div><div class='del'>-			return s-&gt;value;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int new_create_this_module(struct obj_file *f, const char *m_name)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,</div><div class='del'>-										   sizeof(struct new_module));</div><div class='del'>-	memset(sec-&gt;contents, 0, sizeof(struct new_module));</div><div class='del'>-</div><div class='del'>-	obj_add_symbol(f, "__this_module", -1,</div><div class='del'>-				   ELFW(ST_INFO) (STB_LOCAL, STT_OBJECT), sec-&gt;idx, 0,</div><div class='del'>-				   sizeof(struct new_module));</div><div class='del'>-</div><div class='del'>-	obj_string_patch(f, sec-&gt;idx, offsetof(struct new_module, name),</div><div class='del'>-					 m_name);</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int new_create_module_ksymtab(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	/* We must always add the module references.  */</div><div class='del'>-</div><div class='del'>-	if (n_ext_modules_used) {</div><div class='del'>-		struct new_module_ref *dep;</div><div class='del'>-		struct obj_symbol *tm;</div><div class='del'>-</div><div class='del'>-		sec = obj_create_alloced_section(f, ".kmodtab", tgt_sizeof_void_p,</div><div class='del'>-										 (sizeof(struct new_module_ref)</div><div class='del'>-										  * n_ext_modules_used));</div><div class='del'>-		if (!sec)</div><div class='del'>-			return 0;</div><div class='del'>-</div><div class='del'>-		tm = obj_find_symbol(f, "__this_module");</div><div class='del'>-		dep = (struct new_module_ref *) sec-&gt;contents;</div><div class='del'>-		for (i = 0; i &lt; n_ext_modules; ++i)</div><div class='del'>-			if (ext_modules[i].used) {</div><div class='del'>-				dep-&gt;dep = ext_modules[i].addr;</div><div class='del'>-				obj_symbol_patch(f, sec-&gt;idx,</div><div class='del'>-								 (char *) &amp;dep-&gt;ref - sec-&gt;contents, tm);</div><div class='del'>-				dep-&gt;next_ref = 0;</div><div class='del'>-				++dep;</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (flag_export &amp;&amp; !obj_find_section(f, "__ksymtab")) {</div><div class='del'>-		size_t nsyms;</div><div class='del'>-		int *loaded;</div><div class='del'>-</div><div class='del'>-		sec =</div><div class='del'>-			obj_create_alloced_section(f, "__ksymtab", tgt_sizeof_void_p,</div><div class='del'>-									   0);</div><div class='del'>-</div><div class='del'>-		/* We don't want to export symbols residing in sections that</div><div class='del'>-		   aren't loaded.  There are a number of these created so that</div><div class='del'>-		   we make sure certain module options don't appear twice.  */</div><div class='del'>-</div><div class='del'>-		loaded = alloca(sizeof(int) * (i = f-&gt;header.e_shnum));</div><div class='del'>-		while (--i &gt;= 0)</div><div class='del'>-			loaded[i] = (f-&gt;sections[i]-&gt;header.sh_flags &amp; SHF_ALLOC) != 0;</div><div class='del'>-</div><div class='del'>-		for (nsyms = i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-			struct obj_symbol *sym;</div><div class='del'>-			for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-				if (ELFW(ST_BIND) (sym-&gt;info) != STB_LOCAL</div><div class='del'>-					&amp;&amp; sym-&gt;secidx &lt;= SHN_HIRESERVE</div><div class='del'>-					&amp;&amp; (sym-&gt;secidx &gt;= SHN_LORESERVE</div><div class='del'>-						|| loaded[sym-&gt;secidx])) {</div><div class='del'>-					ElfW(Addr) ofs = nsyms * 2 * tgt_sizeof_void_p;</div><div class='del'>-</div><div class='del'>-					obj_symbol_patch(f, sec-&gt;idx, ofs, sym);</div><div class='del'>-					obj_string_patch(f, sec-&gt;idx, ofs + tgt_sizeof_void_p,</div><div class='del'>-									 sym-&gt;name);</div><div class='del'>-</div><div class='del'>-					nsyms++;</div><div class='del'>-				}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		obj_extend_section(sec, nsyms * 2 * tgt_sizeof_char_p);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-new_init_module(const char *m_name, struct obj_file *f,</div><div class='del'>-				unsigned long m_size)</div><div class='del'>-{</div><div class='del'>-	struct new_module *module;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	void *image;</div><div class='del'>-	int ret;</div><div class='del'>-	tgt_long m_addr;</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".this");</div><div class='del'>-	module = (struct new_module *) sec-&gt;contents;</div><div class='del'>-	m_addr = sec-&gt;header.sh_addr;</div><div class='del'>-</div><div class='del'>-	module-&gt;size_of_struct = sizeof(*module);</div><div class='del'>-	module-&gt;size = m_size;</div><div class='del'>-	module-&gt;flags = flag_autoclean ? NEW_MOD_AUTOCLEAN : 0;</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, "__ksymtab");</div><div class='del'>-	if (sec &amp;&amp; sec-&gt;header.sh_size) {</div><div class='del'>-		module-&gt;syms = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;nsyms = sec-&gt;header.sh_size / (2 * tgt_sizeof_char_p);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (n_ext_modules_used) {</div><div class='del'>-		sec = obj_find_section(f, ".kmodtab");</div><div class='del'>-		module-&gt;deps = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;ndeps = n_ext_modules_used;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	module-&gt;init =</div><div class='del'>-		obj_symbol_final_value(f, obj_find_symbol(f, "init_module"));</div><div class='del'>-	module-&gt;cleanup =</div><div class='del'>-		obj_symbol_final_value(f, obj_find_symbol(f, "cleanup_module"));</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, "__ex_table");</div><div class='del'>-	if (sec) {</div><div class='del'>-		module-&gt;ex_table_start = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;ex_table_end = sec-&gt;header.sh_addr + sec-&gt;header.sh_size;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".text.init");</div><div class='del'>-	if (sec) {</div><div class='del'>-		module-&gt;runsize = sec-&gt;header.sh_addr - m_addr;</div><div class='del'>-	}</div><div class='del'>-	sec = obj_find_section(f, ".data.init");</div><div class='del'>-	if (sec) {</div><div class='del'>-		if (!module-&gt;runsize ||</div><div class='del'>-			module-&gt;runsize &gt; sec-&gt;header.sh_addr - m_addr)</div><div class='del'>-				module-&gt;runsize = sec-&gt;header.sh_addr - m_addr;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!arch_init_module(f, module))</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	/* Whew!  All of the initialization is complete.  Collect the final</div><div class='del'>-	   module image and give it to the kernel.  */</div><div class='del'>-</div><div class='del'>-	image = xmalloc(m_size);</div><div class='del'>-	obj_create_image(f, image);</div><div class='del'>-</div><div class='del'>-	ret = new_sys_init_module(m_name, (struct new_module *) image);</div><div class='del'>-	if (ret)</div><div class='del'>-		errorMsg("init_module: %s: %s", m_name, strerror(errno));</div><div class='del'>-</div><div class='del'>-	free(image);</div><div class='del'>-</div><div class='del'>-	return ret == 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#define new_init_module(x, y, z) TRUE</div><div class='del'>-#define new_create_this_module(x, y) 0</div><div class='del'>-#define new_create_module_ksymtab(x)</div><div class='del'>-</div><div class='del'>-#endif							/* BB_FEATURE_INSMOD_OLD_KERNEL */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_string_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-				 const char *string)</div><div class='del'>-{</div><div class='del'>-	struct obj_string_patch *p;</div><div class='del'>-	struct obj_section *strsec;</div><div class='del'>-	size_t len = strlen(string) + 1;</div><div class='del'>-	char *loc;</div><div class='del'>-</div><div class='del'>-	p = xmalloc(sizeof(*p));</div><div class='del'>-	p-&gt;next = f-&gt;string_patches;</div><div class='del'>-	p-&gt;reloc_secidx = secidx;</div><div class='del'>-	p-&gt;reloc_offset = offset;</div><div class='del'>-	f-&gt;string_patches = p;</div><div class='del'>-</div><div class='del'>-	strsec = obj_find_section(f, ".kstrtab");</div><div class='del'>-	if (strsec == NULL) {</div><div class='del'>-		strsec = obj_create_alloced_section(f, ".kstrtab", 1, len);</div><div class='del'>-		p-&gt;string_offset = 0;</div><div class='del'>-		loc = strsec-&gt;contents;</div><div class='del'>-	} else {</div><div class='del'>-		p-&gt;string_offset = strsec-&gt;header.sh_size;</div><div class='del'>-		loc = obj_extend_section(strsec, len);</div><div class='del'>-	}</div><div class='del'>-	memcpy(loc, string, len);</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_symbol_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-				 struct obj_symbol *sym)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol_patch *p;</div><div class='del'>-</div><div class='del'>-	p = xmalloc(sizeof(*p));</div><div class='del'>-	p-&gt;next = f-&gt;symbol_patches;</div><div class='del'>-	p-&gt;reloc_secidx = secidx;</div><div class='del'>-	p-&gt;reloc_offset = offset;</div><div class='del'>-	p-&gt;sym = sym;</div><div class='del'>-	f-&gt;symbol_patches = p;</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int obj_check_undefineds(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	unsigned long i;</div><div class='del'>-	int ret = 1;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-		for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-			if (sym-&gt;secidx == SHN_UNDEF) {</div><div class='del'>-				if (ELFW(ST_BIND) (sym-&gt;info) == STB_WEAK) {</div><div class='del'>-					sym-&gt;secidx = SHN_ABS;</div><div class='del'>-					sym-&gt;value = 0;</div><div class='del'>-				} else {</div><div class='del'>-					errorMsg("unresolved symbol %s", sym-&gt;name);</div><div class='del'>-					ret = 0;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void obj_allocate_commons(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct common_entry {</div><div class='del'>-		struct common_entry *next;</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-	} *common_head = NULL;</div><div class='del'>-</div><div class='del'>-	unsigned long i;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-		for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-			if (sym-&gt;secidx == SHN_COMMON) {</div><div class='del'>-				/* Collect all COMMON symbols and sort them by size so as to</div><div class='del'>-				   minimize space wasted by alignment requirements.  */</div><div class='del'>-				{</div><div class='del'>-					struct common_entry **p, *n;</div><div class='del'>-					for (p = &amp;common_head; *p; p = &amp;(*p)-&gt;next)</div><div class='del'>-						if (sym-&gt;size &lt;= (*p)-&gt;sym-&gt;size)</div><div class='del'>-							break;</div><div class='del'>-</div><div class='del'>-					n = alloca(sizeof(*n));</div><div class='del'>-					n-&gt;next = *p;</div><div class='del'>-					n-&gt;sym = sym;</div><div class='del'>-					*p = n;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 1; i &lt; f-&gt;local_symtab_size; ++i) {</div><div class='del'>-		struct obj_symbol *sym = f-&gt;local_symtab[i];</div><div class='del'>-		if (sym &amp;&amp; sym-&gt;secidx == SHN_COMMON) {</div><div class='del'>-			struct common_entry **p, *n;</div><div class='del'>-			for (p = &amp;common_head; *p; p = &amp;(*p)-&gt;next)</div><div class='del'>-				if (sym == (*p)-&gt;sym)</div><div class='del'>-					break;</div><div class='del'>-				else if (sym-&gt;size &lt; (*p)-&gt;sym-&gt;size) {</div><div class='del'>-					n = alloca(sizeof(*n));</div><div class='del'>-					n-&gt;next = *p;</div><div class='del'>-					n-&gt;sym = sym;</div><div class='del'>-					*p = n;</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (common_head) {</div><div class='del'>-		/* Find the bss section.  */</div><div class='del'>-		for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-			if (f-&gt;sections[i]-&gt;header.sh_type == SHT_NOBITS)</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-		/* If for some reason there hadn't been one, create one.  */</div><div class='del'>-		if (i == f-&gt;header.e_shnum) {</div><div class='del'>-			struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-			f-&gt;sections = xrealloc(f-&gt;sections, (i + 1) * sizeof(sec));</div><div class='del'>-			f-&gt;sections[i] = sec = arch_new_section();</div><div class='del'>-			f-&gt;header.e_shnum = i + 1;</div><div class='del'>-</div><div class='del'>-			memset(sec, 0, sizeof(*sec));</div><div class='del'>-			sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-			sec-&gt;header.sh_flags = SHF_WRITE | SHF_ALLOC;</div><div class='del'>-			sec-&gt;name = ".bss";</div><div class='del'>-			sec-&gt;idx = i;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* Allocate the COMMONS.  */</div><div class='del'>-		{</div><div class='del'>-			ElfW(Addr) bss_size = f-&gt;sections[i]-&gt;header.sh_size;</div><div class='del'>-			ElfW(Addr) max_align = f-&gt;sections[i]-&gt;header.sh_addralign;</div><div class='del'>-			struct common_entry *c;</div><div class='del'>-</div><div class='del'>-			for (c = common_head; c; c = c-&gt;next) {</div><div class='del'>-				ElfW(Addr) align = c-&gt;sym-&gt;value;</div><div class='del'>-</div><div class='del'>-				if (align &gt; max_align)</div><div class='del'>-					max_align = align;</div><div class='del'>-				if (bss_size &amp; (align - 1))</div><div class='del'>-					bss_size = (bss_size | (align - 1)) + 1;</div><div class='del'>-</div><div class='del'>-				c-&gt;sym-&gt;secidx = i;</div><div class='del'>-				c-&gt;sym-&gt;value = bss_size;</div><div class='del'>-</div><div class='del'>-				bss_size += c-&gt;sym-&gt;size;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			f-&gt;sections[i]-&gt;header.sh_size = bss_size;</div><div class='del'>-			f-&gt;sections[i]-&gt;header.sh_addralign = max_align;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* For the sake of patch relocation and parameter initialization,</div><div class='del'>-	   allocate zeroed data for NOBITS sections now.  Note that after</div><div class='del'>-	   this we cannot assume NOBITS are really empty.  */</div><div class='del'>-	for (i = 0; i &lt; f-&gt;header.e_shnum; ++i) {</div><div class='del'>-		struct obj_section *s = f-&gt;sections[i];</div><div class='del'>-		if (s-&gt;header.sh_type == SHT_NOBITS) {</div><div class='del'>-			s-&gt;contents = memset(xmalloc(s-&gt;header.sh_size),</div><div class='del'>-								 0, s-&gt;header.sh_size);</div><div class='del'>-			s-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long obj_load_size(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	unsigned long dot = 0;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	/* Finalize the positions of the sections relative to one another.  */</div><div class='del'>-</div><div class='del'>-	for (sec = f-&gt;load_order; sec; sec = sec-&gt;load_next) {</div><div class='del'>-		ElfW(Addr) align;</div><div class='del'>-</div><div class='del'>-		align = sec-&gt;header.sh_addralign;</div><div class='del'>-		if (align &amp;&amp; (dot &amp; (align - 1)))</div><div class='del'>-			dot = (dot | (align - 1)) + 1;</div><div class='del'>-</div><div class='del'>-		sec-&gt;header.sh_addr = dot;</div><div class='del'>-		dot += sec-&gt;header.sh_size;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return dot;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int obj_relocate(struct obj_file *f, ElfW(Addr) base)</div><div class='del'>-{</div><div class='del'>-	int i, n = f-&gt;header.e_shnum;</div><div class='del'>-	int ret = 1;</div><div class='del'>-</div><div class='del'>-	/* Finalize the addresses of the sections.  */</div><div class='del'>-</div><div class='del'>-	f-&gt;baseaddr = base;</div><div class='del'>-	for (i = 0; i &lt; n; ++i)</div><div class='del'>-		f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-</div><div class='del'>-	/* And iterate over all of the relocations.  */</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; n; ++i) {</div><div class='del'>-		struct obj_section *relsec, *symsec, *targsec, *strsec;</div><div class='del'>-		ElfW(RelM) * rel, *relend;</div><div class='del'>-		ElfW(Sym) * symtab;</div><div class='del'>-		const char *strtab;</div><div class='del'>-</div><div class='del'>-		relsec = f-&gt;sections[i];</div><div class='del'>-		if (relsec-&gt;header.sh_type != SHT_RELM)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		symsec = f-&gt;sections[relsec-&gt;header.sh_link];</div><div class='del'>-		targsec = f-&gt;sections[relsec-&gt;header.sh_info];</div><div class='del'>-		strsec = f-&gt;sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-		rel = (ElfW(RelM) *) relsec-&gt;contents;</div><div class='del'>-		relend = rel + (relsec-&gt;header.sh_size / sizeof(ElfW(RelM)));</div><div class='del'>-		symtab = (ElfW(Sym) *) symsec-&gt;contents;</div><div class='del'>-		strtab = (const char *) strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-		for (; rel &lt; relend; ++rel) {</div><div class='del'>-			ElfW(Addr) value = 0;</div><div class='del'>-			struct obj_symbol *intsym = NULL;</div><div class='del'>-			unsigned long symndx;</div><div class='del'>-			ElfW(Sym) * extsym = 0;</div><div class='del'>-			const char *errmsg;</div><div class='del'>-</div><div class='del'>-			/* Attempt to find a value to use for this relocation.  */</div><div class='del'>-</div><div class='del'>-			symndx = ELFW(R_SYM) (rel-&gt;r_info);</div><div class='del'>-			if (symndx) {</div><div class='del'>-				/* Note we've already checked for undefined symbols.  */</div><div class='del'>-</div><div class='del'>-				extsym = &amp;symtab[symndx];</div><div class='del'>-				if (ELFW(ST_BIND) (extsym-&gt;st_info) == STB_LOCAL) {</div><div class='del'>-					/* Local symbols we look up in the local table to be sure</div><div class='del'>-					   we get the one that is really intended.  */</div><div class='del'>-					intsym = f-&gt;local_symtab[symndx];</div><div class='del'>-				} else {</div><div class='del'>-					/* Others we look up in the hash table.  */</div><div class='del'>-					const char *name;</div><div class='del'>-					if (extsym-&gt;st_name)</div><div class='del'>-						name = strtab + extsym-&gt;st_name;</div><div class='del'>-					else</div><div class='del'>-						name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-					intsym = obj_find_symbol(f, name);</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-				value = obj_symbol_final_value(f, intsym);</div><div class='del'>-				intsym-&gt;referenced = 1;</div><div class='del'>-			}</div><div class='del'>-#if SHT_RELM == SHT_RELA</div><div class='del'>-#if defined(__alpha__) &amp;&amp; defined(AXP_BROKEN_GAS)</div><div class='del'>-			/* Work around a nasty GAS bug, that is fixed as of 2.7.0.9.  */</div><div class='del'>-			if (!extsym || !extsym-&gt;st_name ||</div><div class='del'>-				ELFW(ST_BIND) (extsym-&gt;st_info) != STB_LOCAL)</div><div class='del'>-#endif</div><div class='del'>-				value += rel-&gt;r_addend;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-			/* Do it! */</div><div class='del'>-			switch (arch_apply_relocation</div><div class='del'>-					(f, targsec, symsec, intsym, rel, value)) {</div><div class='del'>-			case obj_reloc_ok:</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case obj_reloc_overflow:</div><div class='del'>-				errmsg = "Relocation overflow";</div><div class='del'>-				goto bad_reloc;</div><div class='del'>-			case obj_reloc_dangerous:</div><div class='del'>-				errmsg = "Dangerous relocation";</div><div class='del'>-				goto bad_reloc;</div><div class='del'>-			case obj_reloc_unhandled:</div><div class='del'>-				errmsg = "Unhandled relocation";</div><div class='del'>-			  bad_reloc:</div><div class='del'>-				if (extsym) {</div><div class='del'>-					errorMsg("%s of type %ld for %s", errmsg,</div><div class='del'>-							(long) ELFW(R_TYPE) (rel-&gt;r_info),</div><div class='del'>-							strtab + extsym-&gt;st_name);</div><div class='del'>-				} else {</div><div class='del'>-					errorMsg("%s of type %ld", errmsg,</div><div class='del'>-							(long) ELFW(R_TYPE) (rel-&gt;r_info));</div><div class='del'>-				}</div><div class='del'>-				ret = 0;</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Finally, take care of the patches.  */</div><div class='del'>-</div><div class='del'>-	if (f-&gt;string_patches) {</div><div class='del'>-		struct obj_string_patch *p;</div><div class='del'>-		struct obj_section *strsec;</div><div class='del'>-		ElfW(Addr) strsec_base;</div><div class='del'>-		strsec = obj_find_section(f, ".kstrtab");</div><div class='del'>-		strsec_base = strsec-&gt;header.sh_addr;</div><div class='del'>-</div><div class='del'>-		for (p = f-&gt;string_patches; p; p = p-&gt;next) {</div><div class='del'>-			struct obj_section *targsec = f-&gt;sections[p-&gt;reloc_secidx];</div><div class='del'>-			*(ElfW(Addr) *) (targsec-&gt;contents + p-&gt;reloc_offset)</div><div class='del'>-				= strsec_base + p-&gt;string_offset;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;symbol_patches) {</div><div class='del'>-		struct obj_symbol_patch *p;</div><div class='del'>-</div><div class='del'>-		for (p = f-&gt;symbol_patches; p; p = p-&gt;next) {</div><div class='del'>-			struct obj_section *targsec = f-&gt;sections[p-&gt;reloc_secidx];</div><div class='del'>-			*(ElfW(Addr) *) (targsec-&gt;contents + p-&gt;reloc_offset)</div><div class='del'>-				= obj_symbol_final_value(f, p-&gt;sym);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int obj_create_image(struct obj_file *f, char *image)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	ElfW(Addr) base = f-&gt;baseaddr;</div><div class='del'>-</div><div class='del'>-	for (sec = f-&gt;load_order; sec; sec = sec-&gt;load_next) {</div><div class='del'>-		char *secimg;</div><div class='del'>-</div><div class='del'>-		if (sec-&gt;header.sh_size == 0)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		secimg = image + (sec-&gt;header.sh_addr - base);</div><div class='del'>-</div><div class='del'>-		/* Note that we allocated data for NOBITS sections earlier.  */</div><div class='del'>-		memcpy(secimg, sec-&gt;contents, sec-&gt;header.sh_size);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *obj_load(FILE * fp)</div><div class='del'>-{</div><div class='del'>-	struct obj_file *f;</div><div class='del'>-	ElfW(Shdr) * section_headers;</div><div class='del'>-	int shnum, i;</div><div class='del'>-	char *shstrtab;</div><div class='del'>-</div><div class='del'>-	/* Read the file header.  */</div><div class='del'>-</div><div class='del'>-	f = arch_new_file();</div><div class='del'>-	memset(f, 0, sizeof(*f));</div><div class='del'>-	f-&gt;symbol_cmp = strcmp;</div><div class='del'>-	f-&gt;symbol_hash = obj_elf_hash;</div><div class='del'>-	f-&gt;load_order_search_start = &amp;f-&gt;load_order;</div><div class='del'>-</div><div class='del'>-	fseek(fp, 0, SEEK_SET);</div><div class='del'>-	if (fread(&amp;f-&gt;header, sizeof(f-&gt;header), 1, fp) != 1) {</div><div class='del'>-		errorMsg("error reading ELF header: %s", strerror(errno));</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;header.e_ident[EI_MAG0] != ELFMAG0</div><div class='del'>-		|| f-&gt;header.e_ident[EI_MAG1] != ELFMAG1</div><div class='del'>-		|| f-&gt;header.e_ident[EI_MAG2] != ELFMAG2</div><div class='del'>-		|| f-&gt;header.e_ident[EI_MAG3] != ELFMAG3) {</div><div class='del'>-		errorMsg("not an ELF file");</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-	if (f-&gt;header.e_ident[EI_CLASS] != ELFCLASSM</div><div class='del'>-		|| f-&gt;header.e_ident[EI_DATA] != ELFDATAM</div><div class='del'>-		|| f-&gt;header.e_ident[EI_VERSION] != EV_CURRENT</div><div class='del'>-		|| !MATCH_MACHINE(f-&gt;header.e_machine)) {</div><div class='del'>-		errorMsg("ELF file not for this architecture");</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-	if (f-&gt;header.e_type != ET_REL) {</div><div class='del'>-		errorMsg("ELF file not a relocatable object");</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Read the section headers.  */</div><div class='del'>-</div><div class='del'>-	if (f-&gt;header.e_shentsize != sizeof(ElfW(Shdr))) {</div><div class='del'>-		errorMsg("section header size mismatch: %lu != %lu",</div><div class='del'>-				(unsigned long) f-&gt;header.e_shentsize,</div><div class='del'>-				(unsigned long) sizeof(ElfW(Shdr)));</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	shnum = f-&gt;header.e_shnum;</div><div class='del'>-	f-&gt;sections = xmalloc(sizeof(struct obj_section *) * shnum);</div><div class='del'>-	memset(f-&gt;sections, 0, sizeof(struct obj_section *) * shnum);</div><div class='del'>-</div><div class='del'>-	section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);</div><div class='del'>-	fseek(fp, f-&gt;header.e_shoff, SEEK_SET);</div><div class='del'>-	if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) {</div><div class='del'>-		errorMsg("error reading ELF section headers: %s", strerror(errno));</div><div class='del'>-		return NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Read the section data.  */</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; shnum; ++i) {</div><div class='del'>-		struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-		f-&gt;sections[i] = sec = arch_new_section();</div><div class='del'>-		memset(sec, 0, sizeof(*sec));</div><div class='del'>-</div><div class='del'>-		sec-&gt;header = section_headers[i];</div><div class='del'>-		sec-&gt;idx = i;</div><div class='del'>-</div><div class='del'>-		switch (sec-&gt;header.sh_type) {</div><div class='del'>-		case SHT_NULL:</div><div class='del'>-		case SHT_NOTE:</div><div class='del'>-		case SHT_NOBITS:</div><div class='del'>-			/* ignore */</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case SHT_PROGBITS:</div><div class='del'>-		case SHT_SYMTAB:</div><div class='del'>-		case SHT_STRTAB:</div><div class='del'>-		case SHT_RELM:</div><div class='del'>-			if (sec-&gt;header.sh_size &gt; 0) {</div><div class='del'>-				sec-&gt;contents = xmalloc(sec-&gt;header.sh_size);</div><div class='del'>-				fseek(fp, sec-&gt;header.sh_offset, SEEK_SET);</div><div class='del'>-				if (fread(sec-&gt;contents, sec-&gt;header.sh_size, 1, fp) != 1) {</div><div class='del'>-					errorMsg("error reading ELF section data: %s", strerror(errno));</div><div class='del'>-					return NULL;</div><div class='del'>-				}</div><div class='del'>-			} else {</div><div class='del'>-				sec-&gt;contents = NULL;</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-#if SHT_RELM == SHT_REL</div><div class='del'>-		case SHT_RELA:</div><div class='del'>-			errorMsg("RELA relocations not supported on this architecture");</div><div class='del'>-			return NULL;</div><div class='del'>-#else</div><div class='del'>-		case SHT_REL:</div><div class='del'>-			errorMsg("REL relocations not supported on this architecture");</div><div class='del'>-			return NULL;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-		default:</div><div class='del'>-			if (sec-&gt;header.sh_type &gt;= SHT_LOPROC) {</div><div class='del'>-				/* Assume processor specific section types are debug</div><div class='del'>-				   info and can safely be ignored.  If this is ever not</div><div class='del'>-				   the case (Hello MIPS?), don't put ifdefs here but</div><div class='del'>-				   create an arch_load_proc_section().  */</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			errorMsg("can't handle sections of type %ld",</div><div class='del'>-					(long) sec-&gt;header.sh_type);</div><div class='del'>-			return NULL;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Do what sort of interpretation as needed by each section.  */</div><div class='del'>-</div><div class='del'>-	shstrtab = f-&gt;sections[f-&gt;header.e_shstrndx]-&gt;contents;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; shnum; ++i) {</div><div class='del'>-		struct obj_section *sec = f-&gt;sections[i];</div><div class='del'>-		sec-&gt;name = shstrtab + sec-&gt;header.sh_name;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; shnum; ++i) {</div><div class='del'>-		struct obj_section *sec = f-&gt;sections[i];</div><div class='del'>-</div><div class='del'>-		if (sec-&gt;header.sh_flags &amp; SHF_ALLOC)</div><div class='del'>-			obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-		switch (sec-&gt;header.sh_type) {</div><div class='del'>-		case SHT_SYMTAB:</div><div class='del'>-			{</div><div class='del'>-				unsigned long nsym, j;</div><div class='del'>-				char *strtab;</div><div class='del'>-				ElfW(Sym) * sym;</div><div class='del'>-</div><div class='del'>-				if (sec-&gt;header.sh_entsize != sizeof(ElfW(Sym))) {</div><div class='del'>-					errorMsg("symbol size mismatch: %lu != %lu",</div><div class='del'>-							(unsigned long) sec-&gt;header.sh_entsize,</div><div class='del'>-							(unsigned long) sizeof(ElfW(Sym)));</div><div class='del'>-					return NULL;</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-				nsym = sec-&gt;header.sh_size / sizeof(ElfW(Sym));</div><div class='del'>-				strtab = f-&gt;sections[sec-&gt;header.sh_link]-&gt;contents;</div><div class='del'>-				sym = (ElfW(Sym) *) sec-&gt;contents;</div><div class='del'>-</div><div class='del'>-				/* Allocate space for a table of local symbols.  */</div><div class='del'>-				j = f-&gt;local_symtab_size = sec-&gt;header.sh_info;</div><div class='del'>-				f-&gt;local_symtab = xmalloc(j *=</div><div class='del'>-										  sizeof(struct obj_symbol *));</div><div class='del'>-				memset(f-&gt;local_symtab, 0, j);</div><div class='del'>-</div><div class='del'>-				/* Insert all symbols into the hash table.  */</div><div class='del'>-				for (j = 1, ++sym; j &lt; nsym; ++j, ++sym) {</div><div class='del'>-					const char *name;</div><div class='del'>-					if (sym-&gt;st_name)</div><div class='del'>-						name = strtab + sym-&gt;st_name;</div><div class='del'>-		else</div><div class='del'>-						name = f-&gt;sections[sym-&gt;st_shndx]-&gt;name;</div><div class='del'>-</div><div class='del'>-					obj_add_symbol(f, name, j, sym-&gt;st_info, sym-&gt;st_shndx,</div><div class='del'>-								   sym-&gt;st_value, sym-&gt;st_size);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case SHT_RELM:</div><div class='del'>-			if (sec-&gt;header.sh_entsize != sizeof(ElfW(RelM))) {</div><div class='del'>-				errorMsg("relocation entry size mismatch: %lu != %lu",</div><div class='del'>-						(unsigned long) sec-&gt;header.sh_entsize,</div><div class='del'>-						(unsigned long) sizeof(ElfW(RelM)));</div><div class='del'>-				return NULL;</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return f;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void hide_special_symbols(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	static const char *const specials[] = {</div><div class='del'>-		"cleanup_module",</div><div class='del'>-		"init_module",</div><div class='del'>-		"kernel_version",</div><div class='del'>-		NULL</div><div class='del'>-	};</div><div class='del'>-</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	const char *const *p;</div><div class='del'>-</div><div class='del'>-	for (p = specials; *p; ++p)</div><div class='del'>-		if ((sym = obj_find_symbol(f, *p)) != NULL)</div><div class='del'>-			sym-&gt;info =</div><div class='del'>-				ELFW(ST_INFO) (STB_LOCAL, ELFW(ST_TYPE) (sym-&gt;info));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void my_usage(void)</div><div class='del'>-{</div><div class='del'>-	printf("Usage.");</div><div class='del'>-	exit(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern int insmod_main( int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	int k_crcs;</div><div class='del'>-	int k_new_syscalls;</div><div class='del'>-	int len;</div><div class='del'>-	char *tmp;</div><div class='del'>-	unsigned long m_size;</div><div class='del'>-	ElfW(Addr) m_addr;</div><div class='del'>-	FILE *fp;</div><div class='del'>-	struct obj_file *f;</div><div class='del'>-	char m_name[BUFSIZ + 1] = "\0";</div><div class='del'>-	int exit_status = FALSE;</div><div class='del'>-	int m_has_modinfo;</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-	int k_version;</div><div class='del'>-	char k_strversion[STRVERSIONLEN];</div><div class='del'>-	char m_strversion[STRVERSIONLEN];</div><div class='del'>-	int m_version;</div><div class='del'>-	int m_crcs;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if (argc &lt;= 1)</div><div class='del'>-		my_usage();</div><div class='del'>-</div><div class='del'>-	argv++; argc--;</div><div class='del'>-</div><div class='del'>-	/* Grab the module name */</div><div class='del'>-	if ((tmp = strrchr(*argv, '/')) != NULL) {</div><div class='del'>-		tmp++;</div><div class='del'>-	} else {</div><div class='del'>-		tmp = *argv;</div><div class='del'>-	}</div><div class='del'>-	len = strlen(tmp);</div><div class='del'>-</div><div class='del'>-	if (len &gt; 2 &amp;&amp; tmp[len - 2] == '.' &amp;&amp; tmp[len - 1] == 'o')</div><div class='del'>-		len -= 2;</div><div class='del'>-	memcpy(m_name, tmp, len);</div><div class='del'>-	strcpy(m_fullName, m_name);</div><div class='del'>-	strcat(m_fullName, ".o");</div><div class='del'>-</div><div class='del'>-	/* Get a filedesc for the module */</div><div class='del'>-	if ((fp = fopen(*argv, "r")) == NULL) {</div><div class='del'>-		errorMsg("Module %s not found", *argv);</div><div class='del'>-		return -1;</div><div class='del'>-	} else</div><div class='del'>-		memcpy(m_filename, *argv, strlen(*argv));</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if ((f = obj_load(fp)) == NULL) {</div><div class='del'>-		logperror("Could not load the module");</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (get_modinfo_value(f, "kernel_version") == NULL)</div><div class='del'>-		m_has_modinfo = 0;</div><div class='del'>-	else</div><div class='del'>-		m_has_modinfo = 1;</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-	/* Version correspondence?  */</div><div class='del'>-</div><div class='del'>-	k_version = get_kernel_version(k_strversion);</div><div class='del'>-	if (m_has_modinfo) {</div><div class='del'>-		m_version = new_get_module_version(f, m_strversion);</div><div class='del'>-	} else {</div><div class='del'>-		m_version = old_get_module_version(f, m_strversion);</div><div class='del'>-		if (m_version == -1) {</div><div class='del'>-			errorMsg("couldn't find the kernel version the module was "</div><div class='del'>-					"compiled for");</div><div class='del'>-			goto out;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (strncmp(k_strversion, m_strversion, STRVERSIONLEN) != 0) {</div><div class='del'>-		if (flag_force_load) {</div><div class='del'>-			errorMsg("Warning: kernel-module version mismatch\n"</div><div class='del'>-					"\t%s was compiled for kernel version %s\n"</div><div class='del'>-					"\twhile this kernel is version %s",</div><div class='del'>-					m_filename, m_strversion, k_strversion);</div><div class='del'>-		} else {</div><div class='del'>-			errorMsg("kernel-module version mismatch\n"</div><div class='del'>-					"\t%s was compiled for kernel version %s\n"</div><div class='del'>-					"\twhile this kernel is version %s.",</div><div class='del'>-					m_filename, m_strversion, k_strversion);</div><div class='del'>-			goto out;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	k_crcs = 0;</div><div class='del'>-#endif							/* BB_FEATURE_INSMOD_VERSION_CHECKING */</div><div class='del'>-</div><div class='del'>-	k_new_syscalls = !query_module(NULL, 0, NULL, 0, NULL);</div><div class='del'>-</div><div class='del'>-	if (k_new_syscalls) {</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_NEW_KERNEL</div><div class='del'>-		if (!new_get_kernel_symbols())</div><div class='del'>-			goto out;</div><div class='del'>-		k_crcs = new_is_kernel_checksummed();</div><div class='del'>-#else</div><div class='del'>-		errorMsg("Not configured to support new kernels");</div><div class='del'>-		goto out;</div><div class='del'>-#endif</div><div class='del'>-	} else {</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_OLD_KERNEL</div><div class='del'>-		if (!old_get_kernel_symbols(m_name))</div><div class='del'>-			goto out;</div><div class='del'>-		k_crcs = old_is_kernel_checksummed();</div><div class='del'>-#else</div><div class='del'>-		errorMsg("Not configured to support old kernels");</div><div class='del'>-		goto out;</div><div class='del'>-#endif</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING</div><div class='del'>-	if (m_has_modinfo)</div><div class='del'>-		m_crcs = new_is_module_checksummed(f);</div><div class='del'>-	else</div><div class='del'>-		m_crcs = old_is_module_checksummed(f);</div><div class='del'>-</div><div class='del'>-	if (m_crcs != k_crcs)</div><div class='del'>-		obj_set_symbol_compare(f, ncv_strcmp, ncv_symbol_hash);</div><div class='del'>-#endif							/* BB_FEATURE_INSMOD_VERSION_CHECKING */</div><div class='del'>-</div><div class='del'>-	/* Let the module know about the kernel symbols.  */</div><div class='del'>-	add_kernel_symbols(f);</div><div class='del'>-</div><div class='del'>-	/* Allocate common symbols, symbol tables, and string tables.  */</div><div class='del'>-</div><div class='del'>-	if (k_new_syscalls </div><div class='del'>-		? !new_create_this_module(f, m_name)</div><div class='del'>-		: !old_create_mod_use_count(f)) </div><div class='del'>-	{</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!obj_check_undefineds(f)) {</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-	obj_allocate_commons(f);</div><div class='del'>-</div><div class='del'>-	if (m_has_modinfo</div><div class='del'>-	    ? !new_process_module_arguments(f, argc-1, argv+1)</div><div class='del'>-	    : !old_process_module_arguments(f, argc-1, argv+1)) </div><div class='del'>-	{</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	arch_create_got(f);</div><div class='del'>-	hide_special_symbols(f);</div><div class='del'>-</div><div class='del'>-	if (k_new_syscalls)</div><div class='del'>-		new_create_module_ksymtab(f);</div><div class='del'>-</div><div class='del'>-	/* Find current size of the module */</div><div class='del'>-	m_size = obj_load_size(f);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	errno = 0;</div><div class='del'>-	m_addr = create_module(m_name, m_size);</div><div class='del'>-	switch (errno) {</div><div class='del'>-	case 0:</div><div class='del'>-		break;</div><div class='del'>-	case EEXIST:</div><div class='del'>-		errorMsg("A module named %s already exists", m_name);</div><div class='del'>-		/* Considered as a success in stage1 */</div><div class='del'>-		fclose(fp);</div><div class='del'>-		return(TRUE);</div><div class='del'>-	case ENOMEM:</div><div class='del'>-		errorMsg("Can't allocate kernel memory for module; needed %lu bytes",</div><div class='del'>-				m_size);</div><div class='del'>-		goto out;</div><div class='del'>-	default:</div><div class='del'>-		errorMsg("create_module: %s: %s", m_name, strerror(errno));</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!obj_relocate(f, m_addr)) {</div><div class='del'>-		delete_module(m_name);</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (k_new_syscalls </div><div class='del'>-		? !new_init_module(m_name, f, m_size)</div><div class='del'>-		: !old_init_module(m_name, f, m_size)) </div><div class='del'>-	{</div><div class='del'>-		delete_module(m_name);</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	exit_status = TRUE;</div><div class='del'>-</div><div class='del'>-out:</div><div class='del'>-	fclose(fp);</div><div class='del'>-	return(exit_status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int insmod_call(char * full_filename, char * params)</div><div class='del'>-{</div><div class='del'>-	int argc = 2;</div><div class='del'>-	char *argv[50];</div><div class='del'>-	char * ptr = params;</div><div class='del'>-	argv[0] = "stage1";</div><div class='del'>-	argv[1] = full_filename;</div><div class='del'>-</div><div class='del'>-	while (ptr != NULL) {</div><div class='del'>-		argv[argc] = ptr;</div><div class='del'>-		argc++;</div><div class='del'>-		ptr = strchr(ptr, ' ');</div><div class='del'>-		if (ptr) {</div><div class='del'>-			ptr[0] = '\0';</div><div class='del'>-			ptr++;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return insmod_main(argc, argv);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/loop.h b/mdk-stage1/insmod-busybox/loop.h<br/>deleted file mode 100644<br/>index cba8c6b2b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/loop.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/loop.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-#include &lt;linux/posix_types.h&gt;</div><div class='del'>-#undef dev_t</div><div class='del'>-#define dev_t __kernel_dev_t</div><div class='del'>-#include &lt;linux/loop.h&gt;</div><div class='del'>-#undef dev_t</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/messages.c b/mdk-stage1/insmod-busybox/messages.c<br/>deleted file mode 100644<br/>index 81fd9c75c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/messages.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/messages.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,90 +0,0 @@</div><div class='del'>-/* vi: set sw=4 ts=4: */</div><div class='del'>-/*</div><div class='del'>- * Copyright (C) 2000 by BitterSweet Enterprises, LLC.</div><div class='del'>- * Written by Karl M. Hegbloom &lt;karlheg@debian.org&gt;</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify</div><div class='del'>- * it under the terms of the GNU General Public License as published by</div><div class='del'>- * the Free Software Foundation; either version 2 of the License, or</div><div class='del'>- * (at your option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful,</div><div class='del'>- * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Let's put all of these messages in one place, and link this in as</div><div class='del'>- *  a separate object module, so that there are not going to be</div><div class='del'>- *  multiple non-unique but very similar strings in the binary.</div><div class='del'>- *  Perhaps this will make it simpler to internationalize also, and</div><div class='del'>- *  may make the binary slightly smaller.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-// To use this header file, include something like this:</div><div class='del'>-//</div><div class='del'>-//#define BB_DECLARE_EXTERN</div><div class='del'>-//#define bb_need_memory_exhausted</div><div class='del'>-//#include "messages.c"</div><div class='del'>-//</div><div class='del'>-//Then just use the string memory_exhausted when it is needed.</div><div class='del'>-//</div><div class='del'>-</div><div class='del'>-#include "busybox.h"</div><div class='del'>-#ifndef _BB_MESSAGES_C</div><div class='del'>-#define _BB_MESSAGES_C</div><div class='del'>-</div><div class='del'>-#ifdef BB_DECLARE_EXTERN</div><div class='del'>-#  define BB_DEF_MESSAGE(symbol, string_const) extern const char *symbol;</div><div class='del'>-#else</div><div class='del'>-#  define BB_DEF_MESSAGE(symbol, string_const) const char *symbol = string_const;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(full_version,</div><div class='del'>-	 "BusyBox v" BB_VER " (" BB_BT ") multi-call binary -- GPL2")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(name_too_long, "file name too long\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_omitting_directory || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(omitting_directory, "%s: omitting directory\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_not_a_directory || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(not_a_directory, "%s: not a directory\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_memory_exhausted || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(memory_exhausted, "memory exhausted\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_invalid_date || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(invalid_date, "invalid date `%s'\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_invalid_option || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(invalid_option, "invalid option -- %c\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_io_error || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(io_error, "%s: input/output error -- %s\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_help || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(dash_dash_help, "--help")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_write_error || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(write_error, "Write Error\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_too_few_args || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(too_few_args, "too few arguments\n")</div><div class='del'>-#endif</div><div class='del'>-#if defined bb_need_name_longer_then_foo || ! defined BB_DECLARE_EXTERN</div><div class='del'>-	BB_DEF_MESSAGE(name_longer_then_foo, "Names longer then %d chars not supported.\n")</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif /* _BB_MESSAGES_C */</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-busybox/utility.c b/mdk-stage1/insmod-busybox/utility.c<br/>deleted file mode 100644<br/>index ffd323347..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-busybox/utility.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-busybox/utility.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1759 +0,0 @@</div><div class='del'>-/* vi: set sw=4 ts=4: */</div><div class='del'>-/*</div><div class='del'>- * Utility routines.</div><div class='del'>- *</div><div class='del'>- * Copyright (C) tons of folks.  Tracking down who wrote what</div><div class='del'>- * isn't something I'm going to worry about...  If you wrote something</div><div class='del'>- * here, please feel free to acknowledge your work.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify</div><div class='del'>- * it under the terms of the GNU General Public License as published by</div><div class='del'>- * the Free Software Foundation; either version 2 of the License, or</div><div class='del'>- * (at your option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful,</div><div class='del'>- * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</div><div class='del'>- *</div><div class='del'>- * Based in part on code from sash, Copyright (c) 1999 by David I. Bell </div><div class='del'>- * Permission has been granted to redistribute this code under the GPL.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include "busybox.h"</div><div class='del'>-#if defined (BB_CHMOD_CHOWN_CHGRP) \</div><div class='del'>- || defined (BB_CP_MV)		   \</div><div class='del'>- || defined (BB_FIND)		   \</div><div class='del'>- || defined (BB_INSMOD)		   \</div><div class='del'>- || defined (BB_LS)		   \</div><div class='del'>- || defined (BB_RM)		   \</div><div class='del'>- || defined (BB_TAR)</div><div class='del'>-/* same conditions as recursiveAction */</div><div class='del'>-#define bb_need_name_too_long</div><div class='del'>-#endif</div><div class='del'>-#define bb_need_memory_exhausted</div><div class='del'>-#define bb_need_full_version</div><div class='del'>-#define BB_DECLARE_EXTERN</div><div class='del'>-#include "messages.c"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;utime.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;		/* for uname(2) */</div><div class='del'>-</div><div class='del'>-/* Busybox mount uses either /proc/filesystems or /dev/mtab to get the </div><div class='del'>- * list of available filesystems used for the -t auto option */ </div><div class='del'>-#if defined BB_FEATURE_USE_PROCFS &amp;&amp; defined BB_FEATURE_USE_DEVPS_PATCH</div><div class='del'>-//#error Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again.</div><div class='del'>-#error "Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again."</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF</div><div class='del'>-#  if defined BB_MTAB</div><div class='del'>-const char mtab_file[] = "/etc/mtab";</div><div class='del'>-#  else</div><div class='del'>-#    if defined BB_FEATURE_USE_PROCFS</div><div class='del'>-const char mtab_file[] = "/proc/mounts";</div><div class='del'>-#    else</div><div class='del'>-#      if defined BB_FEATURE_USE_DEVPS_PATCH</div><div class='del'>-const char mtab_file[] = "/dev/mtab";</div><div class='del'>-#    else</div><div class='del'>-#        error With (BB_MOUNT||BB_UMOUNT||BB_DF) defined, you must define either BB_MTAB or ( BB_FEATURE_USE_PROCFS | BB_FEATURE_USE_DEVPS_PATCH)</div><div class='del'>-#    endif</div><div class='del'>-#  endif</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef _STANDALONE_</div><div class='del'>-void errorMsg(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	fflush(stdout);</div><div class='del'>-	printf("busybox: ");</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vprintf(s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-	printf("\n");</div><div class='del'>-	fflush(stdout);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void logperror(char *s)</div><div class='del'>-{</div><div class='del'>-		perror(s);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void fatalError(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	fflush(stdout);</div><div class='del'>-	fprintf(stdout, "busybox: ");</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vfprintf(stdout, s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-	fprintf(stdout, "\n");</div><div class='del'>-	fflush(stdout);</div><div class='del'>-	exit(FALSE);</div><div class='del'>-}</div><div class='del'>-#else /* _STANDALONE_ */</div><div class='del'>-#include "../log.h"</div><div class='del'>-extern void errorMsg(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vlog_message(s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void logperror(char *s)</div><div class='del'>-{</div><div class='del'>-		log_perror(s);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void fatalError(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vlog_message(s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-	while (1);</div><div class='del'>-}</div><div class='del'>-#endif /* _STANDALONE_ */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_INIT</div><div class='del'>-/* Returns kernel version encoded as major*65536 + minor*256 + patch,</div><div class='del'>- * so, for example,  to check if the kernel is greater than 2.2.11:</div><div class='del'>- *     if (get_kernel_revision() &lt;= 2*65536+2*256+11) { &lt;stuff&gt; }</div><div class='del'>- */</div><div class='del'>-extern int get_kernel_revision(void)</div><div class='del'>-{</div><div class='del'>-	struct utsname name;</div><div class='del'>-	int major = 0, minor = 0, patch = 0;</div><div class='del'>-</div><div class='del'>-	if (uname(&amp;name) == -1) {</div><div class='del'>-		perror("cannot get system information");</div><div class='del'>-		return (0);</div><div class='del'>-	}</div><div class='del'>-	sscanf(name.version, "%d.%d.%d", &amp;major, &amp;minor, &amp;patch);</div><div class='del'>-	return major * 65536 + minor * 256 + patch;</div><div class='del'>-}</div><div class='del'>-#endif                                                 /* BB_INIT */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME</div><div class='del'>-_syscall1(int, sysinfo, struct sysinfo *, info);</div><div class='del'>-#endif                                                 /* BB_INIT */</div><div class='del'>-</div><div class='del'>-#if defined BB_MOUNT || defined BB_UMOUNT</div><div class='del'>-</div><div class='del'>-#ifndef __NR_umount2</div><div class='del'>-#define __NR_umount2           52</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Include our own version of &lt;sys/mount.h&gt;, since libc5 doesn't</div><div class='del'>- * know about umount2 */</div><div class='del'>-extern _syscall1(int, umount, const char *, special_file);</div><div class='del'>-extern _syscall2(int, umount2, const char *, special_file, int, flags);</div><div class='del'>-extern _syscall5(int, mount, const char *, special_file, const char *, dir,</div><div class='del'>-		const char *, fstype, unsigned long int, rwflag, const void *, data);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_INSMOD || defined BB_LSMOD</div><div class='del'>-#ifndef __NR_query_module</div><div class='del'>-#define __NR_query_module     167</div><div class='del'>-#endif</div><div class='del'>-_syscall5(int, query_module, const char *, name, int, which,</div><div class='del'>-		void *, buf, size_t, bufsize, size_t*, ret);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined (BB_CP_MV) || defined (BB_DU)</div><div class='del'>-</div><div class='del'>-#define HASH_SIZE	311		/* Should be prime */</div><div class='del'>-#define hash_inode(i)	((i) % HASH_SIZE)</div><div class='del'>-</div><div class='del'>-static ino_dev_hashtable_bucket_t *ino_dev_hashtable[HASH_SIZE];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return 1 if statbuf-&gt;st_ino &amp;&amp; statbuf-&gt;st_dev are recorded in</div><div class='del'>- * `ino_dev_hashtable', else return 0</div><div class='del'>- *</div><div class='del'>- * If NAME is a non-NULL pointer to a character pointer, and there is</div><div class='del'>- * a match, then set *NAME to the value of the name slot in that</div><div class='del'>- * bucket.</div><div class='del'>- */</div><div class='del'>-int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name)</div><div class='del'>-{</div><div class='del'>-	ino_dev_hashtable_bucket_t *bucket;</div><div class='del'>-</div><div class='del'>-	bucket = ino_dev_hashtable[hash_inode(statbuf-&gt;st_ino)];</div><div class='del'>-	while (bucket != NULL) {</div><div class='del'>-	  if ((bucket-&gt;ino == statbuf-&gt;st_ino) &amp;&amp;</div><div class='del'>-		  (bucket-&gt;dev == statbuf-&gt;st_dev))</div><div class='del'>-	  {</div><div class='del'>-		if (name) *name = bucket-&gt;name;</div><div class='del'>-		return 1;</div><div class='del'>-	  }</div><div class='del'>-	  bucket = bucket-&gt;next;</div><div class='del'>-	}</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Add statbuf to statbuf hash table */</div><div class='del'>-void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name)</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-	size_t s;</div><div class='del'>-	ino_dev_hashtable_bucket_t *bucket;</div><div class='del'>-    </div><div class='del'>-	i = hash_inode(statbuf-&gt;st_ino);</div><div class='del'>-	s = name ? strlen(name) : 0;</div><div class='del'>-	bucket = xmalloc(sizeof(ino_dev_hashtable_bucket_t) + s);</div><div class='del'>-	bucket-&gt;ino = statbuf-&gt;st_ino;</div><div class='del'>-	bucket-&gt;dev = statbuf-&gt;st_dev;</div><div class='del'>-	if (name)</div><div class='del'>-		strcpy(bucket-&gt;name, name);</div><div class='del'>-	else</div><div class='del'>-		bucket-&gt;name[0] = '\0';</div><div class='del'>-	bucket-&gt;next = ino_dev_hashtable[i];</div><div class='del'>-	ino_dev_hashtable[i] = bucket;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Clear statbuf hash table */</div><div class='del'>-void reset_ino_dev_hashtable(void)</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-	ino_dev_hashtable_bucket_t *bucket;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; HASH_SIZE; i++) {</div><div class='del'>-		while (ino_dev_hashtable[i] != NULL) {</div><div class='del'>-			bucket = ino_dev_hashtable[i]-&gt;next;</div><div class='del'>-			free(ino_dev_hashtable[i]);</div><div class='del'>-			ino_dev_hashtable[i] = bucket;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* BB_CP_MV || BB_DU */</div><div class='del'>-</div><div class='del'>-#if defined (BB_CP_MV) || defined (BB_DU) || defined (BB_LN) || defined (BB_AR)</div><div class='del'>-/*</div><div class='del'>- * Return TRUE if a fileName is a directory.</div><div class='del'>- * Nonexistant files return FALSE.</div><div class='del'>- */</div><div class='del'>-int isDirectory(const char *fileName, const int followLinks, struct stat *statBuf)</div><div class='del'>-{</div><div class='del'>-	int status;</div><div class='del'>-	int didMalloc = 0;</div><div class='del'>-</div><div class='del'>-	if (statBuf == NULL) {</div><div class='del'>-	    statBuf = (struct stat *)xmalloc(sizeof(struct stat));</div><div class='del'>-	    ++didMalloc;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (followLinks == TRUE)</div><div class='del'>-		status = stat(fileName, statBuf);</div><div class='del'>-	else</div><div class='del'>-		status = lstat(fileName, statBuf);</div><div class='del'>-</div><div class='del'>-	if (status &lt; 0 || !(S_ISDIR(statBuf-&gt;st_mode))) {</div><div class='del'>-	    status = FALSE;</div><div class='del'>-	}</div><div class='del'>-	else status = TRUE;</div><div class='del'>-</div><div class='del'>-	if (didMalloc) {</div><div class='del'>-	    free(statBuf);</div><div class='del'>-	    statBuf = NULL;</div><div class='del'>-	}</div><div class='del'>-	return status;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined (BB_AR) || defined BB_CP_MV</div><div class='del'>-/*</div><div class='del'>- * Copy readSize bytes between two file descriptors</div><div class='del'>- */</div><div class='del'>-int copySubFile(int srcFd, int dstFd, size_t remaining)</div><div class='del'>-{</div><div class='del'>-        size_t size;</div><div class='del'>-        char buffer[BUFSIZ];</div><div class='del'>-</div><div class='del'>-        while (remaining &gt; 0) {</div><div class='del'>-                if (remaining &gt; BUFSIZ)</div><div class='del'>-                        size = BUFSIZ;</div><div class='del'>-                else</div><div class='del'>-                        size = remaining;</div><div class='del'>-                if (fullWrite(dstFd, buffer, fullRead(srcFd, buffer, size)) &lt; size)</div><div class='del'>-                        return(FALSE);</div><div class='del'>-                remaining -= size;</div><div class='del'>-        }</div><div class='del'>-        return (TRUE);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined (BB_CP_MV)</div><div class='del'>-/*</div><div class='del'>- * Copy one file to another, while possibly preserving its modes, times, and</div><div class='del'>- * modes.  Returns TRUE if successful, or FALSE on a failure with an error</div><div class='del'>- * message output.  (Failure is not indicated if attributes cannot be set.)</div><div class='del'>- * -Erik Andersen</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-copyFile(const char *srcName, const char *destName,</div><div class='del'>-		 int setModes, int followLinks, int forceFlag)</div><div class='del'>-{</div><div class='del'>-	int rfd;</div><div class='del'>-	int wfd;</div><div class='del'>-	int status;</div><div class='del'>-	struct stat srcStatBuf;</div><div class='del'>-	struct stat dstStatBuf;</div><div class='del'>-	struct utimbuf times;</div><div class='del'>-</div><div class='del'>-	if (followLinks == TRUE)</div><div class='del'>-		status = stat(srcName, &amp;srcStatBuf);</div><div class='del'>-	else</div><div class='del'>-		status = lstat(srcName, &amp;srcStatBuf);</div><div class='del'>-</div><div class='del'>-	if (status &lt; 0) {</div><div class='del'>-		perror(srcName);</div><div class='del'>-		return FALSE;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (followLinks == TRUE)</div><div class='del'>-		status = stat(destName, &amp;dstStatBuf);</div><div class='del'>-	else</div><div class='del'>-		status = lstat(destName, &amp;dstStatBuf);</div><div class='del'>-</div><div class='del'>-	if (status &lt; 0 || forceFlag==TRUE) {</div><div class='del'>-		unlink(destName);</div><div class='del'>-		dstStatBuf.st_ino = -1;</div><div class='del'>-		dstStatBuf.st_dev = -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((srcStatBuf.st_dev == dstStatBuf.st_dev) &amp;&amp;</div><div class='del'>-		(srcStatBuf.st_ino == dstStatBuf.st_ino)) {</div><div class='del'>-		errorMsg("Copying file \"%s\" to itself\n", srcName);</div><div class='del'>-		return FALSE;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (S_ISDIR(srcStatBuf.st_mode)) {</div><div class='del'>-		//fprintf(stderr, "copying directory %s to %s\n", srcName, destName);</div><div class='del'>-		/* Make sure the directory is writable */</div><div class='del'>-		status = mkdir(destName, 0777777 ^ umask(0));</div><div class='del'>-		if (status &lt; 0 &amp;&amp; errno != EEXIST) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-	} else if (S_ISLNK(srcStatBuf.st_mode)) {</div><div class='del'>-		char link_val[BUFSIZ + 1];</div><div class='del'>-		int link_size;</div><div class='del'>-</div><div class='del'>-		//fprintf(stderr, "copying link %s to %s\n", srcName, destName);</div><div class='del'>-		/* Warning: This could possibly truncate silently, to BUFSIZ chars */</div><div class='del'>-		link_size = readlink(srcName, &amp;link_val[0], BUFSIZ);</div><div class='del'>-		if (link_size &lt; 0) {</div><div class='del'>-			perror(srcName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-		link_val[link_size] = '\0';</div><div class='del'>-		status = symlink(link_val, destName);</div><div class='del'>-		if (status &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-#if (__GLIBC__ &gt;= 2) &amp;&amp; (__GLIBC_MINOR__ &gt;= 1)</div><div class='del'>-		if (setModes == TRUE) {</div><div class='del'>-			/* Try to set owner, but fail silently like GNU cp */</div><div class='del'>-			lchown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid);</div><div class='del'>-		}</div><div class='del'>-#endif</div><div class='del'>-		return TRUE;</div><div class='del'>-	} else if (S_ISFIFO(srcStatBuf.st_mode)) {</div><div class='del'>-		//fprintf(stderr, "copying fifo %s to %s\n", srcName, destName);</div><div class='del'>-		if (mkfifo(destName, 0644) &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-	} else if (S_ISBLK(srcStatBuf.st_mode) || S_ISCHR(srcStatBuf.st_mode)</div><div class='del'>-			   || S_ISSOCK(srcStatBuf.st_mode)) {</div><div class='del'>-		//fprintf(stderr, "copying soc, blk, or chr %s to %s\n", srcName, destName);</div><div class='del'>-		if (mknod(destName, srcStatBuf.st_mode, srcStatBuf.st_rdev) &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-	} else if (S_ISREG(srcStatBuf.st_mode)) {</div><div class='del'>-		//fprintf(stderr, "copying regular file %s to %s\n", srcName, destName);</div><div class='del'>-		rfd = open(srcName, O_RDONLY);</div><div class='del'>-		if (rfd &lt; 0) {</div><div class='del'>-			perror(srcName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	 	wfd = open(destName, O_WRONLY | O_CREAT | O_TRUNC,</div><div class='del'>-				 srcStatBuf.st_mode);</div><div class='del'>-		if (wfd &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			close(rfd);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (copySubFile(rfd, wfd, srcStatBuf.st_size)==FALSE)</div><div class='del'>-			goto error_exit;	</div><div class='del'>-		</div><div class='del'>-		close(rfd);</div><div class='del'>-		if (close(wfd) &lt; 0) {</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (setModes == TRUE) {</div><div class='del'>-		/* This is fine, since symlinks never get here */</div><div class='del'>-		if (chown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid) &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			exit FALSE;</div><div class='del'>-		}</div><div class='del'>-		if (chmod(destName, srcStatBuf.st_mode) &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			exit FALSE;</div><div class='del'>-		}</div><div class='del'>-		times.actime = srcStatBuf.st_atime;</div><div class='del'>-		times.modtime = srcStatBuf.st_mtime;</div><div class='del'>-		if (utime(destName, &amp;times) &lt; 0) {</div><div class='del'>-			perror(destName);</div><div class='del'>-			exit FALSE;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return TRUE;</div><div class='del'>-</div><div class='del'>-  error_exit:</div><div class='del'>-	perror(destName);</div><div class='del'>-	close(rfd);</div><div class='del'>-	close(wfd);</div><div class='del'>-</div><div class='del'>-	return FALSE;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_CP_MV */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_TAR || defined BB_LS ||defined BB_AR</div><div class='del'>-</div><div class='del'>-#define TYPEINDEX(mode) (((mode) &gt;&gt; 12) &amp; 0x0f)</div><div class='del'>-#define TYPECHAR(mode)  ("0pcCd?bB-?l?s???" [TYPEINDEX(mode)])</div><div class='del'>-</div><div class='del'>-/* The special bits. If set, display SMODE0/1 instead of MODE0/1 */</div><div class='del'>-static const mode_t SBIT[] = {</div><div class='del'>-	0, 0, S_ISUID,</div><div class='del'>-	0, 0, S_ISGID,</div><div class='del'>-	0, 0, S_ISVTX</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* The 9 mode bits to test */</div><div class='del'>-static const mode_t MBIT[] = {</div><div class='del'>-	S_IRUSR, S_IWUSR, S_IXUSR,</div><div class='del'>-	S_IRGRP, S_IWGRP, S_IXGRP,</div><div class='del'>-	S_IROTH, S_IWOTH, S_IXOTH</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define MODE1  "rwxrwxrwx"</div><div class='del'>-#define MODE0  "---------"</div><div class='del'>-#define SMODE1 "..s..s..t"</div><div class='del'>-#define SMODE0 "..S..S..T"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return the standard ls-like mode string from a file mode.</div><div class='del'>- * This is static and so is overwritten on each call.</div><div class='del'>- */</div><div class='del'>-const char *modeString(int mode)</div><div class='del'>-{</div><div class='del'>-	static char buf[12];</div><div class='del'>-</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	buf[0] = TYPECHAR(mode);</div><div class='del'>-	for (i = 0; i &lt; 9; i++) {</div><div class='del'>-		if (mode &amp; SBIT[i])</div><div class='del'>-			buf[i + 1] = (mode &amp; MBIT[i]) ? SMODE1[i] : SMODE0[i];</div><div class='del'>-		else</div><div class='del'>-			buf[i + 1] = (mode &amp; MBIT[i]) ? MODE1[i] : MODE0[i];</div><div class='del'>-	}</div><div class='del'>-	return buf;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_TAR || BB_LS */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_TAR || defined BB_AR</div><div class='del'>-/*</div><div class='del'>- * Return the standard ls-like time string from a time_t</div><div class='del'>- * This is static and so is overwritten on each call.</div><div class='del'>- */</div><div class='del'>-const char *timeString(time_t timeVal)</div><div class='del'>-{</div><div class='del'>-	time_t now;</div><div class='del'>-	char *str;</div><div class='del'>-	static char buf[26];</div><div class='del'>-</div><div class='del'>-	time(&amp;now);</div><div class='del'>-</div><div class='del'>-	str = ctime(&amp;timeVal);</div><div class='del'>-</div><div class='del'>-	strcpy(buf, &amp;str[4]);</div><div class='del'>-	buf[12] = '\0';</div><div class='del'>-</div><div class='del'>-	if ((timeVal &gt; now) || (timeVal &lt; now - 365 * 24 * 60 * 60L)) {</div><div class='del'>-		strcpy(&amp;buf[7], &amp;str[20]);</div><div class='del'>-		buf[11] = '\0';</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return buf;</div><div class='del'>-}</div><div class='del'>-#endif /* BB_TAR || BB_AR */</div><div class='del'>-</div><div class='del'>-#if defined BB_TAR || defined BB_CP_MV || defined BB_AR</div><div class='del'>-/*</div><div class='del'>- * Write all of the supplied buffer out to a file.</div><div class='del'>- * This does multiple writes as necessary.</div><div class='del'>- * Returns the amount written, or -1 on an error.</div><div class='del'>- */</div><div class='del'>-int fullWrite(int fd, const char *buf, int len)</div><div class='del'>-{</div><div class='del'>-	int cc;</div><div class='del'>-	int total;</div><div class='del'>-</div><div class='del'>-	total = 0;</div><div class='del'>-</div><div class='del'>-	while (len &gt; 0) {</div><div class='del'>-		cc = write(fd, buf, len);</div><div class='del'>-</div><div class='del'>-		if (cc &lt; 0)</div><div class='del'>-			return -1;</div><div class='del'>-</div><div class='del'>-		buf += cc;</div><div class='del'>-		total += cc;</div><div class='del'>-		len -= cc;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return total;</div><div class='del'>-}</div><div class='del'>-#endif /* BB_TAR || BB_CP_MV || BB_AR */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_TAR || defined BB_TAIL || defined BB_AR || defined BB_SH || defined BB_CP_MV</div><div class='del'>-/*</div><div class='del'>- * Read all of the supplied buffer from a file.</div><div class='del'>- * This does multiple reads as necessary.</div><div class='del'>- * Returns the amount read, or -1 on an error.</div><div class='del'>- * A short read is returned on an end of file.</div><div class='del'>- */</div><div class='del'>-int fullRead(int fd, char *buf, int len)</div><div class='del'>-{</div><div class='del'>-	int cc;</div><div class='del'>-	int total;</div><div class='del'>-</div><div class='del'>-	total = 0;</div><div class='del'>-</div><div class='del'>-	while (len &gt; 0) {</div><div class='del'>-		cc = read(fd, buf, len);</div><div class='del'>-</div><div class='del'>-		if (cc &lt; 0)</div><div class='del'>-			return -1;</div><div class='del'>-</div><div class='del'>-		if (cc == 0)</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		buf += cc;</div><div class='del'>-		total += cc;</div><div class='del'>-		len -= cc;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return total;</div><div class='del'>-}</div><div class='del'>-#endif /* BB_TAR || BB_TAIL || BB_AR || BB_SH */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined (BB_CHMOD_CHOWN_CHGRP) \</div><div class='del'>- || defined (BB_CP_MV)			\</div><div class='del'>- || defined (BB_FIND)			\</div><div class='del'>- || defined (BB_INSMOD)			\</div><div class='del'>- || defined (BB_LS)				\</div><div class='del'>- || defined (BB_RM)				\</div><div class='del'>- || defined (BB_TAR)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Walk down all the directories under the specified </div><div class='del'>- * location, and do something (something specified</div><div class='del'>- * by the fileAction and dirAction function pointers).</div><div class='del'>- *</div><div class='del'>- * Unfortunatly, while nftw(3) could replace this and reduce </div><div class='del'>- * code size a bit, nftw() wasn't supported before GNU libc 2.1, </div><div class='del'>- * and so isn't sufficiently portable to take over since glibc2.1</div><div class='del'>- * is so stinking huge.</div><div class='del'>- */</div><div class='del'>-int recursiveAction(const char *fileName,</div><div class='del'>-					int recurse, int followLinks, int depthFirst,</div><div class='del'>-					int (*fileAction) (const char *fileName,</div><div class='del'>-									   struct stat * statbuf,</div><div class='del'>-									   void* userData),</div><div class='del'>-					int (*dirAction) (const char *fileName,</div><div class='del'>-									  struct stat * statbuf,</div><div class='del'>-									  void* userData),</div><div class='del'>-					void* userData)</div><div class='del'>-{</div><div class='del'>-	int status;</div><div class='del'>-	struct stat statbuf;</div><div class='del'>-	struct dirent *next;</div><div class='del'>-</div><div class='del'>-	if (followLinks == TRUE)</div><div class='del'>-		status = stat(fileName, &amp;statbuf);</div><div class='del'>-	else</div><div class='del'>-		status = lstat(fileName, &amp;statbuf);</div><div class='del'>-</div><div class='del'>-	if (status &lt; 0) {</div><div class='del'>-#ifdef BB_DEBUG_PRINT_SCAFFOLD</div><div class='del'>-		fprintf(stderr,</div><div class='del'>-				"status=%d followLinks=%d TRUE=%d\n",</div><div class='del'>-				status, followLinks, TRUE);</div><div class='del'>-#endif</div><div class='del'>-		perror(fileName);</div><div class='del'>-		return FALSE;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((followLinks == FALSE) &amp;&amp; (S_ISLNK(statbuf.st_mode))) {</div><div class='del'>-		if (fileAction == NULL)</div><div class='del'>-			return TRUE;</div><div class='del'>-		else</div><div class='del'>-			return fileAction(fileName, &amp;statbuf, userData);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (recurse == FALSE) {</div><div class='del'>-		if (S_ISDIR(statbuf.st_mode)) {</div><div class='del'>-			if (dirAction != NULL)</div><div class='del'>-				return (dirAction(fileName, &amp;statbuf, userData));</div><div class='del'>-			else</div><div class='del'>-				return TRUE;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (S_ISDIR(statbuf.st_mode)) {</div><div class='del'>-		DIR *dir;</div><div class='del'>-</div><div class='del'>-		dir = opendir(fileName);</div><div class='del'>-		if (!dir) {</div><div class='del'>-			perror(fileName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-		if (dirAction != NULL &amp;&amp; depthFirst == FALSE) {</div><div class='del'>-			status = dirAction(fileName, &amp;statbuf, userData);</div><div class='del'>-			if (status == FALSE) {</div><div class='del'>-				perror(fileName);</div><div class='del'>-				return FALSE;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		while ((next = readdir(dir)) != NULL) {</div><div class='del'>-			char nextFile[BUFSIZ + 1];</div><div class='del'>-</div><div class='del'>-			if ((strcmp(next-&gt;d_name, "..") == 0)</div><div class='del'>-				|| (strcmp(next-&gt;d_name, ".") == 0)) {</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			if (strlen(fileName) + strlen(next-&gt;d_name) + 1 &gt; BUFSIZ) {</div><div class='del'>-				errorMsg("name_too_long");</div><div class='del'>-				return FALSE;</div><div class='del'>-			}</div><div class='del'>-			memset(nextFile, 0, sizeof(nextFile));</div><div class='del'>-			sprintf(nextFile, "%s/%s", fileName, next-&gt;d_name);</div><div class='del'>-			status =</div><div class='del'>-				recursiveAction(nextFile, TRUE, followLinks, depthFirst,</div><div class='del'>-								fileAction, dirAction, userData);</div><div class='del'>-			if (status == FALSE) {</div><div class='del'>-				closedir(dir);</div><div class='del'>-				return FALSE;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		status = closedir(dir);</div><div class='del'>-		if (status &lt; 0) {</div><div class='del'>-			perror(fileName);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-		if (dirAction != NULL &amp;&amp; depthFirst == TRUE) {</div><div class='del'>-			status = dirAction(fileName, &amp;statbuf, userData);</div><div class='del'>-			if (status == FALSE) {</div><div class='del'>-				perror(fileName);</div><div class='del'>-				return FALSE;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	} else {</div><div class='del'>-		if (fileAction == NULL)</div><div class='del'>-			return TRUE;</div><div class='del'>-		else</div><div class='del'>-			return fileAction(fileName, &amp;statbuf, userData);</div><div class='del'>-	}</div><div class='del'>-	return TRUE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif							/* BB_CHMOD_CHOWN_CHGRP || BB_CP_MV || BB_FIND || BB_LS || BB_INSMOD */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined (BB_TAR) || defined (BB_MKDIR) || defined (BB_AR)</div><div class='del'>-/*</div><div class='del'>- * Attempt to create the directories along the specified path, except for</div><div class='del'>- * the final component.  The mode is given for the final directory only,</div><div class='del'>- * while all previous ones get default protections.  Errors are not reported</div><div class='del'>- * here, as failures to restore files can be reported later.</div><div class='del'>- */</div><div class='del'>-extern int createPath(const char *name, int mode)</div><div class='del'>-{</div><div class='del'>-	char *cp;</div><div class='del'>-	char *cpOld;</div><div class='del'>-	char buf[BUFSIZ + 1];</div><div class='del'>-	int retVal = 0;</div><div class='del'>-</div><div class='del'>-	strcpy(buf, name);</div><div class='del'>-	for (cp = buf; *cp == '/'; cp++);</div><div class='del'>-	cp = strchr(cp, '/');</div><div class='del'>-	while (cp) {</div><div class='del'>-		cpOld = cp;</div><div class='del'>-		cp = strchr(cp + 1, '/');</div><div class='del'>-		*cpOld = '\0';</div><div class='del'>-		retVal = mkdir(buf, cp ? 0777 : mode);</div><div class='del'>-		if (retVal != 0 &amp;&amp; errno != EEXIST) {</div><div class='del'>-			perror(buf);</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-		*cpOld = '/';</div><div class='del'>-	}</div><div class='del'>-	return TRUE;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_TAR || BB_MKDIR */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined (BB_CHMOD_CHOWN_CHGRP) || defined (BB_MKDIR) \</div><div class='del'>- || defined (BB_MKFIFO) || defined (BB_MKNOD) || defined (BB_AR)</div><div class='del'>-/* [ugoa]{+|-|=}[rwxst] */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int parse_mode(const char *s, mode_t * theMode)</div><div class='del'>-{</div><div class='del'>-	mode_t andMode =</div><div class='del'>-</div><div class='del'>-		S_ISVTX | S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;</div><div class='del'>-	mode_t orMode = 0;</div><div class='del'>-	mode_t mode = 0;</div><div class='del'>-	mode_t groups = 0;</div><div class='del'>-	char type;</div><div class='del'>-	char c;</div><div class='del'>-</div><div class='del'>-	if (s==NULL)</div><div class='del'>-		return (FALSE);</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-		for (;;) {</div><div class='del'>-			switch (c = *s++) {</div><div class='del'>-			case '\0':</div><div class='del'>-				return -1;</div><div class='del'>-			case 'u':</div><div class='del'>-				groups |= S_ISUID | S_IRWXU;</div><div class='del'>-				continue;</div><div class='del'>-			case 'g':</div><div class='del'>-				groups |= S_ISGID | S_IRWXG;</div><div class='del'>-				continue;</div><div class='del'>-			case 'o':</div><div class='del'>-				groups |= S_IRWXO;</div><div class='del'>-				continue;</div><div class='del'>-			case 'a':</div><div class='del'>-				groups |= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;</div><div class='del'>-				continue;</div><div class='del'>-			case '+':</div><div class='del'>-			case '=':</div><div class='del'>-			case '-':</div><div class='del'>-				type = c;</div><div class='del'>-				if (groups == 0)	/* The default is "all" */</div><div class='del'>-					groups |=</div><div class='del'>-						S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;</div><div class='del'>-				break;</div><div class='del'>-			default:</div><div class='del'>-				if (isdigit(c) &amp;&amp; c &gt;= '0' &amp;&amp; c &lt;= '7' &amp;&amp;</div><div class='del'>-					mode == 0 &amp;&amp; groups == 0) {</div><div class='del'>-					*theMode = strtol(--s, NULL, 8);</div><div class='del'>-					return (TRUE);</div><div class='del'>-				} else</div><div class='del'>-					return (FALSE);</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		while ((c = *s++) != '\0') {</div><div class='del'>-			switch (c) {</div><div class='del'>-			case ',':</div><div class='del'>-				break;</div><div class='del'>-			case 'r':</div><div class='del'>-				mode |= S_IRUSR | S_IRGRP | S_IROTH;</div><div class='del'>-				continue;</div><div class='del'>-			case 'w':</div><div class='del'>-				mode |= S_IWUSR | S_IWGRP | S_IWOTH;</div><div class='del'>-				continue;</div><div class='del'>-			case 'x':</div><div class='del'>-				mode |= S_IXUSR | S_IXGRP | S_IXOTH;</div><div class='del'>-				continue;</div><div class='del'>-			case 's':</div><div class='del'>-				mode |= S_IXGRP | S_ISUID | S_ISGID;</div><div class='del'>-				continue;</div><div class='del'>-			case 't':</div><div class='del'>-				mode |= 0;</div><div class='del'>-				continue;</div><div class='del'>-			default:</div><div class='del'>-				*theMode &amp;= andMode;</div><div class='del'>-				*theMode |= orMode;</div><div class='del'>-				return (TRUE);</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-		switch (type) {</div><div class='del'>-		case '=':</div><div class='del'>-			andMode &amp;= ~(groups);</div><div class='del'>-			/* fall through */</div><div class='del'>-		case '+':</div><div class='del'>-			orMode |= mode &amp; groups;</div><div class='del'>-			break;</div><div class='del'>-		case '-':</div><div class='del'>-			andMode &amp;= ~(mode &amp; groups);</div><div class='del'>-			orMode &amp;= andMode;</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	} while (c == ',');</div><div class='del'>-	*theMode &amp;= andMode;</div><div class='del'>-	*theMode |= orMode;</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-/* BB_CHMOD_CHOWN_CHGRP || BB_MKDIR || BB_MKFIFO || BB_MKNOD */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_CHMOD_CHOWN_CHGRP || defined BB_PS || defined BB_LS \</div><div class='del'>- || defined BB_TAR || defined BB_ID || defined BB_LOGGER \</div><div class='del'>- || defined BB_LOGNAME || defined BB_WHOAMI</div><div class='del'>-</div><div class='del'>-/* This parses entries in /etc/passwd and /etc/group.  This is desirable</div><div class='del'>- * for BusyBox, since we want to avoid using the glibc NSS stuff, which</div><div class='del'>- * increases target size and is often not needed or wanted for embedded</div><div class='del'>- * systems.</div><div class='del'>- *</div><div class='del'>- * /etc/passwd entries look like this: </div><div class='del'>- *		root:x:0:0:root:/root:/bin/bash</div><div class='del'>- * and /etc/group entries look like this: </div><div class='del'>- *		root:x:0:</div><div class='del'>- *</div><div class='del'>- * This uses buf as storage to hold things.</div><div class='del'>- * </div><div class='del'>- */</div><div class='del'>-unsigned long my_getid(const char *filename, char *name, long id, long *gid)</div><div class='del'>-{</div><div class='del'>-	FILE *file;</div><div class='del'>-	char *rname, *start, *end, buf[128];</div><div class='del'>-	long rid;</div><div class='del'>-	long rgid = 0;</div><div class='del'>-</div><div class='del'>-	file = fopen(filename, "r");</div><div class='del'>-	if (file == NULL) {</div><div class='del'>-		/* Do not complain.  It is ok for /etc/passwd and</div><div class='del'>-		 * friends to be missing... */</div><div class='del'>-		return (-1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (fgets(buf, 128, file) != NULL) {</div><div class='del'>-		if (buf[0] == '#')</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		/* username/group name */</div><div class='del'>-		start = buf;</div><div class='del'>-		end = strchr(start, ':');</div><div class='del'>-		if (end == NULL)</div><div class='del'>-			continue;</div><div class='del'>-		*end = '\0';</div><div class='del'>-		rname = start;</div><div class='del'>-</div><div class='del'>-		/* password */</div><div class='del'>-		start = end + 1;</div><div class='del'>-		end = strchr(start, ':');</div><div class='del'>-		if (end == NULL)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		/* uid in passwd, gid in group */</div><div class='del'>-		start = end + 1;</div><div class='del'>-		rid = (unsigned long) strtol(start, &amp;end, 10);</div><div class='del'>-		if (end == start)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		/* gid in passwd */</div><div class='del'>-		start = end + 1;</div><div class='del'>-		rgid = (unsigned long) strtol(start, &amp;end, 10);</div><div class='del'>-		</div><div class='del'>-		if (name) {</div><div class='del'>-			if (0 == strcmp(rname, name)) {</div><div class='del'>-			    if (gid) *gid = rgid;</div><div class='del'>-				fclose(file);</div><div class='del'>-				return (rid);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (id != -1 &amp;&amp; id == rid) {</div><div class='del'>-			strncpy(name, rname, 8);</div><div class='del'>-			if (gid) *gid = rgid;</div><div class='del'>-			fclose(file);</div><div class='del'>-			return (TRUE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	fclose(file);</div><div class='del'>-	return (-1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* returns a uid given a username */</div><div class='del'>-long my_getpwnam(char *name)</div><div class='del'>-{</div><div class='del'>-	return my_getid("/etc/passwd", name, -1, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* returns a gid given a group name */</div><div class='del'>-long my_getgrnam(char *name)</div><div class='del'>-{</div><div class='del'>-	return my_getid("/etc/group", name, -1, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* gets a username given a uid */</div><div class='del'>-void my_getpwuid(char *name, long uid)</div><div class='del'>-{</div><div class='del'>-	my_getid("/etc/passwd", name, uid, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* gets a groupname given a gid */</div><div class='del'>-void my_getgrgid(char *group, long gid)</div><div class='del'>-{</div><div class='del'>-	my_getid("/etc/group", group, gid, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* gets a gid given a user name */</div><div class='del'>-long my_getpwnamegid(char *name)</div><div class='del'>-{</div><div class='del'>-	long gid;</div><div class='del'>-	my_getid("/etc/passwd", name, -1, &amp;gid);</div><div class='del'>-	return gid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>- /* BB_CHMOD_CHOWN_CHGRP || BB_PS || BB_LS || BB_TAR \</div><div class='del'>- || BB_ID || BB_LOGGER || BB_LOGNAME || BB_WHOAMI */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if (defined BB_CHVT) || (defined BB_DEALLOCVT) || (defined BB_SETKEYCODES)</div><div class='del'>-</div><div class='del'>-/* From &lt;linux/kd.h&gt; */ </div><div class='del'>-#define KDGKBTYPE       0x4B33  /* get keyboard type */</div><div class='del'>-#define         KB_84           0x01</div><div class='del'>-#define         KB_101          0x02    /* this is what we always answer */</div><div class='del'>-</div><div class='del'>-int is_a_console(int fd)</div><div class='del'>-{</div><div class='del'>-	char arg;</div><div class='del'>-</div><div class='del'>-	arg = 0;</div><div class='del'>-	return (ioctl(fd, KDGKBTYPE, &amp;arg) == 0</div><div class='del'>-			&amp;&amp; ((arg == KB_101) || (arg == KB_84)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int open_a_console(char *fnam)</div><div class='del'>-{</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	/* try read-only */</div><div class='del'>-	fd = open(fnam, O_RDWR);</div><div class='del'>-</div><div class='del'>-	/* if failed, try read-only */</div><div class='del'>-	if (fd &lt; 0 &amp;&amp; errno == EACCES)</div><div class='del'>-		fd = open(fnam, O_RDONLY);</div><div class='del'>-</div><div class='del'>-	/* if failed, try write-only */</div><div class='del'>-	if (fd &lt; 0 &amp;&amp; errno == EACCES)</div><div class='del'>-		fd = open(fnam, O_WRONLY);</div><div class='del'>-</div><div class='del'>-	/* if failed, fail */</div><div class='del'>-	if (fd &lt; 0)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	/* if not a console, fail */</div><div class='del'>-	if (!is_a_console(fd)) {</div><div class='del'>-		close(fd);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* success */</div><div class='del'>-	return fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Get an fd for use with kbd/console ioctls.</div><div class='del'>- * We try several things because opening /dev/console will fail</div><div class='del'>- * if someone else used X (which does a chown on /dev/console).</div><div class='del'>- *</div><div class='del'>- * if tty_name is non-NULL, try this one instead.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int get_console_fd(char *tty_name)</div><div class='del'>-{</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	if (tty_name) {</div><div class='del'>-		if (-1 == (fd = open_a_console(tty_name)))</div><div class='del'>-			return -1;</div><div class='del'>-		else</div><div class='del'>-			return fd;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	fd = open_a_console("/dev/tty");</div><div class='del'>-	if (fd &gt;= 0)</div><div class='del'>-		return fd;</div><div class='del'>-</div><div class='del'>-	fd = open_a_console("/dev/tty0");</div><div class='del'>-	if (fd &gt;= 0)</div><div class='del'>-		return fd;</div><div class='del'>-</div><div class='del'>-	fd = open_a_console("/dev/console");</div><div class='del'>-	if (fd &gt;= 0)</div><div class='del'>-		return fd;</div><div class='del'>-</div><div class='del'>-	for (fd = 0; fd &lt; 3; fd++)</div><div class='del'>-		if (is_a_console(fd))</div><div class='del'>-			return fd;</div><div class='del'>-</div><div class='del'>-	errorMsg("Couldnt get a file descriptor referring to the console\n");</div><div class='del'>-	return -1;					/* total failure */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif							/* BB_CHVT || BB_DEALLOCVT || BB_SETKEYCODES */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_FIND || defined BB_INSMOD</div><div class='del'>-/*</div><div class='del'>- * Routine to see if a text string is matched by a wildcard pattern.</div><div class='del'>- * Returns TRUE if the text is matched, or FALSE if it is not matched</div><div class='del'>- * or if the pattern is invalid.</div><div class='del'>- *  *		matches zero or more characters</div><div class='del'>- *  ?		matches a single character</div><div class='del'>- *  [abc]	matches 'a', 'b' or 'c'</div><div class='del'>- *  \c		quotes character c</div><div class='del'>- * Adapted from code written by Ingo Wilken, and</div><div class='del'>- * then taken from sash, Copyright (c) 1999 by David I. Bell</div><div class='del'>- * Permission is granted to use, distribute, or modify this source,</div><div class='del'>- * provided that this copyright notice remains intact.</div><div class='del'>- * Permission to distribute this code under the GPL has been granted.</div><div class='del'>- */</div><div class='del'>-extern int check_wildcard_match(const char *text, const char *pattern)</div><div class='del'>-{</div><div class='del'>-	const char *retryPat;</div><div class='del'>-	const char *retryText;</div><div class='del'>-	int ch;</div><div class='del'>-	int found;</div><div class='del'>-	int len;</div><div class='del'>-</div><div class='del'>-	retryPat = NULL;</div><div class='del'>-	retryText = NULL;</div><div class='del'>-</div><div class='del'>-	while (*text || *pattern) {</div><div class='del'>-		ch = *pattern++;</div><div class='del'>-</div><div class='del'>-		switch (ch) {</div><div class='del'>-		case '*':</div><div class='del'>-			retryPat = pattern;</div><div class='del'>-			retryText = text;</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case '[':</div><div class='del'>-			found = FALSE;</div><div class='del'>-</div><div class='del'>-			while ((ch = *pattern++) != ']') {</div><div class='del'>-				if (ch == '\\')</div><div class='del'>-					ch = *pattern++;</div><div class='del'>-</div><div class='del'>-				if (ch == '\0')</div><div class='del'>-					return FALSE;</div><div class='del'>-</div><div class='del'>-				if (*text == ch)</div><div class='del'>-					found = TRUE;</div><div class='del'>-			}</div><div class='del'>-			len=strlen(text);</div><div class='del'>-			if (found == FALSE &amp;&amp; len!=0) {</div><div class='del'>-				return FALSE;</div><div class='del'>-			}</div><div class='del'>-			if (found == TRUE) {</div><div class='del'>-				if (strlen(pattern)==0 &amp;&amp; len==1) {</div><div class='del'>-					return TRUE;</div><div class='del'>-				}</div><div class='del'>-				if (len!=0) {</div><div class='del'>-					text++;</div><div class='del'>-					continue;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			/* fall into next case */</div><div class='del'>-</div><div class='del'>-		case '?':</div><div class='del'>-			if (*text++ == '\0')</div><div class='del'>-				return FALSE;</div><div class='del'>-</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case '\\':</div><div class='del'>-			ch = *pattern++;</div><div class='del'>-</div><div class='del'>-			if (ch == '\0')</div><div class='del'>-				return FALSE;</div><div class='del'>-</div><div class='del'>-			/* fall into next case */</div><div class='del'>-</div><div class='del'>-		default:</div><div class='del'>-			if (*text == ch) {</div><div class='del'>-				if (*text)</div><div class='del'>-					text++;</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if (*text) {</div><div class='del'>-				pattern = retryPat;</div><div class='del'>-				text = ++retryText;</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			return FALSE;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (pattern == NULL)</div><div class='del'>-			return FALSE;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return TRUE;</div><div class='del'>-}</div><div class='del'>-#endif                            /* BB_FIND || BB_INSMOD */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_DF || defined BB_MTAB</div><div class='del'>-/*</div><div class='del'>- * Given a block device, find the mount table entry if that block device</div><div class='del'>- * is mounted.</div><div class='del'>- *</div><div class='del'>- * Given any other file (or directory), find the mount table entry for its</div><div class='del'>- * filesystem.</div><div class='del'>- */</div><div class='del'>-extern struct mntent *findMountPoint(const char *name, const char *table)</div><div class='del'>-{</div><div class='del'>-	struct stat s;</div><div class='del'>-	dev_t mountDevice;</div><div class='del'>-	FILE *mountTable;</div><div class='del'>-	struct mntent *mountEntry;</div><div class='del'>-</div><div class='del'>-	if (stat(name, &amp;s) != 0)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	if ((s.st_mode &amp; S_IFMT) == S_IFBLK)</div><div class='del'>-		mountDevice = s.st_rdev;</div><div class='del'>-	else</div><div class='del'>-		mountDevice = s.st_dev;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if ((mountTable = setmntent(table, "r")) == 0)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	while ((mountEntry = getmntent(mountTable)) != 0) {</div><div class='del'>-		if (strcmp(name, mountEntry-&gt;mnt_dir) == 0</div><div class='del'>-			|| strcmp(name, mountEntry-&gt;mnt_fsname) == 0)	/* String match. */</div><div class='del'>-			break;</div><div class='del'>-		if (stat(mountEntry-&gt;mnt_fsname, &amp;s) == 0 &amp;&amp; s.st_rdev == mountDevice)	/* Match the device. */</div><div class='del'>-			break;</div><div class='del'>-		if (stat(mountEntry-&gt;mnt_dir, &amp;s) == 0 &amp;&amp; s.st_dev == mountDevice)	/* Match the directory's mount point. */</div><div class='del'>-			break;</div><div class='del'>-	}</div><div class='del'>-	endmntent(mountTable);</div><div class='del'>-	return mountEntry;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_DF || BB_MTAB */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_DD || defined BB_TAIL</div><div class='del'>-/*</div><div class='del'>- * Read a number with a possible multiplier.</div><div class='del'>- * Returns -1 if the number format is illegal.</div><div class='del'>- */</div><div class='del'>-extern long getNum(const char *cp)</div><div class='del'>-{</div><div class='del'>-	long value;</div><div class='del'>-</div><div class='del'>-	if (!isDecimal(*cp))</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	value = 0;</div><div class='del'>-</div><div class='del'>-	while (isDecimal(*cp))</div><div class='del'>-		value = value * 10 + *cp++ - '0';</div><div class='del'>-</div><div class='del'>-	switch (*cp++) {</div><div class='del'>-	case 'M':</div><div class='del'>-	case 'm':					/* `tail' uses it traditionally */</div><div class='del'>-		value *= 1048576;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case 'k':</div><div class='del'>-		value *= 1024;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case 'b':</div><div class='del'>-		value *= 512;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case 'w':</div><div class='del'>-		value *= 2;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case '\0':</div><div class='del'>-		return value;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (*cp)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return value;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_DD || BB_TAIL */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_INIT || defined BB_SYSLOGD </div><div class='del'>-/* try to open up the specified device */</div><div class='del'>-extern int device_open(char *device, int mode)</div><div class='del'>-{</div><div class='del'>-	int m, f, fd = -1;</div><div class='del'>-</div><div class='del'>-	m = mode | O_NONBLOCK;</div><div class='del'>-</div><div class='del'>-	/* Retry up to 5 times */</div><div class='del'>-	for (f = 0; f &lt; 5; f++)</div><div class='del'>-		if ((fd = open(device, m, 0600)) &gt;= 0)</div><div class='del'>-			break;</div><div class='del'>-	if (fd &lt; 0)</div><div class='del'>-		return fd;</div><div class='del'>-	/* Reset original flags. */</div><div class='del'>-	if (m != mode)</div><div class='del'>-		fcntl(fd, F_SETFL, mode);</div><div class='del'>-	return fd;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_INIT BB_SYSLOGD */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_KILLALL || ( defined BB_FEATURE_LINUXRC &amp;&amp; ( defined BB_HALT || defined BB_REBOOT || defined BB_POWEROFF ))</div><div class='del'>-#ifdef BB_FEATURE_USE_DEVPS_PATCH</div><div class='del'>-#include &lt;linux/devps.h&gt; /* For Erik's nifty devps device driver */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_FEATURE_USE_DEVPS_PATCH</div><div class='del'>-/* findPidByName()</div><div class='del'>- *  </div><div class='del'>- *  This finds the pid of the specified process,</div><div class='del'>- *  by using the /dev/ps device driver.</div><div class='del'>- *</div><div class='del'>- *  Returns a list of all matching PIDs</div><div class='del'>- */</div><div class='del'>-extern pid_t* findPidByName( char* pidName)</div><div class='del'>-{</div><div class='del'>-	int fd, i, j;</div><div class='del'>-	char device[] = "/dev/ps";</div><div class='del'>-	pid_t num_pids;</div><div class='del'>-	pid_t* pid_array = NULL;</div><div class='del'>-	pid_t* pidList=NULL;</div><div class='del'>-</div><div class='del'>-	/* open device */ </div><div class='del'>-	fd = open(device, O_RDONLY);</div><div class='del'>-	if (fd &lt; 0)</div><div class='del'>-		fatalError( "open failed for `%s': %s\n", device, strerror (errno));</div><div class='del'>-</div><div class='del'>-	/* Find out how many processes there are */</div><div class='del'>-	if (ioctl (fd, DEVPS_GET_NUM_PIDS, &amp;num_pids)&lt;0) </div><div class='del'>-		fatalError( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));</div><div class='del'>-	</div><div class='del'>-	/* Allocate some memory -- grab a few extras just in case </div><div class='del'>-	 * some new processes start up while we wait. The kernel will</div><div class='del'>-	 * just ignore any extras if we give it too many, and will trunc.</div><div class='del'>-	 * the list if we give it too few.  */</div><div class='del'>-	pid_array = (pid_t*) xcalloc( num_pids+10, sizeof(pid_t));</div><div class='del'>-	pid_array[0] = num_pids+10;</div><div class='del'>-</div><div class='del'>-	/* Now grab the pid list */</div><div class='del'>-	if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)&lt;0) </div><div class='del'>-		fatalError( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));</div><div class='del'>-</div><div class='del'>-	/* Now search for a match */</div><div class='del'>-	for (i=1, j=0; i&lt;pid_array[0] ; i++) {</div><div class='del'>-		char* p;</div><div class='del'>-		struct pid_info info;</div><div class='del'>-</div><div class='del'>-	    info.pid = pid_array[i];</div><div class='del'>-	    if (ioctl (fd, DEVPS_GET_PID_INFO, &amp;info)&lt;0)</div><div class='del'>-			fatalError( "\nDEVPS_GET_PID_INFO: %s\n", strerror (errno));</div><div class='del'>-</div><div class='del'>-		/* Make sure we only match on the process name */</div><div class='del'>-		p=info.command_line+1;</div><div class='del'>-		while ((*p != 0) &amp;&amp; !isspace(*(p)) &amp;&amp; (*(p-1) != '\\')) { </div><div class='del'>-			(p)++;</div><div class='del'>-		}</div><div class='del'>-		if (isspace(*(p)))</div><div class='del'>-				*p='\0';</div><div class='del'>-</div><div class='del'>-		if ((strstr(info.command_line, pidName) != NULL)</div><div class='del'>-				&amp;&amp; (strlen(pidName) == strlen(info.command_line))) {</div><div class='del'>-			pidList=xrealloc( pidList, sizeof(pid_t) * (j+2));</div><div class='del'>-			pidList[j++]=info.pid;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (pidList)</div><div class='del'>-		pidList[j]=0;</div><div class='del'>-</div><div class='del'>-	/* Free memory */</div><div class='del'>-	free( pid_array);</div><div class='del'>-</div><div class='del'>-	/* close device */</div><div class='del'>-	if (close (fd) != 0) </div><div class='del'>-		fatalError( "close failed for `%s': %s\n",device, strerror (errno));</div><div class='del'>-</div><div class='del'>-	return pidList;</div><div class='del'>-}</div><div class='del'>-#else		/* BB_FEATURE_USE_DEVPS_PATCH */</div><div class='del'>-#if ! defined BB_FEATURE_USE_PROCFS</div><div class='del'>-#error Sorry, I depend on the /proc filesystem right now.</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* findPidByName()</div><div class='del'>- *  </div><div class='del'>- *  This finds the pid of the specified process.</div><div class='del'>- *  Currently, it's implemented by rummaging through </div><div class='del'>- *  the proc filesystem.</div><div class='del'>- *</div><div class='del'>- *  Returns a list of all matching PIDs</div><div class='del'>- */</div><div class='del'>-extern pid_t* findPidByName( char* pidName)</div><div class='del'>-{</div><div class='del'>-	DIR *dir;</div><div class='del'>-	struct dirent *next;</div><div class='del'>-	pid_t* pidList=NULL;</div><div class='del'>-	int i=0;</div><div class='del'>-</div><div class='del'>-	dir = opendir("/proc");</div><div class='del'>-	if (!dir)</div><div class='del'>-		fatalError( "Cannot open /proc: %s\n", strerror (errno));</div><div class='del'>-	</div><div class='del'>-	while ((next = readdir(dir)) != NULL) {</div><div class='del'>-		FILE *status;</div><div class='del'>-		char filename[256];</div><div class='del'>-		char buffer[256];</div><div class='del'>-</div><div class='del'>-		/* If it isn't a number, we don't want it */</div><div class='del'>-		if (!isdigit(*next-&gt;d_name))</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		sprintf(filename, "/proc/%s/cmdline", next-&gt;d_name);</div><div class='del'>-		status = fopen(filename, "r");</div><div class='del'>-		if (!status) {</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		fgets(buffer, 256, status);</div><div class='del'>-		fclose(status);</div><div class='del'>-</div><div class='del'>-		if (strstr(get_last_path_component(buffer), pidName) != NULL) {</div><div class='del'>-			pidList=xrealloc( pidList, sizeof(pid_t) * (i+2));</div><div class='del'>-			pidList[i++]=strtol(next-&gt;d_name, NULL, 0);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (pidList)</div><div class='del'>-		pidList[i]=0;</div><div class='del'>-	return pidList;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_FEATURE_USE_DEVPS_PATCH */</div><div class='del'>-#endif							/* BB_KILLALL || ( BB_FEATURE_LINUXRC &amp;&amp; ( BB_HALT || BB_REBOOT || BB_POWEROFF )) */</div><div class='del'>-</div><div class='del'>-#ifndef DMALLOC</div><div class='del'>-/* this should really be farmed out to libbusybox.a */</div><div class='del'>-extern void *xmalloc(size_t size)</div><div class='del'>-{</div><div class='del'>-	void *ptr = malloc(size);</div><div class='del'>-</div><div class='del'>-	if (!ptr)</div><div class='del'>-		fatalError("memory_exhausted");</div><div class='del'>-	return ptr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void *xrealloc(void *old, size_t size)</div><div class='del'>-{</div><div class='del'>-	void *ptr;</div><div class='del'>-	if (!size)</div><div class='del'>-			size = 1;</div><div class='del'>-	ptr = realloc(old, size);</div><div class='del'>-	if (!ptr)</div><div class='del'>-		fatalError("memory_exhausted");</div><div class='del'>-	return ptr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern void *xcalloc(size_t nmemb, size_t size)</div><div class='del'>-{</div><div class='del'>-	void *ptr = calloc(nmemb, size);</div><div class='del'>-	if (!ptr)</div><div class='del'>-		fatalError("memory_exhausted");</div><div class='del'>-	return ptr;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_FEATURE_NFSMOUNT || defined BB_SH || defined BB_LS</div><div class='del'>-# ifndef DMALLOC</div><div class='del'>-extern char * xstrdup (const char *s) {</div><div class='del'>-	char *t;</div><div class='del'>-</div><div class='del'>-	if (s == NULL)</div><div class='del'>-		return NULL;</div><div class='del'>-</div><div class='del'>-	t = strdup (s);</div><div class='del'>-</div><div class='del'>-	if (t == NULL)</div><div class='del'>-		fatalError("memory_exhausted");</div><div class='del'>-</div><div class='del'>-	return t;</div><div class='del'>-}</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_FEATURE_NFSMOUNT</div><div class='del'>-extern char * xstrndup (const char *s, int n) {</div><div class='del'>-	char *t;</div><div class='del'>-</div><div class='del'>-	if (s == NULL)</div><div class='del'>-		fatalError("xstrndup bug");</div><div class='del'>-</div><div class='del'>-	t = xmalloc(n+1);</div><div class='del'>-	strncpy(t,s,n);</div><div class='del'>-	t[n] = 0;</div><div class='del'>-</div><div class='del'>-	return t;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if (__GLIBC__ &lt; 2) &amp;&amp; (defined BB_SYSLOGD || defined BB_INIT)</div><div class='del'>-extern int vdprintf(int d, const char *format, va_list ap)</div><div class='del'>-{</div><div class='del'>-	char buf[BUF_SIZE];</div><div class='del'>-	int len;</div><div class='del'>-</div><div class='del'>-	len = vsprintf(buf, format, ap);</div><div class='del'>-	return write(d, buf, len);</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_SYSLOGD */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined BB_FEATURE_MOUNT_LOOP</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include "loop.h" /* Pull in loop device support */</div><div class='del'>-</div><div class='del'>-extern int del_loop(const char *device)</div><div class='del'>-{</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	if ((fd = open(device, O_RDONLY)) &lt; 0) {</div><div class='del'>-		perror(device);</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(fd, LOOP_CLR_FD, 0) &lt; 0) {</div><div class='del'>-		perror("ioctl: LOOP_CLR_FD");</div><div class='del'>-		return (FALSE);</div><div class='del'>-	}</div><div class='del'>-	close(fd);</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern int set_loop(const char *device, const char *file, int offset,</div><div class='del'>-					int *loopro)</div><div class='del'>-{</div><div class='del'>-	struct loop_info loopinfo;</div><div class='del'>-	int fd, ffd, mode;</div><div class='del'>-</div><div class='del'>-	mode = *loopro ? O_RDONLY : O_RDWR;</div><div class='del'>-	if ((ffd = open(file, mode)) &lt; 0 &amp;&amp; !*loopro</div><div class='del'>-		&amp;&amp; (errno != EROFS || (ffd = open(file, mode = O_RDONLY)) &lt; 0)) {</div><div class='del'>-		perror(file);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	if ((fd = open(device, mode)) &lt; 0) {</div><div class='del'>-		close(ffd);</div><div class='del'>-		perror(device);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	*loopro = (mode == O_RDONLY);</div><div class='del'>-</div><div class='del'>-	memset(&amp;loopinfo, 0, sizeof(loopinfo));</div><div class='del'>-	strncpy(loopinfo.lo_name, file, LO_NAME_SIZE);</div><div class='del'>-	loopinfo.lo_name[LO_NAME_SIZE - 1] = 0;</div><div class='del'>-</div><div class='del'>-	loopinfo.lo_offset = offset;</div><div class='del'>-</div><div class='del'>-	loopinfo.lo_encrypt_key_size = 0;</div><div class='del'>-	if (ioctl(fd, LOOP_SET_FD, ffd) &lt; 0) {</div><div class='del'>-		perror("ioctl: LOOP_SET_FD");</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(fd, LOOP_SET_STATUS, &amp;loopinfo) &lt; 0) {</div><div class='del'>-		(void) ioctl(fd, LOOP_CLR_FD, 0);</div><div class='del'>-		perror("ioctl: LOOP_SET_STATUS");</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	close(fd);</div><div class='del'>-	close(ffd);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern char *find_unused_loop_device(void)</div><div class='del'>-{</div><div class='del'>-	char dev[20];</div><div class='del'>-	int i, fd;</div><div class='del'>-	struct stat statbuf;</div><div class='del'>-	struct loop_info loopinfo;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt;= 7; i++) {</div><div class='del'>-		sprintf(dev, "/dev/loop%d", i);</div><div class='del'>-		if (stat(dev, &amp;statbuf) == 0 &amp;&amp; S_ISBLK(statbuf.st_mode)) {</div><div class='del'>-			if ((fd = open(dev, O_RDONLY)) &gt;= 0) {</div><div class='del'>-				if (ioctl(fd, LOOP_GET_STATUS, &amp;loopinfo) == -1) {</div><div class='del'>-					if (errno == ENXIO) {	/* probably free */</div><div class='del'>-						close(fd);</div><div class='del'>-						return strdup(dev);</div><div class='del'>-					}</div><div class='del'>-				}</div><div class='del'>-				close(fd);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-#endif							/* BB_FEATURE_MOUNT_LOOP */</div><div class='del'>-</div><div class='del'>-#if defined BB_MOUNT || defined BB_DF || ( defined BB_UMOUNT &amp;&amp; ! defined BB_MTAB)</div><div class='del'>-extern int find_real_root_device_name(char* name)</div><div class='del'>-{</div><div class='del'>-	DIR *dir;</div><div class='del'>-	struct dirent *entry;</div><div class='del'>-	struct stat statBuf, rootStat;</div><div class='del'>-	char fileName[BUFSIZ];</div><div class='del'>-</div><div class='del'>-	if (stat("/", &amp;rootStat) != 0) {</div><div class='del'>-		errorMsg("could not stat '/'\n");</div><div class='del'>-		return( FALSE);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	dir = opendir("/dev");</div><div class='del'>-	if (!dir) {</div><div class='del'>-		errorMsg("could not open '/dev'\n");</div><div class='del'>-		return( FALSE);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while((entry = readdir(dir)) != NULL) {</div><div class='del'>-</div><div class='del'>-		/* Must skip ".." since that is "/", and so we </div><div class='del'>-		 * would get a false positive on ".."  */</div><div class='del'>-		if (strcmp(entry-&gt;d_name, "..") == 0)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		snprintf( fileName, strlen(name)+1, "/dev/%s", entry-&gt;d_name);</div><div class='del'>-</div><div class='del'>-		if (stat(fileName, &amp;statBuf) != 0)</div><div class='del'>-			continue;</div><div class='del'>-		/* Some char devices have the same dev_t as block</div><div class='del'>-		 * devices, so make sure this is a block device */</div><div class='del'>-		if (! S_ISBLK(statBuf.st_mode))</div><div class='del'>-			continue;</div><div class='del'>-		if (statBuf.st_rdev == rootStat.st_rdev) {</div><div class='del'>-			strcpy(name, fileName); </div><div class='del'>-			return ( TRUE);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return( FALSE);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* get_line_from_file() - This function reads an entire line from a text file</div><div class='del'>- * up to a newline. It returns a malloc'ed char * which must be stored and</div><div class='del'>- * free'ed  by the caller. */</div><div class='del'>-extern char *get_line_from_file(FILE *file)</div><div class='del'>-{</div><div class='del'>-	static const int GROWBY = 80; /* how large we will grow strings by */</div><div class='del'>-</div><div class='del'>-	int ch;</div><div class='del'>-	int idx = 0;</div><div class='del'>-	char *linebuf = NULL;</div><div class='del'>-	int linebufsz = 0;</div><div class='del'>-</div><div class='del'>-	while (1) {</div><div class='del'>-		ch = fgetc(file);</div><div class='del'>-		if (ch == EOF)</div><div class='del'>-			break;</div><div class='del'>-		/* grow the line buffer as necessary */</div><div class='del'>-		while (idx &gt; linebufsz-2)</div><div class='del'>-			linebuf = xrealloc(linebuf, linebufsz += GROWBY);</div><div class='del'>-		linebuf[idx++] = (char)ch;</div><div class='del'>-		if ((char)ch == '\n')</div><div class='del'>-			break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (idx == 0)</div><div class='del'>-		return NULL;</div><div class='del'>-</div><div class='del'>-	linebuf[idx] = 0;</div><div class='del'>-	return linebuf;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if defined BB_CAT</div><div class='del'>-extern void print_file(FILE *file)</div><div class='del'>-{</div><div class='del'>-	int c;</div><div class='del'>-</div><div class='del'>-	while ((c = getc(file)) != EOF)</div><div class='del'>-		putc(c, stdout);</div><div class='del'>-	fclose(file);</div><div class='del'>-	fflush(stdout);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-extern int print_file_by_name(char *filename)</div><div class='del'>-{</div><div class='del'>-	FILE *file;</div><div class='del'>-	file = fopen(filename, "r");</div><div class='del'>-	if (file == NULL) {</div><div class='del'>-		return FALSE;</div><div class='del'>-	}</div><div class='del'>-	print_file(file);</div><div class='del'>-	return TRUE;</div><div class='del'>-}</div><div class='del'>-#endif /* BB_CAT || BB_LSMOD */</div><div class='del'>-</div><div class='del'>-#if defined BB_ECHO || defined BB_TR</div><div class='del'>-char process_escape_sequence(char **ptr)</div><div class='del'>-{</div><div class='del'>-	char c;</div><div class='del'>-</div><div class='del'>-	switch (c = *(*ptr)++) {</div><div class='del'>-	case 'a':</div><div class='del'>-		c = '\a';</div><div class='del'>-		break;</div><div class='del'>-	case 'b':</div><div class='del'>-		c = '\b';</div><div class='del'>-		break;</div><div class='del'>-	case 'f':</div><div class='del'>-		c = '\f';</div><div class='del'>-		break;</div><div class='del'>-	case 'n':</div><div class='del'>-		c = '\n';</div><div class='del'>-		break;</div><div class='del'>-	case 't':</div><div class='del'>-		c = '\t';</div><div class='del'>-		break;</div><div class='del'>-	case 'v':</div><div class='del'>-		c = '\v';</div><div class='del'>-		break;</div><div class='del'>-	case '\\':</div><div class='del'>-		c = '\\';</div><div class='del'>-		break;</div><div class='del'>-	case '0': case '1': case '2': case '3':</div><div class='del'>-	case '4': case '5': case '6': case '7':</div><div class='del'>-		c -= '0';</div><div class='del'>-		if ('0' &lt;= **ptr &amp;&amp; **ptr &lt;= '7') {</div><div class='del'>-			c = c * 8 + (*(*ptr)++ - '0');</div><div class='del'>-			if ('0' &lt;= **ptr &amp;&amp; **ptr &lt;= '7')</div><div class='del'>-				c = c * 8 + (*(*ptr)++ - '0');</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		(*ptr)--;</div><div class='del'>-		c = '\\';</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	return c;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_BASENAME || defined BB_LN || defined BB_SH</div><div class='del'>-char *get_last_path_component(char *path)</div><div class='del'>-{</div><div class='del'>-	char *s=path+strlen(path)-1;</div><div class='del'>-</div><div class='del'>-	/* strip trailing slashes */</div><div class='del'>-	while (s &amp;&amp; *s == '/') {</div><div class='del'>-		*s-- = '\0';</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* find last component */</div><div class='del'>-	s = strrchr(path, '/');</div><div class='del'>-	if (s==NULL) return path;</div><div class='del'>-	else return s+1;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined BB_GREP || defined BB_SED</div><div class='del'>-void xregcomp(regex_t *preg, const char *regex, int cflags)</div><div class='del'>-{</div><div class='del'>-	int ret;</div><div class='del'>-	if ((ret = regcomp(preg, regex, cflags)) != 0) {</div><div class='del'>-		int errmsgsz = regerror(ret, preg, NULL, 0);</div><div class='del'>-		char *errmsg = xmalloc(errmsgsz);</div><div class='del'>-		regerror(ret, preg, errmsg, errmsgsz);</div><div class='del'>-		fatalError("bb_regcomp: %s\n", errmsg);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* END CODE */</div><div class='del'>-/*</div><div class='del'>-Local Variables:</div><div class='del'>-c-file-style: "linux"</div><div class='del'>-c-basic-offset: 4</div><div class='del'>-tab-width: 4</div><div class='del'>-End:</div><div class='del'>-*/</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/Makefile b/mdk-stage1/insmod-modutils/Makefile<br/>deleted file mode 100644<br/>index e8f78d2d0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,63 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    insmod from modutils (generic)</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Copyright 1996, 1997 Linux International.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INCS = -I./include</div><div class='del'>-</div><div class='del'>-DEFS = -Wno-error -D_GNU_SOURCE -DELF_MACHINE_H='"elf_$(ARCH).h"' -DARCH_$(ARCH)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-DIRS = util obj</div><div class='del'>-</div><div class='del'>-all: dirs insmod libinsmod.a #libinsmod-DIET.a</div><div class='del'>-</div><div class='del'>-dirs:</div><div class='del'>-	@for n in . $(DIRS); do \</div><div class='del'>-		[ "$$n" = "." ] || make -C $$n ;\</div><div class='del'>-	done</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	@for n in $(DIRS); do \</div><div class='del'>-		(cd $$n; make clean) \</div><div class='del'>-	done</div><div class='del'>-	rm -rf t *.o insmod libinsmod.a libinsmod-DIET.a</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-insmod: insmod-frontend.o insmod.o ./util/libutil-STANDALONE.a ./obj/libobj.a</div><div class='del'>-	gcc -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-t/.create_stuff: util/libutil.a obj/libobj.a</div><div class='del'>-	rm -rf t</div><div class='del'>-	mkdir t</div><div class='del'>-	cd t &amp;&amp;	for e in $^; do ar -x ../$$e; done</div><div class='del'>-	touch t/.create_stuff</div><div class='del'>-</div><div class='del'>-libinsmod.a: insmod.o t/.create_stuff</div><div class='del'>-	ar cru $@ insmod.o t/*</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-libinsmod-DIET.a: insmod-DIET.o ./util/libutil-DIET.a ./obj/libobj-DIET.a</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-insmod-frontend.o: insmod-frontend.c insmod.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c insmod-frontend.c</div><div class='del'>-</div><div class='del'>-insmod.o: insmod.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c insmod.c</div><div class='del'>-</div><div class='del'>-insmod-DIET.o: insmod.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -o $@ -c insmod.c</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/config.h b/mdk-stage1/insmod-modutils/include/config.h<br/>deleted file mode 100644<br/>index 11da6a523..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/config.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/config.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,105 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Configuration file management</div><div class='del'>- *</div><div class='del'>- * Copyright 1994, 1995, 1996, 1997:</div><div class='del'>- *	Jacques Gelinas &lt;jack@solucorp.qc.ca&gt;</div><div class='del'>- *	Björn Ekwall &lt;bj0rn@blox.se&gt; February, March 1999</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _CONFIG_H</div><div class='del'>-#define _CONFIG_H</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-</div><div class='del'>-#define ETC_MODULES_CONF	"/etc/modules.conf"</div><div class='del'>-</div><div class='del'>-#define EXEC_PRE_INSTALL 0</div><div class='del'>-#define EXEC_POST_INSTALL 1</div><div class='del'>-#define EXEC_PRE_REMOVE 2</div><div class='del'>-#define EXEC_POST_REMOVE 3</div><div class='del'>-#define EXEC_INSTALL 4</div><div class='del'>-#define EXEC_REMOVE 5</div><div class='del'>-</div><div class='del'>-struct PATH_TYPE {</div><div class='del'>-	char *type;</div><div class='del'>-	char *path;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct EXEC_TYPE {</div><div class='del'>-	int when;</div><div class='del'>-	char *module;</div><div class='del'>-	char *cmd;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-	char *name;</div><div class='del'>-	GLOB_LIST *opts;</div><div class='del'>-	int autoclean;</div><div class='del'>-} OPT_LIST;</div><div class='del'>-</div><div class='del'>-/* config.c */</div><div class='del'>-extern int flag_autoclean;</div><div class='del'>-extern struct utsname uts_info;</div><div class='del'>-extern char *aliaslist[];</div><div class='del'>-extern struct PATH_TYPE *modpath;</div><div class='del'>-extern int nmodpath;</div><div class='del'>-extern struct EXEC_TYPE *execs;</div><div class='del'>-extern int nexecs;</div><div class='del'>-extern char *insmod_opt;</div><div class='del'>-extern char *config_file;</div><div class='del'>-extern char *optlist[];</div><div class='del'>-extern char *prune[];</div><div class='del'>-extern OPT_LIST *opt_list;</div><div class='del'>-extern OPT_LIST *abovelist;</div><div class='del'>-extern OPT_LIST *belowlist;</div><div class='del'>-extern OPT_LIST *prunelist;</div><div class='del'>-extern OPT_LIST *probe_list;</div><div class='del'>-extern OPT_LIST *probeall_list;</div><div class='del'>-extern OPT_LIST *aliases;</div><div class='del'>-extern time_t config_mtime;</div><div class='del'>-extern int root_check_off;	/* Check modules are owned by root? */</div><div class='del'>-</div><div class='del'>-/* Information about generated files */</div><div class='del'>-struct gen_files {</div><div class='del'>-	char *base;		/* xxx in /lib/modules/`uname -r`/modules.xxx */</div><div class='del'>-	char *name;             /* name actually used */</div><div class='del'>-	time_t mtime;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct gen_files gen_file[];</div><div class='del'>-extern const int gen_file_count;</div><div class='del'>-/* The enum order must match the gen_file initialization order in config.c */</div><div class='del'>-enum gen_file_enum {</div><div class='del'>-	GEN_GENERIC_STRINGFILE,</div><div class='del'>-	GEN_PCIMAPFILE,</div><div class='del'>-	GEN_ISAPNPMAPFILE,</div><div class='del'>-	GEN_USBMAPFILE,</div><div class='del'>-	GEN_PARPORTMAPFILE,</div><div class='del'>-	GEN_DEPFILE,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern char *persistdir;</div><div class='del'>-</div><div class='del'>-char *fgets_strip(char *buf, int sizebuf, FILE * fin, int *lineno);</div><div class='del'>-int config_read(int all, char *force_ver, char *base_dir, char *conf_file);</div><div class='del'>-GLOB_LIST *config_lstmod(const char *match, const char *type, int first_only);</div><div class='del'>-char *search_module_path(const char *base);</div><div class='del'>-</div><div class='del'>-#endif /* _CONFIG_H */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_alpha.h b/mdk-stage1/insmod-modutils/include/elf_alpha.h<br/>deleted file mode 100644<br/>index f1ec66f1c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_alpha.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_alpha.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for the Alpha.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS64</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_ALPHA)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf64_RelM	Elf64_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_arm.h b/mdk-stage1/insmod-modutils/include/elf_arm.h<br/>deleted file mode 100644<br/>index f6b531e88..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_arm.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_arm.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for ARM.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_ARM)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_REL</div><div class='del'>-#define Elf32_RelM	Elf32_Rel</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_hppa.h b/mdk-stage1/insmod-modutils/include/elf_hppa.h<br/>deleted file mode 100644<br/>index 9a1bd34ce..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_hppa.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_hppa.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for HP-PA.  */</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_PARISC)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_hppa64.h b/mdk-stage1/insmod-modutils/include/elf_hppa64.h<br/>deleted file mode 100644<br/>index 05b201aef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_hppa64.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_hppa64.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for HP-PA64.  */</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS64</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_PARISC)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf64_RelM	Elf64_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_i386.h b/mdk-stage1/insmod-modutils/include/elf_i386.h<br/>deleted file mode 100644<br/>index c6c2d326e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_i386.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_i386.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for i386 et al.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_386)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_REL</div><div class='del'>-#define Elf32_RelM	Elf32_Rel</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_ia64.h b/mdk-stage1/insmod-modutils/include/elf_ia64.h<br/>deleted file mode 100644<br/>index b4d902956..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_ia64.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_ia64.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,9 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for ia64.  */</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS64</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_IA_64)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf64_RelM	Elf64_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_m68k.h b/mdk-stage1/insmod-modutils/include/elf_m68k.h<br/>deleted file mode 100644<br/>index 817fc8f2c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_m68k.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_m68k.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for m68k.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_68K)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_mips.h b/mdk-stage1/insmod-modutils/include/elf_mips.h<br/>deleted file mode 100644<br/>index 8a0430216..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_mips.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_mips.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for MIPS.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#ifdef __MIPSEB__</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-#endif</div><div class='del'>-#ifdef __MIPSEL__</div><div class='del'>-#define ELFDATAM	ELFDATA2LSB</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Account for ELF spec changes.  */</div><div class='del'>-#ifndef EM_MIPS_RS3_LE</div><div class='del'>-#ifdef EM_MIPS_RS4_BE</div><div class='del'>-#define EM_MIPS_RS3_LE	EM_MIPS_RS4_BE</div><div class='del'>-#else</div><div class='del'>-#define EM_MIPS_RS3_LE	10</div><div class='del'>-#endif</div><div class='del'>-#endif /* !EM_MIPS_RS3_LE */</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_MIPS || x == EM_MIPS_RS3_LE)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_REL</div><div class='del'>-#define Elf32_RelM	Elf32_Rel</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_ppc.h b/mdk-stage1/insmod-modutils/include/elf_ppc.h<br/>deleted file mode 100644<br/>index 71596de8c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_ppc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_ppc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for the PowerPC.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_PPC)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_s390.h b/mdk-stage1/insmod-modutils/include/elf_s390.h<br/>deleted file mode 100644<br/>index 547d66b83..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_s390.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_s390.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for i386 et al.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_S390)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_sparc.h b/mdk-stage1/insmod-modutils/include/elf_sparc.h<br/>deleted file mode 100644<br/>index 9b5c348d9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_sparc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_sparc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,10 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for the Sparc.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS32</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#define MATCH_MACHINE(x)  (x == EM_SPARC)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf32_RelM	Elf32_Rela</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/elf_sparc64.h b/mdk-stage1/insmod-modutils/include/elf_sparc64.h<br/>deleted file mode 100644<br/>index 158edd7e1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/elf_sparc64.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/elf_sparc64.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-/* Machine-specific elf macros for the Sparc.  */</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define ELFCLASSM	ELFCLASS64</div><div class='del'>-#define ELFDATAM	ELFDATA2MSB</div><div class='del'>-</div><div class='del'>-#ifndef EM_SPARCV9</div><div class='del'>-#define EM_SPARCV9 43</div><div class='del'>-#endif</div><div class='del'>-#ifndef EM_SPARC64</div><div class='del'>-#define EM_SPARC64 11</div><div class='del'>-#endif</div><div class='del'>-#define MATCH_MACHINE(x)  ((x) == EM_SPARCV9 || (x) == EM_SPARC64)</div><div class='del'>-</div><div class='del'>-#define SHT_RELM	SHT_RELA</div><div class='del'>-#define Elf64_RelM	Elf64_Rela</div><div class='del'>-</div><div class='del'>-#ifndef ELF64_R_SYM</div><div class='del'>-#define ELF64_R_SYM(x)	((x) &gt;&gt; 32)</div><div class='del'>-#define ELF64_R_TYPE(x)	((unsigned)(x))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef ELF64_ST_BIND</div><div class='del'>-#define ELF64_ST_BIND(x)	((x) &gt;&gt; 4)</div><div class='del'>-#define ELF64_ST_TYPE(x)	((x) &amp; 0xf)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/kallsyms.h b/mdk-stage1/insmod-modutils/include/kallsyms.h<br/>deleted file mode 100644<br/>index 9748873cf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/kallsyms.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/kallsyms.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,131 +0,0 @@</div><div class='del'>-/* kallsyms headers</div><div class='del'>-   Copyright 2000 Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.  It is exported to kernel</div><div class='del'>-   space so debuggers can access the kallsyms data.</div><div class='del'>-</div><div class='del'>-   The kallsyms data contains all the non-stack symbols from a kernel</div><div class='del'>-   or a module.  The kernel symbols are held between __start___kallsyms</div><div class='del'>-   and __stop___kallsyms.  The symbols for a module are accessed via</div><div class='del'>-   the struct module chain which is based at module_list.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_KALLSYMS_H</div><div class='del'>-#define MODUTILS_KALLSYMS_H 1</div><div class='del'>-</div><div class='del'>-/* Have to (re)define these ElfW entries here because external kallsyms</div><div class='del'>- * code does not have access to modutils/include/obj.h.  This code is</div><div class='del'>- * included from user spaces tools (modutils) and kernel, they need</div><div class='del'>- * different includes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef ELFCLASS32</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-#include &lt;linux/elf.h&gt;</div><div class='del'>-#else	/* __KERNEL__ */</div><div class='del'>-#include &lt;elf.h&gt;</div><div class='del'>-#endif	/* __KERNEL__ */</div><div class='del'>-#endif	/* ELFCLASS32 */</div><div class='del'>-</div><div class='del'>-#ifndef ELFCLASSM</div><div class='del'>-#define ELFCLASSM ELF_CLASS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef ElfW</div><div class='del'>-# if ELFCLASSM == ELFCLASS32</div><div class='del'>-#  define ElfW(x)  Elf32_ ## x</div><div class='del'>-#  define ELFW(x)  ELF32_ ## x</div><div class='del'>-# else</div><div class='del'>-#  define ElfW(x)  Elf64_ ## x</div><div class='del'>-#  define ELFW(x)  ELF64_ ## x</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Format of data in the kallsyms section.</div><div class='del'>- * Most of the fields are small numbers but the total size and all</div><div class='del'>- * offsets can be large so use the 32/64 bit types for these fields.</div><div class='del'>- *</div><div class='del'>- * Do not use sizeof() on these structures, modutils may be using extra</div><div class='del'>- * fields.  Instead use the size fields in the header to access the</div><div class='del'>- * other bits of data.</div><div class='del'>- */  </div><div class='del'>-</div><div class='del'>-struct kallsyms_header {</div><div class='del'>-	int		size;		/* Size of this header */</div><div class='del'>-	ElfW(Word)	total_size;	/* Total size of kallsyms data */</div><div class='del'>-	int		sections;	/* Number of section entries */</div><div class='del'>-	ElfW(Off)	section_off;	/* Offset to first section entry */</div><div class='del'>-	int		section_size;	/* Size of one section entry */</div><div class='del'>-	int		symbols;	/* Number of symbol entries */</div><div class='del'>-	ElfW(Off)	symbol_off;	/* Offset to first symbol entry */</div><div class='del'>-	int		symbol_size;	/* Size of one symbol entry */</div><div class='del'>-	ElfW(Off)	string_off;	/* Offset to first string */</div><div class='del'>-	ElfW(Addr)	start;		/* Start address of first section */</div><div class='del'>-	ElfW(Addr)	end;		/* End address of last section */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct kallsyms_section {</div><div class='del'>-	ElfW(Addr)	start;		/* Start address of section */</div><div class='del'>-	ElfW(Word)	size;		/* Size of this section */</div><div class='del'>-	ElfW(Off)	name_off;	/* Offset to section name */</div><div class='del'>-	ElfW(Word)	flags;		/* Flags from section */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct kallsyms_symbol {</div><div class='del'>-	ElfW(Off)	section_off;	/* Offset to section that owns this symbol */</div><div class='del'>-	ElfW(Addr)	symbol_addr;	/* Address of symbol */</div><div class='del'>-	ElfW(Off)	name_off;	/* Offset to symbol name */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define KALLSYMS_SEC_NAME "__kallsyms"</div><div class='del'>-#define KALLSYMS_IDX 2			/* obj_kallsyms creates kallsyms as section 2 */</div><div class='del'>-</div><div class='del'>-#define kallsyms_next_sec(h,s) \</div><div class='del'>-	((s) = (struct kallsyms_section *)((char *)(s) + (h)-&gt;section_size))</div><div class='del'>-#define kallsyms_next_sym(h,s) \</div><div class='del'>-	((s) = (struct kallsyms_symbol *)((char *)(s) + (h)-&gt;symbol_size))</div><div class='del'>-</div><div class='del'>-int kallsyms_symbol_to_address(</div><div class='del'>-	const char       *name,			/* Name to lookup */</div><div class='del'>-	unsigned long    *token,		/* Which module to start with */</div><div class='del'>-	const char      **mod_name,		/* Set to module name or "kernel" */</div><div class='del'>-	unsigned long    *mod_start,		/* Set to start address of module */</div><div class='del'>-	unsigned long    *mod_end,		/* Set to end address of module */</div><div class='del'>-	const char      **sec_name,		/* Set to section name */</div><div class='del'>-	unsigned long    *sec_start,		/* Set to start address of section */</div><div class='del'>-	unsigned long    *sec_end,		/* Set to end address of section */</div><div class='del'>-	const char      **sym_name,		/* Set to full symbol name */</div><div class='del'>-	unsigned long    *sym_start,		/* Set to start address of symbol */</div><div class='del'>-	unsigned long    *sym_end		/* Set to end address of symbol */</div><div class='del'>-	);</div><div class='del'>-</div><div class='del'>-int kallsyms_address_to_symbol(</div><div class='del'>-	unsigned long     address,		/* Address to lookup */</div><div class='del'>-	const char      **mod_name,		/* Set to module name */</div><div class='del'>-	unsigned long    *mod_start,		/* Set to start address of module */</div><div class='del'>-	unsigned long    *mod_end,		/* Set to end address of module */</div><div class='del'>-	const char      **sec_name,		/* Set to section name */</div><div class='del'>-	unsigned long    *sec_start,		/* Set to start address of section */</div><div class='del'>-	unsigned long    *sec_end,		/* Set to end address of section */</div><div class='del'>-	const char      **sym_name,		/* Set to full symbol name */</div><div class='del'>-	unsigned long    *sym_start,		/* Set to start address of symbol */</div><div class='del'>-	unsigned long    *sym_end		/* Set to end address of symbol */</div><div class='del'>-	);</div><div class='del'>-</div><div class='del'>-#endif /* kallsyms.h */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/kerneld.h b/mdk-stage1/insmod-modutils/include/kerneld.h<br/>deleted file mode 100644<br/>index 3bc2c9d42..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/kerneld.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/kerneld.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-/* Definitions for the Linux kerneld SYSV IPC interface.</div><div class='del'>-   This file was part of the Linux kernel, and so is covered by the GPL.  */</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_KERNELD_H</div><div class='del'>-#define MODUTILS_KERNELD_H</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#define KERNELD_SYSTEM 1</div><div class='del'>-#define KERNELD_REQUEST_MODULE 2		/* "insmod" */</div><div class='del'>-#define KERNELD_RELEASE_MODULE 3		/* "rmmod" */</div><div class='del'>-#define KERNELD_DELAYED_RELEASE_MODULE 4	/* "rmmod" */</div><div class='del'>-#define KERNELD_CANCEL_RELEASE_MODULE 5		/* "rmmod" */</div><div class='del'>-#define KERNELD_REQUEST_ROUTE 6			/* net/ipv4/route.c */</div><div class='del'>-#define KERNELD_BLANKER 7			/* drivers/char/console.c */</div><div class='del'>-#define KERNELD_PNP 8				/* drivers/pnp/kerneld.c */</div><div class='del'>-#define KERNELD_ARP 256				/* net/ipv4/arp.c */</div><div class='del'>-</div><div class='del'>-#ifdef NEW_KERNELD_PROTOCOL</div><div class='del'>-# define OLDIPC_KERNELD 00040000	/* old kerneld message channel */</div><div class='del'>-# define IPC_KERNELD 00140000		/* new kerneld message channel */</div><div class='del'>-# define KDHDR (sizeof(long) + sizeof(short) + sizeof(short))</div><div class='del'>-# define NULL_KDHDR 0, 2, 0</div><div class='del'>-#else /* NEW_KERNELD_PROTOCOL */</div><div class='del'>-# define IPC_KERNELD 00040000</div><div class='del'>-# define KDHDR (sizeof(long))</div><div class='del'>-# define NULL_KDHDR 0</div><div class='del'>-#endif /* NEW_KERNELD_PROTOCOL */</div><div class='del'>-</div><div class='del'>-#define KERNELD_MAXCMD 0x7ffeffff</div><div class='del'>-#define KERNELD_MINSEQ 0x7fff0000 /* "commands" legal up to 0x7ffeffff */</div><div class='del'>-#define KERNELD_WAIT 0x80000000</div><div class='del'>-#define KERNELD_NOWAIT 0</div><div class='del'>-</div><div class='del'>-struct kerneld_msg</div><div class='del'>-  {</div><div class='del'>-    long mtype;</div><div class='del'>-    long id;</div><div class='del'>-#ifdef NEW_KERNELD_PROTOCOL</div><div class='del'>-    short version;</div><div class='del'>-    short pid;</div><div class='del'>-#endif /* NEW_KERNELD_PROTOCOL */</div><div class='del'>-    char text[1];</div><div class='del'>-  };</div><div class='del'>-</div><div class='del'>-#endif /* kerneld.h */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/modstat.h b/mdk-stage1/insmod-modutils/include/modstat.h<br/>deleted file mode 100644<br/>index b8a58eeae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/modstat.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/modstat.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,55 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * For kernel module status and information</div><div class='del'>- *</div><div class='del'>- * Add module_name_list and l_module_name_list.</div><div class='del'>- *   Keith Owens &lt;kaos@ocs.com.au&gt; November 1999.</div><div class='del'>- * Björn Ekwall &lt;bj0rn@blox.se&gt; February 1999.</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-#ifndef _KERNEL_H</div><div class='del'>-#define _KERNEL_H</div><div class='del'>-</div><div class='del'>-#define K_SYMBOLS 1 /* Want info about symbols */</div><div class='del'>-#define K_INFO 2 /* Want extended module info */</div><div class='del'>-#define K_REFS 4 /* Want info about references */</div><div class='del'>-</div><div class='del'>-struct module_stat {</div><div class='del'>-	char *name;</div><div class='del'>-	unsigned long addr;</div><div class='del'>-	unsigned long modstruct; /* COMPAT_2_0! *//* depends on architecture? */</div><div class='del'>-	unsigned long size;</div><div class='del'>-	unsigned long flags;</div><div class='del'>-	long usecount;</div><div class='del'>-	size_t nsyms;</div><div class='del'>-	struct module_symbol *syms;</div><div class='del'>-	size_t nrefs;</div><div class='del'>-	struct module_stat **refs;</div><div class='del'>-	unsigned long status;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct module_stat *module_stat;</div><div class='del'>-extern size_t n_module_stat;</div><div class='del'>-extern char *module_name_list;</div><div class='del'>-extern size_t l_module_name_list;</div><div class='del'>-extern struct module_symbol *ksyms;</div><div class='del'>-extern size_t nksyms;</div><div class='del'>-extern int k_new_syscalls;</div><div class='del'>-</div><div class='del'>-int get_kernel_info(int type);</div><div class='del'>-</div><div class='del'>-#endif /* _KERNEL_H */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/module.h b/mdk-stage1/insmod-modutils/include/module.h<br/>deleted file mode 100644<br/>index db49ab2b2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/module.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/module.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,210 +0,0 @@</div><div class='del'>-/* Definitions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_MODULE_H</div><div class='del'>-#define MODUTILS_MODULE_H 1</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-/* This file contains the structures used by the 2.0 and 2.1 kernels.</div><div class='del'>-   We do not use the kernel headers directly because we do not wish</div><div class='del'>-   to be dependant on a particular kernel version to compile insmod.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The structures used by Linux 2.0.  */</div><div class='del'>-</div><div class='del'>-/* The symbol format used by get_kernel_syms(2).  */</div><div class='del'>-struct old_kernel_sym</div><div class='del'>-{</div><div class='del'>-  unsigned long value;</div><div class='del'>-  char name[60];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module_ref</div><div class='del'>-{</div><div class='del'>-  unsigned long module;		/* kernel addresses */</div><div class='del'>-  unsigned long next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module_symbol</div><div class='del'>-{</div><div class='del'>-  unsigned long addr;</div><div class='del'>-  unsigned long name;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_symbol_table</div><div class='del'>-{</div><div class='del'>-  int size;			/* total, including string table!!! */</div><div class='del'>-  int n_symbols;</div><div class='del'>-  int n_refs;</div><div class='del'>-  struct old_module_symbol symbol[0]; /* actual size defined by n_symbols */</div><div class='del'>-  struct old_module_ref ref[0];	/* actual size defined by n_refs */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_mod_routines</div><div class='del'>-{</div><div class='del'>-  unsigned long init;</div><div class='del'>-  unsigned long cleanup;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct old_module</div><div class='del'>-{</div><div class='del'>-  unsigned long next;</div><div class='del'>-  unsigned long ref;		/* the list of modules that refer to me */</div><div class='del'>-  unsigned long symtab;</div><div class='del'>-  unsigned long name;</div><div class='del'>-  int size;			/* size of module in pages */</div><div class='del'>-  unsigned long addr;		/* address of module */</div><div class='del'>-  int state;</div><div class='del'>-  unsigned long cleanup;	/* cleanup routine */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Sent to init_module(2) or'ed into the code size parameter.  */</div><div class='del'>-#define OLD_MOD_AUTOCLEAN 0x40000000 /* big enough, but no sign problems... */</div><div class='del'>-</div><div class='del'>-int get_kernel_syms(struct old_kernel_sym *);</div><div class='del'>-int old_sys_init_module(const char *name, char *code, unsigned codesize,</div><div class='del'>-			struct old_mod_routines *, struct old_symbol_table *);</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* For sizeof() which are related to the module platform and not to the</div><div class='del'>-   environment isnmod is running in, use sizeof_xx instead of sizeof(xx).  */</div><div class='del'>-</div><div class='del'>-#define tgt_sizeof_char		sizeof(char)</div><div class='del'>-#define tgt_sizeof_short	sizeof(short)</div><div class='del'>-#define tgt_sizeof_int		sizeof(int)</div><div class='del'>-#define tgt_sizeof_long		sizeof(long)</div><div class='del'>-#define tgt_sizeof_char_p	sizeof(char *)</div><div class='del'>-#define tgt_sizeof_void_p	sizeof(void *)</div><div class='del'>-#define tgt_long		long</div><div class='del'>-#define tgt_long_fmt		"l"</div><div class='del'>-</div><div class='del'>-/* This assumes that long long on a 32 bit system is equivalent to long on the</div><div class='del'>- * equivalent 64 bit system.  Also that void and char pointers are 8 bytes on</div><div class='del'>- * all 64 bit systems.  Add per system tweaks if it ever becomes necessary.</div><div class='del'>- */</div><div class='del'>-#if defined(COMMON_3264) &amp;&amp; defined(ONLY_64)</div><div class='del'>-#undef tgt_long</div><div class='del'>-#undef tgt_long_fmt</div><div class='del'>-#undef tgt_sizeof_long</div><div class='del'>-#undef tgt_sizeof_char_p</div><div class='del'>-#undef tgt_sizeof_void_p</div><div class='del'>-#define tgt_long                long long</div><div class='del'>-#define tgt_long_fmt		"ll"</div><div class='del'>-#define tgt_sizeof_long         8</div><div class='del'>-#define tgt_sizeof_char_p       8</div><div class='del'>-#define tgt_sizeof_void_p       8</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The structures used in Linux 2.1 onwards.  */</div><div class='del'>-</div><div class='del'>-/* Note: module_symbol does not use tgt_long intentionally */</div><div class='del'>-struct module_symbol</div><div class='del'>-{</div><div class='del'>-  unsigned long value;</div><div class='del'>-  unsigned long name;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct module_ref</div><div class='del'>-{</div><div class='del'>-  unsigned tgt_long dep;		/* kernel addresses */</div><div class='del'>-  unsigned tgt_long ref;</div><div class='del'>-  unsigned tgt_long next_ref;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct module</div><div class='del'>-{</div><div class='del'>-  unsigned tgt_long size_of_struct;	/* == sizeof(module) */</div><div class='del'>-  unsigned tgt_long next;</div><div class='del'>-  unsigned tgt_long name;</div><div class='del'>-  unsigned tgt_long size;</div><div class='del'>-</div><div class='del'>-  tgt_long usecount;</div><div class='del'>-  unsigned tgt_long flags;		/* AUTOCLEAN et al */</div><div class='del'>-</div><div class='del'>-  unsigned nsyms;</div><div class='del'>-  unsigned ndeps;</div><div class='del'>-</div><div class='del'>-  unsigned tgt_long syms;</div><div class='del'>-  unsigned tgt_long deps;</div><div class='del'>-  unsigned tgt_long refs;</div><div class='del'>-  unsigned tgt_long init;</div><div class='del'>-  unsigned tgt_long cleanup;</div><div class='del'>-  unsigned tgt_long ex_table_start;</div><div class='del'>-  unsigned tgt_long ex_table_end;</div><div class='del'>-#ifdef __alpha__</div><div class='del'>-  unsigned tgt_long gp;</div><div class='del'>-#endif</div><div class='del'>-  /* Everything after here is extension.  */</div><div class='del'>-  unsigned tgt_long read_start;		/* Read data from existing module */</div><div class='del'>-  unsigned tgt_long read_end;</div><div class='del'>-  unsigned tgt_long can_unload;</div><div class='del'>-  unsigned tgt_long runsize;</div><div class='del'>-  unsigned tgt_long kallsyms_start;</div><div class='del'>-  unsigned tgt_long kallsyms_end;</div><div class='del'>-  unsigned tgt_long archdata_start;</div><div class='del'>-  unsigned tgt_long archdata_end;</div><div class='del'>-  unsigned tgt_long kernel_data;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct module_info</div><div class='del'>-{</div><div class='del'>-  unsigned long addr;</div><div class='del'>-  unsigned long size;</div><div class='del'>-  unsigned long flags;</div><div class='del'>-	   long usecount;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Bits of module.flags.  */</div><div class='del'>-#define NEW_MOD_RUNNING		1</div><div class='del'>-#define NEW_MOD_DELETED		2</div><div class='del'>-#define NEW_MOD_AUTOCLEAN	4</div><div class='del'>-#define NEW_MOD_VISITED		8</div><div class='del'>-#define NEW_MOD_USED_ONCE	16</div><div class='del'>-#define NEW_MOD_INITIALIZING	64</div><div class='del'>-</div><div class='del'>-int sys_init_module(const char *name, const struct module *);</div><div class='del'>-int query_module(const char *name, int which, void *buf, size_t bufsize,</div><div class='del'>-		 size_t *ret);</div><div class='del'>-</div><div class='del'>-/* Values for query_module's which.  */</div><div class='del'>-</div><div class='del'>-#define QM_MODULES	1</div><div class='del'>-#define QM_DEPS		2</div><div class='del'>-#define QM_REFS		3</div><div class='del'>-#define QM_SYMBOLS	4</div><div class='del'>-#define QM_INFO		5</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-/* The system calls unchanged between 2.0 and 2.1.  */</div><div class='del'>-</div><div class='del'>-unsigned long create_module(const char *, size_t);</div><div class='del'>-int delete_module(const char *);</div><div class='del'>-</div><div class='del'>-/* In safe mode the last parameter is forced to be a module name and meta</div><div class='del'>- * expansion is not allowed on that name.</div><div class='del'>- */</div><div class='del'>-extern unsigned int safemode;</div><div class='del'>-</div><div class='del'>-#endif /* module.h */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/obj.h b/mdk-stage1/insmod-modutils/include/obj.h<br/>deleted file mode 100644<br/>index b140c65c3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/obj.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/obj.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,275 +0,0 @@</div><div class='del'>-/* Elf object file loading and relocation routines.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-   obj_free() added by Björn Ekwall &lt;bj0rn@blox.se&gt; March 1999</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_OBJ_H</div><div class='del'>-#define MODUTILS_OBJ_H 1</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-/* The relocatable object is manipulated using elfin types.  */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;elf.h&gt;</div><div class='del'>-#include ELF_MACHINE_H</div><div class='del'>-</div><div class='del'>-#ifndef ElfW</div><div class='del'>-# if ELFCLASSM == ELFCLASS32</div><div class='del'>-#  define ElfW(x)  Elf32_ ## x</div><div class='del'>-#  define ELFW(x)  ELF32_ ## x</div><div class='del'>-# else</div><div class='del'>-#  define ElfW(x)  Elf64_ ## x</div><div class='del'>-#  define ELFW(x)  ELF64_ ## x</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(COMMON_3264) &amp;&amp; defined(ONLY_32)</div><div class='del'>-#  define ObjW(x)  obj32_ ## x</div><div class='del'>-#else</div><div class='del'>-#  if defined(COMMON_3264) &amp;&amp; defined(ONLY_64)</div><div class='del'>-#    define ObjW(x)  obj64_ ## x</div><div class='del'>-#  else</div><div class='del'>-#    define ObjW(x)    obj_ ## x</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* For some reason this is missing from lib5.  */</div><div class='del'>-#ifndef ELF32_ST_INFO</div><div class='del'>-# define ELF32_ST_INFO(bind, type)       (((bind) &lt;&lt; 4) + ((type) &amp; 0xf))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef ELF64_ST_INFO</div><div class='del'>-# define ELF64_ST_INFO(bind, type)       (((bind) &lt;&lt; 4) + ((type) &amp; 0xf))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct obj_string_patch_struct;</div><div class='del'>-struct obj_symbol_patch_struct;</div><div class='del'>-</div><div class='del'>-struct obj_section</div><div class='del'>-{</div><div class='del'>-  ElfW(Shdr) header;</div><div class='del'>-  const char *name;</div><div class='del'>-  char *contents;</div><div class='del'>-  struct obj_section *load_next;</div><div class='del'>-  int idx;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol *next;	/* hash table link */</div><div class='del'>-  const char *name;</div><div class='del'>-  unsigned long value;</div><div class='del'>-  unsigned long size;</div><div class='del'>-  int secidx;			/* the defining section index/module */</div><div class='del'>-  int info;</div><div class='del'>-  int ksymidx;			/* for export to the kernel symtab */</div><div class='del'>-  int r_type;			/* relocation type */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Hardcode the hash table size.  We shouldn't be needing so many</div><div class='del'>-   symbols that we begin to degrade performance, and we get a big win</div><div class='del'>-   by giving the compiler a constant divisor.  */</div><div class='del'>-</div><div class='del'>-#define HASH_BUCKETS  521</div><div class='del'>-</div><div class='del'>-struct obj_file</div><div class='del'>-{</div><div class='del'>-  ElfW(Ehdr) header;</div><div class='del'>-  ElfW(Addr) baseaddr;</div><div class='del'>-  struct obj_section **sections;</div><div class='del'>-  struct obj_section *load_order;</div><div class='del'>-  struct obj_section **load_order_search_start;</div><div class='del'>-  struct obj_string_patch_struct *string_patches;</div><div class='del'>-  struct obj_symbol_patch_struct *symbol_patches;</div><div class='del'>-  int (*symbol_cmp)(const char *, const char *);</div><div class='del'>-  unsigned long (*symbol_hash)(const char *);</div><div class='del'>-  unsigned long local_symtab_size;</div><div class='del'>-  struct obj_symbol **local_symtab;</div><div class='del'>-  struct obj_symbol *symtab[HASH_BUCKETS];</div><div class='del'>-  const char *filename;</div><div class='del'>-  char *persist;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-{</div><div class='del'>-  obj_reloc_ok,</div><div class='del'>-  obj_reloc_overflow,</div><div class='del'>-  obj_reloc_dangerous,</div><div class='del'>-  obj_reloc_unhandled,</div><div class='del'>-  obj_reloc_constant_gp</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_string_patch_struct</div><div class='del'>-{</div><div class='del'>-  struct obj_string_patch_struct *next;</div><div class='del'>-  int reloc_secidx;</div><div class='del'>-  ElfW(Addr) reloc_offset;</div><div class='del'>-  ElfW(Addr) string_offset;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_symbol_patch_struct</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol_patch_struct *next;</div><div class='del'>-  int reloc_secidx;</div><div class='del'>-  ElfW(Addr) reloc_offset;</div><div class='del'>-  struct obj_symbol *sym;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Generic object manipulation routines.  */</div><div class='del'>-</div><div class='del'>-#define obj_elf_hash			ObjW(elf_hash)</div><div class='del'>-#define obj_elf_hash_n			ObjW(elf_hash_n)</div><div class='del'>-#define obj_add_symbol			ObjW(add_symbol)</div><div class='del'>-#define obj_find_symbol			ObjW(find_symbol)</div><div class='del'>-#define obj_symbol_final_value		ObjW(symbol_final_value)</div><div class='del'>-#define obj_set_symbol_compare		ObjW(set_symbol_compare)</div><div class='del'>-#define obj_find_section		ObjW(find_section)</div><div class='del'>-#define obj_insert_section_load_order	ObjW(insert_section_load_order)</div><div class='del'>-#define obj_create_alloced_section	ObjW(create_alloced_section)</div><div class='del'>-#define obj_create_alloced_section_first \</div><div class='del'>-					ObjW(create_alloced_section_first)</div><div class='del'>-#define obj_extend_section		ObjW(extend_section)</div><div class='del'>-#define obj_string_patch		ObjW(string_patch)</div><div class='del'>-#define obj_symbol_patch		ObjW(symbol_patch)</div><div class='del'>-#define obj_check_undefineds		ObjW(check_undefineds)</div><div class='del'>-#define obj_clear_undefineds		ObjW(clear_undefineds)</div><div class='del'>-#define obj_allocate_commons		ObjW(allocate_commons)</div><div class='del'>-#define obj_load_size			ObjW(load_size)</div><div class='del'>-#define obj_relocate			ObjW(relocate)</div><div class='del'>-#define obj_load			ObjW(load)</div><div class='del'>-#define obj_free			ObjW(free)</div><div class='del'>-#define obj_create_image		ObjW(create_image)</div><div class='del'>-#define obj_addr_to_native_ptr		ObjW(addr_to_native_ptr)</div><div class='del'>-#define obj_native_ptr_to_addr		ObjW(native_ptr_to_addr)</div><div class='del'>-#define arch_new_file			ObjW(arch_new_file)</div><div class='del'>-#define arch_new_section		ObjW(arch_new_section)</div><div class='del'>-#define arch_new_symbol			ObjW(arch_new_symbol)</div><div class='del'>-#define arch_apply_relocation		ObjW(arch_apply_relocation)</div><div class='del'>-#define arch_create_got			ObjW(arch_create_got)</div><div class='del'>-#define arch_init_module		ObjW(arch_init_module)</div><div class='del'>-#define arch_load_proc_section		ObjW(arch_load_proc_section)</div><div class='del'>-#define arch_finalize_section_address	ObjW(arch_finalize_section_address)</div><div class='del'>-#define arch_archdata			ObjW(arch_archdata)</div><div class='del'>-</div><div class='del'>-unsigned long obj_elf_hash (const char *);</div><div class='del'>-</div><div class='del'>-unsigned long obj_elf_hash_n (const char *, unsigned long len);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_add_symbol (struct obj_file *f, const char *name,</div><div class='del'>-				   unsigned long symidx, int info, int secidx,</div><div class='del'>-				   ElfW(Addr) value, unsigned long size);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *obj_find_symbol (struct obj_file *f,</div><div class='del'>-					 const char *name);</div><div class='del'>-</div><div class='del'>-ElfW(Addr) obj_symbol_final_value (struct obj_file *f,</div><div class='del'>-				  struct obj_symbol *sym);</div><div class='del'>-</div><div class='del'>-void obj_set_symbol_compare (struct obj_file *f,</div><div class='del'>-			    int (*cmp)(const char *, const char *),</div><div class='del'>-			    unsigned long (*hash)(const char *));</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_find_section (struct obj_file *f,</div><div class='del'>-					   const char *name);</div><div class='del'>-</div><div class='del'>-void obj_insert_section_load_order (struct obj_file *f,</div><div class='del'>-				    struct obj_section *sec);</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section (struct obj_file *f,</div><div class='del'>-						const char *name,</div><div class='del'>-						unsigned long align,</div><div class='del'>-						unsigned long size);</div><div class='del'>-</div><div class='del'>-struct obj_section *obj_create_alloced_section_first (struct obj_file *f,</div><div class='del'>-						      const char *name,</div><div class='del'>-						      unsigned long align,</div><div class='del'>-						      unsigned long size);</div><div class='del'>-</div><div class='del'>-void *obj_extend_section (struct obj_section *sec, unsigned long more);</div><div class='del'>-</div><div class='del'>-int obj_string_patch (struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		     const char *string);</div><div class='del'>-</div><div class='del'>-int obj_symbol_patch (struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		     struct obj_symbol *sym);</div><div class='del'>-</div><div class='del'>-int obj_check_undefineds (struct obj_file *f, int quiet);</div><div class='del'>-</div><div class='del'>-void obj_clear_undefineds (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-void obj_allocate_commons (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-unsigned long obj_load_size (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-int obj_relocate (struct obj_file *f, ElfW(Addr) base);</div><div class='del'>-</div><div class='del'>-struct obj_file *obj_load (int f, Elf32_Half e_type, const char *filename);</div><div class='del'>-</div><div class='del'>-void obj_free (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-int obj_create_image (struct obj_file *f, char *image);</div><div class='del'>-</div><div class='del'>-int obj_kallsyms (struct obj_file *fin, struct obj_file **fout);</div><div class='del'>-</div><div class='del'>-/* Architecture specific manipulation routines.  */</div><div class='del'>-</div><div class='del'>-struct obj_file *arch_new_file (void);</div><div class='del'>-</div><div class='del'>-struct obj_section *arch_new_section (void);</div><div class='del'>-</div><div class='del'>-struct obj_symbol *arch_new_symbol (void);</div><div class='del'>-</div><div class='del'>-enum obj_reloc arch_apply_relocation (struct obj_file *f,</div><div class='del'>-				      struct obj_section *targsec,</div><div class='del'>-				      struct obj_section *symsec,</div><div class='del'>-				      struct obj_symbol *sym,</div><div class='del'>-				      ElfW(RelM) *rel, ElfW(Addr) value);</div><div class='del'>-</div><div class='del'>-int arch_create_got (struct obj_file *f);</div><div class='del'>-</div><div class='del'>-struct module;</div><div class='del'>-int arch_init_module (struct obj_file *f, struct module *);</div><div class='del'>-</div><div class='del'>-int arch_load_proc_section (struct obj_section *sec, int fp);</div><div class='del'>-</div><div class='del'>-int arch_finalize_section_address (struct obj_file *f, ElfW(Addr) base);</div><div class='del'>-</div><div class='del'>-int arch_archdata (struct obj_file *fin, struct obj_section *sec);</div><div class='del'>-</div><div class='del'>-#define ARCHDATA_SEC_NAME "__archdata"</div><div class='del'>-</div><div class='del'>-/* Pointers in objects can be 32 or 64 bit */</div><div class='del'>-union obj_ptr_4 {</div><div class='del'>-	Elf32_Word addr;</div><div class='del'>-	void *ptr;</div><div class='del'>-};</div><div class='del'>-union obj_ptr_8 {</div><div class='del'>-	Elf64_Xword addr;</div><div class='del'>-	void *ptr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-void *obj_addr_to_native_ptr(ElfW(Addr));</div><div class='del'>-</div><div class='del'>-ElfW(Addr) obj_native_ptr_to_addr(void *);</div><div class='del'>-</div><div class='del'>-#endif /* obj.h */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/util.h b/mdk-stage1/insmod-modutils/include/util.h<br/>deleted file mode 100644<br/>index b2e4a67c3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/util.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/util.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,101 +0,0 @@</div><div class='del'>-/* Miscelaneous utility functions.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MODUTILS_UTIL_H</div><div class='del'>-#define MODUTILS_UTIL_H 1</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-#define SHELL_META "&amp;();|&lt;&gt;$`\"'\\!{}[]~=+:?*" /* Sum of bj0rn and Debian */</div><div class='del'>-</div><div class='del'>-void *xmalloc(size_t);</div><div class='del'>-void *xrealloc(void *, size_t);</div><div class='del'>-char *xstrdup(const char *);</div><div class='del'>-char *xstrcat(char *, const char *, size_t);</div><div class='del'>-int   xsystem(const char *, char *const[]);</div><div class='del'>-int   arch64(void);</div><div class='del'>-</div><div class='del'>-typedef int (*xftw_func_t)(const char *, const struct stat *);</div><div class='del'>-extern int xftw(const char *directory, xftw_func_t);</div><div class='del'>-</div><div class='del'>-/* Error logging */</div><div class='del'>-extern int log;</div><div class='del'>-extern int errors;</div><div class='del'>-extern const char *error_file;</div><div class='del'>-</div><div class='del'>-extern int flag_verbose;</div><div class='del'>-extern void verbose(const char *ctl,...);</div><div class='del'>-</div><div class='del'>-void error(const char *fmt, ...)</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-  __attribute__((format(printf, 1, 2)))</div><div class='del'>-#endif</div><div class='del'>-  ;</div><div class='del'>-</div><div class='del'>-void lprintf(const char *fmt, ...)</div><div class='del'>-#ifdef __GNUC__</div><div class='del'>-  __attribute__((format(printf, 1, 2)))</div><div class='del'>-#endif</div><div class='del'>-  ;</div><div class='del'>-</div><div class='del'>-void setsyslog(const char *program);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Generic globlist &lt;bj0rn@blox.se&gt;</div><div class='del'>- */</div><div class='del'>-typedef struct {</div><div class='del'>-	int pathc;       /* Count of paths matched so far  */</div><div class='del'>-	char **pathv;    /* List of matched pathnames.  */</div><div class='del'>-} GLOB_LIST;</div><div class='del'>-int meta_expand(char *pt, GLOB_LIST *g, char *base_dir, char *version, int type);</div><div class='del'>-#define ME_BUILTIN_COMMAND	1</div><div class='del'>-#define ME_SHELL_COMMAND	2</div><div class='del'>-#define ME_GLOB			4</div><div class='del'>-#define ME_ALL			(ME_GLOB|ME_SHELL_COMMAND|ME_BUILTIN_COMMAND)</div><div class='del'>-</div><div class='del'>-extern void snap_shot(const char *module_name, int number);</div><div class='del'>-extern void snap_shot_log(const char *fmt,...);</div><div class='del'>-</div><div class='del'>-#ifdef CONFIG_USE_ZLIB</div><div class='del'>-int gzf_open(const char *name, int mode);</div><div class='del'>-int gzf_read(int fd, void *buf, size_t count);</div><div class='del'>-off_t gzf_lseek(int fd, off_t offset, int whence);</div><div class='del'>-void gzf_close(int fd);</div><div class='del'>-</div><div class='del'>-#else /* ! CONFIG_USE_ZLIB */</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#define gzf_open	open</div><div class='del'>-#define gzf_read	read</div><div class='del'>-#define gzf_lseek	lseek</div><div class='del'>-#define gzf_close	close</div><div class='del'>-</div><div class='del'>-#endif /* CONFIG_USE_ZLIB */</div><div class='del'>-</div><div class='del'>-#define SYMPREFIX "__insmod_";</div><div class='del'>-extern const char symprefix[10];	/* Must be sizeof(SYMPREFIX), including nul */</div><div class='del'>-</div><div class='del'>-#endif /* util.h */</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/include/version.h b/mdk-stage1/insmod-modutils/include/version.h<br/>deleted file mode 100644<br/>index 51ca0eb29..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/include/version.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/include/version.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-#define MODUTILS_VERSION "2.4.2"</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/insmod-frontend.c b/mdk-stage1/insmod-modutils/insmod-frontend.c<br/>deleted file mode 100644<br/>index 2b3aa1acb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/insmod-frontend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/insmod-frontend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,24 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int insmod_main( int argc, char **argv);</div><div class='del'>-</div><div class='del'>-int main( int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	printf("Using insmod provided by modutils.\n");</div><div class='del'>-	return insmod_main(argc, argv);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/insmod.c b/mdk-stage1/insmod-modutils/insmod.c<br/>deleted file mode 100644<br/>index 359b28837..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/insmod.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/insmod.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1964 +0,0 @@</div><div class='del'>-/* Insert a module into a running kernel.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   New implementation contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-   Based on original work by Bjorn Ekwall &lt;bj0rn@blox.se&gt;</div><div class='del'>-   Restructured (and partly rewritten) by:</div><div class='del'>-	Björn Ekwall &lt;bj0rn@blox.se&gt; February 1999</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>-  */</div><div class='del'>-</div><div class='del'>-  /*</div><div class='del'>-     Fixes:</div><div class='del'>-</div><div class='del'>-     Adjust module size for mod_use_count in old_init_module:</div><div class='del'>-     B. James Phillippe &lt;bryan@terran.org&gt;</div><div class='del'>-</div><div class='del'>-     Merged modprobe + many fixes: Björn Ekwall &lt;bj0rn@blox.se&gt; February 1999</div><div class='del'>-     SMP "friendliness" (and -P): Bill Zumach &lt;zumach+@transarc.com&gt;</div><div class='del'>-</div><div class='del'>-     Ksymoops support: Keith Owens &lt;kaos@ocs.com.au&gt; August 1999.</div><div class='del'>-</div><div class='del'>-     Add -r flag: Keith Owens &lt;kaos@ocs.com.au&gt; October 1999.</div><div class='del'>-</div><div class='del'>-     More flexible recognition of the way the utility was called.</div><div class='del'>-     Suggested by Stepan Kasal, implemented in a different way by Keith</div><div class='del'>-     Owens &lt;kaos@ocs.com.au&gt; December 1999.</div><div class='del'>-</div><div class='del'>-     Rationalize common code for 32/64 bit architectures.</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; December 1999.</div><div class='del'>-     Add arch64().</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; December 1999.</div><div class='del'>-     kallsyms support</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; April 2000.</div><div class='del'>-     archdata support</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; August 2000.</div><div class='del'>-     Add insmod -O, move print map before sys_init_module.</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; October 2000.</div><div class='del'>-     Add insmod -S.</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; November 2000.</div><div class='del'>-     Add persistent data support.</div><div class='del'>-       Keith Owens &lt;kaos@ocs.com.au&gt; November 2000.</div><div class='del'>-   */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include "../insmod.h"</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-//#include &lt;alloca.h&gt;  provided by stdlib</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;getopt.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/file.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-#include "obj.h"</div><div class='del'>-#include "kallsyms.h"</div><div class='del'>-#include "util.h"</div><div class='del'>-#include "version.h"</div><div class='del'>-</div><div class='del'>-#include "modstat.h"</div><div class='del'>-#include "config.h"</div><div class='del'>-</div><div class='del'>-#define STRVERSIONLEN	32</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-static int flag_force_load = 0;</div><div class='del'>-static int flag_silent_probe = 0;</div><div class='del'>-static int flag_export = 1;</div><div class='del'>-static int flag_load_map = 0;</div><div class='del'>-static int flag_ksymoops = 1;</div><div class='del'>-</div><div class='del'>-static int n_ext_modules_used;</div><div class='del'>-static int m_has_modinfo;</div><div class='del'>-</div><div class='del'>-extern int insmod_main(int argc, char **argv);</div><div class='del'>-extern int insmod_main_32(int argc, char **argv);</div><div class='del'>-extern int insmod_main_64(int argc, char **argv);</div><div class='del'>-extern int modprobe_main(int argc, char **argv);</div><div class='del'>-extern int rmmod_main(int argc, char **argv);</div><div class='del'>-extern int ksyms_main(int argc, char **argv);</div><div class='del'>-extern int lsmod_main(int argc, char **argv);</div><div class='del'>-extern int kallsyms_main(int argc, char **argv);</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* Get the kernel version in the canonical integer form.  */</div><div class='del'>-</div><div class='del'>-static int get_kernel_version(char str[STRVERSIONLEN])</div><div class='del'>-{</div><div class='del'>-	char *p, *q;</div><div class='del'>-	int a, b, c;</div><div class='del'>-</div><div class='del'>-	strncpy(str, uts_info.release, STRVERSIONLEN);</div><div class='del'>-	p = uts_info.release;</div><div class='del'>-</div><div class='del'>-	a = strtoul(p, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	b = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	c = strtoul(p + 1, &amp;q, 10);</div><div class='del'>-	if (p + 1 == q)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return a &lt;&lt; 16 | b &lt;&lt; 8 | c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* String comparison for non-co-versioned kernel and module.</div><div class='del'>- * prefix should be the same as used by genksyms for this kernel.</div><div class='del'>- */</div><div class='del'>-static char *ncv_prefix = NULL;	/* Overridden by --prefix option */</div><div class='del'>-static int ncv_plen = 0;</div><div class='del'>-</div><div class='del'>-/* Only set prefix once. If set by the user, use it.  If not set by the</div><div class='del'>- * user, look for a well known kernel symbol and derive the prefix from</div><div class='del'>- * there.  Otherwise set the prefix depending on whether uts_info</div><div class='del'>- * includes SMP or not for backwards compatibility.</div><div class='del'>- */</div><div class='del'>-static void set_ncv_prefix(char *prefix)</div><div class='del'>-{</div><div class='del'>-	static char derived_prefix[256];</div><div class='del'>-	static const char *well_known_symbol[] = { "get_module_symbol_R",</div><div class='del'>-						   "inter_module_get_R",</div><div class='del'>-						 };</div><div class='del'>-	struct module_symbol *s;</div><div class='del'>-	int i, j, l, m, pl;</div><div class='del'>-	const char *name;</div><div class='del'>-	char *p;</div><div class='del'>-</div><div class='del'>-	if (ncv_prefix)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	if (prefix)</div><div class='del'>-		ncv_prefix = prefix;</div><div class='del'>-	else {</div><div class='del'>-		/* Extract the prefix (if any) from well known symbols */</div><div class='del'>-		for (i = 0, s = ksyms; i &lt; nksyms; ++i, ++s) {</div><div class='del'>-			name = (char *) s-&gt;name;</div><div class='del'>-			l = strlen(name);</div><div class='del'>-			for (j = 0; j &lt; sizeof(well_known_symbol)/sizeof(well_known_symbol[0]); ++j) {</div><div class='del'>-				m = strlen(well_known_symbol[j]);</div><div class='del'>-				if (m + 8 &gt; l ||</div><div class='del'>-				    strncmp(name, well_known_symbol[j], m))</div><div class='del'>-					continue;</div><div class='del'>-				pl = l - m - 8;</div><div class='del'>-				if (pl &gt; sizeof(derived_prefix)-1)</div><div class='del'>-					continue;	/* Prefix is wrong length */</div><div class='del'>-				/* Must end with 8 hex digits */</div><div class='del'>-				(void) strtoul(name+l-8, &amp;p, 16);</div><div class='del'>-				if (*p == 0) {</div><div class='del'>-					strncpy(derived_prefix, name+m, pl);</div><div class='del'>-					*(derived_prefix+pl) = '\0';</div><div class='del'>-					ncv_prefix = derived_prefix;</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (!ncv_prefix) {</div><div class='del'>-		p = strchr(uts_info.version, ' ');</div><div class='del'>-		if (p &amp;&amp; *(++p) &amp;&amp; !strncmp(p, "SMP ", 4))</div><div class='del'>-			ncv_prefix = "smp_";</div><div class='del'>-		else</div><div class='del'>-			ncv_prefix = "";</div><div class='del'>-	}</div><div class='del'>-	ncv_plen = strlen(ncv_prefix);</div><div class='del'>-	if (flag_verbose)</div><div class='del'>-		lprintf("Symbol version prefix '%s'", ncv_prefix);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int ncv_strcmp(const char *a, const char *b)</div><div class='del'>-{</div><div class='del'>-	size_t alen = strlen(a), blen = strlen(b);</div><div class='del'>-</div><div class='del'>-	if (blen == alen + 10 + ncv_plen &amp;&amp;</div><div class='del'>-	    b[alen] == '_' &amp;&amp;</div><div class='del'>-	    b[alen + 1] == 'R' &amp;&amp;</div><div class='del'>-	    !(ncv_plen &amp;&amp; strncmp(b + alen + 2, ncv_prefix, ncv_plen))) {</div><div class='del'>-		return strncmp(a, b, alen);</div><div class='del'>-	} else if (alen == blen + 10 + ncv_plen &amp;&amp;</div><div class='del'>-		   a[blen] == '_' &amp;&amp; a[blen + 1] == 'R' &amp;&amp;</div><div class='del'>-		   !(ncv_plen &amp;&amp; strncmp(a + blen + 2, ncv_prefix, ncv_plen))) {</div><div class='del'>-		return strncmp(a, b, blen);</div><div class='del'>-	} else</div><div class='del'>-		return strcmp(a, b);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * String hashing for non-co-versioned kernel and module.</div><div class='del'>- * Here we are simply forced to drop the crc from the hash.</div><div class='del'>- */</div><div class='del'>-static unsigned long ncv_symbol_hash(const char *str)</div><div class='del'>-{</div><div class='del'>-	size_t len = strlen(str);</div><div class='del'>-</div><div class='del'>-	if (len &gt; 10 + ncv_plen &amp;&amp;</div><div class='del'>-	    str[len - 10 - ncv_plen] == '_' &amp;&amp;</div><div class='del'>-	    str[len - 9 - ncv_plen] == 'R' &amp;&amp;</div><div class='del'>-	    !(</div><div class='del'>-	      ncv_plen &amp;&amp;</div><div class='del'>-	      strncmp(str + len - (8 + ncv_plen), ncv_prefix, ncv_plen)</div><div class='del'>-	     ))</div><div class='del'>-		len -= 10 + ncv_plen;</div><div class='del'>-	return obj_elf_hash_n(str, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Conditionally add the symbols from the given symbol set</div><div class='del'>- * to the new module.</div><div class='del'>- */</div><div class='del'>-static int add_symbols_from(struct obj_file *f, int idx,</div><div class='del'>-			    struct module_symbol *syms, size_t nsyms)</div><div class='del'>-{</div><div class='del'>-	struct module_symbol *s;</div><div class='del'>-	size_t i;</div><div class='del'>-	int used = 0;</div><div class='del'>-</div><div class='del'>-	for (i = 0, s = syms; i &lt; nsyms; ++i, ++s) {</div><div class='del'>-		/*</div><div class='del'>-		 * Only add symbols that are already marked external.</div><div class='del'>-		 * If we override locals we may cause problems for</div><div class='del'>-		 * argument initialization.</div><div class='del'>-		 * We will also create a false dependency on the module.</div><div class='del'>-		 */</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-</div><div class='del'>-		sym = obj_find_symbol(f, (char *) s-&gt;name);</div><div class='del'>-		if (sym &amp;&amp; !ELFW(ST_BIND) (sym-&gt;info) == STB_LOCAL) {</div><div class='del'>-			sym = obj_add_symbol(f, (char *) s-&gt;name, -1,</div><div class='del'>-				  ELFW(ST_INFO) (STB_GLOBAL, STT_NOTYPE),</div><div class='del'>-					     idx, s-&gt;value, 0);</div><div class='del'>-			/*</div><div class='del'>-			 * Did our symbol just get installed?</div><div class='del'>-			 * If so, mark the module as "used".</div><div class='del'>-			 */</div><div class='del'>-			if (sym-&gt;secidx == idx)</div><div class='del'>-				used = 1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return used;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void add_kernel_symbols(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct module_stat *m;</div><div class='del'>-	size_t i, nused = 0;</div><div class='del'>-</div><div class='del'>-	/* Add module symbols first.  */</div><div class='del'>-	for (i = 0, m = module_stat; i &lt; n_module_stat; ++i, ++m)</div><div class='del'>-		if (m-&gt;nsyms &amp;&amp;</div><div class='del'>-		    add_symbols_from(f, SHN_HIRESERVE + 2 + i, m-&gt;syms, m-&gt;nsyms))</div><div class='del'>-			m-&gt;status = 1 /* used */, ++nused;</div><div class='del'>-	n_ext_modules_used = nused;</div><div class='del'>-</div><div class='del'>-	/* And finally the symbols from the kernel proper.  */</div><div class='del'>-	if (nksyms)</div><div class='del'>-		add_symbols_from(f, SHN_HIRESERVE + 1, ksyms, nksyms);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void hide_special_symbols(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	const char *const *p;</div><div class='del'>-	static const char *const specials[] =</div><div class='del'>-	{</div><div class='del'>-		"cleanup_module",</div><div class='del'>-		"init_module",</div><div class='del'>-		"kernel_version",</div><div class='del'>-		NULL</div><div class='del'>-	};</div><div class='del'>-</div><div class='del'>-	for (p = specials; *p; ++p)</div><div class='del'>-		if ((sym = obj_find_symbol(f, *p)) != NULL)</div><div class='del'>-			sym-&gt;info = ELFW(ST_INFO) (STB_LOCAL, ELFW(ST_TYPE) (sym-&gt;info));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void print_load_map(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	struct obj_symbol **all, **p;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	int load_map_cmp(const void *a, const void *b) {</div><div class='del'>-		struct obj_symbol **as = (struct obj_symbol **) a;</div><div class='del'>-		struct obj_symbol **bs = (struct obj_symbol **) b;</div><div class='del'>-		unsigned long aa = obj_symbol_final_value(f, *as);</div><div class='del'>-		unsigned long ba = obj_symbol_final_value(f, *bs);</div><div class='del'>-		 return aa &lt; ba ? -1 : aa &gt; ba ? 1 : 0;</div><div class='del'>-	}</div><div class='del'>-	int i, nsyms, *loaded;</div><div class='del'>-</div><div class='del'>-	/* Report on the section layout.  */</div><div class='del'>-</div><div class='del'>-	lprintf("Sections:       Size      %-*s  Align",</div><div class='del'>-		(int) (2 * sizeof(void *)), "Address");</div><div class='del'>-</div><div class='del'>-	for (sec = f-&gt;load_order; sec; sec = sec-&gt;load_next) {</div><div class='del'>-		int a;</div><div class='del'>-		unsigned long tmp;</div><div class='del'>-</div><div class='del'>-		for (a = -1, tmp = sec-&gt;header.sh_addralign; tmp; ++a)</div><div class='del'>-			tmp &gt;&gt;= 1;</div><div class='del'>-		if (a == -1)</div><div class='del'>-			a = 0;</div><div class='del'>-</div><div class='del'>-		lprintf("%-16s%08lx  %0*lx  2**%d",</div><div class='del'>-			sec-&gt;name,</div><div class='del'>-			(long)sec-&gt;header.sh_size,</div><div class='del'>-			(int) (2 * sizeof(void *)),</div><div class='del'>-			(long)sec-&gt;header.sh_addr,</div><div class='del'>-			a);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Quick reference which section indicies are loaded.  */</div><div class='del'>-</div><div class='del'>-	loaded = alloca(sizeof(int) * (i = f-&gt;header.e_shnum));</div><div class='del'>-	while (--i &gt;= 0)</div><div class='del'>-		loaded[i] = (f-&gt;sections[i]-&gt;header.sh_flags &amp; SHF_ALLOC) != 0;</div><div class='del'>-</div><div class='del'>-	/* Collect the symbols we'll be listing.  */</div><div class='del'>-</div><div class='del'>-	for (nsyms = i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-		for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-			if (sym-&gt;secidx &lt;= SHN_HIRESERVE</div><div class='del'>-			    &amp;&amp; (sym-&gt;secidx &gt;= SHN_LORESERVE || loaded[sym-&gt;secidx]))</div><div class='del'>-				++nsyms;</div><div class='del'>-</div><div class='del'>-	all = alloca(nsyms * sizeof(struct obj_symbol *));</div><div class='del'>-</div><div class='del'>-	for (i = 0, p = all; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-		for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-			if (sym-&gt;secidx &lt;= SHN_HIRESERVE</div><div class='del'>-			    &amp;&amp; (sym-&gt;secidx &gt;= SHN_LORESERVE || loaded[sym-&gt;secidx]))</div><div class='del'>-				*p++ = sym;</div><div class='del'>-</div><div class='del'>-	/* Sort them by final value.  */</div><div class='del'>-	qsort(all, nsyms, sizeof(struct obj_file *), load_map_cmp);</div><div class='del'>-</div><div class='del'>-	/* And list them.  */</div><div class='del'>-	lprintf("\nSymbols:");</div><div class='del'>-	for (p = all; p &lt; all + nsyms; ++p) {</div><div class='del'>-		char type = '?';</div><div class='del'>-		unsigned long value;</div><div class='del'>-</div><div class='del'>-		sym = *p;</div><div class='del'>-		if (sym-&gt;secidx == SHN_ABS) {</div><div class='del'>-			type = 'A';</div><div class='del'>-			value = sym-&gt;value;</div><div class='del'>-		} else if (sym-&gt;secidx == SHN_UNDEF) {</div><div class='del'>-			type = 'U';</div><div class='del'>-			value = 0;</div><div class='del'>-		} else {</div><div class='del'>-			struct obj_section *sec = f-&gt;sections[sym-&gt;secidx];</div><div class='del'>-</div><div class='del'>-			if (sec-&gt;header.sh_type == SHT_NOBITS)</div><div class='del'>-				type = 'B';</div><div class='del'>-			else if (sec-&gt;header.sh_flags &amp; SHF_ALLOC) {</div><div class='del'>-				if (sec-&gt;header.sh_flags &amp; SHF_EXECINSTR)</div><div class='del'>-					type = 'T';</div><div class='del'>-				else if (sec-&gt;header.sh_flags &amp; SHF_WRITE)</div><div class='del'>-					type = 'D';</div><div class='del'>-				else</div><div class='del'>-					type = 'R';</div><div class='del'>-			}</div><div class='del'>-			value = sym-&gt;value + sec-&gt;header.sh_addr;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (ELFW(ST_BIND) (sym-&gt;info) == STB_LOCAL)</div><div class='del'>-			type = tolower(type);</div><div class='del'>-</div><div class='del'>-		lprintf("%0*lx %c %s", (int) (2 * sizeof(void *)), value,</div><div class='del'>-			type, sym-&gt;name);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/************************************************************************/</div><div class='del'>-/* begin compat */</div><div class='del'>-</div><div class='del'>-static char * get_modinfo_value(struct obj_file *f, const char *key)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	char *p, *v, *n, *ep;</div><div class='del'>-	size_t klen = strlen(key);</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".modinfo");</div><div class='del'>-	if (sec == NULL)</div><div class='del'>-		return NULL;</div><div class='del'>-</div><div class='del'>-	p = sec-&gt;contents;</div><div class='del'>-	ep = p + sec-&gt;header.sh_size;</div><div class='del'>-	while (p &lt; ep) {</div><div class='del'>-		v = strchr(p, '=');</div><div class='del'>-		n = strchr(p, '\0');</div><div class='del'>-		if (v) {</div><div class='del'>-			if (v - p == klen &amp;&amp; strncmp(p, key, klen) == 0)</div><div class='del'>-				return v + 1;</div><div class='del'>-		} else {</div><div class='del'>-			if (n - p == klen &amp;&amp; strcmp(p, key) == 0)</div><div class='del'>-				return n;</div><div class='del'>-		}</div><div class='del'>-		p = n + 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int create_this_module(struct obj_file *f, const char *m_name)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,</div><div class='del'>-					       sizeof(struct module));</div><div class='del'>-	memset(sec-&gt;contents, 0, sizeof(struct module));</div><div class='del'>-</div><div class='del'>-	obj_add_symbol(f, "__this_module", -1, ELFW(ST_INFO) (STB_LOCAL, STT_OBJECT),</div><div class='del'>-		       sec-&gt;idx, 0, sizeof(struct module));</div><div class='del'>-</div><div class='del'>-	obj_string_patch(f, sec-&gt;idx, offsetof(struct module, name), m_name);</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-static int old_create_mod_use_count(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	struct obj_symbol  *got;</div><div class='del'>-</div><div class='del'>-	sec = obj_create_alloced_section_first(f, ".moduse",</div><div class='del'>-					       sizeof(long), sizeof(long));</div><div class='del'>-</div><div class='del'>-	obj_add_symbol(f, "mod_use_count_",</div><div class='del'>-		       -1, ELFW(ST_INFO)(STB_LOCAL, STT_OBJECT),</div><div class='del'>-		       sec-&gt;idx, 0, sizeof(long));</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * patb: if there is a _GLOBAL_OFFSET_TABLE_,</div><div class='del'>-	 * add .got section for PIC type modules;</div><div class='del'>-	 * we have to do this here, because obj_* calls are not made until</div><div class='del'>-	 * after obj_check_undefined</div><div class='del'>-	 * is there a better place for this exception?</div><div class='del'>-	 */</div><div class='del'>-	got = obj_find_symbol(f, "_GLOBAL_OFFSET_TABLE_");</div><div class='del'>-	if (got)</div><div class='del'>-{</div><div class='del'>-		sec = obj_create_alloced_section(f, ".got",</div><div class='del'>-						 sizeof(long), sizeof(long));</div><div class='del'>-		got-&gt;secidx = sec-&gt;idx; /* mark the symbol as defined */</div><div class='del'>-	}</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* add an entry to the __ksymtab section, creating it if necessary */</div><div class='del'>-static void add_ksymtab(struct obj_file *f, struct obj_symbol *sym)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	ElfW(Addr) ofs;</div><div class='del'>-</div><div class='del'>-	/* ensure __ksymtab is allocated, EXPORT_NOSYMBOLS creates a non-alloc section.</div><div class='del'>-	 * If __ksymtab is defined but not marked alloc, x out the first character</div><div class='del'>-	 * (no obj_delete routine) and create a new __ksymtab with the correct</div><div class='del'>-	 * characteristics.</div><div class='del'>-	 */</div><div class='del'>-	sec = obj_find_section(f, "__ksymtab");</div><div class='del'>-	if (sec &amp;&amp; !(sec-&gt;header.sh_flags &amp; SHF_ALLOC)) {</div><div class='del'>-		*((char *)(sec-&gt;name)) = 'x';	/* override const */</div><div class='del'>-		sec = NULL;</div><div class='del'>-	}</div><div class='del'>-	if (!sec)</div><div class='del'>-		sec = obj_create_alloced_section(f, "__ksymtab", tgt_sizeof_void_p, 0);</div><div class='del'>-	if (!sec)</div><div class='del'>-		return;</div><div class='del'>-	sec-&gt;header.sh_flags |= SHF_ALLOC;</div><div class='del'>-</div><div class='del'>-	ofs = sec-&gt;header.sh_size;</div><div class='del'>-	obj_symbol_patch(f, sec-&gt;idx, ofs, sym);</div><div class='del'>-	obj_string_patch(f, sec-&gt;idx, ofs + tgt_sizeof_void_p, sym-&gt;name);</div><div class='del'>-	obj_extend_section(sec, 2 * tgt_sizeof_char_p);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int create_module_ksymtab(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	/* We must always add the module references.  */</div><div class='del'>-</div><div class='del'>-	if (n_ext_modules_used) {</div><div class='del'>-		struct module_ref *dep;</div><div class='del'>-		struct obj_symbol *tm;</div><div class='del'>-</div><div class='del'>-		sec = obj_create_alloced_section(f, ".kmodtab", tgt_sizeof_void_p,</div><div class='del'>-					   (sizeof(struct module_ref)</div><div class='del'>-					    * n_ext_modules_used));</div><div class='del'>-		if (!sec)</div><div class='del'>-			return 0;</div><div class='del'>-</div><div class='del'>-		tm = obj_find_symbol(f, "__this_module");</div><div class='del'>-		dep = (struct module_ref *) sec-&gt;contents;</div><div class='del'>-		for (i = 0; i &lt; n_module_stat; ++i)</div><div class='del'>-			if (module_stat[i].status /* used */) {</div><div class='del'>-				dep-&gt;dep = module_stat[i].addr;</div><div class='del'>-				obj_symbol_patch(f, sec-&gt;idx, (char *) &amp;dep-&gt;ref - sec-&gt;contents, tm);</div><div class='del'>-				dep-&gt;next_ref = 0;</div><div class='del'>-				++dep;</div><div class='del'>-			}</div><div class='del'>-	}</div><div class='del'>-	if (flag_export &amp;&amp; !obj_find_section(f, "__ksymtab")) {</div><div class='del'>-		int *loaded;</div><div class='del'>-</div><div class='del'>-		/* We don't want to export symbols residing in sections that</div><div class='del'>-		   aren't loaded.  There are a number of these created so that</div><div class='del'>-		   we make sure certain module options don't appear twice.  */</div><div class='del'>-</div><div class='del'>-		loaded = alloca(sizeof(int) * (i = f-&gt;header.e_shnum));</div><div class='del'>-		while (--i &gt;= 0)</div><div class='del'>-			loaded[i] = (f-&gt;sections[i]-&gt;header.sh_flags &amp; SHF_ALLOC) != 0;</div><div class='del'>-</div><div class='del'>-		for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-			struct obj_symbol *sym;</div><div class='del'>-			for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next) {</div><div class='del'>-				if (ELFW(ST_BIND) (sym-&gt;info) != STB_LOCAL</div><div class='del'>-				    &amp;&amp; sym-&gt;secidx &lt;= SHN_HIRESERVE</div><div class='del'>-				    &amp;&amp; (sym-&gt;secidx &gt;= SHN_LORESERVE</div><div class='del'>-					|| loaded[sym-&gt;secidx])) {</div><div class='del'>-					add_ksymtab(f, sym);</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Get the module's kernel version in the canonical integer form.  */</div><div class='del'>-static int get_module_version(struct obj_file *f, char str[STRVERSIONLEN])</div><div class='del'>-{</div><div class='del'>-	int a, b, c;</div><div class='del'>-	char *p, *q;</div><div class='del'>-</div><div class='del'>-	if ((p = get_modinfo_value(f, "kernel_version")) == NULL) {</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-</div><div class='del'>-		m_has_modinfo = 0;</div><div class='del'>-		if ((sym = obj_find_symbol(f, "kernel_version")) == NULL)</div><div class='del'>-			sym = obj_find_symbol(f, "__module_kernel_version");</div><div class='del'>-		if (sym == NULL)</div><div class='del'>-			return -1;</div><div class='del'>-		p = f-&gt;sections[sym-&gt;secidx]-&gt;contents + sym-&gt;value;</div><div class='del'>-	} else</div><div class='del'>-		m_has_modinfo = 1;</div><div class='del'>-</div><div class='del'>-	strncpy(str, p, STRVERSIONLEN);</div><div class='del'>-</div><div class='del'>-	a = strtoul(p, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	b = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-	if (*p != '.')</div><div class='del'>-		return -1;</div><div class='del'>-	c = strtoul(p + 1, &amp;q, 10);</div><div class='del'>-	if (p + 1 == q)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	return a &lt;&lt; 16 | b &lt;&lt; 8 | c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Return the kernel symbol checksum version, or zero if not used. */</div><div class='del'>-static int is_kernel_checksummed(void)</div><div class='del'>-{</div><div class='del'>-	struct module_symbol *s;</div><div class='del'>-	size_t i;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Using_Versions might not be the first symbol,</div><div class='del'>-	 * but it should be in there.</div><div class='del'>-	 */</div><div class='del'>-	for (i = 0, s = ksyms; i &lt; nksyms; ++i, ++s)</div><div class='del'>-		if (strcmp((char *) s-&gt;name, "Using_Versions") == 0)</div><div class='del'>-			return s-&gt;value;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int is_module_checksummed(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	if (m_has_modinfo) {</div><div class='del'>-		const char *p = get_modinfo_value(f, "using_checksums");</div><div class='del'>-		if (p)</div><div class='del'>-			return atoi(p);</div><div class='del'>-		else</div><div class='del'>-			return 0;</div><div class='del'>-	} else</div><div class='del'>-		return obj_find_symbol(f, "Using_Versions") != NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* add module source, timestamp, kernel version and a symbol for the</div><div class='del'>- * start of some sections.  this info is used by ksymoops to do better</div><div class='del'>- * debugging.</div><div class='del'>- */</div><div class='del'>-static void add_ksymoops_symbols(struct obj_file *f, const char *filename,</div><div class='del'>-				 const char *m_name)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	char *name, *absolute_filename;</div><div class='del'>-	char str[STRVERSIONLEN], real[PATH_MAX];</div><div class='del'>-	int i, l, lm_name, lfilename, use_ksymtab, version;</div><div class='del'>-	struct stat statbuf;</div><div class='del'>-</div><div class='del'>-	static const char *section_names[] = {</div><div class='del'>-		".text",</div><div class='del'>-		".rodata",</div><div class='del'>-		".data",</div><div class='del'>-		".bss"</div><div class='del'>-	};</div><div class='del'>-</div><div class='del'>-	if (realpath(filename, real)) {</div><div class='del'>-		absolute_filename = xstrdup(real);</div><div class='del'>-	}</div><div class='del'>-	else {</div><div class='del'>-		int save_errno = errno;</div><div class='del'>-		error("cannot get realpath for %s", filename);</div><div class='del'>-		errno = save_errno;</div><div class='del'>-		absolute_filename = xstrdup(filename);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	lm_name = strlen(m_name);</div><div class='del'>-	lfilename = strlen(absolute_filename);</div><div class='del'>-</div><div class='del'>-	/* add to ksymtab if it already exists or there is no ksymtab and other symbols</div><div class='del'>-	 * are not to be exported.  otherwise leave ksymtab alone for now, the</div><div class='del'>-	 * "export all symbols" compatibility code will export these symbols later.</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	use_ksymtab =  obj_find_section(f, "__ksymtab") || !flag_export;</div><div class='del'>-</div><div class='del'>-	if ((sec = obj_find_section(f, ".this"))) {</div><div class='del'>-		/* tag the module header with the object name, last modified</div><div class='del'>-		 * timestamp and module version.  worst case for module version</div><div class='del'>-		 * is 0xffffff, decimal 16777215.  putting all three fields in</div><div class='del'>-		 * one symbol is less readable but saves kernel space.</div><div class='del'>-		 */</div><div class='del'>-		l = sizeof(symprefix)+			/* "__insmod_" */</div><div class='del'>-		    lm_name+				/* module name */</div><div class='del'>-		    2+					/* "_O" */</div><div class='del'>-		    lfilename+				/* object filename */</div><div class='del'>-		    2+					/* "_M" */</div><div class='del'>-		    2*sizeof(statbuf.st_mtime)+		/* mtime in hex */</div><div class='del'>-		    2+					/* "_V" */</div><div class='del'>-		    8+					/* version in dec */</div><div class='del'>-		    1;					/* nul */</div><div class='del'>-		name = xmalloc(l);</div><div class='del'>-		if (stat(absolute_filename, &amp;statbuf) != 0)</div><div class='del'>-			statbuf.st_mtime = 0;</div><div class='del'>-		version = get_module_version(f, str);	/* -1 if not found */</div><div class='del'>-		snprintf(name, l, "%s%s_O%s_M%0*lX_V%d",</div><div class='del'>-			 symprefix, m_name, absolute_filename,</div><div class='del'>-			 2*sizeof(statbuf.st_mtime), statbuf.st_mtime,</div><div class='del'>-			 version);</div><div class='del'>-		sym = obj_add_symbol(f, name, -1,</div><div class='del'>-				     ELFW(ST_INFO) (STB_GLOBAL, STT_NOTYPE),</div><div class='del'>-				     sec-&gt;idx, sec-&gt;header.sh_addr, 0);</div><div class='del'>-		if (use_ksymtab)</div><div class='del'>-			add_ksymtab(f, sym);</div><div class='del'>-	}</div><div class='del'>-	free(absolute_filename);</div><div class='del'>-</div><div class='del'>-	/* record where the persistent data is going, same address as previous symbol */</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist) {</div><div class='del'>-		l = sizeof(symprefix)+		/* "__insmod_" */</div><div class='del'>-			lm_name+		/* module name */</div><div class='del'>-			2+			/* "_P" */</div><div class='del'>-			strlen(f-&gt;persist)+	/* data store */</div><div class='del'>-			1;			/* nul */</div><div class='del'>-		name = xmalloc(l);</div><div class='del'>-		snprintf(name, l, "%s%s_P%s",</div><div class='del'>-			 symprefix, m_name, f-&gt;persist);</div><div class='del'>-		sym = obj_add_symbol(f, name, -1, ELFW(ST_INFO) (STB_GLOBAL, STT_NOTYPE),</div><div class='del'>-				     sec-&gt;idx, sec-&gt;header.sh_addr, 0);</div><div class='del'>-		if (use_ksymtab)</div><div class='del'>-			add_ksymtab(f, sym);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* tag the desired sections if size is non-zero */</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; sizeof(section_names)/sizeof(section_names[0]); ++i) {</div><div class='del'>-		if ((sec = obj_find_section(f, section_names[i])) &amp;&amp;</div><div class='del'>-		    sec-&gt;header.sh_size) {</div><div class='del'>-			l = sizeof(symprefix)+		/* "__insmod_" */</div><div class='del'>-				lm_name+		/* module name */</div><div class='del'>-				2+			/* "_S" */</div><div class='del'>-				strlen(sec-&gt;name)+	/* section name */</div><div class='del'>-				2+			/* "_L" */</div><div class='del'>-				8+			/* length in dec */</div><div class='del'>-				1;			/* nul */</div><div class='del'>-			name = xmalloc(l);</div><div class='del'>-			snprintf(name, l, "%s%s_S%s_L%ld",</div><div class='del'>-				 symprefix, m_name, sec-&gt;name,</div><div class='del'>-				 (long)sec-&gt;header.sh_size);</div><div class='del'>-			sym = obj_add_symbol(f, name, -1, ELFW(ST_INFO) (STB_GLOBAL, STT_NOTYPE),</div><div class='del'>-					     sec-&gt;idx, sec-&gt;header.sh_addr, 0);</div><div class='del'>-			if (use_ksymtab)</div><div class='del'>-				add_ksymtab(f, sym);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int process_module_arguments(struct obj_file *f, int argc, char **argv, int required)</div><div class='del'>-{</div><div class='del'>-	for (; argc &gt; 0; ++argv, --argc) {</div><div class='del'>-		struct obj_symbol *sym;</div><div class='del'>-		int c;</div><div class='del'>-		int min, max;</div><div class='del'>-		int n;</div><div class='del'>-		char *contents;</div><div class='del'>-		char *input;</div><div class='del'>-		char *fmt;</div><div class='del'>-		char *key;</div><div class='del'>-		char *loc;</div><div class='del'>-</div><div class='del'>-		if ((input = strchr(*argv, '=')) == NULL)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		n = input - *argv;</div><div class='del'>-		input += 1; /* skip '=' */</div><div class='del'>-</div><div class='del'>-		key = alloca(n + 6);</div><div class='del'>-</div><div class='del'>-		if (m_has_modinfo) {</div><div class='del'>-			memcpy(key, "parm_", 5);</div><div class='del'>-			memcpy(key + 5, *argv, n);</div><div class='del'>-			key[n + 5] = '\0';</div><div class='del'>-			if ((fmt = get_modinfo_value(f, key)) == NULL) {</div><div class='del'>-				if (required) {</div><div class='del'>-					error("invalid parameter %s", key);</div><div class='del'>-					return 0;</div><div class='del'>-				}</div><div class='del'>-				else {</div><div class='del'>-					if (flag_verbose)</div><div class='del'>-						lprintf("ignoring %s", *argv);</div><div class='del'>-					continue;	/* silently ignore optional parameters */</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			key += 5;</div><div class='del'>-</div><div class='del'>-			if (isdigit(*fmt)) {</div><div class='del'>-				min = strtoul(fmt, &amp;fmt, 10);</div><div class='del'>-				if (*fmt == '-')</div><div class='del'>-					max = strtoul(fmt + 1, &amp;fmt, 10);</div><div class='del'>-				else</div><div class='del'>-					max = min;</div><div class='del'>-			} else</div><div class='del'>-				min = max = 1;</div><div class='del'>-		} else { /* not m_has_modinfo */</div><div class='del'>-			memcpy(key, *argv, n);</div><div class='del'>-			key[n] = '\0';</div><div class='del'>-</div><div class='del'>-			if (isdigit(*input))</div><div class='del'>-				fmt = "i";</div><div class='del'>-			else</div><div class='del'>-				fmt = "s";</div><div class='del'>-			min = max = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		sym = obj_find_symbol(f, key);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Also check that the parameter was not</div><div class='del'>-		 * resolved from the kernel.</div><div class='del'>-		 */</div><div class='del'>-		if (sym == NULL || sym-&gt;secidx &gt; SHN_HIRESERVE) {</div><div class='del'>-			error("symbol for parameter %s not found", key);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		contents = f-&gt;sections[sym-&gt;secidx]-&gt;contents;</div><div class='del'>-		loc = contents + sym-&gt;value;</div><div class='del'>-		n = 1;</div><div class='del'>-</div><div class='del'>-		while (*input) {</div><div class='del'>-			char *str;</div><div class='del'>-</div><div class='del'>-			switch (*fmt) {</div><div class='del'>-			case 's':</div><div class='del'>-			case 'c':</div><div class='del'>-				/*</div><div class='del'>-				 * Do C quoting if we begin with a ",</div><div class='del'>-				 * else slurp the lot.</div><div class='del'>-				 */</div><div class='del'>-				if (*input == '"') {</div><div class='del'>-					char *r;</div><div class='del'>-</div><div class='del'>-					str = alloca(strlen(input));</div><div class='del'>-					for (r = str, input++; *input != '"'; ++input, ++r) {</div><div class='del'>-						if (*input == '\0') {</div><div class='del'>-							error("improperly terminated string argument for %s", key);</div><div class='del'>-							return 0;</div><div class='del'>-						}</div><div class='del'>-						/* else */</div><div class='del'>-						if (*input != '\\') {</div><div class='del'>-							*r = *input;</div><div class='del'>-							continue;</div><div class='del'>-						}</div><div class='del'>-						/* else  handle \ */</div><div class='del'>-						switch (*++input) {</div><div class='del'>-						case 'a': *r = '\a'; break;</div><div class='del'>-						case 'b': *r = '\b'; break;</div><div class='del'>-						case 'e': *r = '\033'; break;</div><div class='del'>-						case 'f': *r = '\f'; break;</div><div class='del'>-						case 'n': *r = '\n'; break;</div><div class='del'>-						case 'r': *r = '\r'; break;</div><div class='del'>-						case 't': *r = '\t'; break;</div><div class='del'>-</div><div class='del'>-						case '0':</div><div class='del'>-						case '1':</div><div class='del'>-						case '2':</div><div class='del'>-						case '3':</div><div class='del'>-						case '4':</div><div class='del'>-						case '5':</div><div class='del'>-						case '6':</div><div class='del'>-						case '7':</div><div class='del'>-							c = *input - '0';</div><div class='del'>-							if ('0' &lt;= input[1] &amp;&amp; input[1] &lt;= '7') {</div><div class='del'>-								c = (c * 8) + *++input - '0';</div><div class='del'>-								if ('0' &lt;= input[1] &amp;&amp; input[1] &lt;= '7')</div><div class='del'>-									c = (c * 8) + *++input - '0';</div><div class='del'>-							}</div><div class='del'>-							*r = c;</div><div class='del'>-							break;</div><div class='del'>-</div><div class='del'>-						default: *r = *input; break;</div><div class='del'>-						}</div><div class='del'>-					}</div><div class='del'>-					*r = '\0';</div><div class='del'>-					++input;</div><div class='del'>-				} else {</div><div class='del'>-					/*</div><div class='del'>-					 * The string is not quoted.</div><div class='del'>-					 * We will break it using the comma</div><div class='del'>-					 * (like for ints).</div><div class='del'>-					 * If the user wants to include commas</div><div class='del'>-					 * in a string, he just has to quote it</div><div class='del'>-					 */</div><div class='del'>-					char *r;</div><div class='del'>-</div><div class='del'>-					/* Search the next comma */</div><div class='del'>-					if ((r = strchr(input, ',')) != NULL) {</div><div class='del'>-						/*</div><div class='del'>-						 * Found a comma</div><div class='del'>-						 * Recopy the current field</div><div class='del'>-						 */</div><div class='del'>-						str = alloca(r - input + 1);</div><div class='del'>-						memcpy(str, input, r - input);</div><div class='del'>-						str[r - input] = '\0';</div><div class='del'>-						/* Keep next fields */</div><div class='del'>-						input = r;</div><div class='del'>-					} else {</div><div class='del'>-						/* last string */</div><div class='del'>-						str = input;</div><div class='del'>-						input = "";</div><div class='del'>-					}</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-				if (*fmt == 's') {</div><div class='del'>-					/* Normal string */</div><div class='del'>-					obj_string_patch(f, sym-&gt;secidx, loc - contents, str);</div><div class='del'>-					loc += tgt_sizeof_char_p;</div><div class='del'>-				} else {</div><div class='del'>-					/* Array of chars (in fact, matrix !) */</div><div class='del'>-					long charssize;	/* size of each member */</div><div class='del'>-</div><div class='del'>-					/* Get the size of each member */</div><div class='del'>-					/* Probably we should do that outside the loop ? */</div><div class='del'>-					if (!isdigit(*(fmt + 1))) {</div><div class='del'>-						error("parameter type 'c' for %s must be followed by"</div><div class='del'>-						" the maximum size", key);</div><div class='del'>-						return 0;</div><div class='del'>-					}</div><div class='del'>-					charssize = strtoul(fmt + 1, (char **) NULL, 10);</div><div class='del'>-</div><div class='del'>-					/* Check length */</div><div class='del'>-					if (strlen(str) &gt;= charssize-1) {</div><div class='del'>-						error("string too long for %s (max %ld)",</div><div class='del'>-						      key, charssize - 1);</div><div class='del'>-						return 0;</div><div class='del'>-					}</div><div class='del'>-					/* Copy to location */</div><div class='del'>-					strcpy((char *) loc, str);	/* safe, see check above */</div><div class='del'>-					loc += charssize;</div><div class='del'>-				}</div><div class='del'>-				/*</div><div class='del'>-				 * End of 's' and 'c'</div><div class='del'>-				 */</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case 'b':</div><div class='del'>-				*loc++ = strtoul(input, &amp;input, 0);</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case 'h':</div><div class='del'>-				*(short *) loc = strtoul(input, &amp;input, 0);</div><div class='del'>-				loc += tgt_sizeof_short;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case 'i':</div><div class='del'>-				*(int *) loc = strtoul(input, &amp;input, 0);</div><div class='del'>-				loc += tgt_sizeof_int;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case 'l':</div><div class='del'>-				*(long *) loc = strtoul(input, &amp;input, 0);</div><div class='del'>-				loc += tgt_sizeof_long;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			default:</div><div class='del'>-				error("unknown parameter type '%c' for %s",</div><div class='del'>-				      *fmt, key);</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-			/*</div><div class='del'>-			 * end of switch (*fmt)</div><div class='del'>-			 */</div><div class='del'>-</div><div class='del'>-			while (*input &amp;&amp; isspace(*input))</div><div class='del'>-				++input;</div><div class='del'>-			if (*input == '\0')</div><div class='del'>-				break; /* while (*input) */</div><div class='del'>-			/* else */</div><div class='del'>-</div><div class='del'>-			if (*input == ',') {</div><div class='del'>-				if (max &amp;&amp; (++n &gt; max)) {</div><div class='del'>-					error("too many values for %s (max %d)", key, max);</div><div class='del'>-					return 0;</div><div class='del'>-				}</div><div class='del'>-				++input;</div><div class='del'>-				/* continue with while (*input) */</div><div class='del'>-			} else {</div><div class='del'>-				error("invalid argument syntax for %s: '%c'",</div><div class='del'>-				      key, *input);</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-		} /* end of while (*input) */</div><div class='del'>-</div><div class='del'>-		if (min &amp;&amp; (n &lt; min)) {</div><div class='del'>-			error("too few values for %s (min %d)", key, min);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-	} /* end of for (;argc &gt; 0;) */</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Add a kallsyms section if the kernel supports all symbols. */</div><div class='del'>-static int add_kallsyms(struct obj_file *f,</div><div class='del'>-			struct obj_section **module_kallsyms, int force_kallsyms)</div><div class='del'>-{</div><div class='del'>-	struct module_symbol *s;</div><div class='del'>-	struct obj_file *f_kallsyms;</div><div class='del'>-	struct obj_section *sec_kallsyms;</div><div class='del'>-	size_t i;</div><div class='del'>-	int l;</div><div class='del'>-	const char *p, *pt_R;</div><div class='del'>-	unsigned long start = 0, stop = 0;</div><div class='del'>-</div><div class='del'>-	for (i = 0, s = ksyms; i &lt; nksyms; ++i, ++s) {</div><div class='del'>-		p = (char *)s-&gt;name;</div><div class='del'>-		pt_R = strstr(p, "_R");</div><div class='del'>-		if (pt_R)</div><div class='del'>-			l = pt_R - p;</div><div class='del'>-		else</div><div class='del'>-			l = strlen(p);</div><div class='del'>-		if (strncmp(p, "__start_" KALLSYMS_SEC_NAME, l) == 0)</div><div class='del'>-			start = s-&gt;value;</div><div class='del'>-		else if (strncmp(p, "__stop_" KALLSYMS_SEC_NAME, l) == 0)</div><div class='del'>-			stop = s-&gt;value;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (start &gt;= stop &amp;&amp; !force_kallsyms)</div><div class='del'>-		return(0);</div><div class='del'>-</div><div class='del'>-	/* The kernel contains all symbols, do the same for this module. */</div><div class='del'>-</div><div class='del'>-	/* Add an empty kallsyms section to the module if necessary */</div><div class='del'>-	for (i = 0; i &lt; f-&gt;header.e_shnum; ++i) {</div><div class='del'>-		if (strcmp(f-&gt;sections[i]-&gt;name, KALLSYMS_SEC_NAME) == 0) {</div><div class='del'>-			*module_kallsyms = f-&gt;sections[i];</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	if (!*module_kallsyms)</div><div class='del'>-		*module_kallsyms = obj_create_alloced_section(f, KALLSYMS_SEC_NAME, 0, 0);</div><div class='del'>-</div><div class='del'>-	/* Size and populate kallsyms */</div><div class='del'>-	if (obj_kallsyms(f, &amp;f_kallsyms))</div><div class='del'>-		return(1);</div><div class='del'>-	sec_kallsyms = f_kallsyms-&gt;sections[KALLSYMS_IDX];</div><div class='del'>-	(*module_kallsyms)-&gt;header.sh_addralign = sec_kallsyms-&gt;header.sh_addralign;</div><div class='del'>-	(*module_kallsyms)-&gt;header.sh_size = sec_kallsyms-&gt;header.sh_size;</div><div class='del'>-	free((*module_kallsyms)-&gt;contents);</div><div class='del'>-	(*module_kallsyms)-&gt;contents = sec_kallsyms-&gt;contents;</div><div class='del'>-	sec_kallsyms-&gt;contents = NULL;</div><div class='del'>-	obj_free(f_kallsyms);</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Add an arch data section if the arch wants it. */</div><div class='del'>-static int add_archdata(struct obj_file *f,</div><div class='del'>-			struct obj_section **sec)</div><div class='del'>-{</div><div class='del'>-	size_t i;</div><div class='del'>-</div><div class='del'>-	*sec = NULL;</div><div class='del'>-	/* Add an empty archdata section to the module if necessary */</div><div class='del'>-	for (i = 0; i &lt; f-&gt;header.e_shnum; ++i) {</div><div class='del'>-		if (strcmp(f-&gt;sections[i]-&gt;name, ARCHDATA_SEC_NAME) == 0) {</div><div class='del'>-			*sec = f-&gt;sections[i];</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	if (!*sec)</div><div class='del'>-		*sec = obj_create_alloced_section(f, ARCHDATA_SEC_NAME, 16, 0);</div><div class='del'>-</div><div class='del'>-	/* Size and populate archdata */</div><div class='del'>-	if (arch_archdata(f, *sec))</div><div class='del'>-		return(1);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int init_module(const char *m_name, struct obj_file *f,</div><div class='del'>-		       unsigned long m_size, const char *blob_name,</div><div class='del'>-		       unsigned int noload, unsigned int flag_load_map)</div><div class='del'>-{</div><div class='del'>-	struct module *module;</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	void *image;</div><div class='del'>-	int ret = 0;</div><div class='del'>-	tgt_long m_addr;</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".this");</div><div class='del'>-	module = (struct module *) sec-&gt;contents;</div><div class='del'>-	m_addr = sec-&gt;header.sh_addr;</div><div class='del'>-</div><div class='del'>-	module-&gt;size_of_struct = sizeof(*module);</div><div class='del'>-	module-&gt;size = m_size;</div><div class='del'>-	module-&gt;flags = flag_autoclean ? NEW_MOD_AUTOCLEAN : 0;</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, "__ksymtab");</div><div class='del'>-	if (sec &amp;&amp; sec-&gt;header.sh_size) {</div><div class='del'>-		module-&gt;syms = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;nsyms = sec-&gt;header.sh_size / (2 * tgt_sizeof_char_p);</div><div class='del'>-	}</div><div class='del'>-	if (n_ext_modules_used) {</div><div class='del'>-		sec = obj_find_section(f, ".kmodtab");</div><div class='del'>-		module-&gt;deps = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;ndeps = n_ext_modules_used;</div><div class='del'>-	}</div><div class='del'>-	module-&gt;init = obj_symbol_final_value(f, obj_find_symbol(f, "init_module"));</div><div class='del'>-	module-&gt;cleanup = obj_symbol_final_value(f,</div><div class='del'>-		obj_find_symbol(f, "cleanup_module"));</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, "__ex_table");</div><div class='del'>-	if (sec) {</div><div class='del'>-		module-&gt;ex_table_start = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;ex_table_end = sec-&gt;header.sh_addr + sec-&gt;header.sh_size;</div><div class='del'>-	}</div><div class='del'>-	sec = obj_find_section(f, ".text.init");</div><div class='del'>-	if (sec) {</div><div class='del'>-		module-&gt;runsize = sec-&gt;header.sh_addr - m_addr;</div><div class='del'>-	}</div><div class='del'>-	sec = obj_find_section(f, ".data.init");</div><div class='del'>-	if (sec) {</div><div class='del'>-		if (!module-&gt;runsize ||</div><div class='del'>-		    module-&gt;runsize &gt; sec-&gt;header.sh_addr - m_addr)</div><div class='del'>-			module-&gt;runsize = sec-&gt;header.sh_addr - m_addr;</div><div class='del'>-	}</div><div class='del'>-	sec = obj_find_section(f, ARCHDATA_SEC_NAME);</div><div class='del'>-	if (sec &amp;&amp; sec-&gt;header.sh_size) {</div><div class='del'>-		module-&gt;archdata_start = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;archdata_end = module-&gt;archdata_start + sec-&gt;header.sh_size;</div><div class='del'>-	}</div><div class='del'>-	sec = obj_find_section(f, KALLSYMS_SEC_NAME);</div><div class='del'>-	if (sec &amp;&amp; sec-&gt;header.sh_size) {</div><div class='del'>-		module-&gt;kallsyms_start = sec-&gt;header.sh_addr;</div><div class='del'>-		module-&gt;kallsyms_end = module-&gt;kallsyms_start + sec-&gt;header.sh_size;</div><div class='del'>-	}</div><div class='del'>-	if (!arch_init_module(f, module))</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Whew!  All of the initialization is complete.</div><div class='del'>-	 * Collect the final module image and give it to the kernel.</div><div class='del'>-	 */</div><div class='del'>-	image = xmalloc(m_size);</div><div class='del'>-	obj_create_image(f, image);</div><div class='del'>-</div><div class='del'>-	if (flag_load_map)</div><div class='del'>-		print_load_map(f);</div><div class='del'>-</div><div class='del'>-	if (blob_name) {</div><div class='del'>-		int fd, l;</div><div class='del'>-		fd = open(blob_name, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);</div><div class='del'>-		if (fd &lt; 0) {</div><div class='del'>-			error("open %s failed %m", blob_name);</div><div class='del'>-			ret = -1;</div><div class='del'>-		}</div><div class='del'>-		else {</div><div class='del'>-			if ((l = write(fd, image, m_size)) != m_size) {</div><div class='del'>-				error("write %s failed %m", blob_name);</div><div class='del'>-				ret = -1;</div><div class='del'>-			}</div><div class='del'>-			close(fd);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ret == 0 &amp;&amp; !noload) {</div><div class='del'>-		fflush(stdout);		/* Flush any debugging output */</div><div class='del'>-		ret = sys_init_module(m_name, (struct module *) image);</div><div class='del'>-		if (ret) {</div><div class='del'>-			error("init_module: %m");</div><div class='del'>-			lprintf("Hint: insmod errors can be caused by incorrect module parameters, "</div><div class='del'>-				"including invalid IO or IRQ parameters");</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	free(image);</div><div class='del'>-</div><div class='del'>-	return ret == 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-static int old_init_module(const char *m_name, struct obj_file *f,</div><div class='del'>-			   unsigned long m_size)</div><div class='del'>-{</div><div class='del'>-	char *image;</div><div class='del'>-	struct old_mod_routines routines;</div><div class='del'>-	struct old_symbol_table *symtab;</div><div class='del'>-	int ret;</div><div class='del'>-	int nsyms = 0, strsize = 0, total;</div><div class='del'>-</div><div class='del'>-	/* Create the symbol table */</div><div class='del'>-	/* Size things first... */</div><div class='del'>-	if (flag_export) {</div><div class='del'>-		int i;</div><div class='del'>-		for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-			struct obj_symbol *sym;</div><div class='del'>-</div><div class='del'>-			for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-				if (ELFW(ST_BIND) (sym-&gt;info) != STB_LOCAL &amp;&amp;</div><div class='del'>-				    sym-&gt;secidx &lt;= SHN_HIRESERVE) {</div><div class='del'>-					sym-&gt;ksymidx = nsyms++;</div><div class='del'>-					strsize += strlen(sym-&gt;name) + 1;</div><div class='del'>-				}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	total = (sizeof(struct old_symbol_table) +</div><div class='del'>-		 nsyms * sizeof(struct old_module_symbol) +</div><div class='del'>-		 n_ext_modules_used * sizeof(struct old_module_ref) +</div><div class='del'>-		 strsize);</div><div class='del'>-	symtab = xmalloc(total);</div><div class='del'>-	symtab-&gt;size = total;</div><div class='del'>-	symtab-&gt;n_symbols = nsyms;</div><div class='del'>-	symtab-&gt;n_refs = n_ext_modules_used;</div><div class='del'>-</div><div class='del'>-	if (flag_export &amp;&amp; nsyms) {</div><div class='del'>-		struct old_module_symbol *ksym;</div><div class='del'>-		char *str;</div><div class='del'>-		int i;</div><div class='del'>-</div><div class='del'>-		ksym = symtab-&gt;symbol;</div><div class='del'>-		str = ((char *) ksym +</div><div class='del'>-		       nsyms * sizeof(struct old_module_symbol) +</div><div class='del'>-		       n_ext_modules_used * sizeof(struct old_module_ref));</div><div class='del'>-</div><div class='del'>-		for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-			struct obj_symbol *sym;</div><div class='del'>-			for (sym = f-&gt;symtab[i]; sym; sym = sym-&gt;next)</div><div class='del'>-				if (sym-&gt;ksymidx &gt;= 0) {</div><div class='del'>-					ksym-&gt;addr = obj_symbol_final_value(f, sym);</div><div class='del'>-					ksym-&gt;name = (unsigned long) str - (unsigned long) symtab;</div><div class='del'>-</div><div class='del'>-					str = stpcpy(str, sym-&gt;name) + 1;</div><div class='del'>-					ksym++;</div><div class='del'>-				}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (n_ext_modules_used) {</div><div class='del'>-		struct old_module_ref *ref;</div><div class='del'>-		int i;</div><div class='del'>-</div><div class='del'>-		ref = (struct old_module_ref *)</div><div class='del'>-		    ((char *) symtab-&gt;symbol + nsyms * sizeof(struct old_module_symbol));</div><div class='del'>-</div><div class='del'>-		for (i = 0; i &lt; n_module_stat; ++i) {</div><div class='del'>-			if (module_stat[i].status /* used */) {</div><div class='del'>-				ref++-&gt;module = module_stat[i].modstruct;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Fill in routines.  */</div><div class='del'>-</div><div class='del'>-	routines.init = obj_symbol_final_value(f, obj_find_symbol(f, "init_module"));</div><div class='del'>-	routines.cleanup = obj_symbol_final_value(f,</div><div class='del'>-		obj_find_symbol(f, "cleanup_module"));</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Whew!  All of the initialization is complete.</div><div class='del'>-	 * Collect the final module image and give it to the kernel.</div><div class='del'>-	 */</div><div class='del'>-	image = xmalloc(m_size);</div><div class='del'>-	obj_create_image(f, image);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * image holds the complete relocated module,</div><div class='del'>-	 * accounting correctly for mod_use_count.</div><div class='del'>-	 * However the old module kernel support assume that it</div><div class='del'>-	 * is receiving something which does not contain mod_use_count.</div><div class='del'>-	 */</div><div class='del'>-	ret = old_sys_init_module(m_name, image + sizeof(long),</div><div class='del'>-				  (m_size - sizeof(long)) |</div><div class='del'>-				  (flag_autoclean ? OLD_MOD_AUTOCLEAN : 0),</div><div class='del'>-				  &amp;routines,</div><div class='del'>-				  symtab);</div><div class='del'>-	if (ret)</div><div class='del'>-		error("init_module: %m");</div><div class='del'>-</div><div class='del'>-	free(image);</div><div class='del'>-	free(symtab);</div><div class='del'>-</div><div class='del'>-	return ret == 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-/* end compat */</div><div class='del'>-/************************************************************************/</div><div class='del'>-</div><div class='del'>-/* Check that a module parameter has a reasonable definition */</div><div class='del'>-static int check_module_parameter(struct obj_file *f, char *key, char *value, int *persist_flag)</div><div class='del'>-{</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	int min, max;</div><div class='del'>-	char *p = value;</div><div class='del'>-</div><div class='del'>-	sym = obj_find_symbol(f, key);</div><div class='del'>-	if (sym == NULL) {</div><div class='del'>-		/* FIXME: For 2.2 kernel compatibility, only issue warnings for</div><div class='del'>-		 *        most error conditions.  Make these all errors in 2.5.</div><div class='del'>-		 */</div><div class='del'>-		lprintf("Warning: %s symbol for parameter %s not found", error_file, key);</div><div class='del'>-		return(1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (isdigit(*p)) {</div><div class='del'>-		min = strtoul(p, &amp;p, 10);</div><div class='del'>-		if (*p == '-')</div><div class='del'>-			max = strtoul(p + 1, &amp;p, 10);</div><div class='del'>-		else</div><div class='del'>-			max = min;</div><div class='del'>-	} else</div><div class='del'>-		min = max = 1;</div><div class='del'>-</div><div class='del'>-	if (max &lt; min) {</div><div class='del'>-		lprintf("Warning: %s parameter %s has max &lt; min!", error_file, key);</div><div class='del'>-		return(1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	switch (*p) {</div><div class='del'>-	case 'c':</div><div class='del'>-		if (!isdigit(p[1])) {</div><div class='del'>-			lprintf("%s parameter %s has no size after 'c'!", error_file, key);</div><div class='del'>-			return(1);</div><div class='del'>-		}</div><div class='del'>-		while (isdigit(p[1]))</div><div class='del'>-			++p;	/* swallow c array size */</div><div class='del'>-		break;</div><div class='del'>-	case 'b':	/* drop through */</div><div class='del'>-	case 'h':	/* drop through */</div><div class='del'>-	case 'i':	/* drop through */</div><div class='del'>-	case 'l':	/* drop through */</div><div class='del'>-	case 's':</div><div class='del'>-		break;</div><div class='del'>-	case '\0':</div><div class='del'>-		lprintf("%s parameter %s has no format character!", error_file, key);</div><div class='del'>-		return(1);</div><div class='del'>-	default:</div><div class='del'>-		lprintf("%s parameter %s has unknown format character '%c'", error_file, key, *p);</div><div class='del'>-		return(1);</div><div class='del'>-	}</div><div class='del'>-	switch (*++p) {</div><div class='del'>-	case 'p':</div><div class='del'>-		if (*(p-1) == 's') {</div><div class='del'>-			error("parameter %s is invalid persistent string", key);</div><div class='del'>-			return(1);</div><div class='del'>-		}</div><div class='del'>-		*persist_flag = 1;</div><div class='del'>-		break;</div><div class='del'>-	case '\0':</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		lprintf("%s parameter %s has unknown format modifier '%c'", error_file, key, *p);</div><div class='del'>-		return(1);</div><div class='del'>-	}</div><div class='del'>-	return(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Check that all module parameters have reasonable definitions */</div><div class='del'>-static void check_module_parameters(struct obj_file *f, int *persist_flag)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	char *ptr, *value, *n, *endptr;</div><div class='del'>-	int namelen, err = 0;</div><div class='del'>-</div><div class='del'>-	sec = obj_find_section(f, ".modinfo");</div><div class='del'>-	if (sec == NULL) {</div><div class='del'>-		/* module does not support typed parameters */</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	ptr = sec-&gt;contents;</div><div class='del'>-	endptr = ptr + sec-&gt;header.sh_size;</div><div class='del'>-	while (ptr &lt; endptr &amp;&amp; !err) {</div><div class='del'>-		value = strchr(ptr, '=');</div><div class='del'>-		n = strchr(ptr, '\0');</div><div class='del'>-		if (value) {</div><div class='del'>-			namelen = value - ptr;</div><div class='del'>-			if (namelen &gt;= 5 &amp;&amp; strncmp(ptr, "parm_", 5) == 0</div><div class='del'>-			    &amp;&amp; !(namelen &gt; 10 &amp;&amp; strncmp(ptr, "parm_desc_", 10) == 0)) {</div><div class='del'>-				char *pname = xmalloc(namelen + 1);</div><div class='del'>-				strncpy(pname, ptr + 5, namelen - 5);</div><div class='del'>-				pname[namelen - 5] = '\0';</div><div class='del'>-				err = check_module_parameter(f, pname, value+1, persist_flag);</div><div class='del'>-				free(pname);</div><div class='del'>-			}</div><div class='del'>-		} else {</div><div class='del'>-			if (n - ptr &gt;= 5 &amp;&amp; strncmp(ptr, "parm_", 5) == 0) {</div><div class='del'>-				error("parameter %s found with no value", ptr);</div><div class='del'>-				err = 1;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		ptr = n + 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (err)</div><div class='del'>-		*persist_flag = 0;</div><div class='del'>-	return;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* For common 3264 code, only compile the usage message once, in the 64 bit version */</div><div class='del'>-#if defined(COMMON_3264) &amp;&amp; defined(ONLY_32)</div><div class='del'>-extern void insmod_usage(void);		/* Use the copy in the 64 bit version */</div><div class='del'>-#else	/* Common 64 bit version or any non common code - compile usage routine */</div><div class='del'>-void insmod_usage(void)</div><div class='del'>-{</div><div class='del'>-	fputs("Usage:\n"</div><div class='del'>-	      "insmod [-fhkLmnpqrsSvVxXyY] [-e persist_name] [-o module_name] [-O blob_name] [-P prefix] module [ symbol=value ... ]\n"</div><div class='del'>-	      "\n"</div><div class='del'>-	      "  module                Name of a loadable kernel module ('.o' can be omitted)\n"</div><div class='del'>-	      "  -f, --force           Force loading under wrong kernel version\n"</div><div class='del'>-	      "  -h, --help            Print this message\n"</div><div class='del'>-	      "  -k, --autoclean       Make module autoclean-able\n"</div><div class='del'>-	      "  -L, --lock            Prevent simultaneous loads of the same module\n"</div><div class='del'>-	      "  -m, --map             Generate load map (so crashes can be traced)\n"</div><div class='del'>-	      "  -n, --noload          Don't load, just show\n"</div><div class='del'>-	      "  -p, --probe           Probe mode; check if the module matches the kernel\n"</div><div class='del'>-	      "  -q, --quiet           Don't print unresolved symbols\n"</div><div class='del'>-	      "  -r, --root            Allow root to load modules not owned by root\n"</div><div class='del'>-	      "  -s, --syslog          Report errors via syslog\n"</div><div class='del'>-	      "  -S, --kallsyms        Force kallsyms on module\n"</div><div class='del'>-	      "  -v, --verbose         Verbose output\n"</div><div class='del'>-	      "  -V, --version         Show version\n"</div><div class='del'>-	      "  -x, --noexport        Do not export externs\n"</div><div class='del'>-	      "  -X, --export          Do export externs (default)\n"</div><div class='del'>-	      "  -y, --noksymoops      Do not add ksymoops symbols\n"</div><div class='del'>-	      "  -Y, --ksymoops        Do add ksymoops symbols (default)\n"</div><div class='del'>-	      "  -e persist_name\n"</div><div class='del'>-	      "      --persist=persist_name Filename to hold any persistent data from the module\n"</div><div class='del'>-	      "  -o NAME, --name=NAME  Set internal module name to NAME\n"</div><div class='del'>-	      "  -O NAME, --blob=NAME  Save the object as a binary blob in NAME\n"</div><div class='del'>-	      "  -P PREFIX\n"</div><div class='del'>-	      "      --prefix=PREFIX   Prefix for kernel or module symbols\n"</div><div class='del'>-	      ,stderr);</div><div class='del'>-	exit(1);</div><div class='del'>-}</div><div class='del'>-#endif	/* defined(COMMON_3264) &amp;&amp; defined(ONLY_32) */</div><div class='del'>-</div><div class='del'>-#if defined(COMMON_3264) &amp;&amp; defined(ONLY_32)</div><div class='del'>-#define INSMOD_MAIN insmod_main_32	/* 32 bit version */</div><div class='del'>-#elif defined(COMMON_3264) &amp;&amp; defined(ONLY_64)</div><div class='del'>-#define INSMOD_MAIN insmod_main_64	/* 64 bit version */</div><div class='del'>-#else</div><div class='del'>-#define INSMOD_MAIN insmod_main		/* Not common code */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int INSMOD_MAIN(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	int k_version;</div><div class='del'>-	int k_crcs;</div><div class='del'>-	char k_strversion[STRVERSIONLEN];</div><div class='del'>-	struct option long_opts[] = {</div><div class='del'>-		{"force", 0, 0, 'f'},</div><div class='del'>-		{"help", 0, 0, 'h'},</div><div class='del'>-		{"autoclean", 0, 0, 'k'},</div><div class='del'>-		{"lock", 0, 0, 'L'},</div><div class='del'>-		{"map", 0, 0, 'm'},</div><div class='del'>-		{"noload", 0, 0, 'n'},</div><div class='del'>-		{"probe", 0, 0, 'p'},</div><div class='del'>-		{"poll", 0, 0, 'p'},	/* poll is deprecated, remove in 2.5 */</div><div class='del'>-		{"quiet", 0, 0, 'q'},</div><div class='del'>-		{"root", 0, 0, 'r'},</div><div class='del'>-		{"syslog", 0, 0, 's'},</div><div class='del'>-		{"kallsyms", 0, 0, 'S'},</div><div class='del'>-		{"verbose", 0, 0, 'v'},</div><div class='del'>-		{"version", 0, 0, 'V'},</div><div class='del'>-		{"noexport", 0, 0, 'x'},</div><div class='del'>-		{"export", 0, 0, 'X'},</div><div class='del'>-		{"noksymoops", 0, 0, 'y'},</div><div class='del'>-		{"ksymoops", 0, 0, 'Y'},</div><div class='del'>-</div><div class='del'>-		{"persist", 1, 0, 'e'},</div><div class='del'>-		{"name", 1, 0, 'o'},</div><div class='del'>-		{"blob", 1, 0, 'O'},</div><div class='del'>-		{"prefix", 1, 0, 'P'},</div><div class='del'>-		{0, 0, 0, 0}</div><div class='del'>-	};</div><div class='del'>-	char *m_name = NULL;</div><div class='del'>-	char *blob_name = NULL;		/* Save object as binary blob */</div><div class='del'>-	int m_version;</div><div class='del'>-	ElfW(Addr) m_addr;</div><div class='del'>-	unsigned long m_size;</div><div class='del'>-	int m_crcs;</div><div class='del'>-	char m_strversion[STRVERSIONLEN];</div><div class='del'>-	char *filename;</div><div class='del'>-	char *persist_name = NULL;	/* filename to hold any persistent data */</div><div class='del'>-	int fp;</div><div class='del'>-	struct obj_file *f;</div><div class='del'>-	struct obj_section *kallsyms = NULL, *archdata = NULL;</div><div class='del'>-	int o;</div><div class='del'>-	int noload = 0;</div><div class='del'>-	int dolock = 1; /*Note: was: 0; */</div><div class='del'>-	int quiet = 0;</div><div class='del'>-	int exit_status = 1;</div><div class='del'>-	int force_kallsyms = 0;</div><div class='del'>-	int persist_parms = 0;	/* does module have persistent parms? */</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	error_file = "insmod";</div><div class='del'>-</div><div class='del'>-	/* To handle repeated calls from combined modprobe */</div><div class='del'>-	errors = optind = 0;</div><div class='del'>-</div><div class='del'>-	/* Process the command line.  */</div><div class='del'>-	while ((o = getopt_long(argc, argv, "fhkLmnpqrsSvVxXyYe:o:O:P:R:",</div><div class='del'>-				&amp;long_opts[0], NULL)) != EOF)</div><div class='del'>-		switch (o) {</div><div class='del'>-		case 'f':	/* force loading */</div><div class='del'>-			flag_force_load = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'h':       /* Print the usage message. */</div><div class='del'>-			insmod_usage();</div><div class='del'>-			break;</div><div class='del'>-		case 'k':	/* module loaded by kerneld, auto-cleanable */</div><div class='del'>-			flag_autoclean = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'L':	/* protect against recursion.  */</div><div class='del'>-			dolock = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'm':	/* generate load map */</div><div class='del'>-			flag_load_map = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'n':	/* don't load, just check */</div><div class='del'>-			noload = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'p':	/* silent probe mode */</div><div class='del'>-			flag_silent_probe = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'q':	/* Don't print unresolved symbols */</div><div class='del'>-			quiet = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'r':	/* allow root to load non-root modules */</div><div class='del'>-			root_check_off = !root_check_off;</div><div class='del'>-			break;</div><div class='del'>-		case 's':	/* start syslog */</div><div class='del'>-			setsyslog("insmod");</div><div class='del'>-			break;</div><div class='del'>-		case 'S':	/* Force kallsyms */</div><div class='del'>-			force_kallsyms = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'v':	/* verbose output */</div><div class='del'>-			flag_verbose = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'V':</div><div class='del'>-			fputs("insmod version " MODUTILS_VERSION "\n", stderr);</div><div class='del'>-			break;</div><div class='del'>-		case 'x':	/* do not export externs */</div><div class='del'>-			flag_export = 0;</div><div class='del'>-			break;</div><div class='del'>-		case 'X':	/* do export externs */</div><div class='del'>-			flag_export = 1;</div><div class='del'>-			break;</div><div class='del'>-		case 'y':	/* do not define ksymoops symbols */</div><div class='del'>-			flag_ksymoops = 0;</div><div class='del'>-			break;</div><div class='del'>-		case 'Y':	/* do define ksymoops symbols */</div><div class='del'>-			flag_ksymoops = 1;</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		case 'e':	/* persistent data filename */</div><div class='del'>-			free(persist_name);</div><div class='del'>-			persist_name = xstrdup(optarg);</div><div class='del'>-			break;</div><div class='del'>-		case 'o':	/* name the output module */</div><div class='del'>-			m_name = optarg;</div><div class='del'>-			break;</div><div class='del'>-		case 'O':	/* save the output module object */</div><div class='del'>-			blob_name = optarg;</div><div class='del'>-			break;</div><div class='del'>-		case 'P':	/* use prefix on crc */</div><div class='del'>-			set_ncv_prefix(optarg);</div><div class='del'>-			break;</div><div class='del'>-</div><div class='del'>-		default:</div><div class='del'>-			insmod_usage();</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	if (optind &gt;= argc) {</div><div class='del'>-		insmod_usage();</div><div class='del'>-	}</div><div class='del'>-	filename = argv[optind++];</div><div class='del'>-</div><div class='del'>-	if (config_read(0, NULL, "", NULL) &lt; 0) {</div><div class='del'>-		error("Failed handle configuration");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (persist_name &amp;&amp; !*persist_name &amp;&amp;</div><div class='del'>-	    (!persistdir || !*persistdir)) {</div><div class='del'>-		free(persist_name);</div><div class='del'>-		persist_name = NULL;</div><div class='del'>-		if (flag_verbose)</div><div class='del'>-			lprintf("insmod: -e \"\" ignored, no persistdir");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (m_name == NULL) {</div><div class='del'>-		size_t len;</div><div class='del'>-		char *p;</div><div class='del'>-</div><div class='del'>-		if ((p = strrchr(filename, '/')) != NULL)</div><div class='del'>-			p++;</div><div class='del'>-		else</div><div class='del'>-			p = filename;</div><div class='del'>-		len = strlen(p);</div><div class='del'>-		if (len &gt; 2 &amp;&amp; p[len - 2] == '.' &amp;&amp; p[len - 1] == 'o')</div><div class='del'>-			len -= 2;</div><div class='del'>-		else if (len &gt; 4 &amp;&amp; p[len - 4] == '.' &amp;&amp; p[len - 3] == 'm'</div><div class='del'>-			 &amp;&amp; p[len - 2] == 'o' &amp;&amp; p[len - 1] == 'd')</div><div class='del'>-			len -= 4;</div><div class='del'>-#ifdef CONFIG_USE_ZLIB</div><div class='del'>-		else if (len &gt; 5 &amp;&amp; !strcmp(p + len - 5, ".o.gz"))</div><div class='del'>-			len -= 5;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-		m_name = xmalloc(len + 1);</div><div class='del'>-		memcpy(m_name, p, len);</div><div class='del'>-		m_name[len] = '\0';</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Locate the file to be loaded.  */</div><div class='del'>-	if (!strchr(filename, '/') &amp;&amp; !strchr(filename, '.')) {</div><div class='del'>-		char *tmp = search_module_path(filename);</div><div class='del'>-		if (tmp == NULL) {</div><div class='del'>-			error("%s: no module by that name found", filename);</div><div class='del'>-			return 1;</div><div class='del'>-		}</div><div class='del'>-		filename = tmp;</div><div class='del'>-		lprintf("Using %s", filename);</div><div class='del'>-	} else if (flag_verbose)</div><div class='del'>-		lprintf("Using %s", filename);</div><div class='del'>-</div><div class='del'>-	/* And open it.  */</div><div class='del'>-	if ((fp = gzf_open(filename, O_RDONLY)) == -1) {</div><div class='del'>-		error("%s: %m", filename);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	/* Try to prevent multiple simultaneous loads.  */</div><div class='del'>-	if (dolock)</div><div class='del'>-		flock(fp, LOCK_EX);</div><div class='del'>-</div><div class='del'>-	if (!get_kernel_info(K_SYMBOLS))</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Set the genksyms prefix if this is a versioned kernel</div><div class='del'>-	 * and it's not already set.</div><div class='del'>-	 */</div><div class='del'>-	set_ncv_prefix(NULL);</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; n_module_stat; ++i) {</div><div class='del'>-		if (strcmp(module_stat[i].name, m_name) == 0) {</div><div class='del'>-			error("a module named %s already exists", m_name);</div><div class='del'>-			goto out;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	error_file = filename;</div><div class='del'>-	if ((f = obj_load(fp, ET_REL, filename)) == NULL)</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-	/* Version correspondence?  */</div><div class='del'>-	k_version = get_kernel_version(k_strversion);</div><div class='del'>-	m_version = get_module_version(f, m_strversion);</div><div class='del'>-	if (m_version == -1) {</div><div class='del'>-		error("couldn't find the kernel version the module was compiled for");</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	k_crcs = is_kernel_checksummed();</div><div class='del'>-	m_crcs = is_module_checksummed(f);</div><div class='del'>-	if ((m_crcs == 0 || k_crcs == 0) &amp;&amp;</div><div class='del'>-	    strncmp(k_strversion, m_strversion, STRVERSIONLEN) != 0) {</div><div class='del'>-		if (flag_force_load) {</div><div class='del'>-			lprintf("Warning: kernel-module version mismatch\n"</div><div class='del'>-			      "\t%s was compiled for kernel version %s\n"</div><div class='del'>-				"\twhile this kernel is version %s",</div><div class='del'>-				filename, m_strversion, k_strversion);</div><div class='del'>-		} else {</div><div class='del'>-			if (!quiet)</div><div class='del'>-				error("kernel-module version mismatch\n"</div><div class='del'>-				      "\t%s was compiled for kernel version %s\n"</div><div class='del'>-				      "\twhile this kernel is version %s.",</div><div class='del'>-				      filename, m_strversion, k_strversion);</div><div class='del'>-			goto out;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (m_crcs != k_crcs)</div><div class='del'>-		obj_set_symbol_compare(f, ncv_strcmp, ncv_symbol_hash);</div><div class='del'>-</div><div class='del'>-	/* Let the module know about the kernel symbols.  */</div><div class='del'>-	add_kernel_symbols(f);</div><div class='del'>-</div><div class='del'>-	/* Allocate common symbols, symbol tables, and string tables.</div><div class='del'>-	 *</div><div class='del'>-	 * The calls marked DEPMOD indicate the bits of code that depmod</div><div class='del'>-	 * uses to do a pseudo relocation, ignoring undefined symbols.</div><div class='del'>-	 * Any changes made to the relocation sequence here should be</div><div class='del'>-	 * checked against depmod.</div><div class='del'>-	 */</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-	if (k_new_syscalls</div><div class='del'>-	    ? !create_this_module(f, m_name)</div><div class='del'>-	    : !old_create_mod_use_count(f))</div><div class='del'>-		goto out;</div><div class='del'>-#else</div><div class='del'>-	if (!create_this_module(f, m_name))</div><div class='del'>-		goto out;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	if (!obj_check_undefineds(f, quiet))	/* DEPMOD, obj_clear_undefineds */</div><div class='del'>-		goto out;</div><div class='del'>-	obj_allocate_commons(f);	/* DEPMOD */</div><div class='del'>-</div><div class='del'>-	check_module_parameters(f, &amp;persist_parms);</div><div class='del'>-</div><div class='del'>-	if (optind &lt; argc) {</div><div class='del'>-		if (!process_module_arguments(f, argc - optind, argv + optind, 1))</div><div class='del'>-			goto out;</div><div class='del'>-	}</div><div class='del'>-	arch_create_got(f);	/* DEPMOD */</div><div class='del'>-	hide_special_symbols(f);</div><div class='del'>-</div><div class='del'>-	if (persist_parms &amp;&amp; persist_name &amp;&amp; *persist_name) {</div><div class='del'>-		f-&gt;persist = persist_name;</div><div class='del'>-		persist_name = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (persist_parms &amp;&amp;</div><div class='del'>-	    persist_name &amp;&amp; !*persist_name) {</div><div class='del'>-		/* -e "".  This is ugly.  Take the filename, compare it against</div><div class='del'>-		 * each of the module paths until we find a match on the start</div><div class='del'>-		 * of the filename, assume the rest is the relative path.  Have</div><div class='del'>-		 * to do it this way because modprobe uses absolute filenames</div><div class='del'>-		 * for module names in modules.dep and the format of modules.dep</div><div class='del'>-		 * does not allow for any backwards compatible changes, so there</div><div class='del'>-		 * is nowhere to store the relative filename.  The only way this</div><div class='del'>-		 * should fail to calculate a relative path is "insmod ./xxx", for</div><div class='del'>-		 * that case the user has to specify -e filename.</div><div class='del'>-		 */</div><div class='del'>-		int j, l = strlen(filename);</div><div class='del'>-		char *relative = NULL;</div><div class='del'>-		char *p;</div><div class='del'>-		for (i = 0; i &lt; nmodpath; ++i) {</div><div class='del'>-			p = modpath[i].path;</div><div class='del'>-			j = strlen(p);</div><div class='del'>-			while (j &amp;&amp; p[j] == '/')</div><div class='del'>-				--j;</div><div class='del'>-			if (j &lt; l &amp;&amp; strncmp(filename, p, j) == 0 &amp;&amp; filename[j] == '/') {</div><div class='del'>-				while (filename[j] == '/')</div><div class='del'>-					++j;</div><div class='del'>-				relative = xstrdup(filename+j);</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (relative) {</div><div class='del'>-			i = strlen(relative);</div><div class='del'>-			if (i &gt; 3 &amp;&amp; strcmp(relative+i-3, ".gz") == 0)</div><div class='del'>-				relative[i -= 3] = '\0';</div><div class='del'>-			if (i &gt; 2 &amp;&amp; strcmp(relative+i-2, ".o") == 0)</div><div class='del'>-				relative[i -= 2] = '\0';</div><div class='del'>-			else if (i &gt; 4 &amp;&amp; strcmp(relative+i-4, ".mod") == 0)</div><div class='del'>-				relative[i -= 4] = '\0';</div><div class='del'>-			f-&gt;persist = xmalloc(strlen(persistdir) + 1 + i + 1);</div><div class='del'>-			strcpy(f-&gt;persist, persistdir);	/* safe, xmalloc */</div><div class='del'>-			strcat(f-&gt;persist, "/");	/* safe, xmalloc */</div><div class='del'>-			strcat(f-&gt;persist, relative);	/* safe, xmalloc */</div><div class='del'>-			free(relative);</div><div class='del'>-		}</div><div class='del'>-		else</div><div class='del'>-			error("Cannot calculate persistent filename");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist &amp;&amp; *(f-&gt;persist) != '/') {</div><div class='del'>-		error("Persistent filenames must be absolute, ignoring '%s'",</div><div class='del'>-			f-&gt;persist);</div><div class='del'>-		free(f-&gt;persist);</div><div class='del'>-		f-&gt;persist = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist &amp;&amp; !flag_ksymoops) {</div><div class='del'>-		error("has persistent data but ksymoops symbols are not available");</div><div class='del'>-		free(f-&gt;persist);</div><div class='del'>-		f-&gt;persist = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist &amp;&amp; !k_new_syscalls) {</div><div class='del'>-		error("has persistent data but the kernel is too old to support it");</div><div class='del'>-		free(f-&gt;persist);</div><div class='del'>-		f-&gt;persist = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (persist_parms &amp;&amp; flag_verbose) {</div><div class='del'>-		if (f-&gt;persist)</div><div class='del'>-			lprintf("Persist filename '%s'", f-&gt;persist);</div><div class='del'>-		else</div><div class='del'>-			lprintf("No persistent filename available");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist) {</div><div class='del'>-		FILE *fp = fopen(f-&gt;persist, "r");</div><div class='del'>-		if (!fp) {</div><div class='del'>-			if (flag_verbose)</div><div class='del'>-				lprintf("Cannot open persist file '%s' %m", f-&gt;persist);</div><div class='del'>-		}</div><div class='del'>-		else {</div><div class='del'>-			int pargc = 0;</div><div class='del'>-			char *pargv[1000];	/* hard coded but big enough */</div><div class='del'>-			char line[3000];	/* hard coded but big enough */</div><div class='del'>-			char *p;</div><div class='del'>-			while (fgets(line, sizeof(line), fp)) {</div><div class='del'>-				p = strchr(line, '\n');</div><div class='del'>-				if (!p) {</div><div class='del'>-					error("Persistent data line is too long\n%s", line);</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-				*p = '\0';</div><div class='del'>-				p = line;</div><div class='del'>-				while (isspace(*p))</div><div class='del'>-					++p;</div><div class='del'>-				if (!*p || *p == '#')</div><div class='del'>-					continue;</div><div class='del'>-				if (pargc == sizeof(pargv)/sizeof(pargv[0])) {</div><div class='del'>-					error("More than %d persistent parameters", pargc);</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-				pargv[pargc++] = xstrdup(p);</div><div class='del'>-			}</div><div class='del'>-			fclose(fp);</div><div class='del'>-			if (!process_module_arguments(f, pargc, pargv, 0))</div><div class='del'>-				goto out;</div><div class='del'>-			while (pargc--)</div><div class='del'>-				free(pargv[pargc]);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (flag_ksymoops)</div><div class='del'>-		add_ksymoops_symbols(f, filename, m_name);</div><div class='del'>-</div><div class='del'>-	if (k_new_syscalls)</div><div class='del'>-		create_module_ksymtab(f);</div><div class='del'>-</div><div class='del'>-	/* archdata based on relocatable addresses */</div><div class='del'>-	if (add_archdata(f, &amp;archdata))</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-	/* kallsyms based on relocatable addresses */</div><div class='del'>-	if (add_kallsyms(f, &amp;kallsyms, force_kallsyms))</div><div class='del'>-		goto out;</div><div class='del'>-	/**** No symbols or sections to be changed after kallsyms above ***/</div><div class='del'>-</div><div class='del'>-	if (errors)</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-	/* If we were just checking, we made it.  */</div><div class='del'>-	if (flag_silent_probe) {</div><div class='del'>-		exit_status = 0;</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-	/* Module has now finished growing; find its size and install it.  */</div><div class='del'>-	m_size = obj_load_size(f);	/* DEPMOD */</div><div class='del'>-</div><div class='del'>-	if (noload) {</div><div class='del'>-		/* Don't bother actually touching the kernel.  */</div><div class='del'>-		m_addr = 0x12340000;</div><div class='del'>-	} else {</div><div class='del'>-		errno = 0;</div><div class='del'>-		m_addr = create_module(m_name, m_size);</div><div class='del'>-		switch (errno) {</div><div class='del'>-		case 0:</div><div class='del'>-			break;</div><div class='del'>-		case EEXIST:</div><div class='del'>-			if (dolock) {</div><div class='del'>-				/*</div><div class='del'>-				 * Assume that we were just invoked</div><div class='del'>-				 * simultaneous with another insmod</div><div class='del'>-				 * and return success.</div><div class='del'>-				 */</div><div class='del'>-				exit_status = 0;</div><div class='del'>-				goto out;</div><div class='del'>-			}</div><div class='del'>-			error("a module named %s already exists", m_name);</div><div class='del'>-			goto out;</div><div class='del'>-		case ENOMEM:</div><div class='del'>-			error("can't allocate kernel memory for module; needed %lu bytes",</div><div class='del'>-			      m_size);</div><div class='del'>-			goto out;</div><div class='del'>-		default:</div><div class='del'>-			error("create_module: %m");</div><div class='del'>-			goto out;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* module is already built, complete with ksymoops symbols for the</div><div class='del'>-	 * persistent filename.  If the kernel does not support persistent data</div><div class='del'>-	 * then give an error but continue.  It is too difficult to clean up at</div><div class='del'>-	 * this stage and this error will only occur on backported modules.</div><div class='del'>-	 * rmmod will also get an error so warn the user now.</div><div class='del'>-	 */</div><div class='del'>-	if (f-&gt;persist &amp;&amp; !noload) {</div><div class='del'>-		struct {</div><div class='del'>-			struct module m;</div><div class='del'>-			int data;</div><div class='del'>-		} test_read;</div><div class='del'>-		memset(&amp;test_read, 0, sizeof(test_read));</div><div class='del'>-		test_read.m.size_of_struct = -sizeof(test_read.m);      /* -ve size =&gt; read, not write */</div><div class='del'>-		test_read.m.read_start = m_addr + sizeof(struct module);</div><div class='del'>-		test_read.m.read_end = test_read.m.read_start + sizeof(test_read.data);</div><div class='del'>-		if (sys_init_module(m_name, (struct module *) &amp;test_read)) {</div><div class='del'>-			int old_errors = errors;</div><div class='del'>-			error("has persistent data but the kernel is too old to support it."</div><div class='del'>-				"  Expect errors during rmmod as well");</div><div class='del'>-			errors = old_errors;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!obj_relocate(f, m_addr)) {	/* DEPMOD */</div><div class='del'>-		if (!noload)</div><div class='del'>-			delete_module(m_name);</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Do archdata again, this time we have the final addresses */</div><div class='del'>-	if (add_archdata(f, &amp;archdata))</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-	/* Do kallsyms again, this time we have the final addresses */</div><div class='del'>-	if (add_kallsyms(f, &amp;kallsyms, force_kallsyms))</div><div class='del'>-		goto out;</div><div class='del'>-</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-	if (k_new_syscalls)</div><div class='del'>-		init_module(m_name, f, m_size, blob_name, noload, flag_load_map);</div><div class='del'>-	else if (!noload)</div><div class='del'>-		old_init_module(m_name, f, m_size);</div><div class='del'>-#else</div><div class='del'>-	init_module(m_name, f, m_size, blob_name, noload, flag_load_map);</div><div class='del'>-#endif</div><div class='del'>-	if (errors) {</div><div class='del'>-		if (!noload)</div><div class='del'>-			delete_module(m_name);</div><div class='del'>-		goto out;</div><div class='del'>-	}</div><div class='del'>-	exit_status = 0;</div><div class='del'>-</div><div class='del'>-      out:</div><div class='del'>-	if (dolock)</div><div class='del'>-		flock(fp, LOCK_UN);</div><div class='del'>-	close(fp);</div><div class='del'>-	if (!noload)</div><div class='del'>-		snap_shot(NULL, 0);</div><div class='del'>-</div><div class='del'>-	return exit_status;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* For common 3264 code, add an overall insmod_main, in the 64 bit version. */</div><div class='del'>-#if defined(COMMON_3264) &amp;&amp; defined(ONLY_64)</div><div class='del'>-int insmod_main(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	if (arch64())</div><div class='del'>-		return insmod_main_64(argc, argv);</div><div class='del'>-	else</div><div class='del'>-		return insmod_main_32(argc, argv);</div><div class='del'>-}</div><div class='del'>-#endif	/* defined(COMMON_3264) &amp;&amp; defined(ONLY_64) */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int insmod_call(char * full_filename, char * params)</div><div class='del'>-{</div><div class='del'>-	int argc = 2;</div><div class='del'>-	char *argv[50];</div><div class='del'>-	char * ptr = params;</div><div class='del'>-	argv[0] = "stage1";</div><div class='del'>-	argv[1] = full_filename;</div><div class='del'>-</div><div class='del'>-	while (ptr != NULL) {</div><div class='del'>-		argv[argc] = ptr;</div><div class='del'>-		argc++;</div><div class='del'>-		ptr = strchr(ptr, ' ');</div><div class='del'>-		if (ptr) {</div><div class='del'>-			ptr[0] = '\0';</div><div class='del'>-			ptr++;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return insmod_main(argc, argv);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/Makefile b/mdk-stage1/insmod-modutils/obj/Makefile<br/>deleted file mode 100644<br/>index 34b5df2d9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,33 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    insmod from modutils (generic)</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Copyright 1996, 1997 Linux International.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ../..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: libobj.a</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INCS = -I./../include</div><div class='del'>-</div><div class='del'>-DEFS = -D_GNU_SOURCE -DELF_MACHINE_H='"elf_$(ARCH).h"' -DARCH_$(ARCH) -DCONFIG_ROOT_CHECK_OFF=0</div><div class='del'>-</div><div class='del'>-OBJS = obj_kallsyms.o obj_common.o obj_load.o obj_reloc.o obj_$(ARCH).o</div><div class='del'>-</div><div class='del'>-libobj.a: $(OBJS)</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-.c.o:</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $&lt;</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_alpha.c b/mdk-stage1/insmod-modutils/obj/obj_alpha.c<br/>deleted file mode 100644<br/>index 4006b3442..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_alpha.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_alpha.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,305 +0,0 @@</div><div class='del'>-/* Alpha specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct alpha_got_entry</div><div class='del'>-{</div><div class='del'>-  struct alpha_got_entry *next;</div><div class='del'>-  ElfW(Addr) addend;</div><div class='del'>-  int offset;</div><div class='del'>-  int reloc_done;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct alpha_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct obj_section *got;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct alpha_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol root;</div><div class='del'>-  struct alpha_got_entry *got_entries;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct alpha_file *f;</div><div class='del'>-  f = xmalloc(sizeof(*f));</div><div class='del'>-  f-&gt;got = NULL;</div><div class='del'>-  return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  struct alpha_symbol *sym;</div><div class='del'>-  sym = xmalloc(sizeof(*sym));</div><div class='del'>-  sym-&gt;got_entries = NULL;</div><div class='del'>-  return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf64_Rela *rel,</div><div class='del'>-		       Elf64_Addr v)</div><div class='del'>-{</div><div class='del'>-  struct alpha_file *af = (struct alpha_file *)f;</div><div class='del'>-  struct alpha_symbol *asym = (struct alpha_symbol *)sym;</div><div class='del'>-</div><div class='del'>-  unsigned long *lloc = (unsigned long *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  unsigned int *iloc = (unsigned int *)lloc;</div><div class='del'>-  Elf64_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  Elf64_Addr gp = af-&gt;got-&gt;header.sh_addr + 0x8000;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF64_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_ALPHA_NONE:</div><div class='del'>-    case R_ALPHA_LITUSE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_REFQUAD:</div><div class='del'>-      *lloc += v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_GPREL32:</div><div class='del'>-      v -= gp;</div><div class='del'>-      if ((Elf64_Sxword)v &gt; 0x7fffffff</div><div class='del'>-	  || (Elf64_Sxword)v &lt; -(Elf64_Sxword)0x80000000)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *iloc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_LITERAL:</div><div class='del'>-      {</div><div class='del'>-	struct alpha_got_entry *gotent;</div><div class='del'>-</div><div class='del'>-	assert(asym != NULL);</div><div class='del'>-	gotent = asym-&gt;got_entries;</div><div class='del'>-	while (gotent-&gt;addend != rel-&gt;r_addend)</div><div class='del'>-	  gotent = gotent-&gt;next;</div><div class='del'>-</div><div class='del'>-	if (!gotent-&gt;reloc_done)</div><div class='del'>-	  {</div><div class='del'>-	    *(unsigned long *)(af-&gt;got-&gt;contents + gotent-&gt;offset) = v;</div><div class='del'>-	    gotent-&gt;reloc_done = 1;</div><div class='del'>-	  }</div><div class='del'>-</div><div class='del'>-	*iloc = (*iloc &amp; ~0xffff) | ((gotent-&gt;offset - 0x8000) &amp; 0xffff);</div><div class='del'>-      }</div><div class='del'>-    break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_GPDISP:</div><div class='del'>-      {</div><div class='del'>-	unsigned int *p_ldah, *p_lda;</div><div class='del'>-	unsigned int i_ldah, i_lda, hi, lo;</div><div class='del'>-</div><div class='del'>-	p_ldah = iloc;</div><div class='del'>-	p_lda = (unsigned int *)((char *)iloc + rel-&gt;r_addend);</div><div class='del'>-	i_ldah = *p_ldah;</div><div class='del'>-	i_lda = *p_lda;</div><div class='del'>-</div><div class='del'>-	/* Make sure the instructions are righteous.  */</div><div class='del'>-	if ((i_ldah &gt;&gt; 26) != 9 || (i_lda &gt;&gt; 26) != 8)</div><div class='del'>-	  ret = obj_reloc_dangerous;</div><div class='del'>-</div><div class='del'>-	/* Extract the existing addend.  */</div><div class='del'>-	v = (i_ldah &amp; 0xffff) &lt;&lt; 16 | (i_lda &amp; 0xffff);</div><div class='del'>-	v = (v ^ 0x80008000) - 0x80008000;</div><div class='del'>-</div><div class='del'>-	v += gp - dot;</div><div class='del'>-</div><div class='del'>-	if ((Elf64_Sxword)v &gt;= 0x7fff8000</div><div class='del'>-	    || (Elf64_Sxword)v &lt; -(Elf64_Sxword)0x80000000)</div><div class='del'>-	  ret = obj_reloc_overflow;</div><div class='del'>-</div><div class='del'>-	/* Modify the instructions and finish up.  */</div><div class='del'>-	lo = v &amp; 0xffff;</div><div class='del'>-	hi = ((v &gt;&gt; 16) + ((v &gt;&gt; 15) &amp; 1)) &amp; 0xffff;</div><div class='del'>-</div><div class='del'>-	*p_ldah = (i_ldah &amp; 0xffff0000) | hi;</div><div class='del'>-	*p_lda = (i_lda &amp; 0xffff0000) | lo;</div><div class='del'>-      }</div><div class='del'>-    break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_BRADDR:</div><div class='del'>-      v -= dot + 4;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      else if ((Elf64_Sxword)v &gt; 0x3fffff</div><div class='del'>-	       || (Elf64_Sxword)v &lt; -(Elf64_Sxword)0x400000)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      v /= 4;</div><div class='del'>-</div><div class='del'>-      *iloc = (*iloc &amp; ~0x1fffff) | (v &amp; 0x1fffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ALPHA_HINT:</div><div class='del'>-      v -= dot + 4;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      v /= 4;</div><div class='del'>-</div><div class='del'>-      *iloc = (*iloc &amp; ~0x3fff) | (v &amp; 0x3fff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct alpha_file *af = (struct alpha_file *)f;</div><div class='del'>-  int i, n, offset = 0;</div><div class='del'>-</div><div class='del'>-  n = af-&gt;root.header.e_shnum;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-      Elf64_Rela *rel, *relend;</div><div class='del'>-      Elf64_Sym *symtab;</div><div class='del'>-      const char *strtab;</div><div class='del'>-</div><div class='del'>-      relsec = af-&gt;root.sections[i];</div><div class='del'>-      if (relsec-&gt;header.sh_type != SHT_RELA)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      symsec = af-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-      strsec = af-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (Elf64_Rela *)relsec-&gt;contents;</div><div class='del'>-      relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf64_Rela));</div><div class='del'>-      symtab = (Elf64_Sym *)symsec-&gt;contents;</div><div class='del'>-      strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  struct alpha_got_entry *ent;</div><div class='del'>-	  Elf64_Sym *extsym;</div><div class='del'>-	  struct alpha_symbol *intsym;</div><div class='del'>-	  const char *name;</div><div class='del'>-</div><div class='del'>-	  if (ELF64_R_TYPE(rel-&gt;r_info) != R_ALPHA_LITERAL)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	  extsym = &amp;symtab[ELF64_R_SYM(rel-&gt;r_info)];</div><div class='del'>-	  if (extsym-&gt;st_name)</div><div class='del'>-	    name = strtab + extsym-&gt;st_name;</div><div class='del'>-	  else</div><div class='del'>-	    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	  intsym = (struct alpha_symbol *)obj_find_symbol(&amp;af-&gt;root, name);</div><div class='del'>-</div><div class='del'>-	  for (ent = intsym-&gt;got_entries; ent ; ent = ent-&gt;next)</div><div class='del'>-	    if (ent-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-	      goto found;</div><div class='del'>-</div><div class='del'>-	  ent = xmalloc(sizeof(*ent));</div><div class='del'>-	  ent-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-	  ent-&gt;offset = offset;</div><div class='del'>-	  ent-&gt;reloc_done = 0;</div><div class='del'>-	  ent-&gt;next = intsym-&gt;got_entries;</div><div class='del'>-	  intsym-&gt;got_entries = ent;</div><div class='del'>-	  offset += 8;</div><div class='del'>-</div><div class='del'>-	found:;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (offset &gt; 0x10000)</div><div class='del'>-    {</div><div class='del'>-      error(".got section overflow: %#x &gt; 0x10000", offset);</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* We always want a .got section so that we always have a GP for</div><div class='del'>-     use with GPDISP and GPREL32 relocs.  Besides, if the section</div><div class='del'>-     is empty we don't use up space anyway.  */</div><div class='del'>-  af-&gt;got = obj_create_alloced_section(&amp;af-&gt;root, ".got", 8, offset);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  struct alpha_file *af = (struct alpha_file *)f;</div><div class='del'>-</div><div class='del'>-  mod-&gt;gp = af-&gt;got-&gt;header.sh_addr + 0x8000;</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf64_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_arm.c b/mdk-stage1/insmod-modutils/obj/obj_arm.c<br/>deleted file mode 100644<br/>index 7a843f947..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_arm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_arm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,318 +0,0 @@</div><div class='del'>-/* ARM specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997, 1998 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Phil Blundell &lt;philb@gnu.org&gt;</div><div class='del'>-   and wms &lt;woody@corelcomputer.com&gt;</div><div class='del'>-   based on the i386 code by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct arm_plt_entry</div><div class='del'>-{</div><div class='del'>-  int offset;</div><div class='del'>-  int allocated:1;</div><div class='del'>-  int inited:1;                // has been set up</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct arm_got_entry</div><div class='del'>-{</div><div class='del'>-  int offset;</div><div class='del'>-  int allocated : 1;</div><div class='del'>-  unsigned reloc_done : 1;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct arm_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct obj_section *plt;</div><div class='del'>-  struct obj_section *got;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct arm_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol root;</div><div class='del'>-  struct arm_plt_entry pltent;</div><div class='del'>-  struct arm_got_entry gotent;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct arm_file *f;</div><div class='del'>-  f = xmalloc(sizeof(*f));</div><div class='del'>-  f-&gt;got = NULL;</div><div class='del'>-  return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  struct arm_symbol *sym;</div><div class='del'>-  sym = xmalloc(sizeof(*sym));</div><div class='del'>-  memset(&amp;sym-&gt;gotent, 0, sizeof(sym-&gt;gotent));</div><div class='del'>-  memset(&amp;sym-&gt;pltent, 0, sizeof(sym-&gt;pltent));</div><div class='del'>-  return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rel *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  struct arm_file *afile = (struct arm_file *)f;</div><div class='del'>-  struct arm_symbol *asym  = (struct arm_symbol *)sym;</div><div class='del'>-</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  Elf32_Addr got = afile-&gt;got ? afile-&gt;got-&gt;header.sh_addr : 0;</div><div class='del'>-  Elf32_Addr plt = afile-&gt;plt ? afile-&gt;plt-&gt;header.sh_addr : 0;</div><div class='del'>-</div><div class='del'>-  struct arm_plt_entry *pe;</div><div class='del'>-  unsigned long *ip;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_ARM_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ARM_ABS32:</div><div class='del'>-      *loc += v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ARM_GOT32:</div><div class='del'>-      /* needs an entry in the .got: set it, once */</div><div class='del'>-      if (! asym-&gt;gotent.reloc_done)</div><div class='del'>-	{</div><div class='del'>-	  asym-&gt;gotent.reloc_done = 1;</div><div class='del'>-	  *(Elf32_Addr *)(afile-&gt;got-&gt;contents + asym-&gt;gotent.offset) = v;</div><div class='del'>-	}</div><div class='del'>-      /* make the reloc with_respect_to_.got */</div><div class='del'>-      *loc += asym-&gt;gotent.offset;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-      /* relative reloc, always to _GLOBAL_OFFSET_TABLE_ (which is .got)</div><div class='del'>-	 similar to branch, but is full 32 bits relative */</div><div class='del'>-    case R_ARM_GOTPC:</div><div class='del'>-      assert(got);</div><div class='del'>-      *loc += got - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_ARM_PC24:</div><div class='del'>-    case R_ARM_PLT32:</div><div class='del'>-      /* find the plt entry and initialize it if necessary */</div><div class='del'>-      assert(asym != NULL);</div><div class='del'>-      pe = (struct arm_plt_entry*) &amp;asym-&gt;pltent;</div><div class='del'>-      if (! pe-&gt;inited)</div><div class='del'>-	{</div><div class='del'>-	  ip = (unsigned long *) (afile-&gt;plt-&gt;contents + pe-&gt;offset);</div><div class='del'>-	  ip[0] = 0xe51ff004;			/* ldr pc,[pc,#-4] */</div><div class='del'>-	  ip[1] = v;				/* sym@ */</div><div class='del'>-	  pe-&gt;inited = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-      /* relative distance to target */</div><div class='del'>-      v -= dot;</div><div class='del'>-      /* if the target is too far away.... */</div><div class='del'>-      if ((int)v &lt; -0x02000000 || (int)v &gt;= 0x02000000)</div><div class='del'>-	{</div><div class='del'>-	  /* go via the plt */</div><div class='del'>-	  v = plt + pe-&gt;offset - dot;</div><div class='del'>-	}</div><div class='del'>-      if (v &amp; 3)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-</div><div class='del'>-      /* Convert to words. */</div><div class='del'>-      v &gt;&gt;= 2;</div><div class='del'>-</div><div class='del'>-      /* merge the offset into the instruction. */</div><div class='del'>-      *loc = (*loc &amp; ~0x00ffffff) | ((v + *loc) &amp; 0x00ffffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-      /* address relative to the got */</div><div class='del'>-    case R_ARM_GOTOFF:</div><div class='del'>-      assert(got);</div><div class='del'>-      *loc += v - got;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      printf("Warning: unhandled reloc %d\n",ELF32_R_TYPE(rel-&gt;r_info));</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct arm_file *afile = (struct arm_file *) f;</div><div class='del'>-  int i;</div><div class='del'>-  struct obj_section *sec, *syms, *strs;</div><div class='del'>-  ElfW(Rel) *rel, *relend;</div><div class='del'>-  ElfW(Sym) *symtab, *extsym;</div><div class='del'>-  const char *strtab, *name;</div><div class='del'>-  struct arm_symbol *intsym;</div><div class='del'>-  struct arm_plt_entry *pe;</div><div class='del'>-  struct arm_got_entry *ge;</div><div class='del'>-  int got_offset = 0, plt_offset = 0;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      sec = f-&gt;sections[i];</div><div class='del'>-      if (sec-&gt;header.sh_type != SHT_RELM)</div><div class='del'>-	continue;</div><div class='del'>-      syms = f-&gt;sections[sec-&gt;header.sh_link];</div><div class='del'>-      strs = f-&gt;sections[syms-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (ElfW(RelM) *) sec-&gt;contents;</div><div class='del'>-      relend = rel + (sec-&gt;header.sh_size / sizeof(ElfW(RelM)));</div><div class='del'>-      symtab = (ElfW(Sym) *) syms-&gt;contents;</div><div class='del'>-      strtab = (const char *) strs-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  extsym = &amp;symtab[ELF32_R_SYM(rel-&gt;r_info)];</div><div class='del'>-</div><div class='del'>-	  switch(ELF32_R_TYPE(rel-&gt;r_info)) {</div><div class='del'>-	  case R_ARM_PC24:</div><div class='del'>-	  case R_ARM_PLT32:</div><div class='del'>-	    if (extsym-&gt;st_name)</div><div class='del'>-	      name = strtab + extsym-&gt;st_name;</div><div class='del'>-	    else</div><div class='del'>-	      name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	    intsym = (struct arm_symbol *) obj_find_symbol(f, name);</div><div class='del'>-</div><div class='del'>-	    pe = &amp;intsym-&gt;pltent;</div><div class='del'>-</div><div class='del'>-	    if (! pe-&gt;allocated)</div><div class='del'>-	      {</div><div class='del'>-		pe-&gt;allocated = 1;</div><div class='del'>-		pe-&gt;offset = plt_offset;</div><div class='del'>-		plt_offset += 8;</div><div class='del'>-		pe-&gt;inited = 0;</div><div class='del'>-	      }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	    /* these two don_t need got entries, but they need</div><div class='del'>-	       the .got to exist */</div><div class='del'>-	  case R_ARM_GOTOFF:</div><div class='del'>-	  case R_ARM_GOTPC:</div><div class='del'>-	    if (got_offset==0) got_offset = 4;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case R_ARM_GOT32:</div><div class='del'>-	    if (extsym-&gt;st_name)</div><div class='del'>-	      name = strtab + extsym-&gt;st_name;</div><div class='del'>-	    else</div><div class='del'>-	      name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	    intsym = (struct arm_symbol *) obj_find_symbol(f, name);</div><div class='del'>-</div><div class='del'>-	    ge = (struct arm_got_entry *) &amp;intsym-&gt;gotent;</div><div class='del'>-	    if (! ge-&gt;allocated)</div><div class='del'>-	      {</div><div class='del'>-		ge-&gt;allocated = 1;</div><div class='del'>-		ge-&gt;offset = got_offset;</div><div class='del'>-		got_offset += sizeof(void*);</div><div class='del'>-	      }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  default:</div><div class='del'>-	    continue;</div><div class='del'>-	  }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* if there was a _GLOBAL_OFFSET_TABLE_, then the .got section</div><div class='del'>-   exists already; find it and use it */</div><div class='del'>-  if (got_offset)</div><div class='del'>-  {</div><div class='del'>-      struct obj_section* sec = obj_find_section(f, ".got");</div><div class='del'>-      if (sec)</div><div class='del'>-	obj_extend_section(sec, got_offset);</div><div class='del'>-      else</div><div class='del'>-	{</div><div class='del'>-	  sec = obj_create_alloced_section(f, ".got", 8, got_offset);</div><div class='del'>-	  assert(sec);</div><div class='del'>-	}</div><div class='del'>-      afile-&gt;got = sec;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if (plt_offset)</div><div class='del'>-    afile-&gt;plt = obj_create_alloced_section(f, ".plt", 8, plt_offset);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_common.c b/mdk-stage1/insmod-modutils/obj/obj_common.c<br/>deleted file mode 100644<br/>index 2a6606c94..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_common.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_common.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,399 +0,0 @@</div><div class='del'>-/* Elf file, section, and symbol manipulation routines.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* Standard ELF hash function.  */</div><div class='del'>-inline unsigned long</div><div class='del'>-obj_elf_hash_n(const char *name, unsigned long n)</div><div class='del'>-{</div><div class='del'>-  unsigned long h = 0;</div><div class='del'>-  unsigned long g;</div><div class='del'>-  unsigned char ch;</div><div class='del'>-</div><div class='del'>-  while (n &gt; 0)</div><div class='del'>-    {</div><div class='del'>-      ch = *name++;</div><div class='del'>-      h = (h &lt;&lt; 4) + ch;</div><div class='del'>-      if ((g = (h &amp; 0xf0000000)) != 0)</div><div class='del'>-	{</div><div class='del'>-	  h ^= g &gt;&gt; 24;</div><div class='del'>-	  h &amp;= ~g;</div><div class='del'>-	}</div><div class='del'>-      n--;</div><div class='del'>-    }</div><div class='del'>-  return h;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long</div><div class='del'>-obj_elf_hash (const char *name)</div><div class='del'>-{</div><div class='del'>-  return obj_elf_hash_n(name, strlen(name));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_set_symbol_compare (struct obj_file *f,</div><div class='del'>-			int (*cmp)(const char *, const char *),</div><div class='del'>-			unsigned long (*hash)(const char *))</div><div class='del'>-{</div><div class='del'>-  if (cmp)</div><div class='del'>-    f-&gt;symbol_cmp = cmp;</div><div class='del'>-  if (hash)</div><div class='del'>-    {</div><div class='del'>-      struct obj_symbol *tmptab[HASH_BUCKETS], *sym, *next;</div><div class='del'>-      int i;</div><div class='del'>-</div><div class='del'>-      f-&gt;symbol_hash = hash;</div><div class='del'>-</div><div class='del'>-      memcpy(tmptab, f-&gt;symtab, sizeof(tmptab));</div><div class='del'>-      memset(f-&gt;symtab, 0, sizeof(f-&gt;symtab));</div><div class='del'>-</div><div class='del'>-      for (i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-	for (sym = tmptab[i]; sym ; sym = next)</div><div class='del'>-	  {</div><div class='del'>-	    unsigned long h = hash(sym-&gt;name) % HASH_BUCKETS;</div><div class='del'>-	    next = sym-&gt;next;</div><div class='del'>-	    sym-&gt;next = f-&gt;symtab[h];</div><div class='del'>-	    f-&gt;symtab[h] = sym;</div><div class='del'>-	  }</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-obj_add_symbol (struct obj_file *f, const char *name, unsigned long symidx,</div><div class='del'>-		int info, int secidx, ElfW(Addr) value, unsigned long size)</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol *sym;</div><div class='del'>-  unsigned long hash = f-&gt;symbol_hash(name) % HASH_BUCKETS;</div><div class='del'>-  int n_type = ELFW(ST_TYPE)(info);</div><div class='del'>-  int n_binding = ELFW(ST_BIND)(info);</div><div class='del'>-</div><div class='del'>-  for (sym = f-&gt;symtab[hash]; sym; sym = sym-&gt;next)</div><div class='del'>-    if (f-&gt;symbol_cmp(sym-&gt;name, name) == 0)</div><div class='del'>-      {</div><div class='del'>-	int o_secidx = sym-&gt;secidx;</div><div class='del'>-	int o_info = sym-&gt;info;</div><div class='del'>-	int o_type = ELFW(ST_TYPE)(o_info);</div><div class='del'>-	int o_binding = ELFW(ST_BIND)(o_info);</div><div class='del'>-</div><div class='del'>-	/* A redefinition!  Is it legal?  */</div><div class='del'>-</div><div class='del'>-	if (secidx == SHN_UNDEF)</div><div class='del'>-	  return sym;</div><div class='del'>-	else if (o_secidx == SHN_UNDEF)</div><div class='del'>-	  goto found;</div><div class='del'>-	else if (n_binding == STB_GLOBAL &amp;&amp; o_binding == STB_LOCAL)</div><div class='del'>-	  {</div><div class='del'>-	    /* Cope with local and global symbols of the same name</div><div class='del'>-	       in the same object file, as might have been created</div><div class='del'>-	       by ld -r.  The only reason locals are now seen at this</div><div class='del'>-	       level at all is so that we can do semi-sensible things</div><div class='del'>-	       with parameters.  */</div><div class='del'>-</div><div class='del'>-	    struct obj_symbol *nsym, **p;</div><div class='del'>-</div><div class='del'>-	    nsym = arch_new_symbol();</div><div class='del'>-	    nsym-&gt;next = sym-&gt;next;</div><div class='del'>-	    nsym-&gt;ksymidx = -1;</div><div class='del'>-</div><div class='del'>-	    /* Excise the old (local) symbol from the hash chain.  */</div><div class='del'>-	    for (p = &amp;f-&gt;symtab[hash]; *p != sym; p = &amp;(*p)-&gt;next)</div><div class='del'>-	      continue;</div><div class='del'>-	    *p = sym = nsym;</div><div class='del'>-	    goto found;</div><div class='del'>-	  }</div><div class='del'>-	else if (n_binding == STB_LOCAL)</div><div class='del'>-	  {</div><div class='del'>-	    /* Another symbol of the same name has already been defined.</div><div class='del'>-	       Just add this to the local table.  */</div><div class='del'>-	    sym = arch_new_symbol();</div><div class='del'>-	    sym-&gt;next = NULL;</div><div class='del'>-	    sym-&gt;ksymidx = -1;</div><div class='del'>-	    f-&gt;local_symtab[symidx] = sym;</div><div class='del'>-	    goto found;</div><div class='del'>-	  }</div><div class='del'>-	else if (n_binding == STB_WEAK)</div><div class='del'>-	  return sym;</div><div class='del'>-	else if (o_binding == STB_WEAK)</div><div class='del'>-	  goto found;</div><div class='del'>-	/* Don't unify COMMON symbols with object types the programmer</div><div class='del'>-	   doesn't expect.  */</div><div class='del'>-	else if (secidx == SHN_COMMON</div><div class='del'>-		 &amp;&amp; (o_type == STT_NOTYPE || o_type == STT_OBJECT))</div><div class='del'>-	  return sym;</div><div class='del'>-	else if (o_secidx == SHN_COMMON</div><div class='del'>-		 &amp;&amp; (n_type == STT_NOTYPE || n_type == STT_OBJECT))</div><div class='del'>-	  goto found;</div><div class='del'>-	else</div><div class='del'>-	  {</div><div class='del'>-	    /* Don't report an error if the symbol is coming from</div><div class='del'>-	       the kernel or some external module.  */</div><div class='del'>-	    if (secidx &lt;= SHN_HIRESERVE)</div><div class='del'>-	      error("%s multiply defined", name);</div><div class='del'>-	    return sym;</div><div class='del'>-	  }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-  /* Completely new symbol.  */</div><div class='del'>-  sym = arch_new_symbol();</div><div class='del'>-  sym-&gt;next = f-&gt;symtab[hash];</div><div class='del'>-  f-&gt;symtab[hash] = sym;</div><div class='del'>-  sym-&gt;ksymidx = -1;</div><div class='del'>-</div><div class='del'>-  if (ELFW(ST_BIND)(info) == STB_LOCAL &amp;&amp; symidx != -1) {</div><div class='del'>-    if (symidx &gt;= f-&gt;local_symtab_size)</div><div class='del'>-      error("local symbol %s with index %ld exceeds local_symtab_size %ld",</div><div class='del'>-        name, (long) symidx, (long) f-&gt;local_symtab_size);</div><div class='del'>-    else</div><div class='del'>-      f-&gt;local_symtab[symidx] = sym;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-found:</div><div class='del'>-  sym-&gt;name = name;</div><div class='del'>-  sym-&gt;value = value;</div><div class='del'>-  sym-&gt;size = size;</div><div class='del'>-  sym-&gt;secidx = secidx;</div><div class='del'>-  sym-&gt;info = info;</div><div class='del'>-  sym-&gt;r_type = 0;	/* should be R_arch_NONE for all arch */</div><div class='del'>-</div><div class='del'>-  return sym;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-obj_find_symbol (struct obj_file *f, const char *name)</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol *sym;</div><div class='del'>-  unsigned long hash = f-&gt;symbol_hash(name) % HASH_BUCKETS;</div><div class='del'>-</div><div class='del'>-  for (sym = f-&gt;symtab[hash]; sym; sym = sym-&gt;next)</div><div class='del'>-    if (f-&gt;symbol_cmp(sym-&gt;name, name) == 0)</div><div class='del'>-      return sym;</div><div class='del'>-</div><div class='del'>-  return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-ElfW(Addr)</div><div class='del'>-obj_symbol_final_value (struct obj_file *f, struct obj_symbol *sym)</div><div class='del'>-{</div><div class='del'>-  if (sym)</div><div class='del'>-    {</div><div class='del'>-      if (sym-&gt;secidx &gt;= SHN_LORESERVE)</div><div class='del'>-	return sym-&gt;value;</div><div class='del'>-</div><div class='del'>-      return sym-&gt;value + f-&gt;sections[sym-&gt;secidx]-&gt;header.sh_addr;</div><div class='del'>-    }</div><div class='del'>-  else</div><div class='del'>-    {</div><div class='del'>-      /* As a special case, a NULL sym has value zero.  */</div><div class='del'>-      return 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_find_section (struct obj_file *f, const char *name)</div><div class='del'>-{</div><div class='del'>-  int i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    if (strcmp(f-&gt;sections[i]-&gt;name, name) == 0)</div><div class='del'>-      return f-&gt;sections[i];</div><div class='del'>-</div><div class='del'>-  return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-obj_load_order_prio(struct obj_section *a)</div><div class='del'>-{</div><div class='del'>-  unsigned long af, ac;</div><div class='del'>-</div><div class='del'>-  af = a-&gt;header.sh_flags;</div><div class='del'>-</div><div class='del'>-  ac = 0;</div><div class='del'>-  if (a-&gt;name[0] != '.' || strlen(a-&gt;name) != 10 ||</div><div class='del'>-      strcmp(a-&gt;name + 5, ".init")) ac |= 32;</div><div class='del'>-  if (af &amp; SHF_ALLOC) ac |= 16;</div><div class='del'>-  if (!(af &amp; SHF_WRITE)) ac |= 8;</div><div class='del'>-  if (af &amp; SHF_EXECINSTR) ac |= 4;</div><div class='del'>-  if (a-&gt;header.sh_type != SHT_NOBITS) ac |= 2;</div><div class='del'>-#if defined(ARCH_ia64)</div><div class='del'>-  if (af &amp; SHF_IA_64_SHORT) ac -= 1;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-  return ac;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_insert_section_load_order (struct obj_file *f, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  struct obj_section **p;</div><div class='del'>-  int prio = obj_load_order_prio(sec);</div><div class='del'>-  for (p = f-&gt;load_order_search_start; *p ; p = &amp;(*p)-&gt;load_next)</div><div class='del'>-    if (obj_load_order_prio(*p) &lt; prio)</div><div class='del'>-      break;</div><div class='del'>-  sec-&gt;load_next = *p;</div><div class='del'>-  *p = sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_create_alloced_section (struct obj_file *f, const char *name,</div><div class='del'>-			    unsigned long align, unsigned long size)</div><div class='del'>-{</div><div class='del'>-  int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-  struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-  f-&gt;sections = xrealloc(f-&gt;sections, (newidx+1) * sizeof(sec));</div><div class='del'>-  f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-  memset(sec, 0, sizeof(*sec));</div><div class='del'>-  sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-  sec-&gt;header.sh_flags = SHF_WRITE|SHF_ALLOC;</div><div class='del'>-  sec-&gt;header.sh_size = size;</div><div class='del'>-  sec-&gt;header.sh_addralign = align;</div><div class='del'>-  sec-&gt;name = name;</div><div class='del'>-  sec-&gt;idx = newidx;</div><div class='del'>-  if (size)</div><div class='del'>-    sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-  obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-  return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_create_alloced_section_first (struct obj_file *f, const char *name,</div><div class='del'>-				  unsigned long align, unsigned long size)</div><div class='del'>-{</div><div class='del'>-  int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-  struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-  f-&gt;sections = xrealloc(f-&gt;sections, (newidx+1) * sizeof(sec));</div><div class='del'>-  f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-  memset(sec, 0, sizeof(*sec));</div><div class='del'>-  sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-  sec-&gt;header.sh_flags = SHF_WRITE|SHF_ALLOC;</div><div class='del'>-  sec-&gt;header.sh_size = size;</div><div class='del'>-  sec-&gt;header.sh_addralign = align;</div><div class='del'>-  sec-&gt;name = name;</div><div class='del'>-  sec-&gt;idx = newidx;</div><div class='del'>-  if (size)</div><div class='del'>-    sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-  sec-&gt;load_next = f-&gt;load_order;</div><div class='del'>-  f-&gt;load_order = sec;</div><div class='del'>-  if (f-&gt;load_order_search_start == &amp;f-&gt;load_order)</div><div class='del'>-    f-&gt;load_order_search_start = &amp;sec-&gt;load_next;</div><div class='del'>-</div><div class='del'>-  return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *</div><div class='del'>-obj_extend_section (struct obj_section *sec, unsigned long more)</div><div class='del'>-{</div><div class='del'>-  unsigned long oldsize = sec-&gt;header.sh_size;</div><div class='del'>-  sec-&gt;contents = xrealloc(sec-&gt;contents, sec-&gt;header.sh_size += more);</div><div class='del'>-  return sec-&gt;contents + oldsize;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Convert an object pointer (address) to a native pointer and vice versa.</div><div class='del'>- * It gets interesting when the object has 64 bit pointers but modutils</div><div class='del'>- * is running 32 bit.  This is nasty code but it stops the compiler giving</div><div class='del'>- * spurious warning messages.  "I know what I am doing" ...</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void *</div><div class='del'>-obj_addr_to_native_ptr (ElfW(Addr) addr)</div><div class='del'>-{</div><div class='del'>-	unsigned int convert = (sizeof(void *) &lt;&lt; 8) + sizeof(addr);	/* to, from */</div><div class='del'>-	union obj_ptr_4 p4;</div><div class='del'>-	union obj_ptr_8 p8;</div><div class='del'>-	switch (convert) {</div><div class='del'>-	case 0x0404:</div><div class='del'>-		p4.addr = addr;</div><div class='del'>-		return(p4.ptr);</div><div class='del'>-		break;</div><div class='del'>-	case 0x0408:</div><div class='del'>-		p4.addr = addr;</div><div class='del'>-		if (p4.addr != addr) {</div><div class='del'>-			error("obj_addr_to_native_ptr truncation %" tgt_long_fmt "x",</div><div class='del'>-				(tgt_long) addr);</div><div class='del'>-			exit(1);</div><div class='del'>-		}</div><div class='del'>-		return(p4.ptr);</div><div class='del'>-		break;</div><div class='del'>-	case 0x0804:</div><div class='del'>-		p8.addr = addr;</div><div class='del'>-		return(p8.ptr);</div><div class='del'>-		break;</div><div class='del'>-	case 0x0808:</div><div class='del'>-		p8.addr = addr;</div><div class='del'>-		return(p8.ptr);</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		error("obj_addr_to_native_ptr unknown conversion 0x%04x", convert);</div><div class='del'>-		exit(1);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-ElfW(Addr)</div><div class='del'>-obj_native_ptr_to_addr (void *ptr)</div><div class='del'>-{</div><div class='del'>-	unsigned int convert = (sizeof(ElfW(Addr)) &lt;&lt; 8) + sizeof(ptr);	/* to, from */</div><div class='del'>-	union obj_ptr_4 p4;</div><div class='del'>-	union obj_ptr_8 p8;</div><div class='del'>-	switch (convert) {</div><div class='del'>-	case 0x0404:</div><div class='del'>-		p4.ptr = ptr;</div><div class='del'>-		return(p4.addr);</div><div class='del'>-		break;</div><div class='del'>-	case 0x0408:</div><div class='del'>-		p8.ptr = ptr;</div><div class='del'>-		p4.addr = p8.addr;</div><div class='del'>-		if (p4.addr != p8.addr) {</div><div class='del'>-			error("obj_native_ptr_to_addr truncation %" tgt_long_fmt "x",</div><div class='del'>-				(tgt_long) p8.addr);</div><div class='del'>-			exit(1);</div><div class='del'>-		}</div><div class='del'>-		return(p4.addr);</div><div class='del'>-		break;</div><div class='del'>-	case 0x0804:</div><div class='del'>-		p4.ptr = ptr;</div><div class='del'>-		return(p4.addr);	/* compiler expands to 8 */</div><div class='del'>-		break;</div><div class='del'>-	case 0x0808:</div><div class='del'>-		p8.ptr = ptr;</div><div class='del'>-		return(p8.addr);</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		error("obj_native_ptr_to_addr unknown conversion 0x%04x", convert);</div><div class='del'>-		exit(1);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_hppa.c b/mdk-stage1/insmod-modutils/obj/obj_hppa.c<br/>deleted file mode 100644<br/>index 4207e692e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_hppa.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_hppa.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,668 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * PA-RISC specific support for Elf loading and relocation.</div><div class='del'>- * Copyright 2000 David Huggins-Daines &lt;dhd@linuxcare.com&gt;, Linuxcare Inc.</div><div class='del'>- * Copyright 2000 Richard Hirst &lt;rhirst@linuxcare.com&gt;, Linuxcare Inc.</div><div class='del'>- *</div><div class='del'>- * Based on the IA-64 support, which is:</div><div class='del'>- * Copyright 2000 Mike Stephens &lt;mike.stephens@intel.com&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-#include &lt;modstat.h&gt;	/* For ksyms */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct _hppa_stub_t</div><div class='del'>-{</div><div class='del'>-  struct _hppa_stub_t *next;</div><div class='del'>-  int offset;</div><div class='del'>-  int reloc_done;</div><div class='del'>-} hppa_stub_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa_symbol_t</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol root;</div><div class='del'>-  hppa_stub_t *stub;</div><div class='del'>-} hppa_symbol_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa_file_t</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct obj_section *stub;</div><div class='del'>-  Elf32_Addr dp;</div><div class='del'>-} hppa_file_t;</div><div class='del'>-</div><div class='del'>-/* The ABI defines various more esoteric types, but these are the only</div><div class='del'>-   ones we actually need. */</div><div class='del'>-enum hppa_fsel</div><div class='del'>-{</div><div class='del'>-  e_fsel,</div><div class='del'>-  e_lsel,</div><div class='del'>-  e_rsel,</div><div class='del'>-  e_lrsel,</div><div class='del'>-  e_rrsel</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* This could be a call to obj_create_alloced_section() followed</div><div class='del'>- * by an overwrite of sec-&gt;header.sh_flags.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_hppa_create_alloced_section (struct obj_file *f, const char *name,</div><div class='del'>-				 unsigned long align, unsigned long size,</div><div class='del'>-				 unsigned long sh_flags)</div><div class='del'>-{</div><div class='del'>-  int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-  struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-  f-&gt;sections = xrealloc(f-&gt;sections, (newidx+1) * sizeof(sec));</div><div class='del'>-  f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-  memset(sec, 0, sizeof(*sec));</div><div class='del'>-  sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-  sec-&gt;header.sh_flags = sh_flags;</div><div class='del'>-  sec-&gt;header.sh_size = size;</div><div class='del'>-  sec-&gt;header.sh_addralign = align;</div><div class='del'>-  sec-&gt;name = name;</div><div class='del'>-  sec-&gt;idx = newidx;</div><div class='del'>-  if (size)</div><div class='del'>-    sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-  obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-  return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  hppa_file_t *f;</div><div class='del'>-  f = xmalloc(sizeof(*f));</div><div class='del'>-  f-&gt;stub = NULL;</div><div class='del'>-  return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  hppa_symbol_t *sym;</div><div class='del'>-  sym = xmalloc(sizeof(*sym));</div><div class='del'>-  sym-&gt;stub = NULL;</div><div class='del'>-  return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* This is called for architecture specific sections we might need to</div><div class='del'>-   do special things to. */</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-  /* Assume it's just a debugging section that we can safely</div><div class='del'>-     ignore ...  */</div><div class='del'>-  sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* =================================================================</div><div class='del'>-</div><div class='del'>-   These functions are from libhppa.h in the GNU BFD library.</div><div class='del'>-   (c) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000</div><div class='del'>-   Free Software Foundation, Inc.</div><div class='del'>-</div><div class='del'>-   ================================================================= */</div><div class='del'>-</div><div class='del'>-/* The *sign_extend functions are used to assemble various bitfields</div><div class='del'>-   taken from an instruction and return the resulting immediate</div><div class='del'>-   value.  */</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-sign_extend (x, len)</div><div class='del'>-     int x, len;</div><div class='del'>-{</div><div class='del'>-  int signbit = (1 &lt;&lt; (len - 1));</div><div class='del'>-  int mask = (signbit &lt;&lt; 1) - 1;</div><div class='del'>-  return ((x &amp; mask) ^ signbit) - signbit;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-low_sign_extend (x, len)</div><div class='del'>-     int x, len;</div><div class='del'>-{</div><div class='del'>-  return (x &gt;&gt; 1) - ((x &amp; 1) &lt;&lt; (len - 1));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* The re_assemble_* functions prepare an immediate value for</div><div class='del'>-   insertion into an opcode. pa-risc uses all sorts of weird bitfields</div><div class='del'>-   in the instruction to hold the value.  */</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-sign_unext (x, len)</div><div class='del'>-     int x, len;</div><div class='del'>-{</div><div class='del'>-  int len_ones;</div><div class='del'>-</div><div class='del'>-  len_ones = (1 &lt;&lt; len) - 1;</div><div class='del'>-</div><div class='del'>-  return x &amp; len_ones;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-low_sign_unext (x, len)</div><div class='del'>-     int x, len;</div><div class='del'>-{</div><div class='del'>-  int temp;</div><div class='del'>-  int sign;</div><div class='del'>-</div><div class='del'>-  sign = (x &gt;&gt; (len-1)) &amp; 1;</div><div class='del'>-</div><div class='del'>-  temp = sign_unext (x, len-1);</div><div class='del'>-</div><div class='del'>-  return (temp &lt;&lt; 1) | sign;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_3 (as3)</div><div class='del'>-     int as3;</div><div class='del'>-{</div><div class='del'>-  return ((  (as3 &amp; 4) &lt;&lt; (13-2))</div><div class='del'>-	  | ((as3 &amp; 3) &lt;&lt; (13+1)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_12 (as12)</div><div class='del'>-     int as12;</div><div class='del'>-{</div><div class='del'>-  return ((  (as12 &amp; 0x800) &gt;&gt; 11)</div><div class='del'>-	  | ((as12 &amp; 0x400) &gt;&gt; (10 - 2))</div><div class='del'>-	  | ((as12 &amp; 0x3ff) &lt;&lt; (1 + 2)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_14 (as14)</div><div class='del'>-     int as14;</div><div class='del'>-{</div><div class='del'>-  return ((  (as14 &amp; 0x1fff) &lt;&lt; 1)</div><div class='del'>-	  | ((as14 &amp; 0x2000) &gt;&gt; 13));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_16 (as16)</div><div class='del'>-     int as16;</div><div class='del'>-{</div><div class='del'>-  int s, t;</div><div class='del'>-</div><div class='del'>-  /* Unusual 16-bit encoding, for wide mode only.  */</div><div class='del'>-  t = (as16 &lt;&lt; 1) &amp; 0xffff;</div><div class='del'>-  s = (as16 &amp; 0x8000);</div><div class='del'>-  return (t ^ s ^ (s &gt;&gt; 1)) | (s &gt;&gt; 15);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_17 (as17)</div><div class='del'>-     int as17;</div><div class='del'>-{</div><div class='del'>-  return ((  (as17 &amp; 0x10000) &gt;&gt; 16)</div><div class='del'>-	  | ((as17 &amp; 0x0f800) &lt;&lt; (16 - 11))</div><div class='del'>-	  | ((as17 &amp; 0x00400) &gt;&gt; (10 - 2))</div><div class='del'>-	  | ((as17 &amp; 0x003ff) &lt;&lt; (1 + 2)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_21 (as21)</div><div class='del'>-     int as21;</div><div class='del'>-{</div><div class='del'>-  return ((  (as21 &amp; 0x100000) &gt;&gt; 20)</div><div class='del'>-	  | ((as21 &amp; 0x0ffe00) &gt;&gt; 8)</div><div class='del'>-	  | ((as21 &amp; 0x000180) &lt;&lt; 7)</div><div class='del'>-	  | ((as21 &amp; 0x00007c) &lt;&lt; 14)</div><div class='del'>-	  | ((as21 &amp; 0x000003) &lt;&lt; 12));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-re_assemble_22 (as22)</div><div class='del'>-     int as22;</div><div class='del'>-{</div><div class='del'>-  return ((  (as22 &amp; 0x200000) &gt;&gt; 21)</div><div class='del'>-	  | ((as22 &amp; 0x1f0000) &lt;&lt; (21 - 16))</div><div class='del'>-	  | ((as22 &amp; 0x00f800) &lt;&lt; (16 - 11))</div><div class='del'>-	  | ((as22 &amp; 0x000400) &gt;&gt; (10 - 2))</div><div class='del'>-	  | ((as22 &amp; 0x0003ff) &lt;&lt; (1 + 2)));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Handle field selectors for PA instructions.</div><div class='del'>-   The L and R (and LS, RS etc.) selectors are used in pairs to form a</div><div class='del'>-   full 32 bit address.  eg.</div><div class='del'>-</div><div class='del'>-   LDIL	L'start,%r1		; put left part into r1</div><div class='del'>-   LDW	R'start(%r1),%r2	; add r1 and right part to form address</div><div class='del'>-</div><div class='del'>-   This function returns sign extended values in all cases.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-static inline unsigned int</div><div class='del'>-hppa_field_adjust (value, addend, r_field)</div><div class='del'>-     unsigned int value;</div><div class='del'>-     int addend;</div><div class='del'>-     enum hppa_fsel r_field;</div><div class='del'>-{</div><div class='del'>-  unsigned int sym_val;</div><div class='del'>-</div><div class='del'>-  sym_val = value - addend;</div><div class='del'>-  switch (r_field)</div><div class='del'>-    {</div><div class='del'>-    case e_fsel:</div><div class='del'>-      /* F: No change.  */</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case e_lsel:</div><div class='del'>-      /* L:  Select top 21 bits.  */</div><div class='del'>-      value = value &gt;&gt; 11;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case e_rsel:</div><div class='del'>-      /* R:  Select bottom 11 bits.  */</div><div class='del'>-      value = value &amp; 0x7ff;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case e_lrsel:</div><div class='del'>-      /* LR:  L with rounding of the addend to nearest 8k.  */</div><div class='del'>-      value = sym_val + ((addend + 0x1000) &amp; -0x2000);</div><div class='del'>-      value = value &gt;&gt; 11;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case e_rrsel:</div><div class='del'>-      /* RR:  R with rounding of the addend to nearest 8k.</div><div class='del'>-	 We need to return a value such that 2048 * LR'x + RR'x == x</div><div class='del'>-	 ie. RR'x = s+a - (s + (((a + 0x1000) &amp; -0x2000) &amp; -0x800))</div><div class='del'>-	 .	  = s+a - ((s &amp; -0x800) + ((a + 0x1000) &amp; -0x2000))</div><div class='del'>-	 .	  = (s &amp; 0x7ff) + a - ((a + 0x1000) &amp; -0x2000)  */</div><div class='del'>-      value = (sym_val &amp; 0x7ff) + (((addend &amp; 0x1fff) ^ 0x1000) - 0x1000);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      abort();</div><div class='del'>-    }</div><div class='del'>-  return value;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Insert VALUE into INSN using R_FORMAT to determine exactly what</div><div class='del'>-   bits to change.  */</div><div class='del'>-</div><div class='del'>-static inline int</div><div class='del'>-hppa_rebuild_insn (insn, value, r_format)</div><div class='del'>-     int insn;</div><div class='del'>-     int value;</div><div class='del'>-     int r_format;</div><div class='del'>-{</div><div class='del'>-  switch (r_format)</div><div class='del'>-    {</div><div class='del'>-    case 11:</div><div class='del'>-      return (insn &amp; ~ 0x7ff) | low_sign_unext (value, 11);</div><div class='del'>-</div><div class='del'>-    case 12:</div><div class='del'>-      return (insn &amp; ~ 0x1ffd) | re_assemble_12 (value);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    case 10:</div><div class='del'>-      return (insn &amp; ~ 0x3ff1) | re_assemble_14 (value &amp; -8);</div><div class='del'>-</div><div class='del'>-    case -11:</div><div class='del'>-      return (insn &amp; ~ 0x3ff9) | re_assemble_14 (value &amp; -4);</div><div class='del'>-</div><div class='del'>-    case 14:</div><div class='del'>-      return (insn &amp; ~ 0x3fff) | re_assemble_14 (value);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    case -10:</div><div class='del'>-      return (insn &amp; ~ 0xfff1) | re_assemble_16 (value &amp; -8);</div><div class='del'>-</div><div class='del'>-    case -16:</div><div class='del'>-      return (insn &amp; ~ 0xfff9) | re_assemble_16 (value &amp; -4);</div><div class='del'>-</div><div class='del'>-    case 16:</div><div class='del'>-      return (insn &amp; ~ 0xffff) | re_assemble_16 (value);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    case 17:</div><div class='del'>-      return (insn &amp; ~ 0x1f1ffd) | re_assemble_17 (value);</div><div class='del'>-</div><div class='del'>-    case 21:</div><div class='del'>-      return (insn &amp; ~ 0x1fffff) | re_assemble_21 (value);</div><div class='del'>-</div><div class='del'>-    case 22:</div><div class='del'>-      return (insn &amp; ~ 0x3ff1ffd) | re_assemble_22 (value);</div><div class='del'>-</div><div class='del'>-    case 32:</div><div class='del'>-      return value;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      abort ();</div><div class='del'>-    }</div><div class='del'>-  return insn;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ====================================================================</div><div class='del'>-</div><div class='del'>-   End of functions from GNU BFD. </div><div class='del'>-</div><div class='del'>-   ==================================================================== */</div><div class='del'>-</div><div class='del'>-/* This is where we get the opportunity to create any extra dynamic</div><div class='del'>-   sections we might need.  In our case we do not need a GOT because</div><div class='del'>-   our code is not PIC, but we do need to create a stub section.</div><div class='del'>-</div><div class='del'>-   This is significantly less complex than what we do for shared</div><div class='del'>-   libraries because, obviously, modules are not shared.  Also we have</div><div class='del'>-   no issues related to symbol visibility, lazy linking, etc.</div><div class='del'>-   The kernels dp is fixed (at symbol data_start), and we can fix up any</div><div class='del'>-   DPREL refs in the module to use that same dp value.</div><div class='del'>-   All PCREL17F refs result in a stub with the following format:</div><div class='del'>-</div><div class='del'>-  	ldil L'func_addr,%r1</div><div class='del'>-        be,n R'func_addr(%sr4,%r1)</div><div class='del'>-</div><div class='del'>-  Note, all PCREL17F get a stub, regardless of whether they are</div><div class='del'>-  local or external.  With local ones, and external ones to other</div><div class='del'>-  modules, there is a good chance we could manage without the stub.</div><div class='del'>-  I'll leave that for a future optimisation.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define LDIL_R1		0x20200000	/* ldil  L'XXX,%r1		*/</div><div class='del'>-#define BE_N_SR4_R1	0xe0202002	/* be,n  R'XXX(%sr4,%r1)	*/</div><div class='del'>-</div><div class='del'>-#define STUB_SIZE 8</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  hppa_file_t *hfile = (hppa_file_t *)f;</div><div class='del'>-  int i, n;</div><div class='del'>-  int stub_offset = 0;</div><div class='del'>-</div><div class='del'>-  /* Create stub section.</div><div class='del'>-   * XXX set flags, see obj_ia64.c</div><div class='del'>-   */</div><div class='del'>-  hfile-&gt;stub = obj_create_alloced_section(f, ".stub", STUB_SIZE, 0);</div><div class='del'>-</div><div class='del'>-  /* Actually this is a lot like check_relocs() in a BFD backend.  We</div><div class='del'>-     walk all sections and all their relocations and look for ones</div><div class='del'>-     that need special treatment. */</div><div class='del'>-  n = hfile-&gt;root.header.e_shnum;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-      Elf32_Rela *rel, *relend;</div><div class='del'>-      Elf32_Sym *symtab;</div><div class='del'>-      char const *strtab;</div><div class='del'>-</div><div class='del'>-      relsec = hfile-&gt;root.sections[i];</div><div class='del'>-      if (relsec-&gt;header.sh_type != SHT_RELA)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      symsec = hfile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-      strsec = hfile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (Elf32_Rela *)relsec-&gt;contents;</div><div class='del'>-      relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf32_Rela));</div><div class='del'>-      symtab = (Elf32_Sym *)symsec-&gt;contents;</div><div class='del'>-      strtab = (char const *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; rel++)</div><div class='del'>-	{</div><div class='del'>-	  int need_stub = 0;</div><div class='del'>-</div><div class='del'>-	  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-	    {</div><div class='del'>-	    default:</div><div class='del'>-	      continue;</div><div class='del'>-</div><div class='del'>-	    case R_PARISC_PCREL17F:</div><div class='del'>-	      need_stub = 1;</div><div class='del'>-	      break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	  if (need_stub)</div><div class='del'>-	    {</div><div class='del'>-	      Elf32_Sym *extsym;</div><div class='del'>-	      hppa_symbol_t *hsym;</div><div class='del'>-	      char const *name;</div><div class='del'>-	      int local;</div><div class='del'>-	      unsigned long symndx;</div><div class='del'>-</div><div class='del'>-	      symndx = ELF32_R_SYM(rel-&gt;r_info);</div><div class='del'>-	      extsym = symtab + symndx;</div><div class='del'>-	      if (ELF32_ST_BIND(extsym-&gt;st_info) == STB_LOCAL)</div><div class='del'>-		hsym = (hppa_symbol_t *) f-&gt;local_symtab[symndx];</div><div class='del'>-	      else</div><div class='del'>-		{</div><div class='del'>-		  if (extsym-&gt;st_name)</div><div class='del'>-		    name = strtab + extsym-&gt;st_name;</div><div class='del'>-		  else</div><div class='del'>-		    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-		  hsym = (hppa_symbol_t *)obj_find_symbol(f, name);</div><div class='del'>-		}</div><div class='del'>-	      local = hsym-&gt;root.secidx &lt;= SHN_HIRESERVE;</div><div class='del'>-</div><div class='del'>-	      if (need_stub)</div><div class='del'>-		{</div><div class='del'>-		  hppa_stub_t *stub;</div><div class='del'>-</div><div class='del'>-		  if (hsym-&gt;stub == NULL)</div><div class='del'>-		    {</div><div class='del'>-		      stub = (hppa_stub_t *) xmalloc(sizeof(hppa_stub_t));</div><div class='del'>-		      stub-&gt;offset = stub_offset;</div><div class='del'>-		      stub-&gt;reloc_done = 0;</div><div class='del'>-		      hsym-&gt;stub = stub;</div><div class='del'>-		      stub_offset += STUB_SIZE;</div><div class='del'>-		      need_stub = 0;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-  if (stub_offset)</div><div class='del'>-    {</div><div class='del'>-      hfile-&gt;stub-&gt;contents = xmalloc(stub_offset);</div><div class='del'>-      hfile-&gt;stub-&gt;header.sh_size = stub_offset;</div><div class='del'>-    }</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation(struct obj_file *f,</div><div class='del'>-		      struct obj_section *targsec,</div><div class='del'>-		      struct obj_section *symsec,</div><div class='del'>-		      struct obj_symbol *sym,</div><div class='del'>-		      Elf32_Rela *rel,</div><div class='del'>-		      Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  hppa_file_t *hfile = (hppa_file_t *) f;</div><div class='del'>-  hppa_symbol_t *hsym  = (hppa_symbol_t *) sym;</div><div class='del'>-</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = (targsec-&gt;header.sh_addr + rel-&gt;r_offset) &amp; ~0x03;</div><div class='del'>-  Elf32_Addr dp = hfile-&gt;dp;</div><div class='del'>-  Elf32_Word r_info = ELF32_R_TYPE(rel-&gt;r_info);</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-  enum hppa_fsel fsel = e_fsel;	/* Avoid compiler warning */</div><div class='del'>-  unsigned int r_format;</div><div class='del'>-</div><div class='del'>-  /* Fix up the value, and determine whether we can handle this</div><div class='del'>-     relocation. */</div><div class='del'>-  switch (r_info)</div><div class='del'>-  {</div><div class='del'>-  case R_PARISC_PLABEL32:</div><div class='del'>-  case R_PARISC_DIR32:</div><div class='del'>-  case R_PARISC_DIR21L:</div><div class='del'>-  case R_PARISC_DIR14R:</div><div class='del'>-    /* Easy. */</div><div class='del'>-    break;</div><div class='del'>-</div><div class='del'>-  case R_PARISC_DPREL21L:</div><div class='del'>-  case R_PARISC_DPREL14R:</div><div class='del'>-    v -= dp;</div><div class='del'>-    break;</div><div class='del'>-</div><div class='del'>-  case R_PARISC_PCREL17F:</div><div class='del'>-    /* Find an import stub. */</div><div class='del'>-    assert(hsym-&gt;stub != NULL);</div><div class='del'>-    assert(hfile-&gt;stub != NULL);</div><div class='del'>-    /* XXX Optimise.  We may not need a stub for short branches */</div><div class='del'>-    if (!hsym-&gt;stub-&gt;reloc_done) {</div><div class='del'>-      /* Need to create the .stub entry */</div><div class='del'>-      Elf32_Addr *pstub, stubv;</div><div class='del'>-</div><div class='del'>-      pstub = (Elf32_Addr *)(hfile-&gt;stub-&gt;contents + hsym-&gt;stub-&gt;offset);</div><div class='del'>-      pstub[0] = LDIL_R1;</div><div class='del'>-      pstub[1] = BE_N_SR4_R1;</div><div class='del'>-      stubv = hppa_field_adjust(v, rel-&gt;r_addend, e_lrsel);</div><div class='del'>-      pstub[0] = hppa_rebuild_insn(pstub[0], stubv, 21);</div><div class='del'>-      stubv = hppa_field_adjust(v, rel-&gt;r_addend, e_rrsel);</div><div class='del'>-      stubv &gt;&gt;= 2;	/* Branch; divide by 4 */</div><div class='del'>-      pstub[1] = hppa_rebuild_insn(pstub[1], stubv, 17);</div><div class='del'>-      hsym-&gt;stub-&gt;reloc_done = 1;</div><div class='del'>-    }</div><div class='del'>-    v = hsym-&gt;stub-&gt;offset + hfile-&gt;stub-&gt;header.sh_addr;</div><div class='del'>-    break;</div><div class='del'>-</div><div class='del'>-  default:</div><div class='del'>-    return obj_reloc_unhandled;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* Find the field selector. */</div><div class='del'>-  switch (r_info)</div><div class='del'>-    {</div><div class='del'>-    case R_PARISC_DIR32:</div><div class='del'>-    case R_PARISC_PLABEL32:</div><div class='del'>-    case R_PARISC_PCREL17F:</div><div class='del'>-      fsel = e_fsel;</div><div class='del'>-      break;</div><div class='del'>-	</div><div class='del'>-    case R_PARISC_DPREL21L:</div><div class='del'>-    case R_PARISC_DIR21L:</div><div class='del'>-      fsel = e_lrsel;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PARISC_DPREL14R:</div><div class='del'>-    case R_PARISC_DIR14R:</div><div class='del'>-      fsel = e_rrsel;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  v = hppa_field_adjust(v, rel-&gt;r_addend, fsel);</div><div class='del'>-</div><div class='del'>-  switch (r_info)</div><div class='del'>-    {</div><div class='del'>-    case R_PARISC_PCREL17F:</div><div class='del'>-    case R_PARISC_PCREL17R:</div><div class='del'>-    case R_PARISC_PCREL22F:</div><div class='del'>-      v = v - dot - 8;</div><div class='del'>-    case R_PARISC_DIR17F:</div><div class='del'>-    case R_PARISC_DIR17R:</div><div class='del'>-      /* This is a branch.  Divide the offset by four. */</div><div class='del'>-      v &gt;&gt;= 2;</div><div class='del'>-      break;</div><div class='del'>-    default:</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* Find the format. */</div><div class='del'>-  switch (r_info)</div><div class='del'>-    {</div><div class='del'>-    case R_PARISC_DIR32:</div><div class='del'>-    case R_PARISC_PLABEL32:</div><div class='del'>-      r_format = 32;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PARISC_DPREL21L:</div><div class='del'>-    case R_PARISC_DIR21L:</div><div class='del'>-      r_format = 21;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PARISC_PCREL17F:</div><div class='del'>-      r_format = 17;</div><div class='del'>-      break;</div><div class='del'>-	</div><div class='del'>-    case R_PARISC_DPREL14R:</div><div class='del'>-    case R_PARISC_DIR14R:</div><div class='del'>-      r_format = 14;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      abort();</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  *loc = hppa_rebuild_insn(*loc, v, r_format);</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *f, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  struct module_symbol *s;</div><div class='del'>-  int i;</div><div class='del'>-  hppa_file_t *hfile = (hppa_file_t *)f;</div><div class='del'>-</div><div class='del'>-  /* Initialise dp to the kernels dp (symbol data_start)</div><div class='del'>-   */</div><div class='del'>-  for (i = 0, s = ksyms; i &lt; nksyms; i++, s++)</div><div class='del'>-    if (!strcmp((char *)s-&gt;name, "data_start"))</div><div class='del'>-      break;</div><div class='del'>-  if (i &gt;= nksyms) {</div><div class='del'>-    error("Cannot initialise dp, 'data_start' not found\n");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  hfile-&gt;dp = s-&gt;value;</div><div class='del'>-  </div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_hppa64.c b/mdk-stage1/insmod-modutils/obj/obj_hppa64.c<br/>deleted file mode 100644<br/>index fe32911ff..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_hppa64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_hppa64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,686 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * hppa parisc64 specific support for Elf loading and relocation.</div><div class='del'>- * Copyright 2000 Richard Hirst &lt;rhirst@linuxcare.com&gt;, Linuxcare Inc.</div><div class='del'>- *</div><div class='del'>- * Based on ia64 specific support which was</div><div class='del'>- *   Copyright 2000 Mike Stephens &lt;mike.stephens@intel.com&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef FALSE</div><div class='del'>-#define FALSE 0</div><div class='del'>-#endif</div><div class='del'>-#ifndef TRUE</div><div class='del'>-#define TRUE  ~FALSE</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-typedef struct _hppa64_opd_t</div><div class='del'>-{</div><div class='del'>-    int offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} hppa64_opd_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa64_stub_t</div><div class='del'>-{</div><div class='del'>-    struct _hppa64_stub_t *next;</div><div class='del'>-    Elf64_Addr addend;</div><div class='del'>-    int offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} hppa64_stub_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa64_got_t</div><div class='del'>-{</div><div class='del'>-    struct _hppa64_got_t *next;</div><div class='del'>-    Elf64_Addr addend;</div><div class='del'>-    int offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} hppa64_got_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa64_symbol_t</div><div class='del'>-{</div><div class='del'>-    struct obj_symbol root;</div><div class='del'>-    hppa64_got_t *gotent;</div><div class='del'>-    hppa64_opd_t *opdent;</div><div class='del'>-    hppa64_stub_t *stubent;</div><div class='del'>-} hppa64_symbol_t;</div><div class='del'>-</div><div class='del'>-typedef struct _hppa64_file_t</div><div class='del'>-{</div><div class='del'>-    struct obj_file root;</div><div class='del'>-    struct obj_section *got;</div><div class='del'>-    struct obj_section *opd;</div><div class='del'>-    struct obj_section *stub;</div><div class='del'>-    Elf64_Addr gp;</div><div class='del'>-    Elf64_Addr text;</div><div class='del'>-    Elf64_Addr data;</div><div class='del'>-    Elf64_Addr bss;</div><div class='del'>-} hppa64_file_t;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * XXX This stub assumes it can reach the .got entry with a +/- 8K offset</div><div class='del'>- * from dp.  Perhaps we should use a .plt for these entries to give a</div><div class='del'>- * greater chance of that being true.</div><div class='del'>- *</div><div class='del'>- *     53 7b 00 00     ldd 0(dp),dp</div><div class='del'>- *     			R_PARISC_LTOFF14R &lt;.got entry offset from dp&gt;</div><div class='del'>- *     53 61 00 20     ldd 10(dp),r1</div><div class='del'>- *     e8 20 d0 00     bve (r1)</div><div class='del'>- *     53 7b 00 30     ldd 18(dp),dp</div><div class='del'>- *</div><div class='del'>- * We need a different stub for millicode calls, which doesn't screw</div><div class='del'>- * dp:</div><div class='del'>- *</div><div class='del'>- *     53 61 00 00     ldd 0(dp),r1</div><div class='del'>- *     			R_PARISC_LTOFF14R &lt;.got entry offset from dp&gt;</div><div class='del'>- *     50 21 00 20     ldd 10(r1),r1</div><div class='del'>- *     e8 20 d0 00     bve (r1)</div><div class='del'>- *     08 00 02 40     nop</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* NOTE: to keep the code cleaner we make all stubs the same size.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define SIZEOF_STUB	16</div><div class='del'>-</div><div class='del'>-unsigned char hppa64_stub_extern[] =</div><div class='del'>-{</div><div class='del'>-       0x53, 0x7b, 0x00, 0x00,</div><div class='del'>-       0x53, 0x61, 0x00, 0x20,</div><div class='del'>-       0xe8, 0x20, 0xd0, 0x00,</div><div class='del'>-       0x53, 0x7b, 0x00, 0x30,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-unsigned char hppa64_stub_millicode[] =</div><div class='del'>-{</div><div class='del'>-       0x53, 0x61, 0x00, 0x00,</div><div class='del'>-       0x50, 0x21, 0x00, 0x20,</div><div class='del'>-       0xe8, 0x20, 0xd0, 0x00,</div><div class='del'>-       0x08, 0x00, 0x02, 0x40,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-patch_14r(Elf64_Xword v64, Elf64_Word *p)</div><div class='del'>-{</div><div class='del'>-	Elf64_Word i = *p;</div><div class='del'>-	Elf64_Word v = (Elf64_Word)v64;</div><div class='del'>-</div><div class='del'>-	if (v &amp; 0x80000000)</div><div class='del'>-		v |= ~0x7ff;</div><div class='del'>-	else</div><div class='del'>-		v &amp;= 0x7ff;</div><div class='del'>-	i &amp;= ~ 0x3fff;</div><div class='del'>-	i |=    (v &amp; 0x1fff) &lt;&lt; 1 |</div><div class='del'>-		(v &amp; 0x2000) &gt;&gt; 13;</div><div class='del'>-	*p = i;</div><div class='del'>-</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-patch_21l(Elf64_Xword v64, Elf64_Word *p)</div><div class='del'>-{</div><div class='del'>-	Elf64_Word i = *p;</div><div class='del'>-	Elf64_Word v = (Elf64_Word)v64;</div><div class='del'>-</div><div class='del'>-	v &amp;= 0xfffff800;</div><div class='del'>-	if (v &amp; 0x80000000)</div><div class='del'>-		v += 0x800;</div><div class='del'>-	i &amp;= ~ 0x1fffff;</div><div class='del'>-	i |=    (v &amp; 0x80000000) &gt;&gt; 31 |</div><div class='del'>-		(v &amp; 0x7ff00000) &gt;&gt; 19 |</div><div class='del'>-		(v &amp; 0x000c0000) &gt;&gt; 4 |</div><div class='del'>-		(v &amp; 0x0003e000) &lt;&lt; 3 |</div><div class='del'>-		(v &amp; 0x00001800) &lt;&lt; 1;</div><div class='del'>-	*p = i;</div><div class='del'>-</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* All 14 bits this time...  This is used to patch the .got offset in</div><div class='del'>- * a stub for PCREL22F.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-patch_14r2(Elf64_Xword v64, Elf64_Word *p)</div><div class='del'>-{</div><div class='del'>-	Elf64_Word i = *p;</div><div class='del'>-	Elf64_Word v = (Elf64_Word)v64;</div><div class='del'>-</div><div class='del'>-	if ((Elf64_Sxword)v64 &gt; 0x1fffL ||</div><div class='del'>-			(Elf64_Sxword)v64 &lt; -0x2000L)</div><div class='del'>-		return obj_reloc_overflow;</div><div class='del'>-	i &amp;= ~ 0x3fff;</div><div class='del'>-	i |=    (v &amp; 0x2000) &gt;&gt; 13 |</div><div class='del'>-		(v &amp; 0x1fff) &lt;&lt; 1;</div><div class='del'>-	*p = i;</div><div class='del'>-</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-patch_22f(Elf64_Xword v64, Elf64_Word *p)</div><div class='del'>-{</div><div class='del'>-	Elf64_Word i = *p;</div><div class='del'>-	Elf64_Word v = (Elf64_Word)v64;</div><div class='del'>-</div><div class='del'>-	if ((Elf64_Sxword)v64 &gt; 0x800000-1 ||</div><div class='del'>-	    (Elf64_Sxword)v64 &lt; -0x800000)</div><div class='del'>-		return obj_reloc_overflow;</div><div class='del'>-</div><div class='del'>-	i &amp;= ~ 0x03ff1ffd;</div><div class='del'>-	i |=    (v &amp; 0x00800000) &gt;&gt; 23 |</div><div class='del'>-		(v &amp; 0x007c0000) &lt;&lt; 3 |</div><div class='del'>-		(v &amp; 0x0003e000) &lt;&lt; 3 |</div><div class='del'>-		(v &amp; 0x00001000) &gt;&gt; 10 |</div><div class='del'>-		(v &amp; 0x00000ffc) &lt;&lt; 1;</div><div class='del'>-	*p = i;</div><div class='del'>-</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_hppa64_create_alloced_section (struct obj_file *f, const char *name,</div><div class='del'>-    unsigned long align, unsigned long size, unsigned long sh_flags)</div><div class='del'>-{</div><div class='del'>-    int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-    struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-    f-&gt;sections = xrealloc(f-&gt;sections, (newidx+1) * sizeof(sec));</div><div class='del'>-    f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-    memset(sec, 0, sizeof(*sec));</div><div class='del'>-    sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-    sec-&gt;header.sh_flags = sh_flags;</div><div class='del'>-    sec-&gt;header.sh_size = size;</div><div class='del'>-    sec-&gt;header.sh_addralign = align;</div><div class='del'>-    sec-&gt;name = name;</div><div class='del'>-    sec-&gt;idx = newidx;</div><div class='del'>-    if (size)</div><div class='del'>-	sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-    obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-    return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *f;</div><div class='del'>-    f = xmalloc(sizeof(*f));</div><div class='del'>-    f-&gt;got = NULL;</div><div class='del'>-    f-&gt;opd = NULL;</div><div class='del'>-    f-&gt;stub = NULL;</div><div class='del'>-    return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-    return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-    hppa64_symbol_t *sym;</div><div class='del'>-    sym = xmalloc(sizeof(*sym));</div><div class='del'>-    sym-&gt;gotent = NULL;</div><div class='del'>-    sym-&gt;opdent = NULL;</div><div class='del'>-    sym-&gt;stubent = NULL;</div><div class='del'>-    return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* This may not be needed, but does no harm (copied from ia64).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    switch (sec-&gt;header.sh_type)</div><div class='del'>-    {</div><div class='del'>-    case SHT_PARISC_EXT :</div><div class='del'>-	sec-&gt;contents = NULL;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SHT_PARISC_UNWIND :</div><div class='del'>-	if (sec-&gt;header.sh_size &gt; 0)</div><div class='del'>-	{</div><div class='del'>-	    sec-&gt;contents = xmalloc(sec-&gt;header.sh_size);</div><div class='del'>-	    gzf_lseek(fp, sec-&gt;header.sh_offset, SEEK_SET);</div><div class='del'>-	    if (gzf_read(fp, sec-&gt;contents, sec-&gt;header.sh_size) != sec-&gt;header.sh_size)</div><div class='del'>-	    {</div><div class='del'>-		error("error reading ELF section data: %m");</div><div class='del'>-		return -1;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-	    sec-&gt;contents = NULL;</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-      error("Unknown section header type: %08x", sec-&gt;header.sh_type);</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *hfile = (hppa64_file_t *)f;</div><div class='del'>-    int i;</div><div class='del'>-    int n;</div><div class='del'>-    int got_offset = 0;</div><div class='del'>-    int opd_offset = 64;</div><div class='del'>-    int stub_offset = 0;</div><div class='del'>-</div><div class='del'>-    n = hfile-&gt;root.header.e_shnum;</div><div class='del'>-    for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-	struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-	Elf64_Rela *rel, *relend;</div><div class='del'>-	Elf64_Sym *symtab;</div><div class='del'>-	const char *strtab;</div><div class='del'>-</div><div class='del'>-	relsec = hfile-&gt;root.sections[i];</div><div class='del'>-	if (relsec-&gt;header.sh_type != SHT_RELA)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	symsec = hfile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-	strsec = hfile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-	rel = (Elf64_Rela *)relsec-&gt;contents;</div><div class='del'>-	relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf64_Rela));</div><div class='del'>-	symtab = (Elf64_Sym *)symsec-&gt;contents;</div><div class='del'>-	strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-	for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	    int need_got = FALSE;</div><div class='del'>-	    int need_opd = FALSE;</div><div class='del'>-	    int need_stub = FALSE;</div><div class='del'>-</div><div class='del'>-	    switch (ELF64_R_TYPE(rel-&gt;r_info))</div><div class='del'>-	    {</div><div class='del'>-	    default:</div><div class='del'>-		{</div><div class='del'>-		    unsigned r_info = ELF64_R_TYPE(rel-&gt;r_info);</div><div class='del'>-		    printf("r_info 0x%x not handled\n", r_info);</div><div class='del'>-		}</div><div class='del'>-		continue;</div><div class='del'>-	    case R_PARISC_LTOFF14R:</div><div class='del'>-	    case R_PARISC_LTOFF21L:</div><div class='del'>-	        /* These are simple indirect references to symbols through the</div><div class='del'>-                 * DLT.  We need to create a DLT entry for any symbols which</div><div class='del'>-                 * appears in a DLTIND relocation.</div><div class='del'>-		 */</div><div class='del'>-		need_got = TRUE;</div><div class='del'>-		break;</div><div class='del'>-	    case R_PARISC_PCREL22F:</div><div class='del'>-		/* These are function calls.  Depending on their precise</div><div class='del'>-		 * target we may need to make a stub for them.  The stub</div><div class='del'>-		 * uses the dlt, so we need to create dlt entries for</div><div class='del'>-		 * these symbols too.</div><div class='del'>-		 */</div><div class='del'>-		need_got = TRUE;</div><div class='del'>-		need_stub = TRUE;</div><div class='del'>-		break;</div><div class='del'>-	    case R_PARISC_DIR64:</div><div class='del'>-		break;</div><div class='del'>-	    case R_PARISC_FPTR64:</div><div class='del'>-		/* This is a simple OPD entry (only created for local symbols,</div><div class='del'>-		 * see below).</div><div class='del'>-		 */</div><div class='del'>-		need_opd = TRUE;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (need_got || need_opd || need_stub)</div><div class='del'>-	    {</div><div class='del'>-		Elf64_Sym     *extsym;</div><div class='del'>-		hppa64_symbol_t *isym;</div><div class='del'>-		const char    *name;</div><div class='del'>-		int            local;</div><div class='del'>-		unsigned long  symndx;</div><div class='del'>-</div><div class='del'>-		symndx = ELF64_R_SYM(rel-&gt;r_info);</div><div class='del'>-		extsym = &amp;symtab[symndx];</div><div class='del'>-		if (ELF64_ST_BIND(extsym-&gt;st_info) == STB_LOCAL)</div><div class='del'>-		{</div><div class='del'>-		    isym = (hppa64_symbol_t *) f-&gt;local_symtab[symndx];</div><div class='del'>-		}</div><div class='del'>-		else</div><div class='del'>-		{</div><div class='del'>-		    if (extsym-&gt;st_name)</div><div class='del'>-			name = strtab + extsym-&gt;st_name;</div><div class='del'>-		    else</div><div class='del'>-			name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-		    isym = (hppa64_symbol_t *)obj_find_symbol(f, name);</div><div class='del'>-		}</div><div class='del'>-		local = isym-&gt;root.secidx &lt;= SHN_HIRESERVE;</div><div class='del'>-</div><div class='del'>-		if (need_stub)</div><div class='del'>-		{</div><div class='del'>-		    hppa64_stub_t *stub;</div><div class='del'>-</div><div class='del'>-		    for (stub = isym-&gt;stubent; stub != NULL; stub = stub-&gt;next)</div><div class='del'>-			if (stub-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-			    break;</div><div class='del'>-		    if (stub == NULL)</div><div class='del'>-		    {</div><div class='del'>-			stub = (hppa64_stub_t *) xmalloc(sizeof(hppa64_stub_t));</div><div class='del'>-			stub-&gt;next = isym-&gt;stubent;</div><div class='del'>-			stub-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-			stub-&gt;offset = stub_offset;</div><div class='del'>-			stub-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;stubent = stub;</div><div class='del'>-			{</div><div class='del'>-			    stub_offset += SIZEOF_STUB;</div><div class='del'>-			}</div><div class='del'>-			need_stub = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		if (need_got)</div><div class='del'>-		{</div><div class='del'>-		    hppa64_got_t *got;</div><div class='del'>-</div><div class='del'>-		    for (got = isym-&gt;gotent; got != NULL; got = got-&gt;next)</div><div class='del'>-			if (got-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-			    break;</div><div class='del'>-		    if (got == NULL)</div><div class='del'>-		    {</div><div class='del'>-			got = (hppa64_got_t *) xmalloc(sizeof(hppa64_got_t));</div><div class='del'>-			got-&gt;next = isym-&gt;gotent;</div><div class='del'>-			got-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-			got-&gt;offset = got_offset;</div><div class='del'>-			got-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;gotent = got;</div><div class='del'>-			got_offset += 8;</div><div class='del'>-			need_got = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		if (need_opd &amp;&amp; local)</div><div class='del'>-		{</div><div class='del'>-		    hppa64_opd_t *opd;</div><div class='del'>-</div><div class='del'>-		    if (isym-&gt;opdent == NULL)</div><div class='del'>-		    {</div><div class='del'>-			opd = (hppa64_opd_t *) xmalloc(sizeof(hppa64_opd_t));</div><div class='del'>-			opd-&gt;offset = opd_offset;</div><div class='del'>-			opd-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;opdent = opd;</div><div class='del'>-			opd_offset += 32;</div><div class='del'>-			need_opd = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    hfile-&gt;got = obj_hppa64_create_alloced_section(f, ".got", 8, got_offset,</div><div class='del'>-	(SHF_ALLOC | SHF_WRITE | SHF_PARISC_SHORT));</div><div class='del'>-    assert(hfile-&gt;got != NULL);</div><div class='del'>-</div><div class='del'>-    hfile-&gt;opd = obj_hppa64_create_alloced_section(f, ".opd", 16, opd_offset,</div><div class='del'>-	(SHF_ALLOC | SHF_WRITE | SHF_PARISC_SHORT));</div><div class='del'>-    assert(hfile-&gt;opd != NULL);</div><div class='del'>-</div><div class='del'>-    if (stub_offset &gt; 0)</div><div class='del'>-    {</div><div class='del'>-	hfile-&gt;stub = obj_hppa64_create_alloced_section(f, ".stub", 16,</div><div class='del'>-	    stub_offset, (SHF_ALLOC | SHF_EXECINSTR | SHF_PARISC_SHORT));</div><div class='del'>-	assert(hfile-&gt;stub != NULL);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* This is a small simple version which seems to work fine.  ia64 has</div><div class='del'>- * a much more complex algorithm.  We point dp at the end of the .got,</div><div class='del'>- * which is the start of the .opd.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf64_Addr base)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *hfile = (hppa64_file_t *)f;</div><div class='del'>-    int        n = f-&gt;header.e_shnum;</div><div class='del'>-    int        i;</div><div class='del'>-</div><div class='del'>-    f-&gt;baseaddr = base;</div><div class='del'>-    for (i = 0; i &lt; n; ++i)</div><div class='del'>-	f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-</div><div class='del'>-    /* Pick a sensible value for gp */</div><div class='del'>-    hfile-&gt;gp = hfile-&gt;got-&gt;header.sh_addr + hfile-&gt;got-&gt;header.sh_size;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation(struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf64_Rela *rel,</div><div class='del'>-		       Elf64_Addr v)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *hfile = (hppa64_file_t *) f;</div><div class='del'>-    hppa64_symbol_t *isym  = (hppa64_symbol_t *) sym;</div><div class='del'>-</div><div class='del'>-    Elf64_Word  *loc = (Elf64_Word *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-    Elf64_Addr  dot = (targsec-&gt;header.sh_addr + rel-&gt;r_offset) &amp; ~0x03;</div><div class='del'>-</div><div class='del'>-    Elf64_Addr  got = hfile-&gt;got-&gt;header.sh_addr;</div><div class='del'>-    Elf64_Addr  gp = hfile-&gt;gp;</div><div class='del'>-</div><div class='del'>-    Elf64_Xword r_info = ELF64_R_TYPE(rel-&gt;r_info);</div><div class='del'>-</div><div class='del'>-    enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-    switch (r_info)</div><div class='del'>-    {</div><div class='del'>-    default:</div><div class='del'>-	ret = obj_reloc_unhandled;</div><div class='del'>-	break;</div><div class='del'>-    case R_PARISC_LTOFF14R:</div><div class='del'>-    case R_PARISC_LTOFF21L:</div><div class='del'>-	{</div><div class='del'>-	    hppa64_got_t *ge;</div><div class='del'>-</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    for (ge = isym-&gt;gotent; ge != NULL &amp;&amp; ge-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		ge = ge-&gt;next;</div><div class='del'>-	    assert(ge != NULL);</div><div class='del'>-	    if (!ge-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		ge-&gt;reloc_done = TRUE;</div><div class='del'>-		*(Elf64_Addr *)(hfile-&gt;got-&gt;contents + ge-&gt;offset) = v;</div><div class='del'>-	    }</div><div class='del'>-	    v = got + ge-&gt;offset - gp;</div><div class='del'>-	    if (r_info == R_PARISC_LTOFF14R)</div><div class='del'>-		ret = patch_14r(v, loc);</div><div class='del'>-	    else</div><div class='del'>-		ret = patch_21l(v, loc);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case R_PARISC_PCREL22F:</div><div class='del'>-	{</div><div class='del'>-	    hppa64_got_t *ge;</div><div class='del'>-</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    for (ge = isym-&gt;gotent; ge != NULL &amp;&amp; ge-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		ge = ge-&gt;next;</div><div class='del'>-	    assert(ge != NULL);</div><div class='del'>-	    if (!ge-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		ge-&gt;reloc_done = TRUE;</div><div class='del'>-		*(Elf64_Addr *)(hfile-&gt;got-&gt;contents + ge-&gt;offset) = v;</div><div class='del'>-	    }</div><div class='del'>-	    if ((isym-&gt;root.secidx &gt; SHN_HIRESERVE) ||</div><div class='del'>-		((Elf64_Sxword) (v - dot - 8) &gt; 0x800000-1) ||</div><div class='del'>-		((Elf64_Sxword) (v - dot - 8) &lt; -0x800000))</div><div class='del'>-	    {</div><div class='del'>-		hppa64_stub_t *se;</div><div class='del'>-</div><div class='del'>-		for (se = isym-&gt;stubent; se != NULL &amp;&amp; se-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		    se = se-&gt;next;</div><div class='del'>-		assert(se != NULL);</div><div class='del'>-		if (!se-&gt;reloc_done)</div><div class='del'>-		{</div><div class='del'>-		    /* This requires that we can get from dp to the entry in +/- 8K,</div><div class='del'>-		     * or +/- 1000 entries.  patch_14r2() will check that.</div><div class='del'>-		     * Only need these dlt entries for calls to external/far</div><div class='del'>-		     * functions, so should probably put them in a seperate section</div><div class='del'>-		     * before dlt and point dp at the section.  Change to that</div><div class='del'>-		     * scheme if we hit problems with big modules.</div><div class='del'>-		     */</div><div class='del'>-		    unsigned char *stub;</div><div class='del'>-</div><div class='del'>-		    if (!strncmp(isym-&gt;root.name, "$$", 2))</div><div class='del'>-			stub = hppa64_stub_millicode;</div><div class='del'>-		    else</div><div class='del'>-			stub = hppa64_stub_extern;</div><div class='del'>-		    se-&gt;reloc_done = TRUE;</div><div class='del'>-		    memcpy((Elf64_Addr *)(hfile-&gt;stub-&gt;contents + se-&gt;offset),</div><div class='del'>-	    			stub, SIZEOF_STUB);</div><div class='del'>-		    v = (Elf64_Addr)(hfile-&gt;got-&gt;header.sh_addr + ge-&gt;offset) - gp;</div><div class='del'>-		    ret = patch_14r2(v, (Elf64_Word *)(hfile-&gt;stub-&gt;contents + se-&gt;offset));</div><div class='del'>-		}</div><div class='del'>-		v = hfile-&gt;stub-&gt;header.sh_addr + se-&gt;offset;</div><div class='del'>-	    }</div><div class='del'>-	    v = v - dot - 8;</div><div class='del'>-	    if (ret == obj_reloc_ok)</div><div class='del'>-	        ret = patch_22f(v, loc);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case R_PARISC_DIR64:</div><div class='del'>-	{</div><div class='del'>-	    loc[0] = v &gt;&gt; 32;</div><div class='del'>-	    loc[1] = v;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case R_PARISC_FPTR64:</div><div class='del'>-	{</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    if (isym-&gt;root.secidx &lt;= SHN_HIRESERVE) /* local */</div><div class='del'>-	    {</div><div class='del'>-		assert(isym-&gt;opdent != NULL);</div><div class='del'>-		if (!isym-&gt;opdent-&gt;reloc_done)</div><div class='del'>-		{</div><div class='del'>-		    isym-&gt;opdent-&gt;reloc_done = TRUE;</div><div class='del'>-		    *(Elf64_Addr *)(hfile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset + 16) = v;</div><div class='del'>-		    *(Elf64_Addr *)(hfile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset + 24) = gp;</div><div class='del'>-		}</div><div class='del'>-		v = hfile-&gt;opd-&gt;header.sh_addr + isym-&gt;opdent-&gt;offset;</div><div class='del'>-	    }</div><div class='del'>-	    loc[0] = v &gt;&gt; 32;</div><div class='del'>-	    loc[1] = v;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *hfile = (hppa64_file_t *)f;</div><div class='del'>-    Elf64_Addr *opd = (Elf64_Addr *)(hfile-&gt;opd-&gt;contents);</div><div class='del'>-</div><div class='del'>-    opd[0] = 0;</div><div class='del'>-    opd[1] = 0;</div><div class='del'>-    if ((opd[2] = mod-&gt;init) != 0)</div><div class='del'>-    {</div><div class='del'>-	opd[3] = hfile-&gt;gp;</div><div class='del'>-	mod-&gt;init = hfile-&gt;opd-&gt;header.sh_addr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    opd[4] = 0;</div><div class='del'>-    opd[5] = 0;</div><div class='del'>-    if ((opd[6] = mod-&gt;cleanup) != 0)</div><div class='del'>-    {</div><div class='del'>-	opd[7] = hfile-&gt;gp;</div><div class='del'>-	mod-&gt;cleanup = hfile-&gt;opd-&gt;header.sh_addr + 32;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* XXX Is this relevant to parisc? */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *f, struct obj_section *archdata_sec)</div><div class='del'>-{</div><div class='del'>-    hppa64_file_t *hfile = (hppa64_file_t *)f;</div><div class='del'>-    struct archdata {</div><div class='del'>-	unsigned tgt_long unw_table;</div><div class='del'>-	unsigned tgt_long segment_base;</div><div class='del'>-	unsigned tgt_long unw_start;</div><div class='del'>-	unsigned tgt_long unw_end;</div><div class='del'>-	unsigned tgt_long gp;</div><div class='del'>-    } *ad;</div><div class='del'>-    int i;</div><div class='del'>-    struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-    free(archdata_sec-&gt;contents);</div><div class='del'>-    archdata_sec-&gt;contents = xmalloc(sizeof(struct archdata));</div><div class='del'>-    memset(archdata_sec-&gt;contents, 0, sizeof(struct archdata));</div><div class='del'>-    archdata_sec-&gt;header.sh_size = sizeof(struct archdata);</div><div class='del'>-</div><div class='del'>-    ad = (struct archdata *)(archdata_sec-&gt;contents);</div><div class='del'>-    ad-&gt;gp = hfile-&gt;gp;</div><div class='del'>-    ad-&gt;unw_start = 0;</div><div class='del'>-    ad-&gt;unw_end = 0;</div><div class='del'>-    ad-&gt;unw_table = 0;</div><div class='del'>-    ad-&gt;segment_base = f-&gt;sections[1]-&gt;header.sh_addr;</div><div class='del'>-    for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-	sec = f-&gt;sections[i];</div><div class='del'>-	if (sec-&gt;header.sh_type == SHT_PARISC_UNWIND)</div><div class='del'>-	{</div><div class='del'>-	    ad-&gt;unw_start = sec-&gt;header.sh_addr;</div><div class='del'>-	    ad-&gt;unw_end = sec-&gt;header.sh_addr + sec-&gt;header.sh_size;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_i386.c b/mdk-stage1/insmod-modutils/obj/obj_i386.c<br/>deleted file mode 100644<br/>index 28df3448c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_i386.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_i386.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,245 +0,0 @@</div><div class='del'>-/* i386 specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct i386_got_entry</div><div class='del'>-{</div><div class='del'>-  int offset;</div><div class='del'>-  unsigned offset_done : 1;</div><div class='del'>-  unsigned reloc_done : 1;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct i386_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct obj_section *got;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct i386_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol root;</div><div class='del'>-  struct i386_got_entry gotent;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct i386_file *f;</div><div class='del'>-  f = xmalloc(sizeof(*f));</div><div class='del'>-  f-&gt;got = NULL;</div><div class='del'>-  return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  struct i386_symbol *sym;</div><div class='del'>-  sym = xmalloc(sizeof(*sym));</div><div class='del'>-  memset(&amp;sym-&gt;gotent, 0, sizeof(sym-&gt;gotent));</div><div class='del'>-  return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rel *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  struct i386_file *ifile = (struct i386_file *)f;</div><div class='del'>-  struct i386_symbol *isym  = (struct i386_symbol *)sym;</div><div class='del'>-</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  Elf32_Addr got = ifile-&gt;got ? ifile-&gt;got-&gt;header.sh_addr : 0;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_386_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_32:</div><div class='del'>-      *loc += v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_PLT32:</div><div class='del'>-    case R_386_PC32:</div><div class='del'>-      *loc += v - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_GLOB_DAT:</div><div class='del'>-    case R_386_JMP_SLOT:</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_RELATIVE:</div><div class='del'>-      *loc += f-&gt;baseaddr;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_GOTPC:</div><div class='del'>-      assert(got != 0);</div><div class='del'>-      *loc += got - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_GOT32:</div><div class='del'>-      assert(isym != NULL);</div><div class='del'>-      if (!isym-&gt;gotent.reloc_done)</div><div class='del'>-	{</div><div class='del'>-	  isym-&gt;gotent.reloc_done = 1;</div><div class='del'>-	  *(Elf32_Addr *)(ifile-&gt;got-&gt;contents + isym-&gt;gotent.offset) = v;</div><div class='del'>-	}</div><div class='del'>-      *loc += isym-&gt;gotent.offset;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_386_GOTOFF:</div><div class='del'>-      assert(got != 0);</div><div class='del'>-      *loc += v - got;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct i386_file *ifile = (struct i386_file *)f;</div><div class='del'>-  int i, n, offset = 0, gotneeded = 0;</div><div class='del'>-</div><div class='del'>-  n = ifile-&gt;root.header.e_shnum;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-      Elf32_Rel *rel, *relend;</div><div class='del'>-      Elf32_Sym *symtab;</div><div class='del'>-      const char *strtab;</div><div class='del'>-</div><div class='del'>-      relsec = ifile-&gt;root.sections[i];</div><div class='del'>-      if (relsec-&gt;header.sh_type != SHT_REL)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      symsec = ifile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-      strsec = ifile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (Elf32_Rel *)relsec-&gt;contents;</div><div class='del'>-      relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf32_Rel));</div><div class='del'>-      symtab = (Elf32_Sym *)symsec-&gt;contents;</div><div class='del'>-      strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  Elf32_Sym *extsym;</div><div class='del'>-	  struct i386_symbol *intsym;</div><div class='del'>-	  const char *name;</div><div class='del'>-</div><div class='del'>-	  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-	    {</div><div class='del'>-	    case R_386_GOTPC:</div><div class='del'>-	    case R_386_GOTOFF:</div><div class='del'>-	      gotneeded = 1;</div><div class='del'>-	    default:</div><div class='del'>-	      continue;</div><div class='del'>-</div><div class='del'>-	    case R_386_GOT32:</div><div class='del'>-	      break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	  extsym = &amp;symtab[ELF32_R_SYM(rel-&gt;r_info)];</div><div class='del'>-	  if (extsym-&gt;st_name)</div><div class='del'>-	    name = strtab + extsym-&gt;st_name;</div><div class='del'>-	  else</div><div class='del'>-	    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	  intsym = (struct i386_symbol *)obj_find_symbol(&amp;ifile-&gt;root, name);</div><div class='del'>-</div><div class='del'>-	  if (!intsym-&gt;gotent.offset_done)</div><div class='del'>-	    {</div><div class='del'>-	      intsym-&gt;gotent.offset_done = 1;</div><div class='del'>-	      intsym-&gt;gotent.offset = offset;</div><div class='del'>-	      offset += 4;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (offset &gt; 0 || gotneeded)</div><div class='del'>-    ifile-&gt;got = obj_create_alloced_section(&amp;ifile-&gt;root, ".got", 4, offset);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_ia64.c b/mdk-stage1/insmod-modutils/obj/obj_ia64.c<br/>deleted file mode 100644<br/>index 4f92c5d27..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_ia64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_ia64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1065 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ia64 specific support for Elf loading and relocation.</div><div class='del'>- * Copyright 2000 Mike Stephens &lt;mike.stephens@intel.com&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef FALSE</div><div class='del'>-#define FALSE 0</div><div class='del'>-#endif</div><div class='del'>-#ifndef TRUE</div><div class='del'>-#define TRUE  ~FALSE</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-typedef struct _ia64_opd_t</div><div class='del'>-{</div><div class='del'>-    int offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} ia64_opd_t;</div><div class='del'>-</div><div class='del'>-typedef struct _ia64_plt_t</div><div class='del'>-{</div><div class='del'>-    struct _ia64_plt_t *next;</div><div class='del'>-    Elf64_Addr addend;</div><div class='del'>-    int text_offset;</div><div class='del'>-    int data_offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} ia64_plt_t;</div><div class='del'>-</div><div class='del'>-typedef struct _ia64_got_t</div><div class='del'>-{</div><div class='del'>-    struct _ia64_got_t *next;</div><div class='del'>-    Elf64_Addr addend;</div><div class='del'>-    int offset;</div><div class='del'>-    int reloc_done;</div><div class='del'>-} ia64_got_t;</div><div class='del'>-</div><div class='del'>-typedef struct _ia64_symbol_t</div><div class='del'>-{</div><div class='del'>-    struct obj_symbol root;</div><div class='del'>-    ia64_got_t *gotent;</div><div class='del'>-    ia64_opd_t *opdent;</div><div class='del'>-    ia64_plt_t *pltent;</div><div class='del'>-} ia64_symbol_t;</div><div class='del'>-</div><div class='del'>-typedef struct _ia64_file_t</div><div class='del'>-{</div><div class='del'>-    struct obj_file root;</div><div class='del'>-    struct obj_section *got;</div><div class='del'>-    struct obj_section *opd;</div><div class='del'>-    struct obj_section *pltt;</div><div class='del'>-    struct obj_section *pltd;</div><div class='del'>-    Elf64_Addr gp;</div><div class='del'>-    Elf64_Addr text;</div><div class='del'>-    Elf64_Addr data;</div><div class='del'>-    Elf64_Addr bss;</div><div class='del'>-} ia64_file_t;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * aa=gp rel address of the function descriptor in the .IA_64.pltoff section</div><div class='del'>- */</div><div class='del'>-unsigned char ia64_plt_local[] =</div><div class='del'>-{</div><div class='del'>-    0x0b, 0x78, 0x00, 0x02, 0x00, 0x24, /* [MMI] addl r15=aa,gp;;   */</div><div class='del'>-    0x00, 0x41, 0x3c, 0x30, 0x28, 0xc0, /*       ld8 r16=[r15],8    */</div><div class='del'>-    0x01, 0x08, 0x00, 0x84,             /*       mov r14=gp;;       */</div><div class='del'>-    0x11, 0x08, 0x00, 0x1e, 0x18, 0x10, /* [MIB] ld8 gp=[r15]       */</div><div class='del'>-    0x60, 0x80, 0x04, 0x80, 0x03, 0x00, /*       mov b6=r16         */</div><div class='del'>-    0x60, 0x00, 0x80, 0x00              /*       br.few b6;;        */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-unsigned char ia64_plt_extern[] =</div><div class='del'>-{</div><div class='del'>-    0x0b, 0x80, 0x00, 0x02, 0x00, 0x24, /* [MMI] addl r16=aa,gp;;   */</div><div class='del'>-    0xf0, 0x00, 0x40, 0x30, 0x20, 0x00, /*       ld8 r15=[r16]      */</div><div class='del'>-    0x00, 0x00, 0x04, 0x00,             /*       nop.i 0x0;;        */</div><div class='del'>-    0x0b, 0x80, 0x20, 0x1e, 0x18, 0x14, /* [MMI] ld8 r16=[r15],8;;  */</div><div class='del'>-    0x10, 0x00, 0x3c, 0x30, 0x20, 0xc0, /*       ld8 gp=[r15]       */</div><div class='del'>-    0x00, 0x09, 0x00, 0x07,             /*       mov b6=r16;;       */</div><div class='del'>-    0x11, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MIB] nop.m 0x0          */</div><div class='del'>-    0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /*       nop.i 0x0          */</div><div class='del'>-    0x60, 0x00, 0x80, 0x00              /*       br.few b6;;        */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * return the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-Elf64_Xword</div><div class='del'>-obj_ia64_ins_extract_from_bundle(Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    switch (slot)</div><div class='del'>-    {</div><div class='del'>-    case 0 :</div><div class='del'>-	return (*bundle &gt;&gt; 5) &amp; 0x1ffffffffff;</div><div class='del'>-</div><div class='del'>-    case 1 :</div><div class='del'>-	return (((*bundle &gt;&gt; 46) &amp; 0x3ffff) |</div><div class='del'>-	    (*(bundle + 1) &lt;&lt; 18)) &amp; 0x1ffffffffff;</div><div class='del'>-</div><div class='del'>-    case 2 :</div><div class='del'>-	return (*(bundle + 1) &gt;&gt; 23) &amp; 0x1ffffffffff;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-    }</div><div class='del'>-    return (-1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * insert a instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-obj_ia64_ins_insert_in_bundle(Elf64_Addr *bundle, Elf64_Xword slot, Elf64_Xword ins)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword i;</div><div class='del'>-    Elf64_Xword in = ins &amp; 0x1ffffffffff;</div><div class='del'>-</div><div class='del'>-    switch (slot)</div><div class='del'>-    {</div><div class='del'>-    case 0 :</div><div class='del'>-	i = *bundle &amp; 0xffffc0000000001f;</div><div class='del'>-       *bundle = i | (in &lt;&lt; 5);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case 1 :</div><div class='del'>-	i = *bundle &amp; 0x00003fffffffffff;</div><div class='del'>-	*bundle = i | (in &lt;&lt; 46);</div><div class='del'>-</div><div class='del'>-	++bundle;</div><div class='del'>-	i = *bundle &amp; 0xffffffffff800000;</div><div class='del'>-	*bundle = i | (in &gt;&gt; 18);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case 2 :</div><div class='del'>-	++bundle;</div><div class='del'>-	i = *bundle &amp; 0x00000000007fffff;</div><div class='del'>-	*bundle = i | (in &lt;&lt; 23);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 14 value to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_imm14(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffee07f01fff;</div><div class='del'>-    ins |= ((v &amp; 0x2000) &lt;&lt; 23) | ((v &amp; 0x1f80) &lt;&lt; 20) | ((v &amp; 0x007f) &lt;&lt; 13);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    if (((Elf64_Sxword) v &gt; 8191) || ((Elf64_Sxword) v &lt; -8192))</div><div class='del'>-	return obj_reloc_overflow;</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 22 value to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_imm22(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffe000301fff;</div><div class='del'>-    ins |= ((v &amp; 0x200000) &lt;&lt; 15) | ((v &amp; 0x1f0000) &lt;&lt; 6) |</div><div class='del'>-	   ((v &amp; 0x00ff80) &lt;&lt; 20) | ((v &amp; 0x00007f) &lt;&lt; 13);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    if (((Elf64_Sxword) v &gt; 2097151) || ((Elf64_Sxword) v &lt; -2097152))</div><div class='del'>-	return obj_reloc_overflow;</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 21 value (form 1) to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_pcrel21b(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffee00001fff;</div><div class='del'>-    ins |= ((v &amp; 0x1000000) &lt;&lt; 12) | ((v &amp; 0x0fffff0) &lt;&lt; 9);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 21 value (form 2) to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_pcrel21m(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffee000fe03f;</div><div class='del'>-    ins |= ((v &amp; 0x1000000) &lt;&lt; 12) | ((v &amp; 0x0fff800) &lt;&lt; 9) |</div><div class='del'>-	   ((v &amp; 0x00007f0) &lt;&lt; 2);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 21 value (form 3) to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_pcrel21f(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffeffc00003f;</div><div class='del'>-    ins |= ((v &amp; 0x1000000) &lt;&lt; 12) | ((v &amp; 0x0fffff0) &lt;&lt; 2);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add a immediate 64 value to the instruction at slot in bundle</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_ins_imm64(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot)</div><div class='del'>-{</div><div class='del'>-    Elf64_Xword ins;</div><div class='del'>-</div><div class='del'>-    assert(slot == 1);</div><div class='del'>-    ins = obj_ia64_ins_extract_from_bundle(bundle, slot);</div><div class='del'>-    ins &amp;= 0xffffffee000101ff;</div><div class='del'>-    ins |= ((v &amp; 0x8000000000000000) &gt;&gt; 28) | ((v &amp; 0x0000000000200000)) |</div><div class='del'>-	   ((v &amp; 0x00000000001f0000) &lt;&lt;  6) | ((v &amp; 0x000000000000ff80) &lt;&lt; 20) |</div><div class='del'>-	   ((v &amp; 0x000000000000007f) &lt;&lt; 13);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, slot, ins);</div><div class='del'>-    obj_ia64_ins_insert_in_bundle(bundle, ++slot, ((v &amp; 0x7fffffffffc00000) &gt;&gt; 22));</div><div class='del'>-    return obj_reloc_ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * create a plt entry</div><div class='del'>- */</div><div class='del'>-enum obj_reloc</div><div class='del'>-obj_ia64_generate_plt(Elf64_Addr v,</div><div class='del'>-		       Elf64_Addr gp,</div><div class='del'>-		       ia64_file_t *ifile,</div><div class='del'>-		       ia64_symbol_t *isym,</div><div class='del'>-		       ia64_plt_t *pltent)</div><div class='del'>-{</div><div class='del'>-    *(Elf64_Addr *)(ifile-&gt;pltd-&gt;contents + pltent-&gt;data_offset) = v;</div><div class='del'>-    if (isym-&gt;root.secidx &lt;= SHN_HIRESERVE)</div><div class='del'>-    {</div><div class='del'>-	/* local entry */</div><div class='del'>-	*(Elf64_Addr *)(ifile-&gt;pltd-&gt;contents + pltent-&gt;data_offset + 8) = gp;</div><div class='del'>-	memcpy((Elf64_Addr *)(ifile-&gt;pltt-&gt;contents + pltent-&gt;text_offset),</div><div class='del'>-	    ia64_plt_local, sizeof(ia64_plt_local));</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-    {</div><div class='del'>-	/* external entry */</div><div class='del'>-	memcpy((Elf64_Addr *)(ifile-&gt;pltt-&gt;contents + pltent-&gt;text_offset),</div><div class='del'>-	    ia64_plt_extern, sizeof(ia64_plt_extern));</div><div class='del'>-    }</div><div class='del'>-    return obj_ia64_ins_imm22(</div><div class='del'>-	(ifile-&gt;pltd-&gt;header.sh_addr + pltent-&gt;data_offset - gp),</div><div class='del'>-	(Elf64_Addr *)(ifile-&gt;pltt-&gt;contents + pltent-&gt;text_offset), 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-obj_ia64_create_alloced_section (struct obj_file *f, const char *name,</div><div class='del'>-    unsigned long align, unsigned long size, unsigned long sh_flags)</div><div class='del'>-{</div><div class='del'>-    int newidx = f-&gt;header.e_shnum++;</div><div class='del'>-    struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-    f-&gt;sections = xrealloc(f-&gt;sections, (newidx+1) * sizeof(sec));</div><div class='del'>-    f-&gt;sections[newidx] = sec = arch_new_section();</div><div class='del'>-</div><div class='del'>-    memset(sec, 0, sizeof(*sec));</div><div class='del'>-    sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-    sec-&gt;header.sh_flags = sh_flags;</div><div class='del'>-    sec-&gt;header.sh_size = size;</div><div class='del'>-    sec-&gt;header.sh_addralign = align;</div><div class='del'>-    sec-&gt;name = name;</div><div class='del'>-    sec-&gt;idx = newidx;</div><div class='del'>-    if (size)</div><div class='del'>-	sec-&gt;contents = xmalloc(size);</div><div class='del'>-</div><div class='del'>-    obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-    return sec;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *f;</div><div class='del'>-    f = xmalloc(sizeof(*f));</div><div class='del'>-    f-&gt;got = NULL;</div><div class='del'>-    f-&gt;opd = NULL;</div><div class='del'>-    f-&gt;pltt = NULL;</div><div class='del'>-    f-&gt;pltd = NULL;</div><div class='del'>-    return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-    return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-    ia64_symbol_t *sym;</div><div class='del'>-    sym = xmalloc(sizeof(*sym));</div><div class='del'>-    sym-&gt;gotent = NULL;</div><div class='del'>-    sym-&gt;opdent = NULL;</div><div class='del'>-    sym-&gt;pltent = NULL;</div><div class='del'>-    return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    switch (sec-&gt;header.sh_type)</div><div class='del'>-    {</div><div class='del'>-    case SHT_IA_64_EXT :</div><div class='del'>-	sec-&gt;contents = NULL;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SHT_IA_64_UNWIND :</div><div class='del'>-	if (sec-&gt;header.sh_size &gt; 0)</div><div class='del'>-	{</div><div class='del'>-	    sec-&gt;contents = xmalloc(sec-&gt;header.sh_size);</div><div class='del'>-	    gzf_lseek(fp, sec-&gt;header.sh_offset, SEEK_SET);</div><div class='del'>-	    if (gzf_read(fp, sec-&gt;contents, sec-&gt;header.sh_size) != sec-&gt;header.sh_size)</div><div class='del'>-	    {</div><div class='del'>-		error("error reading ELF section data: %m");</div><div class='del'>-		return -1;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-	    sec-&gt;contents = NULL;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      error("Unknown section header type: %08x", sec-&gt;header.sh_type);</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *ifile = (ia64_file_t *)f;</div><div class='del'>-    int i;</div><div class='del'>-    int n;</div><div class='del'>-    int got_offset = 0;</div><div class='del'>-    int opd_offset = 32;</div><div class='del'>-    int plt_text_offset = 0;</div><div class='del'>-    int plt_data_offset = 0;</div><div class='del'>-</div><div class='del'>-    n = ifile-&gt;root.header.e_shnum;</div><div class='del'>-    for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-	struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-	Elf64_Rela *rel, *relend;</div><div class='del'>-	Elf64_Sym *symtab;</div><div class='del'>-	const char *strtab;</div><div class='del'>-</div><div class='del'>-	relsec = ifile-&gt;root.sections[i];</div><div class='del'>-	if (relsec-&gt;header.sh_type != SHT_RELA)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	symsec = ifile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-	strsec = ifile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-	rel = (Elf64_Rela *)relsec-&gt;contents;</div><div class='del'>-	relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf64_Rela));</div><div class='del'>-	symtab = (Elf64_Sym *)symsec-&gt;contents;</div><div class='del'>-	strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-	for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	    int need_got = FALSE;</div><div class='del'>-	    int need_opd = FALSE;</div><div class='del'>-	    int need_plt = FALSE;</div><div class='del'>-</div><div class='del'>-	    switch (ELF64_R_TYPE(rel-&gt;r_info))</div><div class='del'>-	    {</div><div class='del'>-	    default:</div><div class='del'>-		continue;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_FPTR64I :       /* @fptr(sym + add), mov imm64 */</div><div class='del'>-	    case R_IA64_FPTR32LSB :     /* @fptr(sym + add), data4 LSB */</div><div class='del'>-	    case R_IA64_FPTR64LSB :     /* @fptr(sym + add), data8 LSB */</div><div class='del'>-		need_opd = TRUE;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_LTOFF22 :       /* @ltoff(sym + add), add imm22 */</div><div class='del'>-	    case R_IA64_LTOFF22X :</div><div class='del'>-	    case R_IA64_LTOFF64I :      /* @ltoff(sym + add), mov imm64 */</div><div class='del'>-		need_got = TRUE;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_LTOFF_FPTR22 :  /* @ltoff(@fptr(s+a)), imm22 */</div><div class='del'>-	    case R_IA64_LTOFF_FPTR64I : /* @ltoff(@fptr(s+a)), imm64 */</div><div class='del'>-	    case R_IA64_LTOFF_FPTR32LSB :</div><div class='del'>-	    case R_IA64_LTOFF_FPTR64LSB :</div><div class='del'>-		need_got = TRUE;</div><div class='del'>-		need_opd = TRUE;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_PLTOFF22 :      /* @pltoff(sym + add), add imm22 */</div><div class='del'>-	    case R_IA64_PLTOFF64I :     /* @pltoff(sym + add), mov imm64 */</div><div class='del'>-	    case R_IA64_PLTOFF64LSB :   /* @pltoff(sym + add), data8 LSB */</div><div class='del'>-</div><div class='del'>-	    case R_IA64_PCREL21B :      /* @pcrel(sym + add), ptb, call */</div><div class='del'>-	    case R_IA64_PCREL21M :      /* @pcrel(sym + add), chk.s */</div><div class='del'>-	    case R_IA64_PCREL21F :      /* @pcrel(sym + add), fchkf */</div><div class='del'>-		need_plt = TRUE;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (need_got || need_opd || need_plt)</div><div class='del'>-	    {</div><div class='del'>-		Elf64_Sym     *extsym;</div><div class='del'>-		ia64_symbol_t *isym;</div><div class='del'>-		const char    *name;</div><div class='del'>-		int            local;</div><div class='del'>-		unsigned long  symndx;</div><div class='del'>-</div><div class='del'>-		symndx = ELF64_R_SYM(rel-&gt;r_info);</div><div class='del'>-		extsym = &amp;symtab[symndx];</div><div class='del'>-		if (ELF64_ST_BIND(extsym-&gt;st_info) == STB_LOCAL)</div><div class='del'>-		{</div><div class='del'>-		    isym = (ia64_symbol_t *) f-&gt;local_symtab[symndx];</div><div class='del'>-		}</div><div class='del'>-		else</div><div class='del'>-		{</div><div class='del'>-		    if (extsym-&gt;st_name)</div><div class='del'>-			name = strtab + extsym-&gt;st_name;</div><div class='del'>-		    else</div><div class='del'>-			name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-		    isym = (ia64_symbol_t *)obj_find_symbol(f, name);</div><div class='del'>-		}</div><div class='del'>-		local = isym-&gt;root.secidx &lt;= SHN_HIRESERVE;</div><div class='del'>-</div><div class='del'>-		if (need_plt)</div><div class='del'>-		{</div><div class='del'>-		    ia64_plt_t *plt;</div><div class='del'>-</div><div class='del'>-		    for (plt = isym-&gt;pltent; plt != NULL; plt = plt-&gt;next)</div><div class='del'>-			if (plt-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-			    break;</div><div class='del'>-		    if (plt == NULL)</div><div class='del'>-		    {</div><div class='del'>-			plt = (ia64_plt_t *) xmalloc(sizeof(ia64_plt_t));</div><div class='del'>-			plt-&gt;next = isym-&gt;pltent;</div><div class='del'>-			plt-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-			plt-&gt;text_offset = plt_text_offset;</div><div class='del'>-			plt-&gt;data_offset = plt_data_offset;</div><div class='del'>-			plt-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;pltent = plt;</div><div class='del'>-			if (local)</div><div class='del'>-			{</div><div class='del'>-			    plt_text_offset += sizeof(ia64_plt_local);</div><div class='del'>-			    plt_data_offset += 16;</div><div class='del'>-			}</div><div class='del'>-			else</div><div class='del'>-			{</div><div class='del'>-			    plt_text_offset += sizeof(ia64_plt_extern);</div><div class='del'>-			    plt_data_offset += 8;</div><div class='del'>-			}</div><div class='del'>-			need_plt = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		if (need_got)</div><div class='del'>-		{</div><div class='del'>-		    ia64_got_t *got;</div><div class='del'>-</div><div class='del'>-		    for (got = isym-&gt;gotent; got != NULL; got = got-&gt;next)</div><div class='del'>-			if (got-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-			    break;</div><div class='del'>-		    if (got == NULL)</div><div class='del'>-		    {</div><div class='del'>-			got = (ia64_got_t *) xmalloc(sizeof(ia64_got_t));</div><div class='del'>-			got-&gt;next = isym-&gt;gotent;</div><div class='del'>-			got-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-			got-&gt;offset = got_offset;</div><div class='del'>-			got-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;gotent = got;</div><div class='del'>-			got_offset += 8;</div><div class='del'>-			need_got = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		if (need_opd &amp;&amp; local)</div><div class='del'>-		{</div><div class='del'>-		    ia64_opd_t *opd;</div><div class='del'>-</div><div class='del'>-		    if (isym-&gt;opdent == NULL)</div><div class='del'>-		    {</div><div class='del'>-			opd = (ia64_opd_t *) xmalloc(sizeof(ia64_opd_t));</div><div class='del'>-			opd-&gt;offset = opd_offset;</div><div class='del'>-			opd-&gt;reloc_done = FALSE;</div><div class='del'>-			isym-&gt;opdent = opd;</div><div class='del'>-			opd_offset += 16;</div><div class='del'>-			need_opd = FALSE;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ifile-&gt;got = obj_ia64_create_alloced_section(f, ".got", 8, got_offset,</div><div class='del'>-	(SHF_ALLOC | SHF_WRITE | SHF_IA_64_SHORT));</div><div class='del'>-    assert(ifile-&gt;got != NULL);</div><div class='del'>-</div><div class='del'>-    ifile-&gt;opd = obj_ia64_create_alloced_section(f, ".opd", 16, opd_offset,</div><div class='del'>-	(SHF_ALLOC | SHF_WRITE | SHF_IA_64_SHORT));</div><div class='del'>-    assert(ifile-&gt;opd != NULL);</div><div class='del'>-</div><div class='del'>-    if (plt_text_offset &gt; 0)</div><div class='del'>-    {</div><div class='del'>-	ifile-&gt;pltt = obj_ia64_create_alloced_section(f, ".plt", 16,</div><div class='del'>-	    plt_text_offset, (SHF_ALLOC | SHF_EXECINSTR | SHF_IA_64_SHORT));</div><div class='del'>-	ifile-&gt;pltd = obj_ia64_create_alloced_section(f, ".IA_64.pltoff",</div><div class='del'>-	    16, plt_data_offset, (SHF_ALLOC | SHF_WRITE | SHF_IA_64_SHORT));</div><div class='del'>-	assert(ifile-&gt;pltt != NULL);</div><div class='del'>-	assert(ifile-&gt;pltd != NULL);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf64_Addr base)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *ifile = (ia64_file_t *)f;</div><div class='del'>-    Elf64_Addr min_addr = (Elf64_Addr) -1;</div><div class='del'>-    Elf64_Addr max_addr = 0;</div><div class='del'>-    Elf64_Addr min_short_addr = (Elf64_Addr) -1;</div><div class='del'>-    Elf64_Addr max_short_addr = 0;</div><div class='del'>-    Elf64_Addr gp;</div><div class='del'>-    Elf64_Addr text = (Elf64_Addr) -1;</div><div class='del'>-    Elf64_Addr data = (Elf64_Addr) -1;</div><div class='del'>-    Elf64_Addr bss = (Elf64_Addr) -1;</div><div class='del'>-    int        n = f-&gt;header.e_shnum;</div><div class='del'>-    int        i;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Finalize the addresses of the sections, find the min and max</div><div class='del'>-     * address of all sections marked short, and collect min and max</div><div class='del'>-     * address of any type, for use in selecting a nice gp.</div><div class='del'>-     *</div><div class='del'>-     * The algorithm used for selecting set the GP value was taken from</div><div class='del'>-     * the ld/bfd code contributed by David Mosberger-Tang &lt;davidm@hpl.hp.com&gt;</div><div class='del'>-     */</div><div class='del'>-    f-&gt;baseaddr = base;</div><div class='del'>-    for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-	Elf64_Shdr *header = &amp;f-&gt;sections[i]-&gt;header;</div><div class='del'>-	Elf64_Addr lo;</div><div class='del'>-	Elf64_Addr hi;</div><div class='del'>-</div><div class='del'>-	header-&gt;sh_addr += base;</div><div class='del'>-	if (header-&gt;sh_flags &amp; SHF_ALLOC)</div><div class='del'>-	{</div><div class='del'>-	    lo = header-&gt;sh_addr;</div><div class='del'>-	    hi = header-&gt;sh_addr + header-&gt;sh_size;</div><div class='del'>-	    if (hi &lt; lo)</div><div class='del'>-		hi = (Elf64_Addr) -1;</div><div class='del'>-</div><div class='del'>-	    if (min_addr &gt; lo)</div><div class='del'>-		min_addr = lo;</div><div class='del'>-	    if (max_addr &lt; hi)</div><div class='del'>-		max_addr = hi;</div><div class='del'>-	    if (header-&gt;sh_flags &amp; SHF_IA_64_SHORT)</div><div class='del'>-	    {</div><div class='del'>-		if (min_short_addr &gt; lo)</div><div class='del'>-		    min_short_addr = lo;</div><div class='del'>-		if (max_short_addr &lt; hi)</div><div class='del'>-		    max_short_addr = hi;</div><div class='del'>-	    }</div><div class='del'>-	    if ((header-&gt;sh_type &amp; SHT_NOBITS) &amp;&amp; (lo &lt; bss))</div><div class='del'>-		bss = lo;</div><div class='del'>-	    else if ((header-&gt;sh_flags &amp; SHF_EXECINSTR) &amp;&amp; (lo &lt; text))</div><div class='del'>-		text = lo;</div><div class='del'>-	    else if (lo &lt; data)</div><div class='del'>-		data = lo;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    /* Pick a sensible value for gp */</div><div class='del'>-</div><div class='del'>-    /* Start with just the address of the .got */</div><div class='del'>-    gp = ifile-&gt;got-&gt;header.sh_addr;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If it is possible to address the entire image, but we</div><div class='del'>-     * don't with the choice above, adjust.</div><div class='del'>-     */</div><div class='del'>-    if ((max_addr - min_addr &lt; 0x400000) &amp;&amp; (max_addr - gp &lt;= 0x200000) &amp;&amp;</div><div class='del'>-	(gp - min_addr &gt; 0x200000))</div><div class='del'>-    {</div><div class='del'>-	gp = min_addr + 0x200000;</div><div class='del'>-    }</div><div class='del'>-    else if (max_short_addr != 0)</div><div class='del'>-    {</div><div class='del'>-	/* If we don't cover all the short data, adjust */</div><div class='del'>-	if (max_short_addr - gp &gt;= 0x200000)</div><div class='del'>-	    gp = min_short_addr + 0x200000;</div><div class='del'>-</div><div class='del'>-	/* If we're addressing stuff past the end, adjust back */</div><div class='del'>-	if (gp &gt; max_addr)</div><div class='del'>-	    gp = max_addr - 0x200000 + 8;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Validate whether all SHF_IA_64_SHORT sections are within</div><div class='del'>-     * range of the chosen GP.</div><div class='del'>-     */</div><div class='del'>-    if (max_short_addr != 0)</div><div class='del'>-    {</div><div class='del'>-	if (max_short_addr - min_short_addr &gt;= 0x400000)</div><div class='del'>-	{</div><div class='del'>-	    error("short data segment overflowed (0x%lx &gt;= 0x400000)",</div><div class='del'>-		(unsigned long)(max_short_addr - min_short_addr));</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	else if (((gp &gt; min_short_addr) &amp;&amp; (gp - min_short_addr &gt; 0x200000)) ||</div><div class='del'>-	    ((gp &lt; max_short_addr) &amp;&amp; (max_short_addr - gp &gt;= 0x200000)))</div><div class='del'>-	{</div><div class='del'>-	    error("GP does not cover short data segment");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    ifile-&gt;gp = gp;</div><div class='del'>-    ifile-&gt;text = text;</div><div class='del'>-    ifile-&gt;data = data;</div><div class='del'>-    ifile-&gt;bss = bss;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Targets can be unaligned, use memcpy instead of assignment */</div><div class='del'>-#define COPY_64LSB(loc, v) \</div><div class='del'>-    do { \</div><div class='del'>-    Elf64_Xword reloc = (v); \</div><div class='del'>-    memcpy((void *)(loc), &amp;reloc, 8); \</div><div class='del'>-    } while(0)</div><div class='del'>-#define COPY_32LSB(loc, v) \</div><div class='del'>-    do { \</div><div class='del'>-    Elf32_Xword reloc = (v); \</div><div class='del'>-    memcpy((void *)(loc), &amp;reloc, 4); \</div><div class='del'>-    if ((v) != reloc) \</div><div class='del'>-	ret = obj_reloc_overflow; \</div><div class='del'>-    } while(0)</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation(struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf64_Rela *rel,</div><div class='del'>-		       Elf64_Addr v)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *ifile = (ia64_file_t *) f;</div><div class='del'>-    ia64_symbol_t *isym  = (ia64_symbol_t *) sym;</div><div class='del'>-</div><div class='del'>-    Elf64_Addr  loc = (Elf64_Addr)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-    Elf64_Addr  dot = (targsec-&gt;header.sh_addr + rel-&gt;r_offset) &amp; ~0x03;</div><div class='del'>-</div><div class='del'>-    Elf64_Addr  got = ifile-&gt;got-&gt;header.sh_addr;</div><div class='del'>-    Elf64_Addr  gp = ifile-&gt;gp;</div><div class='del'>-</div><div class='del'>-    Elf64_Addr *bundle = (Elf64_Addr *)(loc &amp; ~0x03);</div><div class='del'>-    Elf64_Xword slot = loc &amp; 0x03;</div><div class='del'>-</div><div class='del'>-    Elf64_Xword r_info = ELF64_R_TYPE(rel-&gt;r_info);</div><div class='del'>-</div><div class='del'>-    enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-    /* We cannot load modules compiled with -mconstant-gp */</div><div class='del'>-#ifndef EF_IA_64_CONS_GP</div><div class='del'>-#define EF_IA_64_CONS_GP 0x00000040</div><div class='del'>-#endif</div><div class='del'>-#ifndef EF_IA_64_NOFUNCDESC_CONS_GP</div><div class='del'>-#define EF_IA_64_NOFUNCDESC_CONS_GP 0x00000080</div><div class='del'>-#endif</div><div class='del'>-    if (f-&gt;header.e_flags &amp; (EF_IA_64_CONS_GP | EF_IA_64_NOFUNCDESC_CONS_GP))</div><div class='del'>-	return obj_reloc_constant_gp;</div><div class='del'>-</div><div class='del'>-    switch (r_info)</div><div class='del'>-    {</div><div class='del'>-    case R_IA64_NONE :          /* none */</div><div class='del'>-    case R_IA64_LDXMOV :        /* Use of LTOFF22X.  */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_IMM14 :         /* symbol + addend, add imm14 */</div><div class='del'>-	ret = obj_ia64_ins_imm14(v, bundle, slot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_IMM22 :         /* symbol + addend, add imm22 */</div><div class='del'>-	ret = obj_ia64_ins_imm22(v, bundle, slot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_IMM64 :         /* symbol + addend, movl imm64 */</div><div class='del'>-	ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_DIR32LSB :      /* symbol + addend, data4 LSB */</div><div class='del'>-	COPY_32LSB(loc, v);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_DIR64LSB :      /* symbol + addend, data8 LSB */</div><div class='del'>-	COPY_64LSB(loc, v);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_GPREL22 :       /* @gprel(sym + add), add imm22 */</div><div class='del'>-	v -= gp;</div><div class='del'>-	ret = obj_ia64_ins_imm22(v, bundle, slot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_GPREL64I :      /* @gprel(sym + add), mov imm64 */</div><div class='del'>-	v -= gp;</div><div class='del'>-	ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_GPREL32LSB :    /* @gprel(sym + add), data4 LSB */</div><div class='del'>-	COPY_32LSB(loc, v-gp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_GPREL64LSB :    /* @gprel(sym + add), data8 LSB */</div><div class='del'>-	COPY_64LSB(loc, v-gp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_LTOFF22 :       /* @ltoff(sym + add), add imm22 */</div><div class='del'>-    case R_IA64_LTOFF22X :      /* LTOFF22, relaxable.  */</div><div class='del'>-    case R_IA64_LTOFF64I :      /* @ltoff(sym + add), mov imm64 */</div><div class='del'>-	{</div><div class='del'>-	    ia64_got_t *ge;</div><div class='del'>-</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    for (ge = isym-&gt;gotent; ge != NULL &amp;&amp; ge-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		ge = ge-&gt;next;</div><div class='del'>-	    assert(ge != NULL);</div><div class='del'>-	    if (!ge-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		ge-&gt;reloc_done = TRUE;</div><div class='del'>-		*(Elf64_Addr *)(ifile-&gt;got-&gt;contents + ge-&gt;offset) = v;</div><div class='del'>-	    }</div><div class='del'>-	    v = got + ge-&gt;offset - gp;</div><div class='del'>-	    if (r_info == R_IA64_LTOFF64I)</div><div class='del'>-		ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-	    else</div><div class='del'>-		ret = obj_ia64_ins_imm22(v, bundle, slot);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_PLTOFF22 :      /* @pltoff(sym + add), add imm22 */</div><div class='del'>-    case R_IA64_PLTOFF64I :     /* @pltoff(sym + add), mov imm64 */</div><div class='del'>-    case R_IA64_PLTOFF64LSB :   /* @pltoff(sym + add), data8 LSB */</div><div class='del'>-	{</div><div class='del'>-	    ia64_plt_t *pe;</div><div class='del'>-</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    for (pe = isym-&gt;pltent; pe != NULL &amp;&amp; pe-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		pe = pe-&gt;next;</div><div class='del'>-	    assert(pe != NULL);</div><div class='del'>-	    if (!pe-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		pe-&gt;reloc_done = TRUE;</div><div class='del'>-		ret = obj_ia64_generate_plt(v, gp, ifile, isym, pe);</div><div class='del'>-	    }</div><div class='del'>-	    v = ifile-&gt;pltt-&gt;header.sh_addr + pe-&gt;text_offset - gp;</div><div class='del'>-	    switch (r_info)</div><div class='del'>-	    {</div><div class='del'>-	    case R_IA64_PLTOFF22 :</div><div class='del'>-		ret = obj_ia64_ins_imm22(v, bundle, slot);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_PLTOFF64I :</div><div class='del'>-		ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_PLTOFF64LSB :</div><div class='del'>-		COPY_64LSB(loc, v);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_FPTR64I :       /* @fptr(sym + add), mov imm64 */</div><div class='del'>-    case R_IA64_FPTR32LSB :     /* @fptr(sym + add), data4 LSB */</div><div class='del'>-    case R_IA64_FPTR64LSB :     /* @fptr(sym + add), data8 LSB */</div><div class='del'>-	assert(isym != NULL);</div><div class='del'>-	if (isym-&gt;root.secidx &lt;= SHN_HIRESERVE)</div><div class='del'>-	{</div><div class='del'>-	    assert(isym-&gt;opdent != NULL);</div><div class='del'>-	    if (!isym-&gt;opdent-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		isym-&gt;opdent-&gt;reloc_done = TRUE;</div><div class='del'>-		*(Elf64_Addr *)(ifile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset) = v;</div><div class='del'>-		*(Elf64_Addr *)(ifile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset + 8) = gp;</div><div class='del'>-	    }</div><div class='del'>-	    v = ifile-&gt;opd-&gt;header.sh_addr + isym-&gt;opdent-&gt;offset;</div><div class='del'>-	}</div><div class='del'>-	switch (r_info)</div><div class='del'>-	{</div><div class='del'>-	case R_IA64_FPTR64I :</div><div class='del'>-	    ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case R_IA64_FPTR32LSB :</div><div class='del'>-	    COPY_32LSB(loc, v);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case R_IA64_FPTR64LSB :     /* @fptr(sym + add), data8 LSB */</div><div class='del'>-	    /* Target can be unaligned */</div><div class='del'>-	    COPY_64LSB(loc, v);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_PCREL21B :      /* @pcrel(sym + add), ptb, call */</div><div class='del'>-    case R_IA64_PCREL21M :      /* @pcrel(sym + add), chk.s */</div><div class='del'>-    case R_IA64_PCREL21F :      /* @pcrel(sym + add), fchkf */</div><div class='del'>-	assert(isym != NULL);</div><div class='del'>-	if ((isym-&gt;root.secidx &gt; SHN_HIRESERVE) ||</div><div class='del'>-	   ((Elf64_Sxword) (v - dot) &gt; 16777215) ||</div><div class='del'>-	   ((Elf64_Sxword) (v - dot) &lt; -16777216))</div><div class='del'>-	{</div><div class='del'>-	    ia64_plt_t *pe;</div><div class='del'>-</div><div class='del'>-	    for (pe = isym-&gt;pltent; pe != NULL &amp;&amp; pe-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		pe = pe-&gt;next;</div><div class='del'>-	    assert(pe != NULL);</div><div class='del'>-	    if (!pe-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		pe-&gt;reloc_done = TRUE;</div><div class='del'>-		ret = obj_ia64_generate_plt(v, gp, ifile, isym, pe);</div><div class='del'>-	    }</div><div class='del'>-	    v = ifile-&gt;pltt-&gt;header.sh_addr + pe-&gt;text_offset;</div><div class='del'>-	}</div><div class='del'>-	v -= dot;</div><div class='del'>-	switch (r_info)</div><div class='del'>-	{</div><div class='del'>-	case R_IA64_PCREL21B :</div><div class='del'>-	    ret = obj_ia64_ins_pcrel21b(v, bundle, slot);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case R_IA64_PCREL21M :</div><div class='del'>-	    ret = obj_ia64_ins_pcrel21m(v, bundle, slot);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case R_IA64_PCREL21F :</div><div class='del'>-	    ret = obj_ia64_ins_pcrel21f(v, bundle, slot);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_PCREL32LSB :    /* @pcrel(sym + add), data4 LSB */</div><div class='del'>-	COPY_32LSB(loc, v-dot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_PCREL64LSB :    /* @pcrel(sym + add), data8 LSB */</div><div class='del'>-	COPY_64LSB(loc, v-dot);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_LTOFF_FPTR22 :  /* @ltoff(@fptr(s+a)), imm22 */</div><div class='del'>-    case R_IA64_LTOFF_FPTR64I : /* @ltoff(@fptr(s+a)), imm64 */</div><div class='del'>-    case R_IA64_LTOFF_FPTR32LSB : /* @ltoff(@fptr(s+a)), data4 */</div><div class='del'>-    case R_IA64_LTOFF_FPTR64LSB : /* @ltoff(@fptr(s+a)), data8 */</div><div class='del'>-	{</div><div class='del'>-	    ia64_got_t *ge;</div><div class='del'>-</div><div class='del'>-	    assert(isym != NULL);</div><div class='del'>-	    if (isym-&gt;root.secidx &lt;= SHN_HIRESERVE)</div><div class='del'>-	    {</div><div class='del'>-		assert(isym-&gt;opdent != NULL);</div><div class='del'>-		if (!isym-&gt;opdent-&gt;reloc_done)</div><div class='del'>-		{</div><div class='del'>-		    isym-&gt;opdent-&gt;reloc_done = TRUE;</div><div class='del'>-		    *(Elf64_Addr *)(ifile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset) = v;</div><div class='del'>-		    *(Elf64_Addr *)(ifile-&gt;opd-&gt;contents + isym-&gt;opdent-&gt;offset + 8) = gp;</div><div class='del'>-		}</div><div class='del'>-		v = ifile-&gt;opd-&gt;header.sh_addr + isym-&gt;opdent-&gt;offset;</div><div class='del'>-	    }</div><div class='del'>-	    for (ge = isym-&gt;gotent; ge != NULL &amp;&amp; ge-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-		ge = ge-&gt;next;</div><div class='del'>-	    assert(ge != NULL);</div><div class='del'>-	    if (!ge-&gt;reloc_done)</div><div class='del'>-	    {</div><div class='del'>-		ge-&gt;reloc_done = TRUE;</div><div class='del'>-		*(Elf64_Addr *)(ifile-&gt;got-&gt;contents + ge-&gt;offset) =  v;</div><div class='del'>-	    }</div><div class='del'>-	    v = got + ge-&gt;offset - gp;</div><div class='del'>-	    switch (r_info)</div><div class='del'>-	    {</div><div class='del'>-	    case R_IA64_LTOFF_FPTR22 :</div><div class='del'>-		ret = obj_ia64_ins_imm22(v, bundle, slot);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_LTOFF_FPTR64I :</div><div class='del'>-		ret = obj_ia64_ins_imm64(v, bundle, slot);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_LTOFF_FPTR32LSB :</div><div class='del'>-		COPY_32LSB(loc, v);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case R_IA64_LTOFF_FPTR64LSB :</div><div class='del'>-		COPY_64LSB(loc, v);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_SEGREL32LSB :   /* @segrel(sym + add), data4 LSB */</div><div class='del'>-    case R_IA64_SEGREL64LSB :   /* @segrel(sym + add), data8 LSB */</div><div class='del'>-	if (targsec-&gt;header.sh_type &amp; SHT_NOBITS)</div><div class='del'>-	    v = ifile-&gt;bss - v;</div><div class='del'>-	else if (targsec-&gt;header.sh_flags &amp; SHF_EXECINSTR)</div><div class='del'>-	    v = ifile-&gt;text - v;</div><div class='del'>-	else</div><div class='del'>-	    v = ifile-&gt;data - v;</div><div class='del'>-	if (r_info == R_IA64_SEGREL32LSB)</div><div class='del'>-	    COPY_32LSB(loc, v);</div><div class='del'>-	else</div><div class='del'>-	    COPY_64LSB(loc, v);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_SECREL32LSB :   /* @secrel(sym + add), data4 LSB */</div><div class='del'>-	COPY_32LSB(loc, targsec-&gt;header.sh_addr - v);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case R_IA64_SECREL64LSB :   /* @secrel(sym + add), data8 LSB */</div><div class='del'>-	COPY_64LSB(loc, targsec-&gt;header.sh_addr - v);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We don't handle the big-endian relocates</div><div class='del'>-     *</div><div class='del'>-     * R_IA64_DIR32MSB        symbol + addend, data4 MSB</div><div class='del'>-     * R_IA64_DIR64MSB        symbol + addend, data8 MSB</div><div class='del'>-     * R_IA64_GPREL32MSB      @gprel(sym + add), data4 MSB</div><div class='del'>-     * R_IA64_GPREL64MSB      @gprel(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_PLTOFF64MSB     @pltoff(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_FPTR32MSB       @fptr(sym + add), data4 MSB</div><div class='del'>-     * R_IA64_FPTR64MSB       @fptr(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_PCREL32MSB      @pcrel(sym + add), data4 MSB</div><div class='del'>-     * R_IA64_PCREL64MSB      @pcrel(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_SEGREL32MSB     @segrel(sym + add), data4 MSB</div><div class='del'>-     * R_IA64_SEGREL64MSB     @segrel(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_SECREL32MSB     @secrel(sym + add), data4 MSB</div><div class='del'>-     * R_IA64_SECREL64MSB     @secrel(sym + add), data8 MSB</div><div class='del'>-     * R_IA64_REL32MSB        data 4 + REL</div><div class='del'>-     * R_IA64_REL64MSB        data 8 + REL</div><div class='del'>-     * R_IA64_LTV32MSB        symbol + addend, data4 MSB</div><div class='del'>-     * R_IA64_LTV64MSB        symbol + addend, data8 MSB</div><div class='del'>-     * R_IA64_IPLTMSB         dynamic reloc, imported PLT, MSB</div><div class='del'>-     */</div><div class='del'>-    default:</div><div class='del'>-    case R_IA64_REL32LSB :      /* data 4 + REL */</div><div class='del'>-    case R_IA64_REL64LSB :      /* data 8 + REL */</div><div class='del'>-    case R_IA64_LTV32LSB :      /* symbol + addend, data4 LSB */</div><div class='del'>-    case R_IA64_LTV64LSB :      /* symbol + addend, data8 LSB */</div><div class='del'>-    case R_IA64_IPLTLSB :       /* dynamic reloc, imported PLT, LSB */</div><div class='del'>-	ret = obj_reloc_unhandled;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *ifile = (ia64_file_t *)f;</div><div class='del'>-    Elf64_Addr *opd = (Elf64_Addr *)(ifile-&gt;opd-&gt;contents);</div><div class='del'>-</div><div class='del'>-    if ((opd[0] = mod-&gt;init) != 0)</div><div class='del'>-    {</div><div class='del'>-	opd[1] = ifile-&gt;gp;</div><div class='del'>-	mod-&gt;init = ifile-&gt;opd-&gt;header.sh_addr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((opd[2] = mod-&gt;cleanup) != 0)</div><div class='del'>-    {</div><div class='del'>-	opd[3] = ifile-&gt;gp;</div><div class='del'>-	mod-&gt;cleanup = ifile-&gt;opd-&gt;header.sh_addr + 16;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *f, struct obj_section *archdata_sec)</div><div class='del'>-{</div><div class='del'>-    ia64_file_t *ifile = (ia64_file_t *)f;</div><div class='del'>-    struct archdata {</div><div class='del'>-	unsigned tgt_long unw_table;</div><div class='del'>-	unsigned tgt_long segment_base;</div><div class='del'>-	unsigned tgt_long unw_start;</div><div class='del'>-	unsigned tgt_long unw_end;</div><div class='del'>-	unsigned tgt_long gp;</div><div class='del'>-    } *ad;</div><div class='del'>-    int i;</div><div class='del'>-    struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-    free(archdata_sec-&gt;contents);</div><div class='del'>-    archdata_sec-&gt;contents = xmalloc(sizeof(struct archdata));</div><div class='del'>-    memset(archdata_sec-&gt;contents, 0, sizeof(struct archdata));</div><div class='del'>-    archdata_sec-&gt;header.sh_size = sizeof(struct archdata);</div><div class='del'>-</div><div class='del'>-    ad = (struct archdata *)(archdata_sec-&gt;contents);</div><div class='del'>-    ad-&gt;gp = ifile-&gt;gp;</div><div class='del'>-    ad-&gt;unw_start = 0;</div><div class='del'>-    ad-&gt;unw_end = 0;</div><div class='del'>-    ad-&gt;unw_table = 0;</div><div class='del'>-    ad-&gt;segment_base = f-&gt;sections[1]-&gt;header.sh_addr;</div><div class='del'>-    for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-	sec = f-&gt;sections[i];</div><div class='del'>-	if (sec-&gt;header.sh_type == SHT_IA_64_UNWIND)</div><div class='del'>-	{</div><div class='del'>-	    ad-&gt;unw_start = sec-&gt;header.sh_addr;</div><div class='del'>-	    ad-&gt;unw_end = sec-&gt;header.sh_addr + sec-&gt;header.sh_size;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_kallsyms.c b/mdk-stage1/insmod-modutils/obj/obj_kallsyms.c<br/>deleted file mode 100644<br/>index 8385fb892..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_kallsyms.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_kallsyms.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,292 +0,0 @@</div><div class='del'>-/* Build a section containing all non-stack symbols.</div><div class='del'>-   Copyright 2000 Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;malloc.h&gt;</div><div class='del'>-</div><div class='del'>-#include "obj.h"</div><div class='del'>-#include "kallsyms.h"</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-#define EXPAND_BY 4096  /* Arbitrary */</div><div class='del'>-</div><div class='del'>-/* Append a string to the big list of strings */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-append_string (const char *s, char **strings,</div><div class='del'>-	       ElfW(Word) *strings_size, ElfW(Word) *strings_left)</div><div class='del'>-{</div><div class='del'>-    int l = strlen(s) + 1;</div><div class='del'>-    while (l &gt; *strings_left) {</div><div class='del'>-	*strings = xrealloc(*strings, *strings_size += EXPAND_BY);</div><div class='del'>-	*strings_left += EXPAND_BY;</div><div class='del'>-    }</div><div class='del'>-    memcpy((char *)*strings+*strings_size-*strings_left, s, l);</div><div class='del'>-    *strings_left -= l;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Append a symbol to the big list of symbols */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-append_symbol (const struct kallsyms_symbol *s,</div><div class='del'>-	       struct kallsyms_symbol **symbols,</div><div class='del'>-	       ElfW(Word) *symbols_size, ElfW(Word) *symbols_left)</div><div class='del'>-{</div><div class='del'>-    int l = sizeof(*s);</div><div class='del'>-    while (l &gt; *symbols_left) {</div><div class='del'>-	*symbols = xrealloc(*symbols, *symbols_size += EXPAND_BY);</div><div class='del'>-	*symbols_left += EXPAND_BY;</div><div class='del'>-    }</div><div class='del'>-    memcpy((char *)*symbols+*symbols_size-*symbols_left, s, l);</div><div class='del'>-    *symbols_left -= l;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* qsort compare routine to sort symbols */</div><div class='del'>-</div><div class='del'>-static const char *sym_strings;</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-symbol_compare (const void *a, const void *b)</div><div class='del'>-{</div><div class='del'>-    struct kallsyms_symbol *c = (struct kallsyms_symbol *) a;</div><div class='del'>-    struct kallsyms_symbol *d = (struct kallsyms_symbol *) b;</div><div class='del'>-</div><div class='del'>-    if (c-&gt;symbol_addr &gt; d-&gt;symbol_addr)</div><div class='del'>-	return(1);</div><div class='del'>-    if (c-&gt;symbol_addr &lt; d-&gt;symbol_addr)</div><div class='del'>-	return(-1);</div><div class='del'>-    return(strcmp(sym_strings+c-&gt;name_off, sym_strings+d-&gt;name_off));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Extract all symbols from the input obj_file, ignore ones that are</div><div class='del'>- * no use for debugging, build an output obj_file containing only the</div><div class='del'>- * kallsyms section.</div><div class='del'>- *</div><div class='del'>- * The kallsyms section is a bit unusual.  It deliberately has no</div><div class='del'>- * relocatable data, all "pointers" are represented as byte offsets</div><div class='del'>- * into the the section.  This means it can be stored anywhere without</div><div class='del'>- * relocation problems.  In particular it can be stored within a kernel</div><div class='del'>- * image, it can be stored separately from the kernel image, it can be</div><div class='del'>- * appended to a module just before loading, it can be stored in a</div><div class='del'>- * separate area etc.</div><div class='del'>- *</div><div class='del'>- * Format of the kallsyms section.</div><div class='del'>- *</div><div class='del'>- * Header:</div><div class='del'>- *   Size of header.</div><div class='del'>- *   Total size of kallsyms data, including strings.</div><div class='del'>- *   Number of loaded sections.</div><div class='del'>- *   Offset to first section entry from start of header.</div><div class='del'>- *   Size of each section entry, excluding the name string.</div><div class='del'>- *   Number of symbols.</div><div class='del'>- *   Offset to first symbol entry from start of header.</div><div class='del'>- *   Size of each symbol entry, excluding the name string.</div><div class='del'>- *</div><div class='del'>- * Section entry - one per loaded section.</div><div class='del'>- *   Start of section[1].</div><div class='del'>- *   Size of section.</div><div class='del'>- *   Offset to name of section, from start of strings.</div><div class='del'>- *   Section flags.</div><div class='del'>- *</div><div class='del'>- * Symbol entry - one per symbol in the input file[2].</div><div class='del'>- *   Offset of section that owns this symbol, from start of section data.</div><div class='del'>- *   Address of symbol within the real section[1].</div><div class='del'>- *   Offset to name of symbol, from start of strings.</div><div class='del'>- *</div><div class='del'>- * Notes: [1] This is an exception to the "represent pointers as</div><div class='del'>- *            offsets" rule, it is a value, not an offset.  The start</div><div class='del'>- *            address of a section or a symbol is extracted from the</div><div class='del'>- *            obj_file data which may contain absolute or relocatable</div><div class='del'>- *            addresses.  If the addresses are relocatable then the</div><div class='del'>- *            caller must adjust the section and/or symbol entries in</div><div class='del'>- *            kallsyms after relocation.</div><div class='del'>- *        [2] Only symbols that fall within loaded sections are stored.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_kallsyms (struct obj_file *fin, struct obj_file **fout_result)</div><div class='del'>-{</div><div class='del'>-    struct obj_file *fout;</div><div class='del'>-    int i, loaded = 0, *fin_to_allsym_map;</div><div class='del'>-    struct obj_section *isec, *osec;</div><div class='del'>-    struct kallsyms_header *a_hdr;</div><div class='del'>-    struct kallsyms_section *a_sec;</div><div class='del'>-    ElfW(Off) sec_off;</div><div class='del'>-    struct kallsyms_symbol *symbols = NULL, a_sym;</div><div class='del'>-    ElfW(Word) symbols_size = 0, symbols_left = 0;</div><div class='del'>-    char *strings = NULL, *p;</div><div class='del'>-    ElfW(Word) strings_size = 0, strings_left = 0;</div><div class='del'>-    ElfW(Off) file_offset;</div><div class='del'>-    static char strtab[] = "\000" KALLSYMS_SEC_NAME;</div><div class='del'>-</div><div class='del'>-    /* Create the kallsyms section.  */</div><div class='del'>-    fout = arch_new_file();</div><div class='del'>-    memset(fout, 0, sizeof(*fout));</div><div class='del'>-    fout-&gt;symbol_cmp = strcmp;</div><div class='del'>-    fout-&gt;symbol_hash = obj_elf_hash;</div><div class='del'>-    fout-&gt;load_order_search_start = &amp;fout-&gt;load_order;</div><div class='del'>-</div><div class='del'>-    /* Copy file characteristics from input file and modify to suit */</div><div class='del'>-    memcpy(&amp;fout-&gt;header, &amp;fin-&gt;header, sizeof(fout-&gt;header));</div><div class='del'>-    fout-&gt;header.e_type = ET_REL;		/* Output is relocatable */</div><div class='del'>-    fout-&gt;header.e_entry = 0;			/* No entry point */</div><div class='del'>-    fout-&gt;header.e_phoff = 0;			/* No program header */</div><div class='del'>-    file_offset = sizeof(fout-&gt;header);		/* Step over Elf header */</div><div class='del'>-    fout-&gt;header.e_shoff = file_offset;		/* Section headers next */</div><div class='del'>-    fout-&gt;header.e_phentsize = 0;		/* No program header */</div><div class='del'>-    fout-&gt;header.e_phnum = 0;			/* No program header */</div><div class='del'>-    fout-&gt;header.e_shnum = KALLSYMS_IDX+1;	/* Initial, strtab, kallsyms */</div><div class='del'>-    fout-&gt;header.e_shstrndx = KALLSYMS_IDX-1;	/* strtab */</div><div class='del'>-    file_offset += fout-&gt;header.e_shentsize * fout-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-    /* Populate the section data for kallsyms itself */</div><div class='del'>-    fout-&gt;sections = xmalloc(sizeof(*(fout-&gt;sections))*fout-&gt;header.e_shnum);</div><div class='del'>-    memset(fout-&gt;sections, 0, sizeof(*(fout-&gt;sections))*fout-&gt;header.e_shnum);</div><div class='del'>-</div><div class='del'>-    fout-&gt;sections[0] = osec = arch_new_section();</div><div class='del'>-    memset(osec, 0, sizeof(*osec));</div><div class='del'>-    osec-&gt;header.sh_type = SHT_NULL;</div><div class='del'>-    osec-&gt;header.sh_link = SHN_UNDEF;</div><div class='del'>-</div><div class='del'>-    fout-&gt;sections[KALLSYMS_IDX-1] = osec = arch_new_section();</div><div class='del'>-    memset(osec, 0, sizeof(*osec));</div><div class='del'>-    osec-&gt;name = ".strtab";</div><div class='del'>-    osec-&gt;header.sh_type = SHT_STRTAB;</div><div class='del'>-    osec-&gt;header.sh_link = SHN_UNDEF;</div><div class='del'>-    osec-&gt;header.sh_offset = file_offset;</div><div class='del'>-    osec-&gt;header.sh_size = sizeof(strtab);</div><div class='del'>-    osec-&gt;contents = xmalloc(sizeof(strtab));</div><div class='del'>-    memcpy(osec-&gt;contents, strtab, sizeof(strtab));</div><div class='del'>-    file_offset += osec-&gt;header.sh_size;</div><div class='del'>-</div><div class='del'>-    fout-&gt;sections[KALLSYMS_IDX] = osec = arch_new_section();</div><div class='del'>-    memset(osec, 0, sizeof(*osec));</div><div class='del'>-    osec-&gt;name = KALLSYMS_SEC_NAME;</div><div class='del'>-    osec-&gt;header.sh_name = 1;			/* Offset in strtab */</div><div class='del'>-    osec-&gt;header.sh_type = SHT_PROGBITS;	/* Load it */</div><div class='del'>-    osec-&gt;header.sh_flags = SHF_ALLOC;		/* Read only data */</div><div class='del'>-    osec-&gt;header.sh_link = SHN_UNDEF;</div><div class='del'>-    osec-&gt;header.sh_addralign = sizeof(ElfW(Word));</div><div class='del'>-    file_offset = (file_offset + osec-&gt;header.sh_addralign - 1)</div><div class='del'>-	&amp; -(osec-&gt;header.sh_addralign);</div><div class='del'>-    osec-&gt;header.sh_offset = file_offset;</div><div class='del'>-</div><div class='del'>-    /* How many loaded sections are there? */</div><div class='del'>-    for (i = 0; i &lt; fin-&gt;header.e_shnum; ++i) {</div><div class='del'>-	if (fin-&gt;sections[i]-&gt;header.sh_flags &amp; SHF_ALLOC)</div><div class='del'>-	    ++loaded;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Initial contents, header + one entry per input section.  No strings. */</div><div class='del'>-    osec-&gt;header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);</div><div class='del'>-    a_hdr = (struct kallsyms_header *) osec-&gt;contents =</div><div class='del'>-    	xmalloc(osec-&gt;header.sh_size);</div><div class='del'>-    memset(osec-&gt;contents, 0, osec-&gt;header.sh_size);</div><div class='del'>-    a_hdr-&gt;size = sizeof(*a_hdr);</div><div class='del'>-    a_hdr-&gt;sections = loaded;</div><div class='del'>-    a_hdr-&gt;section_off = a_hdr-&gt;size;</div><div class='del'>-    a_hdr-&gt;section_size = sizeof(*a_sec);</div><div class='del'>-    a_hdr-&gt;symbol_off = osec-&gt;header.sh_size;</div><div class='del'>-    a_hdr-&gt;symbol_size = sizeof(a_sym);</div><div class='del'>-    a_hdr-&gt;start = (ElfW(Addr))(~0);</div><div class='del'>-</div><div class='del'>-    /* Map input section numbers to kallsyms section offsets. */</div><div class='del'>-    sec_off = 0;	/* Offset to first kallsyms section entry */</div><div class='del'>-    fin_to_allsym_map = xmalloc(sizeof(*fin_to_allsym_map)*fin-&gt;header.e_shnum);</div><div class='del'>-    for (i = 0; i &lt; fin-&gt;header.e_shnum; ++i) {</div><div class='del'>-	isec = fin-&gt;sections[i];</div><div class='del'>-	if (isec-&gt;header.sh_flags &amp; SHF_ALLOC) {</div><div class='del'>-	    fin_to_allsym_map[isec-&gt;idx] = sec_off;</div><div class='del'>-	    sec_off += a_hdr-&gt;section_size;</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-	    fin_to_allsym_map[isec-&gt;idx] = -1;	/* Ignore this section */</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Copy the loaded section data. */</div><div class='del'>-    a_sec = (struct kallsyms_section *) ((char *) a_hdr + a_hdr-&gt;section_off);</div><div class='del'>-    for (i = 0; i &lt; fin-&gt;header.e_shnum; ++i) {</div><div class='del'>-	isec = fin-&gt;sections[i];</div><div class='del'>-	if (!(isec-&gt;header.sh_flags &amp; SHF_ALLOC))</div><div class='del'>-	    continue;</div><div class='del'>-	a_sec-&gt;start = isec-&gt;header.sh_addr;</div><div class='del'>-	a_sec-&gt;size = isec-&gt;header.sh_size;</div><div class='del'>-	a_sec-&gt;flags = isec-&gt;header.sh_flags;</div><div class='del'>-	a_sec-&gt;name_off = strings_size - strings_left;</div><div class='del'>-	append_string(isec-&gt;name, &amp;strings, &amp;strings_size, &amp;strings_left);</div><div class='del'>-	if (a_sec-&gt;start &lt; a_hdr-&gt;start)</div><div class='del'>-	    a_hdr-&gt;start = a_sec-&gt;start;</div><div class='del'>-	if (a_sec-&gt;start+a_sec-&gt;size &gt; a_hdr-&gt;end)</div><div class='del'>-	    a_hdr-&gt;end = a_sec-&gt;start+a_sec-&gt;size;</div><div class='del'>-	++a_sec;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Build the kallsyms symbol table from the symbol hashes. */</div><div class='del'>-    for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-	struct obj_symbol *sym = fin-&gt;symtab[i];</div><div class='del'>-	for (sym = fin-&gt;symtab[i]; sym ; sym = sym-&gt;next) {</div><div class='del'>-	    if (!sym || sym-&gt;secidx &gt;= fin-&gt;header.e_shnum)</div><div class='del'>-		continue;</div><div class='del'>-	    if ((a_sym.section_off = fin_to_allsym_map[sym-&gt;secidx]) == -1)</div><div class='del'>-		continue;</div><div class='del'>-	    if (strcmp(sym-&gt;name, "gcc2_compiled.") == 0 ||</div><div class='del'>-		strncmp(sym-&gt;name, "__insmod_", 9) == 0)</div><div class='del'>-		continue;</div><div class='del'>-	    a_sym.symbol_addr = sym-&gt;value;</div><div class='del'>-	    if (fin-&gt;header.e_type == ET_REL)</div><div class='del'>-		a_sym.symbol_addr += fin-&gt;sections[sym-&gt;secidx]-&gt;header.sh_addr;</div><div class='del'>-	    a_sym.name_off = strings_size - strings_left;</div><div class='del'>-	    append_symbol(&amp;a_sym, &amp;symbols, &amp;symbols_size, &amp;symbols_left);</div><div class='del'>-	    append_string(sym-&gt;name, &amp;strings, &amp;strings_size, &amp;strings_left);</div><div class='del'>-	    ++a_hdr-&gt;symbols;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    free(fin_to_allsym_map);</div><div class='del'>-</div><div class='del'>-    /* Sort the symbols into ascending order by address and name */</div><div class='del'>-    sym_strings = strings;	/* For symbol_compare */</div><div class='del'>-    qsort((char *) symbols, (unsigned) a_hdr-&gt;symbols,</div><div class='del'>-	sizeof(* symbols), symbol_compare);</div><div class='del'>-    sym_strings = NULL;</div><div class='del'>-</div><div class='del'>-    /* Put the lot together */</div><div class='del'>-    osec-&gt;header.sh_size = a_hdr-&gt;total_size =</div><div class='del'>-	a_hdr-&gt;symbol_off +</div><div class='del'>-	a_hdr-&gt;symbols*a_hdr-&gt;symbol_size +</div><div class='del'>-	strings_size - strings_left;</div><div class='del'>-    a_hdr = (struct kallsyms_header *) osec-&gt;contents =</div><div class='del'>-	xrealloc(a_hdr, a_hdr-&gt;total_size);</div><div class='del'>-    p = (char *)a_hdr + a_hdr-&gt;symbol_off;</div><div class='del'>-    memcpy(p, symbols, a_hdr-&gt;symbols*a_hdr-&gt;symbol_size);</div><div class='del'>-    free(symbols);</div><div class='del'>-    p += a_hdr-&gt;symbols*a_hdr-&gt;symbol_size;</div><div class='del'>-    a_hdr-&gt;string_off = p - (char *)a_hdr;</div><div class='del'>-    memcpy(p, strings, strings_size - strings_left);</div><div class='del'>-    free(strings);</div><div class='del'>-</div><div class='del'>-    *fout_result = fout;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_load.c b/mdk-stage1/insmod-modutils/obj/obj_load.c<br/>deleted file mode 100644<br/>index 4db20a998..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_load.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_load.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,354 +0,0 @@</div><div class='del'>-/* Elf file reader.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-   obj_free() added by Björn Ekwall &lt;bj0rn@blox.se&gt; March 1999</div><div class='del'>-   Support for kallsyms Keith Owens &lt;kaos@ocs.com.au&gt; April 2000</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;alloca.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include "obj.h"</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-obj_load (int fp, Elf32_Half e_type, const char *filename)</div><div class='del'>-{</div><div class='del'>-  struct obj_file *f;</div><div class='del'>-  ElfW(Shdr) *section_headers;</div><div class='del'>-  int shnum, i;</div><div class='del'>-  char *shstrtab;</div><div class='del'>-</div><div class='del'>-  /* Read the file header.  */</div><div class='del'>-</div><div class='del'>-  f = arch_new_file();</div><div class='del'>-  memset(f, 0, sizeof(*f));</div><div class='del'>-  f-&gt;symbol_cmp = strcmp;</div><div class='del'>-  f-&gt;symbol_hash = obj_elf_hash;</div><div class='del'>-  f-&gt;load_order_search_start = &amp;f-&gt;load_order;</div><div class='del'>-</div><div class='del'>-  gzf_lseek(fp, 0, SEEK_SET);</div><div class='del'>-  if (gzf_read(fp, &amp;f-&gt;header, sizeof(f-&gt;header)) != sizeof(f-&gt;header))</div><div class='del'>-    {</div><div class='del'>-      error("error reading ELF header %s: %m", filename);</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (f-&gt;header.e_ident[EI_MAG0] != ELFMAG0</div><div class='del'>-      || f-&gt;header.e_ident[EI_MAG1] != ELFMAG1</div><div class='del'>-      || f-&gt;header.e_ident[EI_MAG2] != ELFMAG2</div><div class='del'>-      || f-&gt;header.e_ident[EI_MAG3] != ELFMAG3)</div><div class='del'>-    {</div><div class='del'>-      error("%s is not an ELF file", filename);</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-  if (f-&gt;header.e_ident[EI_CLASS] != ELFCLASSM</div><div class='del'>-      || f-&gt;header.e_ident[EI_DATA] != ELFDATAM</div><div class='del'>-      || f-&gt;header.e_ident[EI_VERSION] != EV_CURRENT</div><div class='del'>-      || !MATCH_MACHINE(f-&gt;header.e_machine))</div><div class='del'>-    {</div><div class='del'>-      error("ELF file %s not for this architecture", filename);</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-  if (f-&gt;header.e_type != e_type &amp;&amp; e_type != ET_NONE)</div><div class='del'>-    {</div><div class='del'>-      switch (e_type) {</div><div class='del'>-      case ET_REL:</div><div class='del'>-	error("ELF file %s not a relocatable object", filename);</div><div class='del'>-	break;</div><div class='del'>-      case ET_EXEC:</div><div class='del'>-	error("ELF file %s not an executable object", filename);</div><div class='del'>-	break;</div><div class='del'>-      default:</div><div class='del'>-	error("ELF file %s has wrong type, expecting %d got %d",</div><div class='del'>-		filename, e_type, f-&gt;header.e_type);</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* Read the section headers.  */</div><div class='del'>-</div><div class='del'>-  if (f-&gt;header.e_shentsize != sizeof(ElfW(Shdr)))</div><div class='del'>-    {</div><div class='del'>-      error("section header size mismatch %s: %lu != %lu",</div><div class='del'>-	    filename,</div><div class='del'>-	    (unsigned long)f-&gt;header.e_shentsize,</div><div class='del'>-	    (unsigned long)sizeof(ElfW(Shdr)));</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  shnum = f-&gt;header.e_shnum;</div><div class='del'>-  f-&gt;sections = xmalloc(sizeof(struct obj_section *) * shnum);</div><div class='del'>-  memset(f-&gt;sections, 0, sizeof(struct obj_section *) * shnum);</div><div class='del'>-</div><div class='del'>-  section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);</div><div class='del'>-  gzf_lseek(fp, f-&gt;header.e_shoff, SEEK_SET);</div><div class='del'>-  if (gzf_read(fp, section_headers, sizeof(ElfW(Shdr))*shnum) != sizeof(ElfW(Shdr))*shnum)</div><div class='del'>-    {</div><div class='del'>-      error("error reading ELF section headers %s: %m", filename);</div><div class='del'>-      return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* Read the section data.  */</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-      f-&gt;sections[i] = sec = arch_new_section();</div><div class='del'>-      memset(sec, 0, sizeof(*sec));</div><div class='del'>-</div><div class='del'>-      sec-&gt;header = section_headers[i];</div><div class='del'>-      sec-&gt;idx = i;</div><div class='del'>-</div><div class='del'>-      switch (sec-&gt;header.sh_type)</div><div class='del'>-	{</div><div class='del'>-	case SHT_NULL:</div><div class='del'>-	case SHT_NOTE:</div><div class='del'>-	case SHT_NOBITS:</div><div class='del'>-	  /* ignore */</div><div class='del'>-	  break;</div><div class='del'>-</div><div class='del'>-	case SHT_PROGBITS:</div><div class='del'>-	case SHT_SYMTAB:</div><div class='del'>-	case SHT_STRTAB:</div><div class='del'>-	case SHT_RELM:</div><div class='del'>-	  if (sec-&gt;header.sh_size &gt; 0)</div><div class='del'>-	    {</div><div class='del'>-	      sec-&gt;contents = xmalloc(sec-&gt;header.sh_size);</div><div class='del'>-	      gzf_lseek(fp, sec-&gt;header.sh_offset, SEEK_SET);</div><div class='del'>-	      if (gzf_read(fp, sec-&gt;contents, sec-&gt;header.sh_size) != sec-&gt;header.sh_size)</div><div class='del'>-		{</div><div class='del'>-		  error("error reading ELF section data %s: %m", filename);</div><div class='del'>-		  return NULL;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	  else</div><div class='del'>-	    sec-&gt;contents = NULL;</div><div class='del'>-	  break;</div><div class='del'>-</div><div class='del'>-#if SHT_RELM == SHT_REL</div><div class='del'>-	case SHT_RELA:</div><div class='del'>-	  if (sec-&gt;header.sh_size) {</div><div class='del'>-	    error("RELA relocations not supported on this architecture %s", filename);</div><div class='del'>-	    return NULL;</div><div class='del'>-	  }</div><div class='del'>-	  break;</div><div class='del'>-#else</div><div class='del'>-	case SHT_REL:</div><div class='del'>-	  if (sec-&gt;header.sh_size) {</div><div class='del'>-	    error("REL relocations not supported on this architecture %s", filename);</div><div class='del'>-	    return NULL;</div><div class='del'>-	  }</div><div class='del'>-	  break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	  if (sec-&gt;header.sh_type &gt;= SHT_LOPROC)</div><div class='del'>-	    {</div><div class='del'>-	      if (arch_load_proc_section(sec, fp) &lt; 0)</div><div class='del'>-		return NULL;</div><div class='del'>-	      break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	  error("can't handle sections of type %ld %s",</div><div class='del'>-		(long)sec-&gt;header.sh_type, filename);</div><div class='del'>-	  return NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* Do what sort of interpretation as needed by each section.  */</div><div class='del'>-</div><div class='del'>-  shstrtab = f-&gt;sections[f-&gt;header.e_shstrndx]-&gt;contents;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *sec = f-&gt;sections[i];</div><div class='del'>-      sec-&gt;name = shstrtab + sec-&gt;header.sh_name;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *sec = f-&gt;sections[i];</div><div class='del'>-</div><div class='del'>-      /* .modinfo and .modstring should be contents only but gcc has no</div><div class='del'>-       *  attribute for that.  The kernel may have marked these sections as</div><div class='del'>-       *  ALLOC, ignore the allocate bit.</div><div class='del'>-       */</div><div class='del'>-      if (strcmp(sec-&gt;name, ".modinfo") == 0 ||</div><div class='del'>-	  strcmp(sec-&gt;name, ".modstring") == 0)</div><div class='del'>-	sec-&gt;header.sh_flags &amp;= ~SHF_ALLOC;</div><div class='del'>-</div><div class='del'>-      if (sec-&gt;header.sh_flags &amp; SHF_ALLOC)</div><div class='del'>-	obj_insert_section_load_order(f, sec);</div><div class='del'>-</div><div class='del'>-      switch (sec-&gt;header.sh_type)</div><div class='del'>-	{</div><div class='del'>-	case SHT_SYMTAB:</div><div class='del'>-	  {</div><div class='del'>-	    unsigned long nsym, j;</div><div class='del'>-	    char *strtab;</div><div class='del'>-	    ElfW(Sym) *sym;</div><div class='del'>-</div><div class='del'>-	    if (sec-&gt;header.sh_entsize != sizeof(ElfW(Sym)))</div><div class='del'>-	      {</div><div class='del'>-		error("symbol size mismatch %s: %lu != %lu",</div><div class='del'>-		      filename,</div><div class='del'>-		      (unsigned long)sec-&gt;header.sh_entsize,</div><div class='del'>-		      (unsigned long)sizeof(ElfW(Sym)));</div><div class='del'>-		return NULL;</div><div class='del'>-	      }</div><div class='del'>-</div><div class='del'>-	    nsym = sec-&gt;header.sh_size / sizeof(ElfW(Sym));</div><div class='del'>-	    strtab = f-&gt;sections[sec-&gt;header.sh_link]-&gt;contents;</div><div class='del'>-	    sym = (ElfW(Sym) *) sec-&gt;contents;</div><div class='del'>-</div><div class='del'>-	    /* Allocate space for a table of local symbols.  */</div><div class='del'>-	    j = f-&gt;local_symtab_size = sec-&gt;header.sh_info;</div><div class='del'>-	    f-&gt;local_symtab = xmalloc(j *= sizeof(struct obj_symbol *));</div><div class='del'>-	    memset(f-&gt;local_symtab, 0, j);</div><div class='del'>-</div><div class='del'>-	    /* Insert all symbols into the hash table.  */</div><div class='del'>-	    for (j = 1, ++sym; j &lt; nsym; ++j, ++sym)</div><div class='del'>-	      {</div><div class='del'>-		const char *name;</div><div class='del'>-		if (sym-&gt;st_name)</div><div class='del'>-		  name = strtab+sym-&gt;st_name;</div><div class='del'>-		else</div><div class='del'>-		  name = f-&gt;sections[sym-&gt;st_shndx]-&gt;name;</div><div class='del'>-</div><div class='del'>-		obj_add_symbol(f, name, j, sym-&gt;st_info, sym-&gt;st_shndx,</div><div class='del'>-			       sym-&gt;st_value, sym-&gt;st_size);</div><div class='del'>-</div><div class='del'>-	      }</div><div class='del'>-	  }</div><div class='del'>-	break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* second pass to add relocation data to symbols */</div><div class='del'>-  for (i = 0; i &lt; shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *sec = f-&gt;sections[i];</div><div class='del'>-      switch (sec-&gt;header.sh_type)</div><div class='del'>-	{</div><div class='del'>-	case SHT_RELM:</div><div class='del'>-	  {</div><div class='del'>-	    unsigned long nrel, j;</div><div class='del'>-	    ElfW(RelM) *rel;</div><div class='del'>-	    struct obj_section *symtab;</div><div class='del'>-	    char *strtab;</div><div class='del'>-	    if (sec-&gt;header.sh_entsize != sizeof(ElfW(RelM)))</div><div class='del'>-	      {</div><div class='del'>-		error("relocation entry size mismatch %s: %lu != %lu",</div><div class='del'>-		      filename,</div><div class='del'>-		      (unsigned long)sec-&gt;header.sh_entsize,</div><div class='del'>-		      (unsigned long)sizeof(ElfW(RelM)));</div><div class='del'>-		return NULL;</div><div class='del'>-	      }</div><div class='del'>-</div><div class='del'>-	    nrel = sec-&gt;header.sh_size / sizeof(ElfW(RelM));</div><div class='del'>-	    rel = (ElfW(RelM) *) sec-&gt;contents;</div><div class='del'>-	    symtab = f-&gt;sections[sec-&gt;header.sh_link];</div><div class='del'>-	    strtab = f-&gt;sections[symtab-&gt;header.sh_link]-&gt;contents;</div><div class='del'>-</div><div class='del'>-	    /* Save the relocate type in each symbol entry.  */</div><div class='del'>-	    for (j = 0; j &lt; nrel; ++j, ++rel)</div><div class='del'>-	      {</div><div class='del'>-		ElfW(Sym) *extsym;</div><div class='del'>-		struct obj_symbol *intsym;</div><div class='del'>-		unsigned long symndx;</div><div class='del'>-		symndx = ELFW(R_SYM)(rel-&gt;r_info);</div><div class='del'>-		if (symndx)</div><div class='del'>-		  {</div><div class='del'>-		    extsym = ((ElfW(Sym) *) symtab-&gt;contents) + symndx;</div><div class='del'>-		    if (ELFW(ST_BIND)(extsym-&gt;st_info) == STB_LOCAL)</div><div class='del'>-		      {</div><div class='del'>-			/* Local symbols we look up in the local table to be sure</div><div class='del'>-			   we get the one that is really intended.  */</div><div class='del'>-			intsym = f-&gt;local_symtab[symndx];</div><div class='del'>-		      }</div><div class='del'>-		    else</div><div class='del'>-		      {</div><div class='del'>-			/* Others we look up in the hash table.  */</div><div class='del'>-			const char *name;</div><div class='del'>-			if (extsym-&gt;st_name)</div><div class='del'>-			  name = strtab + extsym-&gt;st_name;</div><div class='del'>-			else</div><div class='del'>-			  name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-			intsym = obj_find_symbol(f, name);</div><div class='del'>-		      }</div><div class='del'>-		    intsym-&gt;r_type = ELFW(R_TYPE)(rel-&gt;r_info);</div><div class='del'>-		  }</div><div class='del'>-	      }</div><div class='del'>-	  }</div><div class='del'>-	  break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  f-&gt;filename = xstrdup(filename);</div><div class='del'>-</div><div class='del'>-  return f;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void obj_free(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-	struct obj_section *sec;</div><div class='del'>-	struct obj_symbol *sym;</div><div class='del'>-	struct obj_symbol *next;</div><div class='del'>-	int i;</div><div class='del'>-	int n;</div><div class='del'>-</div><div class='del'>-	if (f-&gt;sections) {</div><div class='del'>-		n = f-&gt;header.e_shnum;</div><div class='del'>-		for (i = 0; i &lt; n; ++i) {</div><div class='del'>-			if ((sec = f-&gt;sections[i]) != NULL) {</div><div class='del'>-				if (sec-&gt;contents)</div><div class='del'>-					free(sec-&gt;contents);</div><div class='del'>-				free(sec);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		free(f-&gt;sections);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; HASH_BUCKETS; ++i) {</div><div class='del'>-		for (sym = f-&gt;symtab[i]; sym; sym = next) {</div><div class='del'>-			next = sym-&gt;next;</div><div class='del'>-			free(sym);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (f-&gt;local_symtab)</div><div class='del'>-		free(f-&gt;local_symtab);</div><div class='del'>-</div><div class='del'>-	if (f-&gt;filename)</div><div class='del'>-		free((char *)(f-&gt;filename));</div><div class='del'>-</div><div class='del'>-	if (f-&gt;persist)</div><div class='del'>-		free((char *)(f-&gt;persist));</div><div class='del'>-</div><div class='del'>-	free(f);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_m68k.c b/mdk-stage1/insmod-modutils/obj/obj_m68k.c<br/>deleted file mode 100644<br/>index cb485aed7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_m68k.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_m68k.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,147 +0,0 @@</div><div class='del'>-/* m68k specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_file));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_symbol));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *ef,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rela *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  char *loc = targsec-&gt;contents + rel-&gt;r_offset;</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_68K_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_68K_8:</div><div class='del'>-      if (v &gt; 0xff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *(char *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_68K_16:</div><div class='del'>-      if (v &gt; 0xffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *(short *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_68K_32:</div><div class='del'>-      *(int *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_68K_PC8:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if ((Elf32_Sword)v &gt; 0x7f || (Elf32_Sword)v &lt; -(Elf32_Sword)0x80)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *(char *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_68K_PC16:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if ((Elf32_Sword)v &gt; 0x7fff || (Elf32_Sword)v &lt; -(Elf32_Sword)0x8000)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *(short *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_68K_PC32:</div><div class='del'>-      *(int *)loc = v - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_68K_RELATIVE:</div><div class='del'>-      *(int *)loc += ef-&gt;baseaddr;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *ef)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_mips.c b/mdk-stage1/insmod-modutils/obj/obj_mips.c<br/>deleted file mode 100644<br/>index c2315b659..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_mips.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_mips.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,238 +0,0 @@</div><div class='del'>-/* MIPS specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1997, 1998 Linux International.</div><div class='del'>-   Contributed by Ralf Baechle &lt;ralf@gnu.ai.mit.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct mips_hi16</div><div class='del'>-{</div><div class='del'>-  struct mips_hi16 *next;</div><div class='del'>-  Elf32_Addr *addr;</div><div class='del'>-  Elf32_Addr value;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct mips_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct mips_hi16 *mips_hi16_list;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct mips_file *mf;</div><div class='del'>-</div><div class='del'>-  mf = xmalloc(sizeof(*mf));</div><div class='del'>-  mf-&gt;mips_hi16_list = NULL;</div><div class='del'>-</div><div class='del'>-  return (struct obj_file *) mf;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_symbol));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-  switch (sec-&gt;header.sh_type)</div><div class='del'>-    {</div><div class='del'>-    case SHT_MIPS_DEBUG:</div><div class='del'>-    case SHT_MIPS_REGINFO:</div><div class='del'>-      /* Actually these two sections are as useless as something can be ...  */</div><div class='del'>-      sec-&gt;contents = NULL;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case SHT_MIPS_LIBLIST:</div><div class='del'>-    case SHT_MIPS_CONFLICT:</div><div class='del'>-    case SHT_MIPS_GPTAB:</div><div class='del'>-    case SHT_MIPS_UCODE:</div><div class='del'>-    case SHT_MIPS_OPTIONS:</div><div class='del'>-    case SHT_MIPS_DWARF:</div><div class='del'>-    case SHT_MIPS_EVENTS:</div><div class='del'>-      /* These shouldn't ever be in a module file.  */</div><div class='del'>-      error("Unhandled section header type: %08x", sec-&gt;header.sh_type);</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      /* We don't even know the type.  This time it might as well be a</div><div class='del'>-	 supernova.  */</div><div class='del'>-      error("Unknown section header type: %08x", sec-&gt;header.sh_type);</div><div class='del'>-      return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rel *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  struct mips_file *mf = (struct mips_file *)f;</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  /* _gp_disp is a magic symbol for PIC which is not supported for</div><div class='del'>-     the kernel and loadable modules.  */</div><div class='del'>-  if (strcmp(sym-&gt;name, "_gp_disp") == 0)</div><div class='del'>-	ret = obj_reloc_unhandled;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_MIPS_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_MIPS_32:</div><div class='del'>-      *loc += v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_MIPS_26:</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      if ((v &amp; 0xf0000000) != ((dot + 4) &amp; 0xf0000000))</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x03ffffff) | ((*loc + (v &gt;&gt; 2)) &amp; 0x03ffffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_MIPS_HI16:</div><div class='del'>-      {</div><div class='del'>-	struct mips_hi16 *n;</div><div class='del'>-</div><div class='del'>-	/* We cannot relocate this one now because we don't know the value</div><div class='del'>-	   of the carry we need to add.  Save the information, and let LO16</div><div class='del'>-	   do the actual relocation.  */</div><div class='del'>-	n = (struct mips_hi16 *) xmalloc (sizeof *n);</div><div class='del'>-	n-&gt;addr = loc;</div><div class='del'>-	n-&gt;value = v;</div><div class='del'>-	n-&gt;next = mf-&gt;mips_hi16_list;</div><div class='del'>-	mf-&gt;mips_hi16_list = n;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-    case R_MIPS_LO16:</div><div class='del'>-      {</div><div class='del'>-	unsigned long insnlo = *loc;</div><div class='del'>-	Elf32_Addr val, vallo;</div><div class='del'>-</div><div class='del'>-	/* Sign extend the addend we extract from the lo insn.  */</div><div class='del'>-	vallo = ((insnlo &amp; 0xffff) ^ 0x8000) - 0x8000;</div><div class='del'>-</div><div class='del'>-	if (mf-&gt;mips_hi16_list != NULL)</div><div class='del'>-	  {</div><div class='del'>-	    struct mips_hi16 *l;</div><div class='del'>-</div><div class='del'>-	    l = mf-&gt;mips_hi16_list;</div><div class='del'>-	    while (l != NULL)</div><div class='del'>-	      {</div><div class='del'>-		struct mips_hi16 *next;</div><div class='del'>-		unsigned long insn;</div><div class='del'>-</div><div class='del'>-		/* The value for the HI16 had best be the same. */</div><div class='del'>-		assert(v == l-&gt;value);</div><div class='del'>-</div><div class='del'>-		/* Do the HI16 relocation.  Note that we actually don't</div><div class='del'>-		   need to know anything about the LO16 itself, except where</div><div class='del'>-		   to find the low 16 bits of the addend needed by the LO16.  */</div><div class='del'>-		insn = *l-&gt;addr;</div><div class='del'>-		val = ((insn &amp; 0xffff) &lt;&lt; 16) + vallo;</div><div class='del'>-		val += v;</div><div class='del'>-</div><div class='del'>-		/* Account for the sign extension that will happen in the</div><div class='del'>-		   low bits.  */</div><div class='del'>-		val = ((val &gt;&gt; 16) + ((val &amp; 0x8000) != 0)) &amp; 0xffff;</div><div class='del'>-</div><div class='del'>-		insn = (insn &amp;~ 0xffff) | val;</div><div class='del'>-		*l-&gt;addr = insn;</div><div class='del'>-</div><div class='del'>-		next = l-&gt;next;</div><div class='del'>-		free(l);</div><div class='del'>-		l = next;</div><div class='del'>-	      }</div><div class='del'>-</div><div class='del'>-	    mf-&gt;mips_hi16_list = NULL;</div><div class='del'>-	  }</div><div class='del'>-</div><div class='del'>-	/* Ok, we're done with the HI16 relocs.  Now deal with the LO16.  */</div><div class='del'>-	val = v + vallo;</div><div class='del'>-	insnlo = (insnlo &amp; ~0xffff) | (val &amp; 0xffff);</div><div class='del'>-	*loc = insnlo;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_ppc.c b/mdk-stage1/insmod-modutils/obj/obj_ppc.c<br/>deleted file mode 100644<br/>index 89bb8e46b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_ppc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_ppc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,255 +0,0 @@</div><div class='del'>-/* PowerPC specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Adapted by Paul Mackerras &lt;paulus@cs.anu.edu.au&gt; from the</div><div class='del'>-   obj-sparc.c and obj-alpha.c files.</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unfortunately, the bl (branch-and-link) instruction used for</div><div class='del'>- * procedure calls on the PowerPC can only reach +/- 32MB from the</div><div class='del'>- * current instruction.  If the module is loaded far enough away from</div><div class='del'>- * the main kernel text (or other modules) that this limit is</div><div class='del'>- * exceeded, we have to redirect procedure calls via a procedure</div><div class='del'>- * linkage table (PLT).  Each entry in the PLT contains instructions</div><div class='del'>- * to put the address of the procedure in a register and jump to it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef unsigned int instruction;	/* a powerpc instruction (4 bytes) */</div><div class='del'>-</div><div class='del'>-struct ppc_plt_entry</div><div class='del'>-{</div><div class='del'>-  struct ppc_plt_entry *next;</div><div class='del'>-  ElfW(Addr) addend;</div><div class='del'>-  int offset;</div><div class='del'>-  int inited;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppc_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file file;</div><div class='del'>-  struct obj_section *plt;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppc_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol sym;</div><div class='del'>-  struct ppc_plt_entry *plt_entries;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct ppc_file *f;</div><div class='del'>-</div><div class='del'>-  f = xmalloc(sizeof(struct ppc_file));</div><div class='del'>-  f-&gt;plt = NULL;</div><div class='del'>-  return &amp;f-&gt;file;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  struct ppc_symbol *p;</div><div class='del'>-</div><div class='del'>-  p = xmalloc(sizeof(struct ppc_symbol));</div><div class='del'>-  p-&gt;plt_entries = NULL;</div><div class='del'>-  return &amp;p-&gt;sym;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *ef,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rela *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  struct ppc_file *pf = (struct ppc_file *) ef;</div><div class='del'>-  struct ppc_symbol *psym = (struct ppc_symbol *) sym;</div><div class='del'>-  struct ppc_plt_entry *pe;</div><div class='del'>-  instruction *ip;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_PPC_ADDR16_HA:</div><div class='del'>-      *(unsigned short *)loc = (v + 0x8000) &gt;&gt; 16;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PPC_ADDR16_HI:</div><div class='del'>-      *(unsigned short *)loc = v &gt;&gt; 16;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PPC_ADDR16_LO:</div><div class='del'>-      *(unsigned short *)loc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PPC_REL24:</div><div class='del'>-      /* find the plt entry and initialize it if necessary */</div><div class='del'>-      assert(psym != NULL);</div><div class='del'>-      for (pe = psym-&gt;plt_entries; pe != NULL &amp;&amp; pe-&gt;addend != rel-&gt;r_addend; )</div><div class='del'>-	pe = pe-&gt;next;</div><div class='del'>-      assert(pe != NULL);</div><div class='del'>-      if (!pe-&gt;inited)</div><div class='del'>-	{</div><div class='del'>-	  ip = (instruction *) (pf-&gt;plt-&gt;contents + pe-&gt;offset);</div><div class='del'>-	  ip[0] = 0x3d600000 + ((v + 0x8000) &gt;&gt; 16);  /* lis r11,sym@ha */</div><div class='del'>-	  ip[1] = 0x396b0000 + (v &amp; 0xffff);	      /* addi r11,r11,sym@l */</div><div class='del'>-	  ip[2] = 0x7d6903a6;			      /* mtctr r11 */</div><div class='del'>-	  ip[3] = 0x4e800420;			      /* bctr */</div><div class='del'>-	  pe-&gt;inited = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-      v -= dot;</div><div class='del'>-      if ((int)v &lt; -0x02000000 || (int)v &gt;= 0x02000000)</div><div class='del'>-	{</div><div class='del'>-	  /* go via the plt */</div><div class='del'>-	  v = pf-&gt;plt-&gt;header.sh_addr + pe-&gt;offset - dot;</div><div class='del'>-	}</div><div class='del'>-      if (v &amp; 3)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x03fffffc) | (v &amp; 0x03fffffc);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PPC_REL32:</div><div class='del'>-      *loc = v - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_PPC_ADDR32:</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct ppc_file *pf = (struct ppc_file *) f;</div><div class='del'>-  int i, offset;</div><div class='del'>-  struct obj_section *sec, *syms, *strs;</div><div class='del'>-  ElfW(Rela) *rel, *relend;</div><div class='del'>-  ElfW(Sym) *symtab, *extsym;</div><div class='del'>-  const char *strtab, *name;</div><div class='del'>-  struct ppc_symbol *intsym;</div><div class='del'>-  struct ppc_plt_entry *pe;</div><div class='del'>-</div><div class='del'>-  offset = 0;</div><div class='del'>-  for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      sec = f-&gt;sections[i];</div><div class='del'>-      if (sec-&gt;header.sh_type != SHT_RELM)</div><div class='del'>-	continue;</div><div class='del'>-      syms = f-&gt;sections[sec-&gt;header.sh_link];</div><div class='del'>-      strs = f-&gt;sections[syms-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (ElfW(RelM) *) sec-&gt;contents;</div><div class='del'>-      relend = rel + (sec-&gt;header.sh_size / sizeof(ElfW(RelM)));</div><div class='del'>-      symtab = (ElfW(Sym) *) syms-&gt;contents;</div><div class='del'>-      strtab = (const char *) strs-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  if (ELF32_R_TYPE(rel-&gt;r_info) != R_PPC_REL24)</div><div class='del'>-	    continue;</div><div class='del'>-	  extsym = &amp;symtab[ELF32_R_SYM(rel-&gt;r_info)];</div><div class='del'>-	  if (extsym-&gt;st_name)</div><div class='del'>-	    name = strtab + extsym-&gt;st_name;</div><div class='del'>-	  else</div><div class='del'>-	    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	  intsym = (struct ppc_symbol *) obj_find_symbol(f, name);</div><div class='del'>-</div><div class='del'>-	  for (pe = intsym-&gt;plt_entries; pe != NULL; pe = pe-&gt;next)</div><div class='del'>-	    if (pe-&gt;addend == rel-&gt;r_addend)</div><div class='del'>-	      break;</div><div class='del'>-	  if (pe == NULL)</div><div class='del'>-	    {</div><div class='del'>-	      pe = xmalloc(sizeof(struct ppc_plt_entry));</div><div class='del'>-	      pe-&gt;next = intsym-&gt;plt_entries;</div><div class='del'>-	      pe-&gt;addend = rel-&gt;r_addend;</div><div class='del'>-	      pe-&gt;offset = offset;</div><div class='del'>-	      pe-&gt;inited = 0;</div><div class='del'>-	      intsym-&gt;plt_entries = pe;</div><div class='del'>-	      offset += 16;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  pf-&gt;plt = obj_create_alloced_section(f, ".plt", 16, offset);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_reloc.c b/mdk-stage1/insmod-modutils/obj/obj_reloc.c<br/>deleted file mode 100644<br/>index f5f2de90d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_reloc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_reloc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,435 +0,0 @@</div><div class='del'>-/* Elf relocation routines.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;alloca.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_string_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		 const char *string)</div><div class='del'>-{</div><div class='del'>-  struct obj_string_patch_struct *p;</div><div class='del'>-  struct obj_section *strsec;</div><div class='del'>-  size_t len = strlen(string)+1;</div><div class='del'>-  char *loc;</div><div class='del'>-</div><div class='del'>-  p = xmalloc(sizeof(*p));</div><div class='del'>-  p-&gt;next = f-&gt;string_patches;</div><div class='del'>-  p-&gt;reloc_secidx = secidx;</div><div class='del'>-  p-&gt;reloc_offset = offset;</div><div class='del'>-  f-&gt;string_patches = p;</div><div class='del'>-</div><div class='del'>-  strsec = obj_find_section(f, ".kstrtab");</div><div class='del'>-  if (strsec == NULL)</div><div class='del'>-    {</div><div class='del'>-      strsec = obj_create_alloced_section(f, ".kstrtab", 1, len);</div><div class='del'>-      p-&gt;string_offset = 0;</div><div class='del'>-      loc = strsec-&gt;contents;</div><div class='del'>-    }</div><div class='del'>-  else</div><div class='del'>-    {</div><div class='del'>-      p-&gt;string_offset = strsec-&gt;header.sh_size;</div><div class='del'>-      loc = obj_extend_section(strsec, len);</div><div class='del'>-    }</div><div class='del'>-  memcpy(loc, string, len);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_symbol_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,</div><div class='del'>-		 struct obj_symbol *sym)</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol_patch_struct *p;</div><div class='del'>-</div><div class='del'>-  p = xmalloc(sizeof(*p));</div><div class='del'>-  p-&gt;next = f-&gt;symbol_patches;</div><div class='del'>-  p-&gt;reloc_secidx = secidx;</div><div class='del'>-  p-&gt;reloc_offset = offset;</div><div class='del'>-  p-&gt;sym = sym;</div><div class='del'>-  f-&gt;symbol_patches = p;</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_check_undefineds(struct obj_file *f, int quiet)</div><div class='del'>-{</div><div class='del'>-  unsigned long i;</div><div class='del'>-  int ret = 1;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_symbol *sym;</div><div class='del'>-      for (sym = f-&gt;symtab[i]; sym ; sym = sym-&gt;next)</div><div class='del'>-	if (sym-&gt;secidx == SHN_UNDEF)</div><div class='del'>-	  {</div><div class='del'>-	    if (ELFW(ST_BIND)(sym-&gt;info) == STB_WEAK)</div><div class='del'>-	      {</div><div class='del'>-		sym-&gt;secidx = SHN_ABS;</div><div class='del'>-		sym-&gt;value = 0;</div><div class='del'>-	      }</div><div class='del'>-	    else if (sym-&gt;r_type) /* assumes R_arch_NONE is 0 on all arch */</div><div class='del'>-	      {</div><div class='del'>-		if (!quiet)</div><div class='del'>-			error("unresolved symbol %s", sym-&gt;name);</div><div class='del'>-		ret = 0;</div><div class='del'>-	      }</div><div class='del'>-	  }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_clear_undefineds(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  unsigned long i;</div><div class='del'>-  struct obj_symbol *sym;</div><div class='del'>-  for (i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-    {</div><div class='del'>-      for (sym = f-&gt;symtab[i]; sym ; sym = sym-&gt;next)</div><div class='del'>-	if (sym-&gt;secidx == SHN_UNDEF)</div><div class='del'>-	  {</div><div class='del'>-	    sym-&gt;secidx = SHN_ABS;</div><div class='del'>-	    sym-&gt;value = 0;</div><div class='del'>-	  }</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-obj_allocate_commons(struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct common_entry</div><div class='del'>-  {</div><div class='del'>-    struct common_entry *next;</div><div class='del'>-    struct obj_symbol *sym;</div><div class='del'>-  } *common_head = NULL;</div><div class='del'>-</div><div class='del'>-  unsigned long i;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; HASH_BUCKETS; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_symbol *sym;</div><div class='del'>-      for (sym = f-&gt;symtab[i]; sym ; sym = sym-&gt;next)</div><div class='del'>-	if (sym-&gt;secidx == SHN_COMMON)</div><div class='del'>-	  {</div><div class='del'>-	    /* Collect all COMMON symbols and sort them by size so as to</div><div class='del'>-	       minimize space wasted by alignment requirements.  */</div><div class='del'>-	    {</div><div class='del'>-	      struct common_entry **p, *n;</div><div class='del'>-	      for (p = &amp;common_head; *p ; p = &amp;(*p)-&gt;next)</div><div class='del'>-		if (sym-&gt;size &lt;= (*p)-&gt;sym-&gt;size)</div><div class='del'>-		  break;</div><div class='del'>-</div><div class='del'>-	      n = alloca(sizeof(*n));</div><div class='del'>-	      n-&gt;next = *p;</div><div class='del'>-	      n-&gt;sym = sym;</div><div class='del'>-	      *p = n;</div><div class='del'>-	    }</div><div class='del'>-	  }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  for (i = 1; i &lt; f-&gt;local_symtab_size; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_symbol *sym = f-&gt;local_symtab[i];</div><div class='del'>-      if (sym &amp;&amp; sym-&gt;secidx == SHN_COMMON)</div><div class='del'>-	{</div><div class='del'>-	  struct common_entry **p, *n;</div><div class='del'>-	  for (p = &amp;common_head; *p ; p = &amp;(*p)-&gt;next)</div><div class='del'>-	    if (sym == (*p)-&gt;sym)</div><div class='del'>-	      break;</div><div class='del'>-	    else if (sym-&gt;size &lt; (*p)-&gt;sym-&gt;size)</div><div class='del'>-	      {</div><div class='del'>-		n = alloca(sizeof(*n));</div><div class='del'>-		n-&gt;next = *p;</div><div class='del'>-		n-&gt;sym = sym;</div><div class='del'>-		*p = n;</div><div class='del'>-		break;</div><div class='del'>-	      }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (common_head)</div><div class='del'>-    {</div><div class='del'>-      /* Find the bss section.  */</div><div class='del'>-      for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-	if (f-&gt;sections[i]-&gt;header.sh_type == SHT_NOBITS)</div><div class='del'>-	  break;</div><div class='del'>-</div><div class='del'>-      /* If for some reason there hadn't been one, create one.  */</div><div class='del'>-      if (i == f-&gt;header.e_shnum)</div><div class='del'>-	{</div><div class='del'>-	  struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-	  f-&gt;sections = xrealloc(f-&gt;sections, (i+1) * sizeof(sec));</div><div class='del'>-	  f-&gt;sections[i] = sec = arch_new_section();</div><div class='del'>-	  f-&gt;header.e_shnum = i+1;</div><div class='del'>-</div><div class='del'>-	  memset(sec, 0, sizeof(*sec));</div><div class='del'>-	  sec-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-	  sec-&gt;header.sh_flags = SHF_WRITE|SHF_ALLOC;</div><div class='del'>-	  sec-&gt;name = ".bss";</div><div class='del'>-	  sec-&gt;idx = i;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-      /* Allocate the COMMONS.  */</div><div class='del'>-      {</div><div class='del'>-	ElfW(Addr) bss_size = f-&gt;sections[i]-&gt;header.sh_size;</div><div class='del'>-	ElfW(Addr) max_align = f-&gt;sections[i]-&gt;header.sh_addralign;</div><div class='del'>-	struct common_entry *c;</div><div class='del'>-</div><div class='del'>-	for (c = common_head; c ; c = c-&gt;next)</div><div class='del'>-	  {</div><div class='del'>-	    ElfW(Addr) align = c-&gt;sym-&gt;value;</div><div class='del'>-</div><div class='del'>-	    if (align &gt; max_align)</div><div class='del'>-	      max_align = align;</div><div class='del'>-	    if (bss_size &amp; (align - 1))</div><div class='del'>-	      bss_size = (bss_size | (align - 1)) + 1;</div><div class='del'>-</div><div class='del'>-	    c-&gt;sym-&gt;secidx = i;</div><div class='del'>-	    c-&gt;sym-&gt;value = bss_size;</div><div class='del'>-</div><div class='del'>-	    bss_size += c-&gt;sym-&gt;size;</div><div class='del'>-	  }</div><div class='del'>-</div><div class='del'>-	f-&gt;sections[i]-&gt;header.sh_size = bss_size;</div><div class='del'>-	f-&gt;sections[i]-&gt;header.sh_addralign = max_align;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* For the sake of patch relocation and parameter initialization,</div><div class='del'>-     allocate zeroed data for NOBITS sections now.  Note that after</div><div class='del'>-     this we cannot assume NOBITS are really empty.  */</div><div class='del'>-  for (i = 0; i &lt; f-&gt;header.e_shnum; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *s = f-&gt;sections[i];</div><div class='del'>-      if (s-&gt;header.sh_type == SHT_NOBITS)</div><div class='del'>-	{</div><div class='del'>-	  if (s-&gt;header.sh_size)</div><div class='del'>-	    s-&gt;contents = memset(xmalloc(s-&gt;header.sh_size),</div><div class='del'>-				 0, s-&gt;header.sh_size);</div><div class='del'>-	  else</div><div class='del'>-	    s-&gt;contents = NULL;</div><div class='del'>-	  s-&gt;header.sh_type = SHT_PROGBITS;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-unsigned long</div><div class='del'>-obj_load_size (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  unsigned long dot = 0;</div><div class='del'>-  struct obj_section *sec;</div><div class='del'>-</div><div class='del'>-  /* Finalize the positions of the sections relative to one another.  */</div><div class='del'>-</div><div class='del'>-  for (sec = f-&gt;load_order; sec ; sec = sec-&gt;load_next)</div><div class='del'>-    {</div><div class='del'>-      ElfW(Addr) align;</div><div class='del'>-</div><div class='del'>-      align = sec-&gt;header.sh_addralign;</div><div class='del'>-      if (align &amp;&amp; (dot &amp; (align - 1)))</div><div class='del'>-	dot = (dot | (align - 1)) + 1;</div><div class='del'>-</div><div class='del'>-      sec-&gt;header.sh_addr = dot;</div><div class='del'>-      dot += sec-&gt;header.sh_size;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return dot;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_relocate (struct obj_file *f, ElfW(Addr) base)</div><div class='del'>-{</div><div class='del'>-  int i, n = f-&gt;header.e_shnum;</div><div class='del'>-  int ret = 1;</div><div class='del'>-</div><div class='del'>-  /* Finalize the addresses of the sections.  */</div><div class='del'>-</div><div class='del'>-  arch_finalize_section_address(f, base);</div><div class='del'>-</div><div class='del'>-  /* And iterate over all of the relocations.  */</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *relsec, *symsec, *targsec, *strsec;</div><div class='del'>-      ElfW(RelM) *rel, *relend;</div><div class='del'>-      ElfW(Sym) *symtab;</div><div class='del'>-      const char *strtab;</div><div class='del'>-</div><div class='del'>-      relsec = f-&gt;sections[i];</div><div class='del'>-      if (relsec-&gt;header.sh_type != SHT_RELM)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      symsec = f-&gt;sections[relsec-&gt;header.sh_link];</div><div class='del'>-      targsec = f-&gt;sections[relsec-&gt;header.sh_info];</div><div class='del'>-      strsec = f-&gt;sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (ElfW(RelM) *)relsec-&gt;contents;</div><div class='del'>-      relend = rel + (relsec-&gt;header.sh_size / sizeof(ElfW(RelM)));</div><div class='del'>-      symtab = (ElfW(Sym) *)symsec-&gt;contents;</div><div class='del'>-      strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  ElfW(Addr) value = 0;</div><div class='del'>-	  struct obj_symbol *intsym = NULL;</div><div class='del'>-	  unsigned long symndx;</div><div class='del'>-	  ElfW(Sym) *extsym = 0;</div><div class='del'>-	  const char *errmsg;</div><div class='del'>-</div><div class='del'>-	  /* Attempt to find a value to use for this relocation.  */</div><div class='del'>-</div><div class='del'>-	  symndx = ELFW(R_SYM)(rel-&gt;r_info);</div><div class='del'>-	  if (symndx)</div><div class='del'>-	    {</div><div class='del'>-	      /* Note we've already checked for undefined symbols.  */</div><div class='del'>-</div><div class='del'>-	      extsym = &amp;symtab[symndx];</div><div class='del'>-	      if (ELFW(ST_BIND)(extsym-&gt;st_info) == STB_LOCAL)</div><div class='del'>-		{</div><div class='del'>-		  /* Local symbols we look up in the local table to be sure</div><div class='del'>-		     we get the one that is really intended.  */</div><div class='del'>-		  intsym = f-&gt;local_symtab[symndx];</div><div class='del'>-		}</div><div class='del'>-	      else</div><div class='del'>-		{</div><div class='del'>-		  /* Others we look up in the hash table.  */</div><div class='del'>-		  const char *name;</div><div class='del'>-		  if (extsym-&gt;st_name)</div><div class='del'>-		    name = strtab + extsym-&gt;st_name;</div><div class='del'>-		  else</div><div class='del'>-		    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-		  intsym = obj_find_symbol(f, name);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	      value = obj_symbol_final_value(f, intsym);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-#if SHT_RELM == SHT_RELA</div><div class='del'>-#if defined(__alpha__) &amp;&amp; defined(AXP_BROKEN_GAS)</div><div class='del'>-	  /* Work around a nasty GAS bug, that is fixed as of 2.7.0.9.  */</div><div class='del'>-	  if (!extsym || !extsym-&gt;st_name ||</div><div class='del'>-	      ELFW(ST_BIND)(extsym-&gt;st_info) != STB_LOCAL)</div><div class='del'>-#endif</div><div class='del'>-	  value += rel-&gt;r_addend;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	  /* Do it! */</div><div class='del'>-	  switch (arch_apply_relocation(f,targsec,symsec,intsym,rel,value))</div><div class='del'>-	    {</div><div class='del'>-	    case obj_reloc_ok:</div><div class='del'>-	      break;</div><div class='del'>-</div><div class='del'>-	    case obj_reloc_overflow:</div><div class='del'>-	      errmsg = "Relocation overflow";</div><div class='del'>-	      goto bad_reloc;</div><div class='del'>-	    case obj_reloc_dangerous:</div><div class='del'>-	      errmsg = "Dangerous relocation";</div><div class='del'>-	      goto bad_reloc;</div><div class='del'>-	    case obj_reloc_unhandled:</div><div class='del'>-	      errmsg = "Unhandled relocation";</div><div class='del'>-	      goto bad_reloc;</div><div class='del'>-	    case obj_reloc_constant_gp:</div><div class='del'>-	      errmsg = "Modules compiled with -mconstant-gp cannot be loaded";</div><div class='del'>-	      goto bad_reloc;</div><div class='del'>-	    bad_reloc:</div><div class='del'>-	      if (extsym)</div><div class='del'>-		{</div><div class='del'>-		  error("%s of type %ld for %s", errmsg,</div><div class='del'>-			(long)ELFW(R_TYPE)(rel-&gt;r_info),</div><div class='del'>-			strtab + extsym-&gt;st_name);</div><div class='del'>-		}</div><div class='del'>-	      else</div><div class='del'>-		{</div><div class='del'>-		  error("%s of type %ld", errmsg,</div><div class='del'>-			(long)ELFW(R_TYPE)(rel-&gt;r_info));</div><div class='del'>-		}</div><div class='del'>-	      ret = 0;</div><div class='del'>-	      break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  /* Finally, take care of the patches.  */</div><div class='del'>-</div><div class='del'>-  if (f-&gt;string_patches)</div><div class='del'>-    {</div><div class='del'>-      struct obj_string_patch_struct *p;</div><div class='del'>-      struct obj_section *strsec;</div><div class='del'>-      ElfW(Addr) strsec_base;</div><div class='del'>-      strsec = obj_find_section(f, ".kstrtab");</div><div class='del'>-      strsec_base = strsec-&gt;header.sh_addr;</div><div class='del'>-</div><div class='del'>-      for (p = f-&gt;string_patches; p ; p = p-&gt;next)</div><div class='del'>-	{</div><div class='del'>-	  struct obj_section *targsec = f-&gt;sections[p-&gt;reloc_secidx];</div><div class='del'>-	  *(ElfW(Addr) *)(targsec-&gt;contents + p-&gt;reloc_offset)</div><div class='del'>-	    = strsec_base + p-&gt;string_offset;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (f-&gt;symbol_patches)</div><div class='del'>-    {</div><div class='del'>-      struct obj_symbol_patch_struct *p;</div><div class='del'>-</div><div class='del'>-      for (p = f-&gt;symbol_patches; p; p = p-&gt;next)</div><div class='del'>-	{</div><div class='del'>-	  struct obj_section *targsec = f-&gt;sections[p-&gt;reloc_secidx];</div><div class='del'>-	  *(ElfW(Addr) *)(targsec-&gt;contents + p-&gt;reloc_offset)</div><div class='del'>-	    = obj_symbol_final_value(f, p-&gt;sym);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-obj_create_image (struct obj_file *f, char *image)</div><div class='del'>-{</div><div class='del'>-  struct obj_section *sec;</div><div class='del'>-  ElfW(Addr) base = f-&gt;baseaddr;</div><div class='del'>-</div><div class='del'>-  for (sec = f-&gt;load_order; sec ; sec = sec-&gt;load_next)</div><div class='del'>-    {</div><div class='del'>-      char *secimg;</div><div class='del'>-</div><div class='del'>-      if (sec-&gt;contents == 0)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      secimg = image + (sec-&gt;header.sh_addr - base);</div><div class='del'>-</div><div class='del'>-      /* Note that we allocated data for NOBITS sections earlier.  */</div><div class='del'>-      memcpy(secimg, sec-&gt;contents, sec-&gt;header.sh_size);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_s390.c b/mdk-stage1/insmod-modutils/obj/obj_s390.c<br/>deleted file mode 100644<br/>index 3da72e771..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_s390.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_s390.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,245 +0,0 @@</div><div class='del'>-/* S/390 specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct s390_got_entry</div><div class='del'>-{</div><div class='del'>-  int offset;</div><div class='del'>-  unsigned offset_done : 1;</div><div class='del'>-  unsigned reloc_done : 1;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct s390_file</div><div class='del'>-{</div><div class='del'>-  struct obj_file root;</div><div class='del'>-  struct obj_section *got;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct s390_symbol</div><div class='del'>-{</div><div class='del'>-  struct obj_symbol root;</div><div class='del'>-  struct s390_got_entry gotent;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  struct s390_file *f;</div><div class='del'>-  f = xmalloc(sizeof(*f));</div><div class='del'>-  f-&gt;got = NULL;</div><div class='del'>-  return &amp;f-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  struct s390_symbol *sym;</div><div class='del'>-  sym = xmalloc(sizeof(*sym));</div><div class='del'>-  memset(&amp;sym-&gt;gotent, 0, sizeof(sym-&gt;gotent));</div><div class='del'>-  return &amp;sym-&gt;root;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *f,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rela *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  struct s390_file *ifile = (struct s390_file *)f;</div><div class='del'>-  struct s390_symbol *isym  = (struct s390_symbol *)sym;</div><div class='del'>-</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-  Elf32_Addr got = ifile-&gt;got ? ifile-&gt;got-&gt;header.sh_addr : 0;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_390_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_32:</div><div class='del'>-      *loc += v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_PLT32:</div><div class='del'>-    case R_390_PC32:</div><div class='del'>-      *loc += v - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_GLOB_DAT:</div><div class='del'>-    case R_390_JMP_SLOT:</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_RELATIVE:</div><div class='del'>-      *loc += f-&gt;baseaddr;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_GOTPC:</div><div class='del'>-      assert(got != 0);</div><div class='del'>-      *loc += got - dot;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_GOT32:</div><div class='del'>-      assert(isym != NULL);</div><div class='del'>-      if (!isym-&gt;gotent.reloc_done)</div><div class='del'>-	{</div><div class='del'>-	  isym-&gt;gotent.reloc_done = 1;</div><div class='del'>-	  *(Elf32_Addr *)(ifile-&gt;got-&gt;contents + isym-&gt;gotent.offset) = v;</div><div class='del'>-	}</div><div class='del'>-      *loc += isym-&gt;gotent.offset;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_390_GOTOFF:</div><div class='del'>-      assert(got != 0);</div><div class='del'>-      *loc += v - got;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *f)</div><div class='del'>-{</div><div class='del'>-  struct s390_file *ifile = (struct s390_file *)f;</div><div class='del'>-  int i, n, offset = 0, gotneeded = 0;</div><div class='del'>-</div><div class='del'>-  n = ifile-&gt;root.header.e_shnum;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    {</div><div class='del'>-      struct obj_section *relsec, *symsec, *strsec;</div><div class='del'>-      Elf32_Rel *rel, *relend;</div><div class='del'>-      Elf32_Sym *symtab;</div><div class='del'>-      const char *strtab;</div><div class='del'>-</div><div class='del'>-      relsec = ifile-&gt;root.sections[i];</div><div class='del'>-      if (relsec-&gt;header.sh_type != SHT_REL)</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-      symsec = ifile-&gt;root.sections[relsec-&gt;header.sh_link];</div><div class='del'>-      strsec = ifile-&gt;root.sections[symsec-&gt;header.sh_link];</div><div class='del'>-</div><div class='del'>-      rel = (Elf32_Rel *)relsec-&gt;contents;</div><div class='del'>-      relend = rel + (relsec-&gt;header.sh_size / sizeof(Elf32_Rel));</div><div class='del'>-      symtab = (Elf32_Sym *)symsec-&gt;contents;</div><div class='del'>-      strtab = (const char *)strsec-&gt;contents;</div><div class='del'>-</div><div class='del'>-      for (; rel &lt; relend; ++rel)</div><div class='del'>-	{</div><div class='del'>-	  Elf32_Sym *extsym;</div><div class='del'>-	  struct s390_symbol *intsym;</div><div class='del'>-	  const char *name;</div><div class='del'>-</div><div class='del'>-	  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-	    {</div><div class='del'>-	    case R_390_GOTPC:</div><div class='del'>-	    case R_390_GOTOFF:</div><div class='del'>-	      gotneeded = 1;</div><div class='del'>-	    default:</div><div class='del'>-	      continue;</div><div class='del'>-</div><div class='del'>-	    case R_390_GOT32:</div><div class='del'>-	      break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	  extsym = &amp;symtab[ELF32_R_SYM(rel-&gt;r_info)];</div><div class='del'>-	  if (extsym-&gt;st_name)</div><div class='del'>-	    name = strtab + extsym-&gt;st_name;</div><div class='del'>-	  else</div><div class='del'>-	    name = f-&gt;sections[extsym-&gt;st_shndx]-&gt;name;</div><div class='del'>-	  intsym = (struct s390_symbol *)obj_find_symbol(&amp;ifile-&gt;root, name);</div><div class='del'>-</div><div class='del'>-	  if (!intsym-&gt;gotent.offset_done)</div><div class='del'>-	    {</div><div class='del'>-	      intsym-&gt;gotent.offset_done = 1;</div><div class='del'>-	      intsym-&gt;gotent.offset = offset;</div><div class='del'>-	      offset += 4;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  if (offset &gt; 0 || gotneeded)</div><div class='del'>-    ifile-&gt;got = obj_create_alloced_section(&amp;ifile-&gt;root, ".got", 4, offset);</div><div class='del'>-</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *m)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int         </div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{    </div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-             </div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;  </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_sparc.c b/mdk-stage1/insmod-modutils/obj/obj_sparc.c<br/>deleted file mode 100644<br/>index 1a03c9090..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_sparc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_sparc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,226 +0,0 @@</div><div class='del'>-/* Sparc specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_file));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_symbol));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *ef,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf32_Rela *rel,</div><div class='del'>-		       Elf32_Addr v)</div><div class='del'>-{</div><div class='del'>-  Elf32_Addr *loc = (Elf32_Addr *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  Elf32_Addr dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF32_R_TYPE(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_SPARC_NONE:</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_8:</div><div class='del'>-      if (v &gt; 0xff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xff) | (v &amp; 0xff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_16:</div><div class='del'>-      if (v &gt; 0xffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xffff) | (v &amp; 0xffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_32:</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_DISP8:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v &gt; 0xff)</div><div class='del'>-        ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xff) | (v &amp; 0xff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_DISP16:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v &gt; 0xffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xffff) | (v &amp; 0xffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_DISP32:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP30:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffffff) | (v &gt;&gt; 2);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | ((v &gt;&gt; 2) &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_HI22:</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 10);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_22:</div><div class='del'>-      if (v &gt; 0x3fffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_13:</div><div class='del'>-      if (v &gt; 0x1fff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x1fff) | (v &amp; 0x1fff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_LO10:</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_PC10:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_PC22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 10);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_UA32:</div><div class='del'>-      *(((char *)loc) + 0) = (char)(v &gt;&gt; 24);</div><div class='del'>-      *(((char *)loc) + 1) = (char)(v &gt;&gt; 16);</div><div class='del'>-      *(((char *)loc) + 2) = (char)(v &gt;&gt; 8);</div><div class='del'>-      *(((char *)loc) + 3) = (char)v;</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-#ifdef R_SPARC_10</div><div class='del'>-    case R_SPARC_10:</div><div class='del'>-      if (v &gt; 0x3ff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_11:</div><div class='del'>-      if (v &gt; 0x7ff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x7ff) | (v &amp; 0x7ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP16:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x303fff) | ((v &lt;&lt; 4) &amp; 0x300000) | ((v &gt;&gt; 2) &amp; 0x3fff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP19:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x7ffff) | ((v &gt;&gt; 2) &amp; 0x7ffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_7:</div><div class='del'>-      if (v &gt; 0x7f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x7f) | (v &amp; 0x7f);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_5:</div><div class='del'>-      if (v &gt; 0x1f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x1f) | (v &amp; 0x1f);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_6:</div><div class='del'>-      if (v &gt; 0x3f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3f) | (v &amp; 0x3f);</div><div class='del'>-      break;</div><div class='del'>-#endif /* R_SPARC_10 */</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *ef)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf32_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/obj/obj_sparc64.c b/mdk-stage1/insmod-modutils/obj/obj_sparc64.c<br/>deleted file mode 100644<br/>index 84e8d18a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/obj/obj_sparc64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/obj/obj_sparc64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,352 +0,0 @@</div><div class='del'>-/* Sparc64 specific support for Elf loading and relocation.</div><div class='del'>-   Copyright 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Jakub Jelinek &lt;jj@sunsite.mff.cuni.cz&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;module.h&gt;</div><div class='del'>-#include &lt;obj.h&gt;</div><div class='del'>-#include &lt;util.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-struct obj_file *</div><div class='del'>-arch_new_file (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_file));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_section *</div><div class='del'>-arch_new_section (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_section));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct obj_symbol *</div><div class='del'>-arch_new_symbol (void)</div><div class='del'>-{</div><div class='del'>-  return xmalloc(sizeof(struct obj_symbol));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef BROKEN_SPARC64_RELOCS</div><div class='del'>-</div><div class='del'>-#undef R_SPARC_PLT32</div><div class='del'>-#undef R_SPARC_HIPLT22</div><div class='del'>-#undef R_SPARC_LOPLT10</div><div class='del'>-#undef R_SPARC_PCPLT32</div><div class='del'>-#undef R_SPARC_PCPLT22</div><div class='del'>-#undef R_SPARC_PCPLT10</div><div class='del'>-#undef R_SPARC_10</div><div class='del'>-#undef R_SPARC_11</div><div class='del'>-#undef R_SPARC_64</div><div class='del'>-#undef R_SPARC_OLO10</div><div class='del'>-#undef R_SPARC_HH22</div><div class='del'>-#undef R_SPARC_HM10</div><div class='del'>-#undef R_SPARC_LM22</div><div class='del'>-#undef R_SPARC_PC_HH22</div><div class='del'>-#undef R_SPARC_PC_HM10</div><div class='del'>-#undef R_SPARC_PC_LM22</div><div class='del'>-#undef R_SPARC_WDISP16</div><div class='del'>-#undef R_SPARC_WDISP19</div><div class='del'>-#undef R_SPARC_GLOB_JMP</div><div class='del'>-#undef R_SPARC_7</div><div class='del'>-#undef R_SPARC_5</div><div class='del'>-#undef R_SPARC_6</div><div class='del'>-</div><div class='del'>-#define R_SPARC_10		24</div><div class='del'>-#define R_SPARC_11		25</div><div class='del'>-#define R_SPARC_64		26</div><div class='del'>-#define R_SPARC_OLO10		27</div><div class='del'>-#define R_SPARC_HH22		28</div><div class='del'>-#define R_SPARC_HM10		29</div><div class='del'>-#define R_SPARC_LM22		30</div><div class='del'>-#define R_SPARC_PC_HH22		31</div><div class='del'>-#define R_SPARC_PC_HM10		32</div><div class='del'>-#define R_SPARC_PC_LM22		33</div><div class='del'>-#define R_SPARC_WDISP16		34</div><div class='del'>-#define R_SPARC_WDISP19		35</div><div class='del'>-#define R_SPARC_GLOB_JMP	36</div><div class='del'>-#define R_SPARC_7		37</div><div class='del'>-#define R_SPARC_5		38</div><div class='del'>-#define R_SPARC_6		39</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#ifndef R_SPARC_64</div><div class='del'>-</div><div class='del'>-#define R_SPARC_64		32</div><div class='del'>-#define R_SPARC_OLO10		33</div><div class='del'>-#define R_SPARC_HH22		34</div><div class='del'>-#define R_SPARC_HM10		35</div><div class='del'>-#define R_SPARC_LM22		36</div><div class='del'>-#define R_SPARC_PC_HH22		37</div><div class='del'>-#define R_SPARC_PC_HM10		38</div><div class='del'>-#define R_SPARC_PC_LM22		39</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_load_proc_section(struct obj_section *sec, int fp)</div><div class='del'>-{</div><div class='del'>-    /* Assume it's just a debugging section that we can safely</div><div class='del'>-       ignore ...  */</div><div class='del'>-    sec-&gt;contents = NULL;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define ELF64_R_TYPE_ID(info)	((info) &amp; 0xff)</div><div class='del'>-#define ELF64_R_TYPE_DATA(info) ((info) &gt;&gt; 8)</div><div class='del'>-</div><div class='del'>-enum obj_reloc</div><div class='del'>-arch_apply_relocation (struct obj_file *ef,</div><div class='del'>-		       struct obj_section *targsec,</div><div class='del'>-		       struct obj_section *symsec,</div><div class='del'>-		       struct obj_symbol *sym,</div><div class='del'>-		       Elf64_Rela *rel,</div><div class='del'>-		       Elf64_Addr v)</div><div class='del'>-{</div><div class='del'>-  unsigned int *loc = (unsigned int *)(targsec-&gt;contents + rel-&gt;r_offset);</div><div class='del'>-  unsigned int dot = targsec-&gt;header.sh_addr + rel-&gt;r_offset;</div><div class='del'>-</div><div class='del'>-  enum obj_reloc ret = obj_reloc_ok;</div><div class='del'>-</div><div class='del'>-  switch (ELF64_R_TYPE_ID(rel-&gt;r_info))</div><div class='del'>-    {</div><div class='del'>-    case R_SPARC_NONE:</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_64:</div><div class='del'>-    case R_SPARC_UA64:</div><div class='del'>-      if (! ((long) loc &amp; 3)) {</div><div class='del'>-	/* Common in .eh_frame */</div><div class='del'>-	((unsigned int *) loc) [0] = v &gt;&gt; 32;</div><div class='del'>-	((unsigned int *) loc) [1] = v;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      ((unsigned char *) loc) [0] = v &gt;&gt; 56;</div><div class='del'>-      ((unsigned char *) loc) [1] = v &gt;&gt; 48;</div><div class='del'>-      ((unsigned char *) loc) [2] = v &gt;&gt; 40;</div><div class='del'>-      ((unsigned char *) loc) [3] = v &gt;&gt; 32;</div><div class='del'>-      ((unsigned char *) loc) [4] = v &gt;&gt; 24;</div><div class='del'>-      ((unsigned char *) loc) [5] = v &gt;&gt; 16;</div><div class='del'>-      ((unsigned char *) loc) [6] = v &gt;&gt; 8;</div><div class='del'>-      ((unsigned char *) loc) [7] = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_32:</div><div class='del'>-    case R_SPARC_UA32:</div><div class='del'>-      if (! ((long) loc &amp; 3)) {</div><div class='del'>-	*loc = v;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      ((unsigned char *) loc) [0] = v &gt;&gt; 24;</div><div class='del'>-      ((unsigned char *) loc) [1] = v &gt;&gt; 16;</div><div class='del'>-      ((unsigned char *) loc) [2] = v &gt;&gt; 8;</div><div class='del'>-      ((unsigned char *) loc) [3] = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_16:</div><div class='del'>-      if (v &gt; 0xffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xffff) | (v &amp; 0xffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_8:</div><div class='del'>-      if (v &gt; 0xff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xff) | (v &amp; 0xff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_DISP32:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = v;</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_DISP16:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v &gt; 0xffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xffff) | (v &amp; 0xffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_DISP8:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v &gt; 0xff)</div><div class='del'>-        ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0xff) | (v &amp; 0xff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP30:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffffff) | ((v &gt;&gt; 2) &amp; 0x3fffffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    /* MEDLOW code model relocs */</div><div class='del'>-    case R_SPARC_LO10:</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_HI22:</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 10);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_OLO10:</div><div class='del'>-      *loc = (*loc &amp; ~0x1fff) | (((v &amp; 0x3ff) + ELF64_R_TYPE_DATA (rel-&gt;r_info)) &amp; 0x1fff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    /* MEDMID code model relocs */</div><div class='del'>-    case R_SPARC_H44:</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 22);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_M44:</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | ((v &gt;&gt; 12) &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_L44:</div><div class='del'>-      *loc = (*loc &amp; ~0xfff) | (v &amp; 0xfff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    /* MEDANY code model relocs */</div><div class='del'>-    case R_SPARC_HH22:</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 42);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_HM10:</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | ((v &gt;&gt; 32) &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_LM22:</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | ((v &gt;&gt; 10) &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_WDISP22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | ((v &gt;&gt; 2) &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_22:</div><div class='del'>-      if (v &gt; 0x3fffff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_13:</div><div class='del'>-      if (v &gt; 0x1fff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x1fff) | (v &amp; 0x1fff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-    case R_SPARC_PC10:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_PC22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | ((v &gt;&gt; 10) &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-#ifdef R_SPARC_10</div><div class='del'>-    case R_SPARC_10:</div><div class='del'>-      if (v &gt; 0x3ff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | (v &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_11:</div><div class='del'>-      if (v &gt; 0x7ff)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x7ff) | (v &amp; 0x7ff);</div><div class='del'>-      break;</div><div class='del'>-</div><div class='del'>-#ifdef R_SPARC_64</div><div class='del'>-    case R_SPARC_PC_HH22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | (v &gt;&gt; 42);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_PC_HM10:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3ff) | ((v &gt;&gt; 32) &amp; 0x3ff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_PC_LM22:</div><div class='del'>-      v -= dot;</div><div class='del'>-      *loc = (*loc &amp; ~0x3fffff) | ((v &gt;&gt; 10) &amp; 0x3fffff);</div><div class='del'>-      break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    case R_SPARC_WDISP16:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x303fff) | ((v &lt;&lt; 4) &amp; 0x300000) | ((v &gt;&gt; 2) &amp; 0x3fff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_WDISP19:</div><div class='del'>-      v -= dot;</div><div class='del'>-      if (v % 4)</div><div class='del'>-	ret = obj_reloc_dangerous;</div><div class='del'>-      *loc = (*loc &amp; ~0x7ffff) | ((v &gt;&gt; 2) &amp; 0x7ffff);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_7:</div><div class='del'>-      if (v &gt; 0x7f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x7f) | (v &amp; 0x7f);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_5:</div><div class='del'>-      if (v &gt; 0x1f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x1f) | (v &amp; 0x1f);</div><div class='del'>-      break;</div><div class='del'>-    case R_SPARC_6:</div><div class='del'>-      if (v &gt; 0x3f)</div><div class='del'>-	ret = obj_reloc_overflow;</div><div class='del'>-      *loc = (*loc &amp; ~0x3f) | (v &amp; 0x3f);</div><div class='del'>-      break;</div><div class='del'>-#endif /* R_SPARC_10 */</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-      ret = obj_reloc_unhandled;</div><div class='del'>-      break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_create_got (struct obj_file *ef)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_init_module (struct obj_file *f, struct module *mod)</div><div class='del'>-{</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_finalize_section_address(struct obj_file *f, Elf64_Addr base)</div><div class='del'>-{</div><div class='del'>-  int  i, n = f-&gt;header.e_shnum;</div><div class='del'>-</div><div class='del'>-  f-&gt;baseaddr = base;</div><div class='del'>-  for (i = 0; i &lt; n; ++i)</div><div class='del'>-    f-&gt;sections[i]-&gt;header.sh_addr += base;</div><div class='del'>-  return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-arch_archdata (struct obj_file *fin, struct obj_section *sec)</div><div class='del'>-{</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/Makefile b/mdk-stage1/insmod-modutils/util/Makefile<br/>deleted file mode 100644<br/>index 763f046f2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,42 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    insmod from modutils (generic)</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Copyright 1996, 1997 Linux International.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ../..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: libutil.a libutil-STANDALONE.a #libutil-DIET.a</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INCS = -I./../include</div><div class='del'>-</div><div class='del'>-DEFS = -Wno-error -D_GNU_SOURCE -DELF_MACHINE_H='"elf_$(ARCH).h"' -DARCH_$(ARCH) -DHAVE_WORDEXP=1 -DHAVE_GLOB=1 -DCONFIG_ROOT_CHECK_OFF=0</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-OBJS = xmalloc.o xrealloc.o xstrcat.o xstrdup.o xsystem.o xftw.o \</div><div class='del'>-        modstat.o meta_expand.o config.o snap_shot.o arch64.o gzfiles.o sys_nim.o sys_oim.o</div><div class='del'>-</div><div class='del'>-libutil.a: $(OBJS) logger.o</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-libutil-STANDALONE.a: $(OBJS) logger-standalone.o</div><div class='del'>-	ar cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-logger-standalone.o: logger.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -o $@ -D_STANDALONE_ -c logger.c</div><div class='del'>-</div><div class='del'>-.c.o:</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $&lt;</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/alias.h b/mdk-stage1/insmod-modutils/util/alias.h<br/>deleted file mode 100644<br/>index c925a04f3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/alias.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/alias.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,244 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * This file is split out from config.c for easier editing</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * tbpath and tbtype are used to build the complete set of paths for finding</div><div class='del'>- * modules, but only when we search for individual directories, they are not</div><div class='del'>- * used for [boot] and [toplevel] searches.</div><div class='del'>- */</div><div class='del'>-static char *tbpath[] =</div><div class='del'>-{</div><div class='del'>-	"/lib/modules",</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-char *tbtype[] =</div><div class='del'>-{</div><div class='del'>-	"kernel",		/* as of 2.3.14 this must be first */</div><div class='del'>-	"fs",</div><div class='del'>-	"net",</div><div class='del'>-	"scsi",</div><div class='del'>-	"block",</div><div class='del'>-	"cdrom",</div><div class='del'>-	"ipv4",</div><div class='del'>-	"ipv6",</div><div class='del'>-	"sound",</div><div class='del'>-	"fc4",</div><div class='del'>-	"video",</div><div class='del'>-	"misc",</div><div class='del'>-	"pcmcia",</div><div class='del'>-	"atm",</div><div class='del'>-	"usb",</div><div class='del'>-	"ide",</div><div class='del'>-	"ieee1394",</div><div class='del'>-	"mtd",</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the list of pre-defined aliases.</div><div class='del'>- * Each entry can be overridden by an entry in /etc/modules.conf</div><div class='del'>- */</div><div class='del'>-char *aliaslist[] =</div><div class='del'>-{</div><div class='del'>-	"binfmt-204 binfmt_aout",</div><div class='del'>-	"binfmt-263 binfmt_aout",</div><div class='del'>-	"binfmt-264 binfmt_aout",</div><div class='del'>-	"binfmt-267 binfmt_aout",</div><div class='del'>-	"binfmt-387 binfmt_aout",</div><div class='del'>-	"binfmt-332 iBCS",</div><div class='del'>-	"binfmt--310 binfmt_java",</div><div class='del'>-</div><div class='del'>-	"block-major-1 rd",</div><div class='del'>-	"block-major-2 floppy",</div><div class='del'>-	"block-major-3 ide-probe-mod",</div><div class='del'>-	"block-major-7 loop",</div><div class='del'>-	"block-major-8 sd_mod",</div><div class='del'>-	"block-major-9 md", /* For modular RAID */</div><div class='del'>-	"block-major-11 sr_mod",</div><div class='del'>-	"block-major-13 xd",</div><div class='del'>-	"block-major-15 cdu31a",</div><div class='del'>-	"block-major-16 gscd",</div><div class='del'>-	"block-major-17 optcd",</div><div class='del'>-	"block-major-18 sjcd",</div><div class='del'>-	"block-major-20 mcdx",</div><div class='del'>-	"block-major-22 ide-probe-mod",</div><div class='del'>-	"block-major-23 mcd",</div><div class='del'>-	"block-major-24 sonycd535",</div><div class='del'>-	"block-major-25 sbpcd",</div><div class='del'>-	"block-major-26 sbpcd",</div><div class='del'>-	"block-major-27 sbpcd",</div><div class='del'>-	"block-major-29 aztcd",</div><div class='del'>-	"block-major-32 cm206",</div><div class='del'>-	"block-major-33 ide-probe-mod",</div><div class='del'>-	"block-major-34 ide-probe-mod",</div><div class='del'>-	"block-major-37 ide-tape",</div><div class='del'>-	"block-major-44 ftl",		/* from David Woodhouse &lt;dwmw2@infradead.org&gt; */</div><div class='del'>-	"block-major-56 ide-probe-mod",</div><div class='del'>-	"block-major-57 ide-probe-mod",</div><div class='del'>-	"block-major-88 ide-probe-mod",</div><div class='del'>-	"block-major-89 ide-probe-mod",</div><div class='del'>-	"block-major-90 ide-probe-mod",</div><div class='del'>-	"block-major-91 ide-probe-mod",</div><div class='del'>-	"block-major-93 nftl",		/* from David Woodhouse &lt;dwmw2@infradead.org&gt; */</div><div class='del'>-</div><div class='del'>-	"char-major-4 serial",</div><div class='del'>-	"char-major-5 serial",</div><div class='del'>-	"char-major-6 lp",</div><div class='del'>-	"char-major-9 st",</div><div class='del'>-	"char-major-10 off",		/* was: mouse, was: misc */</div><div class='del'>-	"char-major-10-0 busmouse",	/* /dev/logibm Logitech bus mouse */</div><div class='del'>-	"char-major-10-1 off",		/* /dev/psaux PS/2-style mouse port */</div><div class='del'>-	"char-major-10-2 msbusmouse",	/* /dev/inportbm Microsoft Inport bus mouse */</div><div class='del'>-	"char-major-10-3 atixlmouse",	/* /dev/atibm ATI XL bus mouse */</div><div class='del'>-					/* /dev/jbm J-mouse */</div><div class='del'>-					/* /dev/amigamouse Amiga mouse (68k/Amiga) */</div><div class='del'>-					/* /dev/atarimouse Atari mouse */</div><div class='del'>-					/* /dev/sunmouse Sun mouse */</div><div class='del'>-					/* /dev/beep Fancy beep device */</div><div class='del'>-					/* /dev/modreq Kernel module load request */</div><div class='del'>-	"char-major-10-130 wdt",	/* /dev/watchdog Watchdog timer port */</div><div class='del'>-	"char-major-10-131 wdt",	/* /dev/temperature Machine internal temperature */</div><div class='del'>-					/* /dev/hwtrap Hardware fault trap */</div><div class='del'>-					/* /dev/exttrp External device trap */</div><div class='del'>-	"char-major-10-135 off",	/* rtc cannot be compiled as a module */</div><div class='del'>-	"char-major-10-139 openprom",	/* /dev/openprom Linux/Sparc interface */</div><div class='del'>-	"char-major-10-144 nvram",	/* from Tigran Aivazian &lt;tigran@sco.COM&gt; */</div><div class='del'>-	"char-major-10-157 applicom",	/* from David Woodhouse &lt;dwmw2@infradead.org&gt; */</div><div class='del'>-	"char-major-10-175 agpgart",    /* /dev/agpgart GART AGP mapping access */</div><div class='del'>-	"char-major-10-184 microcode",	/* Tigran Aivazian &lt;tigran@veritas.com&gt; */</div><div class='del'>-</div><div class='del'>-	"char-major-14 soundcore",</div><div class='del'>-	"char-major-19 cyclades",</div><div class='del'>-	"char-major-20 cyclades",</div><div class='del'>-	"char-major-21 sg",</div><div class='del'>-	"char-major-22 pcxx", /* ?? */</div><div class='del'>-	"char-major-23 pcxx", /* ?? */</div><div class='del'>-	"char-major-27 ftape",</div><div class='del'>-	"char-major-34 scc",</div><div class='del'>-	"char-major-35 tclmidi",</div><div class='del'>-	"char-major-36 netlink",</div><div class='del'>-	"char-major-37 ide-tape",</div><div class='del'>-	"char-major-48 riscom8",</div><div class='del'>-	"char-major-49 riscom8",</div><div class='del'>-	"char-major-57 esp",</div><div class='del'>-	"char-major-58 esp",</div><div class='del'>-	"char-major-63 kdebug",</div><div class='del'>-	"char-major-90 mtdchar",	/* from David Woodhouse &lt;dwmw2@infradead.org&gt; */</div><div class='del'>-	"char-major-99 ppdev",</div><div class='del'>-	"char-major-107 3dfx", /* from Tigran Aivazian &lt;tigran@sco.COM&gt; */</div><div class='del'>-	"char-major-161 ircomm-tty",</div><div class='del'>-</div><div class='del'>-	"dos msdos",</div><div class='del'>-	"dummy0 dummy",</div><div class='del'>-	"dummy1 dummy",</div><div class='del'>-	"eth0 off",</div><div class='del'>-	"iso9660 isofs",</div><div class='del'>-	"md-personality-1 linear",</div><div class='del'>-	"md-personality-2 raid0",</div><div class='del'>-        "md-personality-3 raid1",</div><div class='del'>-        "md-personality-4 raid5",</div><div class='del'>-</div><div class='del'>-	"net-pf-1 unix",	/* PF_UNIX	1  Unix domain sockets */</div><div class='del'>-	"net-pf-2 ipv4",	/* PF_INET	2  Internet IP Protocol */</div><div class='del'>-	"net-pf-3 off",		/* PF_AX25	3  Amateur Radio AX.25 */</div><div class='del'>-	"net-pf-4 ipx",		/* PF_IPX	4  Novell IPX */</div><div class='del'>-	"net-pf-5 appletalk",	/* PF_APPLETALK	5  Appletalk DDP */</div><div class='del'>-	"net-pf-6 off",		/* PF_NETROM	6  Amateur radio NetROM */</div><div class='del'>-				/* PF_BRIDGE	7  Multiprotocol bridge */</div><div class='del'>-				/* PF_AAL5	8  Reserved for Werner's ATM */</div><div class='del'>-				/* PF_X25	9  Reserved for X.25 project */</div><div class='del'>-				/* PF_INET6	10 IP version 6 */</div><div class='del'>-</div><div class='del'>-	/* next two from &lt;dairiki@matthews.dairiki.org&gt;  Thanks! */</div><div class='del'>-	"net-pf-17 af_packet",</div><div class='del'>-	"net-pf-19 off",	/* acorn econet */</div><div class='del'>-</div><div class='del'>-	"netalias-2 ip_alias",</div><div class='del'>-	"plip0 plip",</div><div class='del'>-	"plip1 plip",</div><div class='del'>-	"cipcb0 cipcb",</div><div class='del'>-	"cipcb1 cipcb",</div><div class='del'>-	"cipcb2 cipcb",</div><div class='del'>-	"cipcb3 cipcb",</div><div class='del'>-	"ppp0 ppp",</div><div class='del'>-	"ppp1 ppp",</div><div class='del'>-	"scsi_hostadapter off",	/* if not in config file */</div><div class='del'>-	"slip0 slip",</div><div class='del'>-	"slip1 slip",</div><div class='del'>-	"tty-ldisc-1 slip",</div><div class='del'>-	"tty-ldisc-3 ppp",</div><div class='del'>-	"ppp-compress-21 bsd_comp",</div><div class='del'>-	"ppp-compress-24 ppp_deflate",</div><div class='del'>-	"ppp-compress-26 ppp_deflate",</div><div class='del'>-</div><div class='del'>-#ifndef __sparc__</div><div class='del'>-	"parport_lowlevel parport_pc",</div><div class='del'>-#else</div><div class='del'>-        "parport_lowlevel parport_ax",</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	"tty-ldisc-11 irtty",</div><div class='del'>-</div><div class='del'>-	"usbdevfs usbcore",</div><div class='del'>-</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the list of pre-defined options.</div><div class='del'>- * Each entry can be overridden by an entry in /etc/modules.conf</div><div class='del'>- */</div><div class='del'>-char *optlist[] =</div><div class='del'>-{</div><div class='del'>-	"dummy0 -o dummy0",</div><div class='del'>-	"dummy1 -o dummy1",</div><div class='del'>-	"sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330",</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the list of pre-defined "above"s,</div><div class='del'>- * used for pull-in of additional modules</div><div class='del'>- * Each entry can be overridden by an entry in /etc/modules.conf</div><div class='del'>- */</div><div class='del'>-char *above[] =</div><div class='del'>-{</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the list of pre-defined "below"s,</div><div class='del'>- * used for push-in of additional modules</div><div class='del'>- * Each entry can be overridden by an entry in /etc/modules.conf</div><div class='del'>- */</div><div class='del'>-char *below[] =</div><div class='del'>-{</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the list of pre-defined "prune"s,</div><div class='del'>- * used to exclude paths from scan of /lib/modules.</div><div class='del'>- * /etc/modules.conf can add entries but not remove them.</div><div class='del'>- */</div><div class='del'>-char *prune[] =</div><div class='del'>-{</div><div class='del'>-        ".rhkmvtag",</div><div class='del'>-	"modules.dep",</div><div class='del'>-	"modules.generic_string",</div><div class='del'>-	"modules.pcimap",</div><div class='del'>-	"modules.isapnpmap",</div><div class='del'>-	"modules.usbmap",</div><div class='del'>-	"modules.parportmap",</div><div class='del'>-	"System.map",</div><div class='del'>-	".config",</div><div class='del'>-	"build",		/* symlink to source tree */</div><div class='del'>-	"vmlinux",</div><div class='del'>-	"vmlinuz",</div><div class='del'>-	"bzImage",</div><div class='del'>-	"zImage",</div><div class='del'>-	".rhkmvtag",		/* wish RedHat had told me before they did this */</div><div class='del'>-	NULL			/* marks the end of the list! */</div><div class='del'>-};</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/arch64.c b/mdk-stage1/insmod-modutils/util/arch64.c<br/>deleted file mode 100644<br/>index 4d5ace223..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/arch64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/arch64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Written by Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* Indicate if the current machine uses 64 bit architecture */</div><div class='del'>-int arch64(void)</div><div class='del'>-{</div><div class='del'>-	struct utsname u;</div><div class='del'>-	return(!uname(&amp;u) &amp;&amp; strstr(u.machine, "64"));</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/config.c b/mdk-stage1/insmod-modutils/util/config.c<br/>deleted file mode 100644<br/>index a860920f6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/config.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/config.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1591 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Handle the configuration, including /etc/modules.conf</div><div class='del'>- *</div><div class='del'>- * Copyright 1994, 1995, 1996, 1997:</div><div class='del'>- *	Jacques Gelinas &lt;jack@solucorp.qc.ca&gt;</div><div class='del'>- *	Björn Ekwall &lt;bj0rn@blox.se&gt; February 1999</div><div class='del'>- *	Keith Owens &lt;kaos@ocs.com.au&gt; October 1999</div><div class='del'>- *</div><div class='del'>- * "kernelversion" idea from the Debian release via:</div><div class='del'>- *      Wichert Akkerman &lt;wakkerma@cs.leidenuniv.nl&gt;</div><div class='del'>- *</div><div class='del'>- * Björn, inspired by Richard Henderson &lt;rth@twiddle.net&gt;, cleaned up</div><div class='del'>- * the wildcard handling and started using ftw in March 1999</div><div class='del'>- * Cleanup of hardcoded arrays: Björn Ekwall &lt;bj0rn@blox.se&gt; March 1999</div><div class='del'>- * Many additional keywords: Björn Ekwall &lt;bj0rn@blox.se&gt; (C) March 1999</div><div class='del'>- * Standardize on /etc/modules.conf Keith Owens &lt;kaos@ocs.com.au&gt; October 1999</div><div class='del'>- *</div><div class='del'>- * Alpha typecast:Michal Jaegermann &lt;michal@ellpspace.math.ualberta.ca&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Specification: /etc/modules.conf / format</div><div class='del'>- *	Modules may be located at different places in the filesystem.</div><div class='del'>- *</div><div class='del'>- *	The file /etc/modules.conf contains different definitions to</div><div class='del'>- *	control the manipulation of modules.</div><div class='del'>- *</div><div class='del'>- *	Standard Unix style comments and continuation line are supported.</div><div class='del'>- *	Comments begin with a # and continue until the end of the line.</div><div class='del'>- *	A line continues on the next one if the last non-white character</div><div class='del'>- *	is a \.</div><div class='del'>- */</div><div class='del'>-/* #Specification: /etc/modules.conf / format / official name */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;assert.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "util.h"</div><div class='del'>-#include "config.h"</div><div class='del'>-#include "alias.h"</div><div class='del'>-</div><div class='del'>-int flag_autoclean; /* set/used by modprobe and insmod */</div><div class='del'>-</div><div class='del'>-struct utsname uts_info;</div><div class='del'>-</div><div class='del'>-struct PATH_TYPE *modpath;</div><div class='del'>-int nmodpath = 0;</div><div class='del'>-static int maxpath = 0;</div><div class='del'>-</div><div class='del'>-struct EXEC_TYPE *execs;</div><div class='del'>-int nexecs = 0;</div><div class='del'>-static int maxexecs = 0;</div><div class='del'>-</div><div class='del'>-OPT_LIST *opt_list;</div><div class='del'>-static int n_opt_list;</div><div class='del'>-</div><div class='del'>-OPT_LIST *abovelist;</div><div class='del'>-static int n_abovelist;</div><div class='del'>-</div><div class='del'>-OPT_LIST *belowlist;</div><div class='del'>-static int n_belowlist;</div><div class='del'>-</div><div class='del'>-OPT_LIST *prunelist;</div><div class='del'>-static int n_prunelist;</div><div class='del'>-</div><div class='del'>-OPT_LIST *probe_list;</div><div class='del'>-static int n_probe_list;</div><div class='del'>-</div><div class='del'>-OPT_LIST *probeall_list;</div><div class='del'>-static int n_probeall_list;</div><div class='del'>-</div><div class='del'>-OPT_LIST *aliases;</div><div class='del'>-static int n_aliases;</div><div class='del'>-</div><div class='del'>-char *persistdir = "/var/lib/modules/persist";</div><div class='del'>-</div><div class='del'>-const char symprefix[] = SYMPREFIX;</div><div class='del'>-</div><div class='del'>-char *insmod_opt = NULL;</div><div class='del'>-char *config_file = NULL;	/* Which file was actually used */</div><div class='del'>-time_t config_mtime;</div><div class='del'>-int root_check_off = CONFIG_ROOT_CHECK_OFF;	/* Default is modules must be owned by root */</div><div class='del'>-static char *config_version;	/* Hack for config_add */</div><div class='del'>-int quick = 0;			/* Option -A */</div><div class='del'>-</div><div class='del'>-/* The initialization order must match the gen_file_enum order in config.h */</div><div class='del'>-struct gen_files gen_file[] = {</div><div class='del'>-	{"generic_string", NULL, 0},</div><div class='del'>-	{"pcimap", NULL, 0},</div><div class='del'>-	{"isapnpmap", NULL, 0},</div><div class='del'>-	{"usbmap", NULL, 0},</div><div class='del'>-	{"parportmap", NULL, 0},</div><div class='del'>-	{"dep", NULL, 0},</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-const int gen_file_count = sizeof(gen_file)/sizeof(gen_file[0]);</div><div class='del'>-</div><div class='del'>-int flag_verbose;</div><div class='del'>-</div><div class='del'>-unsigned long safemode;</div><div class='del'>-</div><div class='del'>-void verbose(const char *ctl,...)</div><div class='del'>-{</div><div class='del'>-	if (flag_verbose) {</div><div class='del'>-		va_list list;</div><div class='del'>-		va_start(list, ctl);</div><div class='del'>-		vprintf(ctl, list);</div><div class='del'>-		va_end(list); </div><div class='del'>-		fflush(stdout);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Check to see if the existing modules.xxx files need updating,</div><div class='del'>- *	based on the timestamps of the modules and the config file.</div><div class='del'>- */</div><div class='del'>-static int check_update (const char *file, const struct stat *sb)</div><div class='del'>-{</div><div class='del'>-	int len = strlen(file);</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	if (!S_ISREG(sb-&gt;st_mode))</div><div class='del'>-		return 0;</div><div class='del'>-	for (i = 0; i &lt; gen_file_count; ++i) {</div><div class='del'>-		if (sb-&gt;st_mtime &gt; gen_file[i].mtime)</div><div class='del'>-			break;</div><div class='del'>-	}</div><div class='del'>-	if (i == gen_file_count)</div><div class='del'>-		return 0;	/* All generated files are up to date */</div><div class='del'>-</div><div class='del'>-	if (len &gt; 2 &amp;&amp; !strcmp(file + len - 2, ".o"))</div><div class='del'>-		return 1;</div><div class='del'>-	else if (len &gt; 4 &amp;&amp; !strcmp(file + len - 4, ".mod"))</div><div class='del'>-		return 1;</div><div class='del'>-#ifdef CONFIG_USE_ZLIB</div><div class='del'>-	else if (len &gt; 5 &amp;&amp; !strcmp(file + len - 5, ".o.gz"))</div><div class='del'>-		return 1;</div><div class='del'>-#endif</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int need_update (const char *force_ver, const char *base_dir)</div><div class='del'>-{</div><div class='del'>-	struct stat tmp;</div><div class='del'>-	char dep[PATH_MAX];</div><div class='del'>-	int i;</div><div class='del'>-	uname (&amp;uts_info);</div><div class='del'>-	if (!force_ver)</div><div class='del'>-		force_ver = uts_info.release;</div><div class='del'>-</div><div class='del'>-	if (strlen (force_ver) &gt; 50)</div><div class='del'>-		/* That's just silly. */</div><div class='del'>-		return 1;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; gen_file_count; ++i) {</div><div class='del'>-		if (stat(gen_file[i].name, &amp;tmp))</div><div class='del'>-			return 1;	/* No dependency file yet, so we need to build it. */</div><div class='del'>-		gen_file[i].mtime = tmp.st_mtime;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (stat ("/etc/modules.conf", &amp;tmp) &amp;&amp;</div><div class='del'>-	    stat ("/etc/conf.modules", &amp;tmp))</div><div class='del'>-		return 1;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; gen_file_count; ++i) {</div><div class='del'>-		if (tmp.st_mtime &gt; gen_file[i].mtime)</div><div class='del'>-			return 1;	/* Config file is newer. */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	snprintf (dep, sizeof(dep), "%s/lib/modules/%s", base_dir, force_ver);</div><div class='del'>-	return xftw (dep, check_update);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Strip white char at the end of a string.</div><div class='del'>- *	Return the address of the last non white char + 1 (point on the '\0').</div><div class='del'>- */</div><div class='del'>-static char *strip_end(char *str)</div><div class='del'>-{</div><div class='del'>-	int len = strlen(str);</div><div class='del'>-</div><div class='del'>-	for (str += len - 1; len &gt; 0 &amp;&amp; (isspace(*str)); --len, --str)</div><div class='del'>-		*str = '\0';</div><div class='del'>-	return str + 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Read a line of a configuration file and process continuation lines.</div><div class='del'>- *	Return buf, or NULL if EOF.</div><div class='del'>- *	Blank at the end of line are always stripped.</div><div class='del'>- *	Everything on a line following comchar is a comment.</div><div class='del'>- *</div><div class='del'>- *	Continuation character is \</div><div class='del'>- *	Comment character is #</div><div class='del'>- */</div><div class='del'>-char *fgets_strip(char *buf, int sizebuf, FILE * fin, int *lineno)</div><div class='del'>-{</div><div class='del'>-	int nocomment = 1; /* No comments found ? */</div><div class='del'>-	int contline = 0;</div><div class='del'>-	char *start = buf;</div><div class='del'>-	char *ret = NULL;</div><div class='del'>-	char comchar = '#';</div><div class='del'>-	char contchar = '\\';</div><div class='del'>-</div><div class='del'>-	*buf = '\0';</div><div class='del'>-</div><div class='del'>-	while (fgets(buf, sizebuf, fin) != NULL) {</div><div class='del'>-		char *end = strip_end(buf);</div><div class='del'>-		char *pt = strchr(buf, comchar);</div><div class='del'>-</div><div class='del'>-		if (pt != NULL) {</div><div class='del'>-			nocomment = 0;</div><div class='del'>-			*pt = '\0';</div><div class='del'>-			end = strip_end(buf);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (lineno != NULL)</div><div class='del'>-			(*lineno)++;</div><div class='del'>-		ret = start;</div><div class='del'>-		if (contline) {</div><div class='del'>-			char *pt = buf;</div><div class='del'>-</div><div class='del'>-			while (isspace(*pt))</div><div class='del'>-				pt++;</div><div class='del'>-			if (pt &gt; buf + 1) {</div><div class='del'>-				strcpy(buf + 1, pt);	/* safe, backward copy */</div><div class='del'>-				buf[0] = ' ';</div><div class='del'>-				end -= (int) (pt - buf) - 1;</div><div class='del'>-			} else if (pt == buf + 1) {</div><div class='del'>-				buf[0] = ' ';</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (end &gt; buf &amp;&amp; *(end - 1) == contchar) {</div><div class='del'>-			if (end == buf + 1 || *(end - 2) != contchar) {</div><div class='del'>-				/* Continuation */</div><div class='del'>-				contline = 1;</div><div class='del'>-				end--;</div><div class='del'>-				*end = '\0';</div><div class='del'>-				buf = end;</div><div class='del'>-			} else {</div><div class='del'>-				*(end - 1) = '\0';</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-		} else {</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char *next_word(char *pt)</div><div class='del'>-{</div><div class='del'>-	char *match;</div><div class='del'>-	char *pt2;</div><div class='del'>-</div><div class='del'>-	/* find end of word */</div><div class='del'>-	for (pt2 = pt; *pt2 &amp;&amp; !(isspace(*pt2)); ++pt2) {</div><div class='del'>-		if ((match = strchr("\"'`", *pt2)) != NULL) {</div><div class='del'>-			for (++pt2; *pt2 &amp;&amp; *pt2 != *match; ++pt2) {</div><div class='del'>-				if (*pt2 == '\\' &amp;&amp; *(pt2 + 1) == *match)</div><div class='del'>-					++pt2;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* skip leading whitespace before next word */</div><div class='del'>-	if (*pt2) {</div><div class='del'>-		*pt2++ = '\0'; /* terminate last word */</div><div class='del'>-		while (*pt2 &amp;&amp; isspace(*pt2))</div><div class='del'>-			++pt2;</div><div class='del'>-	}</div><div class='del'>-	return pt2;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static GLOB_LIST *addlist(GLOB_LIST *orig, GLOB_LIST *add)</div><div class='del'>-{</div><div class='del'>-	if (!orig)</div><div class='del'>-		return add;</div><div class='del'>-	/* else */</div><div class='del'>-	orig-&gt;pathv = (char **)xrealloc(orig-&gt;pathv,</div><div class='del'>-					(orig-&gt;pathc + add-&gt;pathc + 1) *</div><div class='del'>-					sizeof(char *));</div><div class='del'>-	memcpy(orig-&gt;pathv + orig-&gt;pathc, add-&gt;pathv,</div><div class='del'>-	       add-&gt;pathc * sizeof(char *));</div><div class='del'>-	orig-&gt;pathc += add-&gt;pathc;</div><div class='del'>-	orig-&gt;pathv[orig-&gt;pathc] = NULL;</div><div class='del'>-	/*</div><div class='del'>-	free(add-&gt;pathv);</div><div class='del'>-	free(add);</div><div class='del'>-	*/</div><div class='del'>-	return orig;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void decode_list(int *n, OPT_LIST **list, char *arg, int adding,</div><div class='del'>-			char *version, int opts)</div><div class='del'>-{</div><div class='del'>-	GLOB_LIST *pg;</div><div class='del'>-	GLOB_LIST *prevlist = NULL;</div><div class='del'>-	int i, autoclean = 1;</div><div class='del'>-	int where = *n;</div><div class='del'>-	char *arg2 = next_word(arg);</div><div class='del'>-</div><div class='del'>-	if (opts &amp;&amp; !strcmp (arg, "-k")) {</div><div class='del'>-		if (!*arg2)</div><div class='del'>-			error("Missing module argument after -k\n");</div><div class='del'>-		arg = arg2;</div><div class='del'>-		arg2 = next_word(arg);</div><div class='del'>-		autoclean = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; *n; ++i) {</div><div class='del'>-		if (strcmp((*list)[i].name, arg) == 0) {</div><div class='del'>-			if (adding)</div><div class='del'>-				prevlist = (*list)[i].opts;</div><div class='del'>-			else</div><div class='del'>-				free((*list)[i].opts);</div><div class='del'>-			(*list)[i].opts = NULL;</div><div class='del'>-			where = i;</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (where == *n) {</div><div class='del'>-		(*list) = (OPT_LIST *)xrealloc((*list),</div><div class='del'>-			  (*n + 2) * sizeof(OPT_LIST));</div><div class='del'>-		(*list)[*n].name = xstrdup(arg);</div><div class='del'>-		(*list)[*n].autoclean = autoclean;</div><div class='del'>-		*n += 1;</div><div class='del'>-		memset(&amp;(*list)[*n], 0, sizeof(OPT_LIST));</div><div class='del'>-	} else if (!autoclean)</div><div class='del'>-		(*list)[where].autoclean = 0;</div><div class='del'>-	pg = (GLOB_LIST *)xmalloc(sizeof(GLOB_LIST));</div><div class='del'>-	meta_expand(arg2, pg, NULL, version, ME_ALL);</div><div class='del'>-	(*list)[where].opts = addlist(prevlist, pg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void decode_exec(char *arg, int type)</div><div class='del'>-{</div><div class='del'>-	char *arg2;</div><div class='del'>-</div><div class='del'>-	execs[nexecs].when = type;</div><div class='del'>-	arg2 = next_word(arg);</div><div class='del'>-	execs[nexecs].module = xstrdup(arg);</div><div class='del'>-	execs[nexecs].cmd = xstrdup(arg2);</div><div class='del'>-	if (++nexecs &gt;= maxexecs) {</div><div class='del'>-		maxexecs += 10;</div><div class='del'>-		execs = (struct EXEC_TYPE *)xrealloc(execs,</div><div class='del'>-			maxexecs * sizeof(struct EXEC_TYPE));</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int build_list(char **in, OPT_LIST **out, char *version, int opts)</div><div class='del'>-{</div><div class='del'>-	GLOB_LIST *pg;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	for (i = 0; in[i]; ++i) {</div><div class='del'>-		char *p = xstrdup(in[i]);</div><div class='del'>-		char *pt = next_word(p);</div><div class='del'>-		char *pn = p;</div><div class='del'>-</div><div class='del'>-		*out = (OPT_LIST *)xrealloc(*out, (i + 2) * sizeof(OPT_LIST));</div><div class='del'>-		(*out)[i].autoclean = 1;</div><div class='del'>-		if (opts &amp;&amp; !strcmp (p, "-k")) {</div><div class='del'>-		    pn = pt;</div><div class='del'>-		    pt = next_word(pn);</div><div class='del'>-		    (*out)[i].autoclean = 0;</div><div class='del'>-		}</div><div class='del'>-		pg = (GLOB_LIST *)xmalloc(sizeof(GLOB_LIST));</div><div class='del'>-		meta_expand(pt, pg, NULL, version, ME_ALL);</div><div class='del'>-		(*out)[i].name = xstrdup(pn);</div><div class='del'>-		(*out)[i].opts = pg;</div><div class='del'>-		free(p);</div><div class='del'>-	}</div><div class='del'>-	memset(&amp;(*out)[i], 0, sizeof(OPT_LIST));</div><div class='del'>-</div><div class='del'>-	return i;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Environment variables can override defaults, testing only */</div><div class='del'>-static void gen_file_env(struct gen_files *gf)</div><div class='del'>-{</div><div class='del'>-	if (!safemode) {</div><div class='del'>-		char *e = xmalloc(strlen(gf-&gt;base)+5), *p1 = gf-&gt;base, *p2 = e;</div><div class='del'>-		while ((*p2++ = toupper(*p1++))) ;</div><div class='del'>-		strcpy(p2-1, "PATH");	/* safe, xmalloc */</div><div class='del'>-		if ((p2 = getenv(e)) != NULL) {</div><div class='del'>-			free(gf-&gt;name);</div><div class='del'>-			gf-&gt;name = xstrdup(p2);</div><div class='del'>-		}</div><div class='del'>-		free(e);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Read a config option for a generated filename */</div><div class='del'>-static int gen_file_conf(struct gen_files *gf, int assgn, const char *parm, const char *arg)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	int l = strlen(gf-&gt;base);</div><div class='del'>-	if (assgn &amp;&amp;</div><div class='del'>-	    strncmp(parm, gf-&gt;base, l) == 0 &amp;&amp;</div><div class='del'>-	    strcmp(parm+l, "file") == 0 &amp;&amp;</div><div class='del'>-	    !gf-&gt;name) {</div><div class='del'>-		gf-&gt;name = xstrdup(arg);</div><div class='del'>-		return(0);</div><div class='del'>-	}</div><div class='del'>-	return(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Check we have a name for a generated file */</div><div class='del'>-static int gen_file_check(struct gen_files *gf, GLOB_LIST *g,</div><div class='del'>-			  char *base_dir, char *version)</div><div class='del'>-{</div><div class='del'>-	char tmp[PATH_MAX];</div><div class='del'>-	int ret = 0;</div><div class='del'>-	if (!gf-&gt;name) {</div><div class='del'>-		/*</div><div class='del'>-		 * Specification: config file / no xxxfile parameter</div><div class='del'>-		 * The default value for generated filename xxx is:</div><div class='del'>-		 *</div><div class='del'>-		 * xxxfile=/lib/modules/`uname -r`/modules.xxx</div><div class='del'>-		 *</div><div class='del'>-		 * If the config file exists but lacks an xxxfile</div><div class='del'>-		 * specification, the default value is used since</div><div class='del'>-		 * the system can't work without one.</div><div class='del'>-		 */</div><div class='del'>-		snprintf(tmp, sizeof(tmp), "%s/lib/modules/%s/modules.%s",</div><div class='del'>-			base_dir, version, gf-&gt;base);</div><div class='del'>-		gf-&gt;name = xstrdup(tmp);</div><div class='del'>-	} else { /* xxxfile defined in modules.conf */</div><div class='del'>-		/*</div><div class='del'>-		 * If we have a xxxfile definition in the configuration file</div><div class='del'>-		 * we must resolve any shell meta-chars in its value.</div><div class='del'>-		 */</div><div class='del'>-		if (meta_expand(gf-&gt;name, g, base_dir, version, ME_ALL))</div><div class='del'>-			ret = -1;</div><div class='del'>-		else if (!g-&gt;pathv || g-&gt;pathv[0] == NULL)</div><div class='del'>-			ret = -1;</div><div class='del'>-		else {</div><div class='del'>-			free(gf-&gt;name);</div><div class='del'>-			gf-&gt;name = xstrdup(g-&gt;pathv[0]);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return(ret);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Read the configuration file.</div><div class='del'>- *	If parameter "all" == 0 then ignore everything except path info</div><div class='del'>- *	Return -1 if any error.</div><div class='del'>- *	Error messages generated.</div><div class='del'>- */</div><div class='del'>-static int do_read(int all, char *force_ver, char *base_dir, char *conf_file, int depth)</div><div class='del'>-{</div><div class='del'>-	#define MAX_LEVEL 20</div><div class='del'>-	FILE *fin;</div><div class='del'>-	GLOB_LIST g;</div><div class='del'>-	int i;</div><div class='del'>-	int assgn;</div><div class='del'>-	int drop_default_paths = 1;</div><div class='del'>-	int lineno = 0;</div><div class='del'>-	int ret = 0;</div><div class='del'>-	int state[MAX_LEVEL + 1]; /* nested "if" */</div><div class='del'>-	int level = 0;</div><div class='del'>-	char buf[3000];</div><div class='del'>-	char tmpline[100];</div><div class='del'>-	char **pathp;</div><div class='del'>-	char *envpath;</div><div class='del'>-	char *version;</div><div class='del'>-	char *type;</div><div class='del'>-	char **glb;</div><div class='del'>-	char old_name[] = "/etc/conf.modules";</div><div class='del'>-	int conf_file_specified = 0;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * The configuration file is optional.</div><div class='del'>-	 * No error is printed if it is missing.</div><div class='del'>-	 * If it is missing the following content is assumed.</div><div class='del'>-	 *</div><div class='del'>-	 * path[boot]=/lib/modules/boot</div><div class='del'>-	 *</div><div class='del'>-	 * path[toplevel]=/lib/modules/`uname -r`</div><div class='del'>-	 *</div><div class='del'>-	 * path[toplevel]=/lib/modules/`kernelversion`</div><div class='del'>-	 *   (where kernelversion gives the major kernel version: "2.0", "2.2"...)</div><div class='del'>-	 *</div><div class='del'>-	 * path[toplevel]=/lib/modules/default</div><div class='del'>-	 *</div><div class='del'>-	 * path[kernel]=/lib/modules/kernel</div><div class='del'>-	 * path[fs]=/lib/modules/fs</div><div class='del'>-	 * path[net]=/lib/modules/net</div><div class='del'>-	 * path[scsi]=/lib/modules/scsi</div><div class='del'>-	 * path[block]=/lib/modules/block</div><div class='del'>-	 * path[cdrom]=/lib/modules/cdrom</div><div class='del'>-	 * path[ipv4]=/lib/modules/ipv4</div><div class='del'>-	 * path[ipv6]=/lib/modules/ipv6</div><div class='del'>-	 * path[sound]=/lib/modules/sound</div><div class='del'>-	 * path[fc4]=/lib/modules/fc4</div><div class='del'>-	 * path[video]=/lib/modules/video</div><div class='del'>-	 * path[misc]=/lib/modules/misc</div><div class='del'>-	 * path[pcmcia]=/lib/modules/pcmcia</div><div class='del'>-	 * path[atm]=/lib/modules/atm</div><div class='del'>-	 * path[usb]=/lib/modules/usb</div><div class='del'>-	 * path[ide]=/lib/modules/ide</div><div class='del'>-	 * path[ieee1394]=/lib/modules/ieee1394</div><div class='del'>-	 * path[mtd]=/lib/modules/mtd</div><div class='del'>-	 *</div><div class='del'>-	 * The idea is that modprobe will look first if the</div><div class='del'>-	 * modules are compiled for the current release of the kernel.</div><div class='del'>-	 * If not found, it will look for modules that fit for the</div><div class='del'>-	 * general kernelversion (2.0, 2.2 and so on).</div><div class='del'>-	 * If still not found, it will look into the default release.</div><div class='del'>-	 * And if still not found, it will look in the other directories.</div><div class='del'>-	 *</div><div class='del'>-	 * The strategy should be like this:</div><div class='del'>-	 * When you install a new linux kernel, the modules should go</div><div class='del'>-	 * into a directory related to the release (version) of the kernel.</div><div class='del'>-	 * Then you can do a symlink "default" to this directory.</div><div class='del'>-	 *</div><div class='del'>-	 * Each time you compile a new kernel, the make modules_install</div><div class='del'>-	 * will create a new directory, but it won't change thee default.</div><div class='del'>-	 *</div><div class='del'>-	 * When you get a module unrelated to the kernel distribution</div><div class='del'>-	 * you can place it in one of the last three directory types.</div><div class='del'>-	 *</div><div class='del'>-	 * This is the default strategy. Of course you can overide</div><div class='del'>-	 * this in /etc/modules.conf.</div><div class='del'>-	 *</div><div class='del'>-	 * 2.3.15 added a new file tree walk algorithm which made it possible to</div><div class='del'>-	 * point at a top level directory and get the same behaviour as earlier</div><div class='del'>-	 * versions of modutils.  2.3.16 takes this one stage further, it</div><div class='del'>-	 * removes all the individual directory names from most of the scans,</div><div class='del'>-	 * only pointing at the top level directory.  The only exception is the</div><div class='del'>-	 * last ditch scan, scanning all of /lib/modules would be a bad idea(TM)</div><div class='del'>-	 * so the last ditch scan still runs individual directory names under</div><div class='del'>-	 * /lib/modules.</div><div class='del'>-	 *</div><div class='del'>-	 * Additional syntax:</div><div class='del'>-	 *</div><div class='del'>-	 * [add] above module module1 ...</div><div class='del'>-	 *	Specify additional modules to pull in on top of a module</div><div class='del'>-	 *</div><div class='del'>-	 * [add] below module module1 ...</div><div class='del'>-	 *	Specify additional modules needed to be able to load a module</div><div class='del'>-	 *</div><div class='del'>-	 * [add] prune filename ...</div><div class='del'>-	 *</div><div class='del'>-	 * [add] probe name module1 ...</div><div class='del'>-	 *	When "name" is requested, modprobe tries to install each</div><div class='del'>-	 *	module in the list until it succeeds.</div><div class='del'>-	 *</div><div class='del'>-	 * [add] probeall name module1 ...</div><div class='del'>-	 *	When "name" is requested, modprobe tries to install all</div><div class='del'>-	 *	modules in the list.</div><div class='del'>-	 *	If any module is installed, the command has succeeded.</div><div class='del'>-	 *</div><div class='del'>-	 * [add] options module option_list</div><div class='del'>-	 *</div><div class='del'>-	 * For all of the above, the optional "add" prefix is used to</div><div class='del'>-	 * add to a list instead of replacing the contents.</div><div class='del'>-	 *</div><div class='del'>-	 * include FILE_TO_INCLUDE</div><div class='del'>-	 *	This does what you expect. No limitation on include levels.</div><div class='del'>-	 *</div><div class='del'>-	 * persistdir=persist_directory</div><div class='del'>-	 *	Name the directory to save persistent data from modules.</div><div class='del'>-	 *</div><div class='del'>-	 * In the following WORD is a sequence if non-white characters.</div><div class='del'>-	 * If ' " or ` is found in the string, all characters up to the</div><div class='del'>-	 * matching ' " or ` will also be included, even whitespace.</div><div class='del'>-	 * Every WORD will then be expanded w.r.t. meta-characters.</div><div class='del'>-	 * If the expanded result gives more than one word, then only</div><div class='del'>-	 * the first word of the result will be used.</div><div class='del'>-	 *</div><div class='del'>-	 *</div><div class='del'>-	 * define CODE WORD</div><div class='del'>-	 *		Do a putenv("CODE=WORD")</div><div class='del'>-	 *</div><div class='del'>-	 * EXPRESSION below can be:</div><div class='del'>-	 *	WORD compare_op WORD</div><div class='del'>-	 *		where compare_op is one of == != &lt; &lt;= &gt;= &gt;</div><div class='del'>-	 *		The string values of the WORDs are compared</div><div class='del'>-	 * or</div><div class='del'>-	 *	-n WORD compare_op WORD</div><div class='del'>-	 *		where compare_op is one of == != &lt; &lt;= &gt;= &gt;</div><div class='del'>-	 *		The numeric values of the WORDs are compared</div><div class='del'>-	 * or</div><div class='del'>-	 *	WORD</div><div class='del'>-	 *		if the expansion of WORD fails, or if the</div><div class='del'>-	 *		expansion is "0" (zero), "false" or "" (empty)</div><div class='del'>-	 *		then the expansion has the value FALSE.</div><div class='del'>-	 *		Otherwise the expansion has the value TRUE</div><div class='del'>-	 * or</div><div class='del'>-	 *	-f FILENAME</div><div class='del'>-	 *		Test if the file FILENAME exists</div><div class='del'>-	 * or</div><div class='del'>-	 *	-k</div><div class='del'>-	 *		Test if "autoclean" (i.e. called from the kernel)</div><div class='del'>-	 * or</div><div class='del'>-	 *	! EXPRESSION</div><div class='del'>-	 *		A negated expression is also an expression</div><div class='del'>-	 *</div><div class='del'>-	 * if EXPRESSION</div><div class='del'>-	 *	any config line</div><div class='del'>-	 *	...</div><div class='del'>-	 * elseif EXPRESSION</div><div class='del'>-	 *	any config line</div><div class='del'>-	 *	...</div><div class='del'>-	 * else</div><div class='del'>-	 *	any config line</div><div class='del'>-	 *	...</div><div class='del'>-	 * endif</div><div class='del'>-	 *</div><div class='del'>-	 * The else and elseif keywords are optional.</div><div class='del'>-	 * "if"-statements nest up to 20 levels.</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	state[0] = 1;</div><div class='del'>-</div><div class='del'>-	if (force_ver)</div><div class='del'>-		version = force_ver;</div><div class='del'>-	else</div><div class='del'>-		version = uts_info.release;</div><div class='del'>-</div><div class='del'>-	config_version = xstrdup(version);</div><div class='del'>-</div><div class='del'>-	/* Only read the default entries on the first file */</div><div class='del'>-	if (depth == 0) {</div><div class='del'>-		maxpath = 100;</div><div class='del'>-		modpath = (struct PATH_TYPE *)xmalloc(maxpath * sizeof(struct PATH_TYPE));</div><div class='del'>-		nmodpath = 0;</div><div class='del'>-</div><div class='del'>-		maxexecs = 10;</div><div class='del'>-		execs = (struct EXEC_TYPE *)xmalloc(maxexecs * sizeof(struct EXEC_TYPE));</div><div class='del'>-		nexecs = 0;</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Build predef options</div><div class='del'>-		 */</div><div class='del'>-		if (all &amp;&amp; optlist[0])</div><div class='del'>-			n_opt_list = build_list(optlist, &amp;opt_list, version, 1);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Build predef above</div><div class='del'>-		 */</div><div class='del'>-		if (all &amp;&amp; above[0])</div><div class='del'>-			n_abovelist = build_list(above, &amp;abovelist, version, 0);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Build predef below</div><div class='del'>-		 */</div><div class='del'>-		if (all &amp;&amp; below[0])</div><div class='del'>-			n_belowlist = build_list(below, &amp;belowlist, version, 0);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Build predef prune list</div><div class='del'>-		 */</div><div class='del'>-		if (prune[0])</div><div class='del'>-			n_prunelist = build_list(prune, &amp;prunelist, version, 0);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Build predef aliases</div><div class='del'>-		 */</div><div class='del'>-		if (all &amp;&amp; aliaslist[0])</div><div class='del'>-			n_aliases = build_list(aliaslist, &amp;aliases, version, 0);</div><div class='del'>-</div><div class='del'>-		/* Order and priority is now: (MODPATH + modules.conf) || (predefs + modules.conf) */</div><div class='del'>-		if ((envpath = getenv("MODPATH")) != NULL &amp;&amp; !safemode) {</div><div class='del'>-			size_t len;</div><div class='del'>-			char *p;</div><div class='del'>-			char *path;</div><div class='del'>-</div><div class='del'>-			/* Make a copy so's we can mung it with strtok.  */</div><div class='del'>-			len = strlen(envpath) + 1;</div><div class='del'>-			p = alloca(len);</div><div class='del'>-			memcpy(p, envpath, len);</div><div class='del'>-			path = alloca(PATH_MAX);</div><div class='del'>-</div><div class='del'>-			for (p = strtok(p, ":"); p != NULL; p = strtok(NULL, ":")) {</div><div class='del'>-				len = snprintf(path, PATH_MAX, p, version);</div><div class='del'>-				modpath[nmodpath].path = xstrdup(path);</div><div class='del'>-				if ((type = strrchr(path, '/')) != NULL)</div><div class='del'>-					type += 1;</div><div class='del'>-				else</div><div class='del'>-					type = "misc";</div><div class='del'>-				modpath[nmodpath].type = xstrdup(type);</div><div class='del'>-				if (++nmodpath &gt;= maxpath) {</div><div class='del'>-					maxpath += 100;</div><div class='del'>-					modpath = (struct PATH_TYPE *)xrealloc(modpath,</div><div class='del'>-						maxpath * sizeof(struct PATH_TYPE));</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-			}</div><div class='del'>-		} else {</div><div class='del'>-			/*</div><div class='del'>-			 * Build the default "path[type]" configuration</div><div class='del'>-			 */</div><div class='del'>-			int n;</div><div class='del'>-			char *k;</div><div class='del'>-</div><div class='del'>-			/* The first entry in the path list */</div><div class='del'>-			modpath[nmodpath].type = xstrdup("boot");</div><div class='del'>-			snprintf(tmpline, sizeof(tmpline), "%s/lib/modules/boot", base_dir);</div><div class='del'>-			modpath[nmodpath].path = xstrdup(tmpline);</div><div class='del'>-			++nmodpath;</div><div class='del'>-</div><div class='del'>-			/* The second entry in the path list, `uname -r` */</div><div class='del'>-			modpath[nmodpath].type = xstrdup("toplevel");</div><div class='del'>-			snprintf(tmpline, sizeof(tmpline), "%s/lib/modules/%s", base_dir, version);</div><div class='del'>-			modpath[nmodpath].path = xstrdup(tmpline);</div><div class='del'>-			++nmodpath;</div><div class='del'>-</div><div class='del'>-			/* The third entry in the path list, `kernelversion` */</div><div class='del'>-			modpath[nmodpath].type = xstrdup("toplevel");</div><div class='del'>-			for (n = 0, k = version; *k; ++k) {</div><div class='del'>-				if (*k == '.' &amp;&amp; ++n == 2)</div><div class='del'>-					break;</div><div class='del'>-			}</div><div class='del'>-			snprintf(tmpline, sizeof(tmpline), "%s/lib/modules/%.*s", base_dir,</div><div class='del'>-				(/* typecast for Alpha */ int)(k - version), version);</div><div class='del'>-			modpath[nmodpath].path = xstrdup(tmpline);</div><div class='del'>-			++nmodpath;</div><div class='del'>-</div><div class='del'>-			/* The rest of the entries in the path list */</div><div class='del'>-			for (pathp = tbpath; *pathp; ++pathp) {</div><div class='del'>-				char **type;</div><div class='del'>-</div><div class='del'>-				for (type = tbtype; *type; ++type) {</div><div class='del'>-					char path[PATH_MAX];</div><div class='del'>-</div><div class='del'>-					snprintf(path, sizeof(path), "%s%s/%s", base_dir, *pathp, *type);</div><div class='del'>-					if (meta_expand(path, &amp;g, NULL, version, ME_ALL))</div><div class='del'>-						return -1;</div><div class='del'>-</div><div class='del'>-					for (glb = g.pathv; glb &amp;&amp; *glb; ++glb) {</div><div class='del'>-						modpath[nmodpath].type = xstrdup(*type);</div><div class='del'>-						modpath[nmodpath].path = *glb;</div><div class='del'>-						if (++nmodpath &gt;= maxpath) {</div><div class='del'>-							maxpath += 100;</div><div class='del'>-							modpath = (struct PATH_TYPE *)xrealloc(modpath,</div><div class='del'>-								maxpath * sizeof(struct PATH_TYPE));</div><div class='del'>-						}</div><div class='del'>-					}</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* Environment overrides for testing only, undocumented */</div><div class='del'>-		for (i = 0; i &lt; gen_file_count; ++i)</div><div class='del'>-			gen_file_env(gen_file+i);</div><div class='del'>-</div><div class='del'>-	}	/* End of depth == 0 */</div><div class='del'>-</div><div class='del'>-	if (conf_file ||</div><div class='del'>-	    ((conf_file = getenv("MODULECONFIG")) != NULL &amp;&amp; *conf_file &amp;&amp; !safemode)) {</div><div class='del'>-		if (!(fin = fopen(conf_file, "r"))) {</div><div class='del'>-			error("Can't open %s", conf_file);</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-		conf_file_specified = 1;</div><div class='del'>-	} else {</div><div class='del'>-		if (!(fin = fopen((conf_file = ETC_MODULES_CONF), "r"))) {</div><div class='del'>-			/* Fall back to non-standard name */</div><div class='del'>-			if ((fin = fopen((conf_file = old_name), "r"))) {</div><div class='del'>-				fprintf(stderr,</div><div class='del'>-					"Warning: modutils is reading from %s because\n"</div><div class='del'>-					"         %s does not exist.  The use of %s is\n"</div><div class='del'>-					"         deprecated, please rename %s to %s\n"</div><div class='del'>-					"         as soon as possible.  Command\n"</div><div class='del'>-					"         mv %s %s\n",</div><div class='del'>-					old_name, ETC_MODULES_CONF,</div><div class='del'>-					old_name, old_name, ETC_MODULES_CONF,</div><div class='del'>-					old_name, ETC_MODULES_CONF);</div><div class='del'>-			}</div><div class='del'>-			/* So what... use the default configuration */</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (fin) {</div><div class='del'>-		struct stat statbuf1, statbuf2;</div><div class='del'>-		if (fstat(fileno(fin), &amp;statbuf1) == 0)</div><div class='del'>-			config_mtime = statbuf1.st_mtime;</div><div class='del'>-		config_file = xstrdup(conf_file);	/* Save name actually used */</div><div class='del'>-		if (!conf_file_specified &amp;&amp;</div><div class='del'>-		    stat(ETC_MODULES_CONF, &amp;statbuf1) == 0 &amp;&amp;</div><div class='del'>-		    stat(old_name, &amp;statbuf2) == 0) {</div><div class='del'>-			/* Both /etc files exist */</div><div class='del'>-			if (statbuf1.st_dev == statbuf2.st_dev &amp;&amp;</div><div class='del'>-			    statbuf1.st_ino == statbuf2.st_ino) {</div><div class='del'>-				if (lstat(ETC_MODULES_CONF, &amp;statbuf1) == 0 &amp;&amp;</div><div class='del'>-				    S_ISLNK(statbuf1.st_mode))</div><div class='del'>-					fprintf(stderr,</div><div class='del'>-						"Warning: You do not need a link from %s to\n"</div><div class='del'>-						"         %s.  The use of %s is deprecated,\n"</div><div class='del'>-						"         please remove %s and rename %s\n"</div><div class='del'>-						"         to %s as soon as possible.  Commands.\n"</div><div class='del'>-						"           rm %s\n"</div><div class='del'>-						"           mv %s %s\n",</div><div class='del'>-						ETC_MODULES_CONF, old_name,</div><div class='del'>-						old_name, ETC_MODULES_CONF, old_name, ETC_MODULES_CONF,</div><div class='del'>-						ETC_MODULES_CONF,</div><div class='del'>-						old_name, ETC_MODULES_CONF);</div><div class='del'>-				else {</div><div class='del'>-#ifndef NO_WARN_ON_OLD_LINK</div><div class='del'>-					fprintf(stderr,</div><div class='del'>-						"Warning: You do not need a link from %s to\n"</div><div class='del'>-						"         %s.  The use of %s is deprecated,\n"</div><div class='del'>-						"         please remove %s as soon as possible.  Command\n"</div><div class='del'>-						"           rm %s\n",</div><div class='del'>-						old_name, ETC_MODULES_CONF,</div><div class='del'>-						old_name, old_name,</div><div class='del'>-						old_name);</div><div class='del'>-#endif</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			else</div><div class='del'>-				fprintf(stderr,</div><div class='del'>-					"Warning: modutils is reading from %s and\n"</div><div class='del'>-					"         ignoring %s.  The use of %s is deprecated,\n"</div><div class='del'>-					"         please remove %s as soon as possible.  Command\n"</div><div class='del'>-					"           rm %s\n",</div><div class='del'>-					ETC_MODULES_CONF, old_name,</div><div class='del'>-					old_name, old_name,</div><div class='del'>-					old_name);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Finally, decode the file</div><div class='del'>-	 */</div><div class='del'>-	while (fin &amp;&amp; fgets_strip(buf, sizeof(buf) - 1, fin, &amp;lineno) != NULL) {</div><div class='del'>-		char *arg2;</div><div class='del'>-		char *parm = buf;</div><div class='del'>-		char *arg;</div><div class='del'>-		int one_err = 0;</div><div class='del'>-		int adding;</div><div class='del'>-</div><div class='del'>-		while (isspace(*parm))</div><div class='del'>-			parm++;</div><div class='del'>-</div><div class='del'>-		if (strncmp(parm, "add", 3) == 0) {</div><div class='del'>-			adding = 1;</div><div class='del'>-			parm += 3;</div><div class='del'>-			while (isspace(*parm))</div><div class='del'>-				parm++;</div><div class='del'>-		} else</div><div class='del'>-			adding = 0;</div><div class='del'>-</div><div class='del'>-		arg = parm;</div><div class='del'>-</div><div class='del'>-		if (*parm == '\0')</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		one_err = 1;</div><div class='del'>-</div><div class='del'>-		while (*arg &gt; ' ' &amp;&amp; *arg != '=')</div><div class='del'>-			arg++;</div><div class='del'>-</div><div class='del'>-		if (*arg == '=')</div><div class='del'>-			assgn = 1;</div><div class='del'>-		else</div><div class='del'>-			assgn = 0;</div><div class='del'>-		*arg++ = '\0';</div><div class='del'>-		while (isspace(*arg))</div><div class='del'>-			arg++;</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * endif</div><div class='del'>-		 */</div><div class='del'>-		if (!assgn &amp;&amp; strcmp(parm, "endif") == 0) {</div><div class='del'>-			if (level &gt; 0)</div><div class='del'>-				--level;</div><div class='del'>-			else {</div><div class='del'>-				error("unmatched endif in line %d", lineno);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * else</div><div class='del'>-		 */</div><div class='del'>-		if (!assgn &amp;&amp; strcmp(parm, "else") == 0) {</div><div class='del'>-			if (level &lt;= 0) {</div><div class='del'>-				error("else without if in line %d", lineno);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			state[level] = !state[level];</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * elseif</div><div class='del'>-		 */</div><div class='del'>-		if (!assgn &amp;&amp; strcmp(parm, "elseif") == 0) {</div><div class='del'>-			if (level &lt;= 0) {</div><div class='del'>-				error("elseif without if in line %d", lineno);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			if (state[level] != 0) {</div><div class='del'>-				/*</div><div class='del'>-				 * We have already found a TRUE</div><div class='del'>-				 * if statement in this "chain".</div><div class='del'>-				 * That's what "2" means.</div><div class='del'>-				 */</div><div class='del'>-				state[level] = 2;</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			/* else: No TRUE if has been found, cheat */</div><div class='del'>-			/*</div><div class='del'>-			 * The "if" handling increments level,</div><div class='del'>-			 * but this is the _same_ level as before.</div><div class='del'>-			 * So, compensate for it.</div><div class='del'>-			 */</div><div class='del'>-			--level;</div><div class='del'>-			parm = "if";</div><div class='del'>-			/* Fallthru to "if" */</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * if</div><div class='del'>-		 */</div><div class='del'>-		if (strcmp(parm, "if") == 0) {</div><div class='del'>-			char *cmp;</div><div class='del'>-			int not = 0;</div><div class='del'>-			int numeric = 0;</div><div class='del'>-</div><div class='del'>-			if (level &gt;= MAX_LEVEL) {</div><div class='del'>-				error("Too many nested if's in line %d\n", lineno);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			state[++level] = 0; /* default false */</div><div class='del'>-</div><div class='del'>-			if (*arg == '!') {</div><div class='del'>-				not = 1;</div><div class='del'>-				arg = next_word(arg);</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if (strncmp(arg, "-k", 2) == 0) {</div><div class='del'>-				state[level] = flag_autoclean;</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if (strncmp(arg, "-f", 2) == 0) {</div><div class='del'>-				char *file = next_word(arg);</div><div class='del'>-				meta_expand(file, &amp;g, NULL, version, ME_ALL);</div><div class='del'>-				if (access(g.pathc ? g.pathv[0] : file, R_OK) == 0)</div><div class='del'>-					state[level] = !not;</div><div class='del'>-				else</div><div class='del'>-					state[level] = not;</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if (strncmp(arg, "-n", 2) == 0) {</div><div class='del'>-				numeric = 1;</div><div class='del'>-				arg = next_word(arg);</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-			cmp = next_word(arg);</div><div class='del'>-			if (*cmp) {</div><div class='del'>-				GLOB_LIST g2;</div><div class='del'>-				long n1 = 0;</div><div class='del'>-				long n2 = 0;</div><div class='del'>-				char *w1 = "";</div><div class='del'>-				char *w2 = "";</div><div class='del'>-</div><div class='del'>-				arg2 = next_word(cmp);</div><div class='del'>-</div><div class='del'>-				meta_expand(arg, &amp;g, NULL, version, ME_ALL);</div><div class='del'>-				if (g.pathc &amp;&amp; g.pathv[0])</div><div class='del'>-					w1 = g.pathv[0];</div><div class='del'>-</div><div class='del'>-				meta_expand(arg2, &amp;g2, NULL, version, ME_ALL);</div><div class='del'>-				if (g2.pathc &amp;&amp; g2.pathv[0])</div><div class='del'>-					w2 = g2.pathv[0];</div><div class='del'>-</div><div class='del'>-				if (numeric) {</div><div class='del'>-					n1 = strtol(w1, NULL, 0);</div><div class='del'>-					n2 = strtol(w2, NULL, 0);</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-				if (strcmp(cmp, "==") == 0 ||</div><div class='del'>-				    strcmp(cmp, "=") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 == n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) == 0;</div><div class='del'>-				} else if (strcmp(cmp, "!=") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 != n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) != 0;</div><div class='del'>-				} else if (strcmp(cmp, "&gt;=") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 &gt;= n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) &gt;= 0;</div><div class='del'>-				} else if (strcmp(cmp, "&lt;=") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 &lt;= n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) &lt;= 0;</div><div class='del'>-				} else if (strcmp(cmp, "&gt;") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 &gt; n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) &gt; 0;</div><div class='del'>-				} else if (strcmp(cmp, "&lt;") == 0) {</div><div class='del'>-					if (numeric)</div><div class='del'>-					    state[level] = (n1 &lt; n2);</div><div class='del'>-					else</div><div class='del'>-					    state[level] = strcmp(w1, w2) &lt; 0;</div><div class='del'>-				}</div><div class='del'>-			} else { /* Check defined value, if any */</div><div class='del'>-				/* undef or defined as</div><div class='del'>-				 *	"" or "0" or "false" =&gt; false</div><div class='del'>-				 *  defined =&gt; true</div><div class='del'>-				 */</div><div class='del'>-				if (!meta_expand(arg, &amp;g, NULL, version, ME_ALL) &amp;&amp;</div><div class='del'>-				    g.pathc &gt; 0 &amp;&amp;</div><div class='del'>-				    strcmp(g.pathv[0], "0") != 0 &amp;&amp;</div><div class='del'>-				    strcmp(g.pathv[0], "false") != 0 &amp;&amp;</div><div class='del'>-				    strlen(g.pathv[0]) != 0)</div><div class='del'>-					state[level] = 1; /* true */</div><div class='del'>-			}</div><div class='del'>-			if (not)</div><div class='del'>-				state[level] = !state[level];</div><div class='del'>-</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Should we bother?</div><div class='del'>-		 */</div><div class='del'>-		if (state[level] != 1)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * define</div><div class='del'>-		 */</div><div class='del'>-		if (!assgn &amp;&amp; strcmp(parm, "define") == 0) {</div><div class='del'>-			char env[PATH_MAX];</div><div class='del'>-</div><div class='del'>-			arg2 = next_word(arg);</div><div class='del'>-			meta_expand(arg2, &amp;g, NULL, version, ME_ALL);</div><div class='del'>-			snprintf(env, sizeof(env), "%s=%s", arg, (g.pathc ? g.pathv[0] : ""));</div><div class='del'>-			putenv(env);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * include</div><div class='del'>-		 */</div><div class='del'>-		if (!assgn &amp;&amp; strcmp(parm, "include") == 0) {</div><div class='del'>-			meta_expand(arg, &amp;g, NULL, version, ME_ALL);</div><div class='del'>-</div><div class='del'>-			if (!do_read(all, version, base_dir, g.pathc ? g.pathv[0] : arg, depth+1))</div><div class='del'>-				one_err = 0;</div><div class='del'>-			else</div><div class='del'>-				error("include %s failed\n", arg);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * above</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "above") == 0) {</div><div class='del'>-			decode_list(&amp;n_abovelist, &amp;abovelist, arg, adding, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * below</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "below") == 0) {</div><div class='del'>-			decode_list(&amp;n_belowlist, &amp;belowlist, arg, adding, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * prune</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "prune") == 0) {</div><div class='del'>-			decode_list(&amp;n_prunelist, &amp;prunelist, arg, adding, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * probe</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "probe") == 0) {</div><div class='del'>-			decode_list(&amp;n_probe_list, &amp;probe_list, arg, adding, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * probeall</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "probeall") == 0) {</div><div class='del'>-			decode_list(&amp;n_probeall_list, &amp;probeall_list, arg, adding, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * options</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "options") == 0) {</div><div class='del'>-			decode_list(&amp;n_opt_list, &amp;opt_list, arg, adding, version, 1);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * alias</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; strcmp(parm, "alias") == 0) {</div><div class='del'>-			/*</div><div class='del'>-			 * Replace any previous (default) definitions</div><div class='del'>-			 * for the same module</div><div class='del'>-			 */</div><div class='del'>-			decode_list(&amp;n_aliases, &amp;aliases, arg, 0, version, 0);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Specification: /etc/modules.conf</div><div class='del'>-		 * The format of the commands in /etc/modules.conf are:</div><div class='del'>-		 *</div><div class='del'>-		 *	pre-install module command</div><div class='del'>-		 *	install module command</div><div class='del'>-		 *	post-install module command</div><div class='del'>-		 *	pre-remove module command</div><div class='del'>-		 *	remove module command</div><div class='del'>-		 *	post-remove module command</div><div class='del'>-		 *</div><div class='del'>-		 * The different words are separated by tabs or spaces.</div><div class='del'>-		 */</div><div class='del'>-		/*</div><div class='del'>-		 * pre-install</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "pre-install") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_PRE_INSTALL);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * install</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "install") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_INSTALL);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * post-install</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "post-install") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_POST_INSTALL);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * pre-remove</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "pre-remove") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_PRE_REMOVE);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * remove</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "remove") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_REMOVE);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * post-remove</div><div class='del'>-		 */</div><div class='del'>-		else if (all &amp;&amp; !assgn &amp;&amp; (strcmp(parm, "post-remove") == 0)) {</div><div class='del'>-			decode_exec(arg, EXEC_POST_REMOVE);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * insmod_opt=</div><div class='del'>-		 */</div><div class='del'>-		else if (assgn &amp;&amp; (strcmp(parm, "insmod_opt") == 0)) {</div><div class='del'>-			insmod_opt = xstrdup(arg);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * keep</div><div class='del'>-		 */</div><div class='del'>-		else if (!assgn &amp;&amp; (strcmp(parm, "keep") == 0)) {</div><div class='del'>-			drop_default_paths = 0;</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * path...=</div><div class='del'>-		 */</div><div class='del'>-		else if (assgn &amp;&amp; strncmp(parm, "path", 4) == 0) {</div><div class='del'>-			/*</div><div class='del'>-			 * Specification: config file / path parameter</div><div class='del'>-			 * The path parameter specifies a directory to</div><div class='del'>-			 * search for modules.</div><div class='del'>-			 * This parameter may be repeated multiple times.</div><div class='del'>-			 *</div><div class='del'>-			 * Note that the actual path may be defined using</div><div class='del'>-			 * wildcards and other shell meta-chars, such as "*?`".</div><div class='del'>-			 * For example:</div><div class='del'>-			 *      path[misc]=/lib/modules/1.1.5?/misc</div><div class='del'>-			 *</div><div class='del'>-			 * Optionally the path keyword carries a tag.</div><div class='del'>-			 * This tells us a little more about the purpose of</div><div class='del'>-			 * this directory and allows some automated operations.</div><div class='del'>-			 * A path is marked with a tag by adding the tag,</div><div class='del'>-			 * enclosed in square brackets, to the path keyword:</div><div class='del'>-			 * #</div><div class='del'>-			 * path[boot]=/lib/modules/boot</div><div class='del'>-			 * #</div><div class='del'>-			 * This case identifies the path a of directory</div><div class='del'>-			 * holding modules loadable a boot time.</div><div class='del'>-			 */</div><div class='del'>-</div><div class='del'>-			if (drop_default_paths) {</div><div class='del'>-				int n;</div><div class='del'>-</div><div class='del'>-				/*</div><div class='del'>-				 * Specification: config file / path / default</div><div class='del'>-				 *</div><div class='del'>-				 * Whenever there is a path[] specification</div><div class='del'>-				 * in the config file, all the default</div><div class='del'>-				 * path are reset.</div><div class='del'>-				 *</div><div class='del'>-				 * If one instead wants to _add_ to the default</div><div class='del'>-				 * set of paths, one has to have the option</div><div class='del'>-				 *    keep</div><div class='del'>-				 * before the first path[]-specification line</div><div class='del'>-				 * in the configuration file.</div><div class='del'>-				 */</div><div class='del'>-				drop_default_paths = 0;</div><div class='del'>-				for (n = 0; n &lt; nmodpath; n++) {</div><div class='del'>-					free(modpath[n].path);</div><div class='del'>-					free(modpath[n].type);</div><div class='del'>-				}</div><div class='del'>-				nmodpath = 0;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			/*</div><div class='del'>-			 * Get (the optional) tag</div><div class='del'>-			 * If the tag is missing, the word "misc"</div><div class='del'>-			 * is assumed.</div><div class='del'>-			 */</div><div class='del'>-			type = "misc";</div><div class='del'>-</div><div class='del'>-			if (parm[4] == '[') {</div><div class='del'>-				char *pt_type = parm + 5;</div><div class='del'>-</div><div class='del'>-				while (*pt_type != '\0' &amp;&amp; *pt_type != ']')</div><div class='del'>-					pt_type++;</div><div class='del'>-</div><div class='del'>-				if (*pt_type == ']' &amp;&amp; pt_type[1] == '\0') {</div><div class='del'>-					*pt_type = '\0';</div><div class='del'>-					type = parm + 5;</div><div class='del'>-				} /* else CHECKME */</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			/*</div><div class='del'>-			 * Handle the actual path description</div><div class='del'>-			 */</div><div class='del'>-			if (meta_expand(arg, &amp;g, base_dir, version, ME_ALL))</div><div class='del'>-				return -1;</div><div class='del'>-			for (glb = g.pathv; glb &amp;&amp; *glb; ++glb) {</div><div class='del'>-				modpath[nmodpath].type = xstrdup(type);</div><div class='del'>-				modpath[nmodpath].path = *glb;</div><div class='del'>-				if (++nmodpath &gt;= maxpath) {</div><div class='del'>-					maxpath += 100;</div><div class='del'>-					modpath = (struct PATH_TYPE *)xrealloc(modpath,</div><div class='del'>-						maxpath * sizeof(struct PATH_TYPE));</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * persistdir</div><div class='del'>-		 */</div><div class='del'>-		else if (assgn &amp;&amp; strcmp(parm, "persistdir") == 0) {</div><div class='del'>-			meta_expand(arg, &amp;g, NULL, version, ME_ALL);</div><div class='del'>-			persistdir = xstrdup(g.pathc ? g.pathv[0] : arg);</div><div class='del'>-			one_err = 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* Names for generated files in config file */</div><div class='del'>-		for (i = 0; one_err &amp;&amp; i &lt; gen_file_count; ++i)</div><div class='del'>-			one_err = gen_file_conf(gen_file+i, assgn, parm, arg);</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * any errors so far?</div><div class='del'>-		 */</div><div class='del'>-		if (all == 0)</div><div class='del'>-			one_err = 0;</div><div class='del'>-		else if (one_err) {</div><div class='del'>-			error("Invalid line %d in %s\n\t%s",</div><div class='del'>-				     lineno, conf_file, buf);</div><div class='del'>-			ret = -1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (fin)</div><div class='del'>-		fclose(fin);</div><div class='del'>-</div><div class='del'>-	if (level) {</div><div class='del'>-		error("missing endif at %s EOF", conf_file);</div><div class='del'>-		ret = -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ret)</div><div class='del'>-		return ret;</div><div class='del'>-	/* else */</div><div class='del'>-</div><div class='del'>-	/* Check we have names for generated files */</div><div class='del'>-	for (i = 0; !ret &amp;&amp; i &lt; gen_file_count; ++i)</div><div class='del'>-		ret = gen_file_check(gen_file+i, &amp;g, base_dir, version);</div><div class='del'>-</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int config_read(int all, char *force_ver, char *base_dir, char *conf_file)</div><div class='del'>-{</div><div class='del'>-	int r;</div><div class='del'>-	if (modpath != NULL)</div><div class='del'>-		return 0; /* already initialized */</div><div class='del'>-</div><div class='del'>-	if (uname(&amp;uts_info) &lt; 0) {</div><div class='del'>-		error("Failed to find kernel name information");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	r = do_read(all, force_ver, base_dir, conf_file, 0);</div><div class='del'>-</div><div class='del'>-	if (quick &amp;&amp; !r &amp;&amp; !need_update (force_ver, base_dir))</div><div class='del'>-		exit (0);</div><div class='del'>-</div><div class='del'>-	return r;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/****************************************************************************/</div><div class='del'>-/*</div><div class='del'>- *	FIXME: Far too much global state.  KAO.</div><div class='del'>- */</div><div class='del'>-static int found;</div><div class='del'>-static int favail;</div><div class='del'>-static int one_only;</div><div class='del'>-static int meta_expand_type;</div><div class='del'>-char **list;</div><div class='del'>-static const char *filter_by_file;</div><div class='del'>-static char *filter_by_dir;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Add a file name if it exist</div><div class='del'>- */</div><div class='del'>-static int config_add(const char *file, const struct stat *sb)</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-	int npaths = 0;</div><div class='del'>-	char **paths = NULL;</div><div class='del'>-</div><div class='del'>-	if (meta_expand_type) {</div><div class='del'>-		GLOB_LIST g;</div><div class='del'>-		char **p;</div><div class='del'>-		char full[PATH_MAX];</div><div class='del'>-</div><div class='del'>-		snprintf(full, sizeof(full), "%s/%s", file, filter_by_file);</div><div class='del'>-</div><div class='del'>-		if (filter_by_dir &amp;&amp; !strstr(full, filter_by_dir))</div><div class='del'>-			return 0;</div><div class='del'>-</div><div class='del'>-		if (meta_expand(full, &amp;g, NULL, config_version, meta_expand_type))</div><div class='del'>-			return 1;</div><div class='del'>-		for (p = g.pathv; p &amp;&amp; *p; ++p) {</div><div class='del'>-			paths = (char **)xrealloc(paths,</div><div class='del'>-					(npaths + 1) * sizeof(char *));</div><div class='del'>-			paths[npaths++] = *p;</div><div class='del'>-		}</div><div class='del'>-	} else { /* normal path match or match with "*" */</div><div class='del'>-		if (!S_ISREG(sb-&gt;st_mode))</div><div class='del'>-			return 0;</div><div class='del'>-</div><div class='del'>-		if (strcmp(filter_by_file, "*")) {</div><div class='del'>-			char *p;</div><div class='del'>-</div><div class='del'>-			if ((p = strrchr(file, '/')) == NULL)</div><div class='del'>-				p = (char *)file;</div><div class='del'>-			else</div><div class='del'>-				p += 1;</div><div class='del'>-</div><div class='del'>-			if (strcmp(p, filter_by_file))</div><div class='del'>-				return 0;</div><div class='del'>-		}</div><div class='del'>-		if (filter_by_dir &amp;&amp; !strstr(file, filter_by_dir))</div><div class='del'>-			return 0;</div><div class='del'>-		paths = (char **)xmalloc(sizeof(char **));</div><div class='del'>-		*paths = xstrdup(file);</div><div class='del'>-		npaths = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; npaths; ++i) {</div><div class='del'>-		struct stat sbuf;</div><div class='del'>-</div><div class='del'>-		if (S_ISDIR(sb-&gt;st_mode)) {</div><div class='del'>-			if (stat(paths[i], &amp;sbuf) == 0)</div><div class='del'>-				sb = &amp;sbuf;</div><div class='del'>-		}</div><div class='del'>-		if (S_ISREG(sb-&gt;st_mode) &amp;&amp; sb-&gt;st_mode &amp; S_IRUSR) {</div><div class='del'>-			int j;</div><div class='del'>-			char **this;</div><div class='del'>-</div><div class='del'>-			if (!root_check_off) {</div><div class='del'>-				if (sb-&gt;st_uid != 0) {</div><div class='del'>-					error("%s is not owned by root", paths[i]);</div><div class='del'>-					continue;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			/* avoid duplicates */</div><div class='del'>-			for (j = 0, this = list; j &lt; found; ++j, ++this) {</div><div class='del'>-				if (strcmp(*this, paths[i]) == 0) {</div><div class='del'>-					free(paths[i]);</div><div class='del'>-					goto next;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			list[found] = paths[i];</div><div class='del'>-			if (++found &gt;= favail)</div><div class='del'>-				list = (char **)xrealloc(list,</div><div class='del'>-				     (favail += 100) * sizeof(char *));</div><div class='del'>-</div><div class='del'>-			if (one_only) {</div><div class='del'>-				for (j = i + 1; j &lt; npaths; ++j)</div><div class='del'>-					free(paths[j]);</div><div class='del'>-				free(paths);</div><div class='del'>-				return 1; /* finish xftw */</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	    next:</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (npaths &gt; 0)</div><div class='del'>-		free(paths);</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Find modules matching the name "match" in directory of type "type"</div><div class='del'>- * (type == NULL matches all)</div><div class='del'>- *</div><div class='del'>- * Return a pointer to the list of modules found (or NULL if error).</div><div class='del'>- * Update the counter (sent as parameter).</div><div class='del'>- */</div><div class='del'>-GLOB_LIST *config_lstmod(const char *match, const char *type, int first_only)</div><div class='del'>-{</div><div class='del'>-	/*</div><div class='del'>-	 * Note:</div><div class='del'>-	 * There are _no_ wildcards remaining in the path descriptions!</div><div class='del'>-	 */</div><div class='del'>-	struct stat sb;</div><div class='del'>-	int i;</div><div class='del'>-	int ret = 0;</div><div class='del'>-	char *path = NULL;</div><div class='del'>-	char this[PATH_MAX];</div><div class='del'>-</div><div class='del'>-	if (!match)</div><div class='del'>-		match = "*";</div><div class='del'>-	one_only = first_only;</div><div class='del'>-	found = 0;</div><div class='del'>-	filter_by_file = match;</div><div class='del'>-	filter_by_dir = NULL;</div><div class='del'>-	if (type) {</div><div class='del'>-		char tmpdir[PATH_MAX];</div><div class='del'>-		snprintf(tmpdir, sizeof(tmpdir), "/%s/", type);</div><div class='del'>-		filter_by_dir = xstrdup(tmpdir);</div><div class='del'>-	}</div><div class='del'>-	/* In safe mode, the module name is always handled as is, without meta</div><div class='del'>-	 * expansion.  It might have come from an end user via kmod and must</div><div class='del'>-	 * not be trusted.  Even in unsafe mode, only apply globbing to the</div><div class='del'>-	 * module name, not command expansion.  We trust config file input so</div><div class='del'>-	 * applying command expansion is safe, we do not trust command line input.</div><div class='del'>-	 * This assumes that the only time the user can specify -C config file </div><div class='del'>-	 * is when they run under their own authority.  In particular all</div><div class='del'>-	 * mechanisms that call modprobe as root on behalf of the user must</div><div class='del'>-	 * run in safe mode, without letting the user supply a config filename.</div><div class='del'>-	 */</div><div class='del'>-	meta_expand_type = 0;</div><div class='del'>-	if (strpbrk(match, SHELL_META) &amp;&amp; strcmp(match, "*") &amp;&amp; !safemode)</div><div class='del'>-		meta_expand_type = ME_GLOB|ME_BUILTIN_COMMAND;</div><div class='del'>-</div><div class='del'>-	list = (char **)xmalloc((favail = 100) * sizeof(char *));</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; nmodpath; i++) {</div><div class='del'>-		path = modpath[i].path;</div><div class='del'>-		/* Special case: insmod: handle single, non-wildcard match */</div><div class='del'>-		if (first_only &amp;&amp; strpbrk(match, SHELL_META) == NULL) {</div><div class='del'>-			/* Fix for "2.1.121 syntax */</div><div class='del'>-			snprintf(this, sizeof(this), "%s/%s/%s", path,</div><div class='del'>-						  modpath[i].type, match);</div><div class='del'>-			if (stat(this, &amp;sb) == 0 &amp;&amp;</div><div class='del'>-			    config_add(this, &amp;sb))</div><div class='del'>-				break;</div><div class='del'>-			/* End fix for "2.1.121 syntax */</div><div class='del'>-</div><div class='del'>-			snprintf(this, sizeof(this), "%s/%s", path, match);</div><div class='del'>-			if (stat(this, &amp;sb) == 0 &amp;&amp;</div><div class='del'>-			    config_add(this, &amp;sb))</div><div class='del'>-				break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* Start looking */</div><div class='del'>-		if ((ret = xftw(path, config_add))) {</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (ret &gt;= 0) {</div><div class='del'>-		GLOB_LIST *g = (GLOB_LIST *)xmalloc(sizeof(GLOB_LIST));</div><div class='del'>-		g-&gt;pathc = found;</div><div class='del'>-		g-&gt;pathv = list;</div><div class='del'>-		free(filter_by_dir);</div><div class='del'>-		return g;</div><div class='del'>-	}</div><div class='del'>-	free(list);</div><div class='del'>-	free(filter_by_dir);</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Given a bare module name, poke through the module path to find the file.  */</div><div class='del'>-char *search_module_path(const char *base)</div><div class='del'>-{</div><div class='del'>-	GLOB_LIST *g;</div><div class='del'>-</div><div class='del'>-	if (config_read(0, NULL, "", NULL) &lt; 0)</div><div class='del'>-		return NULL;</div><div class='del'>-	/* else */</div><div class='del'>-	g = config_lstmod(base, NULL, 1);</div><div class='del'>-	if (g == NULL || g-&gt;pathc == 0) {</div><div class='del'>-		char base_o[PATH_MAX];</div><div class='del'>-</div><div class='del'>-		snprintf(base_o, sizeof(base_o), "%s.o", base);</div><div class='del'>-		g = config_lstmod(base_o, NULL, 1);</div><div class='del'>-#ifdef CONFIG_USE_ZLIB</div><div class='del'>-		if (g == NULL || g-&gt;pathc == 0) {</div><div class='del'>-			snprintf(base_o, sizeof(base_o), "%s.o.gz", base);</div><div class='del'>-			g = config_lstmod(base_o, NULL, 1);</div><div class='del'>-		}</div><div class='del'>-#endif</div><div class='del'>-	}</div><div class='del'>-	if (g == NULL || g-&gt;pathc == 0)</div><div class='del'>-		return NULL;</div><div class='del'>-	/* else */</div><div class='del'>-	return g-&gt;pathv[0];</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/gzfiles.c b/mdk-stage1/insmod-modutils/util/gzfiles.c<br/>deleted file mode 100644<br/>index 8d02253bb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/gzfiles.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/gzfiles.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,74 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * This simple library intends to make it transparent to read gzipped and/or</div><div class='del'>- * standard files. This is simple enough to fit modutils' needs, but may be</div><div class='del'>- * easily adapted to anyone's needs. It's completely free, do what you want</div><div class='del'>- * with it .  - Willy Tarreau &lt;willy@meta-x.org&gt; - 2000/05/05 -</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef CONFIG_USE_ZLIB</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;zlib.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/* redefinition of gz_stream which isn't exported by zlib */</div><div class='del'>-typedef struct gz_stream {</div><div class='del'>-    z_stream stream;</div><div class='del'>-    int      z_err;   /* error code for last stream operation */</div><div class='del'>-    int      z_eof;   /* set if end of input file */</div><div class='del'>-    FILE     *file;   /* .gz file */</div><div class='del'>-    Byte     *inbuf;  /* input buffer */</div><div class='del'>-    Byte     *outbuf; /* output buffer */</div><div class='del'>-    uLong    crc;     /* crc32 of uncompressed data */</div><div class='del'>-    char     *msg;    /* error message */</div><div class='del'>-    char     *path;   /* path name for debugging only */</div><div class='del'>-    int      transparent; /* 1 if input file is not a .gz file */</div><div class='del'>-    char     mode;    /* 'w' or 'r' */</div><div class='del'>-    long     startpos; /* start of compressed data in file (header skipped) */</div><div class='del'>-} gz_stream;</div><div class='del'>-</div><div class='del'>-/* maximum number of simultaneous open files, also greater file descriptor number */</div><div class='del'>-#define MAXFD	64</div><div class='del'>-</div><div class='del'>-/* this static list is assumed to be filled with NULLs at runtime */</div><div class='del'>-static gzFile gzf_fds[MAXFD];</div><div class='del'>-</div><div class='del'>-/* returns the filedesc of the opened file. */</div><div class='del'>-int gzf_open(const char *name, int mode) {</div><div class='del'>-    int fd;</div><div class='del'>-    gzFile g;</div><div class='del'>-</div><div class='del'>-    if ((g=gzopen(name, "rb")) != NULL) {</div><div class='del'>-	fd=fileno(((gz_stream*)g)-&gt;file);</div><div class='del'>-	gzf_fds[fd]=g;</div><div class='del'>-    }</div><div class='del'>-    else if ((fd=open(name, mode)) != -1) {</div><div class='del'>-	gzf_fds[fd]=NULL; /* NULL means not GZ mode */</div><div class='del'>-    }</div><div class='del'>-    return fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-off_t gzf_lseek(int fd, off_t offset, int whence) {</div><div class='del'>-    if (fd&lt;0 || fd&gt;=MAXFD || gzf_fds[fd]==NULL)</div><div class='del'>-	return lseek(fd, offset, whence);</div><div class='del'>-    else</div><div class='del'>-	return gzseek(gzf_fds[fd], offset, whence);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int gzf_read(int fd, void *buf, size_t count) {</div><div class='del'>-    if (fd&lt;0 || fd&gt;=MAXFD || gzf_fds[fd]==NULL)</div><div class='del'>-	return read(fd, buf, count);</div><div class='del'>-    else</div><div class='del'>-	return gzread(gzf_fds[fd], buf, count);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void gzf_close(int fd) {</div><div class='del'>-    if (fd&lt;0 || fd&gt;=MAXFD || gzf_fds[fd]==NULL)</div><div class='del'>-	close(fd);</div><div class='del'>-    else</div><div class='del'>-	gzclose(gzf_fds[fd]);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/logger.c b/mdk-stage1/insmod-modutils/util/logger.c<br/>deleted file mode 100644<br/>index 3b790df5a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/logger.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/logger.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,163 +0,0 @@</div><div class='del'>-/* Error logging facilities.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA</div><div class='del'>-  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-int errors;</div><div class='del'>-const char *error_file;</div><div class='del'>-int log;</div><div class='del'>-</div><div class='del'>-#define STOREMSG</div><div class='del'>-#ifdef STOREMSG</div><div class='del'>-struct cbuf {</div><div class='del'>-	struct cbuf *next;</div><div class='del'>-	int type;</div><div class='del'>-	char *msg;</div><div class='del'>-} *head, *tail;</div><div class='del'>-</div><div class='del'>-static void savemsg(int type, char *msg)</div><div class='del'>-{</div><div class='del'>-	struct cbuf *me = (struct cbuf *)xmalloc(sizeof(struct cbuf));</div><div class='del'>-	char *s = xstrdup(msg);</div><div class='del'>-</div><div class='del'>-	me-&gt;next = NULL;</div><div class='del'>-	me-&gt;type = type;</div><div class='del'>-	me-&gt;msg = s;</div><div class='del'>-</div><div class='del'>-	if (tail)</div><div class='del'>-		tail-&gt;next = me;</div><div class='del'>-	else</div><div class='del'>-		head = me;</div><div class='del'>-	tail = me;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* STOREMSG */</div><div class='del'>-</div><div class='del'>-static void dumpmsg(void)</div><div class='del'>-{</div><div class='del'>-	for (;head; head = head-&gt;next)</div><div class='del'>-		syslog(head-&gt;type, "%s", head-&gt;msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void setsyslog(const char *program)</div><div class='del'>-{</div><div class='del'>-	openlog(program, LOG_CONS, LOG_DAEMON);</div><div class='del'>-#ifdef STOREMSG</div><div class='del'>-	atexit(dumpmsg);</div><div class='del'>-#endif</div><div class='del'>-	log = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef _STANDALONE_</div><div class='del'>-static int silent;</div><div class='del'>-</div><div class='del'>-const char *program_name;</div><div class='del'>-</div><div class='del'>-void error(const char *fmt,...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-</div><div class='del'>-	if (silent)</div><div class='del'>-		;</div><div class='del'>-	else if (log) {</div><div class='del'>-		char buf[1024];</div><div class='del'>-		int n;</div><div class='del'>-</div><div class='del'>-		if (error_file)</div><div class='del'>-			n = snprintf(buf, sizeof(buf), "%s: ", error_file);</div><div class='del'>-		else</div><div class='del'>-			n = 0;</div><div class='del'>-		va_start(args, fmt);</div><div class='del'>-		vsnprintf(buf + n, sizeof(buf) - n, fmt, args);</div><div class='del'>-		va_end(args);</div><div class='del'>-#ifdef STOREMSG</div><div class='del'>-		savemsg(LOG_ERR, buf);</div><div class='del'>-#else</div><div class='del'>-		syslog(LOG_ERR, "%s", buf);</div><div class='del'>-#endif</div><div class='del'>-	} else {</div><div class='del'>-		if (error_file)</div><div class='del'>-			fprintf(stderr, "%s: ", error_file);</div><div class='del'>-		va_start(args, fmt);</div><div class='del'>-		vfprintf(stderr, fmt, args);</div><div class='del'>-		va_end(args);</div><div class='del'>-		putc('\n', stderr);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	errors++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void lprintf(const char *fmt,...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-</div><div class='del'>-	if (silent);</div><div class='del'>-	else if (log) {</div><div class='del'>-		char buf[1024];</div><div class='del'>-		va_start(args, fmt);</div><div class='del'>-		vsnprintf(buf, sizeof(buf), fmt, args);</div><div class='del'>-		va_end(args);</div><div class='del'>-#ifdef STOREMSG</div><div class='del'>-		savemsg(LOG_INFO, buf);</div><div class='del'>-#else</div><div class='del'>-		syslog(LOG_INFO, "%s", buf);</div><div class='del'>-#endif</div><div class='del'>-	} else {</div><div class='del'>-		va_start(args, fmt);</div><div class='del'>-		vfprintf(stdout, fmt, args);</div><div class='del'>-		va_end(args);</div><div class='del'>-		putchar('\n');</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else /* _STANDALONE_ */</div><div class='del'>-#include "../../log.h"</div><div class='del'>-void error(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vlog_message(s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void lprintf(const char *s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list p;</div><div class='del'>-</div><div class='del'>-	va_start(p, s);</div><div class='del'>-	vlog_message(s, p);</div><div class='del'>-	va_end(p);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/meta_expand.c b/mdk-stage1/insmod-modutils/util/meta_expand.c<br/>deleted file mode 100644<br/>index 41fb4024c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/meta_expand.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/meta_expand.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,339 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Handle expansion of meta charaters</div><div class='del'>- *</div><div class='del'>- * Copyright 1999 Björn Ekwall &lt;bj0rn@blox.se&gt;</div><div class='del'>- *</div><div class='del'>- * "kernelversion" idea from the Debian release via:</div><div class='del'>- *	Wichert Akkerman &lt;wakkerma@cs.leidenuniv.nl&gt;</div><div class='del'>- *</div><div class='del'>- * Use wordexp(): idea from Tim Waugh &lt;tim@cyberelk.demon.co.uk&gt;</div><div class='del'>- *</div><div class='del'>- * Alpha typecast: Michal Jaegermann &lt;michal@ellpspace.math.ualberta.ca&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_WORDEXP</div><div class='del'>-#undef HAVE_WORDEXP</div><div class='del'>-#define HAVE_WORDEXP 0</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#if HAVE_WORDEXP</div><div class='del'>-#include &lt;wordexp.h&gt;</div><div class='del'>-#elif HAVE_GLOB</div><div class='del'>-#include &lt;glob.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Split into words delimited by whitespace,</div><div class='del'>- * handle remaining quotes though...</div><div class='del'>- * If strip_quotes != 0 then strip one level of quotes from the line.</div><div class='del'>- */</div><div class='del'>-static void split_line(GLOB_LIST *g, char *line, int strip_quotes)</div><div class='del'>-{</div><div class='del'>-	int len;</div><div class='del'>-	char *d;</div><div class='del'>-	char *e;</div><div class='del'>-	char *p;</div><div class='del'>-	char tmpline[PATH_MAX];</div><div class='del'>-</div><div class='del'>-	for (p = line; *p; p = e) {</div><div class='del'>-		/* Skip leading whitespace */</div><div class='del'>-		while (*p &amp;&amp; isspace(*p))</div><div class='del'>-			++p;</div><div class='del'>-</div><div class='del'>-		/* find end of word */</div><div class='del'>-		d = tmpline;</div><div class='del'>-		for (e = p; *e &amp;&amp; !(isspace(*e)); ++e) {</div><div class='del'>-			char match;</div><div class='del'>-</div><div class='del'>-			/* Quote handling */</div><div class='del'>-			switch (*e) {</div><div class='del'>-			case '\\':</div><div class='del'>-				if (!strip_quotes)</div><div class='del'>-					*d++ = *e;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			case '"':</div><div class='del'>-			case '\'':</div><div class='del'>-				match = *e;</div><div class='del'>-				if (!strip_quotes)</div><div class='del'>-					*d++ = *e;</div><div class='del'>-				for (++e; *e &amp;&amp; *e != match; ++e) {</div><div class='del'>-					*d++ = *e;</div><div class='del'>-					if (*e == '\\' &amp;&amp; *(e + 1) == match)</div><div class='del'>-						*d++ = *++e;</div><div class='del'>-				}</div><div class='del'>-				if (!strip_quotes)</div><div class='del'>-					*d++ = *e;</div><div class='del'>-				break;</div><div class='del'>-</div><div class='del'>-			default:</div><div class='del'>-				*d++ = *e;</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if ((len = (int)(d - tmpline)) &gt; 0) {</div><div class='del'>-			char *str = xmalloc(len + 1);</div><div class='del'>-			strncpy(str, tmpline, len);</div><div class='del'>-			str[len] = '\0';</div><div class='del'>-			g-&gt;pathv = (char **)xrealloc(g-&gt;pathv,</div><div class='del'>-				   (g-&gt;pathc + 2) * sizeof(char *));</div><div class='del'>-			g-&gt;pathv[g-&gt;pathc++] = str;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (g-&gt;pathc)</div><div class='del'>-		g-&gt;pathv[g-&gt;pathc] = NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int glob_it(char *pt, GLOB_LIST *g)</div><div class='del'>-{</div><div class='del'>-#if HAVE_WORDEXP</div><div class='del'>-	wordexp_t w;</div><div class='del'>-</div><div class='del'>-	memset(&amp;w, 0, sizeof(w));</div><div class='del'>-	if (wordexp(pt, &amp;w, WRDE_UNDEF)) {</div><div class='del'>-		/*</div><div class='del'>-		error("wordexp %s failed", pt);</div><div class='del'>-		*/</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	/* else */</div><div class='del'>-	g-&gt;pathc = w.we_wordc;</div><div class='del'>-	g-&gt;pathv = w.we_wordv;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-#elif HAVE_GLOB /* but not wordexp */</div><div class='del'>-	glob_t w;</div><div class='del'>-</div><div class='del'>-	memset(&amp;w, 0, sizeof(w));</div><div class='del'>-	if (glob(pt, GLOB_NOSORT, NULL, &amp;w)) {</div><div class='del'>-		/*</div><div class='del'>-		error("glob %s failed", pt);</div><div class='del'>-		*/</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	/* else */</div><div class='del'>-	if (w.gl_pathc &amp;&amp; strpbrk(w.gl_pathv[0], SHELL_META)) {</div><div class='del'>-		globfree(&amp;w);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	g-&gt;pathc = w.gl_pathc;</div><div class='del'>-	g-&gt;pathv = w.gl_pathv;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-#else /* Neither wordexp nor glob */</div><div class='del'>-	return -1;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Expand the string (including meta-character) to a list of matches</div><div class='del'>- *</div><div class='del'>- * Return 0 if OK else -1</div><div class='del'>- */</div><div class='del'>-int meta_expand(char *pt, GLOB_LIST *g, char *base_dir, char *version, int type)</div><div class='del'>-{</div><div class='del'>-	FILE *fin;</div><div class='del'>-	int len = 0;</div><div class='del'>-	char *line = NULL;</div><div class='del'>-	char *p, *p1;</div><div class='del'>-	char tmpline[PATH_MAX + 1];</div><div class='del'>-	char wrk[sizeof(tmpline)];</div><div class='del'>-	char tmpcmd[2*sizeof(tmpline)+20];	/* room for /bin/echo "text" */</div><div class='del'>-</div><div class='del'>-	g-&gt;pathc = 0;</div><div class='del'>-	g-&gt;pathv = NULL;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Take care of version dependent expansions</div><div class='del'>-	 * Needed for forced version handling</div><div class='del'>-	 */</div><div class='del'>-	if ((p = strchr(pt, '`')) != NULL &amp;&amp; (type &amp; ME_BUILTIN_COMMAND)) {</div><div class='del'>-		do {</div><div class='del'>-			char *s;</div><div class='del'>-</div><div class='del'>-			for (s = p + 1; isspace(*s); ++s)</div><div class='del'>-				;</div><div class='del'>-</div><div class='del'>-			if (strncmp(s, "uname -r", 8) == 0) {</div><div class='del'>-				while (*s &amp;&amp; (*s != '`'))</div><div class='del'>-					++s;</div><div class='del'>-				if (*s == '`') {</div><div class='del'>-					*p = '\0';</div><div class='del'>-					snprintf(wrk, sizeof(wrk), "%s%s%s",</div><div class='del'>-						     pt,</div><div class='del'>-						     version,</div><div class='del'>-						     s + 1);</div><div class='del'>-					*p = '`';</div><div class='del'>-				}</div><div class='del'>-				strcpy(tmpline, wrk);	/* safe, same size */</div><div class='del'>-				pt = tmpline;</div><div class='del'>-			} else if (strncmp(s, "kernelversion", 13) == 0) {</div><div class='del'>-				while (*s &amp;&amp; (*s != '`'))</div><div class='del'>-					++s;</div><div class='del'>-				if (*s == '`') {</div><div class='del'>-					int n;</div><div class='del'>-					char *k;</div><div class='del'>-</div><div class='del'>-					*p = '\0';</div><div class='del'>-					for (n = 0, k = version; *k; ++k) {</div><div class='del'>-						if (*k == '.' &amp;&amp; ++n == 2)</div><div class='del'>-							break;</div><div class='del'>-					}</div><div class='del'>-					snprintf(wrk, sizeof(wrk), "%s%.*s%s",</div><div class='del'>-						     pt,</div><div class='del'>-						     /* typecast for Alpha */</div><div class='del'>-						     (int)(k - version),</div><div class='del'>-						     version,</div><div class='del'>-						     s + 1);</div><div class='del'>-					*p = '`';</div><div class='del'>-					strcpy(tmpline, wrk);	/* safe, same size */</div><div class='del'>-					pt = tmpline;</div><div class='del'>-				}</div><div class='del'>-			} else</div><div class='del'>-				break;</div><div class='del'>-		} while ((p = strchr(pt, '`')) != NULL);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Any remaining meta-chars?</div><div class='del'>-	 */</div><div class='del'>-	if (strpbrk(pt, SHELL_META) == NULL) {</div><div class='del'>-		/*</div><div class='del'>-		 * No meta-chars.</div><div class='del'>-		 * Split into words, delimited by whitespace.</div><div class='del'>-		 */</div><div class='del'>-		snprintf(wrk, sizeof(wrk), "%s%s", (base_dir ? base_dir : ""), pt);</div><div class='del'>-		strcpy(tmpline, wrk);	/* safe, same size */</div><div class='del'>-		if ((p = strtok(tmpline, " \t\n")) != NULL) {</div><div class='del'>-			while (p) {</div><div class='del'>-				g-&gt;pathv = (char **)xrealloc(g-&gt;pathv,</div><div class='del'>-					   (g-&gt;pathc + 2) * sizeof(char *));</div><div class='del'>-				g-&gt;pathv[g-&gt;pathc++] = xstrdup(p);</div><div class='del'>-				p = strtok(NULL, " \t\n");</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (g-&gt;pathc)</div><div class='del'>-			g-&gt;pathv[g-&gt;pathc] = NULL;</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	/* else */</div><div class='del'>-	/*</div><div class='del'>-	 * Handle remaining meta-chars</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Just plain quotes?</div><div class='del'>-	 */</div><div class='del'>-	if (strpbrk(pt, "&amp;();|&lt;&gt;$`!{}[]~=+:?*") == NULL &amp;&amp;</div><div class='del'>-	    (p = strpbrk(pt, "\"'\\"))) {</div><div class='del'>-		split_line(g, pt, 1);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (strpbrk(pt, "&amp;();|&lt;&gt;$`\"'\\!{}~+:[]~?*") == NULL) {</div><div class='del'>-		/* Only "=" remaining, should be module options */</div><div class='del'>-		split_line(g, pt, 0);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If there are meta-characters and</div><div class='del'>-	 * if they are only shell glob meta-characters: do globbing</div><div class='del'>-	 */</div><div class='del'>-#if HAVE_WORDEXP</div><div class='del'>-	if (strpbrk(pt, "&amp;();|&lt;&gt;`\"'\\!{}~=+:") == NULL &amp;&amp;</div><div class='del'>-	    strpbrk(pt, "$[]~?*"))</div><div class='del'>-#else</div><div class='del'>-	if (strpbrk(pt, "&amp;();|&lt;&gt;$`\"'\\!{}~=+:") == NULL &amp;&amp;</div><div class='del'>-	    strpbrk(pt, "[]~?*"))</div><div class='del'>-#endif</div><div class='del'>-		if ((type &amp; ME_GLOB) &amp;&amp; glob_it(pt, g) == 0)</div><div class='del'>-			return 0;</div><div class='del'>-</div><div class='del'>-	if (strpbrk(pt, "&amp;();|&lt;&gt;$`\"'\\!{}~+:[]~?*") == NULL) {</div><div class='del'>-		/* Only "=" remaining, should be module options */</div><div class='del'>-		split_line(g, pt, 0);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Last resort: Use "echo".</div><div class='del'>-	 * DANGER: Applying shell expansion to user supplied input is a</div><div class='del'>-	 *         major security risk.  Modutils code should only do meta</div><div class='del'>-	 *         expansion via shell commands for trusted data.  Basically</div><div class='del'>-	 *         this means only for data in the config file.   Even that</div><div class='del'>-	 *         assumes that the user cannot run modprobe as root with</div><div class='del'>-	 *         their own config file.  Programs (including the kernel)</div><div class='del'>-	 *         that invoke modprobe as root with user supplied input must</div><div class='del'>-	 *         pass exactly one user supplied parameter and must set</div><div class='del'>-	 *         safe mode.</div><div class='del'>-	 */</div><div class='del'>-	if (!(type &amp; ME_SHELL_COMMAND))</div><div class='del'>-		return 0;</div><div class='del'>-	snprintf(wrk, sizeof(wrk), "%s%s", (base_dir ? base_dir : ""), pt);</div><div class='del'>-	strcpy(tmpline, wrk);	/* safe, same size */</div><div class='del'>-	snprintf(tmpcmd, sizeof(tmpcmd), "/bin/echo \"");</div><div class='del'>-	for (p = tmpline, p1 = tmpcmd + strlen(tmpcmd); *p; ++p, ++p1) {</div><div class='del'>-		if (*p == '"' || *p == '\\')</div><div class='del'>-			*p1++ = '\\';</div><div class='del'>-		*p1 = *p;</div><div class='del'>-	}</div><div class='del'>-	*p1++ = '"';</div><div class='del'>-	*p1++ = '\0';</div><div class='del'>-	if (p1 - tmpcmd &gt; sizeof(tmpcmd)) {</div><div class='del'>-		error("tmpcmd overflow, should never happen");</div><div class='del'>-		exit(1);</div><div class='del'>-	}</div><div class='del'>-	if ((fin = popen(tmpcmd, "r")) == NULL) {</div><div class='del'>-		error("Can't execute: %s", tmpcmd);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	/* else */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Collect the result</div><div class='del'>-	 */</div><div class='del'>-	while (fgets(tmpcmd, PATH_MAX, fin) != NULL) {</div><div class='del'>-		int l = strlen(tmpcmd);</div><div class='del'>-</div><div class='del'>-		line = (char *)xrealloc(line, len + l + 1);</div><div class='del'>-		line[len] = '\0';</div><div class='del'>-		strcat(line + len, tmpcmd);	/* safe, realloc */</div><div class='del'>-		len += l;</div><div class='del'>-	}</div><div class='del'>-	pclose(fin);</div><div class='del'>-</div><div class='del'>-	if (line) {</div><div class='del'>-		/* shell used to strip one set of quotes.  Paranoia code in</div><div class='del'>-		 * 2.3.20 stops that strip so we do it ourselves.</div><div class='del'>-		 */</div><div class='del'>-		split_line(g, line, 1);</div><div class='del'>-		free(line);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/modstat.c b/mdk-stage1/insmod-modutils/util/modstat.c<br/>deleted file mode 100644<br/>index ad82306c0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/modstat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/modstat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,419 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Get kernel symbol table(s) and other relevant module info.</div><div class='del'>- *</div><div class='del'>- * Add module_name_list and l_module_name_list.</div><div class='del'>- *   Keith Owens &lt;kaos@ocs.com.au&gt; November 1999.</div><div class='del'>- * Björn Ekwall &lt;bj0rn@blox.se&gt; in February 1999 (C)</div><div class='del'>- * Initial work contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-#include "module.h"</div><div class='del'>-#include "obj.h"</div><div class='del'>-#include "modstat.h"</div><div class='del'>-</div><div class='del'>-struct module_stat *module_stat;</div><div class='del'>-size_t n_module_stat;</div><div class='del'>-char *module_name_list;</div><div class='del'>-size_t l_module_name_list;</div><div class='del'>-struct module_symbol *ksyms;</div><div class='del'>-size_t nksyms;</div><div class='del'>-int k_new_syscalls;</div><div class='del'>-</div><div class='del'>-static void *old_kernsym;</div><div class='del'>-</div><div class='del'>-/************************************************************************/</div><div class='del'>-static void drop(void)</div><div class='del'>-{</div><div class='del'>-	/*</div><div class='del'>-	 * Clean the slate for multiple runs</div><div class='del'>-	 */</div><div class='del'>-	if (module_stat) {</div><div class='del'>-		struct module_stat *m;</div><div class='del'>-		int i;</div><div class='del'>-</div><div class='del'>-		for (i = 0, m = module_stat; i &lt; n_module_stat; ++i, ++m) {</div><div class='del'>-			if (m-&gt;syms)</div><div class='del'>-				free(m-&gt;syms);</div><div class='del'>-			if (m-&gt;refs)</div><div class='del'>-				free(m-&gt;refs);</div><div class='del'>-		}</div><div class='del'>-		free(module_stat);</div><div class='del'>-		module_stat = NULL;</div><div class='del'>-		n_module_stat = 0;</div><div class='del'>-	}</div><div class='del'>-	if (module_name_list) {</div><div class='del'>-		free(module_name_list);</div><div class='del'>-		module_name_list = NULL;</div><div class='del'>-		l_module_name_list = 0;</div><div class='del'>-	}</div><div class='del'>-	if (ksyms) {</div><div class='del'>-		free(ksyms);</div><div class='del'>-		ksyms = NULL;</div><div class='del'>-		nksyms = 0;</div><div class='del'>-	}</div><div class='del'>-	if (old_kernsym) {</div><div class='del'>-		free(old_kernsym);</div><div class='del'>-		old_kernsym = NULL;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int new_get_kernel_info(int type)</div><div class='del'>-{</div><div class='del'>-	struct module_stat *modules;</div><div class='del'>-	struct module_stat *m;</div><div class='del'>-	struct module_symbol *syms;</div><div class='del'>-	struct module_symbol *s;</div><div class='del'>-	size_t ret;</div><div class='del'>-	size_t bufsize;</div><div class='del'>-	size_t nmod;</div><div class='del'>-	size_t nsyms;</div><div class='del'>-	size_t i;</div><div class='del'>-	size_t j;</div><div class='del'>-	char *module_names;</div><div class='del'>-	char *mn;</div><div class='del'>-</div><div class='del'>-	drop();</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Collect the loaded modules</div><div class='del'>-	 */</div><div class='del'>-	module_names = xmalloc(bufsize = 256);</div><div class='del'>-	while (query_module(NULL, QM_MODULES, module_names, bufsize, &amp;ret)) {</div><div class='del'>-		if (errno != ENOSPC) {</div><div class='del'>-			error("QM_MODULES: %m\n");</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-		module_names = xrealloc(module_names, bufsize = ret);</div><div class='del'>-	}</div><div class='del'>-	module_name_list = module_names;</div><div class='del'>-	l_module_name_list = bufsize;</div><div class='del'>-	n_module_stat = nmod = ret;</div><div class='del'>-	module_stat = modules = xmalloc(nmod * sizeof(struct module_stat));</div><div class='del'>-	memset(modules, 0, nmod * sizeof(struct module_stat));</div><div class='del'>-</div><div class='del'>-	/* Collect the info from the modules */</div><div class='del'>-	for (i = 0, mn = module_names, m = modules;</div><div class='del'>-	     i &lt; nmod;</div><div class='del'>-	     ++i, ++m, mn += strlen(mn) + 1) {</div><div class='del'>-		struct module_info info;</div><div class='del'>-</div><div class='del'>-		m-&gt;name = mn;</div><div class='del'>-		if (query_module(mn, QM_INFO, &amp;info, sizeof(info), &amp;ret)) {</div><div class='del'>-			if (errno == ENOENT) {</div><div class='del'>-			/* The module was removed out from underneath us. */</div><div class='del'>-				m-&gt;flags = NEW_MOD_DELETED;</div><div class='del'>-				continue;</div><div class='del'>-			}</div><div class='del'>-			/* else oops */</div><div class='del'>-			error("module %s: QM_INFO: %m", mn);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		m-&gt;addr = info.addr;</div><div class='del'>-</div><div class='del'>-		if (type &amp; K_INFO) {</div><div class='del'>-			m-&gt;size = info.size;</div><div class='del'>-			m-&gt;flags = info.flags;</div><div class='del'>-			m-&gt;usecount = info.usecount;</div><div class='del'>-			m-&gt;modstruct = info.addr;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (type &amp; K_REFS) {</div><div class='del'>-			int mm;</div><div class='del'>-			char *mrefs;</div><div class='del'>-			char *mr;</div><div class='del'>-</div><div class='del'>-			mrefs = xmalloc(bufsize = 64);</div><div class='del'>-			while (query_module(mn, QM_REFS, mrefs, bufsize, &amp;ret)) {</div><div class='del'>-				if (errno != ENOSPC) {</div><div class='del'>-					error("QM_REFS: %m");</div><div class='del'>-					return 1;</div><div class='del'>-				}</div><div class='del'>-				mrefs = xrealloc(mrefs, bufsize = ret);</div><div class='del'>-			}</div><div class='del'>-			for (j = 0, mr = mrefs;</div><div class='del'>-			     j &lt; ret;</div><div class='del'>-			     ++j, mr += strlen(mr) + 1) {</div><div class='del'>-				for (mm = 0; mm &lt; i; ++mm) {</div><div class='del'>-					if (strcmp(mr, module_stat[mm].name) == 0) {</div><div class='del'>-						m-&gt;nrefs += 1;</div><div class='del'>-						m-&gt;refs = xrealloc(m-&gt;refs, m-&gt;nrefs * sizeof(struct module_stat **));</div><div class='del'>-						m-&gt;refs[m-&gt;nrefs - 1] = module_stat + mm;</div><div class='del'>-						break;</div><div class='del'>-					}</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			free(mrefs);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (type &amp; K_SYMBOLS) { /* Want info about symbols */</div><div class='del'>-			syms = xmalloc(bufsize = 1024);</div><div class='del'>-			while (query_module(mn, QM_SYMBOLS, syms, bufsize, &amp;ret)) {</div><div class='del'>-				if (errno == ENOSPC) {</div><div class='del'>-					syms = xrealloc(syms, bufsize = ret);</div><div class='del'>-					continue;</div><div class='del'>-				}</div><div class='del'>-				if (errno == ENOENT) {</div><div class='del'>-					/*</div><div class='del'>-					 * The module was removed out</div><div class='del'>-					 * from underneath us.</div><div class='del'>-					 */</div><div class='del'>-					m-&gt;flags = NEW_MOD_DELETED;</div><div class='del'>-					free(syms);</div><div class='del'>-					goto next;</div><div class='del'>-				} else {</div><div class='del'>-					error("module %s: QM_SYMBOLS: %m", mn);</div><div class='del'>-					return 0;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			nsyms = ret;</div><div class='del'>-</div><div class='del'>-			m-&gt;nsyms = nsyms;</div><div class='del'>-			m-&gt;syms = syms;</div><div class='del'>-</div><div class='del'>-			/* Convert string offsets to string pointers */</div><div class='del'>-			for (j = 0, s = syms; j &lt; nsyms; ++j, ++s)</div><div class='del'>-				s-&gt;name += (unsigned long) syms;</div><div class='del'>-		}</div><div class='del'>-		next:</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (type &amp; K_SYMBOLS) { /* Want info about symbols */</div><div class='del'>-		/* Collect the kernel's symbols.  */</div><div class='del'>-		syms = xmalloc(bufsize = 16 * 1024);</div><div class='del'>-		while (query_module(NULL, QM_SYMBOLS, syms, bufsize, &amp;ret)) {</div><div class='del'>-			if (errno != ENOSPC) {</div><div class='del'>-				error("kernel: QM_SYMBOLS: %m");</div><div class='del'>-				return 0;</div><div class='del'>-			}</div><div class='del'>-			syms = xrealloc(syms, bufsize = ret);</div><div class='del'>-		}</div><div class='del'>-		nksyms = nsyms = ret;</div><div class='del'>-		ksyms = syms;</div><div class='del'>-</div><div class='del'>-		/* Convert string offsets to string pointers */</div><div class='del'>-		for (j = 0, s = syms; j &lt; nsyms; ++j, ++s)</div><div class='del'>-			s-&gt;name += (unsigned long) syms;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-/************************************************************************/</div><div class='del'>-</div><div class='del'>-#define mscan(offs,siz,ptr) \</div><div class='del'>-	if (lseek(kmem_fd, (off_t)(offs), SEEK_SET) == -1 || \</div><div class='del'>-	    read(kmem_fd, (ptr), (siz)) != (siz)) { \</div><div class='del'>-		if (kmem_fd != -1) \</div><div class='del'>-			close(kmem_fd); \</div><div class='del'>-		error("kmem: %m"); \</div><div class='del'>-		return 0; \</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#define OLD_MOD_RUNNING 1</div><div class='del'>-#define OLD_MOD_DELETED 2</div><div class='del'>-#define OLD_MOD_VISITED   0x20000000</div><div class='del'>-</div><div class='del'>-/* Fetch all the symbols and divvy them up as appropriate for the modules.  */</div><div class='del'>-static int old_get_kernel_info(int type)</div><div class='del'>-{</div><div class='del'>-	struct old_kernel_sym *kernsym;</div><div class='del'>-	struct old_kernel_sym *k;</div><div class='del'>-	struct module_stat *module;</div><div class='del'>-	struct module_stat *mod;</div><div class='del'>-	struct module_symbol *s = NULL;</div><div class='del'>-	int kmem_fd = -1;</div><div class='del'>-	int nkernsym;</div><div class='del'>-	int nmod;</div><div class='del'>-	int nm;</div><div class='del'>-	int nms;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	drop();</div><div class='del'>-	module_name_list = xmalloc(1);</div><div class='del'>-	*module_name_list = '\0';</div><div class='del'>-</div><div class='del'>-	if ((nkernsym = get_kernel_syms(NULL)) &lt; 0) {</div><div class='del'>-		error("get_kernel_syms: %m");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	kernsym = k = xmalloc(nkernsym * sizeof(struct old_kernel_sym));</div><div class='del'>-	old_kernsym = kernsym;</div><div class='del'>-	if (get_kernel_syms(kernsym) != nkernsym) {</div><div class='del'>-		error("inconsistency with get_kernel_syms -- is someone else "</div><div class='del'>-		      "playing with modules?");</div><div class='del'>-		free(kernsym);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Number of modules */</div><div class='del'>-	for (k = kernsym, nmod = 0, i = 0; i &lt; nkernsym; ++i, ++k) {</div><div class='del'>-		if (k-&gt;name[0] == '#') {</div><div class='del'>-			if (k-&gt;name[1]) {</div><div class='del'>-				++nmod;</div><div class='del'>-				i = strlen(k-&gt;name+1) + 1;</div><div class='del'>-				module_name_list =</div><div class='del'>-					xrealloc(module_name_list,</div><div class='del'>-					l_module_name_list + i);</div><div class='del'>-				strcpy(module_name_list+l_module_name_list,	/* safe, xrealloc */</div><div class='del'>-					k-&gt;name+1);</div><div class='del'>-				l_module_name_list += i;	/* NUL separated strings */</div><div class='del'>-			}</div><div class='del'>-			else</div><div class='del'>-				break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	module_stat = mod = module = xmalloc(nmod * sizeof(struct module_stat));</div><div class='del'>-	memset(module, 0, nmod * sizeof(struct module_stat));</div><div class='del'>-	n_module_stat = nmod;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Will we need kernel internal info?</div><div class='del'>-	 */</div><div class='del'>-	if ((type &amp; K_INFO) || (type &amp; K_REFS)) {</div><div class='del'>-		if ((kmem_fd = open("/dev/kmem", O_RDONLY)) &lt; 0) {</div><div class='del'>-			perror("ksyms: open /dev/kmem");</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Collect the module information.</div><div class='del'>-	 */</div><div class='del'>-	for (k = kernsym, nm = 0, i = 0; i &lt; nkernsym; ++i, ++k) {</div><div class='del'>-		if (k-&gt;name[0] == '#') {</div><div class='del'>-			struct old_kernel_sym *p;</div><div class='del'>-			struct old_module info;</div><div class='del'>-</div><div class='del'>-			if (k-&gt;name[1] == '\0')</div><div class='del'>-				break; /* kernel resident symbols follow */</div><div class='del'>-			/* else normal module */</div><div class='del'>-</div><div class='del'>-			module = mod++;</div><div class='del'>-			++nm;</div><div class='del'>-			module-&gt;name = k-&gt;name + 1;</div><div class='del'>-			module-&gt;modstruct = k-&gt;value;</div><div class='del'>-</div><div class='del'>-			if ((type &amp; K_INFO) || (type &amp; K_REFS)) {</div><div class='del'>-				long tmp;</div><div class='del'>-				/*</div><div class='del'>-				 * k-&gt;value is the address of the</div><div class='del'>-				 * struct old_module</div><div class='del'>-				 * in the kernel (for use via /dev/kmem)</div><div class='del'>-				 */</div><div class='del'>-				mscan(k-&gt;value, sizeof(info), &amp;info);</div><div class='del'>-				module-&gt;addr = info.addr;</div><div class='del'>-				module-&gt;size = info.size * getpagesize();</div><div class='del'>-</div><div class='del'>-				mscan(info.addr, sizeof(long), &amp;tmp);</div><div class='del'>-				module-&gt;flags = info.state &amp;</div><div class='del'>-						(OLD_MOD_RUNNING | OLD_MOD_DELETED);</div><div class='del'>-				module-&gt;flags |= NEW_MOD_USED_ONCE; /* Cheat */</div><div class='del'>-				if (tmp &amp; OLD_MOD_AUTOCLEAN)</div><div class='del'>-					module-&gt;flags |= NEW_MOD_AUTOCLEAN;</div><div class='del'>-				if (tmp &amp; OLD_MOD_VISITED)</div><div class='del'>-					module-&gt;flags |= NEW_MOD_VISITED;</div><div class='del'>-</div><div class='del'>-				module-&gt;usecount = tmp &amp; ~(OLD_MOD_AUTOCLEAN | OLD_MOD_VISITED);</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if ((type &amp; K_REFS) &amp;&amp; info.ref) {</div><div class='del'>-				struct old_module_ref mr;</div><div class='del'>-				int j;</div><div class='del'>-				unsigned long ref = info.ref;</div><div class='del'>-</div><div class='del'>-				do {</div><div class='del'>-					mscan(ref, sizeof(struct old_module_ref), &amp;mr);</div><div class='del'>-					for (j = 0; j &lt; nm -1; ++j) {</div><div class='del'>-						if (mr.module == module_stat[j].modstruct) {</div><div class='del'>-							module-&gt;nrefs += 1;</div><div class='del'>-							module-&gt;refs = xrealloc(module-&gt;refs, module-&gt;nrefs * sizeof(struct module_stat **));</div><div class='del'>-							module-&gt;refs[module-&gt;nrefs - 1] = module_stat + j;</div><div class='del'>-							break;</div><div class='del'>-						}</div><div class='del'>-					}</div><div class='del'>-				} while ((ref = mr.next) != 0);</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-			if (!(type &amp; K_SYMBOLS))</div><div class='del'>-				continue;</div><div class='del'>-			/*</div><div class='del'>-			 * Find out how many symbols this module has.</div><div class='del'>-			 */</div><div class='del'>-			for (nms = 0, p = k+1; p-&gt;name[0] != '#'; ++p)</div><div class='del'>-				++nms;</div><div class='del'>-			s = xmalloc(nms * sizeof(struct module_symbol));</div><div class='del'>-			module-&gt;syms = s;</div><div class='del'>-			module-&gt;nsyms = nms;</div><div class='del'>-		} else if (type &amp; K_SYMBOLS) { /* Want info about symbols */</div><div class='del'>-			s-&gt;name = (unsigned long) k-&gt;name;</div><div class='del'>-			s-&gt;value = k-&gt;value;</div><div class='del'>-			++s;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if ((type &amp; K_INFO) || (type &amp; K_REFS)) {</div><div class='del'>-		if (kmem_fd != -1)</div><div class='del'>-			close(kmem_fd);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Kernel resident symbols follows</div><div class='del'>-	 */</div><div class='del'>-	if (type &amp; K_SYMBOLS) { /* Want info about symbols */</div><div class='del'>-		if (k-&gt;name[0] == '#')</div><div class='del'>-			++k;</div><div class='del'>-		nksyms = nkernsym - (k - kernsym);</div><div class='del'>-		if (nksyms) {</div><div class='del'>-			ksyms = s = xmalloc(nksyms * sizeof(struct module_symbol));</div><div class='del'>-			for (i = 0; i &lt; nksyms; ++i, ++k) {</div><div class='del'>-				if (k-&gt;name[0] != '#') {</div><div class='del'>-					s-&gt;name = (unsigned long) k-&gt;name;</div><div class='del'>-					s-&gt;value = k-&gt;value;</div><div class='del'>-					++s;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-			nksyms = s - ksyms;</div><div class='del'>-		} else</div><div class='del'>-			ksyms = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* COMPAT_2_0 */</div><div class='del'>-</div><div class='del'>-int get_kernel_info(int type)</div><div class='del'>-{</div><div class='del'>-	k_new_syscalls = !query_module(NULL, 0, NULL, 0, NULL);</div><div class='del'>-</div><div class='del'>-#ifdef COMPAT_2_0</div><div class='del'>-	if (!k_new_syscalls)</div><div class='del'>-		return old_get_kernel_info(type);</div><div class='del'>-#endif /* COMPAT_2_0 */</div><div class='del'>-</div><div class='del'>-	return new_get_kernel_info(type);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/snap_shot.c b/mdk-stage1/insmod-modutils/util/snap_shot.c<br/>deleted file mode 100644<br/>index ae0cc7c79..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/snap_shot.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/snap_shot.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,154 +0,0 @@</div><div class='del'>-/* Take a snap shot of ksyms and modules for Oops debugging</div><div class='del'>-   Copyright 1999 Linux International.</div><div class='del'>-</div><div class='del'>-   Contributed by Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA</div><div class='del'>-  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-#include "obj.h"</div><div class='del'>-#include "modstat.h"</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-static char snap_dir[] = "/var/log/ksymoops";</div><div class='del'>-</div><div class='del'>-/* If snap_dir exists, take a snap shot of ksyms and modules to snap_dir.</div><div class='del'>- * Prefix the files with the equivalent of</div><div class='del'>- * date +%Y%m%d%T%M%S | sed -e 's/://g'</div><div class='del'>- */</div><div class='del'>-void snap_shot(const char *module_names, int n_module_names)</div><div class='del'>-{</div><div class='del'>-	char file[] = "ccyymmddhhmmss.modules", buffer[4096];</div><div class='del'>-	static char *infile[] = { "/proc/ksyms", "/proc/modules" };</div><div class='del'>-	static char *suffix[] = {       "ksyms",       "modules" };</div><div class='del'>-	struct tm *local;</div><div class='del'>-	time_t t;</div><div class='del'>-	int i, l;</div><div class='del'>-	FILE *in, *out;</div><div class='del'>-</div><div class='del'>-	if (module_names) {</div><div class='del'>-		/* Only snap shot if the list of modules has changed.</div><div class='del'>-		 * Otherwise auto cleanup takes a snap shot every time</div><div class='del'>-		 * and ends up with a large snap shot directory.</div><div class='del'>-		 */</div><div class='del'>-		char *new_module_names;</div><div class='del'>-		size_t n_new_module_names;</div><div class='del'>-		get_kernel_info(0);</div><div class='del'>-		new_module_names = module_name_list;</div><div class='del'>-		n_new_module_names = n_module_stat;</div><div class='del'>-		if (n_module_names &amp;&amp; n_new_module_names == n_module_names) {</div><div class='del'>-			while (n_module_names) {</div><div class='del'>-				if (strcmp(module_names, new_module_names))</div><div class='del'>-					break;	/* difference detected */</div><div class='del'>-				i = strlen(module_names) + 1;</div><div class='del'>-				module_names += i;</div><div class='del'>-				new_module_names += i;</div><div class='del'>-				--n_module_names;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (!n_module_names)</div><div class='del'>-			return;	/* no difference, no need for snap shot */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (chdir(snap_dir))</div><div class='del'>-		return;</div><div class='del'>-	t = time(NULL);</div><div class='del'>-	local = localtime(&amp;t);</div><div class='del'>-	for (i = 0; i &lt; sizeof(infile)/sizeof(infile[0]); ++i) {</div><div class='del'>-		snprintf(file, sizeof(file), "%04d%02d%02d%02d%02d%02d.%s",</div><div class='del'>-			local-&gt;tm_year+1900,</div><div class='del'>-			local-&gt;tm_mon + 1,</div><div class='del'>-			local-&gt;tm_mday,</div><div class='del'>-			local-&gt;tm_hour,</div><div class='del'>-			local-&gt;tm_min,</div><div class='del'>-			local-&gt;tm_sec,</div><div class='del'>-			suffix[i]);</div><div class='del'>-		out = fopen(file, "w");</div><div class='del'>-		if (!out) {</div><div class='del'>-			error("cannot create %s/%s %m", snap_dir, file);</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-		in = fopen(infile[i], "r");</div><div class='del'>-		if (!in) {</div><div class='del'>-			error("cannot open %s %m", infile[i]);</div><div class='del'>-			return;</div><div class='del'>-		}</div><div class='del'>-		while ((l = fread(buffer, 1, sizeof(buffer), in)) &gt; 0) {</div><div class='del'>-			if (fwrite(buffer, l, 1, out) != 1) {</div><div class='del'>-				error("unable to write to %s %m", file);</div><div class='del'>-				fclose(in);</div><div class='del'>-				fclose(out);</div><div class='del'>-				return;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-		if (ferror(in))</div><div class='del'>-			error("unable to read from %s %m", infile[i]);</div><div class='del'>-		fclose(in);</div><div class='del'>-		fclose(out);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* If snap_dir exists, log a message to snap_dir.  The log file is called the</div><div class='del'>- * equivalent of date +%Y%m%d | sed -e 's/://g'.  Each line is prefixed with</div><div class='del'>- * timestamp down to seconds and followed by a newline.</div><div class='del'>- */</div><div class='del'>-void snap_shot_log(const char *fmt,...)</div><div class='del'>-{</div><div class='del'>-	char date[] = "ccyymmdd", file[] = "ccyymmdd.log", stamp[] = "ccyymmdd hhmmss";</div><div class='del'>-	struct tm *local;</div><div class='del'>-	time_t t;</div><div class='del'>-	FILE *log;</div><div class='del'>-	va_list args;</div><div class='del'>-	int save_errno = errno;</div><div class='del'>-</div><div class='del'>-	if (chdir(snap_dir))</div><div class='del'>-		return;</div><div class='del'>-	t = time(NULL);</div><div class='del'>-	local = localtime(&amp;t);</div><div class='del'>-	snprintf(date, sizeof(date), "%04d%02d%02d",</div><div class='del'>-			local-&gt;tm_year+1900,</div><div class='del'>-			local-&gt;tm_mon + 1,</div><div class='del'>-			local-&gt;tm_mday);</div><div class='del'>-	snprintf(file, sizeof(file), "%s.log", date);</div><div class='del'>-	log = fopen(file, "a");</div><div class='del'>-	if (!log) {</div><div class='del'>-		error("cannot create %s/%s %m", snap_dir, file);</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	snprintf(stamp, sizeof(stamp), "%s %02d%02d%02d",</div><div class='del'>-		date,</div><div class='del'>-		local-&gt;tm_hour,</div><div class='del'>-		local-&gt;tm_min,</div><div class='del'>-		local-&gt;tm_sec);</div><div class='del'>-	fprintf(log, "%s ", stamp);</div><div class='del'>-	va_start(args, fmt);</div><div class='del'>-	errno = save_errno;	/* fmt may use %m */</div><div class='del'>-	vfprintf(log, fmt, args);</div><div class='del'>-	va_end(args);</div><div class='del'>-	fprintf(log, "\n");</div><div class='del'>-	fclose(log);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_cm.c b/mdk-stage1/insmod-modutils/util/sys_cm.c<br/>deleted file mode 100644<br/>index 851fb709e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_cm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_cm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,88 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-#if defined(__i386__) || defined(__m68k__) || defined(__arm__)</div><div class='del'>-</div><div class='del'>-#define __NR__create_module  __NR_create_module</div><div class='del'>-static inline _syscall2(long, _create_module, const char *, name, size_t, size)</div><div class='del'>-</div><div class='del'>-unsigned long create_module(const char *name, size_t size)</div><div class='del'>-{</div><div class='del'>-  /* Why all this fuss?</div><div class='del'>-</div><div class='del'>-     In linux 2.1, the address returned by create module point in</div><div class='del'>-     kernel space which is now mapped at the top of user space (at</div><div class='del'>-     0xc0000000 on i386). This looks like a negative number for a</div><div class='del'>-     long. The normal syscall macro of linux 2.0 (and all libc compile</div><div class='del'>-     with linux 2.0 or below) consider that the return value is a</div><div class='del'>-     negative number and consider it is an error number (A kernel</div><div class='del'>-     convention, return value are positive or negative, indicating the</div><div class='del'>-     error number).</div><div class='del'>-</div><div class='del'>-     By checking the value of errno, we know if we have been fooled by</div><div class='del'>-     the syscall2 macro and we fix it.  */</div><div class='del'>-</div><div class='del'>-  long ret = _create_module(name, size);</div><div class='del'>-  if (ret == -1 &amp;&amp; errno &gt; 125)</div><div class='del'>-    {</div><div class='del'>-      ret = -errno;</div><div class='del'>-      errno = 0;</div><div class='del'>-    }</div><div class='del'>-  return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#elif defined(__alpha__)</div><div class='del'>-</div><div class='del'>-/* Alpha doesn't have the same problem, exactly, but a bug in older</div><div class='del'>-   kernels fails to clear the error flag.  Clear it here explicitly.  */</div><div class='del'>-</div><div class='del'>-#define __NR__create_module  __NR_create_module</div><div class='del'>-static inline _syscall4(unsigned long, _create_module, const char *, name,</div><div class='del'>-			size_t, size, size_t, dummy, size_t, err);</div><div class='del'>-</div><div class='del'>-unsigned long create_module(const char *name, size_t size)</div><div class='del'>-{</div><div class='del'>-  return _create_module(name, size, 0, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-/* Sparc, MIPS, (and Alpha, but that's another problem) don't mistake</div><div class='del'>-   return values for errors due to the nature of the system call.  */</div><div class='del'>-</div><div class='del'>-_syscall2(unsigned long, create_module, const char *, name, size_t, size)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_dm.c b/mdk-stage1/insmod-modutils/util/sys_dm.c<br/>deleted file mode 100644<br/>index a166a30f4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_dm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_dm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-_syscall1(int, delete_module, const char *, name)</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_gks.c b/mdk-stage1/insmod-modutils/util/sys_gks.c<br/>deleted file mode 100644<br/>index f71772c71..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_gks.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_gks.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-_syscall1(int, get_kernel_syms, struct old_kernel_sym *, ksyms)</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_nim.c b/mdk-stage1/insmod-modutils/util/sys_nim.c<br/>deleted file mode 100644<br/>index bbe42135c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_nim.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_nim.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,53 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-#ifndef CONFIG_USE_SYSCALL</div><div class='del'>-</div><div class='del'>-extern int init_module(const char *name, const struct module *info);</div><div class='del'>-</div><div class='del'>-int </div><div class='del'>-sys_init_module(const char *name, const struct module *info)</div><div class='del'>-{</div><div class='del'>-  return init_module(name, info);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-#define __NR_sys_init_module  __NR_init_module</div><div class='del'>-_syscall2(int, sys_init_module, const char *, name,</div><div class='del'>-	  const struct module *, info)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_oim.c b/mdk-stage1/insmod-modutils/util/sys_oim.c<br/>deleted file mode 100644<br/>index 73ac6be52..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_oim.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_oim.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-#define __NR_old_sys_init_module  __NR_init_module</div><div class='del'>-_syscall5(int, old_sys_init_module, const char *, name, char *, code,</div><div class='del'>-	  unsigned, codesize, struct old_mod_routines *, routines,</div><div class='del'>-	  struct old_symbol_table *, symtab)</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/sys_qm.c b/mdk-stage1/insmod-modutils/util/sys_qm.c<br/>deleted file mode 100644<br/>index 119a219a2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/sys_qm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/sys_qm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,56 +0,0 @@</div><div class='del'>-/* Functions for the Linux module syscall interface.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-</div><div class='del'>-#include "module.h"</div><div class='del'>-</div><div class='del'>-/* Kernel headers before 2.1.mumble need this on the Alpha to get</div><div class='del'>-   _syscall* defined.  */</div><div class='del'>-#define __LIBRARY__</div><div class='del'>-</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* I am fucking tired of the "this doesn't build on 2.0.x" questions.</div><div class='del'>-   But if you ask, we still officially require 2.1.x to build.  */</div><div class='del'>-#if !defined(__NR_query_module)</div><div class='del'>-# if defined(__i386__)</div><div class='del'>-#  define __NR_query_module 167</div><div class='del'>-# elif defined(__alpha__)</div><div class='del'>-#  define __NR_query_module 347</div><div class='del'>-# elif defined(__sparc__)</div><div class='del'>-#  define __NR_query_module 184</div><div class='del'>-# elif defined(__mc68000__)</div><div class='del'>-#  define __NR_query_module 167</div><div class='del'>-# elif defined(__arm__)</div><div class='del'>-#  define __NR_query_module (__NR_SYSCALL_BASE + 167)</div><div class='del'>-# elif defined(__mips__)</div><div class='del'>-#  define __NR_query_module 4187</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-_syscall5(int, query_module, const char *, name, int, which,</div><div class='del'>-	  void *, buf, size_t, bufsize, size_t *, ret);</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xftw.c b/mdk-stage1/insmod-modutils/util/xftw.c<br/>deleted file mode 100644<br/>index fe764a63c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xftw.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xftw.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,422 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * modutils specific implementation of ftw().</div><div class='del'>- *</div><div class='del'>- * Copyright 2000:</div><div class='del'>- *  Keith Owens &lt;kaos@ocs.com.au&gt; August 2000</div><div class='del'>- *</div><div class='del'>- * This file is part of the Linux modutils.</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify it</div><div class='del'>- * under the terms of the GNU General Public License as published by the</div><div class='del'>- * Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>- * option) any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful, but</div><div class='del'>- * WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>- * General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software Foundation,</div><div class='del'>- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-    modutils requires special processing during the file tree walk</div><div class='del'>-    of /lib/modules/&lt;version&gt; and any paths that the user specifies.</div><div class='del'>-    The standard ftw() does a blind walk of all paths and can end</div><div class='del'>-    up following the build symlink down the kernel source tree.</div><div class='del'>-    Although nftw() has the option to get more control such as not</div><div class='del'>-    automatically following symbolic links, even that is not enough</div><div class='del'>-    for modutils.  The requirements are:</div><div class='del'>-</div><div class='del'>-    Paths must be directories or symlinks to directories.</div><div class='del'>-</div><div class='del'>-    Each directory is read and sorted into alphabetical order</div><div class='del'>-    before processing.</div><div class='del'>-</div><div class='del'>-    A directory is type 1 iff it was specified on a path statement</div><div class='del'>-    (either explicit or default) and the directory contains a</div><div class='del'>-    subdirectory with one of the known names and the directory name</div><div class='del'>-    does not end with "/kernel".  Otherwise it is type 2.</div><div class='del'>-</div><div class='del'>-    In a type 1 directory, walk the kernel subdirectory if it exists,</div><div class='del'>-    then the old known names in their historical order then any</div><div class='del'>-    remaining directory entries in alphabetical order and finally any</div><div class='del'>-    non-directory entries in alphabetical order.</div><div class='del'>-</div><div class='del'>-    Entries in a type 1 directory are filtered against the "prune"</div><div class='del'>-    list.  A type 1 directory can contain additional files which</div><div class='del'>-    are not modules nor symlinks to modules.  The prune list skips</div><div class='del'>-    known additional files, if a distribution wants to store</div><div class='del'>-    additional text files in the top level directory they should be</div><div class='del'>-    added to the prune list.</div><div class='del'>-</div><div class='del'>-    A type 2 directory must contain only modules or symlinks to</div><div class='del'>-    modules.  They are processed in alphabetical order, without</div><div class='del'>-    pruning.  Symlinks to directories are an error in type 2</div><div class='del'>-    directories.</div><div class='del'>-</div><div class='del'>-    The user function is not called for type 1 directories, nor for</div><div class='del'>-    pruned entries.  It is called for type 2 directories and their</div><div class='del'>-    contents.  It is also called for any files left in a type 1</div><div class='del'>-    directory after pruning and processing type 2 subdirectories.</div><div class='del'>-    The user function never sees symlinks, they are resolved before</div><div class='del'>-    calling the function.</div><div class='del'>-</div><div class='del'>-    Why have different directory types?  The original file tree</div><div class='del'>-    walk was not well defined.  Some users specified each directory</div><div class='del'>-    individually, others just pointed at the top level directory.</div><div class='del'>-    Either version worked until the "build" symlink was added.  Now</div><div class='del'>-    users who specify the top level directory end up running the</div><div class='del'>-    entire kernel source tree looking for modules, not nice.  We</div><div class='del'>-    cannot just ignore symlinks because pcmcia uses symlinks to</div><div class='del'>-    modules for backwards compatibility.</div><div class='del'>-</div><div class='del'>-    Type 1 is when a user specifies the top level directory which needs</div><div class='del'>-    special processing, type 2 is individual subdirectories.  But the</div><div class='del'>-    only way to tell the difference is by looking at the contents.  The</div><div class='del'>-    "/kernel" directory introduced in 2.3.12 either contains nothing</div><div class='del'>-    (old make modules_install) or contains all the kernel modules using</div><div class='del'>-    the same tree structure as the source.  Because "/kernel" can</div><div class='del'>-    contain old names but is really a type 2 directory, it is detected</div><div class='del'>-    as a special case.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;dirent.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;malloc.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-</div><div class='del'>-#include "util.h"</div><div class='del'>-#include "config.h"</div><div class='del'>-</div><div class='del'>-extern char *tbpath[];</div><div class='del'>-</div><div class='del'>-extern OPT_LIST *prune_list;</div><div class='del'>-extern int n_prune_list;</div><div class='del'>-</div><div class='del'>-extern char *tbtype[];</div><div class='del'>-</div><div class='del'>-struct xftw_dirent {</div><div class='del'>-    struct stat statbuf;</div><div class='del'>-    char *name;</div><div class='del'>-    char *fullname;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define XFTW_MAXDEPTH 64    /* Maximum directory depth handled */</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-    struct xftw_dirent *contents;</div><div class='del'>-    int size;</div><div class='del'>-    int used;</div><div class='del'>-} xftw_tree_t;</div><div class='del'>-</div><div class='del'>-static xftw_tree_t tree[XFTW_MAXDEPTH];</div><div class='del'>-</div><div class='del'>-/* Free all data for one tree level */</div><div class='del'>-static void xftw_free_tree(int depth)</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    xftw_tree_t *t = tree+depth;</div><div class='del'>-    for (i = 0; i &lt; t-&gt;size; ++i) {</div><div class='del'>-	free(t-&gt;contents[i].name);</div><div class='del'>-	free(t-&gt;contents[i].fullname);</div><div class='del'>-    }</div><div class='del'>-    free(t-&gt;contents);</div><div class='del'>-    t-&gt;contents = NULL;</div><div class='del'>-    t-&gt;size = 0;</div><div class='del'>-    t-&gt;used = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Increment dirents used at this depth, resizing if necessary */</div><div class='del'>-static void xftw_add_dirent(int depth)</div><div class='del'>-{</div><div class='del'>-    xftw_tree_t *t = tree+depth;</div><div class='del'>-    int i, size = t-&gt;size;</div><div class='del'>-    if (++t-&gt;used &lt; size)</div><div class='del'>-	return;</div><div class='del'>-    size += 10; /* arbitrary increment */</div><div class='del'>-    t-&gt;contents = xrealloc(t-&gt;contents, size*sizeof(*(t-&gt;contents)));</div><div class='del'>-    for (i = t-&gt;size; i &lt; size; ++i) {</div><div class='del'>-	memset(&amp;(t-&gt;contents[i].statbuf), 0, sizeof(t-&gt;contents[i].statbuf));</div><div class='del'>-	t-&gt;contents[i].name = NULL;</div><div class='del'>-	t-&gt;contents[i].fullname = NULL;</div><div class='del'>-    }</div><div class='del'>-    t-&gt;size = size;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Concatenate directory name and entry name into one string.</div><div class='del'>- * Note: caller must free result or leak.</div><div class='del'>- */</div><div class='del'>-static char *xftw_dir_name(const char *directory, const char *entry)</div><div class='del'>-{</div><div class='del'>-    int i = strlen(directory);</div><div class='del'>-    char *name;</div><div class='del'>-    if (entry)</div><div class='del'>-	i += strlen(entry);</div><div class='del'>-    i += 2;</div><div class='del'>-    name = xmalloc(i);</div><div class='del'>-    strcpy(name, directory);	/* safe, xmalloc */</div><div class='del'>-    if (*directory &amp;&amp; entry)</div><div class='del'>-	strcat(name, "/");	/* safe, xmalloc */</div><div class='del'>-    if (entry)</div><div class='del'>-	strcat(name, entry);	/* safe, xmalloc */</div><div class='del'>-    return(name);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Call the user function for a directory entry */</div><div class='del'>-static int xftw_do_name(const char *directory, const char *entry, struct stat *sb, xftw_func_t funcptr)</div><div class='del'>-{</div><div class='del'>-    int ret = 0;</div><div class='del'>-    char *name = xftw_dir_name(directory, entry);</div><div class='del'>-</div><div class='del'>-    if (S_ISLNK(sb-&gt;st_mode)) {</div><div class='del'>-	char real[PATH_MAX], *newname;</div><div class='del'>-	verbose("resolving %s symlink to ", name);</div><div class='del'>-	if (!(newname = realpath(name, real))) {</div><div class='del'>-	    if (errno == ENOENT) {</div><div class='del'>-		verbose("%s: does not exist, dangling symlink ignored\n", real);</div><div class='del'>-		goto cleanup;</div><div class='del'>-	    }</div><div class='del'>-	    perror("... failed");</div><div class='del'>-	    goto cleanup;</div><div class='del'>-	}</div><div class='del'>-	verbose("%s ", newname);</div><div class='del'>-	if (lstat(newname, sb)) {</div><div class='del'>-	    error("lstat on %s failed ", newname);</div><div class='del'>-	    perror("");</div><div class='del'>-	    goto cleanup;</div><div class='del'>-	}</div><div class='del'>-	free(name);</div><div class='del'>-	name = xstrdup(newname);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!S_ISREG(sb-&gt;st_mode) &amp;&amp;</div><div class='del'>-	!S_ISDIR(sb-&gt;st_mode)) {</div><div class='del'>-	error("%s is not plain file nor directory\n", name);</div><div class='del'>-	goto cleanup;</div><div class='del'>-    }</div><div class='del'>-	</div><div class='del'>-    verbose("user function %s\n", name);</div><div class='del'>-    ret = (*funcptr)(name, sb);</div><div class='del'>-cleanup:</div><div class='del'>-    free(name);</div><div class='del'>-    return(ret);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Sort directory entries into alphabetical order */</div><div class='del'>-static int xftw_sortdir(const void *a, const void *b)</div><div class='del'>-{</div><div class='del'>-    return(strcmp(((struct xftw_dirent *)a)-&gt;name, ((struct xftw_dirent *)b)-&gt;name));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Read a directory and sort it, ignoring "." and ".." */</div><div class='del'>-static int xftw_readdir(const char *directory, int depth)</div><div class='del'>-{</div><div class='del'>-    DIR *d;</div><div class='del'>-    struct dirent *ent;</div><div class='del'>-    verbose("xftw_readdir %s\n", directory);</div><div class='del'>-    if (!(d = opendir(directory))) {</div><div class='del'>-	perror(directory);</div><div class='del'>-	return(1);</div><div class='del'>-    }</div><div class='del'>-    while ((ent = readdir(d))) {</div><div class='del'>-	char *name;</div><div class='del'>-	struct xftw_dirent *f;</div><div class='del'>-	if (strcmp(ent-&gt;d_name, ".") == 0 ||</div><div class='del'>-	    strcmp(ent-&gt;d_name, "..") == 0)</div><div class='del'>-	    continue;</div><div class='del'>-	name = xftw_dir_name(directory, ent-&gt;d_name);</div><div class='del'>-	xftw_add_dirent(depth); </div><div class='del'>-	f = tree[depth].contents+tree[depth].used-1;</div><div class='del'>-	f-&gt;name = xstrdup(ent-&gt;d_name);</div><div class='del'>-	f-&gt;fullname = name;     /* do not free name, it is in use */</div><div class='del'>-	if (lstat(name, &amp;(f-&gt;statbuf))) {</div><div class='del'>-	    perror(name);</div><div class='del'>-	    return(1);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    closedir(d);</div><div class='del'>-    qsort(tree[depth].contents, tree[depth].used, sizeof(*(tree[0].contents)), &amp;xftw_sortdir);</div><div class='del'>-    return(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Process a type 2 directory */</div><div class='del'>-int xftw_type2(const char *directory, const char *entry, int depth, xftw_func_t funcptr)</div><div class='del'>-{</div><div class='del'>-    int ret, i;</div><div class='del'>-    xftw_tree_t *t = tree+depth;</div><div class='del'>-    struct stat statbuf;</div><div class='del'>-    char *dirname = xftw_dir_name(directory, entry);</div><div class='del'>-</div><div class='del'>-    verbose("type 2 %s\n", dirname);</div><div class='del'>-    if (depth &gt; XFTW_MAXDEPTH) {</div><div class='del'>-	error("xftw_type2 exceeded maxdepth\n");</div><div class='del'>-	ret = 1;</div><div class='del'>-	goto cleanup;</div><div class='del'>-    }</div><div class='del'>-    if ((ret = xftw_readdir(dirname, depth)))</div><div class='del'>-	goto cleanup;</div><div class='del'>-</div><div class='del'>-    t = tree+depth;</div><div class='del'>-    /* user function sees type 2 directories */</div><div class='del'>-    if ((ret = lstat(dirname, &amp;statbuf)) ||</div><div class='del'>-	(ret = xftw_do_name("", dirname, &amp;statbuf, funcptr)))</div><div class='del'>-	goto cleanup;</div><div class='del'>-</div><div class='del'>-    /* user sees all contents of type 2 directory, no pruning */</div><div class='del'>-    for (i = 0; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	struct xftw_dirent *c = t-&gt;contents+i;</div><div class='del'>-	if (S_ISLNK(c-&gt;statbuf.st_mode)) {</div><div class='del'>-	    if (!stat(c-&gt;name, &amp;(c-&gt;statbuf))) {</div><div class='del'>-		if (S_ISDIR(c-&gt;statbuf.st_mode)) {</div><div class='del'>-		    error("symlink to directory is not allowed, %s ignored\n", c-&gt;name);</div><div class='del'>-		    *(c-&gt;name) = '\0';  /* ignore it */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (!*(c-&gt;name))</div><div class='del'>-	    continue;</div><div class='del'>-	if (S_ISDIR(c-&gt;statbuf.st_mode)) {</div><div class='del'>-	    /* recursion is the curse of the programming classes */</div><div class='del'>-	    ret = xftw_type2(dirname, c-&gt;name, depth+1, funcptr);</div><div class='del'>-	    if (ret)</div><div class='del'>-		goto cleanup;</div><div class='del'>-	}</div><div class='del'>-	else if ((ret = xftw_do_name(dirname, c-&gt;name, &amp;(c-&gt;statbuf), funcptr)))</div><div class='del'>-	    goto cleanup;</div><div class='del'>-	*(c-&gt;name) = '\0';  /* processed */</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ret = 0;</div><div class='del'>-cleanup:</div><div class='del'>-    free(dirname);</div><div class='del'>-    return(ret);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Only external visible function.  Decide on the type of directory and</div><div class='del'>- * process accordingly.</div><div class='del'>- */</div><div class='del'>-int xftw(const char *directory, xftw_func_t funcptr)</div><div class='del'>-{</div><div class='del'>-    struct stat statbuf;</div><div class='del'>-    int ret, i, j, type;</div><div class='del'>-    xftw_tree_t *t;</div><div class='del'>-    struct xftw_dirent *c;</div><div class='del'>-</div><div class='del'>-    verbose("xftw starting at %s ", directory);</div><div class='del'>-    if (lstat(directory, &amp;statbuf)) {</div><div class='del'>-	verbose("lstat on %s failed\n", directory);</div><div class='del'>-	return(0);</div><div class='del'>-    }</div><div class='del'>-    if (S_ISLNK(statbuf.st_mode)) {</div><div class='del'>-	char real[PATH_MAX];</div><div class='del'>-	verbose("resolving symlink to ");</div><div class='del'>-	if (!(directory = realpath(directory, real))) {</div><div class='del'>-	    if (errno == ENOENT) {</div><div class='del'>-		verbose("%s: does not exist, dangling symlink ignored\n", real);</div><div class='del'>-		return(0);</div><div class='del'>-	    }</div><div class='del'>-	    perror("... failed");</div><div class='del'>-	    return(-1);</div><div class='del'>-	}</div><div class='del'>-	verbose("%s ", directory);</div><div class='del'>-	if (lstat(directory, &amp;statbuf)) {</div><div class='del'>-	    error("lstat on %s failed ", directory);</div><div class='del'>-	    perror("");</div><div class='del'>-	    return(-1);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (!S_ISDIR(statbuf.st_mode)) {</div><div class='del'>-	error("%s is not a directory\n", directory);</div><div class='del'>-	return(-1);</div><div class='del'>-    }</div><div class='del'>-    verbose("\n");</div><div class='del'>-</div><div class='del'>-    /* All returns after this point must be via cleanup */</div><div class='del'>-</div><div class='del'>-    if ((ret = xftw_readdir(directory, 0)))</div><div class='del'>-	goto cleanup;</div><div class='del'>-</div><div class='del'>-    t = tree;   /* depth 0 */</div><div class='del'>-    type = 2;</div><div class='del'>-    for (i = 0 ; type == 2 &amp;&amp; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	c = t-&gt;contents+i;</div><div class='del'>-	for (j = 0; tbtype[j]; ++j) {</div><div class='del'>-	    if (strcmp(c-&gt;name, tbtype[j]) == 0 &amp;&amp;</div><div class='del'>-		S_ISDIR(c-&gt;statbuf.st_mode)) {</div><div class='del'>-		const char *p = directory + strlen(directory) - 1;</div><div class='del'>-		if (*p == '/')</div><div class='del'>-		    --p;</div><div class='del'>-		if (p - directory &gt;= 6 &amp;&amp; strncmp(p-6, "/kernel", 7) == 0)</div><div class='del'>-		    continue;	/* "/kernel" path is a special case, type 2 */</div><div class='del'>-		type = 1;   /* known subdirectory */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (type == 1) {</div><div class='del'>-	OPT_LIST *p;</div><div class='del'>-	/* prune entries in type 1 directories only */</div><div class='del'>-	for (i = 0 ; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	    for (p = prunelist; p-&gt;name; ++p) {</div><div class='del'>-		c = t-&gt;contents+i;</div><div class='del'>-		if (strcmp(p-&gt;name, c-&gt;name) == 0) {</div><div class='del'>-		    verbose("pruned %s\n", c-&gt;name);</div><div class='del'>-		    *(c-&gt;name) = '\0';  /* ignore */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	/* run known subdirectories first in historical order, "kernel" is now top of list */</div><div class='del'>-	for (i = 0 ; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	    c = t-&gt;contents+i;</div><div class='del'>-	    for (j = 0; tbtype[j]; ++j) {</div><div class='del'>-		if (*(c-&gt;name) &amp;&amp;</div><div class='del'>-		    strcmp(c-&gt;name, tbtype[j]) == 0 &amp;&amp;</div><div class='del'>-		    S_ISDIR(c-&gt;statbuf.st_mode)) {</div><div class='del'>-		    if ((ret = xftw_type2(directory, c-&gt;name, 1, funcptr)))</div><div class='del'>-			goto cleanup;</div><div class='del'>-		    *(c-&gt;name) = '\0';  /* processed */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	/* any other directories left, in alphabetical order */</div><div class='del'>-	for (i = 0 ; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	    c = t-&gt;contents+i;</div><div class='del'>-	    if (*(c-&gt;name) &amp;&amp;</div><div class='del'>-	        S_ISDIR(c-&gt;statbuf.st_mode)) {</div><div class='del'>-		if ((ret = xftw_type2(directory, c-&gt;name, 1, funcptr)))</div><div class='del'>-		    goto cleanup;</div><div class='del'>-		*(c-&gt;name) = '\0';  /* processed */</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	/* anything else is passed to the user function */</div><div class='del'>-	for (i = 0 ; i &lt; t-&gt;used; ++i) {</div><div class='del'>-	    c = t-&gt;contents+i;</div><div class='del'>-	    if (*(c-&gt;name)) {</div><div class='del'>-		verbose("%s found in type 1 directory %s\n", c-&gt;name, directory);</div><div class='del'>-		if ((ret = xftw_do_name(directory, c-&gt;name, &amp;(c-&gt;statbuf), funcptr)))</div><div class='del'>-		    goto cleanup;</div><div class='del'>-		*(c-&gt;name) = '\0';  /* processed */</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    else {</div><div class='del'>-	/* type 2 */</div><div class='del'>-	xftw_free_tree(0);</div><div class='del'>-	if ((ret = xftw_type2(directory, NULL, 0, funcptr)))</div><div class='del'>-	    goto cleanup;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* amazing, it all worked */</div><div class='del'>-    ret = 0;</div><div class='del'>-cleanup:</div><div class='del'>-    for (i = 0; i &lt; XFTW_MAXDEPTH; ++i)</div><div class='del'>-	xftw_free_tree(i);</div><div class='del'>-    return(ret);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xmalloc.c b/mdk-stage1/insmod-modutils/util/xmalloc.c<br/>deleted file mode 100644<br/>index 9113d47fe..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xmalloc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xmalloc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,39 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-void *</div><div class='del'>-xmalloc(size_t size)</div><div class='del'>-{</div><div class='del'>-  void *ptr = malloc(size);</div><div class='del'>-  if (!ptr)</div><div class='del'>-    {</div><div class='del'>-      error("Out of memory");</div><div class='del'>-      exit(1);</div><div class='del'>-    }</div><div class='del'>-  return ptr;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xrealloc.c b/mdk-stage1/insmod-modutils/util/xrealloc.c<br/>deleted file mode 100644<br/>index d287486f7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xrealloc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xrealloc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,39 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-void *</div><div class='del'>-xrealloc(void *old, size_t size)</div><div class='del'>-{</div><div class='del'>-  void *ptr = realloc(old, size);</div><div class='del'>-  if (!ptr)</div><div class='del'>-    {</div><div class='del'>-      error("Out of memory");</div><div class='del'>-      exit(1);</div><div class='del'>-    }</div><div class='del'>-  return ptr;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xstrcat.c b/mdk-stage1/insmod-modutils/util/xstrcat.c<br/>deleted file mode 100644<br/>index abb075c83..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xstrcat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xstrcat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 2000 Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-char *</div><div class='del'>-xstrcat(char *dest, const char *src, size_t size)</div><div class='del'>-{</div><div class='del'>-  int ldest = strlen(dest);</div><div class='del'>-  int lsrc = strlen(src);</div><div class='del'>-  if ((size - ldest - 1) &lt; lsrc) {</div><div class='del'>-    error("xstrcat: destination overflow");</div><div class='del'>-    exit(1);</div><div class='del'>-  }</div><div class='del'>-  memcpy(dest+ldest, src, lsrc+1);</div><div class='del'>-  return(dest);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xstrdup.c b/mdk-stage1/insmod-modutils/util/xstrdup.c<br/>deleted file mode 100644<br/>index 11b289eb0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xstrdup.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xstrdup.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,41 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 1996, 1997 Linux International.</div><div class='del'>-   Contributed by Richard Henderson &lt;rth@tamu.edu&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include "util.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-char *</div><div class='del'>-xstrdup(const char *s)</div><div class='del'>-{</div><div class='del'>-  char *n = strdup(s);</div><div class='del'>-  if (!n)</div><div class='del'>-    {</div><div class='del'>-      error("Out of memory");</div><div class='del'>-      exit(1);</div><div class='del'>-    }</div><div class='del'>-  return n;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod-modutils/util/xsystem.c b/mdk-stage1/insmod-modutils/util/xsystem.c<br/>deleted file mode 100644<br/>index edb995268..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod-modutils/util/xsystem.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod-modutils/util/xsystem.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-/* Misc utility functions.</div><div class='del'>-   Copyright 2000 Keith Owens &lt;kaos@ocs.com.au&gt;</div><div class='del'>-</div><div class='del'>-   This file is part of the Linux modutils.</div><div class='del'>-</div><div class='del'>-   This program is free software; you can redistribute it and/or modify it</div><div class='del'>-   under the terms of the GNU General Public License as published by the</div><div class='del'>-   Free Software Foundation; either version 2 of the License, or (at your</div><div class='del'>-   option) any later version.</div><div class='del'>-</div><div class='del'>-   This program is distributed in the hope that it will be useful, but</div><div class='del'>-   WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div class='del'>-   General Public License for more details.</div><div class='del'>-</div><div class='del'>-   You should have received a copy of the GNU General Public License</div><div class='del'>-   along with this program; if not, write to the Free Software Foundation,</div><div class='del'>-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */</div><div class='del'>-</div><div class='del'>-#ident "$Id"</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*======================================================================*/</div><div class='del'>-</div><div class='del'>-/* Clone of the system() function From Steven's Advanced Programming in a Unix</div><div class='del'>- * Environment.  Modified to use *argv[] and execvp to avoid shell expansion</div><div class='del'>- * problems, modutils runs as root so system() is unsafe.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-xsystem(const char *file, char *const argv[])</div><div class='del'>-{</div><div class='del'>-  pid_t pid;</div><div class='del'>-  int status;</div><div class='del'>-  if ((pid = fork()) &lt; 0)</div><div class='del'>-    return(-1);</div><div class='del'>-  if (pid == 0) {</div><div class='del'>-    execvp(file, argv);</div><div class='del'>-    _exit(127);</div><div class='del'>-  }</div><div class='del'>-  while (waitpid(pid, &amp;status, 0) &lt; 0) {</div><div class='del'>-    if (errno != EINTR)</div><div class='del'>-      return(-1);</div><div class='del'>-  }</div><div class='del'>-  return(status);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/insmod.h b/mdk-stage1/insmod.h<br/>deleted file mode 100644<br/>index d91f239cf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/insmod.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/insmod.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,20 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _INSMOD_INTERFACE_H_</div><div class='del'>-#define _INSMOD_INTERFACE_H_</div><div class='del'>-</div><div class='del'>-int insmod_call(char * full_filename, char * params);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/linux-2.2/nfs.h b/mdk-stage1/linux-2.2/nfs.h<br/>deleted file mode 100644<br/>index 7936d5a71..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/linux-2.2/nfs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/linux-2.2/nfs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,226 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * NFS protocol definitions</div><div class='del'>- */</div><div class='del'>-#ifndef _LINUX_NFS_H</div><div class='del'>-#define _LINUX_NFS_H</div><div class='del'>-</div><div class='del'>-#include &lt;linux/sunrpc/msg_prot.h&gt;</div><div class='del'>-</div><div class='del'>-#define NFS_PORT	2049</div><div class='del'>-#define NFS_MAXDATA	8192</div><div class='del'>-#define NFS_MAXPATHLEN	1024</div><div class='del'>-#define NFS_MAXNAMLEN	255</div><div class='del'>-#define NFS_MAXGROUPS	16</div><div class='del'>-#define NFS_FHSIZE	32</div><div class='del'>-#define NFS_COOKIESIZE	4</div><div class='del'>-#define NFS_FIFO_DEV	(-1)</div><div class='del'>-#define NFSMODE_FMT	0170000</div><div class='del'>-#define NFSMODE_DIR	0040000</div><div class='del'>-#define NFSMODE_CHR	0020000</div><div class='del'>-#define NFSMODE_BLK	0060000</div><div class='del'>-#define NFSMODE_REG	0100000</div><div class='del'>-#define NFSMODE_LNK	0120000</div><div class='del'>-#define NFSMODE_SOCK	0140000</div><div class='del'>-#define NFSMODE_FIFO	0010000</div><div class='del'>-</div><div class='del'>-	</div><div class='del'>-enum nfs_stat {</div><div class='del'>-	NFS_OK = 0,</div><div class='del'>-	NFSERR_PERM = 1,</div><div class='del'>-	NFSERR_NOENT = 2,</div><div class='del'>-	NFSERR_IO = 5,</div><div class='del'>-	NFSERR_NXIO = 6,</div><div class='del'>-	NFSERR_EAGAIN = 11,</div><div class='del'>-	NFSERR_ACCES = 13,</div><div class='del'>-	NFSERR_EXIST = 17,</div><div class='del'>-	NFSERR_XDEV = 18,</div><div class='del'>-	NFSERR_NODEV = 19,</div><div class='del'>-	NFSERR_NOTDIR = 20,</div><div class='del'>-	NFSERR_ISDIR = 21,</div><div class='del'>-	NFSERR_INVAL = 22,	/* that Sun forgot */</div><div class='del'>-	NFSERR_FBIG = 27,</div><div class='del'>-	NFSERR_NOSPC = 28,</div><div class='del'>-	NFSERR_ROFS = 30,</div><div class='del'>-	NFSERR_OPNOTSUPP = 45,</div><div class='del'>-	NFSERR_NAMETOOLONG = 63,</div><div class='del'>-	NFSERR_NOTEMPTY = 66,</div><div class='del'>-	NFSERR_DQUOT = 69,</div><div class='del'>-	NFSERR_STALE = 70,</div><div class='del'>-	NFSERR_WFLUSH = 99</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum nfs_ftype {</div><div class='del'>-	NFNON = 0,</div><div class='del'>-	NFREG = 1,</div><div class='del'>-	NFDIR = 2,</div><div class='del'>-	NFBLK = 3,</div><div class='del'>-	NFCHR = 4,</div><div class='del'>-	NFLNK = 5,</div><div class='del'>-	NFSOCK = 6,</div><div class='del'>-	NFBAD = 7,</div><div class='del'>-	NFFIFO = 8</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_fh {</div><div class='del'>-	char			data[NFS_FHSIZE];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define NFS_PROGRAM		100003</div><div class='del'>-#define NFS_VERSION		2</div><div class='del'>-#define NFSPROC_NULL		0</div><div class='del'>-#define NFSPROC_GETATTR		1</div><div class='del'>-#define NFSPROC_SETATTR		2</div><div class='del'>-#define NFSPROC_ROOT		3</div><div class='del'>-#define NFSPROC_LOOKUP		4</div><div class='del'>-#define NFSPROC_READLINK	5</div><div class='del'>-#define NFSPROC_READ		6</div><div class='del'>-#define NFSPROC_WRITECACHE	7</div><div class='del'>-#define NFSPROC_WRITE		8</div><div class='del'>-#define NFSPROC_CREATE		9</div><div class='del'>-#define NFSPROC_REMOVE		10</div><div class='del'>-#define NFSPROC_RENAME		11</div><div class='del'>-#define NFSPROC_LINK		12</div><div class='del'>-#define NFSPROC_SYMLINK		13</div><div class='del'>-#define NFSPROC_MKDIR		14</div><div class='del'>-#define NFSPROC_RMDIR		15</div><div class='del'>-#define NFSPROC_READDIR		16</div><div class='del'>-#define NFSPROC_STATFS		17</div><div class='del'>-</div><div class='del'>-/* Mount support for NFSroot */</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-#define NFS_MNT_PROGRAM		100005</div><div class='del'>-#define NFS_MNT_VERSION		1</div><div class='del'>-#define NFS_MNT_PORT		627</div><div class='del'>-#define NFS_MNTPROC_MNT		1</div><div class='del'>-#define NFS_MNTPROC_UMNT	3</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES)</div><div class='del'>-</div><div class='del'>-extern struct rpc_program	nfs_program;</div><div class='del'>-extern struct rpc_stat		nfs_rpcstat;</div><div class='del'>-</div><div class='del'>-struct nfs_time {</div><div class='del'>-	__u32			seconds;</div><div class='del'>-	__u32			useconds;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_fattr {</div><div class='del'>-	enum nfs_ftype		type;</div><div class='del'>-	__u32			mode;</div><div class='del'>-	__u32			nlink;</div><div class='del'>-	__u32			uid;</div><div class='del'>-	__u32			gid;</div><div class='del'>-	__u32			size;</div><div class='del'>-	__u32			blocksize;</div><div class='del'>-	__u32			rdev;</div><div class='del'>-	__u32			blocks;</div><div class='del'>-	__u32			fsid;</div><div class='del'>-	__u32			fileid;</div><div class='del'>-	struct nfs_time		atime;</div><div class='del'>-	struct nfs_time		mtime;</div><div class='del'>-	struct nfs_time		ctime;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_sattr {</div><div class='del'>-	__u32			mode;</div><div class='del'>-	__u32			uid;</div><div class='del'>-	__u32			gid;</div><div class='del'>-	__u32			size;</div><div class='del'>-	struct nfs_time		atime;</div><div class='del'>-	struct nfs_time		mtime;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_fsinfo {</div><div class='del'>-	__u32			tsize;</div><div class='del'>-	__u32			bsize;</div><div class='del'>-	__u32			blocks;</div><div class='del'>-	__u32			bfree;</div><div class='del'>-	__u32			bavail;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_writeargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	__u32			offset;</div><div class='del'>-	__u32			count;</div><div class='del'>-	const void *		buffer;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifdef NFS_NEED_XDR_TYPES</div><div class='del'>-</div><div class='del'>-struct nfs_sattrargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	struct nfs_sattr *	sattr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_diropargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	const char *		name;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_readargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	__u32			offset;</div><div class='del'>-	__u32			count;</div><div class='del'>-	void *			buffer;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_createargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	const char *		name;</div><div class='del'>-	struct nfs_sattr *	sattr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_renameargs {</div><div class='del'>-	struct nfs_fh *		fromfh;</div><div class='del'>-	const char *		fromname;</div><div class='del'>-	struct nfs_fh *		tofh;</div><div class='del'>-	const char *		toname;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_linkargs {</div><div class='del'>-	struct nfs_fh *		fromfh;</div><div class='del'>-	struct nfs_fh *		tofh;</div><div class='del'>-	const char *		toname;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_symlinkargs {</div><div class='del'>-	struct nfs_fh *		fromfh;</div><div class='del'>-	const char *		fromname;</div><div class='del'>-	const char *		topath;</div><div class='del'>-	struct nfs_sattr *	sattr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_readdirargs {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	__u32			cookie;</div><div class='del'>-	void *			buffer;</div><div class='del'>-	unsigned int		bufsiz;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_diropok {</div><div class='del'>-	struct nfs_fh *		fh;</div><div class='del'>-	struct nfs_fattr *	fattr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_readres {</div><div class='del'>-	struct nfs_fattr *	fattr;</div><div class='del'>-	unsigned int		count;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_readlinkres {</div><div class='del'>-	char **			string;</div><div class='del'>-	unsigned int *		lenp;</div><div class='del'>-	unsigned int		maxlen;</div><div class='del'>-	void *			buffer;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct nfs_readdirres {</div><div class='del'>-	void *			buffer;</div><div class='del'>-	unsigned int		bufsiz;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#endif /* NFS_NEED_XDR_TYPES */</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/linux-2.2/nfs_mount.h b/mdk-stage1/linux-2.2/nfs_mount.h<br/>deleted file mode 100644<br/>index 60493b150..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/linux-2.2/nfs_mount.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/linux-2.2/nfs_mount.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,53 +0,0 @@</div><div class='del'>-#ifndef _LINUX_NFS_MOUNT_H</div><div class='del'>-#define _LINUX_NFS_MOUNT_H</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  linux/include/linux/nfs_mount.h</div><div class='del'>- *</div><div class='del'>- *  Copyright (C) 1992  Rick Sladkey</div><div class='del'>- *</div><div class='del'>- *  structure passed from user-space to kernel-space during an nfs mount</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * WARNING!  Do not delete or change the order of these fields.  If</div><div class='del'>- * a new field is required then add it to the end.  The version field</div><div class='del'>- * tracks which fields are present.  This will ensure some measure of</div><div class='del'>- * mount-to-kernel version compatibility.  Some of these aren't used yet</div><div class='del'>- * but here they are anyway.</div><div class='del'>- */</div><div class='del'>-#define NFS_MOUNT_VERSION	3</div><div class='del'>-</div><div class='del'>-struct nfs_mount_data {</div><div class='del'>-	int		version;		/* 1 */</div><div class='del'>-	int		fd;			/* 1 */</div><div class='del'>-	struct nfs_fh	root;			/* 1 */</div><div class='del'>-	int		flags;			/* 1 */</div><div class='del'>-	int		rsize;			/* 1 */</div><div class='del'>-	int		wsize;			/* 1 */</div><div class='del'>-	int		timeo;			/* 1 */</div><div class='del'>-	int		retrans;		/* 1 */</div><div class='del'>-	int		acregmin;		/* 1 */</div><div class='del'>-	int		acregmax;		/* 1 */</div><div class='del'>-	int		acdirmin;		/* 1 */</div><div class='del'>-	int		acdirmax;		/* 1 */</div><div class='del'>-	struct sockaddr_in addr;		/* 1 */</div><div class='del'>-	char		hostname[256];		/* 1 */</div><div class='del'>-	int		namlen;			/* 2 */</div><div class='del'>-	unsigned int	bsize;			/* 3 */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* bits in the flags field */</div><div class='del'>-</div><div class='del'>-#define NFS_MOUNT_SOFT		0x0001	/* 1 */</div><div class='del'>-#define NFS_MOUNT_INTR		0x0002	/* 1 */</div><div class='del'>-#define NFS_MOUNT_SECURE	0x0004	/* 1 */</div><div class='del'>-#define NFS_MOUNT_POSIX		0x0008	/* 1 */</div><div class='del'>-#define NFS_MOUNT_NOCTO		0x0010	/* 1 */</div><div class='del'>-#define NFS_MOUNT_NOAC		0x0020	/* 1 */</div><div class='del'>-#define NFS_MOUNT_TCP		0x0040	/* 2 */</div><div class='del'>-#define NFS_MOUNT_VER3		0x0080	/* 3 */</div><div class='del'>-#define NFS_MOUNT_KERBEROS	0x0100	/* 3 */</div><div class='del'>-#define NFS_MOUNT_NONLM		0x0200	/* 3 */</div><div class='del'>- </div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/log.c b/mdk-stage1/log.c<br/>deleted file mode 100644<br/>index 319079fd7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/log.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/log.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,89 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include "stage1.h"</div><div class='del'>-</div><div class='del'>-#include "log.h"</div><div class='del'>-</div><div class='del'>-static FILE * logtty  = NULL;</div><div class='del'>-static FILE * logfile = NULL;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void vlog_message(const char * s, va_list args)</div><div class='del'>-{</div><div class='del'>-	if (logfile) {</div><div class='del'>-		fprintf(logfile, "* ");</div><div class='del'>-		vfprintf(logfile, s, args);</div><div class='del'>-		fprintf(logfile, "\n");</div><div class='del'>-		fflush(logfile);</div><div class='del'>-	}</div><div class='del'>-	if (logtty) {</div><div class='del'>-		fprintf(logtty, "* ");</div><div class='del'>-		vfprintf(logtty, s, args);</div><div class='del'>-		fprintf(logtty, "\n");</div><div class='del'>-		fflush(logtty);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void log_message(const char * s, ...)</div><div class='del'>-{</div><div class='del'>-	va_list args;</div><div class='del'>-	va_start(args, s);</div><div class='del'>-	vlog_message(s, args);</div><div class='del'>-	va_end(args);</div><div class='del'>-	</div><div class='del'>-	return;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void log_perror(char *msg)</div><div class='del'>-{</div><div class='del'>-	log_message("%s: %s", msg, strerror(errno));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void open_log(void)</div><div class='del'>-{</div><div class='del'>-	if (!IS_TESTING) {</div><div class='del'>-		logtty  = fopen("/dev/tty3", "w");</div><div class='del'>-		logfile = fopen("/tmp/stage1.log", "w");</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-		logfile = fopen("debug.log", "w");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void close_log(void)</div><div class='del'>-{</div><div class='del'>-	if (logfile) {</div><div class='del'>-		log_message("stage1: disconnecting life support systems");</div><div class='del'>-		fclose(logfile);</div><div class='del'>-		if (logtty)</div><div class='del'>-			fclose(logtty);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/log.h b/mdk-stage1/log.h<br/>deleted file mode 100644<br/>index 90aa3f6e6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/log.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/log.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,34 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef _LOG_H_</div><div class='del'>-#define _LOG_H_</div><div class='del'>-</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-void log_message(const char * s, ...) __attribute__ ((format (printf, 1, 2)));</div><div class='del'>-void vlog_message(const char * s, va_list args);</div><div class='del'>-void log_perror(char *msg);</div><div class='del'>-void open_log(void);</div><div class='del'>-void close_log(void);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/lomount.c b/mdk-stage1/lomount.c<br/>deleted file mode 100644<br/>index 991a862c7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/lomount.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/lomount.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,171 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* This code comes from util-linux-2.10n (mount/lomount.c)</div><div class='del'>- * (this is a simplified version of this code)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "mount.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-</div><div class='del'>-#include "lomount.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define LO_NAME_SIZE	64</div><div class='del'>-#define LO_KEY_SIZE	32</div><div class='del'>-</div><div class='del'>-struct loop_info</div><div class='del'>-{</div><div class='del'>-	int		lo_number;	/* ioctl r/o */</div><div class='del'>-	dev_t		lo_device; 	/* ioctl r/o */</div><div class='del'>-	unsigned long	lo_inode; 	/* ioctl r/o */</div><div class='del'>-	dev_t		lo_rdevice; 	/* ioctl r/o */</div><div class='del'>-	int		lo_offset;</div><div class='del'>-	int		lo_encrypt_type;</div><div class='del'>-	int		lo_encrypt_key_size; 	/* ioctl w/o */</div><div class='del'>-	int		lo_flags;	/* ioctl r/o */</div><div class='del'>-	char		lo_name[LO_NAME_SIZE];</div><div class='del'>-	unsigned char	lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */</div><div class='del'>-	unsigned long	lo_init[2];</div><div class='del'>-	char		reserved[4];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define LOOP_SET_FD	0x4C00</div><div class='del'>-#define LOOP_CLR_FD	0x4C01</div><div class='del'>-#define LOOP_SET_STATUS	0x4C02</div><div class='del'>-#define LOOP_GET_STATUS	0x4C03</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-set_loop (const char *device, const char *file)</div><div class='del'>-{</div><div class='del'>-	struct loop_info loopinfo;</div><div class='del'>-	int fd, ffd, mode;</div><div class='del'>-</div><div class='del'>-	mode = O_RDONLY;</div><div class='del'>-</div><div class='del'>-	if ((ffd = open (file, mode)) &lt; 0)</div><div class='del'>-		return 1;</div><div class='del'>-  </div><div class='del'>-	if ((fd = open (device, mode)) &lt; 0) {</div><div class='del'>-		close(ffd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;loopinfo, 0, sizeof (loopinfo));</div><div class='del'>-	strncpy(loopinfo.lo_name, file, LO_NAME_SIZE);</div><div class='del'>-	loopinfo.lo_name[LO_NAME_SIZE - 1] = 0;</div><div class='del'>-	loopinfo.lo_offset = 0;</div><div class='del'>-</div><div class='del'>-#ifdef MCL_FUTURE  </div><div class='del'>-	/*</div><div class='del'>-	 * Oh-oh, sensitive data coming up. Better lock into memory to prevent</div><div class='del'>-	 * passwd etc being swapped out and left somewhere on disk.</div><div class='del'>-	 */</div><div class='del'>-  </div><div class='del'>-	  if(mlockall(MCL_CURRENT|MCL_FUTURE)) {</div><div class='del'>-		  log_message("CRITICAL Couldn't lock into memory! %s (memlock)", strerror(errno));</div><div class='del'>-		  return 1;</div><div class='del'>-	  }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	if (ioctl(fd, LOOP_SET_FD, ffd) &lt; 0) {</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(fd, LOOP_SET_STATUS, &amp;loopinfo) &lt; 0) {</div><div class='del'>-		(void) ioctl (fd, LOOP_CLR_FD, 0);</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close(fd);</div><div class='del'>-	close(ffd);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * loopdev = "/dev/loop3"; /* Ugly. But do I care? */</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-del_loop(void)</div><div class='del'>-{</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	if ((fd = open (loopdev, O_RDONLY)) &lt; 0)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	if (ioctl (fd, LOOP_CLR_FD, 0) &lt; 0)</div><div class='del'>-		return;</div><div class='del'>-  </div><div class='del'>-	close (fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static char * where_mounted = NULL;</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-lomount(char *loopfile, char *where)</div><div class='del'>-{</div><div class='del'>-  </div><div class='del'>-	long int flag;</div><div class='del'>-</div><div class='del'>-	flag = MS_MGC_VAL;</div><div class='del'>-	flag |= MS_RDONLY;</div><div class='del'>-</div><div class='del'>-	my_insmod("loop", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-	if (set_loop(loopdev, loopfile)) {</div><div class='del'>-		log_message("set_loop failed on %s (%s)", loopdev, strerror(errno));</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-  </div><div class='del'>-	if (my_mount(loopdev, where, "iso9660", 0)) {</div><div class='del'>-		del_loop();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	where_mounted = strdup(where);</div><div class='del'>-	log_message("lomount succeeded for %s on %s", loopfile, where);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-loumount()</div><div class='del'>-{</div><div class='del'>-	if (where_mounted) {</div><div class='del'>-		umount(where_mounted);</div><div class='del'>-		where_mounted = NULL;</div><div class='del'>-	}</div><div class='del'>-	del_loop();</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/lomount.h b/mdk-stage1/lomount.h<br/>deleted file mode 100644<br/>index 3b8a30ac1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/lomount.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/lomount.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef LOMOUNT_H</div><div class='del'>-#define LOMOUNT_H</div><div class='del'>-</div><div class='del'>-int lomount(char *loopfile, char *where);</div><div class='del'>-int loumount(void);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/mar/.cvsignore b/mdk-stage1/mar/.cvsignore<br/>deleted file mode 100644<br/>index bfde37886..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-mar</div><div class='head'>diff --git a/mdk-stage1/mar/Makefile b/mdk-stage1/mar/Makefile<br/>deleted file mode 100644<br/>index 801785947..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,61 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- #    mar - The Mandrake Archiver</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-TARGETS = libmar.a mar</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-ifeq (DIETLIBC, $(L))</div><div class='del'>-TARGETS += libmar-DIET.a</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: $(TARGETS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o libmar.a libmar-DIET.a mar</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-mar: mar-frontend.o mar-extract-only-standalone.o</div><div class='del'>-	gcc -o mar mar-frontend.o mar-extract-only-standalone.o -lbz2</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-</div><div class='del'>-libmar.a: mar-extract-only.o</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-libmar-DIET.a: mar-extract-only-DIET.o</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-mar-extract-only.o: mar-extract-only.c mar-extract-only.h mar.h</div><div class='del'>-	gcc $(CFLAGS) $(GLIBC_INCLUDES) -c mar-extract-only.c</div><div class='del'>-</div><div class='del'>-mar-extract-only-DIET.o: mar-extract-only.c mar-extract-only.h mar.h</div><div class='del'>-	gcc $(CFLAGS) $(DIETLIBC_INCLUDES) -o $@ -c mar-extract-only.c</div><div class='del'>-</div><div class='del'>-mar-frontend.o: mar-frontend.c mar.h mar-extract-only.h</div><div class='del'>-	gcc $(CFLAGS) $(GLIBC_INCLUDES) -c mar-frontend.c</div><div class='del'>-</div><div class='del'>-mar-extract-only-standalone.o: mar-extract-only.c mar-extract-only.h mar.h</div><div class='del'>-	gcc $(CFLAGS) $(GLIBC_INCLUDES) -o $@ -D_STANDALONE_ -c mar-extract-only.c</div><div class='head'>diff --git a/mdk-stage1/mar/mar-extract-only.c b/mdk-stage1/mar/mar-extract-only.c<br/>deleted file mode 100644<br/>index a5b6ccd2f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/mar-extract-only.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/mar-extract-only.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,208 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * mar - The Mandrake Archiver</div><div class='del'>- *</div><div class='del'>- * An archiver that supports compression (through zlib).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This code should suffice for stage1 on-the-fly uncompression of kernel modules.</div><div class='del'>- * (and it DOES perform tests and return values, blaaaah..)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include "mar-extract-only.h"</div><div class='del'>-#include "mar.h"</div><div class='del'>-</div><div class='del'>-#ifdef _STANDALONE_</div><div class='del'>-void</div><div class='del'>-zerr(BZFILE * f) /* decrease code size */</div><div class='del'>-{</div><div class='del'>-	fprintf(stderr, BZ2_bzerror(f, &amp;z_errnum));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-inline void</div><div class='del'>-log_perror(char *msg)</div><div class='del'>-{</div><div class='del'>-	perror(msg);</div><div class='del'>-}</div><div class='del'>-void</div><div class='del'>-log_message(char *msg)</div><div class='del'>-{</div><div class='del'>-	fprintf(stderr, msg);</div><div class='del'>-}</div><div class='del'>-#else /* _STANDALONE_ */</div><div class='del'>-#include "../log.h"</div><div class='del'>-void</div><div class='del'>-zerr(BZFILE * f) /* decrease code size */</div><div class='del'>-{</div><div class='del'>-	log_message(BZ2_bzerror(f, &amp;z_errnum));</div><div class='del'>-}</div><div class='del'>-#endif /* _STANDALONE_ */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-mar_open_file(char *filename, struct mar_stream *s)</div><div class='del'>-{</div><div class='del'>-	int end_filetable = 0;</div><div class='del'>-	struct mar_element * previous_element = NULL;</div><div class='del'>-</div><div class='del'>-	/* mar_zfile */</div><div class='del'>-	s-&gt;mar_zfile = BZ2_bzopen(filename, "rb");</div><div class='del'>-	if (!s-&gt;mar_zfile)</div><div class='del'>-	{</div><div class='del'>-		log_perror(filename);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	while (end_filetable == 0)</div><div class='del'>-	{</div><div class='del'>-		char buf[512];</div><div class='del'>-		int ptr = 0;</div><div class='del'>-		/* read filename */</div><div class='del'>-		do</div><div class='del'>-		{</div><div class='del'>-			if (BZ2_bzread(s-&gt;mar_zfile, &amp;(buf[ptr]), sizeof(char)) != sizeof(char))</div><div class='del'>-			{</div><div class='del'>-				zerr(s-&gt;mar_zfile);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			ptr++;</div><div class='del'>-		} while ((buf[ptr-1] != 0) &amp;&amp; (ptr &lt; 512));</div><div class='del'>-		/* ptr == 1 when we arrive on the "char 0" of the end of the filetable */</div><div class='del'>-		if (ptr &gt; 1)</div><div class='del'>-		{</div><div class='del'>-			struct mar_element * e = (struct mar_element *) malloc(sizeof(struct mar_element));</div><div class='del'>-			e-&gt;filename = strdup(buf);</div><div class='del'>-			/* read file_length */</div><div class='del'>-			if (BZ2_bzread(s-&gt;mar_zfile, &amp;(e-&gt;file_length), sizeof(int)) != sizeof(int))</div><div class='del'>-			{</div><div class='del'>-				zerr(s-&gt;mar_zfile);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			/* read data_offset */</div><div class='del'>-			if (BZ2_bzread(s-&gt;mar_zfile, &amp;(e-&gt;data_offset), sizeof(int)) != sizeof(int))</div><div class='del'>-			{</div><div class='del'>-				zerr(s-&gt;mar_zfile);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			/* write down chaining */</div><div class='del'>-			if (previous_element)</div><div class='del'>-				previous_element-&gt;next_element = e;</div><div class='del'>-			else</div><div class='del'>-				s-&gt;first_element = e;</div><div class='del'>-			previous_element = e;</div><div class='del'>-		}</div><div class='del'>-		else</div><div class='del'>-			end_filetable = 1;</div><div class='del'>-</div><div class='del'>-	}</div><div class='del'>-	/* chaining for last element */</div><div class='del'>-	previous_element-&gt;next_element = NULL;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char **</div><div class='del'>-mar_list_contents(char * mar_filename)</div><div class='del'>-{</div><div class='del'>-	struct mar_stream s;</div><div class='del'>-	struct mar_element * elem;</div><div class='del'>-	char * tmp_contents[500];</div><div class='del'>-	char ** answ;</div><div class='del'>-	int i = 0;</div><div class='del'>-</div><div class='del'>-	if (mar_open_file(mar_filename, &amp;s))</div><div class='del'>-		return NULL;</div><div class='del'>-</div><div class='del'>-	elem = s.first_element;</div><div class='del'>-	while (elem)</div><div class='del'>-	{</div><div class='del'>-		tmp_contents[i++] = strdup(elem-&gt;filename);</div><div class='del'>-		elem = elem-&gt;next_element;</div><div class='del'>-	}</div><div class='del'>-	tmp_contents[i++] = NULL;</div><div class='del'>-	answ = (char **) malloc(sizeof(char *) * i);</div><div class='del'>-	memcpy(answ, tmp_contents, sizeof(char *) * i);</div><div class='del'>-	return answ;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-mar_extract_file(char *mar_filename, char *filename_to_extract, char *dest_dir)</div><div class='del'>-{</div><div class='del'>-	struct mar_stream s;</div><div class='del'>-	struct mar_element * elem;</div><div class='del'>-</div><div class='del'>-	if (mar_open_file(mar_filename, &amp;s))</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	elem = s.first_element;</div><div class='del'>-	while (elem)</div><div class='del'>-	{</div><div class='del'>-		if (strcmp(elem-&gt;filename, filename_to_extract) == 0)</div><div class='del'>-		{</div><div class='del'>-			char garb_buf[4096];</div><div class='del'>-			char *buf;</div><div class='del'>-			char *dest_file;</div><div class='del'>-			int fd;</div><div class='del'>-			size_t i;</div><div class='del'>-			dest_file = (char *) alloca(strlen(dest_dir) + strlen(filename_to_extract) + 1);</div><div class='del'>-			strcpy(dest_file, dest_dir);</div><div class='del'>-			strcat(dest_file, filename_to_extract);</div><div class='del'>-			fd = creat(dest_file, 00660);</div><div class='del'>-			if (fd == -1)</div><div class='del'>-			{</div><div class='del'>-				log_perror(dest_file);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			buf = (char *) alloca(elem-&gt;file_length);</div><div class='del'>-			if (!buf)</div><div class='del'>-			{</div><div class='del'>-				log_perror(dest_file);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			i = elem-&gt;data_offset;</div><div class='del'>-			while (i &gt; 0) {</div><div class='del'>-				int to_read = i &gt; sizeof(garb_buf) ? sizeof(garb_buf) : i;</div><div class='del'>-				if (BZ2_bzread(s.mar_zfile, garb_buf, to_read) != to_read) {</div><div class='del'>-					log_message("MAR: unexpected EOF in stream");</div><div class='del'>-					return -1;</div><div class='del'>-				}</div><div class='del'>-				i -= to_read;</div><div class='del'>-			}</div><div class='del'>-			if (BZ2_bzread(s.mar_zfile, buf, elem-&gt;file_length) != elem-&gt;file_length)</div><div class='del'>-			{</div><div class='del'>-				zerr(s.mar_zfile);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			if (write(fd, buf, elem-&gt;file_length) != elem-&gt;file_length)</div><div class='del'>-			{</div><div class='del'>-				log_perror(dest_file);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			close(fd); /* do not check return value for code size */</div><div class='del'>-			BZ2_bzclose(s.mar_zfile);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-		elem = elem-&gt;next_element;</div><div class='del'>-	}</div><div class='del'>-	BZ2_bzclose(s.mar_zfile);</div><div class='del'>-	return 1; /* 1 for file_not_found_in_archive */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/mar/mar-extract-only.h b/mdk-stage1/mar/mar-extract-only.h<br/>deleted file mode 100644<br/>index 6fa34efe4..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/mar-extract-only.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/mar-extract-only.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,32 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * mar - The Mandrake Archiver</div><div class='del'>- *</div><div class='del'>- * An archiver that supports compression (through zlib).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Header for stage1 on-the-fly needs.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef MAR_EXTRACT_ONLY_H</div><div class='del'>-#define MAR_EXTRACT_ONLY_H</div><div class='del'>-</div><div class='del'>-int mar_extract_file(char *mar_filename, char *filename_to_extract, char *dest_dir);</div><div class='del'>-char ** mar_list_contents(char *mar_filename);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/mar/mar-frontend.c b/mdk-stage1/mar/mar-frontend.c<br/>deleted file mode 100644<br/>index f55ba6fe6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/mar-frontend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/mar-frontend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,199 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * mar - The Mandrake Archiver</div><div class='del'>- *</div><div class='del'>- * An archiver that supports compression (through zlib).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This code includes the extracting and creating features.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include "mar.h"</div><div class='del'>-#include "mar-extract-only.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-file_size(char *filename)</div><div class='del'>-{</div><div class='del'>-	struct stat buf;</div><div class='del'>-	if (stat(filename, &amp;buf) != 0)</div><div class='del'>-	{</div><div class='del'>-		perror(filename);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	return buf.st_size;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Yes I don't use the datastructure I directly write the final fileformat in memory then write down it.</div><div class='del'>- * Yes it's bad.</div><div class='del'>- */</div><div class='del'>-/* ``files'' is a NULL-terminated array of char* */</div><div class='del'>-</div><div class='del'>-char * fnf_tag = "FILE_NOT_FOUND&amp;";</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-mar_create_file(char *dest_file, char **files)</div><div class='del'>-{</div><div class='del'>-	int filenum = 0;</div><div class='del'>-	int current_offset_filetable = 0;</div><div class='del'>-	int current_delta_rawdata = 0;</div><div class='del'>-	int filetable_size;</div><div class='del'>-	char * temp_marfile_buffer;</div><div class='del'>-	int total_length = 0;</div><div class='del'>-</div><div class='del'>-	filetable_size = sizeof(char); /* ``char 0'' */</div><div class='del'>-	while (files[filenum])</div><div class='del'>-	{</div><div class='del'>-		int fsiz = file_size(files[filenum]);</div><div class='del'>-		if (fsiz == -1)</div><div class='del'>-			files[filenum] = fnf_tag;</div><div class='del'>-		else {</div><div class='del'>-			filetable_size += 2*sizeof(int) /* file_length, data_offset */ + strlen(files[filenum]) + 1;</div><div class='del'>-			total_length += fsiz;</div><div class='del'>-		}</div><div class='del'>-		filenum++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	total_length += filetable_size;</div><div class='del'>-</div><div class='del'>-	temp_marfile_buffer = (char *) malloc(total_length); /* create the whole file in-memory (not with alloca! it can be bigger than typical limit for stack of programs (ulimit -s) */</div><div class='del'>-	DEBUG_MAR(printf("D: mar::create_marfile total-length %d\n", total_length););</div><div class='del'>-</div><div class='del'>-	filenum = 0;</div><div class='del'>-	while (files[filenum])</div><div class='del'>-	{</div><div class='del'>-		if (strcmp(files[filenum], fnf_tag)) {</div><div class='del'>-			FILE * f = fopen(files[filenum], "r");</div><div class='del'>-			int fsize;</div><div class='del'>-			if (!f)</div><div class='del'>-			{</div><div class='del'>-				perror(files[filenum]);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			</div><div class='del'>-			/* filename */</div><div class='del'>-			strcpy(&amp;(temp_marfile_buffer[current_offset_filetable]), files[filenum]);</div><div class='del'>-			current_offset_filetable += strlen(files[filenum]) + 1;</div><div class='del'>-			</div><div class='del'>-			/* file_length */</div><div class='del'>-			fsize = file_size(files[filenum]);</div><div class='del'>-			if (fsize == -1) return -1;</div><div class='del'>-			memcpy(&amp;temp_marfile_buffer[current_offset_filetable], &amp;fsize, sizeof(int));</div><div class='del'>-			current_offset_filetable += sizeof(int);</div><div class='del'>-			</div><div class='del'>-			/* data_offset */</div><div class='del'>-			memcpy(&amp;temp_marfile_buffer[current_offset_filetable], &amp;current_delta_rawdata, sizeof(int));</div><div class='del'>-			current_offset_filetable += sizeof(int);</div><div class='del'>-			</div><div class='del'>-			/* data_raw_data */</div><div class='del'>-			if (fread(&amp;temp_marfile_buffer[current_delta_rawdata + filetable_size], 1, fsize, f) != (size_t)fsize)</div><div class='del'>-			{</div><div class='del'>-				perror(files[filenum]);</div><div class='del'>-				return -1;</div><div class='del'>-			}</div><div class='del'>-			fclose(f);</div><div class='del'>-</div><div class='del'>-			current_delta_rawdata += fsize;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		filenum++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* write down ``char 0'' to terminate file table */</div><div class='del'>-	memset(&amp;temp_marfile_buffer[current_offset_filetable], 0, sizeof(char));</div><div class='del'>-</div><div class='del'>-	/* ok, buffer is ready, let's write it on-disk */</div><div class='del'>-	{</div><div class='del'>-		BZFILE * f = BZ2_bzopen(dest_file, "w9");</div><div class='del'>-		if (!f)</div><div class='del'>-		{</div><div class='del'>-			perror(dest_file);</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-		if (BZ2_bzwrite(f, temp_marfile_buffer, total_length) != total_length)</div><div class='del'>-		{</div><div class='del'>-			fprintf(stderr, BZ2_bzerror(f, &amp;z_errnum));</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-		BZ2_bzclose(f);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	printf("mar: created archive %s (%d files, length %d)\n", dest_file, filenum, total_length);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-print_usage(char *progname)</div><div class='del'>-{</div><div class='del'>-	printf("Usage: %s [-lxc] [files..]\n", progname);</div><div class='del'>-	exit(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-main(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	if (argc &lt;= 2)</div><div class='del'>-		print_usage(argv[0]);</div><div class='del'>-	</div><div class='del'>-	if (argc &gt;= 3)</div><div class='del'>-	{</div><div class='del'>-		if (strcmp(argv[1], "-l") == 0)</div><div class='del'>-		{</div><div class='del'>-			char ** contents = mar_list_contents(argv[2]);</div><div class='del'>-			if (contents)</div><div class='del'>-				while (contents &amp;&amp; *contents) {</div><div class='del'>-					printf("\t%s\n", *contents);</div><div class='del'>-					contents++;</div><div class='del'>-				}</div><div class='del'>-			exit(0);</div><div class='del'>-		}</div><div class='del'>-		if ((strcmp(argv[1], "-x") == 0) &amp;&amp; argc == 4)</div><div class='del'>-		{</div><div class='del'>-			int res = mar_extract_file(argv[2], argv[3], "./");</div><div class='del'>-			if (res == 1)</div><div class='del'>-				fprintf(stderr, "W: file-not-found-in-archive %s\n", argv[3]);</div><div class='del'>-			if (res == -1)</div><div class='del'>-				exit(-1);</div><div class='del'>-			exit(0);</div><div class='del'>-		}</div><div class='del'>-		if ((strcmp(argv[1], "-c") == 0) &amp;&amp; argc &gt;= 4)</div><div class='del'>-		{</div><div class='del'>-			char **files = (char **) alloca(((argc-3)+1) * sizeof(char *));</div><div class='del'>-			int i = 3;</div><div class='del'>-			while (i &lt; argc)</div><div class='del'>-			{</div><div class='del'>-				files[i-3] = argv[i];</div><div class='del'>-				i++;</div><div class='del'>-			}</div><div class='del'>-			files[argc-3] = NULL;</div><div class='del'>-			{</div><div class='del'>-				int results;</div><div class='del'>-				results = mar_create_file(argv[2], files);</div><div class='del'>-				if (results != 0)</div><div class='del'>-					fprintf(stderr, "E: create-marfile-failed\n");</div><div class='del'>-				exit(results);</div><div class='del'>-			}</div><div class='del'>-					</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/mar/mar.h b/mdk-stage1/mar/mar.h<br/>deleted file mode 100644<br/>index 672d7ded8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mar/mar.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mar/mar.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,70 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * mar - The Mandrake Archiver</div><div class='del'>- *</div><div class='del'>- * An archiver that supports compression (through bzlib).</div><div class='del'>- *</div><div class='del'>- * Designed to be small so these bad designs are inside:</div><div class='del'>- *  . archive and compression are mixed together</div><div class='del'>- *  . create the mar file in-memory</div><div class='del'>- *  . does not free memory</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef MAR_H</div><div class='del'>-#define MAR_H</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;bzlib.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Format of a mar file:</div><div class='del'>- *</div><div class='del'>- * ASCIIZ filename         \           |</div><div class='del'>- * int file_length         | repeated  | bzipped</div><div class='del'>- * int pointer_in_archive  /           |</div><div class='del'>- * char 0                              |</div><div class='del'>- * raw_files_data                      /</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct mar_element</div><div class='del'>-{</div><div class='del'>-	char * filename;             /* filename (ASCIIZ) of the element */</div><div class='del'>-	int file_length;             /* length (in bytes) of the raw data of the element */</div><div class='del'>-	int data_offset;             /* seek start of the raw data in the underlying mar stream */</div><div class='del'>-	struct mar_element * next_element;  /* pointer to the next element in the mar stream; NULL if last */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct mar_stream</div><div class='del'>-{</div><div class='del'>-	struct mar_element * first_element;  /* pointer to the first element inside the mar stream */</div><div class='del'>-	BZFILE * mar_zfile;            /* associated zfile (opened) */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int z_errnum;</div><div class='del'>-</div><div class='del'>-#define DEBUG_MAR(x)</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/minilibc.c b/mdk-stage1/minilibc.c<br/>deleted file mode 100644<br/>index 73d7deae5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/minilibc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/minilibc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,251 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MINILIBC_INTERNAL</div><div class='del'>-</div><div class='del'>-#include "minilibc.h"</div><div class='del'>-</div><div class='del'>-int atexit (void (*__func) (void) __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void exit()</div><div class='del'>-{</div><div class='del'>-	_do_exit(0);</div><div class='del'>-	for (;;); /* Shut up gcc */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char ** _environ = NULL;</div><div class='del'>-int errno = 0;</div><div class='del'>-</div><div class='del'>-void _init (int __status __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void __libc_init_first (int __status __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int __libc_start_main (int (*main) (int, char **, char **), int argc,</div><div class='del'>-		       char **argv, void (*init) (void) __attribute__ ((unused)), void (*fini) (void) __attribute__ ((unused)),</div><div class='del'>-		       void (*rtld_fini) (void) __attribute__ ((unused)), void *stack_end __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-	exit ((*main) (argc, argv, NULL));</div><div class='del'>-	/* never get here */</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void _fini (int __status __attribute__ ((unused)))</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-inline int socket(int a, int b, int c)</div><div class='del'>-{</div><div class='del'>-	unsigned long args[] = { a, b, c };</div><div class='del'>-	</div><div class='del'>-	return socketcall(SYS_SOCKET, args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-inline int bind(int a, void * b, int c)</div><div class='del'>-{</div><div class='del'>-	unsigned long args[] = { a, (long) b, c };</div><div class='del'>-	</div><div class='del'>-	return socketcall(SYS_BIND, args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-inline int listen(int a, int b)</div><div class='del'>-{</div><div class='del'>-	unsigned long args[] = { a, b, 0 };</div><div class='del'>-	</div><div class='del'>-	return socketcall(SYS_LISTEN, args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-inline int accept(int a, void * addr, void * addr2)</div><div class='del'>-{</div><div class='del'>-	unsigned long args[] = { a, (long) addr, (long) addr2 };</div><div class='del'>-	</div><div class='del'>-	return socketcall(SYS_ACCEPT, args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void sleep(int secs)</div><div class='del'>-{</div><div class='del'>-	struct timeval tv;</div><div class='del'>-	</div><div class='del'>-	tv.tv_sec = secs;</div><div class='del'>-	tv.tv_usec = 0;</div><div class='del'>-	</div><div class='del'>-	select(0, NULL, NULL, NULL, &amp;tv);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int strlen(const char * string)</div><div class='del'>-{</div><div class='del'>-	int i = 0;</div><div class='del'>-	</div><div class='del'>-	while (*string++) i++;</div><div class='del'>-	</div><div class='del'>-	return i;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * strncpy(char * dst, const char * src, int len)</div><div class='del'>-{</div><div class='del'>-	char * chptr = dst;</div><div class='del'>-	int i = 0;</div><div class='del'>-	</div><div class='del'>-	while (*src &amp;&amp; i &lt; len) *dst++ = *src++, i++;</div><div class='del'>-	if (i &lt; len) *dst = '\0';</div><div class='del'>-	</div><div class='del'>-	return chptr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * strcpy(char * dst, const char * src)</div><div class='del'>-{</div><div class='del'>-	char * chptr = dst;</div><div class='del'>-	</div><div class='del'>-	while (*src) *dst++ = *src++;</div><div class='del'>-	*dst = '\0';</div><div class='del'>-	</div><div class='del'>-	return chptr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void * memcpy(void * dst, const void * src, size_t count)</div><div class='del'>-{</div><div class='del'>-	char * a = dst;</div><div class='del'>-	const char * b = src;</div><div class='del'>-	</div><div class='del'>-	while (count--)</div><div class='del'>-		*a++ = *b++;</div><div class='del'>-	</div><div class='del'>-	return dst;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int strcmp(const char * a, const char * b)</div><div class='del'>-{</div><div class='del'>-	int i, j;  </div><div class='del'>-	</div><div class='del'>-	i = strlen(a); j = strlen(b);</div><div class='del'>-	if (i &lt; j)</div><div class='del'>-		return -1;</div><div class='del'>-	else if (j &lt; i)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-	while (*a &amp;&amp; (*a == *b)) a++, b++;</div><div class='del'>-	</div><div class='del'>-	if (!*a) return 0;</div><div class='del'>-	</div><div class='del'>-	if (*a &lt; *b)</div><div class='del'>-		return -1;</div><div class='del'>-	else</div><div class='del'>-		return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int strncmp(const char * a, const char * b, int len)</div><div class='del'>-{</div><div class='del'>-	char buf1[1000], buf2[1000];</div><div class='del'>-	</div><div class='del'>-	strncpy(buf1, a, len);</div><div class='del'>-	strncpy(buf2, b, len);</div><div class='del'>-	buf1[len] = '\0';</div><div class='del'>-	buf2[len] = '\0';</div><div class='del'>-	</div><div class='del'>-	return strcmp(buf1, buf2);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * strchr(char * str, int ch)</div><div class='del'>-{</div><div class='del'>-	char * chptr;</div><div class='del'>-	</div><div class='del'>-	chptr = str;</div><div class='del'>-	while (*chptr)</div><div class='del'>-	{</div><div class='del'>-		if (*chptr == ch) return chptr;</div><div class='del'>-		chptr++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * strstr(char *haystack, char *needle)</div><div class='del'>-{</div><div class='del'>-	char * tmp = haystack;</div><div class='del'>-	while ((tmp = strchr(tmp, needle[0])) != NULL) {</div><div class='del'>-		int i = 1;</div><div class='del'>-		while (i &lt; strlen(tmp) &amp;&amp; i &lt; strlen(needle) &amp;&amp; tmp[i] == needle[i])</div><div class='del'>-			i++;</div><div class='del'>-		if (needle[i] == '\0')</div><div class='del'>-			return tmp;</div><div class='del'>-		tmp++;</div><div class='del'>-	}</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Minimum printf which handles only characters, %d's and %s's */</div><div class='del'>-void printf(char * fmt, ...)</div><div class='del'>-{</div><div class='del'>-	char buf[2048];</div><div class='del'>-	char * start = buf;</div><div class='del'>-	char * chptr = buf;</div><div class='del'>-	va_list args;</div><div class='del'>-	char * strarg;</div><div class='del'>-	int numarg;</div><div class='del'>-</div><div class='del'>-	strncpy(buf, fmt, sizeof(buf));</div><div class='del'>-	va_start(args, fmt);</div><div class='del'>-</div><div class='del'>-	while (start)</div><div class='del'>-	{</div><div class='del'>-		while (*chptr != '%' &amp;&amp; *chptr) chptr++;</div><div class='del'>-		</div><div class='del'>-		if (*chptr == '%')</div><div class='del'>-		{</div><div class='del'>-			*chptr++ = '\0';</div><div class='del'>-			print_str_init(1, start);</div><div class='del'>-			</div><div class='del'>-			switch (*chptr++)</div><div class='del'>-			{</div><div class='del'>-			case 's': </div><div class='del'>-				strarg = va_arg(args, char *);</div><div class='del'>-				print_str_init(1, strarg);</div><div class='del'>-				break;</div><div class='del'>-				</div><div class='del'>-			case 'd':</div><div class='del'>-				numarg = va_arg(args, int);</div><div class='del'>-				print_int_init(1, numarg);</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-			</div><div class='del'>-			start = chptr;</div><div class='del'>-		}</div><div class='del'>-		else</div><div class='del'>-		{</div><div class='del'>-			print_str_init(1, start);</div><div class='del'>-			start = NULL;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/minilibc.h b/mdk-stage1/minilibc.h<br/>deleted file mode 100644<br/>index e0775e3a0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/minilibc.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/minilibc.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,144 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#define _LOOSE_KERNEL_NAMES 1</div><div class='del'>-</div><div class='del'>-#define NULL ((void *) 0)</div><div class='del'>-</div><div class='del'>-#define	WIFSTOPPED(status)	(((status) &amp; 0xff) == 0x7f)</div><div class='del'>-#define	WIFSIGNALED(status)	(!WIFSTOPPED(status) &amp;&amp; !WIFEXITED(status))</div><div class='del'>-#define	WEXITSTATUS(status)	(((status) &amp; 0xff00) &gt;&gt; 8)</div><div class='del'>-#define	WTERMSIG(status)	((status) &amp; 0x7f)</div><div class='del'>-#define	WSTOPSIG(status)	WEXITSTATUS(status)</div><div class='del'>-#define	WIFEXITED(status)	(WTERMSIG(status) == 0)</div><div class='del'>-</div><div class='del'>-#define MS_MGC_VAL 0xc0ed0000</div><div class='del'>-</div><div class='del'>-#define isspace(a) (a == ' ' || a == '\t')</div><div class='del'>-</div><div class='del'>-extern char ** _environ;</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-/* Aieee, gcc 2.95+ creates a stub for posix_types.h on i386 which brings</div><div class='del'>-   glibc headers in and thus makes __FD_SET etc. not defined with 2.3+ kernels. */</div><div class='del'>-#define _FEATURES_H 1</div><div class='del'>-#include &lt;linux/socket.h&gt;</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/time.h&gt;</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-#include &lt;linux/un.h&gt;</div><div class='del'>-#include &lt;linux/loop.h&gt;</div><div class='del'>-#include &lt;linux/net.h&gt;</div><div class='del'>-#include &lt;asm/posix_types.h&gt;</div><div class='del'>-#include &lt;asm/termios.h&gt;</div><div class='del'>-#include &lt;asm/ioctls.h&gt;</div><div class='del'>-#include &lt;asm/unistd.h&gt;</div><div class='del'>-#include &lt;asm/fcntl.h&gt;</div><div class='del'>-#include &lt;asm/signal.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MINILIBC_INTERNAL</div><div class='del'>-static inline _syscall5(int,mount,const char *,spec,const char *,dir,const char *,type,unsigned long,rwflag,const void *,data);</div><div class='del'>-static inline _syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval);</div><div class='del'>-static inline _syscall4(int,wait4,pid_t,pid,int *,status,int,opts,void *,rusage)</div><div class='del'>-static inline _syscall3(int,write,int,fd,const char *,buf,unsigned long,count)</div><div class='del'>-static inline _syscall3(int,reboot,int,magic,int,magic_too,int,flag)</div><div class='del'>-static inline _syscall3(int,execve,const char *,fn,void *,argv,void *,envp)</div><div class='del'>-static inline _syscall3(int,read,int,fd,const char *,buf,unsigned long,count)</div><div class='del'>-static inline _syscall3(int,open,const char *,fn,int,flags,mode_t,mode)</div><div class='del'>-static inline _syscall3(int,ioctl,int,fd,int,request,void *,argp)</div><div class='del'>-static inline _syscall2(int,dup2,int,one,int,two)</div><div class='del'>-static inline _syscall2(int,kill,pid_t,pid,int,sig)</div><div class='del'>-static inline _syscall2(int,symlink,const char *,a,const char *,b)</div><div class='del'>-static inline _syscall2(int,chmod,const char * ,path,mode_t,mode)</div><div class='del'>-static inline _syscall2(int,sethostname,const char *,name,int,len)</div><div class='del'>-static inline _syscall2(int,setdomainname,const char *,name,int,len)</div><div class='del'>-static inline _syscall2(int,setpgid,int,name,int,len)</div><div class='del'>-static inline _syscall2(int,signal,int,num,void *,len)</div><div class='del'>-static inline _syscall1(int,umount,const char *,dir)</div><div class='del'>-static inline _syscall1(int,unlink,const char *,fn)</div><div class='del'>-static inline _syscall1(int,close,int,fd)</div><div class='del'>-static inline _syscall1(int,swapoff,const char *,fn)</div><div class='del'>-static inline _syscall0(int,getpid)</div><div class='del'>-static inline _syscall0(int,sync)</div><div class='del'>-#ifdef __sparc__</div><div class='del'>-/* Nonstandard fork calling convention :( */</div><div class='del'>-static inline int fork(void) {</div><div class='del'>-  int __res;</div><div class='del'>-  __asm__ __volatile__ (</div><div class='del'>-    "mov %0, %%g1\n\t"</div><div class='del'>-    "t 0x10\n\t"</div><div class='del'>-    "bcc 1f\n\t"</div><div class='del'>-    "dec %%o1\n\t"</div><div class='del'>-    "sethi %%hi(%2), %%g1\n\t"</div><div class='del'>-    "st %%o0, [%%g1 + %%lo(%2)]\n\t"</div><div class='del'>-    "b 2f\n\t"</div><div class='del'>-    "mov -1, %0\n\t"</div><div class='del'>-    "1:\n\t"</div><div class='del'>-    "and %%o0, %%o1, %0\n\t"</div><div class='del'>-    "2:\n\t"</div><div class='del'>-    : "=r" (__res)</div><div class='del'>-    : "0" (__NR_fork), "i" (&amp;errno)</div><div class='del'>-    : "g1", "o0", "cc");</div><div class='del'>-  return __res;</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-static inline _syscall0(int,fork)</div><div class='del'>-#endif</div><div class='del'>-static inline _syscall0(pid_t,setsid)</div><div class='del'>-static inline _syscall3(int,syslog,int, type, char *, buf, int, len);</div><div class='del'>-#else</div><div class='del'>-static inline _syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval);</div><div class='del'>-static inline _syscall3(int,write,int,fd,const char *,buf,unsigned long,count)</div><div class='del'>-static inline _syscall2(int,socketcall,int,code,unsigned long *, args)</div><div class='del'>-#define __NR__do_exit __NR_exit</div><div class='del'>-extern inline _syscall1(int,_do_exit,int,exitcode)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define select _newselect</div><div class='del'>-</div><div class='del'>-extern int errno;</div><div class='del'>-</div><div class='del'>-inline int socket(int a, int b, int c);</div><div class='del'>-inline int bind(int a, void * b, int c);</div><div class='del'>-inline int listen(int a, int b);</div><div class='del'>-inline int accept(int a, void * addr, void * addr2);</div><div class='del'>-</div><div class='del'>-void sleep(int secs);</div><div class='del'>-</div><div class='del'>-int strlen(const char * string);</div><div class='del'>-char * strcpy(char * dst, const char * src);</div><div class='del'>-void * memcpy(void * dst, const void * src, size_t count);</div><div class='del'>-int strcmp(const char * a, const char * b);</div><div class='del'>-int strncmp(const char * a, const char * b, int len);</div><div class='del'>-char * strchr(char * str, int ch);</div><div class='del'>-char * strstr(char *haystack, char *needle);</div><div class='del'>-char * strncpy(char * dst, const char * src, int len);</div><div class='del'>-</div><div class='del'>-void print_str_init(int fd, char * string);</div><div class='del'>-void print_int_init(int fd, int i);</div><div class='del'>-/* Minimum printf which handles only characters, %d's and %s's */</div><div class='del'>-void printf(char * fmt, ...) __attribute__ ((format (printf, 1, 2)));</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/mkinitrd_helper/Makefile b/mdk-stage1/mkinitrd_helper/Makefile<br/>deleted file mode 100644<br/>index 1fa6a345a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mkinitrd_helper/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mkinitrd_helper/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-VERSION = 1.1.1</div><div class='del'>-</div><div class='del'>-DEFS = -DVERSION=\"$(VERSION)\"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-MKINITRD_HELPER_SRC = mkinitrd_helper.c</div><div class='del'>-MKINITRD_HELPER_LIBS = ../insmod-busybox/libinsmod-DIET.a</div><div class='del'>-</div><div class='del'>-MKINITRD_HELPER_OBJS = $(subst .c,.o,$(MKINITRD_HELPER_SRC))</div><div class='del'>-</div><div class='del'>-BIN = mkinitrd_helper </div><div class='del'>-</div><div class='del'>-all: $(BIN)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o $(BIN)</div><div class='del'>-</div><div class='del'>-FLAGS = -Wall -Werror -Os -fomit-frame-pointer -c</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-$(MKINITRD_HELPER_OBJS): %.o: %.c</div><div class='del'>-	$(CC) $(DEFS) $(DIETLIBC_INCLUDES) -I.. -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-mkinitrd_helper: $(MKINITRD_HELPER_OBJS) $(MKINITRD_HELPER_LIBS) $(DIETLIBC_LIBC)</div><div class='del'>-	$(CC) $(DIETLIBC_LDFLAGS_STAGE1) -o $@ $^</div><div class='del'>-	$(STRIPCMD) $@</div><div class='head'>diff --git a/mdk-stage1/mkinitrd_helper/mkinitrd_helper.c b/mdk-stage1/mkinitrd_helper/mkinitrd_helper.c<br/>deleted file mode 100644<br/>index 67be7c340..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mkinitrd_helper/mkinitrd_helper.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mkinitrd_helper/mkinitrd_helper.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,308 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software is covered by the GPL license.</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * This little program replaces usual sash and insmod.static based script</div><div class='del'>- * from mkinitrd (that insmod modules, plus possibly mount a partition and</div><div class='del'>- * losetup a loopback-based / on the partition).</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * On my machine:</div><div class='del'>- *   gzipped sash + insmod.static         502491 bytes</div><div class='del'>- *   gzipped &lt;this-program&gt;                14243 bytes</div><div class='del'>- *</div><div class='del'>- * There will be room for linux-2.4 and many modules, now. Cool.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-</div><div class='del'>-#include "insmod.h"</div><div class='del'>-</div><div class='del'>-int quiet = 0;</div><div class='del'>-</div><div class='del'>-void vlog_message(const char * s, va_list args)</div><div class='del'>-{</div><div class='del'>-	vprintf(s, args);</div><div class='del'>-	printf("\n");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void log_perror(char *msg)</div><div class='del'>-{</div><div class='del'>-	perror(msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void fatal_error(char *msg)</div><div class='del'>-{</div><div class='del'>-	printf("[] E: %s\n[] giving hand to kernel.\n", msg);</div><div class='del'>-        exit(-1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void warning(char *msg)</div><div class='del'>-{</div><div class='del'>-	printf("[] W: %s\n", msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void parse_parms(const char * parm, char ** parm1, char ** parm2, char ** parm3)</div><div class='del'>-{</div><div class='del'>-	char * ptr;</div><div class='del'>-	</div><div class='del'>-	ptr = strchr(parm, '\n');</div><div class='del'>-	if (!ptr)</div><div class='del'>-		fatal_error("bad config file: no newline after parms");</div><div class='del'>-</div><div class='del'>-	*parm1 = malloc(ptr-parm+1); /* yup, never freed :-) */</div><div class='del'>-	memcpy(*parm1, parm, ptr-parm);</div><div class='del'>-	(*parm1)[ptr-parm] = '\0';</div><div class='del'>-</div><div class='del'>-	if (!parm2)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	*parm2 = strchr(*parm1, ' ');</div><div class='del'>-	if (!*parm2)</div><div class='del'>-		return;</div><div class='del'>-	**parm2 = '\0';</div><div class='del'>-	(*parm2)++;</div><div class='del'>-</div><div class='del'>-	if (!parm3)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	*parm3 = strchr(*parm2, ' ');</div><div class='del'>-	if (!*parm3)</div><div class='del'>-		return;</div><div class='del'>-	**parm3 = '\0';</div><div class='del'>-	(*parm3)++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void insmod_(const char * parm)</div><div class='del'>-{</div><div class='del'>-	char * mod_name, * options;</div><div class='del'>-</div><div class='del'>-	parse_parms(parm, &amp;mod_name, &amp;options, NULL);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	printf("insmod %s options %s\n", mod_name, options);</div><div class='del'>-#endif</div><div class='del'>-	if (!quiet)</div><div class='del'>-		printf("[] Loading module %s\n", mod_name);</div><div class='del'>-</div><div class='del'>-	if (insmod_call(mod_name, options))</div><div class='del'>-		perror("insmod failed");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void mount_(const char * parm)</div><div class='del'>-{</div><div class='del'>-	char * dev, * location, * fs;</div><div class='del'>-	unsigned long flags;</div><div class='del'>-	char * opts = NULL;</div><div class='del'>-</div><div class='del'>-	parse_parms(parm, &amp;dev, &amp;location, &amp;fs);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	printf("mounting %s on %s as type %s\n", dev, location, fs);</div><div class='del'>-#endif</div><div class='del'>-	if (!quiet)</div><div class='del'>-		printf("[] Mounting device containing loopback root filesystem\n");</div><div class='del'>-</div><div class='del'>-	flags = MS_MGC_VAL;</div><div class='del'>-</div><div class='del'>-	if (!strcmp(fs, "vfat"))</div><div class='del'>-		opts = "check=relaxed";</div><div class='del'>-</div><div class='del'>-	if (mount(dev, location, fs, flags, opts))</div><div class='del'>-		perror("mount failed");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define LO_NAME_SIZE	64</div><div class='del'>-#define LO_KEY_SIZE	32</div><div class='del'>-</div><div class='del'>-struct loop_info</div><div class='del'>-{</div><div class='del'>-	int		lo_number;	/* ioctl r/o */</div><div class='del'>-	dev_t		lo_device; 	/* ioctl r/o */</div><div class='del'>-	unsigned long	lo_inode; 	/* ioctl r/o */</div><div class='del'>-	dev_t		lo_rdevice; 	/* ioctl r/o */</div><div class='del'>-	int		lo_offset;</div><div class='del'>-	int		lo_encrypt_type;</div><div class='del'>-	int		lo_encrypt_key_size; 	/* ioctl w/o */</div><div class='del'>-	int		lo_flags;	/* ioctl r/o */</div><div class='del'>-	char		lo_name[LO_NAME_SIZE];</div><div class='del'>-	unsigned char	lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */</div><div class='del'>-	unsigned long	lo_init[2];</div><div class='del'>-	char		reserved[4];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define LOOP_SET_FD	0x4C00</div><div class='del'>-#define LOOP_CLR_FD	0x4C01</div><div class='del'>-#define LOOP_SET_STATUS	0x4C02</div><div class='del'>-</div><div class='del'>-static void set_loop_(const char * parm)</div><div class='del'>-{</div><div class='del'>-	struct loop_info loopinfo;</div><div class='del'>-	int fd, ffd;</div><div class='del'>-	char * device, * file;</div><div class='del'>-</div><div class='del'>-	parse_parms(parm, &amp;device, &amp;file, NULL);</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	printf("set_looping %s with %s\n", device, file);</div><div class='del'>-#endif</div><div class='del'>-	if (!quiet)</div><div class='del'>-		printf("[] Setting up loopback file %s\n", file);</div><div class='del'>-</div><div class='del'>-	if ((ffd = open(file, O_RDWR)) &lt; 0) {</div><div class='del'>-		perror("set_loop, opening file in rw");</div><div class='del'>-		exit(-1);</div><div class='del'>-	}</div><div class='del'>-  </div><div class='del'>-	if ((fd = open(device, O_RDWR)) &lt; 0) {</div><div class='del'>-		perror("set_loop, opening loop device in rw");</div><div class='del'>-		close(ffd);</div><div class='del'>-		exit(-1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;loopinfo, 0, sizeof (loopinfo));</div><div class='del'>-	strncpy(loopinfo.lo_name, file, LO_NAME_SIZE);</div><div class='del'>-	loopinfo.lo_name[LO_NAME_SIZE - 1] = 0;</div><div class='del'>-	loopinfo.lo_offset = 0;</div><div class='del'>-</div><div class='del'>-	if (ioctl(fd, LOOP_SET_FD, ffd) &lt; 0) {</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		perror("LOOP_SET_FD");</div><div class='del'>-		exit(-1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(fd, LOOP_SET_STATUS, &amp;loopinfo) &lt; 0) {</div><div class='del'>-		(void) ioctl (fd, LOOP_CLR_FD, 0);</div><div class='del'>-		close(fd);</div><div class='del'>-		close(ffd);</div><div class='del'>-		perror("LOOP_SET_STATUS");</div><div class='del'>-		exit(-1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close(fd);</div><div class='del'>-	close(ffd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MD_MAJOR 9</div><div class='del'>-#define RAID_AUTORUN           _IO (MD_MAJOR, 0x14)</div><div class='del'>-#include &lt;linux/raid/md_u.h&gt;</div><div class='del'>-</div><div class='del'>-static void raidautorun_(const char * parm)</div><div class='del'>-{</div><div class='del'>-	char * device;</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	parse_parms(parm, &amp;device, NULL, NULL);</div><div class='del'>-</div><div class='del'>-	if (!quiet)</div><div class='del'>-		printf("[] Calling raid autorun for %s\n", device);</div><div class='del'>-	</div><div class='del'>-	fd = open(device, O_RDWR, 0);</div><div class='del'>-	if (fd &lt; 0) {</div><div class='del'>-		printf("raidautorun: failed to open %s: %d\n", device, errno);</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (ioctl(fd, RAID_AUTORUN, 0)) {</div><div class='del'>-		printf("raidautorun: RAID_AUTORUN failed: %d\n", errno);</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	close(fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int handle_command(char ** ptr, char * cmd_name, void (*cmd_func)(const char * parm))</div><div class='del'>-{</div><div class='del'>-	if (!strncmp(*ptr, cmd_name, strlen(cmd_name))) {</div><div class='del'>-		*ptr = strchr(*ptr, '\n');</div><div class='del'>-		if (!*ptr)</div><div class='del'>-			fatal_error("Bad config file: no newline after command");</div><div class='del'>-		(*ptr)++;</div><div class='del'>-		cmd_func(*ptr);</div><div class='del'>-		*ptr = strchr(*ptr, '\n');</div><div class='del'>-		if (!*ptr)</div><div class='del'>-			exit(0);</div><div class='del'>-		(*ptr)++;</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int main(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-	int fd_conf, i;</div><div class='del'>-	char buf[5000];</div><div class='del'>-	char * ptr;</div><div class='del'>-</div><div class='del'>-	if (strstr(argv[0], "modprobe"))</div><div class='del'>-		exit(0);</div><div class='del'>-</div><div class='del'>-	if (mount("/proc", "/loopfs", "proc", 0, NULL))</div><div class='del'>-		printf("[] couldn't mount proc filesystem\n");</div><div class='del'>-	else {</div><div class='del'>-		int fd_cmdline = open("/loopfs/cmdline", O_RDONLY);</div><div class='del'>-		if (fd_cmdline &gt; 0) {</div><div class='del'>-			i = read(fd_cmdline, buf, sizeof(buf));</div><div class='del'>-			if (i == -1)</div><div class='del'>-				warning("could not read cmdline");</div><div class='del'>-			else {</div><div class='del'>-				buf[i] = '\0';</div><div class='del'>-				if (strstr(buf, "quiet"))</div><div class='del'>-					quiet = 1;</div><div class='del'>-			}</div><div class='del'>-			close(fd_cmdline);</div><div class='del'>-		}</div><div class='del'>-		umount("/loopfs");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!quiet)</div><div class='del'>-		printf("[] initrd_helper v" VERSION "\n");</div><div class='del'>-</div><div class='del'>-	if ((fd_conf = open("/mkinitrd_helper.conf", O_RDONLY)) &lt; 0)</div><div class='del'>-		fatal_error("could not open mkinitrd_helper config file");</div><div class='del'>-	</div><div class='del'>-	i = read(fd_conf, buf, sizeof(buf));</div><div class='del'>-	if (i == -1)</div><div class='del'>-		fatal_error("could not read mkinitrd_helper config file");</div><div class='del'>-	buf[i] = '\0';</div><div class='del'>-	close(fd_conf);</div><div class='del'>-</div><div class='del'>-	ptr = buf;</div><div class='del'>-</div><div class='del'>-	while (*ptr)</div><div class='del'>-		if (!(handle_command(&amp;ptr, "insmod", insmod_) +</div><div class='del'>-		      handle_command(&amp;ptr, "mount", mount_) +</div><div class='del'>-		      handle_command(&amp;ptr, "raidautorun", raidautorun_) +</div><div class='del'>-		      handle_command(&amp;ptr, "set_loop", set_loop_)))</div><div class='del'>-			warning("unkown command (trying to continue)");</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c<br/>deleted file mode 100644<br/>index 083a81e6a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/modules.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/modules.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,437 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * (1) calculate dependencies</div><div class='del'>- * (2) unarchive relevant modules</div><div class='del'>- * (3) insmod them</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include "insmod.h"</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "mar/mar-extract-only.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "mount.h"</div><div class='del'>-#include "modules_descr.h"</div><div class='del'>-</div><div class='del'>-#include "modules.h"</div><div class='del'>-</div><div class='del'>-static struct module_deps_elem * modules_deps = NULL;</div><div class='del'>-</div><div class='del'>-static char * archive_name = "/modules/modules.mar";</div><div class='del'>-int disable_modules = 0;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* unarchive and insmod given module</div><div class='del'>- * WARNING: module must not contain the trailing ".o"</div><div class='del'>- */</div><div class='del'>-static enum insmod_return insmod_archived_file(const char * mod_name, char * options)</div><div class='del'>-{</div><div class='del'>-	char module_name[50];</div><div class='del'>-	char final_name[50] = "/tmp/";</div><div class='del'>-	int i, rc;</div><div class='del'>-</div><div class='del'>-	strncpy(module_name, mod_name, sizeof(module_name));</div><div class='del'>-	strcat(module_name, ".o");</div><div class='del'>-	i = mar_extract_file(archive_name, module_name, "/tmp/");</div><div class='del'>-	if (i == 1) {</div><div class='del'>-		log_message("file-not-found-in-archive %s (maybe you can try another boot floppy such as 'other.img' for seldom used SCSI modules)", module_name);</div><div class='del'>-		return INSMOD_FAILED_FILE_NOT_FOUND;</div><div class='del'>-	}</div><div class='del'>-	if (i != 0)</div><div class='del'>-		return INSMOD_FAILED;</div><div class='del'>-</div><div class='del'>-	strcat(final_name, mod_name);</div><div class='del'>-	strcat(final_name, ".o");</div><div class='del'>-</div><div class='del'>-	rc = insmod_call(final_name, options);</div><div class='del'>-	unlink(final_name); /* sucking no space left on device */</div><div class='del'>-	if (rc) {</div><div class='del'>-		log_message("\tfailed");</div><div class='del'>-		return INSMOD_FAILED;</div><div class='del'>-	}</div><div class='del'>-	return INSMOD_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int load_modules_dependencies(void)</div><div class='del'>-{</div><div class='del'>-	char * deps_file = "/modules/modules.dep";</div><div class='del'>-	char * buf, * ptr, * start, * end;</div><div class='del'>-	struct stat s;</div><div class='del'>-	int fd, line, i;</div><div class='del'>-</div><div class='del'>-	log_message("loading modules dependencies");</div><div class='del'>-</div><div class='del'>-	if (IS_TESTING)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	fd = open(deps_file, O_RDONLY);</div><div class='del'>-	if (fd == -1) {</div><div class='del'>-		log_perror(deps_file);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	fstat(fd, &amp;s);</div><div class='del'>-	buf = alloca(s.st_size + 1);</div><div class='del'>-	if (read(fd, buf, s.st_size) != (ssize_t)s.st_size) {</div><div class='del'>-		log_perror(deps_file);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	buf[s.st_size] = '\0';</div><div class='del'>-	close(fd);</div><div class='del'>-</div><div class='del'>-	ptr = buf;</div><div class='del'>-	line = 0;</div><div class='del'>-	while (ptr) {</div><div class='del'>-		line++;</div><div class='del'>-		ptr = strchr(ptr + 1, '\n');</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	modules_deps = malloc(sizeof(*modules_deps) * (line+1));</div><div class='del'>-</div><div class='del'>-	start = buf;</div><div class='del'>-	line = 0;</div><div class='del'>-	while (start &lt; (buf+s.st_size) &amp;&amp; *start) {</div><div class='del'>-		char * tmp_deps[50];</div><div class='del'>-</div><div class='del'>-		end = strchr(start, '\n');</div><div class='del'>-		*end = '\0';</div><div class='del'>-</div><div class='del'>-		ptr = strchr(start, ':');</div><div class='del'>-		if (!ptr) {</div><div class='del'>-			start = end + 1;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		*ptr = '\0';</div><div class='del'>-		ptr++;</div><div class='del'>-</div><div class='del'>-		while (*ptr &amp;&amp; (*ptr == ' ')) ptr++;</div><div class='del'>-		if (!*ptr) {</div><div class='del'>-			start = end + 1;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* sort of a good line */</div><div class='del'>-		modules_deps[line].name = strdup(start);</div><div class='del'>-</div><div class='del'>-		start = ptr;</div><div class='del'>-		i = 0;</div><div class='del'>-		while (start &amp;&amp; *start) {</div><div class='del'>-			ptr = strchr(start, ' ');</div><div class='del'>-			if (ptr) *ptr = '\0';</div><div class='del'>-			tmp_deps[i++] = strdup(start);</div><div class='del'>-			if (ptr)</div><div class='del'>-				start = ptr + 1;</div><div class='del'>-			else</div><div class='del'>-				start = NULL;</div><div class='del'>-			while (start &amp;&amp; *start &amp;&amp; *start == ' ')</div><div class='del'>-				start++;</div><div class='del'>-		}</div><div class='del'>-		tmp_deps[i++] = NULL;</div><div class='del'>-</div><div class='del'>-		modules_deps[line].deps = memdup(tmp_deps, sizeof(char *) * i);</div><div class='del'>-</div><div class='del'>-		line++;</div><div class='del'>-		start = end + 1;</div><div class='del'>-	}</div><div class='del'>-	modules_deps[line].name = NULL;</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void init_modules_insmoding(void)</div><div class='del'>-{</div><div class='del'>-	if (load_modules_dependencies()) {</div><div class='del'>-		log_message("warning, error initing modules stuff, modules loading disabled");</div><div class='del'>-		disable_modules = 1;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void add_modules_conf(char * str)</div><div class='del'>-{</div><div class='del'>-	static char data[5000] = "";</div><div class='del'>-	char * target = "/etc/modules.conf";</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	if (strlen(data) + strlen(str) &gt;= sizeof(data))</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	strcat(data, str);</div><div class='del'>-	strcat(data, "\n");</div><div class='del'>-</div><div class='del'>-	fd = open(target, O_CREAT|O_WRONLY|O_TRUNC, 00660);</div><div class='del'>-	</div><div class='del'>-	if (fd == -1) {</div><div class='del'>-		log_perror(str);</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (write(fd, data, strlen(data) + 1) != (ssize_t) (strlen(data) + 1))</div><div class='del'>-		log_perror(str);</div><div class='del'>-</div><div class='del'>-	close(fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int module_already_present(const char * name)</div><div class='del'>-{</div><div class='del'>-	FILE * f;</div><div class='del'>-	int answ = 0;</div><div class='del'>-	f = fopen("/proc/modules", "rb");</div><div class='del'>-	while (1) {</div><div class='del'>-		char buf[500];</div><div class='del'>-		if (!fgets(buf, sizeof(buf), f)) break;</div><div class='del'>-		if (!strncmp(name, buf, strlen(name)) &amp;&amp; buf[strlen(name)] == ' ')</div><div class='del'>-			answ = 1;</div><div class='del'>-	}</div><div class='del'>-	fclose(f);</div><div class='del'>-	return answ;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum insmod_return insmod_with_deps(const char * mod_name, char * options)</div><div class='del'>-{</div><div class='del'>-	struct module_deps_elem * dep;</div><div class='del'>-</div><div class='del'>-	dep = modules_deps;</div><div class='del'>-	while (dep &amp;&amp; dep-&gt;name &amp;&amp; strcmp(dep-&gt;name, mod_name)) dep++;</div><div class='del'>-</div><div class='del'>-	if (dep &amp;&amp; dep-&gt;name &amp;&amp; dep-&gt;deps) {</div><div class='del'>-		char ** one_dep;</div><div class='del'>-		one_dep = dep-&gt;deps;</div><div class='del'>-		while (*one_dep) {</div><div class='del'>-			/* here, we can fail but we don't care, if the error is</div><div class='del'>-			 * important, the desired module will fail also */</div><div class='del'>-			insmod_with_deps(*one_dep, NULL);</div><div class='del'>-			one_dep++;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (module_already_present(mod_name))</div><div class='del'>-		return INSMOD_OK;</div><div class='del'>-</div><div class='del'>-	log_message("needs %s", mod_name);</div><div class='del'>-	return insmod_archived_file(mod_name, options);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char * options)</div><div class='del'>-#else</div><div class='del'>-enum insmod_return my_insmod(const char * mod_name, enum driver_type type __attribute__ ((unused)), char * options)</div><div class='del'>-#endif</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-	char ** net_devices = NULL; /* fucking compiler */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	log_message("have to insmod %s", mod_name);</div><div class='del'>-</div><div class='del'>-	if (disable_modules) {</div><div class='del'>-		log_message("\tdisabled");</div><div class='del'>-		return INSMOD_OK;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-	if (type == NETWORK_DEVICES)</div><div class='del'>-		net_devices = get_net_devices();</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	if (IS_TESTING)</div><div class='del'>-		return INSMOD_OK;</div><div class='del'>-</div><div class='del'>-	i = insmod_with_deps(mod_name, options);</div><div class='del'>-	if (i == 0) {</div><div class='del'>-		log_message("\tsucceeded %s", mod_name);</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-		if (type == NETWORK_DEVICES) {</div><div class='del'>-			char ** new_net_devices = get_net_devices();</div><div class='del'>-			while (new_net_devices &amp;&amp; *new_net_devices) {</div><div class='del'>-				char alias[500];</div><div class='del'>-				char ** ptr = net_devices;</div><div class='del'>-				while (ptr &amp;&amp; *ptr) {</div><div class='del'>-					if (!strcmp(*new_net_devices, *ptr))</div><div class='del'>-						goto already_present;</div><div class='del'>-					ptr++;</div><div class='del'>-				}</div><div class='del'>-				sprintf(alias, "alias %s %s", *new_net_devices, mod_name);</div><div class='del'>-				add_modules_conf(alias);</div><div class='del'>-				log_message("NET: %s", alias);</div><div class='del'>-				net_discovered_interface(*new_net_devices);</div><div class='del'>-				</div><div class='del'>-			already_present:</div><div class='del'>-				new_net_devices++;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-#endif</div><div class='del'>-	} else</div><div class='del'>-		log_message("warning, insmod failed (%s %s) (%d)", mod_name, options, i);</div><div class='del'>-	</div><div class='del'>-	return i;</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static enum return_type insmod_with_options(char * mod, enum driver_type type)</div><div class='del'>-{</div><div class='del'>-	char * questions[] = { "Options", NULL };</div><div class='del'>-	static char ** answers = NULL;</div><div class='del'>-	enum return_type results;</div><div class='del'>-	char options[500] = "options ";</div><div class='del'>-</div><div class='del'>-	results = ask_from_entries("Please enter the parameters to give to the kernel:", questions, &amp;answers, 24, NULL);</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	strcat(options, mod);</div><div class='del'>-	strcat(options, " ");</div><div class='del'>-	strcat(options, answers[0]); // because my_insmod will eventually modify the string</div><div class='del'>-	</div><div class='del'>-	if (my_insmod(mod, type, answers[0]) != INSMOD_OK) {</div><div class='del'>-		stg1_error_message("Insmod failed.");</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	add_modules_conf(options);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum return_type ask_insmod(enum driver_type type)</div><div class='del'>-{</div><div class='del'>-	char * mytype;</div><div class='del'>-	char msg[200];</div><div class='del'>-	enum return_type results;</div><div class='del'>-	char * choice;</div><div class='del'>-</div><div class='del'>-	unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-</div><div class='del'>-	if (type == SCSI_ADAPTERS)</div><div class='del'>-		mytype = "SCSI";</div><div class='del'>-	else if (type == NETWORK_DEVICES)</div><div class='del'>-		mytype = "NET";</div><div class='del'>-	else</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-</div><div class='del'>-	if (disable_modules)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-</div><div class='del'>-	snprintf(msg, sizeof(msg), "Which driver should I try to gain %s access?", mytype);</div><div class='del'>-</div><div class='del'>-	{</div><div class='del'>-		char ** drivers = mar_list_contents(archive_name);</div><div class='del'>-		char ** descrs = malloc(sizeof(char *) * string_array_length(drivers));</div><div class='del'>-		char ** p_drivers = drivers;</div><div class='del'>-		char ** p_descrs = descrs;</div><div class='del'>-		while (p_drivers &amp;&amp; *p_drivers) {</div><div class='del'>-			int i;</div><div class='del'>-			*p_descrs = NULL;</div><div class='del'>-			for (i = 0 ; i &lt; modules_descriptions_num ; i++) {</div><div class='del'>-				if (!strncmp(*p_drivers, modules_descriptions[i].module, strlen(modules_descriptions[i].module))</div><div class='del'>-				    &amp;&amp; (*p_drivers)[strlen(modules_descriptions[i].module)] == '.') /* one contains '.o' not the other */</div><div class='del'>-					*p_descrs = modules_descriptions[i].descr;</div><div class='del'>-			}</div><div class='del'>-			p_drivers++;</div><div class='del'>-			p_descrs++;</div><div class='del'>-		}</div><div class='del'>-		results = ask_from_list_comments(msg, drivers, descrs, &amp;choice);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (results == RETURN_OK) {</div><div class='del'>-		choice[strlen(choice)-2] = '\0'; /* remove trailing .o */</div><div class='del'>-		return insmod_with_options(choice, type);</div><div class='del'>-	} else</div><div class='del'>-		return results;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void update_modules(void)</div><div class='del'>-{</div><div class='del'>-	FILE * f;</div><div class='del'>-	char ** disk_contents;</div><div class='del'>-	char final_name[500];</div><div class='del'>-	char floppy_mount_location[] = "/tmp/floppy";</div><div class='del'>-</div><div class='del'>-	stg1_info_message("Please insert the Update Modules floppy.");;</div><div class='del'>-</div><div class='del'>-	my_insmod("floppy", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-	if (my_mount("/dev/fd0", floppy_mount_location, "ext2", 0) == -1) {</div><div class='del'>-		enum return_type results = ask_yes_no("I can't find a Linux ext2 floppy in first floppy drive.\n"</div><div class='del'>-						      "Retry?");</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			return update_modules();</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	disk_contents = list_directory(floppy_mount_location);</div><div class='del'>-</div><div class='del'>-	if (!(f = fopen("/tmp/floppy/to_load", "rb"))) {</div><div class='del'>-		stg1_error_message("I can't find \"to_load\" file.");</div><div class='del'>-		umount(floppy_mount_location);</div><div class='del'>-		return update_modules();</div><div class='del'>-	}</div><div class='del'>-	while (1) {</div><div class='del'>-		char module[500];</div><div class='del'>-		char * options;</div><div class='del'>-		char ** entry = disk_contents;</div><div class='del'>-</div><div class='del'>-		if (!fgets(module, sizeof(module), f)) break;</div><div class='del'>-		if (module[0] == '#' || strlen(module) == 0)</div><div class='del'>-			continue;</div><div class='del'>-</div><div class='del'>-		while (module[strlen(module)-1] == '\n')</div><div class='del'>-			module[strlen(module)-1] = '\0';</div><div class='del'>-		options = strchr(module, ' ');</div><div class='del'>-		if (options) {</div><div class='del'>-			options[0] = '\0';</div><div class='del'>-			options++;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		log_message("updatemodules: (%s) (%s)", module, options);</div><div class='del'>-		while (entry &amp;&amp; *entry) {</div><div class='del'>-			if (!strncmp(*entry, module, strlen(module)) &amp;&amp; (*entry)[strlen(module)] == '.') {</div><div class='del'>-				sprintf(final_name, "%s/%s", floppy_mount_location, *entry);</div><div class='del'>-				if (insmod_call(final_name, options)) {</div><div class='del'>-					log_message("\t%s (floppy): failed", *entry);</div><div class='del'>-					stg1_error_message("Insmod %s (floppy) failed.", *entry);</div><div class='del'>-				}</div><div class='del'>-				break;</div><div class='del'>-			}</div><div class='del'>-			entry++;</div><div class='del'>-		}</div><div class='del'>-		if (!entry || !*entry) {</div><div class='del'>-			enum insmod_return ret = my_insmod(module, ANY_DRIVER_TYPE, options);</div><div class='del'>-			if (ret != INSMOD_OK) {</div><div class='del'>-				log_message("\t%s (marfile): failed", module);</div><div class='del'>-				stg1_error_message("Insmod %s (marfile) failed.", module);</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	fclose(f);</div><div class='del'>-	umount(floppy_mount_location);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/modules.h b/mdk-stage1/modules.h<br/>deleted file mode 100644<br/>index 5e14764d7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/modules.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/modules.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,36 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _MODULES_H_</div><div class='del'>-#define _MODULES_H_</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "probing.h"</div><div class='del'>-</div><div class='del'>-enum insmod_return { INSMOD_OK, INSMOD_FAILED, INSMOD_FAILED_FILE_NOT_FOUND };</div><div class='del'>-</div><div class='del'>-void init_modules_insmoding(void);</div><div class='del'>-enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char * options);</div><div class='del'>-enum return_type ask_insmod(enum driver_type);</div><div class='del'>-void update_modules(void);</div><div class='del'>-int module_already_present(const char * name);</div><div class='del'>-</div><div class='del'>-struct module_deps_elem {</div><div class='del'>-    char * name;</div><div class='del'>-    char ** deps;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern int disable_modules;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/modules_descr.h b/mdk-stage1/modules_descr.h<br/>deleted file mode 100644<br/>index d38f437d8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/modules_descr.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/modules_descr.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,66 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2001 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _MODULES_DESCR_H_</div><div class='del'>-#define _MODULES_DESCR_H_</div><div class='del'>-</div><div class='del'>-struct module_descr {</div><div class='del'>-	const char * module;</div><div class='del'>-	char * descr;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct module_descr modules_descriptions[] = {</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-	/* description of network drivers that have not very explicit names */</div><div class='del'>-	{ "ne",        "NE1000/NE2000/clones" },</div><div class='del'>-	{ "ne2k-pci",  "PCI NE2000" },</div><div class='del'>-	{ "depca",     "DEC DEPCA/DE100/DE101/DE200/DE201/DE202/DE210/DE422" },</div><div class='del'>-	{ "dgrs",      "Digi RightSwitch SE-X" },</div><div class='del'>-	{ "ewrk3",     "DEC DE203/DE204/DE205" },</div><div class='del'>-	{ "lance",     "Allied Telesis AT1500, HP J2405A, NE2100/NE2500" },</div><div class='del'>-	{ "sis900",    "SiS 900/7016/630E, Am79c901, RTL8201" },</div><div class='del'>-	{ "via-rhine", "VIA VT86c100A Rhine-II, 3043 Rhine-I" },</div><div class='del'>-	{ "tulip",     "DEC 21040-family based cards" },</div><div class='del'>-	{ "wd",        "WD8003/WD8013" },</div><div class='del'>-	{ "bmac",      "Macintosh integrated ethernet (G3)" },</div><div class='del'>-	{ "gmac",      "Macintosh integrated ethernet (G4/iBook)" },</div><div class='del'>-	{ "mace",      "Macintosh integrated ethernet (PowerMac)" },</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_MEDIAS</div><div class='del'>-	/* description of scsi drivers that have not very explicit names */</div><div class='del'>-	{ "53c7,8xx",  "NCR53c810/700" },</div><div class='del'>-	{ "sim710",    "NCR53c710" },</div><div class='del'>-	{ "aic7xxx",   "Adaptec 7xxx family (AIC/AHA/etc)" },</div><div class='del'>-	{ "atp870u",   "ACARD/ARTOP AEC-6710/6712" },</div><div class='del'>-	{ "ncr53c8xx", "Symbios 53c family" },</div><div class='del'>-	{ "sym53c8xx", "Symbios 53c family" },</div><div class='del'>-	{ "sim710",    "NCR53C710 family" },</div><div class='del'>-	{ "mesh",      "Macintosh integrated SCSI (NewWorld or internal SCSI)" },</div><div class='del'>-	{ "mac53c94",  "Macintosh integrated SCSI (OldWorld or external SCSI)" },</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef ENABLE_USB</div><div class='del'>-	/* description of usb drivers that have not very explicit names */</div><div class='del'>-	{ "usbnet",    "Netchip or Prolific USB-USB Bridge" },</div><div class='del'>-	{ "pegasus",   "ADMtek AN986 (USB Ethernet chipset)" },</div><div class='del'>-	{ "kaweth",    "KL5KUSB101 (USB Ethernet chipset)" },</div><div class='del'>-	{ "catc",      "CATC EL1210A NetMate USB Ethernet" },</div><div class='del'>-#endif</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int modules_descriptions_num = sizeof(modules_descriptions) / sizeof(struct module_descr);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c<br/>deleted file mode 100644<br/>index fd86a13b7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mount.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mount.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,189 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-</div><div class='del'>-#include "mount.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_MEDIAS</div><div class='del'>-/* WARNING: this won't work if the argument is not /dev/ based */</div><div class='del'>-int ensure_dev_exists(char *dev)</div><div class='del'>-{</div><div class='del'>-	int major, minor;</div><div class='del'>-	int type = S_IFBLK; /* my default type is block. don't forget to change for chars */</div><div class='del'>-	char * name;</div><div class='del'>-	struct stat buf;</div><div class='del'>-	char * ptr;</div><div class='del'>-	</div><div class='del'>-	name = &amp;dev[5]; /* we really need that dev be passed as /dev/something.. */</div><div class='del'>-</div><div class='del'>-	if (!stat(dev, &amp;buf))</div><div class='del'>-		return 0; /* if the file already exists, we assume it's correct */</div><div class='del'>-</div><div class='del'>-	if (ptr_begins_static_str(name, "sd")) {</div><div class='del'>-		/* SCSI disks */</div><div class='del'>-		major = 8;</div><div class='del'>-		minor = (name[2] - 'a') &lt;&lt; 4;</div><div class='del'>-		if (name[3] &amp;&amp; name[4])</div><div class='del'>-			minor += 10 + (name[4] - '0');</div><div class='del'>-		else if (name[3])</div><div class='del'>-			minor += (name[3] - '0');</div><div class='del'>-	} else if (ptr_begins_static_str(name, "hd")) {</div><div class='del'>-		/* IDE disks/cd's */</div><div class='del'>-		if (name[2] == 'a')</div><div class='del'>-			major = 3, minor = 0;</div><div class='del'>-		else if (name[2] == 'b')</div><div class='del'>-			major = 3, minor = 64;</div><div class='del'>-		else if (name[2] == 'c')</div><div class='del'>-			major = 22, minor = 0;</div><div class='del'>-		else if (name[2] == 'd')</div><div class='del'>-			major = 22, minor = 64;</div><div class='del'>-		else if (name[2] == 'e')</div><div class='del'>-			major = 33, minor = 0;</div><div class='del'>-		else if (name[2] == 'f')</div><div class='del'>-			major = 33, minor = 64;</div><div class='del'>-		else if (name[2] == 'g')</div><div class='del'>-			major = 34, minor = 0;</div><div class='del'>-		else if (name[2] == 'h')</div><div class='del'>-			major = 34, minor = 64;</div><div class='del'>-		else</div><div class='del'>-			return -1;</div><div class='del'>-		</div><div class='del'>-		if (name[3] &amp;&amp; name[4])</div><div class='del'>-			minor += 10 + (name[4] - '0');</div><div class='del'>-		else if (name[3])</div><div class='del'>-			minor += (name[3] - '0');</div><div class='del'>-	} else if (ptr_begins_static_str(name , "sr")) {</div><div class='del'>-		/* SCSI cd's */</div><div class='del'>-		major = 11;</div><div class='del'>-		minor = name[2] - '0';</div><div class='del'>-	} else if (ptr_begins_static_str(name, "ida/") ||</div><div class='del'>-		   ptr_begins_static_str(name, "cciss/")) {</div><div class='del'>-		/* Compaq Smart Array "ida/c0d0{p1}" */</div><div class='del'>-		ptr = strchr(name, '/');</div><div class='del'>-		mkdir("/dev/ida", 0755);</div><div class='del'>-		mkdir("/dev/cciss", 0755);</div><div class='del'>-		major = ptr_begins_static_str(name, "ida/") ? 72 : 104 + charstar_to_int(ptr+2);</div><div class='del'>-		ptr = strchr(ptr, 'd');</div><div class='del'>-		minor = 16 * charstar_to_int(ptr+1);</div><div class='del'>-		ptr = strchr(ptr, 'p');</div><div class='del'>-		minor += charstar_to_int(ptr+1);</div><div class='del'>-	} else if (ptr_begins_static_str(name, "rd/")) {</div><div class='del'>-		/* DAC960 "rd/cXdXXpX" */</div><div class='del'>-		mkdir("/dev/rd", 0755);</div><div class='del'>-		major = 48 + charstar_to_int(name+4);</div><div class='del'>-		ptr = strchr(name+4, 'd');</div><div class='del'>-		minor = 8 * charstar_to_int(ptr+1);</div><div class='del'>-		ptr = strchr(ptr, 'p');</div><div class='del'>-		minor += charstar_to_int(ptr+1);</div><div class='del'>-	} else {</div><div class='del'>-		log_message("I don't know how to create device %s, please post bugreport to me!", dev);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (mknod(dev, type | 0600, makedev(major, minor))) {</div><div class='del'>-		log_perror(dev);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-#endif /* DISABLE_MEDIAS */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* mounts, creating the device if needed+possible */</div><div class='del'>-int my_mount(char *dev, char *location, char *fs, int force_rw)</div><div class='del'>-{</div><div class='del'>-	unsigned long flags = MS_MGC_VAL | (force_rw ? 0 : MS_RDONLY);</div><div class='del'>-	char * opts = NULL;</div><div class='del'>-	struct stat buf;</div><div class='del'>-	int rc;</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_MEDIAS</div><div class='del'>-	if (strcmp(fs, "nfs")) {</div><div class='del'>-	    rc = ensure_dev_exists(dev);</div><div class='del'>-	    if (rc != 0) {</div><div class='del'>-		    log_message("could not create required device file");</div><div class='del'>-		    return -1;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	log_message("mounting %s on %s as type %s", dev, location, fs);</div><div class='del'>-</div><div class='del'>-	if (stat(location, &amp;buf)) {</div><div class='del'>-		if (mkdir(location, 0755)) {</div><div class='del'>-			log_perror("could not create location dir");</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-	} else if (!S_ISDIR(buf.st_mode)) {</div><div class='del'>-		log_message("not a dir %s, will unlink and mkdir", location);</div><div class='del'>-		if (unlink(location)) {</div><div class='del'>-			log_perror("could not unlink");</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-		if (mkdir(location, 0755)) {</div><div class='del'>-			log_perror("could not create location dir");</div><div class='del'>-			return -1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_MEDIAS</div><div class='del'>-	if (!strcmp(fs, "vfat")) {</div><div class='del'>-		my_insmod("vfat", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-		opts = "check=relaxed";</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!strcmp(fs, "reiserfs"))</div><div class='del'>-		my_insmod("reiserfs", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-	if (!strcmp(fs, "iso9660"))</div><div class='del'>-		my_insmod("isofs", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-	if (!strcmp(fs, "nfs")) {</div><div class='del'>-		int flags = MS_RDONLY;</div><div class='del'>-		my_insmod("nfs", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-		log_message("preparing nfsmount for %s", dev);</div><div class='del'>-		rc = nfsmount_prepare(dev, &amp;flags, &amp;opts);</div><div class='del'>-		if (rc != 0)</div><div class='del'>-			return rc;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	rc = mount(dev, location, fs, flags, opts);</div><div class='del'>-	if (rc != 0) {</div><div class='del'>-		log_perror("mount failed");</div><div class='del'>-		rmdir(location);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return rc;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/mount.h b/mdk-stage1/mount.h<br/>deleted file mode 100644<br/>index 82795462f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mount.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mount.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,35 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _MOUNT_H_</div><div class='del'>-#define _MOUNT_H_</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_NETWORK</div><div class='del'>-#include "nfsmount.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int my_mount(char *dev, char *location, char *fs, int force_rw);</div><div class='del'>-</div><div class='del'>-#ifndef DISABLE_MEDIAS</div><div class='del'>-int ensure_dev_exists(char *dev);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/mount_rpcgen.h b/mdk-stage1/mount_rpcgen.h<br/>deleted file mode 100644<br/>index d70ccaf9d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/mount_rpcgen.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/mount_rpcgen.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,208 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Please do not edit this file.</div><div class='del'>- * It was generated using rpcgen.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _MOUNT_H_RPCGEN</div><div class='del'>-#define _MOUNT_H_RPCGEN</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-#define MNTPATHLEN 1024</div><div class='del'>-#define MNTNAMLEN 255</div><div class='del'>-#define FHSIZE 32</div><div class='del'>-</div><div class='del'>-typedef char fhandle[FHSIZE];</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_fhandle(XDR *, fhandle);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_fhandle(XDR *, fhandle);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_fhandle();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct fhstatus {</div><div class='del'>-	u_int fhs_status;</div><div class='del'>-	union {</div><div class='del'>-		fhandle fhs_fhandle;</div><div class='del'>-	} fhstatus_u;</div><div class='del'>-};</div><div class='del'>-typedef struct fhstatus fhstatus;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_fhstatus(XDR *, fhstatus*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_fhstatus(XDR *, fhstatus*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_fhstatus();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char *dirpath;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_dirpath(XDR *, dirpath*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_dirpath(XDR *, dirpath*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_dirpath();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char *name;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_name(XDR *, name*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_name(XDR *, name*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_name();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct mountbody *mountlist;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_mountlist(XDR *, mountlist*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_mountlist(XDR *, mountlist*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_mountlist();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct mountbody {</div><div class='del'>-	name ml_hostname;</div><div class='del'>-	dirpath ml_directory;</div><div class='del'>-	mountlist ml_next;</div><div class='del'>-};</div><div class='del'>-typedef struct mountbody mountbody;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_mountbody(XDR *, mountbody*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_mountbody(XDR *, mountbody*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_mountbody();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct groupnode *groups;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_groups(XDR *, groups*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_groups(XDR *, groups*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_groups();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct groupnode {</div><div class='del'>-	name gr_name;</div><div class='del'>-	groups gr_next;</div><div class='del'>-};</div><div class='del'>-typedef struct groupnode groupnode;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_groupnode(XDR *, groupnode*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_groupnode(XDR *, groupnode*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_groupnode();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct exportnode *exports;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_exports(XDR *, exports*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_exports(XDR *, exports*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_exports();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct exportnode {</div><div class='del'>-	dirpath ex_dir;</div><div class='del'>-	groups ex_groups;</div><div class='del'>-	exports ex_next;</div><div class='del'>-};</div><div class='del'>-typedef struct exportnode exportnode;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_exportnode(XDR *, exportnode*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_exportnode(XDR *, exportnode*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_exportnode();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MOUNTPROG ((u_long)100005)</div><div class='del'>-#define MOUNTVERS ((u_long)1)</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern "C" void * mountproc_null_1(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_null_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern "C" mountlist * mountproc_dump_1(void *, CLIENT *);</div><div class='del'>-extern "C" mountlist * mountproc_dump_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern "C" void * mountproc_umnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern "C" void * mountproc_umntall_1(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umntall_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern "C" exports * mountproc_export_1(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_export_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern "C" exports * mountproc_exportall_1(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_exportall_1_svc(void *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#elif __STDC__</div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern  void * mountproc_null_1(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_null_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern  fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern  fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern  mountlist * mountproc_dump_1(void *, CLIENT *);</div><div class='del'>-extern  mountlist * mountproc_dump_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern  void * mountproc_umnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern  void * mountproc_umntall_1(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umntall_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern  exports * mountproc_export_1(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_export_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern  exports * mountproc_exportall_1(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_exportall_1_svc(void *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern  void * mountproc_null_1();</div><div class='del'>-extern  void * mountproc_null_1_svc();</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern  fhstatus * mountproc_mnt_1();</div><div class='del'>-extern  fhstatus * mountproc_mnt_1_svc();</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern  mountlist * mountproc_dump_1();</div><div class='del'>-extern  mountlist * mountproc_dump_1_svc();</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern  void * mountproc_umnt_1();</div><div class='del'>-extern  void * mountproc_umnt_1_svc();</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern  void * mountproc_umntall_1();</div><div class='del'>-extern  void * mountproc_umntall_1_svc();</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern  exports * mountproc_export_1();</div><div class='del'>-extern  exports * mountproc_export_1_svc();</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern  exports * mountproc_exportall_1();</div><div class='del'>-extern  exports * mountproc_exportall_1_svc();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-#endif /* !_MOUNT_H_RPCGEN */</div><div class='head'>diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c<br/>deleted file mode 100644<br/>index ef9dd2814..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/network.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/network.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,833 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;resolv.h&gt;</div><div class='del'>-</div><div class='del'>-#include "stage1.h"</div><div class='del'>-#include "frontend.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-#include "probing.h"</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "mount.h"</div><div class='del'>-#include "automatic.h"</div><div class='del'>-#include "dhcp.h"</div><div class='del'>-#include "adsl.h"</div><div class='del'>-#include "url.h"</div><div class='del'>-#include "dns.h"</div><div class='del'>-</div><div class='del'>-#include "network.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void error_message_net(void)  /* reduce code size */</div><div class='del'>-{</div><div class='del'>-	stg1_error_message("Could not configure network.");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int configure_net_device(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	struct ifreq req;</div><div class='del'>-	struct rtentry route;</div><div class='del'>-	int s;</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-	struct in_addr ia;</div><div class='del'>-	char ip[20], nm[20], nw[20], bc[20];</div><div class='del'>-	</div><div class='del'>-	addr.sin_family = AF_INET;</div><div class='del'>-	addr.sin_port = 0;</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;ia, &amp;intf-&gt;ip, sizeof(intf-&gt;ip));</div><div class='del'>-	strcpy(ip, inet_ntoa(ia));</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;ia, &amp;intf-&gt;netmask, sizeof(intf-&gt;netmask));</div><div class='del'>-	strcpy(nm, inet_ntoa(ia));</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;ia, &amp;intf-&gt;broadcast, sizeof(intf-&gt;broadcast));</div><div class='del'>-	strcpy(bc, inet_ntoa(ia));</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;ia, &amp;intf-&gt;network, sizeof(intf-&gt;network));</div><div class='del'>-	strcpy(nw, inet_ntoa(ia));</div><div class='del'>-</div><div class='del'>-	log_message("configuring device %s ip: %s nm: %s nw: %s bc: %s", intf-&gt;device, ip, nm, nw, bc);</div><div class='del'>-</div><div class='del'>-	if (IS_TESTING)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-	if (s &lt; 0) {</div><div class='del'>-		log_perror("socket");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	strcpy(req.ifr_name, intf-&gt;device);</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;is_up == 1) {</div><div class='del'>-		log_message("interface already up, downing before reconfigure");</div><div class='del'>-</div><div class='del'>-		req.ifr_flags = 0;</div><div class='del'>-		if (ioctl(s, SIOCSIFFLAGS, &amp;req)) {</div><div class='del'>-			close(s);</div><div class='del'>-			log_perror("SIOCSIFFLAGS (downing)");</div><div class='del'>-			error_message_net();</div><div class='del'>-			return 1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-		</div><div class='del'>-	/* sets IP address */</div><div class='del'>-	addr.sin_port = 0;</div><div class='del'>-	memcpy(&amp;addr.sin_addr, &amp;intf-&gt;ip, sizeof(intf-&gt;ip));</div><div class='del'>-	memcpy(&amp;req.ifr_addr, &amp;addr, sizeof(addr));</div><div class='del'>-	if (ioctl(s, SIOCSIFADDR, &amp;req)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCSIFADDR");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* sets broadcast */</div><div class='del'>-	memcpy(&amp;addr.sin_addr, &amp;intf-&gt;broadcast, sizeof(intf-&gt;broadcast));</div><div class='del'>-	memcpy(&amp;req.ifr_broadaddr, &amp;addr, sizeof(addr));</div><div class='del'>-	if (ioctl(s, SIOCSIFBRDADDR, &amp;req)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCSIFBRDADDR");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* sets netmask */</div><div class='del'>-	memcpy(&amp;addr.sin_addr, &amp;intf-&gt;netmask, sizeof(intf-&gt;netmask));</div><div class='del'>-	memcpy(&amp;req.ifr_netmask, &amp;addr, sizeof(addr));</div><div class='del'>-	if (ioctl(s, SIOCSIFNETMASK, &amp;req)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCSIFNETMASK");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;is_ptp)</div><div class='del'>-		req.ifr_flags = IFF_UP | IFF_RUNNING | IFF_POINTOPOINT | IFF_NOARP;</div><div class='del'>-	else</div><div class='del'>-		req.ifr_flags = IFF_UP | IFF_RUNNING | IFF_BROADCAST;</div><div class='del'>-</div><div class='del'>-	/* brings up networking! */</div><div class='del'>-	if (ioctl(s, SIOCSIFFLAGS, &amp;req)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCSIFFLAGS (upping)");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;route, 0, sizeof(route));</div><div class='del'>-	route.rt_dev = intf-&gt;device;</div><div class='del'>-	route.rt_flags = RTF_UP;</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;addr.sin_addr, &amp;intf-&gt;network, sizeof(intf-&gt;network));</div><div class='del'>-	memcpy(&amp;route.rt_dst, &amp;addr, sizeof(addr));</div><div class='del'>-	</div><div class='del'>-	memcpy(&amp;addr.sin_addr, &amp;intf-&gt;netmask, sizeof(intf-&gt;netmask));</div><div class='del'>-	memcpy(&amp;route.rt_genmask, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-	/* adds route */</div><div class='del'>-	if (ioctl(s, SIOCADDRT, &amp;route)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCADDRT");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close(s);</div><div class='del'>-</div><div class='del'>-	intf-&gt;is_up = 1;</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;boot_proto != BOOTPROTO_DHCP &amp;&amp; !streq(intf-&gt;device, "lo")) {</div><div class='del'>-		/* I need to sleep a bit in order for kernel to finish</div><div class='del'>-		   init of the network device; if not, first sendto() for</div><div class='del'>-		   gethostbyaddr will get an EINVAL. */</div><div class='del'>-		wait_message("Bringing up networking...");</div><div class='del'>-		sleep(2);</div><div class='del'>-		remove_wait_message();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* host network informations */ </div><div class='del'>-char * hostname = NULL;</div><div class='del'>-char * domain = NULL;</div><div class='del'>-struct in_addr gateway = { 0 };</div><div class='del'>-struct in_addr dns_server = { 0 };</div><div class='del'>-struct in_addr dns_server2 = { 0 };</div><div class='del'>-</div><div class='del'>-static int add_default_route(void)</div><div class='del'>-{</div><div class='del'>-	int s;</div><div class='del'>-	struct rtentry route;</div><div class='del'>-	struct sockaddr_in addr;</div><div class='del'>-</div><div class='del'>-	if (IS_TESTING)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	if (gateway.s_addr == 0) {</div><div class='del'>-		log_message("no gateway provided, can't add default route");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-	if (s &lt; 0) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("socket");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memset(&amp;route, 0, sizeof(route));</div><div class='del'>-</div><div class='del'>-	addr.sin_family = AF_INET;</div><div class='del'>-	addr.sin_port = 0;</div><div class='del'>-	addr.sin_addr = gateway;</div><div class='del'>-	memcpy(&amp;route.rt_gateway, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-	addr.sin_addr.s_addr = INADDR_ANY;</div><div class='del'>-	memcpy(&amp;route.rt_dst, &amp;addr, sizeof(addr));</div><div class='del'>-	memcpy(&amp;route.rt_genmask, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-	route.rt_flags = RTF_UP | RTF_GATEWAY;</div><div class='del'>-	route.rt_metric = 0;</div><div class='del'>-</div><div class='del'>-	if (ioctl(s, SIOCADDRT, &amp;route)) {</div><div class='del'>-		close(s);</div><div class='del'>-		log_perror("SIOCADDRT");</div><div class='del'>-		error_message_net();</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	close(s);</div><div class='del'>-	</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int write_resolvconf(void) {</div><div class='del'>-	char * filename = "/etc/resolv.conf";</div><div class='del'>-	FILE * f;</div><div class='del'>-	</div><div class='del'>-	if (dns_server.s_addr == 0) {</div><div class='del'>-		log_message("resolvconf needs a dns server");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	f = fopen(filename, "w");</div><div class='del'>-	if (!f) {</div><div class='del'>-		log_perror(filename);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (domain)</div><div class='del'>-		fprintf(f, "search %s\n", domain); /* we can live without the domain search (user will have to enter fully-qualified names) */</div><div class='del'>-	fprintf(f, "nameserver %s\n", inet_ntoa(dns_server));</div><div class='del'>-	if (dns_server2.s_addr != 0)</div><div class='del'>-		fprintf(f, "nameserver %s\n", inet_ntoa(dns_server2));</div><div class='del'>-</div><div class='del'>-	fclose(f);</div><div class='del'>-	res_init();		/* reinit the resolver so DNS changes take affect */</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int save_netinfo(struct interface_info * intf) {</div><div class='del'>-	char * file_network = "/tmp/network";</div><div class='del'>-	char file_intf[500];</div><div class='del'>-	FILE * f;</div><div class='del'>-	</div><div class='del'>-	f = fopen(file_network, "w");</div><div class='del'>-	if (!f) {</div><div class='del'>-		log_perror(file_network);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	fprintf(f, "NETWORKING=yes\n");</div><div class='del'>-	fprintf(f, "FORWARD_IPV4=false\n");</div><div class='del'>-</div><div class='del'>-	if (hostname)</div><div class='del'>-		fprintf(f, "HOSTNAME=%s\n", hostname);</div><div class='del'>-	if (domain)</div><div class='del'>-		fprintf(f, "DOMAINNAME=%s\n", domain);</div><div class='del'>-	if (dhcp_hostname &amp;&amp; !streq(dhcp_hostname, ""))</div><div class='del'>-		fprintf(f, "DHCP_HOSTNAME=%s\n", dhcp_hostname);</div><div class='del'>-	</div><div class='del'>-	if (gateway.s_addr != 0)</div><div class='del'>-		fprintf(f, "GATEWAY=%s\n", inet_ntoa(gateway));</div><div class='del'>-</div><div class='del'>-	fclose(f);</div><div class='del'>-</div><div class='del'>-	</div><div class='del'>-	strcpy(file_intf, "/tmp/ifcfg-");</div><div class='del'>-	strcat(file_intf, intf-&gt;device);</div><div class='del'>-</div><div class='del'>-	f = fopen(file_intf, "w");</div><div class='del'>-	if (!f) {</div><div class='del'>-		log_perror(file_intf);</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	fprintf(f, "DEVICE=%s\n", intf-&gt;device);</div><div class='del'>-</div><div class='del'>-	if (intf-&gt;boot_proto == BOOTPROTO_DHCP)</div><div class='del'>-		fprintf(f, "BOOTPROTO=dhcp\n");</div><div class='del'>-	else if (intf-&gt;boot_proto == BOOTPROTO_STATIC) {</div><div class='del'>-		fprintf(f, "BOOTPROTO=static\n");</div><div class='del'>-		fprintf(f, "IPADDR=%s\n", inet_ntoa(intf-&gt;ip));</div><div class='del'>-		fprintf(f, "NETMASK=%s\n", inet_ntoa(intf-&gt;netmask));</div><div class='del'>-		fprintf(f, "NETWORK=%s\n", inet_ntoa(intf-&gt;network));</div><div class='del'>-		fprintf(f, "BROADCAST=%s\n", inet_ntoa(intf-&gt;broadcast));</div><div class='del'>-	} else if (intf-&gt;boot_proto == BOOTPROTO_ADSL_PPPOE) {</div><div class='del'>-		fprintf(f, "BOOTPROTO=adsl_pppoe\n");</div><div class='del'>-		fprintf(f, "USER=%s\n", intf-&gt;user);</div><div class='del'>-		fprintf(f, "PASS=%s\n", intf-&gt;pass);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	fclose(f);</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * guess_netmask(char * ip_addr)</div><div class='del'>-{</div><div class='del'>-	struct in_addr addr;</div><div class='del'>-	unsigned long int tmp;</div><div class='del'>-</div><div class='del'>-	if (streq(ip_addr, "") || !inet_aton(ip_addr, &amp;addr))</div><div class='del'>-		return "";</div><div class='del'>-</div><div class='del'>-	log_message("guessing netmask");</div><div class='del'>-</div><div class='del'>-	tmp = ntohl(addr.s_addr);</div><div class='del'>-	</div><div class='del'>-	if (((tmp &amp; 0xFF000000) &gt;&gt; 24) &lt;= 127)</div><div class='del'>-		return "255.0.0.0";</div><div class='del'>-	else if (((tmp &amp; 0xFF000000) &gt;&gt; 24) &lt;= 191)</div><div class='del'>-		return "255.255.0.0";</div><div class='del'>-	else </div><div class='del'>-		return "255.255.255.0";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void static_ip_callback(char ** strings)</div><div class='del'>-{</div><div class='del'>-	struct in_addr addr;</div><div class='del'>-</div><div class='del'>-	if (!inet_aton(strings[0], &amp;addr))</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	if (!strcmp(strings[1], "")) {</div><div class='del'>-		char * ptr;</div><div class='del'>-		strings[1] = strdup(strings[0]);</div><div class='del'>-		ptr = strrchr(strings[1], '.');</div><div class='del'>-		if (ptr)</div><div class='del'>-			*(ptr+1) = '\0';</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!strcmp(strings[2], ""))</div><div class='del'>-		strings[2] = strdup(strings[1]);</div><div class='del'>-</div><div class='del'>-	if (!strcmp(strings[3], ""))</div><div class='del'>-		strings[3] = strdup(guess_netmask(strings[0]));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type setup_network_interface(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	enum return_type results;</div><div class='del'>-	char * bootprotos[] = { "Static", "DHCP", "ADSL", NULL };</div><div class='del'>-	char * bootprotos_auto[] = { "static", "dhcp", "adsl" };</div><div class='del'>-	char * choice;</div><div class='del'>-</div><div class='del'>-	results = ask_from_list_auto("Please choose the desired IP attribution.", bootprotos, &amp;choice, "network", bootprotos_auto);</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	if (!strcmp(choice, "Static")) {</div><div class='del'>-		char * questions[] = { "IP of this machine", "IP of DNS", "IP of default gateway", "Netmask", NULL };</div><div class='del'>-		char * questions_auto[] = { "ip", "dns", "gateway", "netmask" };</div><div class='del'>-		static char ** answers = NULL;</div><div class='del'>-		struct in_addr addr;</div><div class='del'>-</div><div class='del'>-		results = ask_from_entries_auto("Please enter the network information. (leave netmask blank for Internet standard)",</div><div class='del'>-						questions, &amp;answers, 16, questions_auto, static_ip_callback);</div><div class='del'>-		if (results != RETURN_OK)</div><div class='del'>-			return setup_network_interface(intf);</div><div class='del'>-</div><div class='del'>-		if (streq(answers[0], "") || !inet_aton(answers[0], &amp;addr)) {</div><div class='del'>-			stg1_error_message("Invalid IP address.");</div><div class='del'>-			return setup_network_interface(intf);</div><div class='del'>-		}</div><div class='del'>-		memcpy(&amp;intf-&gt;ip, &amp;addr, sizeof(addr));</div><div class='del'>-</div><div class='del'>-		if (!inet_aton(answers[1], &amp;dns_server)) {</div><div class='del'>-			log_message("invalid DNS");</div><div class='del'>-			dns_server.s_addr = 0; /* keep an understandable state */</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (!inet_aton(answers[2], &amp;gateway)) {</div><div class='del'>-			log_message("invalid gateway");</div><div class='del'>-			gateway.s_addr = 0; /* keep an understandable state */</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if ((streq(answers[3], "") &amp;&amp; inet_aton(guess_netmask(answers[0]), &amp;addr))</div><div class='del'>-		    || inet_aton(answers[3], &amp;addr))</div><div class='del'>-			memcpy(&amp;intf-&gt;netmask, &amp;addr, sizeof(addr));</div><div class='del'>-		else {</div><div class='del'>-			stg1_error_message("Invalid netmask.");</div><div class='del'>-			return setup_network_interface(intf);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		*((uint32_t *) &amp;intf-&gt;broadcast) = (*((uint32_t *) &amp;intf-&gt;ip) &amp;</div><div class='del'>-						    *((uint32_t *) &amp;intf-&gt;netmask)) | ~(*((uint32_t *) &amp;intf-&gt;netmask));</div><div class='del'>-</div><div class='del'>-		inet_aton("255.255.255.255", &amp;addr);</div><div class='del'>-		if (!memcmp(&amp;addr, &amp;intf-&gt;netmask, sizeof(addr))) {</div><div class='del'>-			log_message("netmask is 255.255.255.255 -&gt; point to point device");</div><div class='del'>-			intf-&gt;network = gateway;</div><div class='del'>-			intf-&gt;is_ptp = 1;</div><div class='del'>-		} else {</div><div class='del'>-			*((uint32_t *) &amp;intf-&gt;network) = *((uint32_t *) &amp;intf-&gt;ip) &amp; *((uint32_t *) &amp;intf-&gt;netmask);</div><div class='del'>-			intf-&gt;is_ptp = 0;</div><div class='del'>-		}</div><div class='del'>-		intf-&gt;boot_proto = BOOTPROTO_STATIC;</div><div class='del'>-</div><div class='del'>-		if (configure_net_device(intf))</div><div class='del'>-			return RETURN_ERROR;</div><div class='del'>-</div><div class='del'>-	} else if (streq(choice, "DHCP")) {</div><div class='del'>-		results = perform_dhcp(intf);</div><div class='del'>-</div><div class='del'>-		if (results == RETURN_BACK)</div><div class='del'>-			return setup_network_interface(intf);</div><div class='del'>-		if (results == RETURN_ERROR)</div><div class='del'>-			return results;</div><div class='del'>-		intf-&gt;boot_proto = BOOTPROTO_DHCP;</div><div class='del'>-</div><div class='del'>-		if (configure_net_device(intf))</div><div class='del'>-			return RETURN_ERROR;</div><div class='del'>-</div><div class='del'>-	} else if (streq(choice, "ADSL")) {</div><div class='del'>-		results = perform_adsl(intf);</div><div class='del'>-</div><div class='del'>-		if (results == RETURN_BACK)</div><div class='del'>-			return setup_network_interface(intf);</div><div class='del'>-		if (results == RETURN_ERROR)</div><div class='del'>-			return results;</div><div class='del'>-	} else</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	</div><div class='del'>-	return add_default_route();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type configure_network(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	char * dnshostname;</div><div class='del'>-</div><div class='del'>-	if (hostname &amp;&amp; domain)</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-</div><div class='del'>-	dnshostname = mygethostbyaddr(inet_ntoa(intf-&gt;ip));</div><div class='del'>-</div><div class='del'>-	if (dnshostname) {</div><div class='del'>-		hostname = strdup(dnshostname);</div><div class='del'>-		domain = strchr(strdup(hostname), '.') + 1;</div><div class='del'>-		log_message("got hostname and domain from dns entry, %s and %s", hostname, domain);</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	log_message("reverse name lookup on self failed");</div><div class='del'>-</div><div class='del'>-	if (domain)</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-</div><div class='del'>-	if (dns_server.s_addr != 0) {</div><div class='del'>-		wait_message("Trying to resolve dns...");</div><div class='del'>-		dnshostname = mygethostbyaddr(inet_ntoa(dns_server));</div><div class='del'>-		remove_wait_message();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (dnshostname) {</div><div class='del'>-		domain = strchr(strdup(dnshostname), '.') + 1;</div><div class='del'>-		log_message("got domain from DNS fullname, %s", domain);</div><div class='del'>-	} else {</div><div class='del'>-		enum return_type results;</div><div class='del'>-		char * questions[] = { "Host name", "Domain name", NULL };</div><div class='del'>-		char * questions_auto[] = { "hostname", "domain" };</div><div class='del'>-		static char ** answers = NULL;</div><div class='del'>-		char * boulet;</div><div class='del'>-		</div><div class='del'>-		log_message("reverse name lookup on DNS failed");</div><div class='del'>-		</div><div class='del'>-		results = ask_from_entries_auto("I could not guess hostname and domain name; please fill in this information. "</div><div class='del'>-						"Valid answers are for example: `mybox' for hostname and `mynetwork.com' for "</div><div class='del'>-						"domain name, for a machine called `mybox.mynetwork.com' on the Internet.",</div><div class='del'>-						questions, &amp;answers, 32, questions_auto, NULL);</div><div class='del'>-		if (results != RETURN_OK)</div><div class='del'>-			return results;</div><div class='del'>-		</div><div class='del'>-		hostname = answers[0];</div><div class='del'>-		if ((boulet = strchr(hostname, '.')) != NULL)</div><div class='del'>-			boulet[0] = '\0';</div><div class='del'>-		domain = answers[1];</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type bringup_networking(struct interface_info * intf)</div><div class='del'>-{</div><div class='del'>-	static struct interface_info loopback;</div><div class='del'>-	enum return_type results = RETURN_ERROR;</div><div class='del'>-	</div><div class='del'>-	my_insmod("af_packet", ANY_DRIVER_TYPE, NULL);</div><div class='del'>-</div><div class='del'>-	while (results != RETURN_OK) {</div><div class='del'>-		results = setup_network_interface(intf);</div><div class='del'>-		if (results != RETURN_OK)</div><div class='del'>-			return results;</div><div class='del'>-		write_resolvconf();</div><div class='del'>-		results = configure_network(intf);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	write_resolvconf(); /* maybe we have now domain to write also */</div><div class='del'>-</div><div class='del'>-	if (loopback.is_up == 0) {</div><div class='del'>-		int rc;</div><div class='del'>-		strcpy(loopback.device, "lo");</div><div class='del'>-		loopback.is_ptp = 0;</div><div class='del'>-		loopback.is_up = 0;</div><div class='del'>-		loopback.ip.s_addr = htonl(0x7f000001);</div><div class='del'>-		loopback.netmask.s_addr = htonl(0xff000000);</div><div class='del'>-		loopback.broadcast.s_addr = htonl(0x7fffffff);</div><div class='del'>-		loopback.network.s_addr = htonl(0x7f000000);</div><div class='del'>-		rc = configure_net_device(&amp;loopback);</div><div class='del'>-		if (rc)</div><div class='del'>-			return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static char * interface_select(void)</div><div class='del'>-{</div><div class='del'>-	char ** interfaces, ** ptr;</div><div class='del'>-	char * descriptions[50];</div><div class='del'>-	char * choice;</div><div class='del'>-	int i, count = 0;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	interfaces = get_net_devices();</div><div class='del'>-</div><div class='del'>-	ptr = interfaces;</div><div class='del'>-	while (ptr &amp;&amp; *ptr) {</div><div class='del'>-		count++;</div><div class='del'>-		ptr++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count == 0) {</div><div class='del'>-		stg1_error_message("No NET device found.\n"</div><div class='del'>-				   "Hint: if you're using a Laptop, note that PCMCIA Network adapters are now supported either with `pcmcia.img' or `network.img', please try both these bootdisks.");</div><div class='del'>-		i = ask_insmod(NETWORK_DEVICES);</div><div class='del'>-		if (i == RETURN_BACK)</div><div class='del'>-			return NULL;</div><div class='del'>-		return interface_select();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count == 1)</div><div class='del'>-		return *interfaces;</div><div class='del'>-</div><div class='del'>-	i = 0;</div><div class='del'>-	while (interfaces[i]) {</div><div class='del'>-		descriptions[i] = get_net_intf_description(interfaces[i]);</div><div class='del'>-		i++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = ask_from_list_comments_auto("Please choose the NET device to use for the installation.",</div><div class='del'>-					      interfaces, descriptions, &amp;choice, "interface", interfaces);</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return NULL;</div><div class='del'>-</div><div class='del'>-	return choice;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* -=-=-- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static enum return_type intf_select_and_up(void)</div><div class='del'>-{</div><div class='del'>-	static struct interface_info intf[20];</div><div class='del'>-	static int num_interfaces = 0;</div><div class='del'>-	struct interface_info * sel_intf = NULL;</div><div class='del'>-	int i;</div><div class='del'>-	enum return_type results;</div><div class='del'>-	char * iface = interface_select();</div><div class='del'>-	</div><div class='del'>-	if (iface == NULL)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-	</div><div class='del'>-	for (i = 0; i &lt; num_interfaces ; i++)</div><div class='del'>-		if (!strcmp(intf[i].device, iface))</div><div class='del'>-			sel_intf = &amp;(intf[i]);</div><div class='del'>-	</div><div class='del'>-	if (sel_intf == NULL) {</div><div class='del'>-		sel_intf = &amp;(intf[num_interfaces]);</div><div class='del'>-		strcpy(sel_intf-&gt;device, iface);</div><div class='del'>-		sel_intf-&gt;is_up = 0;</div><div class='del'>-		num_interfaces++;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	results = bringup_networking(sel_intf);</div><div class='del'>-</div><div class='del'>-	if (results == RETURN_OK)</div><div class='del'>-		save_netinfo(sel_intf);</div><div class='del'>-	</div><div class='del'>-	return results;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type nfs_prepare(void)</div><div class='del'>-{</div><div class='del'>-	char * questions[] = { "NFS server name", DISTRIB_NAME " directory", NULL };</div><div class='del'>-	char * questions_auto[] = { "server", "directory", NULL };</div><div class='del'>-	static char ** answers = NULL;</div><div class='del'>-	char * nfsmount_location;</div><div class='del'>-	enum return_type results = intf_select_and_up();</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-		results = ask_from_entries_auto("Please enter the name or IP address of your NFS server, "</div><div class='del'>-						"and the directory containing the " DISTRIB_NAME " Distribution.",</div><div class='del'>-						questions, &amp;answers, 40, questions_auto, NULL);</div><div class='del'>-		if (results != RETURN_OK || streq(answers[0], "")) {</div><div class='del'>-			unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-			return nfs_prepare();</div><div class='del'>-		}</div><div class='del'>-		</div><div class='del'>-		nfsmount_location = malloc(strlen(answers[0]) + strlen(answers[1]) + 2);</div><div class='del'>-		strcpy(nfsmount_location, answers[0]);</div><div class='del'>-		strcat(nfsmount_location, ":");</div><div class='del'>-		strcat(nfsmount_location, answers[1]);</div><div class='del'>-		</div><div class='del'>-		if (my_mount(nfsmount_location, IMAGE_LOCATION, "nfs", 0) == -1) {</div><div class='del'>-			stg1_error_message("I can't mount the directory from the NFS server.");</div><div class='del'>-			results = RETURN_BACK;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (access(IMAGE_LOCATION LIVE_LOCATION, R_OK)) {</div><div class='del'>-			stg1_error_message("That NFS volume does not seem to contain the " DISTRIB_NAME " Distribution.");</div><div class='del'>-			umount(IMAGE_LOCATION);</div><div class='del'>-			results = RETURN_BACK;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	while (results == RETURN_BACK);</div><div class='del'>-</div><div class='del'>-	log_message("found the " DISTRIB_NAME " Installation, good news!");</div><div class='del'>-</div><div class='del'>-	if (IS_SPECIAL_STAGE2) {</div><div class='del'>-		if (load_ramdisk() != RETURN_OK) {</div><div class='del'>-			stg1_error_message("Could not load program into memory.");</div><div class='del'>-			return nfs_prepare();</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (IS_RESCUE)</div><div class='del'>-		umount(IMAGE_LOCATION);</div><div class='del'>-</div><div class='del'>-	method_name = strdup("nfs");</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ftp_prepare(void)</div><div class='del'>-{</div><div class='del'>-	char * questions[] = { "FTP server", DISTRIB_NAME " directory", "Login", "Password", NULL };</div><div class='del'>-	char * questions_auto[] = { "server", "directory", "user", "pass", NULL };</div><div class='del'>-	static char ** answers = NULL;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	if (!ramdisk_possible()) {</div><div class='del'>-		stg1_error_message("FTP install needs more than %d Mbytes of memory (detected %d Mbytes).",</div><div class='del'>-			      MEM_LIMIT_RAMDISK, total_memory());</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = intf_select_and_up();</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-		char location_full[500];</div><div class='del'>-		int ftp_serv_response;</div><div class='del'>-		int fd, size;</div><div class='del'>-</div><div class='del'>-		results = ask_from_entries_auto("Please enter the name or IP address of the FTP server, "</div><div class='del'>-						"the directory containing the " DISTRIB_NAME " Distribution, "</div><div class='del'>-						"and the login/pass if necessary (leave login blank for anonymous).",</div><div class='del'>-						questions, &amp;answers, 40, questions_auto, NULL);</div><div class='del'>-		if (results != RETURN_OK || streq(answers[0], "")) {</div><div class='del'>-			unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-			return ftp_prepare();</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		log_message("FTP: trying to connect to %s", answers[0]);</div><div class='del'>-</div><div class='del'>-		ftp_serv_response = ftp_open_connection(answers[0], answers[2], answers[3], "");</div><div class='del'>-		if (ftp_serv_response &lt; 0) {</div><div class='del'>-			log_message("FTP: error connect %d", ftp_serv_response);</div><div class='del'>-			if (ftp_serv_response == FTPERR_BAD_HOSTNAME)</div><div class='del'>-				stg1_error_message("Error: bad hostname.");</div><div class='del'>-			else if (ftp_serv_response == FTPERR_FAILED_CONNECT)</div><div class='del'>-				stg1_error_message("Error: failed to connect to remote host.");</div><div class='del'>-			else</div><div class='del'>-				stg1_error_message("Error: couldn't connect.");</div><div class='del'>-			results = RETURN_BACK;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-		strcpy(location_full, answers[1]);</div><div class='del'>-		strcat(location_full, get_ramdisk_realname());</div><div class='del'>-</div><div class='del'>-		log_message("FTP: trying to retrieve %s", location_full);</div><div class='del'>-</div><div class='del'>-		fd = ftp_start_download(ftp_serv_response, location_full, &amp;size);</div><div class='del'>-		if (fd &lt; 0) {</div><div class='del'>-			log_message("FTP: error get %d", fd);</div><div class='del'>-			if (fd == FTPERR_PASSIVE_ERROR)</div><div class='del'>-				stg1_error_message("Error: error with passive connection.");</div><div class='del'>-			else if (fd == FTPERR_FILE_NOT_FOUND)</div><div class='del'>-				stg1_error_message("Error: file not found (%s).", location_full);</div><div class='del'>-			else if (fd == FTPERR_BAD_SERVER_RESPONSE)</div><div class='del'>-				stg1_error_message("Error: bad server response (server too busy?).");</div><div class='del'>-			else</div><div class='del'>-				stg1_error_message("Error: couldn't retrieve Installation program.");</div><div class='del'>-			results = RETURN_BACK;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		log_message("FTP: size of download %d bytes", size);</div><div class='del'>-		</div><div class='del'>-		results = load_ramdisk_fd(fd, size);</div><div class='del'>-		if (results == RETURN_OK)</div><div class='del'>-			ftp_end_data_command(ftp_serv_response);</div><div class='del'>-		else</div><div class='del'>-			return results;</div><div class='del'>-</div><div class='del'>-		method_name = strdup("ftp");</div><div class='del'>-		add_to_env("HOST", answers[0]);</div><div class='del'>-		add_to_env("PREFIX", answers[1]);</div><div class='del'>-		if (strcmp(answers[2], "")) {</div><div class='del'>-			add_to_env("LOGIN", answers[2]);</div><div class='del'>-			add_to_env("PASSWORD", answers[3]);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	while (results == RETURN_BACK);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-enum return_type http_prepare(void)</div><div class='del'>-{</div><div class='del'>-	char * questions[] = { "HTTP server", DISTRIB_NAME " directory", NULL };</div><div class='del'>-	char * questions_auto[] = { "server", "directory", NULL };</div><div class='del'>-	static char ** answers = NULL;</div><div class='del'>-	enum return_type results;</div><div class='del'>-</div><div class='del'>-	if (!ramdisk_possible()) {</div><div class='del'>-		stg1_error_message("HTTP install needs more than %d Mbytes of memory (detected %d Mbytes).",</div><div class='del'>-			      MEM_LIMIT_RAMDISK, total_memory());</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	results = intf_select_and_up();</div><div class='del'>-</div><div class='del'>-	if (results != RETURN_OK)</div><div class='del'>-		return results;</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-		char location_full[500];</div><div class='del'>-		int fd, size;</div><div class='del'>-</div><div class='del'>-		results = ask_from_entries_auto("Please enter the name or IP address of the HTTP server, "</div><div class='del'>-						"and the directory containing the " DISTRIB_NAME " Distribution.",</div><div class='del'>-						questions, &amp;answers, 40, questions_auto, NULL);</div><div class='del'>-		if (results != RETURN_OK || streq(answers[0], "")) {</div><div class='del'>-			unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */</div><div class='del'>-			return http_prepare();</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		strcpy(location_full, answers[1]);</div><div class='del'>-		strcat(location_full, get_ramdisk_realname());</div><div class='del'>-</div><div class='del'>-		log_message("HTTP: trying to retrieve %s from %s", location_full, answers[0]);</div><div class='del'>-		</div><div class='del'>-		fd = http_download_file(answers[0], location_full, &amp;size);</div><div class='del'>-		if (fd &lt; 0) {</div><div class='del'>-			log_message("HTTP: error %d", fd);</div><div class='del'>-			if (fd == FTPERR_FAILED_CONNECT)</div><div class='del'>-				stg1_error_message("Error: couldn't connect to server.");</div><div class='del'>-			else</div><div class='del'>-				stg1_error_message("Error: couldn't get file (%s).", location_full);</div><div class='del'>-			results = RETURN_BACK;</div><div class='del'>-			continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		log_message("HTTP: size of download %d bytes", size);</div><div class='del'>-		</div><div class='del'>-		if (load_ramdisk_fd(fd, size) != RETURN_OK)</div><div class='del'>-			return RETURN_ERROR;</div><div class='del'>-</div><div class='del'>-		method_name = strdup("http");</div><div class='del'>-		sprintf(location_full, "http://%s%s", answers[0], answers[1]);</div><div class='del'>-		add_to_env("URLPREFIX", location_full);</div><div class='del'>-	}</div><div class='del'>-	while (results == RETURN_BACK);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/network.h b/mdk-stage1/network.h<br/>deleted file mode 100644<br/>index 02eea45b6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/network.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/network.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,61 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _NETWORK_H_</div><div class='del'>-#define _NETWORK_H_</div><div class='del'>-</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netinet/ip.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type nfs_prepare(void);</div><div class='del'>-enum return_type ftp_prepare(void);</div><div class='del'>-enum return_type http_prepare(void);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum boot_proto_type { BOOTPROTO_STATIC, BOOTPROTO_DHCP, BOOTPROTO_ADSL_PPPOE };</div><div class='del'>-</div><div class='del'>-/* all of these in_addr things are in network byte order! */</div><div class='del'>-struct interface_info {</div><div class='del'>-	char device[10];</div><div class='del'>-	int is_ptp, is_up;</div><div class='del'>-	struct in_addr ip, netmask, broadcast, network;</div><div class='del'>-	enum boot_proto_type boot_proto;</div><div class='del'>-	char *user, *pass; /* for ADSL connection */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* these are to be used only by dhcp.c */</div><div class='del'>-</div><div class='del'>-char * guess_netmask(char * ip_addr);</div><div class='del'>-</div><div class='del'>-int configure_net_device(struct interface_info * intf);</div><div class='del'>-</div><div class='del'>-extern char * hostname;</div><div class='del'>-extern char * domain;</div><div class='del'>-extern struct in_addr gateway;</div><div class='del'>-extern struct in_addr dns_server;</div><div class='del'>-extern struct in_addr dns_server2;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c<br/>deleted file mode 100644<br/>index 9d14dfc84..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt-frontend.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt-frontend.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,406 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Portions from Erik Troan (ewt@redhat.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 1996 Red Hat Software </div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Each different frontend must implement all functions defined in frontend.h</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include "newt/newt.h"</div><div class='del'>-</div><div class='del'>-#include &lt;probing.h&gt;</div><div class='del'>-</div><div class='del'>-#include "frontend.h"</div><div class='del'>-</div><div class='del'>-void init_frontend(char * welcome_msg)</div><div class='del'>-{</div><div class='del'>-	int i;</div><div class='del'>-	for (i=0; i&lt;38; i++) printf("\n");</div><div class='del'>-	newtInit();</div><div class='del'>-	newtCls();</div><div class='del'>-	</div><div class='del'>-	newtDrawRootText(0, 0, welcome_msg);</div><div class='del'>-	</div><div class='del'>-	newtPushHelpLine(" &lt;Alt-F1&gt; for here, &lt;Alt-F3&gt; to see the logs, &lt;Alt-F4&gt; for kernel msg");</div><div class='del'>-	newtRefresh();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void finish_frontend(void)</div><div class='del'>-{</div><div class='del'>-	newtFinished();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void verror_message(char *msg, va_list ap)</div><div class='del'>-{</div><div class='del'>-	newtWinMessagev("Error", "Ok", msg, ap);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void vinfo_message(char *msg, va_list ap)</div><div class='del'>-{</div><div class='del'>-	newtWinMessagev("Notice", "Ok", msg, ap);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void vwait_message(char *msg, va_list ap)</div><div class='del'>-{</div><div class='del'>-	int width, height;</div><div class='del'>-	char * title = "Please wait...";</div><div class='del'>-	newtComponent c, f;</div><div class='del'>-	newtGrid grid;</div><div class='del'>-	char * buf = NULL;</div><div class='del'>-	char * flowed;</div><div class='del'>-	int size = 0;</div><div class='del'>-	int i = 0;</div><div class='del'>-	</div><div class='del'>-	do {</div><div class='del'>-		size += 1000;</div><div class='del'>-		if (buf) free(buf);</div><div class='del'>-		buf = malloc(size);</div><div class='del'>-		i = vsnprintf(buf, size, msg, ap);</div><div class='del'>-	} while (i &gt;= size || i == -1);</div><div class='del'>-</div><div class='del'>-	flowed = newtReflowText(buf, 60, 5, 5, &amp;width, &amp;height);</div><div class='del'>-	</div><div class='del'>-	c = newtTextbox(-1, -1, width, height, NEWT_TEXTBOX_WRAP);</div><div class='del'>-	newtTextboxSetText(c, flowed);</div><div class='del'>-</div><div class='del'>-	grid = newtCreateGrid(1, 1);</div><div class='del'>-	newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, c, 0, 0, 0, 0, 0, 0);</div><div class='del'>-	newtGridWrappedWindow(grid, title);</div><div class='del'>-</div><div class='del'>-	free(flowed);</div><div class='del'>-	free(buf);</div><div class='del'>-</div><div class='del'>-	f = newtForm(NULL, NULL, 0);</div><div class='del'>-	newtFormAddComponent(f, c);</div><div class='del'>-</div><div class='del'>-	newtDrawForm(f);</div><div class='del'>-	newtRefresh();</div><div class='del'>-	newtFormDestroy(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void remove_wait_message(void)</div><div class='del'>-{</div><div class='del'>-	newtPopWindow();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static newtComponent form = NULL, scale = NULL;</div><div class='del'>-static int size_progress;</div><div class='del'>-static int actually_drawn;</div><div class='del'>-static char * msg_progress;</div><div class='del'>-</div><div class='del'>-void init_progression(char *msg, int size)</div><div class='del'>-{</div><div class='del'>-	size_progress = size;</div><div class='del'>-	if (size) {</div><div class='del'>-		actually_drawn = 0;</div><div class='del'>-		newtCenteredWindow(70, 5, "Please wait...");</div><div class='del'>-		form = newtForm(NULL, NULL, 0);</div><div class='del'>-		newtFormAddComponent(form, newtLabel(1, 1, msg));</div><div class='del'>-		scale = newtScale(1, 3, 68, size);</div><div class='del'>-		newtFormAddComponent(form, scale);</div><div class='del'>-		newtDrawForm(form);</div><div class='del'>-		newtRefresh();</div><div class='del'>-	}</div><div class='del'>-	else {</div><div class='del'>-		wait_message(msg);</div><div class='del'>-		msg_progress = msg;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void update_progression(int current_size)</div><div class='del'>-{</div><div class='del'>-	if (size_progress) {</div><div class='del'>-		if (current_size &lt;= size_progress)</div><div class='del'>-			newtScaleSet(scale, current_size);</div><div class='del'>-		newtRefresh();</div><div class='del'>-	}</div><div class='del'>-	else {</div><div class='del'>-		struct timeval t;</div><div class='del'>-		int time;</div><div class='del'>-		static int last_time = -1;</div><div class='del'>-		gettimeofday(&amp;t, NULL);</div><div class='del'>-		time = t.tv_sec*3 + t.tv_usec/300000;</div><div class='del'>-		if (time != last_time) {</div><div class='del'>-			char msg_prog_final[500];</div><div class='del'>-			sprintf(msg_prog_final, "%s (%d bytes read) ", msg_progress, current_size);</div><div class='del'>-			remove_wait_message();</div><div class='del'>-			wait_message(msg_prog_final);</div><div class='del'>-		}</div><div class='del'>-		last_time = time;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void end_progression(void)</div><div class='del'>-{</div><div class='del'>-	if (size_progress) {</div><div class='del'>-		newtPopWindow();</div><div class='del'>-		newtFormDestroy(form);</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-		remove_wait_message();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice)</div><div class='del'>-{</div><div class='del'>-	char * items[500];</div><div class='del'>-	int answer = 0, rc;</div><div class='del'>-	char ** sav_elems = elems;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-</div><div class='del'>-	i = 0;</div><div class='del'>-	while (elems &amp;&amp; *elems) {</div><div class='del'>-		int j = (*elems_comments) ? strlen(*elems_comments) : 0;</div><div class='del'>-		items[i] = malloc(sizeof(char) * (strlen(*elems) + j + 4));</div><div class='del'>-		strcpy(items[i], *elems);</div><div class='del'>-		if (*elems_comments) {</div><div class='del'>-			strcat(items[i], " (");</div><div class='del'>-			strcat(items[i], *elems_comments);</div><div class='del'>-			strcat(items[i], ")");</div><div class='del'>-		}</div><div class='del'>-		elems_comments++;</div><div class='del'>-		i++;</div><div class='del'>-		elems++;</div><div class='del'>-	}</div><div class='del'>-	items[i] = NULL;</div><div class='del'>-</div><div class='del'>-	rc = newtWinMenu("Please choose...", msg, 52, 5, 5, 7, items, &amp;answer, "Ok", "Cancel", NULL);</div><div class='del'>-</div><div class='del'>-	if (rc == 2)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-</div><div class='del'>-	*choice = strdup(sav_elems[answer]);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_list(char *msg, char ** elems, char ** choice)</div><div class='del'>-{</div><div class='del'>-	int answer = 0, rc;</div><div class='del'>-</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-</div><div class='del'>-	rc = newtWinMenu("Please choose...", msg, 52, 5, 5, 7, elems, &amp;answer, "Ok", "Cancel", NULL);</div><div class='del'>-</div><div class='del'>-	if (rc == 2)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-</div><div class='del'>-	*choice = strdup(elems[answer]);</div><div class='del'>-</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_yes_no(char *msg)</div><div class='del'>-{</div><div class='del'>-	int rc;</div><div class='del'>-</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-</div><div class='del'>-	rc = newtWinTernary("Please answer...", "Yes", "No", "Back", msg);</div><div class='del'>-</div><div class='del'>-	if (rc == 1)</div><div class='del'>-		return RETURN_OK;</div><div class='del'>-	else if (rc == 3)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-	else return RETURN_ERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void (*callback_real_function)(char ** strings) = NULL;</div><div class='del'>-</div><div class='del'>-static void default_callback(newtComponent co __attribute__ ((unused)), void * data)</div><div class='del'>-{</div><div class='del'>-	newtComponent * entries = data;</div><div class='del'>-	char * strings[50], ** ptr;</div><div class='del'>-</div><div class='del'>-	if (!callback_real_function)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	ptr = strings;</div><div class='del'>-	while (entries &amp;&amp; *entries) {</div><div class='del'>-		*ptr = newtEntryGetValue(*entries);</div><div class='del'>-		entries++;</div><div class='del'>-		ptr++;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	callback_real_function(strings);</div><div class='del'>-</div><div class='del'>-	ptr = strings;</div><div class='del'>-	entries = data;</div><div class='del'>-	while (entries &amp;&amp; *entries) {</div><div class='del'>-		newtEntrySet(*entries, strdup(*ptr), 1);</div><div class='del'>-		entries++;</div><div class='del'>-		ptr++;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* only supports up to 50 buttons and entries -- shucks! */</div><div class='del'>-static int mynewtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, </div><div class='del'>-			    int flexUp, int dataWidth, void (*callback_func)(char ** strings),</div><div class='del'>-			    struct newtWinEntry * items, char * button1, ...) {</div><div class='del'>-	newtComponent buttons[50], result, form, textw;</div><div class='del'>-	newtGrid grid, buttonBar, subgrid;</div><div class='del'>-	int numItems;</div><div class='del'>-	int rc, i;</div><div class='del'>-	int numButtons;</div><div class='del'>-	char * buttonName;</div><div class='del'>-	newtComponent entries[50];</div><div class='del'>-</div><div class='del'>-	va_list args;</div><div class='del'>-	</div><div class='del'>-	textw = newtTextboxReflowed(-1, -1, text, suggestedWidth, flexDown,</div><div class='del'>-				    flexUp, 0);</div><div class='del'>-	</div><div class='del'>-	for (numItems = 0; items[numItems].text; numItems++); </div><div class='del'>-	</div><div class='del'>-	buttonName = button1, numButtons = 0;</div><div class='del'>-	va_start(args, button1);</div><div class='del'>-	while (buttonName) {</div><div class='del'>-		buttons[numButtons] = newtButton(-1, -1, buttonName);</div><div class='del'>-		numButtons++;</div><div class='del'>-		buttonName = va_arg(args, char *);</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	va_end(args);</div><div class='del'>-	</div><div class='del'>-	buttonBar = newtCreateGrid(numButtons, 1);</div><div class='del'>-	for (i = 0; i &lt; numButtons; i++) {</div><div class='del'>-		newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, </div><div class='del'>-				 buttons[i],</div><div class='del'>-				 i ? 1 : 0, 0, 0, 0, 0, 0);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (callback_func) {</div><div class='del'>-		callback_real_function = callback_func;</div><div class='del'>-		entries[numItems] = NULL;</div><div class='del'>-	}</div><div class='del'>-	else</div><div class='del'>-		callback_real_function = NULL;</div><div class='del'>-	</div><div class='del'>-	subgrid = newtCreateGrid(2, numItems);</div><div class='del'>-	for (i = 0; i &lt; numItems; i++) {</div><div class='del'>-		newtComponent entr = newtEntry(-1, -1, items[i].value ? </div><div class='del'>-					       *items[i].value : NULL, dataWidth,</div><div class='del'>-					       items[i].value, items[i].flags);</div><div class='del'>-</div><div class='del'>-		newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,</div><div class='del'>-				 newtLabel(-1, -1, items[i].text),</div><div class='del'>-				 0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-		newtGridSetField(subgrid, 1, i, NEWT_GRID_COMPONENT,</div><div class='del'>-				 entr,</div><div class='del'>-				 1, 0, 0, 0, 0, 0);</div><div class='del'>-		if (callback_func) {</div><div class='del'>-			entries[i] = entr;</div><div class='del'>-			newtComponentAddCallback(entr, default_callback, entries);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	</div><div class='del'>-	grid = newtCreateGrid(1, 3);</div><div class='del'>-	form = newtForm(NULL, 0, 0);</div><div class='del'>-	newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, textw, </div><div class='del'>-			 0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-	newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, subgrid, </div><div class='del'>-			 0, 1, 0, 0, 0, 0);</div><div class='del'>-	newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttonBar, </div><div class='del'>-			 0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);</div><div class='del'>-	newtGridAddComponentsToForm(grid, form, 1);</div><div class='del'>-	newtGridWrappedWindow(grid, title);</div><div class='del'>-	newtGridFree(grid, 1);</div><div class='del'>-	</div><div class='del'>-	result = newtRunForm(form);</div><div class='del'>-	</div><div class='del'>-	for (rc = 0; rc &lt; numItems; rc++)</div><div class='del'>-		*items[rc].value = strdup(*items[rc].value);</div><div class='del'>-	</div><div class='del'>-	for (rc = 0; result != buttons[rc] &amp;&amp; rc &lt; numButtons; rc++);</div><div class='del'>-	if (rc == numButtons) </div><div class='del'>-		rc = 0; /* F12 */</div><div class='del'>-	else </div><div class='del'>-		rc++;</div><div class='del'>-	</div><div class='del'>-	newtFormDestroy(form);</div><div class='del'>-	newtPopWindow();</div><div class='del'>-	</div><div class='del'>-	return rc;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-enum return_type ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size, void (*callback_func)(char ** strings))</div><div class='del'>-{</div><div class='del'>-	struct newtWinEntry entries[50];</div><div class='del'>-	int j, i = 0;</div><div class='del'>-	int rc;</div><div class='del'>-	char ** already_answers = NULL;</div><div class='del'>-</div><div class='del'>-	probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...</div><div class='del'>-</div><div class='del'>-	while (questions &amp;&amp; *questions) {</div><div class='del'>-		entries[i].text = *questions;</div><div class='del'>-		entries[i].flags = NEWT_FLAG_SCROLL | (!strcmp(*questions, "Password") ? NEWT_FLAG_PASSWORD : 0);</div><div class='del'>-		i++;</div><div class='del'>-		questions++;</div><div class='del'>-	}</div><div class='del'>-	entries[i].text = NULL;</div><div class='del'>-	entries[i].value = NULL;</div><div class='del'>-</div><div class='del'>-	if (*answers == NULL)</div><div class='del'>-		*answers = (char **) malloc(sizeof(char *) * i);</div><div class='del'>-	else</div><div class='del'>-		already_answers = *answers;</div><div class='del'>-</div><div class='del'>-	for (j = 0 ; j &lt; i ; j++) {</div><div class='del'>-		entries[j].value = &amp;((*answers)[j]);</div><div class='del'>-		if (already_answers &amp;&amp; *already_answers) {</div><div class='del'>-			*(entries[j].value) = *already_answers;</div><div class='del'>-			already_answers++;</div><div class='del'>-		} else</div><div class='del'>-			*(entries[j].value) = NULL;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	rc = mynewtWinEntries("Please fill in entries...", msg, 52, 5, 5, entry_size, callback_func, entries, "Ok", "Cancel", NULL); </div><div class='del'>-</div><div class='del'>-	if (rc == 3)</div><div class='del'>-		return RETURN_BACK;</div><div class='del'>-	if (rc != 1)</div><div class='del'>-		return RETURN_ERROR;</div><div class='del'>-	</div><div class='del'>-	return RETURN_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void suspend_to_console(void) { newtSuspend(); }</div><div class='del'>-void resume_from_suspend(void) { newtResume(); }</div><div class='head'>diff --git a/mdk-stage1/newt/Makefile b/mdk-stage1/newt/Makefile<br/>deleted file mode 100644<br/>index 171bcf0cb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,56 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-LIBNAME = libnewt</div><div class='del'>-</div><div class='del'>-OBJS = newt.o button.o form.o checkbox.o entry.o label.o listbox.o scrollbar.o textbox.o scale.o grid.o windows.o buttonbar.o checkboxtree.o</div><div class='del'>-</div><div class='del'>-DEFS = -DVERSION=\"0.50.19\"</div><div class='del'>-</div><div class='del'>-INCS = -I../slang</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-TARGETS = $(LIBNAME).a</div><div class='del'>-</div><div class='del'>-ifeq (DIETLIBC, $(L))</div><div class='del'>-TARGETS += $(LIBNAME)-DIET.a</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-all: $(TARGETS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a</div><div class='del'>-</div><div class='del'>-OBJS-DIET = $(subst .o,-DIET.o,$(OBJS))</div><div class='del'>-</div><div class='del'>-$(LIBNAME).a: $(OBJS)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-$(LIBNAME)-DIET.a: $(OBJS-DIET)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-$(OBJS): %.o: %.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(GLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(OBJS-DIET): %-DIET.o: %.c</div><div class='del'>-	gcc $(CFLAGS) $(DEFS) $(INCS) $(DIETLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/newt/button.c b/mdk-stage1/newt/button.c<br/>deleted file mode 100644<br/>index 1ff360dc5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/button.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/button.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,190 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct button {</div><div class='del'>-    char * text;</div><div class='del'>-    int compact;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void buttonDrawIt(newtComponent co, int active, int pushed);</div><div class='del'>-static void buttonDrawText(newtComponent co, int active, int pushed);</div><div class='del'>-</div><div class='del'>-static void buttonDraw(newtComponent c);</div><div class='del'>-static void buttonDestroy(newtComponent co);</div><div class='del'>-static struct eventResult buttonEvent(newtComponent c,</div><div class='del'>-				      struct event ev);</div><div class='del'>-static void buttonPlace(newtComponent co, int newLeft, int newTop);</div><div class='del'>-</div><div class='del'>-static struct componentOps buttonOps = {</div><div class='del'>-    buttonDraw,</div><div class='del'>-    buttonEvent,</div><div class='del'>-    buttonDestroy,</div><div class='del'>-    buttonPlace,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static newtComponent createButton(int left, int row, const char * text, int compact) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct button * bu;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    bu = malloc(sizeof(struct button));</div><div class='del'>-    co-&gt;data = bu;</div><div class='del'>-</div><div class='del'>-    bu-&gt;text = strdup(text);</div><div class='del'>-    bu-&gt;compact = compact;</div><div class='del'>-    co-&gt;ops = &amp;buttonOps;</div><div class='del'>-</div><div class='del'>-    if (bu-&gt;compact) {</div><div class='del'>-	co-&gt;height = 1;</div><div class='del'>-	co-&gt;width = strlen(text) + 3;</div><div class='del'>-    } else {</div><div class='del'>-	co-&gt;height = 4;</div><div class='del'>-	co-&gt;width = strlen(text) + 5;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    co-&gt;top = row;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;takesFocus = 1;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtCompactButton(int left, int row, const char * text) {</div><div class='del'>-    return createButton(left, row, text, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtButton(int left, int row, const char * text) {</div><div class='del'>-    return createButton(left, row, text, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buttonDestroy(newtComponent co) {</div><div class='del'>-    struct button * bu = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    free(bu-&gt;text);</div><div class='del'>-    free(bu);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buttonPlace(newtComponent co, int newLeft, int newTop) {</div><div class='del'>-    co-&gt;top = newTop;</div><div class='del'>-    co-&gt;left = newLeft;</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buttonDraw(newtComponent co) {</div><div class='del'>-    buttonDrawIt(co, 0, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buttonDrawIt(newtComponent co, int active, int pushed) {</div><div class='del'>-    struct button * bu = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return;</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_BUTTON);</div><div class='del'>-</div><div class='del'>-    if (bu-&gt;compact) {</div><div class='del'>-	if (active)</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_COMPACTBUTTON);</div><div class='del'>-	else</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_BUTTON);</div><div class='del'>-	newtGotorc(co-&gt;top+ pushed, co-&gt;left + 1 + pushed);</div><div class='del'>-	SLsmg_write_char('&lt;');</div><div class='del'>-	SLsmg_write_string(bu-&gt;text);</div><div class='del'>-	SLsmg_write_char('&gt;');</div><div class='del'>-    } else {</div><div class='del'>-	if (pushed) {</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_BUTTON);</div><div class='del'>-	    newtDrawBox(co-&gt;left + 1, co-&gt;top + 1, co-&gt;width - 1, 3, 0);</div><div class='del'>-</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_WINDOW);</div><div class='del'>-	    newtClearBox(co-&gt;left, co-&gt;top, co-&gt;width, 1);</div><div class='del'>-	    newtClearBox(co-&gt;left, co-&gt;top, 1, co-&gt;height);</div><div class='del'>-	} else {</div><div class='del'>-	    newtDrawBox(co-&gt;left, co-&gt;top, co-&gt;width - 1, 3, 1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	buttonDrawText(co, active, pushed);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buttonDrawText(newtComponent co, int active, int pushed) {</div><div class='del'>-    struct button * bu = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (pushed) pushed = 1;</div><div class='del'>-</div><div class='del'>-    if (active)</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_ACTBUTTON);</div><div class='del'>-    else</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_BUTTON);</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top + 1 + pushed, co-&gt;left + 1 + pushed);</div><div class='del'>-    SLsmg_write_char(' ');</div><div class='del'>-    SLsmg_write_string(bu-&gt;text);</div><div class='del'>-    SLsmg_write_char(' ');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult buttonEvent(newtComponent co,</div><div class='del'>-				      struct event ev) {</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    struct button * bu = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (ev.when == EV_NORMAL) {</div><div class='del'>-	switch (ev.event) {</div><div class='del'>-	  case EV_FOCUS:</div><div class='del'>-	    buttonDrawIt(co, 1, 0);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case EV_UNFOCUS:</div><div class='del'>-	    buttonDrawIt(co, 0, 0);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case EV_KEYPRESS:</div><div class='del'>-	    if (ev.u.key == ' ' || ev.u.key == '\r') {</div><div class='del'>-		if (!bu-&gt;compact) {</div><div class='del'>-		    /* look pushed */</div><div class='del'>-		    buttonDrawIt(co, 1, 1);</div><div class='del'>-		    newtRefresh();</div><div class='del'>-		    newtDelay(150000);</div><div class='del'>-		    buttonDrawIt(co, 1, 0);</div><div class='del'>-		    newtRefresh();</div><div class='del'>-		    newtDelay(150000);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		er.result = ER_EXITFORM;</div><div class='del'>-	    } else</div><div class='del'>-		er.result = ER_IGNORED;</div><div class='del'>-	    break;</div><div class='del'>-	  case EV_MOUSE:</div><div class='del'>-	      if (ev.u.mouse.type == MOUSE_BUTTON_DOWN &amp;&amp;</div><div class='del'>-		  co-&gt;top &lt;= ev.u.mouse.y &amp;&amp;</div><div class='del'>-		  co-&gt;top + co-&gt;height - !bu-&gt;compact &gt; ev.u.mouse.y &amp;&amp;</div><div class='del'>-		  co-&gt;left &lt;= ev.u.mouse.x &amp;&amp;</div><div class='del'>-		  co-&gt;left + co-&gt;width - !bu-&gt;compact &gt; ev.u.mouse.x) {</div><div class='del'>-		  if (!bu-&gt;compact) {</div><div class='del'>-		      buttonDrawIt(co, 1, 1);</div><div class='del'>-		      newtRefresh();</div><div class='del'>-		      newtDelay(150000);</div><div class='del'>-		      buttonDrawIt(co, 1, 0);</div><div class='del'>-		      newtRefresh();</div><div class='del'>-		      newtDelay(150000);</div><div class='del'>-		  }</div><div class='del'>-		  er.result = ER_EXITFORM;</div><div class='del'>-	      }</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    } else</div><div class='del'>-	er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/buttonbar.c b/mdk-stage1/newt/buttonbar.c<br/>deleted file mode 100644<br/>index 45473c9d2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/buttonbar.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/buttonbar.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-</div><div class='del'>-/* if they try and pack more then 50 buttons, screw 'em */</div><div class='del'>-newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args) {</div><div class='del'>-    newtGrid grid;</div><div class='del'>-    struct buttonInfo {</div><div class='del'>-	char * name;</div><div class='del'>-	newtComponent * compPtr;</div><div class='del'>-    } buttons[50];</div><div class='del'>-    int num;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    buttons[0].name = button1, buttons[0].compPtr = b1comp, num = 1;</div><div class='del'>-    while (1) {</div><div class='del'>-	buttons[num].name = va_arg(args, char *);</div><div class='del'>-	if (!buttons[num].name) break;</div><div class='del'>-	buttons[num].compPtr = va_arg(args, newtComponent *);</div><div class='del'>-	num++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(num, 1);</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; num; i++) {</div><div class='del'>-	*buttons[i].compPtr = newtButton(-1, -1, buttons[i].name);</div><div class='del'>-	newtGridSetField(grid, i, 0, NEWT_GRID_COMPONENT, </div><div class='del'>-			 *buttons[i].compPtr,</div><div class='del'>-			 num ? 1 : 0, 0, 0, 0, 0, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    va_start(args, b1comp);</div><div class='del'>-</div><div class='del'>-    grid = newtButtonBarv(button1, b1comp, args);</div><div class='del'>-</div><div class='del'>-    va_end(args);</div><div class='del'>- </div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/checkbox.c b/mdk-stage1/newt/checkbox.c<br/>deleted file mode 100644<br/>index eee514c98..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/checkbox.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/checkbox.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,290 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-enum type { CHECK, RADIO };</div><div class='del'>-</div><div class='del'>-struct checkbox {</div><div class='del'>-    char * text;</div><div class='del'>-    char * seq;</div><div class='del'>-    char * result;</div><div class='del'>-    newtComponent prevButton, lastButton;</div><div class='del'>-    enum type type;</div><div class='del'>-    char value;</div><div class='del'>-    int active, inactive;</div><div class='del'>-    const void * data;</div><div class='del'>-    int flags;</div><div class='del'>-    int hasFocus;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void makeActive(newtComponent co);</div><div class='del'>-</div><div class='del'>-static void cbDraw(newtComponent c);</div><div class='del'>-static void cbDestroy(newtComponent co);</div><div class='del'>-struct eventResult cbEvent(newtComponent co, struct event ev);</div><div class='del'>-</div><div class='del'>-static struct componentOps cbOps = {</div><div class='del'>-    cbDraw,</div><div class='del'>-    cbEvent,</div><div class='del'>-    cbDestroy,</div><div class='del'>-    newtDefaultPlaceHandler,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,</div><div class='del'>-			      newtComponent prevButton) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    newtComponent curr;</div><div class='del'>-    struct checkbox * rb;</div><div class='del'>-    char initialValue;</div><div class='del'>-</div><div class='del'>-    if (isDefault)</div><div class='del'>-	initialValue = '*';</div><div class='del'>-    else</div><div class='del'>-	initialValue = ' ';</div><div class='del'>-</div><div class='del'>-    co = newtCheckbox(left, top, text, initialValue, " *", NULL);</div><div class='del'>-    rb = co-&gt;data;</div><div class='del'>-    rb-&gt;type = RADIO;</div><div class='del'>-</div><div class='del'>-    rb-&gt;prevButton = prevButton;</div><div class='del'>-</div><div class='del'>-    for (curr = co; curr; curr = rb-&gt;prevButton) {</div><div class='del'>-	rb = curr-&gt;data;</div><div class='del'>-	rb-&gt;lastButton = co;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtRadioGetCurrent(newtComponent setMember) {</div><div class='del'>-    struct checkbox * rb = setMember-&gt;data;</div><div class='del'>-</div><div class='del'>-    setMember = rb-&gt;lastButton;</div><div class='del'>-    rb = setMember-&gt;data;</div><div class='del'>-</div><div class='del'>-    while (rb &amp;&amp; rb-&gt;value != '*') {</div><div class='del'>-	setMember = rb-&gt;prevButton;</div><div class='del'>-	if (!setMember)</div><div class='del'>-	  return NULL;</div><div class='del'>-	rb = setMember-&gt;data;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return setMember;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char newtCheckboxGetValue(newtComponent co) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    return cb-&gt;value;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCheckboxSetValue(newtComponent co, char value) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    *cb-&gt;result = value;</div><div class='del'>-    cbDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtCheckbox(int left, int top, const char * text, char defValue,</div><div class='del'>-			   const char * seq, char * result) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct checkbox * cb;</div><div class='del'>-</div><div class='del'>-    if (!seq) seq = " *";</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    cb = malloc(sizeof(struct checkbox));</div><div class='del'>-    co-&gt;data = cb;</div><div class='del'>-    cb-&gt;flags = 0;</div><div class='del'>-    if (result)</div><div class='del'>-	cb-&gt;result = result;</div><div class='del'>-    else</div><div class='del'>-	cb-&gt;result = &amp;cb-&gt;value;</div><div class='del'>-</div><div class='del'>-    cb-&gt;text = strdup(text);</div><div class='del'>-    cb-&gt;seq = strdup(seq);</div><div class='del'>-    cb-&gt;type = CHECK;</div><div class='del'>-    cb-&gt;hasFocus = 0;</div><div class='del'>-    cb-&gt;inactive = COLORSET_CHECKBOX;</div><div class='del'>-    cb-&gt;active = COLORSET_ACTCHECKBOX;</div><div class='del'>-    defValue ? (*cb-&gt;result = defValue) : (*cb-&gt;result = cb-&gt;seq[0]);</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;cbOps;</div><div class='del'>-</div><div class='del'>-    co-&gt;callback = NULL;</div><div class='del'>-    co-&gt;height = 1;</div><div class='del'>-    co-&gt;width = strlen(text) + 4;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;takesFocus = 1;</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-    int row, col;</div><div class='del'>-</div><div class='del'>-    cb-&gt;flags = newtSetFlags(cb-&gt;flags, flags, sense);</div><div class='del'>-</div><div class='del'>-    if (!(cb-&gt;flags &amp; NEWT_FLAG_DISABLED))</div><div class='del'>-	co-&gt;takesFocus = 1;</div><div class='del'>-    else</div><div class='del'>-	co-&gt;takesFocus = 0;</div><div class='del'>-</div><div class='del'>-    newtGetrc(&amp;row, &amp;col);</div><div class='del'>-    cbDraw(co);</div><div class='del'>-    newtGotorc(row, col);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void cbDraw(newtComponent c) {</div><div class='del'>-    struct checkbox * cb = c-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (c-&gt;top == -1 || !c-&gt;isMapped) return;</div><div class='del'>-</div><div class='del'>-    if (cb-&gt;flags &amp; NEWT_FLAG_DISABLED) {</div><div class='del'>-	cb-&gt;inactive = NEWT_COLORSET_DISENTRY;</div><div class='del'>-	cb-&gt;active = NEWT_COLORSET_DISENTRY;</div><div class='del'>-    } else {</div><div class='del'>-	cb-&gt;inactive = COLORSET_CHECKBOX;</div><div class='del'>-	cb-&gt;active = COLORSET_ACTCHECKBOX;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(cb-&gt;inactive);</div><div class='del'>-</div><div class='del'>-    newtGotorc(c-&gt;top, c-&gt;left);</div><div class='del'>-</div><div class='del'>-    switch (cb-&gt;type) {</div><div class='del'>-      case RADIO:</div><div class='del'>-	SLsmg_write_string("( ) ");</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case CHECK:</div><div class='del'>-	SLsmg_write_string("[ ] ");</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_write_string(cb-&gt;text);</div><div class='del'>-</div><div class='del'>-    if (cb-&gt;hasFocus)</div><div class='del'>-	SLsmg_set_color(cb-&gt;active);</div><div class='del'>-</div><div class='del'>-    newtGotorc(c-&gt;top, c-&gt;left + 1);</div><div class='del'>-    SLsmg_write_char(*cb-&gt;result);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void cbDestroy(newtComponent co) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    free(cb-&gt;text);</div><div class='del'>-    free(cb-&gt;seq);</div><div class='del'>-    free(cb);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct eventResult cbEvent(newtComponent co, struct event ev) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    const char * cur;</div><div class='del'>-</div><div class='del'>-    if (ev.when == EV_NORMAL) {</div><div class='del'>-	switch (ev.event) {</div><div class='del'>-	  case EV_FOCUS:</div><div class='del'>-	    cb-&gt;hasFocus = 1;</div><div class='del'>-	    cbDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case EV_UNFOCUS:</div><div class='del'>-	    cb-&gt;hasFocus = 0;</div><div class='del'>-	    cbDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case EV_KEYPRESS:</div><div class='del'>-	    if (ev.u.key == ' ') {</div><div class='del'>-		if (cb-&gt;type == RADIO) {</div><div class='del'>-		    makeActive(co);</div><div class='del'>-		} else if (cb-&gt;type == CHECK) {</div><div class='del'>-		    cur = strchr(cb-&gt;seq, *cb-&gt;result);</div><div class='del'>-		    if (!cur)</div><div class='del'>-			*cb-&gt;result = *cb-&gt;seq;</div><div class='del'>-		    else {</div><div class='del'>-			cur++;</div><div class='del'>-			if (! *cur)</div><div class='del'>-			    *cb-&gt;result = *cb-&gt;seq;</div><div class='del'>-			else</div><div class='del'>-			    *cb-&gt;result = *cur;</div><div class='del'>-		    }</div><div class='del'>-		    cbDraw(co);</div><div class='del'>-		    er.result = ER_SWALLOWED;</div><div class='del'>-</div><div class='del'>-		    if (co-&gt;callback)</div><div class='del'>-			co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-		} else {</div><div class='del'>-		    er.result = ER_IGNORED;</div><div class='del'>-		}</div><div class='del'>-	    } else if(ev.u.key == NEWT_KEY_ENTER) {</div><div class='del'>-		er.result = ER_IGNORED;</div><div class='del'>-	    } else {</div><div class='del'>-		er.result = ER_IGNORED;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-   	  case EV_MOUSE:</div><div class='del'>-	    if (ev.u.mouse.type == MOUSE_BUTTON_DOWN) {</div><div class='del'>-		if (cb-&gt;type == RADIO) {</div><div class='del'>-		    makeActive(co);</div><div class='del'>-		} else if (cb-&gt;type == CHECK) {</div><div class='del'>-		    cur = strchr(cb-&gt;seq, *cb-&gt;result);</div><div class='del'>-		    if (!cur)</div><div class='del'>-			*cb-&gt;result = *cb-&gt;seq;</div><div class='del'>-		    else {</div><div class='del'>-			cur++;</div><div class='del'>-			if (! *cur)</div><div class='del'>-			    *cb-&gt;result = *cb-&gt;seq;</div><div class='del'>-			else</div><div class='del'>-			    *cb-&gt;result = *cur;</div><div class='del'>-		    }</div><div class='del'>-		    cbDraw(co);</div><div class='del'>-		    er.result = ER_SWALLOWED;</div><div class='del'>-</div><div class='del'>-		    if (co-&gt;callback)</div><div class='del'>-			co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    } else</div><div class='del'>-	er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void makeActive(newtComponent co) {</div><div class='del'>-    struct checkbox * cb = co-&gt;data;</div><div class='del'>-    struct checkbox * rb;</div><div class='del'>-    newtComponent curr;</div><div class='del'>-</div><div class='del'>-    /* find the one that's turned off */</div><div class='del'>-    curr = cb-&gt;lastButton;</div><div class='del'>-    rb = curr-&gt;data;</div><div class='del'>-    while (curr &amp;&amp; rb-&gt;value == rb-&gt;seq[0]) {</div><div class='del'>-	curr = rb-&gt;prevButton;</div><div class='del'>-	if (curr) rb = curr-&gt;data;</div><div class='del'>-    }</div><div class='del'>-    if (curr) {</div><div class='del'>-	rb-&gt;value = rb-&gt;seq[0];</div><div class='del'>-	cbDraw(curr);</div><div class='del'>-    }</div><div class='del'>-    cb-&gt;value = cb-&gt;seq[1];</div><div class='del'>-    cbDraw(co);</div><div class='del'>-</div><div class='del'>-    if (co-&gt;callback)</div><div class='del'>-	co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/checkboxtree.c b/mdk-stage1/newt/checkboxtree.c<br/>deleted file mode 100644<br/>index 00113f23e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/checkboxtree.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/checkboxtree.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,714 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct items {</div><div class='del'>-    char * text;</div><div class='del'>-    const void *data;</div><div class='del'>-    unsigned char selected;</div><div class='del'>-    struct items *next;</div><div class='del'>-    struct items *prev;</div><div class='del'>-    struct items *branch;</div><div class='del'>-    int flags;</div><div class='del'>-    int depth;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct CheckboxTree {</div><div class='del'>-    newtComponent sb;</div><div class='del'>-    int curWidth;	/* size of text w/o scrollbar or border*/</div><div class='del'>-    int curHeight;	/* size of text w/o border */</div><div class='del'>-    struct items * itemlist;</div><div class='del'>-    struct items ** flatList, ** currItem, ** firstItem;</div><div class='del'>-    int flatCount;</div><div class='del'>-    int flags;</div><div class='del'>-    int pad;</div><div class='del'>-    char * seq;</div><div class='del'>-    char * result;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void ctDraw(newtComponent c);</div><div class='del'>-static void ctDestroy(newtComponent co);</div><div class='del'>-static void ctPlace(newtComponent co, int newLeft, int newTop);</div><div class='del'>-struct eventResult ctEvent(newtComponent co, struct event ev);</div><div class='del'>-static void ctMapped(newtComponent co, int isMapped);</div><div class='del'>-static struct items * findItem(struct items * items, const void * data);</div><div class='del'>-static void buildFlatList(newtComponent co);</div><div class='del'>-static void doBuildFlatList(struct CheckboxTree * ct, struct items * item);</div><div class='del'>-enum countWhat { COUNT_EXPOSED=0, COUNT_SELECTED=1 };</div><div class='del'>-static int countItems(struct items * item, enum countWhat justExposed);</div><div class='del'>-</div><div class='del'>-static struct componentOps ctOps = {</div><div class='del'>-    ctDraw,</div><div class='del'>-    ctEvent,</div><div class='del'>-    ctDestroy,</div><div class='del'>-    ctPlace,</div><div class='del'>-    ctMapped,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static int countItems(struct items * item, enum countWhat what) {</div><div class='del'>-    int count = 0;</div><div class='del'>-</div><div class='del'>-    while (item) {</div><div class='del'>-        if ((!item-&gt;branch &amp;&amp; item-&gt;selected == what) || (what == COUNT_EXPOSED))</div><div class='del'>-	    count++;</div><div class='del'>-	if (item-&gt;branch || (what == COUNT_EXPOSED &amp;&amp; item-&gt;selected))</div><div class='del'>-	    count += countItems(item-&gt;branch, what);</div><div class='del'>-	item = item-&gt;next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return count;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void doBuildFlatList(struct CheckboxTree * ct, struct items * item) {</div><div class='del'>-    while (item) {</div><div class='del'>-    	ct-&gt;flatList[ct-&gt;flatCount++] = item;</div><div class='del'>-	if (item-&gt;branch &amp;&amp; item-&gt;selected) doBuildFlatList(ct, item-&gt;branch);</div><div class='del'>-	item = item-&gt;next;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void buildFlatList(newtComponent co) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (ct-&gt;flatList) free(ct-&gt;flatList);</div><div class='del'>-    ct-&gt;flatCount = countItems(ct-&gt;itemlist, COUNT_EXPOSED);</div><div class='del'>-</div><div class='del'>-    ct-&gt;flatList = malloc(sizeof(*ct-&gt;flatList) * (ct-&gt;flatCount+1));</div><div class='del'>-    ct-&gt;flatCount = 0;</div><div class='del'>-    doBuildFlatList(ct, ct-&gt;itemlist);</div><div class='del'>-    ct-&gt;flatList[ct-&gt;flatCount] = NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtCheckboxTreeAddItem(newtComponent co, </div><div class='del'>-			    const char * text, const void * data,</div><div class='del'>-			    int flags, int index, ...) {</div><div class='del'>-    va_list argList;</div><div class='del'>-    int numIndexes;</div><div class='del'>-    int * indexes;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    va_start(argList, index);</div><div class='del'>-    numIndexes = 0;</div><div class='del'>-    i = index;</div><div class='del'>-    while (i != NEWT_ARG_LAST) {</div><div class='del'>-	numIndexes++;</div><div class='del'>-	i = va_arg(argList, int);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    va_end(argList);</div><div class='del'>-</div><div class='del'>-    indexes = alloca(sizeof(*indexes) * (numIndexes + 1));</div><div class='del'>-    va_start(argList, index);</div><div class='del'>-    numIndexes = 0;</div><div class='del'>-    i = index;</div><div class='del'>-    va_start(argList, index);</div><div class='del'>-    while (i != NEWT_ARG_LAST) {</div><div class='del'>-	indexes[numIndexes++] = i;</div><div class='del'>-	i = va_arg(argList, int);</div><div class='del'>-    }</div><div class='del'>-    va_end(argList);</div><div class='del'>-</div><div class='del'>-    indexes[numIndexes++] = NEWT_ARG_LAST;</div><div class='del'>-</div><div class='del'>-    return newtCheckboxTreeAddArray(co, text, data, flags, indexes);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int doFindItemPath(struct items * items, void * data, int * path, </div><div class='del'>-			  int * len) {</div><div class='del'>-    int where = 0;</div><div class='del'>-</div><div class='del'>-    while (items) {</div><div class='del'>-	if (items-&gt;data == data) {</div><div class='del'>-	    if (path) path[items-&gt;depth] = where;</div><div class='del'>-	    if (len) *len = items-&gt;depth + 1;</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (items-&gt;branch &amp;&amp; doFindItemPath(items-&gt;branch, data, path, len)) {</div><div class='del'>-	    if (path) path[items-&gt;depth] = where;</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	items = items-&gt;next;</div><div class='del'>-	where++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int * newtCheckboxTreeFindItem(newtComponent co, void * data) {</div><div class='del'>-    int len;</div><div class='del'>-    int * path;</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (!doFindItemPath(ct-&gt;itemlist, data, NULL, &amp;len)) return NULL;</div><div class='del'>-</div><div class='del'>-    path = malloc(sizeof(*path) * (len + 1));</div><div class='del'>-    doFindItemPath(ct-&gt;itemlist, data, path, NULL);</div><div class='del'>-    path[len] = NEWT_ARG_LAST;</div><div class='del'>-</div><div class='del'>-    return path;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtCheckboxTreeAddArray(newtComponent co, </div><div class='del'>-			    const char * text, const void * data,</div><div class='del'>-			    int flags, int * indexes) {</div><div class='del'>-    struct items * curList, * newNode, * item = NULL;</div><div class='del'>-    struct items ** listPtr = NULL;</div><div class='del'>-    int i, index, numIndexes;</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    numIndexes = 0;</div><div class='del'>-    while (indexes[numIndexes] != NEWT_ARG_LAST) numIndexes++;</div><div class='del'>-</div><div class='del'>-    if (!ct-&gt;itemlist) {</div><div class='del'>-	if (numIndexes &gt; 1) return -1;</div><div class='del'>-</div><div class='del'>-    	ct-&gt;itemlist = malloc(sizeof(*ct-&gt;itemlist));</div><div class='del'>-    	item = ct-&gt;itemlist;</div><div class='del'>-	item-&gt;prev = NULL;</div><div class='del'>-	item-&gt;next = NULL;</div><div class='del'>-    } else {</div><div class='del'>-	curList = ct-&gt;itemlist;</div><div class='del'>-	listPtr = &amp;ct-&gt;itemlist;</div><div class='del'>-</div><div class='del'>-	i = 0;</div><div class='del'>-	index = indexes[i];</div><div class='del'>-	while (i &lt; numIndexes) {</div><div class='del'>-	    item = curList;</div><div class='del'>-</div><div class='del'>-	    if (index == NEWT_ARG_APPEND) {</div><div class='del'>-	    	item = NULL;</div><div class='del'>-	    } else {</div><div class='del'>-		while (index &amp;&amp; item) </div><div class='del'>-		    item = item-&gt;next, index--;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    i++;</div><div class='del'>-	    if (i &lt; numIndexes) {</div><div class='del'>-		curList = item-&gt;branch;</div><div class='del'>-		listPtr = &amp;item-&gt;branch;</div><div class='del'>-		if (!curList &amp;&amp; (i + 1 != numIndexes)) return -1;</div><div class='del'>-</div><div class='del'>-		index = indexes[i];</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!curList) { 			/* create a new branch */</div><div class='del'>-	    item = malloc(sizeof(*curList-&gt;prev));</div><div class='del'>-	    item-&gt;next = item-&gt;prev = NULL;</div><div class='del'>-	    *listPtr = item;</div><div class='del'>-	} else if (!item) {			/* append to end */</div><div class='del'>-	    item = curList;</div><div class='del'>-	    while (item-&gt;next) item = item-&gt;next;</div><div class='del'>-	    item-&gt;next = malloc(sizeof(*curList-&gt;prev));</div><div class='del'>-	    item-&gt;next-&gt;prev = item;</div><div class='del'>-	    item = item-&gt;next;</div><div class='del'>-	    item-&gt;next = NULL;</div><div class='del'>-	} else { </div><div class='del'>-	    newNode = malloc(sizeof(*newNode));</div><div class='del'>-	    newNode-&gt;prev = item-&gt;prev;</div><div class='del'>-	    newNode-&gt;next = item;</div><div class='del'>-</div><div class='del'>-	    if (item-&gt;prev) item-&gt;prev-&gt;next = newNode;</div><div class='del'>-	    item-&gt;prev = newNode;</div><div class='del'>-	    item = newNode;</div><div class='del'>-	    if (!item-&gt;prev) *listPtr = item;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    	</div><div class='del'>-    item-&gt;text = strdup(text);</div><div class='del'>-    item-&gt;data = data;</div><div class='del'>-    if (flags &amp; NEWT_FLAG_SELECTED) {</div><div class='del'>-    	item-&gt;selected = 1;</div><div class='del'>-    } else {</div><div class='del'>-	item-&gt;selected = 0;</div><div class='del'>-    }</div><div class='del'>-    item-&gt;flags = flags;</div><div class='del'>-    item-&gt;branch = NULL;</div><div class='del'>-    item-&gt;depth = numIndexes - 1;</div><div class='del'>-</div><div class='del'>-    i = 4 + (3 * item-&gt;depth);</div><div class='del'>-</div><div class='del'>-    if ((strlen(text) + i + ct-&gt;pad) &gt; (size_t)co-&gt;width) {</div><div class='del'>-	co-&gt;width = strlen(text) + i + ct-&gt;pad;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct items * findItem(struct items * items, const void * data) {</div><div class='del'>-    struct items * i;</div><div class='del'>-</div><div class='del'>-    while (items) {</div><div class='del'>-	if (items-&gt;data == data) return items;</div><div class='del'>-    	if (items-&gt;branch) {</div><div class='del'>-	    i = findItem(items-&gt;branch, data);</div><div class='del'>-	    if (i) return i;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	items = items-&gt;next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void listSelected(struct items * items, int * num, const void ** list, int seqindex) {</div><div class='del'>-    while (items) {</div><div class='del'>-	    if ((seqindex ? items-&gt;selected==seqindex : items-&gt;selected) &amp;&amp; !items-&gt;branch)</div><div class='del'>-	    list[(*num)++] = (void *) items-&gt;data;</div><div class='del'>-	if (items-&gt;branch)</div><div class='del'>-	    listSelected(items-&gt;branch, num, list, seqindex);</div><div class='del'>-	items = items-&gt;next;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems)</div><div class='del'>-{</div><div class='del'>-    return newtCheckboxTreeGetMultiSelection(co, numitems, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum)</div><div class='del'>-{</div><div class='del'>-    struct CheckboxTree * ct;</div><div class='del'>-    const void **retval;</div><div class='del'>-    int seqindex=0;</div><div class='del'>-</div><div class='del'>-    if(!co || !numitems) return NULL;</div><div class='del'>-</div><div class='del'>-    ct = co-&gt;data;</div><div class='del'>-	</div><div class='del'>-    if (seqnum) {</div><div class='del'>-	    while( ct-&gt;seq[seqindex] &amp;&amp; ( ct-&gt;seq[seqindex] != seqnum )) seqindex++;</div><div class='del'>-    } else {</div><div class='del'>-	    seqindex = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *numitems = countItems(ct-&gt;itemlist, (seqindex ? seqindex : COUNT_SELECTED));</div><div class='del'>-    if (!*numitems) return NULL;</div><div class='del'>-    </div><div class='del'>-    retval = malloc(*numitems * sizeof(void *));</div><div class='del'>-    *numitems = 0;</div><div class='del'>-    listSelected(ct-&gt;itemlist, numitems, retval, seqindex);</div><div class='del'>-</div><div class='del'>-    return retval;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtCheckboxTree(int left, int top, int height, int flags) {</div><div class='del'>-	return newtCheckboxTreeMulti(left, top, height, NULL, flags);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct CheckboxTree * ct;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    ct = malloc(sizeof(struct CheckboxTree));</div><div class='del'>-    co-&gt;callback = NULL;</div><div class='del'>-    co-&gt;data = ct;</div><div class='del'>-    co-&gt;ops = &amp;ctOps;</div><div class='del'>-    co-&gt;takesFocus = 1;</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-    co-&gt;width = 0;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-    ct-&gt;itemlist = NULL;</div><div class='del'>-    ct-&gt;firstItem = NULL;</div><div class='del'>-    ct-&gt;currItem = NULL;</div><div class='del'>-    ct-&gt;flatList = NULL;</div><div class='del'>-	if (seq)</div><div class='del'>-	  ct-&gt;seq = strdup(seq);</div><div class='del'>-	else</div><div class='del'>-	  ct-&gt;seq = strdup(" *");</div><div class='del'>-    if (flags &amp; NEWT_FLAG_SCROLL) {</div><div class='del'>-	ct-&gt;sb = newtVerticalScrollbar(left, top, height,</div><div class='del'>-				       COLORSET_LISTBOX, COLORSET_ACTLISTBOX);</div><div class='del'>-	ct-&gt;pad = 2;</div><div class='del'>-    } else {</div><div class='del'>-	ct-&gt;sb = NULL;</div><div class='del'>-	ct-&gt;pad = 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void ctMapped(newtComponent co, int isMapped) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;isMapped = isMapped;</div><div class='del'>-    if (ct-&gt;sb)</div><div class='del'>-	ct-&gt;sb-&gt;ops-&gt;mapped(ct-&gt;sb, isMapped);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void ctPlace(newtComponent co, int newLeft, int newTop) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;top = newTop;</div><div class='del'>-    co-&gt;left = newLeft;</div><div class='del'>-</div><div class='del'>-    if (ct-&gt;sb)</div><div class='del'>-	ct-&gt;sb-&gt;ops-&gt;place(ct-&gt;sb, co-&gt;left + co-&gt;width - 1, co-&gt;top);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense)</div><div class='del'>-{</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-    struct items * currItem;</div><div class='del'>-    struct items * firstItem;</div><div class='del'>-    </div><div class='del'>-    if (!item)</div><div class='del'>-	return 1;</div><div class='del'>-    </div><div class='del'>-    switch(sense) {</div><div class='del'>-	case NEWT_FLAGS_RESET:</div><div class='del'>-	    item-&gt;selected = 0;</div><div class='del'>-	    break;</div><div class='del'>-	case NEWT_FLAGS_SET:</div><div class='del'>-	    item-&gt;selected = 1;</div><div class='del'>-	    break;</div><div class='del'>-	case NEWT_FLAGS_TOGGLE:</div><div class='del'>-	    if (item-&gt;branch)</div><div class='del'>-	      item-&gt;selected = !item-&gt;selected;</div><div class='del'>-	    else {</div><div class='del'>-		    item-&gt;selected++;</div><div class='del'>-		    if (item-&gt;selected==strlen(ct-&gt;seq))</div><div class='del'>-		      item-&gt;selected = 0;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (item-&gt;branch) {</div><div class='del'>-    	currItem = *ct-&gt;currItem;</div><div class='del'>-	firstItem = *ct-&gt;firstItem;</div><div class='del'>-</div><div class='del'>-    	buildFlatList(co);</div><div class='del'>-</div><div class='del'>-    	ct-&gt;currItem = ct-&gt;flatList;</div><div class='del'>-	while (*ct-&gt;currItem != currItem) ct-&gt;currItem++;</div><div class='del'>-</div><div class='del'>-    	ct-&gt;firstItem = ct-&gt;flatList;</div><div class='del'>-    	if (ct-&gt;flatCount &gt; co-&gt;height) {</div><div class='del'>-		struct items ** last = ct-&gt;flatList + ct-&gt;flatCount - co-&gt;height;</div><div class='del'>-		while (*ct-&gt;firstItem != firstItem &amp;&amp; ct-&gt;firstItem != last)</div><div class='del'>-		    ct-&gt;firstItem++;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void ctSetItems(struct items *item, int selected)</div><div class='del'>-{</div><div class='del'>-    for (; item; item = item-&gt;next) {</div><div class='del'>-	if (!item-&gt;branch)</div><div class='del'>-	    item-&gt;selected = selected;</div><div class='del'>-	else</div><div class='del'>-	    ctSetItems(item-&gt;branch, selected);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void ctDraw(newtComponent co) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-    struct items ** item; </div><div class='del'>-    int i, j;</div><div class='del'>-    char * spaces = NULL;</div><div class='del'>-    int currRow = -1;</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return ;</div><div class='del'>-</div><div class='del'>-    if (!ct-&gt;firstItem) {</div><div class='del'>-	buildFlatList(co);</div><div class='del'>-	ct-&gt;firstItem = ct-&gt;currItem = ct-&gt;flatList;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    item = ct-&gt;firstItem;</div><div class='del'>-    </div><div class='del'>-    i = 0;</div><div class='del'>-    while (*item &amp;&amp; i &lt; co-&gt;height) {</div><div class='del'>-	newtGotorc(co-&gt;top + i, co-&gt;left);</div><div class='del'>-	if (*item == *ct-&gt;currItem) {</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);</div><div class='del'>-	    currRow = co-&gt;top + i;</div><div class='del'>-	} else</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_LISTBOX);</div><div class='del'>-</div><div class='del'>-	for (j = 0; j &lt; (*item)-&gt;depth; j++)</div><div class='del'>-	    SLsmg_write_string("   ");</div><div class='del'>-</div><div class='del'>-	if ((*item)-&gt;branch) {</div><div class='del'>-	    if ((*item)-&gt;selected) </div><div class='del'>-		SLsmg_write_string("&lt;-&gt; ");</div><div class='del'>-	    else</div><div class='del'>-		SLsmg_write_string("&lt;+&gt; ");</div><div class='del'>-	} else {</div><div class='del'>-	    char tmp[5];</div><div class='del'>-	    snprintf(tmp,5,"[%c] ",ct-&gt;seq[(*item)-&gt;selected]);</div><div class='del'>-	    SLsmg_write_string(tmp);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	SLsmg_write_nstring((*item)-&gt;text, co-&gt;width - 4 - </div><div class='del'>-					   (3 * (*item)-&gt;depth));</div><div class='del'>-	item++;</div><div class='del'>-	i++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* There could be empty lines left (i.e. if the user closes an expanded</div><div class='del'>-       list which is the last thing in the tree, and whose elements are</div><div class='del'>-       displayed at the bottom of the screen */</div><div class='del'>-    if (i &lt; co-&gt;height) {</div><div class='del'>-	spaces = alloca(co-&gt;width);</div><div class='del'>-	memset(spaces, ' ', co-&gt;width);</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_LISTBOX);</div><div class='del'>-    }</div><div class='del'>-    while (i &lt; co-&gt;height) {</div><div class='del'>-	newtGotorc(co-&gt;top + i, co-&gt;left);</div><div class='del'>-	SLsmg_write_nstring(spaces, co-&gt;width);</div><div class='del'>-	i++;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    if(ct-&gt;sb) {</div><div class='del'>-	newtScrollbarSet(ct-&gt;sb, ct-&gt;currItem - ct-&gt;flatList, </div><div class='del'>-			 ct-&gt;flatCount - 1);</div><div class='del'>-	ct-&gt;sb-&gt;ops-&gt;draw(ct-&gt;sb);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    newtGotorc(currRow, co-&gt;left + 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void ctDestroy(newtComponent co) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-    struct items * item, * nextitem;</div><div class='del'>-</div><div class='del'>-    nextitem = item = ct-&gt;itemlist;</div><div class='del'>-</div><div class='del'>-    while (item != NULL) {</div><div class='del'>-	nextitem = item-&gt;next;</div><div class='del'>-	free(item-&gt;text);</div><div class='del'>-	free(item);</div><div class='del'>-	item = nextitem;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    free(ct-&gt;seq);</div><div class='del'>-    free(ct);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct eventResult ctEvent(newtComponent co, struct event ev) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    struct items ** listEnd, ** lastItem;</div><div class='del'>-    int key, selnum = 1;</div><div class='del'>-</div><div class='del'>-    er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    if(ev.when == EV_EARLY || ev.when == EV_LATE) {</div><div class='del'>-	return er;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch(ev.event) {</div><div class='del'>-    case EV_KEYPRESS:</div><div class='del'>-	key = ev.u.key;</div><div class='del'>-	if (key == (char) key &amp;&amp; key != ' ') {</div><div class='del'>-	    for (selnum = 0; ct-&gt;seq[selnum]; selnum++)</div><div class='del'>-	    if (key == ct-&gt;seq[selnum])</div><div class='del'>-		break;</div><div class='del'>-	    if (!ct-&gt;seq[selnum])</div><div class='del'>-		switch (key) {</div><div class='del'>-		case '-': selnum = 0; break;</div><div class='del'>-		case '+':</div><div class='del'>-		case '*': selnum = 1; break;</div><div class='del'>-		}</div><div class='del'>-	    if (ct-&gt;seq[selnum])</div><div class='del'>-		key = '*';</div><div class='del'>-	}</div><div class='del'>-	switch(key) {</div><div class='del'>-	case ' ':</div><div class='del'>-	case NEWT_KEY_ENTER:</div><div class='del'>-	    ctSetItem(co, *ct-&gt;currItem, NEWT_FLAGS_TOGGLE);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    if (!(*ct-&gt;currItem)-&gt;branch || (*ct-&gt;currItem)-&gt;selected)</div><div class='del'>-		key = NEWT_KEY_DOWN;</div><div class='del'>-	    else</div><div class='del'>-		key = '*';</div><div class='del'>-	    break;</div><div class='del'>-	case '*':</div><div class='del'>-	    if ((*ct-&gt;currItem)-&gt;branch) {</div><div class='del'>-		ctSetItems((*ct-&gt;currItem)-&gt;branch, selnum);</div><div class='del'>-		if (!(*ct-&gt;currItem)-&gt;selected)</div><div class='del'>-		    key = NEWT_KEY_DOWN;</div><div class='del'>-	    } else {</div><div class='del'>-		(*ct-&gt;currItem)-&gt;selected = selnum;</div><div class='del'>-		key = NEWT_KEY_DOWN;</div><div class='del'>-	    }</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	switch (key) {</div><div class='del'>-	case '*':</div><div class='del'>-	    ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_HOME:</div><div class='del'>-	    ct-&gt;currItem = ct-&gt;flatList;</div><div class='del'>-	    ct-&gt;firstItem = ct-&gt;flatList;</div><div class='del'>-	    ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_END:</div><div class='del'>-	    ct-&gt;currItem = ct-&gt;flatList + ct-&gt;flatCount - 1;</div><div class='del'>-	    if (ct-&gt;flatCount &lt;= co-&gt;height)</div><div class='del'>-		ct-&gt;firstItem = ct-&gt;flatList;</div><div class='del'>-	    else</div><div class='del'>-		ct-&gt;firstItem = ct-&gt;flatList + ct-&gt;flatCount - co-&gt;height;</div><div class='del'>-	    ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_DOWN:</div><div class='del'>-	    if (ev.u.key != NEWT_KEY_DOWN) {</div><div class='del'>-		if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-		if (strlen(ct-&gt;seq) != 2) {</div><div class='del'>-		    ctDraw(co);</div><div class='del'>-		    return er;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    if ((ct-&gt;currItem - ct-&gt;flatList + 1) &lt; ct-&gt;flatCount) {</div><div class='del'>-		ct-&gt;currItem++;</div><div class='del'>-</div><div class='del'>-		if (ct-&gt;currItem - ct-&gt;firstItem &gt;= co-&gt;height) </div><div class='del'>-		    ct-&gt;firstItem++;</div><div class='del'>-</div><div class='del'>-		ctDraw(co);</div><div class='del'>-	    } else if (ev.u.key != NEWT_KEY_DOWN)</div><div class='del'>-	        ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_UP:</div><div class='del'>-	    if (ct-&gt;currItem != ct-&gt;flatList) {</div><div class='del'>-		ct-&gt;currItem--;</div><div class='del'>-</div><div class='del'>-		if (ct-&gt;currItem &lt; ct-&gt;firstItem)</div><div class='del'>-		    ct-&gt;firstItem = ct-&gt;currItem;</div><div class='del'>-		    </div><div class='del'>-		ctDraw(co);</div><div class='del'>-	    }</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_PGUP:</div><div class='del'>-	    if (ct-&gt;firstItem - co-&gt;height &lt; ct-&gt;flatList) {</div><div class='del'>-	    	ct-&gt;firstItem = ct-&gt;currItem = ct-&gt;flatList;</div><div class='del'>-	    } else {</div><div class='del'>-		ct-&gt;currItem -= co-&gt;height;</div><div class='del'>-		ct-&gt;firstItem -= co-&gt;height;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    return er;</div><div class='del'>-	case NEWT_KEY_PGDN:</div><div class='del'>-	    listEnd = ct-&gt;flatList + ct-&gt;flatCount - 1;</div><div class='del'>-	    lastItem = ct-&gt;firstItem + co-&gt;height - 1;</div><div class='del'>-</div><div class='del'>-	    if (lastItem + co-&gt;height &gt; listEnd) {</div><div class='del'>-	    	ct-&gt;firstItem = listEnd - co-&gt;height + 1;</div><div class='del'>-		ct-&gt;currItem = listEnd;</div><div class='del'>-	    } else {</div><div class='del'>-	    	ct-&gt;currItem += co-&gt;height;</div><div class='del'>-		ct-&gt;firstItem += co-&gt;height;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ctDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    return er;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case EV_FOCUS:</div><div class='del'>-	ctDraw(co);</div><div class='del'>-	er.result = ER_SWALLOWED;</div><div class='del'>-	break;</div><div class='del'>-	</div><div class='del'>-    case EV_UNFOCUS:</div><div class='del'>-	ctDraw(co);</div><div class='del'>-	er.result = ER_SWALLOWED;</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-const void * newtCheckboxTreeGetCurrent(newtComponent co) {</div><div class='del'>-    struct CheckboxTree * ct = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (!ct-&gt;currItem) return NULL;</div><div class='del'>-    return (*ct-&gt;currItem)-&gt;data;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCheckboxTreeSetEntry(newtComponent co, const void * data, const char * text)</div><div class='del'>-{</div><div class='del'>-    struct CheckboxTree * ct;</div><div class='del'>-    struct items * item;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (!co) return;</div><div class='del'>-    ct = co-&gt;data;</div><div class='del'>-    item = findItem(ct-&gt;itemlist, data);</div><div class='del'>-    if (!item) return;</div><div class='del'>-</div><div class='del'>-    free(item-&gt;text);</div><div class='del'>-    item-&gt;text = strdup(text);</div><div class='del'>-</div><div class='del'>-    i = 4 + (3 * item-&gt;depth);</div><div class='del'>-</div><div class='del'>-    if ((strlen(text) + i + ct-&gt;pad) &gt; (size_t)co-&gt;width) {</div><div class='del'>-	co-&gt;width = strlen(text) + i + ct-&gt;pad;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ctDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data)</div><div class='del'>-{</div><div class='del'>-    struct CheckboxTree * ct;</div><div class='del'>-    struct items * item;</div><div class='del'>-</div><div class='del'>-    if (!co) return -1;</div><div class='del'>-    ct = co-&gt;data;</div><div class='del'>-    item = findItem(ct-&gt;itemlist, data);</div><div class='del'>-    if (!item) return -1;</div><div class='del'>-    if (item-&gt;branch)</div><div class='del'>-	return item-&gt;selected ? NEWT_CHECKBOXTREE_EXPANDED : NEWT_CHECKBOXTREE_COLLAPSED;</div><div class='del'>-    else</div><div class='del'>-	return ct-&gt;seq[item-&gt;selected];</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data, char value)</div><div class='del'>-{</div><div class='del'>-    struct CheckboxTree * ct;</div><div class='del'>-    struct items * item;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (!co) return;</div><div class='del'>-    ct = co-&gt;data;</div><div class='del'>-    item = findItem(ct-&gt;itemlist, data);</div><div class='del'>-    if (!item || item-&gt;branch) return;</div><div class='del'>-</div><div class='del'>-    for(i = 0; ct-&gt;seq[i]; i++)</div><div class='del'>-	if (value == ct-&gt;seq[i])</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-    if (!ct-&gt;seq[i]) return;</div><div class='del'>-    item-&gt;selected = i;</div><div class='del'>-</div><div class='del'>-    ctDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/newt/entry.c b/mdk-stage1/newt/entry.c<br/>deleted file mode 100644<br/>index 1b33f1c6f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/entry.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/entry.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,376 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct entry {</div><div class='del'>-    int flags;</div><div class='del'>-    char * buf;</div><div class='del'>-    char ** resultPtr;</div><div class='del'>-    int bufAlloced;</div><div class='del'>-    int bufUsed;		/* amount of the buffer that's been used */</div><div class='del'>-    int cursorPosition; 	/* cursor *in the string* on on screen */</div><div class='del'>-    int firstChar;		/* first character position being shown */</div><div class='del'>-    newtEntryFilter filter;</div><div class='del'>-    void * filterData;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void entryDraw(newtComponent co);</div><div class='del'>-static void entryDestroy(newtComponent co);</div><div class='del'>-static struct eventResult entryEvent(newtComponent co,</div><div class='del'>-			             struct event ev);</div><div class='del'>-</div><div class='del'>-static struct eventResult entryHandleKey(newtComponent co, int key);</div><div class='del'>-</div><div class='del'>-static struct componentOps entryOps = {</div><div class='del'>-    entryDraw,</div><div class='del'>-    entryEvent,</div><div class='del'>-    entryDestroy,</div><div class='del'>-    newtDefaultPlaceHandler,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if ((strlen(value) + 1) &gt; (unsigned int)en-&gt;bufAlloced) {</div><div class='del'>-	free(en-&gt;buf);</div><div class='del'>-	en-&gt;bufAlloced = strlen(value) + 1;</div><div class='del'>-	en-&gt;buf = malloc(en-&gt;bufAlloced);</div><div class='del'>-	if (en-&gt;resultPtr) *en-&gt;resultPtr = en-&gt;buf;</div><div class='del'>-    }</div><div class='del'>-    memset(en-&gt;buf, 0, en-&gt;bufAlloced);		/* clear the buffer */</div><div class='del'>-    strcpy(en-&gt;buf, value);</div><div class='del'>-    en-&gt;bufUsed = strlen(value);</div><div class='del'>-    en-&gt;firstChar = 0;</div><div class='del'>-    if (cursorAtEnd)</div><div class='del'>-	en-&gt;cursorPosition = en-&gt;bufUsed;</div><div class='del'>-    else</div><div class='del'>-	en-&gt;cursorPosition = 0;</div><div class='del'>-</div><div class='del'>-    entryDraw(co);</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-newtComponent newtEntry(int left, int top, const char * initialValue, int width,</div><div class='del'>-			char ** resultPtr, int flags) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct entry * en;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    en = malloc(sizeof(struct entry));</div><div class='del'>-    co-&gt;data = en;</div><div class='del'>-</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;height = 1;</div><div class='del'>-    co-&gt;width = width;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-    co-&gt;callback = NULL;</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;entryOps;</div><div class='del'>-</div><div class='del'>-    en-&gt;flags = flags;</div><div class='del'>-    en-&gt;cursorPosition = 0;</div><div class='del'>-    en-&gt;firstChar = 0;</div><div class='del'>-    en-&gt;bufUsed = 0;</div><div class='del'>-    en-&gt;bufAlloced = width + 1;</div><div class='del'>-    en-&gt;filter = NULL;</div><div class='del'>-</div><div class='del'>-    if (!(en-&gt;flags &amp; NEWT_FLAG_DISABLED))</div><div class='del'>-	co-&gt;takesFocus = 1;</div><div class='del'>-    else</div><div class='del'>-	co-&gt;takesFocus = 0;</div><div class='del'>-</div><div class='del'>-    if (initialValue &amp;&amp; strlen(initialValue) &gt; (unsigned int)width) {</div><div class='del'>-	en-&gt;bufAlloced = strlen(initialValue) + 1;</div><div class='del'>-    }</div><div class='del'>-    en-&gt;buf = malloc(en-&gt;bufAlloced);</div><div class='del'>-    en-&gt;resultPtr = resultPtr;</div><div class='del'>-    if (en-&gt;resultPtr) *en-&gt;resultPtr = en-&gt;buf;</div><div class='del'>-</div><div class='del'>-    memset(en-&gt;buf, 0, en-&gt;bufAlloced);</div><div class='del'>-    if (initialValue) {</div><div class='del'>-	strcpy(en-&gt;buf, initialValue);</div><div class='del'>-	en-&gt;bufUsed = strlen(initialValue);</div><div class='del'>-	en-&gt;cursorPosition = en-&gt;bufUsed;</div><div class='del'>-    } else {</div><div class='del'>-	*en-&gt;buf = '\0';</div><div class='del'>-	en-&gt;bufUsed = 0;</div><div class='del'>-	en-&gt;cursorPosition = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void entryDraw(newtComponent co) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    char * chptr;</div><div class='del'>-    int len;</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return;</div><div class='del'>-</div><div class='del'>-    if (en-&gt;flags &amp; NEWT_FLAG_DISABLED)</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_DISENTRY);</div><div class='del'>-    else</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_ENTRY);</div><div class='del'>-</div><div class='del'>-    if (en-&gt;flags &amp; NEWT_FLAG_HIDDEN) {</div><div class='del'>-	newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-	for (i = 0; i &lt; co-&gt;width; i++)</div><div class='del'>-	    SLsmg_write_char('_');</div><div class='del'>-	newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-</div><div class='del'>-    if (en-&gt;cursorPosition &lt; en-&gt;firstChar) {</div><div class='del'>-	/* scroll to the left */</div><div class='del'>-	en-&gt;firstChar = en-&gt;cursorPosition;</div><div class='del'>-    } else if ((en-&gt;firstChar + co-&gt;width) &lt;= en-&gt;cursorPosition) {</div><div class='del'>-	/* scroll to the right */</div><div class='del'>-	en-&gt;firstChar = en-&gt;cursorPosition - co-&gt;width + 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    chptr = en-&gt;buf + en-&gt;firstChar;</div><div class='del'>-</div><div class='del'>-    if (en-&gt;flags &amp; NEWT_FLAG_PASSWORD) {</div><div class='del'>-	char *tmpptr, *p;</div><div class='del'>-</div><div class='del'>-	tmpptr = alloca(strlen(chptr+2));</div><div class='del'>-	strcpy(tmpptr, chptr);</div><div class='del'>-	for (p = tmpptr; *p; p++)</div><div class='del'>-	    *p = '*';</div><div class='del'>-	chptr = tmpptr;</div><div class='del'>-    }			</div><div class='del'>-</div><div class='del'>-    len = strlen(chptr);</div><div class='del'>-</div><div class='del'>-    if (len &lt;= co-&gt;width) {</div><div class='del'>-	i = len;</div><div class='del'>-	SLsmg_write_string(chptr);</div><div class='del'>-	while (i &lt; co-&gt;width) {</div><div class='del'>-	    SLsmg_write_char('_');</div><div class='del'>-	    i++;</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-	SLsmg_write_nstring(chptr, co-&gt;width);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (en-&gt;flags &amp; NEWT_FLAG_HIDDEN)</div><div class='del'>-	newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-    else</div><div class='del'>-	newtGotorc(co-&gt;top, co-&gt;left + (en-&gt;cursorPosition - en-&gt;firstChar));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-    int row, col;</div><div class='del'>-</div><div class='del'>-    en-&gt;flags = newtSetFlags(en-&gt;flags, flags, sense);</div><div class='del'>-</div><div class='del'>-    if (!(en-&gt;flags &amp; NEWT_FLAG_DISABLED))</div><div class='del'>-	co-&gt;takesFocus = 1;</div><div class='del'>-    else</div><div class='del'>-	co-&gt;takesFocus = 0;</div><div class='del'>-</div><div class='del'>-    newtGetrc(&amp;row, &amp;col);</div><div class='del'>-    entryDraw(co);</div><div class='del'>-    newtGotorc(row, col);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void entryDestroy(newtComponent co) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    free(en-&gt;buf);</div><div class='del'>-    free(en);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult entryEvent(newtComponent co,</div><div class='del'>-				     struct event ev) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    int ch;</div><div class='del'>-</div><div class='del'>-    if (ev.when == EV_NORMAL) {</div><div class='del'>-	switch (ev.event) {</div><div class='del'>-	case EV_FOCUS:</div><div class='del'>-	    newtCursorOn();</div><div class='del'>-	    if (en-&gt;flags &amp; NEWT_FLAG_HIDDEN)</div><div class='del'>-		newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-	    else</div><div class='del'>-		newtGotorc(co-&gt;top, co-&gt;left +</div><div class='del'>-			   (en-&gt;cursorPosition - en-&gt;firstChar));</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case EV_UNFOCUS:</div><div class='del'>-	    newtCursorOff();</div><div class='del'>-	    newtGotorc(0, 0);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    if (co-&gt;callback)</div><div class='del'>-		co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case EV_KEYPRESS:</div><div class='del'>-	    ch = ev.u.key;</div><div class='del'>-	    if (en-&gt;filter)</div><div class='del'>-		ch = en-&gt;filter(co, en-&gt;filterData, ch, en-&gt;cursorPosition);</div><div class='del'>-	    if (ch) er = entryHandleKey(co, ch);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case EV_MOUSE:</div><div class='del'>-	    if ((ev.u.mouse.type == MOUSE_BUTTON_DOWN) &amp;&amp;</div><div class='del'>-		(en-&gt;flags ^ NEWT_FLAG_HIDDEN)) {</div><div class='del'>-		if (strlen(en-&gt;buf) &gt;= (size_t) (ev.u.mouse.x - co-&gt;left)) {</div><div class='del'>-		    en-&gt;cursorPosition = ev.u.mouse.x - co-&gt;left;</div><div class='del'>-		    newtGotorc(co-&gt;top,</div><div class='del'>-			       co-&gt;left +(en-&gt;cursorPosition - en-&gt;firstChar));</div><div class='del'>-		} else {</div><div class='del'>-		    en-&gt;cursorPosition = strlen(en-&gt;buf);</div><div class='del'>-		    newtGotorc(co-&gt;top,</div><div class='del'>-			       co-&gt;left +(en-&gt;cursorPosition - en-&gt;firstChar));</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    } else</div><div class='del'>-	er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult entryHandleKey(newtComponent co, int key) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    char * chptr, * insPoint;</div><div class='del'>-</div><div class='del'>-    er.result = ER_SWALLOWED;</div><div class='del'>-    switch (key) {</div><div class='del'>-      case '\r':				/* Return */</div><div class='del'>-	if (en-&gt;flags &amp; NEWT_FLAG_RETURNEXIT) {</div><div class='del'>-	    er.result = ER_EXITFORM;</div><div class='del'>-	} else {</div><div class='del'>-	    er.result = ER_NEXTCOMP;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\001':				/* ^A */</div><div class='del'>-      case NEWT_KEY_HOME:</div><div class='del'>-	en-&gt;cursorPosition = 0;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\005':				/* ^E */</div><div class='del'>-      case NEWT_KEY_END:</div><div class='del'>-	en-&gt;cursorPosition = en-&gt;bufUsed;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\013':				/* ^K */</div><div class='del'>-	en-&gt;bufUsed = en-&gt;cursorPosition;</div><div class='del'>-	memset(en-&gt;buf + en-&gt;bufUsed, 0, en-&gt;bufAlloced - en-&gt;bufUsed);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\002':				/* ^B */</div><div class='del'>-      case NEWT_KEY_LEFT:</div><div class='del'>-	if (en-&gt;cursorPosition)</div><div class='del'>-	    en-&gt;cursorPosition--;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\004':</div><div class='del'>-      case NEWT_KEY_DELETE:</div><div class='del'>-	chptr = en-&gt;buf + en-&gt;cursorPosition;</div><div class='del'>-	if (*chptr) {</div><div class='del'>-	    chptr++;</div><div class='del'>-	    while (*chptr) {</div><div class='del'>-		*(chptr - 1) = *chptr;</div><div class='del'>-		chptr++;</div><div class='del'>-	    }</div><div class='del'>-	    *(chptr - 1) = '\0';</div><div class='del'>-	    en-&gt;bufUsed--;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case NEWT_KEY_BKSPC:</div><div class='del'>-	if (en-&gt;cursorPosition) {</div><div class='del'>-	    /* if this isn't true, there's nothing to erase */</div><div class='del'>-	    chptr = en-&gt;buf + en-&gt;cursorPosition;</div><div class='del'>-	    en-&gt;bufUsed--;</div><div class='del'>-	    en-&gt;cursorPosition--;</div><div class='del'>-	    while (*chptr) {</div><div class='del'>-		*(chptr - 1) = *chptr;</div><div class='del'>-		chptr++;</div><div class='del'>-	    }</div><div class='del'>-	    *(chptr - 1) = '\0';</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case '\006':				/* ^B */</div><div class='del'>-      case NEWT_KEY_RIGHT:</div><div class='del'>-	if (en-&gt;cursorPosition &lt; en-&gt;bufUsed)</div><div class='del'>-	    en-&gt;cursorPosition++;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      default:</div><div class='del'>-	if ((key &gt;= 0x20 &amp;&amp; key &lt;= 0x7e) || (key &gt;= 0xa0 &amp;&amp; key &lt;= 0xff)) {</div><div class='del'>-	    if (!(en-&gt;flags &amp; NEWT_FLAG_SCROLL) &amp;&amp; en-&gt;bufUsed &gt;= co-&gt;width) {</div><div class='del'>-		SLtt_beep();</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if ((en-&gt;bufUsed + 1) == en-&gt;bufAlloced) {</div><div class='del'>-		en-&gt;bufAlloced += 20;</div><div class='del'>-		en-&gt;buf = realloc(en-&gt;buf, en-&gt;bufAlloced);</div><div class='del'>-		if (en-&gt;resultPtr) *en-&gt;resultPtr = en-&gt;buf;</div><div class='del'>-		memset(en-&gt;buf + en-&gt;bufUsed + 1, 0, 20);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (en-&gt;cursorPosition == en-&gt;bufUsed) {</div><div class='del'>-		en-&gt;bufUsed++;</div><div class='del'>-	    } else {</div><div class='del'>-		/* insert the new character */</div><div class='del'>-</div><div class='del'>-		/* chptr is the last character in the string */</div><div class='del'>-		chptr = (en-&gt;buf + en-&gt;bufUsed) - 1;</div><div class='del'>-		if ((en-&gt;bufUsed + 1) == en-&gt;bufAlloced) {</div><div class='del'>-		    /* this string fills the buffer, so clip it */</div><div class='del'>-		    chptr--;</div><div class='del'>-		} else</div><div class='del'>-		    en-&gt;bufUsed++;</div><div class='del'>-</div><div class='del'>-		insPoint = en-&gt;buf + en-&gt;cursorPosition;</div><div class='del'>-</div><div class='del'>-		while (chptr &gt;= insPoint) {</div><div class='del'>-		    *(chptr + 1) = *chptr;</div><div class='del'>-		    chptr--;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    en-&gt;buf[en-&gt;cursorPosition++] = key;</div><div class='del'>-	} else {</div><div class='del'>-	    er.result = ER_IGNORED;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    entryDraw(co);</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * newtEntryGetValue(newtComponent co) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    return en-&gt;buf;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data) {</div><div class='del'>-    struct entry * en = co-&gt;data;</div><div class='del'>-    en-&gt;filter = filter;</div><div class='del'>-    en-&gt;filterData = data;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/form.c b/mdk-stage1/newt/form.c<br/>deleted file mode 100644<br/>index 4ad465e38..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/form.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/form.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,712 +0,0 @@</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/****************************************************************************</div><div class='del'>-    These forms handle vertical scrolling of components with a height of 1</div><div class='del'>-</div><div class='del'>-    Horizontal scrolling won't work, and scrolling large widgets will fail</div><div class='del'>-    miserably. It shouldn't be too hard to fix either of those if anyone</div><div class='del'>-    cares to. I only use scrolling for listboxes and text boxes though so</div><div class='del'>-    I didn't bother.</div><div class='del'>-*****************************************************************************/</div><div class='del'>-</div><div class='del'>-struct element {</div><div class='del'>-    int top, left;		/* Actual, not virtual. These are translated */</div><div class='del'>-    newtComponent co;		/* into actual through vertOffset */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct fdInfo {</div><div class='del'>-    int fd;</div><div class='del'>-    int flags;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct form {</div><div class='del'>-    int numCompsAlloced;</div><div class='del'>-    struct element * elements;</div><div class='del'>-    int numComps;</div><div class='del'>-    int currComp;</div><div class='del'>-    int fixedHeight;</div><div class='del'>-    int flags;</div><div class='del'>-    int vertOffset;</div><div class='del'>-    newtComponent vertBar, exitComp;</div><div class='del'>-    const char * help;</div><div class='del'>-    int numRows;</div><div class='del'>-    int * hotKeys;</div><div class='del'>-    int numHotKeys;</div><div class='del'>-    int background;</div><div class='del'>-    int beenSet;</div><div class='del'>-    int numFds;</div><div class='del'>-    struct fdInfo * fds;</div><div class='del'>-    int maxFd;</div><div class='del'>-    int timer;    /* in milliseconds */</div><div class='del'>-    struct timeval lastTimeout;</div><div class='del'>-    void * helpTag;</div><div class='del'>-    newtCallback helpCb;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void gotoComponent(struct form * form, int newComp);</div><div class='del'>-static struct eventResult formEvent(newtComponent co, struct event ev);</div><div class='del'>-static struct eventResult sendEvent(newtComponent comp, struct event ev);</div><div class='del'>-static void formPlace(newtComponent co, int left, int top);</div><div class='del'>-</div><div class='del'>-/* Global, ick */</div><div class='del'>-static newtCallback helpCallback;</div><div class='del'>-</div><div class='del'>-/* this isn't static as grid.c tests against it to find forms */</div><div class='del'>-struct componentOps formOps = {</div><div class='del'>-    newtDrawForm,</div><div class='del'>-    formEvent,</div><div class='del'>-    newtFormDestroy,</div><div class='del'>-    formPlace,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static inline int componentFits(newtComponent co, int compNum) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    struct element * el = form-&gt;elements + compNum;</div><div class='del'>-</div><div class='del'>-    if ((co-&gt;top + form-&gt;vertOffset) &gt; el-&gt;top) return 0;</div><div class='del'>-    if ((co-&gt;top + form-&gt;vertOffset + co-&gt;height) &lt;</div><div class='del'>-	    (el-&gt;top + el-&gt;co-&gt;height)) return 0;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtForm(newtComponent vertBar, void * help, int flags) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct form * form;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    form = malloc(sizeof(*form));</div><div class='del'>-    co-&gt;data = form;</div><div class='del'>-    co-&gt;width = 0;</div><div class='del'>-    co-&gt;height = 0;</div><div class='del'>-    co-&gt;top = -1;</div><div class='del'>-    co-&gt;left = -1;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-</div><div class='del'>-    co-&gt;takesFocus = 0;			/* we may have 0 components */</div><div class='del'>-    co-&gt;ops = &amp;formOps;</div><div class='del'>-</div><div class='del'>-    form-&gt;help = help;</div><div class='del'>-    form-&gt;flags = flags;</div><div class='del'>-    form-&gt;numCompsAlloced = 5;</div><div class='del'>-    form-&gt;numComps = 0;</div><div class='del'>-    form-&gt;currComp = -1;</div><div class='del'>-    form-&gt;vertOffset = 0;</div><div class='del'>-    form-&gt;fixedHeight = 0;</div><div class='del'>-    form-&gt;numRows = 0;</div><div class='del'>-    form-&gt;numFds = 0;</div><div class='del'>-    form-&gt;maxFd = 0;</div><div class='del'>-    form-&gt;fds = NULL;</div><div class='del'>-    form-&gt;beenSet = 0;</div><div class='del'>-    form-&gt;elements = malloc(sizeof(*(form-&gt;elements)) * form-&gt;numCompsAlloced);</div><div class='del'>-</div><div class='del'>-    form-&gt;background = COLORSET_WINDOW;</div><div class='del'>-    form-&gt;hotKeys = malloc(sizeof(int));</div><div class='del'>-    form-&gt;numHotKeys = 0;</div><div class='del'>-    form-&gt;timer = 0;</div><div class='del'>-    form-&gt;lastTimeout.tv_sec = form-&gt;lastTimeout.tv_usec = 0;</div><div class='del'>-    if (!(form-&gt;flags &amp; NEWT_FLAG_NOF12)) {</div><div class='del'>-	newtFormAddHotKey(co, NEWT_KEY_F12);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (vertBar)</div><div class='del'>-	form-&gt;vertBar = vertBar;</div><div class='del'>-    else</div><div class='del'>-	form-&gt;vertBar = NULL;</div><div class='del'>-</div><div class='del'>-    form-&gt;helpTag = help;</div><div class='del'>-    form-&gt;helpCb = helpCallback;</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtFormGetCurrent(newtComponent co) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    return form-&gt;elements[form-&gt;currComp].co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetCurrent(newtComponent co, newtComponent subco) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    int i, new;</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; form-&gt;numComps; i++) {</div><div class='del'>-	 if (form-&gt;elements[i].co == subco) break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (form-&gt;elements[i].co != subco) return;</div><div class='del'>-    new = i;</div><div class='del'>-</div><div class='del'>-    if (co-&gt;isMapped &amp;&amp; !componentFits(co, new)) {</div><div class='del'>-	gotoComponent(form, -1);</div><div class='del'>-	form-&gt;vertOffset = form-&gt;elements[new].top - co-&gt;top - 1;</div><div class='del'>-	if (form-&gt;vertOffset &gt; (form-&gt;numRows - co-&gt;height))</div><div class='del'>-	    form-&gt;vertOffset = form-&gt;numRows - co-&gt;height;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    gotoComponent(form, new);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetTimer(newtComponent co, int millisecs) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    form-&gt;timer = millisecs;</div><div class='del'>-    form-&gt;lastTimeout.tv_usec = 0;</div><div class='del'>-    form-&gt;lastTimeout.tv_sec = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetHeight(newtComponent co, int height) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    form-&gt;fixedHeight = 1;</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetWidth(newtComponent co, int width) {</div><div class='del'>-    co-&gt;width = width;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormAddComponent(newtComponent co, newtComponent newco) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;takesFocus = 1;</div><div class='del'>-</div><div class='del'>-    if (form-&gt;numCompsAlloced == form-&gt;numComps) {</div><div class='del'>-	form-&gt;numCompsAlloced += 5;</div><div class='del'>-	form-&gt;elements = realloc(form-&gt;elements,</div><div class='del'>-			    sizeof(*(form-&gt;elements)) * form-&gt;numCompsAlloced);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* we grab real values for these a bit later */</div><div class='del'>-    form-&gt;elements[form-&gt;numComps].left = -2;</div><div class='del'>-    form-&gt;elements[form-&gt;numComps].top = -2;</div><div class='del'>-    form-&gt;elements[form-&gt;numComps].co = newco;</div><div class='del'>-</div><div class='del'>-    if (newco-&gt;takesFocus &amp;&amp; form-&gt;currComp == -1)</div><div class='del'>-	form-&gt;currComp = form-&gt;numComps;</div><div class='del'>-</div><div class='del'>-    form-&gt;numComps++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormAddComponents(newtComponent co, ...) {</div><div class='del'>-    va_list ap;</div><div class='del'>-    newtComponent subco;</div><div class='del'>-</div><div class='del'>-    va_start(ap, co);</div><div class='del'>-</div><div class='del'>-    while ((subco = va_arg(ap, newtComponent)))</div><div class='del'>-	newtFormAddComponent(co, subco);</div><div class='del'>-</div><div class='del'>-    va_end(ap);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void formPlace(newtComponent co, int left, int top) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    int vertDelta, horizDelta;</div><div class='del'>-    struct element * el;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    newtFormSetSize(co);</div><div class='del'>-</div><div class='del'>-    vertDelta = top - co-&gt;top;</div><div class='del'>-    horizDelta = left - co-&gt;left;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-</div><div class='del'>-    for (i = 0, el = form-&gt;elements; i &lt; form-&gt;numComps; i++, el++) {</div><div class='del'>-	el-&gt;co-&gt;top += vertDelta;</div><div class='del'>-	el-&gt;top += vertDelta;</div><div class='del'>-	el-&gt;co-&gt;left += horizDelta;</div><div class='del'>-	el-&gt;left += horizDelta;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtDrawForm(newtComponent co) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    struct element * el;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    newtFormSetSize(co);</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(form-&gt;background);</div><div class='del'>-    newtClearBox(co-&gt;left, co-&gt;top, co-&gt;width, co-&gt;height);</div><div class='del'>-    for (i = 0, el = form-&gt;elements; i &lt; form-&gt;numComps; i++, el++) {</div><div class='del'>-	/* the scrollbar *always* fits somewhere */</div><div class='del'>-	if (el-&gt;co == form-&gt;vertBar) {</div><div class='del'>-	    el-&gt;co-&gt;ops-&gt;mapped(el-&gt;co, 1);</div><div class='del'>-	    el-&gt;co-&gt;ops-&gt;draw(el-&gt;co);</div><div class='del'>-	} else {</div><div class='del'>-	    /* only draw it if it'll fit on the screen vertically */</div><div class='del'>-	    if (componentFits(co, i)) {</div><div class='del'>-		el-&gt;co-&gt;top = el-&gt;top - form-&gt;vertOffset;</div><div class='del'>-		el-&gt;co-&gt;ops-&gt;mapped(el-&gt;co, 1);</div><div class='del'>-		el-&gt;co-&gt;ops-&gt;draw(el-&gt;co);</div><div class='del'>-	    } else {</div><div class='del'>-		el-&gt;co-&gt;ops-&gt;mapped(el-&gt;co, 0);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (form-&gt;vertBar)</div><div class='del'>-	newtScrollbarSet(form-&gt;vertBar, form-&gt;vertOffset,</div><div class='del'>-			 form-&gt;numRows - co-&gt;height);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult formEvent(newtComponent co, struct event ev) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    newtComponent subco = form-&gt;elements[form-&gt;currComp].co;</div><div class='del'>-    int new, wrap = 0;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    int dir = 0, page = 0;</div><div class='del'>-    int i, num, found;</div><div class='del'>-    struct element * el;</div><div class='del'>-</div><div class='del'>-    er.result = ER_IGNORED;</div><div class='del'>-    if (!form-&gt;numComps) return er;</div><div class='del'>-</div><div class='del'>-    subco = form-&gt;elements[form-&gt;currComp].co;</div><div class='del'>-</div><div class='del'>-    switch (ev.when) {</div><div class='del'>-      case EV_EARLY:</div><div class='del'>-	  if (ev.event == EV_KEYPRESS) {</div><div class='del'>-	    if (ev.u.key == NEWT_KEY_TAB) {</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = 1;</div><div class='del'>-		wrap = 1;</div><div class='del'>-	    } else if (ev.u.key == NEWT_KEY_UNTAB) {</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = -1;</div><div class='del'>-		wrap = 1;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (form-&gt;numComps) {</div><div class='del'>-	    i = form-&gt;currComp;</div><div class='del'>-	    num = 0;</div><div class='del'>-	    while (er.result == ER_IGNORED &amp;&amp; num != form-&gt;numComps ) {</div><div class='del'>-		er = form-&gt;elements[i].co-&gt;ops-&gt;event(form-&gt;elements[i].co, ev);</div><div class='del'>-</div><div class='del'>-		num++;</div><div class='del'>-		i++;</div><div class='del'>-		if (i == form-&gt;numComps) i = 0;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case EV_NORMAL:</div><div class='del'>-	  if (ev.event == EV_MOUSE) {</div><div class='del'>-	      found = 0;</div><div class='del'>-	      for (i = 0, el = form-&gt;elements; i &lt; form-&gt;numComps; i++, el++) {</div><div class='del'>-		  if ((el-&gt;co-&gt;top &lt;= ev.u.mouse.y) &amp;&amp;</div><div class='del'>-		      (el-&gt;co-&gt;top + el-&gt;co-&gt;height &gt; ev.u.mouse.y) &amp;&amp;</div><div class='del'>-		      (el-&gt;co-&gt;left &lt;= ev.u.mouse.x) &amp;&amp;</div><div class='del'>-		      (el-&gt;co-&gt;left + el-&gt;co-&gt;width &gt; ev.u.mouse.x)) {</div><div class='del'>-		      found = 1;</div><div class='del'>-		      if (el-&gt;co-&gt;takesFocus) {</div><div class='del'>-			  gotoComponent(form, i);</div><div class='del'>-			  subco = form-&gt;elements[form-&gt;currComp].co;</div><div class='del'>-		      }</div><div class='del'>-		  }</div><div class='del'>-		  /* If we did not find a co to send this event to, we</div><div class='del'>-		     should just swallow the event here. */</div><div class='del'>-	      }</div><div class='del'>-	      if (!found) {</div><div class='del'>-		  er.result = ER_SWALLOWED;</div><div class='del'>-</div><div class='del'>-		  return er;</div><div class='del'>-	      }</div><div class='del'>-	  }</div><div class='del'>-	er = subco-&gt;ops-&gt;event(subco, ev);</div><div class='del'>-	switch (er.result) {</div><div class='del'>-	  case ER_NEXTCOMP:</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    dir = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case ER_EXITFORM:</div><div class='del'>-	    form-&gt;exitComp = subco;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  default:</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case EV_LATE:</div><div class='del'>-	er = subco-&gt;ops-&gt;event(subco, ev);</div><div class='del'>-</div><div class='del'>-	if (er.result == ER_IGNORED) {</div><div class='del'>-	    switch (ev.u.key) {</div><div class='del'>-	      case NEWT_KEY_UP:</div><div class='del'>-	      case NEWT_KEY_LEFT:</div><div class='del'>-	      case NEWT_KEY_BKSPC:</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = -1;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	      case NEWT_KEY_DOWN:</div><div class='del'>-	      case NEWT_KEY_RIGHT:</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = 1;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	     case NEWT_KEY_PGUP:</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = -1;</div><div class='del'>-		page = 1;</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	     case NEWT_KEY_PGDN:</div><div class='del'>-		er.result = ER_SWALLOWED;</div><div class='del'>-		dir = 1;</div><div class='del'>-		page = 1;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (dir) {</div><div class='del'>-	new = form-&gt;currComp;</div><div class='del'>-</div><div class='del'>-	if (page) {</div><div class='del'>-	    new += dir * co-&gt;height;</div><div class='del'>-	    if (new &lt; 0)</div><div class='del'>-		new = 0;</div><div class='del'>-	    else if (new &gt;= form-&gt;numComps)</div><div class='del'>-		new = (form-&gt;numComps - 1);</div><div class='del'>-</div><div class='del'>-	    while (!form-&gt;elements[new].co-&gt;takesFocus)</div><div class='del'>-		new = new - dir;</div><div class='del'>-	} else {</div><div class='del'>-	    do {</div><div class='del'>-		new += dir;</div><div class='del'>-</div><div class='del'>-		if (wrap) {</div><div class='del'>-		    if (new &lt; 0)</div><div class='del'>-			new = form-&gt;numComps - 1;</div><div class='del'>-		    else if (new &gt;= form-&gt;numComps)</div><div class='del'>-			new = 0;</div><div class='del'>-		} else if (new &lt; 0 || new &gt;= form-&gt;numComps)</div><div class='del'>-		    return er;</div><div class='del'>-	    } while (!form-&gt;elements[new].co-&gt;takesFocus);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* make sure this component is visible */</div><div class='del'>-	if (!componentFits(co, new)) {</div><div class='del'>-	    gotoComponent(form, -1);</div><div class='del'>-</div><div class='del'>-	    if (dir &lt; 0) {</div><div class='del'>-		/* make the new component the first one */</div><div class='del'>-		form-&gt;vertOffset = form-&gt;elements[new].top - co-&gt;top;</div><div class='del'>-	    } else {</div><div class='del'>-		/* make the new component the last one */</div><div class='del'>-		form-&gt;vertOffset = (form-&gt;elements[new].top +</div><div class='del'>-					form-&gt;elements[new].co-&gt;height) -</div><div class='del'>-				    (co-&gt;top + co-&gt;height);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (form-&gt;vertOffset &lt; 0) form-&gt;vertOffset = 0;</div><div class='del'>-	    if (form-&gt;vertOffset &gt; (form-&gt;numRows - co-&gt;height))</div><div class='del'>-		form-&gt;vertOffset = form-&gt;numRows - co-&gt;height;</div><div class='del'>-</div><div class='del'>-	    newtDrawForm(co);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	gotoComponent(form, new);</div><div class='del'>-	er.result = ER_SWALLOWED;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* this also destroys all of the components on the form */</div><div class='del'>-void newtFormDestroy(newtComponent co) {</div><div class='del'>-    newtComponent subco;</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    /* first, destroy all of the components */</div><div class='del'>-    for (i = 0; i &lt; form-&gt;numComps; i++) {</div><div class='del'>-	subco = form-&gt;elements[i].co;</div><div class='del'>-	if (subco-&gt;ops-&gt;destroy) {</div><div class='del'>-	    subco-&gt;ops-&gt;destroy(subco);</div><div class='del'>-	} else {</div><div class='del'>-	    if (subco-&gt;data) free(subco-&gt;data);</div><div class='del'>-	    free(subco);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (form-&gt;hotKeys) free(form-&gt;hotKeys);</div><div class='del'>-</div><div class='del'>-    free(form-&gt;elements);</div><div class='del'>-    free(form);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtRunForm(newtComponent co) {</div><div class='del'>-    struct newtExitStruct es;</div><div class='del'>-</div><div class='del'>-    newtFormRun(co, &amp;es);</div><div class='del'>-    if (es.reason == NEWT_EXIT_HOTKEY) {</div><div class='del'>-	if (es.u.key == NEWT_KEY_F12) {</div><div class='del'>-	    es.reason = NEWT_EXIT_COMPONENT;</div><div class='del'>-	    es.u.co = co;</div><div class='del'>-	} else {</div><div class='del'>-	    return NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return es.u.co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormAddHotKey(newtComponent co, int key) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    form-&gt;numHotKeys++;</div><div class='del'>-    form-&gt;hotKeys = realloc(form-&gt;hotKeys, sizeof(int) * form-&gt;numHotKeys);</div><div class='del'>-    form-&gt;hotKeys[form-&gt;numHotKeys - 1] = key;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetSize(newtComponent co) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    int delta, i;</div><div class='del'>-    struct element * el;</div><div class='del'>-</div><div class='del'>-    if (form-&gt;beenSet) return;</div><div class='del'>-</div><div class='del'>-    form-&gt;beenSet = 1;</div><div class='del'>-</div><div class='del'>-    if (!form-&gt;numComps) return;</div><div class='del'>-</div><div class='del'>-    co-&gt;width = 0;</div><div class='del'>-    if (!form-&gt;fixedHeight) co-&gt;height = 0;</div><div class='del'>-</div><div class='del'>-    co-&gt;top = form-&gt;elements[0].co-&gt;top;</div><div class='del'>-    co-&gt;left = form-&gt;elements[0].co-&gt;left;</div><div class='del'>-    for (i = 0, el = form-&gt;elements; i &lt; form-&gt;numComps; i++, el++) {</div><div class='del'>-	if (el-&gt;co-&gt;ops == &amp;formOps)</div><div class='del'>-	    newtFormSetSize(el-&gt;co);</div><div class='del'>-</div><div class='del'>- 	el-&gt;left = el-&gt;co-&gt;left;</div><div class='del'>- 	el-&gt;top = el-&gt;co-&gt;top;</div><div class='del'>-</div><div class='del'>-	if (co-&gt;left &gt; el-&gt;co-&gt;left) {</div><div class='del'>-	    delta = co-&gt;left - el-&gt;co-&gt;left;</div><div class='del'>-	    co-&gt;left -= delta;</div><div class='del'>-	    co-&gt;width += delta;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (co-&gt;top &gt; el-&gt;co-&gt;top) {</div><div class='del'>-	    delta = co-&gt;top - el-&gt;co-&gt;top;</div><div class='del'>-	    co-&gt;top -= delta;</div><div class='del'>-	    if (!form-&gt;fixedHeight)</div><div class='del'>-		co-&gt;height += delta;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((co-&gt;left + co-&gt;width) &lt; (el-&gt;co-&gt;left + el-&gt;co-&gt;width))</div><div class='del'>-	    co-&gt;width = (el-&gt;co-&gt;left + el-&gt;co-&gt;width) - co-&gt;left;</div><div class='del'>-</div><div class='del'>-	if (!form-&gt;fixedHeight) {</div><div class='del'>-	    if ((co-&gt;top + co-&gt;height) &lt; (el-&gt;co-&gt;top + el-&gt;co-&gt;height))</div><div class='del'>-		co-&gt;height = (el-&gt;co-&gt;top + el-&gt;co-&gt;height) - co-&gt;top;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((el-&gt;co-&gt;top + el-&gt;co-&gt;height - co-&gt;top) &gt; form-&gt;numRows) {</div><div class='del'>-	    form-&gt;numRows = el-&gt;co-&gt;top + el-&gt;co-&gt;height - co-&gt;top;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormRun(newtComponent co, struct newtExitStruct * es) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-    struct event ev;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    int key, i, max;</div><div class='del'>-    int done = 0;</div><div class='del'>-    fd_set readSet, writeSet;</div><div class='del'>-    struct timeval nextTimeout, now, timeout;</div><div class='del'>-</div><div class='del'>-    newtFormSetSize(co);</div><div class='del'>-    /* draw all of the components */</div><div class='del'>-    newtDrawForm(co);</div><div class='del'>-</div><div class='del'>-    if (form-&gt;currComp == -1) {</div><div class='del'>-	gotoComponent(form, 0);</div><div class='del'>-    } else</div><div class='del'>-	gotoComponent(form, form-&gt;currComp);</div><div class='del'>-</div><div class='del'>-    while (!done) {</div><div class='del'>-	newtRefresh();</div><div class='del'>-</div><div class='del'>-	FD_ZERO(&amp;readSet);</div><div class='del'>-	FD_ZERO(&amp;writeSet);</div><div class='del'>-	FD_SET(0, &amp;readSet);</div><div class='del'>-	max = form-&gt;maxFd;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; form-&gt;numFds; i++) {</div><div class='del'>-	    if (form-&gt;fds[i].flags &amp; NEWT_FD_READ)</div><div class='del'>-		FD_SET(form-&gt;fds[i].fd, &amp;readSet);</div><div class='del'>-	    if (form-&gt;fds[i].flags &amp; NEWT_FD_WRITE)</div><div class='del'>-		FD_SET(form-&gt;fds[i].fd, &amp;writeSet);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (form-&gt;timer) {</div><div class='del'>-	    /* Calculate when we next need to return with a timeout. Do</div><div class='del'>-	       this inside the loop in case a callback resets the timer. */</div><div class='del'>-	    if (!form-&gt;lastTimeout.tv_sec &amp;&amp; !form-&gt;lastTimeout.tv_usec)</div><div class='del'>-		gettimeofday(&amp;form-&gt;lastTimeout, NULL);</div><div class='del'>-</div><div class='del'>-	    nextTimeout.tv_sec = form-&gt;lastTimeout.tv_sec + </div><div class='del'>-		    (form-&gt;timer / 1000);</div><div class='del'>-	    nextTimeout.tv_usec = form-&gt;lastTimeout.tv_usec + </div><div class='del'>-				    (form-&gt;timer % 1000) * 1000;</div><div class='del'>-</div><div class='del'>-	    gettimeofday(&amp;now, 0);</div><div class='del'>-</div><div class='del'>-	    if (now.tv_sec &gt; nextTimeout.tv_sec) {</div><div class='del'>-		timeout.tv_sec = timeout.tv_usec = 0;</div><div class='del'>-	    } else if (now.tv_sec == nextTimeout.tv_sec) {</div><div class='del'>-		timeout.tv_sec = 0;</div><div class='del'>-		if (now.tv_usec &gt; nextTimeout.tv_usec)</div><div class='del'>-		    timeout.tv_usec = 0;</div><div class='del'>-		else</div><div class='del'>-		    timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;</div><div class='del'>-	    } else if (now.tv_sec &lt; nextTimeout.tv_sec) {</div><div class='del'>-		timeout.tv_sec = nextTimeout.tv_sec - now.tv_sec;</div><div class='del'>-		if (now.tv_usec &gt; nextTimeout.tv_usec)</div><div class='del'>-		    timeout.tv_sec--,</div><div class='del'>-		    timeout.tv_usec = nextTimeout.tv_usec + 1000000 -</div><div class='del'>-					now.tv_usec;</div><div class='del'>-		else </div><div class='del'>-		    timeout.tv_usec = nextTimeout.tv_usec - now.tv_usec;</div><div class='del'>-	    }</div><div class='del'>-	} else {</div><div class='del'>-	    timeout.tv_sec = timeout.tv_usec = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	i = select(max + 1, &amp;readSet, &amp;writeSet, NULL, </div><div class='del'>-			form-&gt;timer ? &amp;timeout : NULL);</div><div class='del'>-	if (i &lt; 0) continue;	/* ?? What should we do here? */</div><div class='del'>-</div><div class='del'>-	if (i == 0) {</div><div class='del'>-	    done = 1;</div><div class='del'>-	    es-&gt;reason = NEWT_EXIT_TIMER;</div><div class='del'>-	    gettimeofday(&amp;form-&gt;lastTimeout, NULL);</div><div class='del'>-	} else</div><div class='del'>-	{</div><div class='del'>-	    if (FD_ISSET(0, &amp;readSet)) {</div><div class='del'>-</div><div class='del'>-		key = newtGetKey();</div><div class='del'>-</div><div class='del'>-		if (key == NEWT_KEY_RESIZE) {</div><div class='del'>-		    /* newtResizeScreen(1); */</div><div class='del'>-		    continue;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		for (i = 0; i &lt; form-&gt;numHotKeys; i++) {</div><div class='del'>-		    if (form-&gt;hotKeys[i] == key) {</div><div class='del'>-			es-&gt;reason = NEWT_EXIT_HOTKEY;</div><div class='del'>-			es-&gt;u.key = key;</div><div class='del'>-			done = 1;</div><div class='del'>-			break;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (key == NEWT_KEY_F1 &amp;&amp; form-&gt;helpTag &amp;&amp; form-&gt;helpCb)</div><div class='del'>-		    form-&gt;helpCb(co, form-&gt;helpTag);</div><div class='del'>-</div><div class='del'>-		if (!done) {</div><div class='del'>-		    ev.event = EV_KEYPRESS;</div><div class='del'>-		    ev.u.key = key;</div><div class='del'>-</div><div class='del'>-		    er = sendEvent(co, ev);</div><div class='del'>-</div><div class='del'>-		    if (er.result == ER_EXITFORM) {</div><div class='del'>-			done = 1;</div><div class='del'>-			es-&gt;reason = NEWT_EXIT_COMPONENT;</div><div class='del'>-			es-&gt;u.co = form-&gt;exitComp;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    } else {</div><div class='del'>-		es-&gt;reason = NEWT_EXIT_FDREADY;</div><div class='del'>-		done = 1;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    newtRefresh();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult sendEvent(newtComponent co, struct event ev) {</div><div class='del'>-    struct eventResult er;</div><div class='del'>-</div><div class='del'>-    ev.when = EV_EARLY;</div><div class='del'>-    er = co-&gt;ops-&gt;event(co, ev);</div><div class='del'>-</div><div class='del'>-    if (er.result == ER_IGNORED) {</div><div class='del'>-	ev.when = EV_NORMAL;</div><div class='del'>-	er = co-&gt;ops-&gt;event(co, ev);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (er.result == ER_IGNORED) {</div><div class='del'>-	ev.when = EV_LATE;</div><div class='del'>-	er = co-&gt;ops-&gt;event(co, ev);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void gotoComponent(struct form * form, int newComp) {</div><div class='del'>-    struct event ev;</div><div class='del'>-</div><div class='del'>-    if (form-&gt;currComp != -1) {</div><div class='del'>-	ev.event = EV_UNFOCUS;</div><div class='del'>-	sendEvent(form-&gt;elements[form-&gt;currComp].co, ev);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    form-&gt;currComp = newComp;</div><div class='del'>-</div><div class='del'>-    if (form-&gt;currComp != -1) {</div><div class='del'>-	ev.event = EV_FOCUS;</div><div class='del'>-	ev.when = EV_NORMAL;</div><div class='del'>-	sendEvent(form-&gt;elements[form-&gt;currComp].co, ev);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtComponentAddCallback(newtComponent co, newtCallback f, void * data) {</div><div class='del'>-    co-&gt;callback = f;</div><div class='del'>-    co-&gt;callbackData = data;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtComponentTakesFocus(newtComponent co, int val) {</div><div class='del'>-    co-&gt;takesFocus = val;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormSetBackground(newtComponent co, int color) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    form-&gt;background = color;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFormWatchFd(newtComponent co, int fd, int fdFlags) {</div><div class='del'>-    struct form * form = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    form-&gt;fds = realloc(form-&gt;fds, (form-&gt;numFds + 1) * sizeof(*form-&gt;fds));</div><div class='del'>-    form-&gt;fds[form-&gt;numFds].fd = fd;</div><div class='del'>-    form-&gt;fds[form-&gt;numFds++].flags = fdFlags;</div><div class='del'>-    if (form-&gt;maxFd &lt; fd) form-&gt;maxFd = fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtSetHelpCallback(newtCallback cb) {</div><div class='del'>-    helpCallback = cb;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/grid.c b/mdk-stage1/newt/grid.c<br/>deleted file mode 100644<br/>index 37d2b2e74..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/grid.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/grid.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,389 +0,0 @@</div><div class='del'>-#include &lt;alloca.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct gridField {</div><div class='del'>-    enum newtGridElement type;</div><div class='del'>-    union {</div><div class='del'>-	newtGrid grid;</div><div class='del'>-	newtComponent co;</div><div class='del'>-    } u;</div><div class='del'>-    int padLeft, padTop, padRight, padBottom;</div><div class='del'>-    int anchor;</div><div class='del'>-    int flags;</div><div class='del'>-}; </div><div class='del'>-</div><div class='del'>-struct grid_s {</div><div class='del'>-    int rows, cols;</div><div class='del'>-    int width, height;		/* totals, -1 means unknown */</div><div class='del'>-    struct gridField ** fields;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* this is a bit of a hack */</div><div class='del'>-extern struct componentOps formOps[];</div><div class='del'>-</div><div class='del'>-newtGrid newtCreateGrid(int cols, int rows) {</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    grid = malloc(sizeof(*grid));</div><div class='del'>-    grid-&gt;rows = rows;</div><div class='del'>-    grid-&gt;cols = cols;</div><div class='del'>-</div><div class='del'>-    grid-&gt;fields = malloc(sizeof(*grid-&gt;fields) * cols);</div><div class='del'>-    while (cols--) {</div><div class='del'>-	grid-&gt;fields[cols] = malloc(sizeof(**(grid-&gt;fields)) * rows);</div><div class='del'>-	memset(grid-&gt;fields[cols], 0, sizeof(**(grid-&gt;fields)) * rows);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    grid-&gt;width = grid-&gt;height = -1;</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridSetField(newtGrid grid, int col, int row, </div><div class='del'>-		      enum newtGridElement type, void * val, int padLeft,</div><div class='del'>-		      int padTop, int padRight, int padBottom, int anchor,</div><div class='del'>-		      int flags) {</div><div class='del'>-    struct gridField * field = &amp;grid-&gt;fields[col][row];</div><div class='del'>-</div><div class='del'>-    if (field-&gt;type == NEWT_GRID_SUBGRID) </div><div class='del'>-	newtGridFree(field-&gt;u.grid, 1);</div><div class='del'>-</div><div class='del'>-    field-&gt;type = type;</div><div class='del'>-    field-&gt;u.co = (void *) val;</div><div class='del'>-</div><div class='del'>-    field-&gt;padLeft = padLeft;</div><div class='del'>-    field-&gt;padRight = padRight;</div><div class='del'>-    field-&gt;padTop = padTop;</div><div class='del'>-    field-&gt;padBottom = padBottom;</div><div class='del'>-    field-&gt;anchor = anchor;</div><div class='del'>-    field-&gt;flags = flags;</div><div class='del'>-</div><div class='del'>-    grid-&gt;width = grid-&gt;height = -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void distSpace(int extra, int items, int * list) {</div><div class='del'>-    int all, some, i;</div><div class='del'>-</div><div class='del'>-    all = extra / items;</div><div class='del'>-    some = extra % items;</div><div class='del'>-    for (i = 0; i &lt; items; i++) {</div><div class='del'>-	list[i] += all;</div><div class='del'>-	if (some) {</div><div class='del'>-	    list[i]++;</div><div class='del'>-	    some--;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void shuffleGrid(newtGrid grid, int left, int top, int set) {</div><div class='del'>-    struct gridField * field;</div><div class='del'>-    int row, col;</div><div class='del'>-    int i, j;</div><div class='del'>-    int minWidth, minHeight;</div><div class='del'>-    int * widths, * heights;</div><div class='del'>-    int thisLeft, thisTop;</div><div class='del'>-    int x, y, remx, remy;</div><div class='del'>-</div><div class='del'>-    widths = alloca(sizeof(*widths) * grid-&gt;cols);</div><div class='del'>-    memset(widths, 0, sizeof(*widths) * grid-&gt;cols);</div><div class='del'>-    heights = alloca(sizeof(*heights) * grid-&gt;rows);</div><div class='del'>-    memset(heights, 0, sizeof(*heights) * grid-&gt;rows);</div><div class='del'>-</div><div class='del'>-    minWidth = 0;</div><div class='del'>-    for (row = 0; row &lt; grid-&gt;rows; row++) {</div><div class='del'>-	i = 0;</div><div class='del'>-	for (col = 0; col &lt; grid-&gt;cols; col++) {</div><div class='del'>-	    field = &amp;grid-&gt;fields[col][row];</div><div class='del'>-	    if (field-&gt;type == NEWT_GRID_SUBGRID) {</div><div class='del'>-		/* we'll have to redo this later */</div><div class='del'>-		if (field-&gt;u.grid-&gt;width == -1) </div><div class='del'>-		    shuffleGrid(field-&gt;u.grid, left, top, 0);</div><div class='del'>-		j = field-&gt;u.grid-&gt;width;</div><div class='del'>-	    } else if (field-&gt;type == NEWT_GRID_COMPONENT) {</div><div class='del'>-		if (field-&gt;u.co-&gt;ops == formOps)</div><div class='del'>-		    newtFormSetSize(field-&gt;u.co);</div><div class='del'>-		j = field-&gt;u.co-&gt;width;</div><div class='del'>-	    } else </div><div class='del'>-		j = 0;</div><div class='del'>-</div><div class='del'>-	    j += field-&gt;padLeft + field-&gt;padRight;</div><div class='del'>-</div><div class='del'>-	    if (j &gt; widths[col]) widths[col] = j;</div><div class='del'>-	    i += widths[col];</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (i &gt; minWidth) minWidth = i;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    minHeight = 0;</div><div class='del'>-    for (col = 0; col &lt; grid-&gt;cols; col++) {</div><div class='del'>-	i = 0;</div><div class='del'>-	for (row = 0; row &lt; grid-&gt;rows; row++) {</div><div class='del'>-	    field = &amp;grid-&gt;fields[col][row];</div><div class='del'>-	    if (field-&gt;type == NEWT_GRID_SUBGRID) {</div><div class='del'>-		/* we'll have to redo this later */</div><div class='del'>-		if (field-&gt;u.grid-&gt;height == -1) </div><div class='del'>-		    shuffleGrid(field-&gt;u.grid, 0, 0, 0);</div><div class='del'>-		j = field-&gt;u.grid-&gt;height;</div><div class='del'>-	    } else if (field-&gt;type == NEWT_GRID_COMPONENT){</div><div class='del'>-		j = field-&gt;u.co-&gt;height;</div><div class='del'>-	    } else </div><div class='del'>-		j = 0;</div><div class='del'>-</div><div class='del'>-	    j += field-&gt;padTop + field-&gt;padBottom;</div><div class='del'>-</div><div class='del'>-	    if (j &gt; heights[row]) heights[row] = j;</div><div class='del'>-	    i += heights[row];</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (i &gt; minHeight) minHeight = i;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* this catches the -1 case */</div><div class='del'>-    if (grid-&gt;width &lt; minWidth) grid-&gt;width = minWidth;		/* ack! */</div><div class='del'>-    if (grid-&gt;height &lt; minHeight) grid-&gt;height = minHeight;	/* ditto! */</div><div class='del'>-</div><div class='del'>-    if (!set) return;</div><div class='del'>-</div><div class='del'>-    distSpace(grid-&gt;width - minWidth, grid-&gt;cols, widths);</div><div class='del'>-    distSpace(grid-&gt;height - minHeight, grid-&gt;rows, heights);</div><div class='del'>-</div><div class='del'>-    thisTop = top;</div><div class='del'>-    for (row = 0; row &lt; grid-&gt;rows; row++) {</div><div class='del'>-	i = 0;</div><div class='del'>-	thisLeft = left;</div><div class='del'>-	for (col = 0; col &lt; grid-&gt;cols; col++) {</div><div class='del'>-	    field = &amp;grid-&gt;fields[col][row];</div><div class='del'>-</div><div class='del'>-	    if (field-&gt;type == NEWT_GRID_EMPTY) continue;</div><div class='del'>-</div><div class='del'>-	    x = thisLeft + field-&gt;padLeft;</div><div class='del'>-	    remx = widths[col] - field-&gt;padLeft - field-&gt;padRight;</div><div class='del'>-	    y = thisTop + field-&gt;padTop;</div><div class='del'>-	    remy = heights[row] - field-&gt;padTop - field-&gt;padBottom;</div><div class='del'>-</div><div class='del'>-	    if (field-&gt;type == NEWT_GRID_SUBGRID) {</div><div class='del'>-		remx -= field-&gt;u.grid-&gt;width;</div><div class='del'>-		remy -= field-&gt;u.grid-&gt;height;</div><div class='del'>-	    } else if (field-&gt;type == NEWT_GRID_COMPONENT) {</div><div class='del'>-		remx -= field-&gt;u.co-&gt;width;</div><div class='del'>-		remy -= field-&gt;u.co-&gt;height;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (!(field-&gt;flags &amp; NEWT_GRID_FLAG_GROWX)) {</div><div class='del'>-		if (field-&gt;anchor &amp; NEWT_ANCHOR_RIGHT)</div><div class='del'>-		    x += remx;</div><div class='del'>-		else if (!(field-&gt;anchor &amp; NEWT_ANCHOR_LEFT))</div><div class='del'>-		    x += (remx / 2);</div><div class='del'>-	    }</div><div class='del'>-	 </div><div class='del'>-	    if (!(field-&gt;flags &amp; NEWT_GRID_FLAG_GROWY)) {</div><div class='del'>-		if (field-&gt;anchor &amp; NEWT_ANCHOR_BOTTOM)</div><div class='del'>-		    y += remx;</div><div class='del'>-		else if (!(field-&gt;anchor &amp; NEWT_ANCHOR_TOP))</div><div class='del'>-		    y += (remy / 2);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (field-&gt;type == NEWT_GRID_SUBGRID) {</div><div class='del'>-		if (field-&gt;flags &amp; NEWT_GRID_FLAG_GROWX)</div><div class='del'>-		    field-&gt;u.grid-&gt;width = widths[col] - field-&gt;padLeft </div><div class='del'>-						- field-&gt;padRight;</div><div class='del'>-		if (field-&gt;flags &amp; NEWT_GRID_FLAG_GROWY)</div><div class='del'>-		    field-&gt;u.grid-&gt;height = heights[col] - field-&gt;padTop</div><div class='del'>-						- field-&gt;padBottom;</div><div class='del'>-</div><div class='del'>-		shuffleGrid(field-&gt;u.grid, x, y, 1);</div><div class='del'>-	    } else if (field-&gt;type == NEWT_GRID_COMPONENT) {</div><div class='del'>-		field-&gt;u.co-&gt;ops-&gt;place(field-&gt;u.co, x, y);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    thisLeft += widths[col];</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	thisTop += heights[row];</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridPlace(newtGrid grid, int left, int top) {</div><div class='del'>-    shuffleGrid(grid, left, top, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridFree(newtGrid grid, int recurse) {</div><div class='del'>-    int row, col;</div><div class='del'>-</div><div class='del'>-    for (col = 0; col &lt; grid-&gt;cols; col++) {</div><div class='del'>-	if (recurse) {</div><div class='del'>-	    for (row = 0; row &lt; grid-&gt;rows; row++) {</div><div class='del'>-		if (grid-&gt;fields[col][row].type == NEWT_GRID_SUBGRID)</div><div class='del'>-		    newtGridFree(grid-&gt;fields[col][row].u.grid, 1);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	free(grid-&gt;fields[col]);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    free(grid-&gt;fields);</div><div class='del'>-    free(grid);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridGetSize(newtGrid grid, int * width, int * height) {</div><div class='del'>-    if (grid-&gt;width == -1 || grid-&gt;height == -1) {</div><div class='del'>-	grid-&gt;width = grid-&gt;height = -1;</div><div class='del'>-	shuffleGrid(grid, 0, 0, 1);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *width = grid-&gt;width;</div><div class='del'>-    *height = grid-&gt;height;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridWrappedWindow(newtGrid grid, char * title) {</div><div class='del'>-    int width, height, offset = 0;</div><div class='del'>-</div><div class='del'>-    newtGridGetSize(grid, &amp;width, &amp;height);</div><div class='del'>-    if ((size_t)width &lt; strlen(title) + 2) {</div><div class='del'>-	offset = ((strlen(title) + 2) - width) / 2; </div><div class='del'>-	width = strlen(title) + 2;</div><div class='del'>-    }</div><div class='del'>-    newtCenteredWindow(width + 2, height + 2, title);</div><div class='del'>-    newtGridPlace(grid, 1 + offset, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top) {</div><div class='del'>-    int width, height;</div><div class='del'>-</div><div class='del'>-    newtGridGetSize(grid, &amp;width, &amp;height);</div><div class='del'>-    newtOpenWindow(left, top, width + 2, height + 2, title);</div><div class='del'>-    newtGridPlace(grid, 1, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, </div><div class='del'>-				 int recurse) {</div><div class='del'>-    int row, col;</div><div class='del'>-</div><div class='del'>-    for (col = 0; col &lt; grid-&gt;cols; col++) {</div><div class='del'>-	for (row = 0; row &lt; grid-&gt;rows; row++) {</div><div class='del'>-	    if (grid-&gt;fields[col][row].type == NEWT_GRID_SUBGRID &amp;&amp; recurse)</div><div class='del'>-		newtGridAddComponentsToForm(grid-&gt;fields[col][row].u.grid,</div><div class='del'>-					    form, 1);</div><div class='del'>-	    else if (grid-&gt;fields[col][row].type == NEWT_GRID_COMPONENT)</div><div class='del'>-		newtFormAddComponent(form, grid-&gt;fields[col][row].u.co);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* this handles up to 50 items */</div><div class='del'>-static newtGrid stackem(int isVert, enum newtGridElement type1, void * what1,</div><div class='del'>-			va_list args, int close) {</div><div class='del'>-    struct item {</div><div class='del'>-	enum newtGridElement type;</div><div class='del'>-	void * what;</div><div class='del'>-    } items[50];</div><div class='del'>-    int i, num;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-    </div><div class='del'>-    items[0].type = type1, items[0].what = what1, num = 1;</div><div class='del'>-    while (1) {</div><div class='del'>-	items[num].type = va_arg(args, enum newtGridElement);</div><div class='del'>-	if (items[num].type == NEWT_GRID_EMPTY) break;</div><div class='del'>-</div><div class='del'>-	items[num].what = va_arg(args, void *);</div><div class='del'>-	num++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(isVert ? 1 : num, isVert ? num : 1);</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; num; i++) {</div><div class='del'>-	newtGridSetField(grid, isVert ? 0 : i, isVert ? i : 0, </div><div class='del'>-			 items[i].type, items[i].what,</div><div class='del'>-			 close ? 0 : (i ? (isVert ? 0 : 1) : 0),</div><div class='del'>-			 close ? 0 : (i ? (isVert ? 1 : 0) : 0), 0, 0, 0, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridHCloseStacked(enum newtGridElement type1, void * what1, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    grid = stackem(0, type1, what1, args, 1);</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridVCloseStacked(enum newtGridElement type1, void * what1, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    grid = stackem(1, type1, what1, args, 1);</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridVStacked(enum newtGridElement type1, void * what1, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    grid = stackem(1, type1, what1, args, 0);</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    grid = stackem(0, type1, what1, args, 0);</div><div class='del'>-</div><div class='del'>-    va_start(args, what1);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle,</div><div class='del'>-			     newtGrid buttons) {</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(1, 3);</div><div class='del'>-    newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, text,</div><div class='del'>-		     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, middle,</div><div class='del'>-		     0, 1, 0, 0, 0, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttons,</div><div class='del'>-		     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle,</div><div class='del'>-			     newtGrid buttons) {</div><div class='del'>-    newtGrid grid;</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(1, 3);</div><div class='del'>-    newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, text,</div><div class='del'>-		     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 1, NEWT_GRID_COMPONENT, middle,</div><div class='del'>-		     0, 1, 0, 0, 0, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttons,</div><div class='del'>-		     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);</div><div class='del'>-</div><div class='del'>-    return grid;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/label.c b/mdk-stage1/newt/label.c<br/>deleted file mode 100644<br/>index f1a9cebbf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/label.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/label.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,81 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct label {</div><div class='del'>-    char * text;</div><div class='del'>-    int length;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void labelDraw(newtComponent co);</div><div class='del'>-static void labelDestroy(newtComponent co);</div><div class='del'>-</div><div class='del'>-static struct componentOps labelOps = {</div><div class='del'>-    labelDraw,</div><div class='del'>-    newtDefaultEventHandler,</div><div class='del'>-    labelDestroy,</div><div class='del'>-    newtDefaultPlaceHandler,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-newtComponent newtLabel(int left, int top, const char * text) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct label * la;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    la = malloc(sizeof(struct label));</div><div class='del'>-    co-&gt;data = la;</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;labelOps;</div><div class='del'>-</div><div class='del'>-    co-&gt;height = 1;</div><div class='del'>-    co-&gt;width = strlen(text);</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;takesFocus = 0;</div><div class='del'>-</div><div class='del'>-    la-&gt;length = strlen(text);</div><div class='del'>-    la-&gt;text = strdup(text);</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtLabelSetText(newtComponent co, const char * text) {</div><div class='del'>-    int newLength;</div><div class='del'>-    struct label * la = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    newLength = strlen(text);</div><div class='del'>-    if (newLength &lt;= la-&gt;length) {</div><div class='del'>-	memset(la-&gt;text, ' ', la-&gt;length);</div><div class='del'>-	memcpy(la-&gt;text, text, newLength);</div><div class='del'>-    } else {</div><div class='del'>-	free(la-&gt;text);</div><div class='del'>-	la-&gt;text = strdup(text);</div><div class='del'>-	la-&gt;length = newLength;</div><div class='del'>-	co-&gt;width = newLength;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    labelDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void labelDraw(newtComponent co) {</div><div class='del'>-    struct label * la = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (co-&gt;isMapped == -1) return;</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(COLORSET_LABEL);</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-    SLsmg_write_string(la-&gt;text);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void labelDestroy(newtComponent co) {</div><div class='del'>-    struct label * la = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    free(la-&gt;text);</div><div class='del'>-    free(la);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/listbox.c b/mdk-stage1/newt/listbox.c<br/>deleted file mode 100644<br/>index cdbf792ca..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/listbox.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/listbox.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,752 +0,0 @@</div><div class='del'>-/* This goofed-up box whacked into shape by Elliot Lee &lt;sopwith@cuc.edu&gt;</div><div class='del'>-   (from the original listbox by Erik Troan &lt;ewt@redhat.com&gt;)</div><div class='del'>-   and contributed to newt for use under the LGPL license.</div><div class='del'>-   Copyright (C) 1996, 1997 Elliot Lee */</div><div class='del'>-</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Linked list of items in the listbox */</div><div class='del'>-struct items {</div><div class='del'>-    char * text;</div><div class='del'>-    const void *data;</div><div class='del'>-    unsigned char isSelected;</div><div class='del'>-    struct items *next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Holds all the relevant information for this listbox */</div><div class='del'>-struct listbox {</div><div class='del'>-    newtComponent sb;   /* Scrollbar on right side of listbox */</div><div class='del'>-    int curWidth;	/* size of text w/o scrollbar or border*/</div><div class='del'>-    int curHeight;	/* size of text w/o border */</div><div class='del'>-    int sbAdjust;</div><div class='del'>-    int bdxAdjust, bdyAdjust;</div><div class='del'>-    int numItems, numSelected;</div><div class='del'>-    int userHasSetWidth;</div><div class='del'>-    int currItem, startShowItem; /* startShowItem is the first item displayed</div><div class='del'>-				   on the screen */</div><div class='del'>-    int isActive; /* If we handle key events all the time, it seems</div><div class='del'>-		     to do things even when they are supposed to be for</div><div class='del'>-		     another button/whatever */</div><div class='del'>-    struct items *boxItems;</div><div class='del'>-    int grow;</div><div class='del'>-    int flags; /* flags for this listbox, right now just</div><div class='del'>-		  NEWT_FLAG_RETURNEXIT */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void listboxDraw(newtComponent co);</div><div class='del'>-static void listboxDestroy(newtComponent co);</div><div class='del'>-static struct eventResult listboxEvent(newtComponent co, struct event ev);</div><div class='del'>-static void newtListboxRealSetCurrent(newtComponent co);</div><div class='del'>-static void listboxPlace(newtComponent co, int newLeft, int newTop);</div><div class='del'>-static inline void updateWidth(newtComponent co, struct listbox * li,</div><div class='del'>-				int maxField);</div><div class='del'>-static void listboxMapped(newtComponent co, int isMapped);</div><div class='del'>-</div><div class='del'>-static struct componentOps listboxOps = {</div><div class='del'>-    listboxDraw,</div><div class='del'>-    listboxEvent,</div><div class='del'>-    listboxDestroy,</div><div class='del'>-    listboxPlace,</div><div class='del'>-    listboxMapped,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void listboxMapped(newtComponent co, int isMapped) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;isMapped = isMapped;</div><div class='del'>-    if (li-&gt;sb)</div><div class='del'>-	li-&gt;sb-&gt;ops-&gt;mapped(li-&gt;sb, isMapped);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void listboxPlace(newtComponent co, int newLeft, int newTop) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;top = newTop;</div><div class='del'>-    co-&gt;left = newLeft;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;sb)</div><div class='del'>-	li-&gt;sb-&gt;ops-&gt;place(li-&gt;sb, co-&gt;left + co-&gt;width - li-&gt;bdxAdjust - 1,</div><div class='del'>-			   co-&gt;top);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtListbox(int left, int top, int height, int flags) {</div><div class='del'>-    newtComponent co, sb;</div><div class='del'>-    struct listbox * li;</div><div class='del'>-</div><div class='del'>-    if (!(co = malloc(sizeof(*co))))</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-    if (!(li = malloc(sizeof(struct listbox)))) {</div><div class='del'>-	free(co);</div><div class='del'>-	return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    li-&gt;boxItems = NULL;</div><div class='del'>-    li-&gt;numItems = 0;</div><div class='del'>-    li-&gt;currItem = 0;</div><div class='del'>-    li-&gt;numSelected = 0;</div><div class='del'>-    li-&gt;isActive = 0;</div><div class='del'>-    li-&gt;userHasSetWidth = 0;</div><div class='del'>-    li-&gt;startShowItem = 0;</div><div class='del'>-    li-&gt;sbAdjust = 0;</div><div class='del'>-    li-&gt;bdxAdjust = 0;</div><div class='del'>-    li-&gt;bdyAdjust = 0;</div><div class='del'>-    li-&gt;flags = flags &amp; (NEWT_FLAG_RETURNEXIT | NEWT_FLAG_BORDER |</div><div class='del'>-			 NEWT_FLAG_MULTIPLE);</div><div class='del'>-</div><div class='del'>-    if (li-&gt;flags &amp; NEWT_FLAG_BORDER) {</div><div class='del'>-	li-&gt;bdxAdjust = 2;</div><div class='del'>-	li-&gt;bdyAdjust = 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-    li-&gt;curHeight = co-&gt;height - (2 * li-&gt;bdyAdjust);</div><div class='del'>-</div><div class='del'>-    if (height) {</div><div class='del'>-	li-&gt;grow = 0;</div><div class='del'>-	if (flags &amp; NEWT_FLAG_SCROLL) {</div><div class='del'>-	    sb = newtVerticalScrollbar(left, top + li-&gt;bdyAdjust,</div><div class='del'>-					li-&gt;curHeight,</div><div class='del'>-					COLORSET_LISTBOX, COLORSET_ACTLISTBOX);</div><div class='del'>-	    li-&gt;sbAdjust = 3;</div><div class='del'>-	} else {</div><div class='del'>-	    sb = NULL;</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-	li-&gt;grow = 1;</div><div class='del'>-	sb = NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    li-&gt;sb = sb;</div><div class='del'>-    co-&gt;data = li;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;ops = &amp;listboxOps;</div><div class='del'>-    co-&gt;takesFocus = 1;</div><div class='del'>-    co-&gt;callback = NULL;</div><div class='del'>-</div><div class='del'>-    updateWidth(co, li, 5);</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static inline void updateWidth(newtComponent co, struct listbox * li,</div><div class='del'>-				int maxField) {</div><div class='del'>-    li-&gt;curWidth = maxField;</div><div class='del'>-    co-&gt;width = li-&gt;curWidth + li-&gt;sbAdjust + 2 * li-&gt;bdxAdjust;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;sb)</div><div class='del'>-	li-&gt;sb-&gt;left = co-&gt;left + co-&gt;width - li-&gt;bdxAdjust - 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSetCurrentByKey(newtComponent co, void * key) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items * item;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    item = li-&gt;boxItems, i = 0;</div><div class='del'>-    while (item &amp;&amp; item-&gt;data != key)</div><div class='del'>-	item = item-&gt;next, i++;</div><div class='del'>-</div><div class='del'>-    if (item)</div><div class='del'>-	newtListboxSetCurrent(co, i);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSetCurrent(newtComponent co, int num)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (num &gt;= li-&gt;numItems)</div><div class='del'>-	li-&gt;currItem = li-&gt;numItems - 1;</div><div class='del'>-    else if (num &lt; 0)</div><div class='del'>-	li-&gt;currItem = 0;</div><div class='del'>-    else</div><div class='del'>-	li-&gt;currItem = num;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;currItem &lt; li-&gt;startShowItem)</div><div class='del'>-	li-&gt;startShowItem = li-&gt;currItem;</div><div class='del'>-    else if (li-&gt;currItem - li-&gt;startShowItem &gt; li-&gt;curHeight - 1)</div><div class='del'>-	li-&gt;startShowItem = li-&gt;currItem - li-&gt;curHeight + 1;</div><div class='del'>-    if (li-&gt;startShowItem + li-&gt;curHeight &gt; li-&gt;numItems)</div><div class='del'>-	li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight;</div><div class='del'>-    if(li-&gt;startShowItem &lt; 0)</div><div class='del'>-	li-&gt;startShowItem = 0;</div><div class='del'>-</div><div class='del'>-    newtListboxRealSetCurrent(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void newtListboxRealSetCurrent(newtComponent co)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if(li-&gt;sb)</div><div class='del'>-	newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSetWidth(newtComponent co, int width) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;width = width;</div><div class='del'>-    li-&gt;curWidth = co-&gt;width - li-&gt;sbAdjust - 2 * li-&gt;bdxAdjust;</div><div class='del'>-    li-&gt;userHasSetWidth = 1;</div><div class='del'>-    if (li-&gt;sb) li-&gt;sb-&gt;left = co-&gt;width + co-&gt;left - 1;</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void * newtListboxGetCurrent(newtComponent co) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    for(i = 0, item = li-&gt;boxItems; item != NULL &amp;&amp; i &lt; li-&gt;currItem;</div><div class='del'>-	i++, item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-    if (item)</div><div class='del'>-	return (void *)item-&gt;data;</div><div class='del'>-    else</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSelectItem(newtComponent co, const void * key,</div><div class='del'>-	enum newtFlagsSense sense)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    struct items * item;</div><div class='del'>-</div><div class='del'>-    item = li-&gt;boxItems, i = 0;</div><div class='del'>-    while (item &amp;&amp; item-&gt;data != key)</div><div class='del'>-	item = item-&gt;next, i++;</div><div class='del'>-</div><div class='del'>-    if (!item) return;</div><div class='del'>-</div><div class='del'>-    if (item-&gt;isSelected)</div><div class='del'>-	li-&gt;numSelected--;</div><div class='del'>-</div><div class='del'>-    switch(sense) {</div><div class='del'>-	case NEWT_FLAGS_RESET:</div><div class='del'>-		item-&gt;isSelected = 0; break;</div><div class='del'>-	case NEWT_FLAGS_SET:</div><div class='del'>-		item-&gt;isSelected = 1; break;</div><div class='del'>-	case NEWT_FLAGS_TOGGLE:</div><div class='del'>-		item-&gt;isSelected = !item-&gt;isSelected;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (item-&gt;isSelected)</div><div class='del'>-	li-&gt;numSelected++;</div><div class='del'>-</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxClearSelection(newtComponent co)</div><div class='del'>-{</div><div class='del'>-    struct items *item;</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    for(item = li-&gt;boxItems; item != NULL;</div><div class='del'>-	item = item-&gt;next)</div><div class='del'>-	item-&gt;isSelected = 0;</div><div class='del'>-    li-&gt;numSelected = 0;</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Free the returned array after use, but NOT the values in the array */</div><div class='del'>-void ** newtListboxGetSelection(newtComponent co, int *numitems)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li;</div><div class='del'>-    int i;</div><div class='del'>-    void **retval;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    if(!co || !numitems) return NULL;</div><div class='del'>-</div><div class='del'>-    li = co-&gt;data;</div><div class='del'>-    if(!li || !li-&gt;numSelected) return NULL;</div><div class='del'>-</div><div class='del'>-    retval = malloc(li-&gt;numSelected * sizeof(void *));</div><div class='del'>-    for(i = 0, item = li-&gt;boxItems; item != NULL;</div><div class='del'>-	item = item-&gt;next)</div><div class='del'>-	if(item-&gt;isSelected)</div><div class='del'>-	    retval[i++] = (void *)item-&gt;data;</div><div class='del'>-    *numitems = li-&gt;numSelected;</div><div class='del'>-    return retval;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSetEntry(newtComponent co, int num, const char * text) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    for(i = 0, item = li-&gt;boxItems; item != NULL &amp;&amp; i &lt; num;</div><div class='del'>-	i++, item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-    if(!item)</div><div class='del'>-	return;</div><div class='del'>-    else {</div><div class='del'>-	free(item-&gt;text);</div><div class='del'>-	item-&gt;text = strdup(text);</div><div class='del'>-    }</div><div class='del'>-    if (li-&gt;userHasSetWidth == 0 &amp;&amp; strlen(text) &gt; (size_t)li-&gt;curWidth) {</div><div class='del'>-	updateWidth(co, li, strlen(text));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (num &gt;= li-&gt;startShowItem &amp;&amp; num &lt;= li-&gt;startShowItem + co-&gt;height)</div><div class='del'>-	listboxDraw(co);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxSetData(newtComponent co, int num, void * data) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    for(i = 0, item = li-&gt;boxItems; item != NULL &amp;&amp; i &lt; num;</div><div class='del'>-	i++, item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-    item-&gt;data = data;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtListboxAppendEntry(newtComponent co, const char * text,</div><div class='del'>-	                const void * data) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    if(li-&gt;boxItems) {</div><div class='del'>-	for (item = li-&gt;boxItems; item-&gt;next != NULL; item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-	item = item-&gt;next = malloc(sizeof(struct items));</div><div class='del'>-    } else {</div><div class='del'>-	item = li-&gt;boxItems = malloc(sizeof(struct items));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!li-&gt;userHasSetWidth &amp;&amp; text &amp;&amp; (strlen(text) &gt; (size_t)li-&gt;curWidth))</div><div class='del'>-	updateWidth(co, li, strlen(text));</div><div class='del'>-</div><div class='del'>-    item-&gt;text = strdup(text); item-&gt;data = data; item-&gt;next = NULL;</div><div class='del'>-    item-&gt;isSelected = 0;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;grow)</div><div class='del'>-	co-&gt;height++, li-&gt;curHeight++;</div><div class='del'>-    li-&gt;numItems++;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtListboxInsertEntry(newtComponent co, const char * text,</div><div class='del'>-	                   const void * data, void * key) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items *item, *t;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;boxItems) {</div><div class='del'>-	if (key) {</div><div class='del'>-	    item = li-&gt;boxItems;</div><div class='del'>-	    while (item &amp;&amp; item-&gt;data != key) item = item-&gt;next;</div><div class='del'>-</div><div class='del'>-	    if (!item) return 1;</div><div class='del'>-</div><div class='del'>-	    t = item-&gt;next;</div><div class='del'>-	    item = item-&gt;next = malloc(sizeof(struct items));</div><div class='del'>-	    item-&gt;next = t;</div><div class='del'>-	} else {</div><div class='del'>-	    t = li-&gt;boxItems;</div><div class='del'>-	    item = li-&gt;boxItems = malloc(sizeof(struct items));</div><div class='del'>-	    item-&gt;next = t;</div><div class='del'>-	}</div><div class='del'>-    } else if (key) {</div><div class='del'>-	return 1;</div><div class='del'>-    } else {</div><div class='del'>-	item = li-&gt;boxItems = malloc(sizeof(struct items));</div><div class='del'>-	item-&gt;next = NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!li-&gt;userHasSetWidth &amp;&amp; text &amp;&amp; (strlen(text) &gt; (size_t)li-&gt;curWidth))</div><div class='del'>-	updateWidth(co, li, strlen(text));</div><div class='del'>-</div><div class='del'>-    item-&gt;text = strdup(text?text:"(null)"); item-&gt;data = data;</div><div class='del'>-    item-&gt;isSelected = 0;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;sb)</div><div class='del'>-	li-&gt;sb-&gt;left = co-&gt;left + co-&gt;width - li-&gt;bdxAdjust - 1;</div><div class='del'>-    li-&gt;numItems++;</div><div class='del'>-</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtListboxDeleteEntry(newtComponent co, void * key) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int widest = 0, t;</div><div class='del'>-    struct items *item, *item2 = NULL;</div><div class='del'>-    int num;</div><div class='del'>-</div><div class='del'>-    if (li-&gt;boxItems == NULL || li-&gt;numItems &lt;= 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    num = 0;</div><div class='del'>-</div><div class='del'>-    item2 = NULL, item = li-&gt;boxItems;</div><div class='del'>-    while (item &amp;&amp; item-&gt;data != key) {</div><div class='del'>-	item2 = item;</div><div class='del'>-	item = item-&gt;next;</div><div class='del'>-	num++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!item)</div><div class='del'>-	return -1;</div><div class='del'>-</div><div class='del'>-    if (item2)</div><div class='del'>-	item2-&gt;next = item-&gt;next;</div><div class='del'>-    else</div><div class='del'>-	li-&gt;boxItems = item-&gt;next;</div><div class='del'>-</div><div class='del'>-    free(item-&gt;text);</div><div class='del'>-    free(item);</div><div class='del'>-    li-&gt;numItems--;</div><div class='del'>-</div><div class='del'>-    if (!li-&gt;userHasSetWidth) {</div><div class='del'>-	widest = 0;</div><div class='del'>-	for (item = li-&gt;boxItems; item != NULL; item = item-&gt;next)</div><div class='del'>-	    if ((t = strlen(item-&gt;text)) &gt; widest) widest = t;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (li-&gt;currItem &gt;= num)</div><div class='del'>-	li-&gt;currItem--;</div><div class='del'>-</div><div class='del'>-    if (!li-&gt;userHasSetWidth) {</div><div class='del'>-	updateWidth(co, li, widest);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    listboxDraw(co);</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtListboxClear(newtComponent co)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li;</div><div class='del'>-    struct items *anitem, *nextitem;</div><div class='del'>-    if(co == NULL || (li = co-&gt;data) == NULL)</div><div class='del'>-	return;</div><div class='del'>-    for(anitem = li-&gt;boxItems; anitem != NULL; anitem = nextitem) {</div><div class='del'>-	nextitem = anitem-&gt;next;</div><div class='del'>-	free(anitem-&gt;text);</div><div class='del'>-	free(anitem);</div><div class='del'>-    }</div><div class='del'>-    li-&gt;numItems = li-&gt;numSelected = li-&gt;currItem = li-&gt;startShowItem = 0;</div><div class='del'>-    li-&gt;boxItems = NULL;</div><div class='del'>-    if (!li-&gt;userHasSetWidth)</div><div class='del'>-	updateWidth(co, li, 5);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* If you don't want to get back the text, pass in NULL for the ptr-ptr. Same</div><div class='del'>-   goes for the data. */</div><div class='del'>-void newtListboxGetEntry(newtComponent co, int num, char **text, void **data) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-    struct items *item;</div><div class='del'>-</div><div class='del'>-    if (!li-&gt;boxItems || num &gt;= li-&gt;numItems) {</div><div class='del'>-	if(text)</div><div class='del'>-	    *text = NULL;</div><div class='del'>-	if(data)</div><div class='del'>-	    *data = NULL;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    i = 0;</div><div class='del'>-    item = li-&gt;boxItems;</div><div class='del'>-    while (item &amp;&amp; i &lt; num) {</div><div class='del'>-	i++, item = item-&gt;next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (item) {</div><div class='del'>-	if (text)</div><div class='del'>-	    *text = item-&gt;text;</div><div class='del'>-	if (data)</div><div class='del'>-	    *data = (void *)item-&gt;data;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void listboxDraw(newtComponent co)</div><div class='del'>-{</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items *item;</div><div class='del'>-    int i, j;</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return ;</div><div class='del'>-</div><div class='del'>-    if(li-&gt;flags &amp; NEWT_FLAG_BORDER) {</div><div class='del'>-      if(li-&gt;isActive)</div><div class='del'>-	  SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);</div><div class='del'>-      else</div><div class='del'>-          SLsmg_set_color(NEWT_COLORSET_LISTBOX);</div><div class='del'>-</div><div class='del'>-      newtDrawBox(co-&gt;left, co-&gt;top, co-&gt;width, co-&gt;height, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if(li-&gt;sb)</div><div class='del'>-	li-&gt;sb-&gt;ops-&gt;draw(li-&gt;sb);</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_LISTBOX);</div><div class='del'>-</div><div class='del'>-    for(i = 0, item = li-&gt;boxItems; item != NULL &amp;&amp; i &lt; li-&gt;startShowItem;</div><div class='del'>-	i++, item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-    j = i;</div><div class='del'>-</div><div class='del'>-    for (i = 0; item != NULL &amp;&amp; i &lt; li-&gt;curHeight; i++, item = item-&gt;next) {</div><div class='del'>-	if (!item-&gt;text) continue;</div><div class='del'>-</div><div class='del'>-	newtGotorc(co-&gt;top + i + li-&gt;bdyAdjust, co-&gt;left + li-&gt;bdxAdjust);</div><div class='del'>-	if(j + i == li-&gt;currItem) {</div><div class='del'>-	    if(item-&gt;isSelected)</div><div class='del'>-		SLsmg_set_color(NEWT_COLORSET_ACTSELLISTBOX);</div><div class='del'>-	    else</div><div class='del'>-		SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);</div><div class='del'>-	} else if(item-&gt;isSelected)</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_SELLISTBOX);</div><div class='del'>-	else</div><div class='del'>-	    SLsmg_set_color(NEWT_COLORSET_LISTBOX);</div><div class='del'>-</div><div class='del'>-	SLsmg_write_nstring(item-&gt;text, li-&gt;curWidth);</div><div class='del'>-</div><div class='del'>-    }</div><div class='del'>-    newtGotorc(co-&gt;top + (li-&gt;currItem - li-&gt;startShowItem), co-&gt;left);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult listboxEvent(newtComponent co, struct event ev) {</div><div class='del'>-    struct eventResult er;</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items *item;</div><div class='del'>-    int i;</div><div class='del'>-    </div><div class='del'>-    er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    if(ev.when == EV_EARLY || ev.when == EV_LATE) {</div><div class='del'>-	return er;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch(ev.event) {</div><div class='del'>-      case EV_KEYPRESS:</div><div class='del'>-	if (!li-&gt;isActive) break;</div><div class='del'>-</div><div class='del'>-	switch(ev.u.key) {</div><div class='del'>-	  case ' ':</div><div class='del'>-	    if(!(li-&gt;flags &amp; NEWT_FLAG_MULTIPLE)) break;</div><div class='del'>-	    newtListboxSelectItem(co, li-&gt;boxItems[li-&gt;currItem].data,</div><div class='del'>-				  NEWT_FLAGS_TOGGLE);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    /* We don't break here, because it is cool to be able to</div><div class='del'>-	       hold space to select a bunch of items in a list at once */</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_DOWN:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    if(li-&gt;currItem &lt; li-&gt;numItems - 1) {</div><div class='del'>-		li-&gt;currItem++;</div><div class='del'>-		if(li-&gt;currItem &gt; (li-&gt;startShowItem + li-&gt;curHeight - 1)) {</div><div class='del'>-		    li-&gt;startShowItem = li-&gt;currItem - li-&gt;curHeight + 1;</div><div class='del'>-		    if(li-&gt;startShowItem + li-&gt;curHeight &gt; li-&gt;numItems)</div><div class='del'>-			li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight;</div><div class='del'>-		}</div><div class='del'>-		if(li-&gt;sb)</div><div class='del'>-		    newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-		listboxDraw(co);</div><div class='del'>-	    }</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_ENTER:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    if(li-&gt;flags &amp; NEWT_FLAG_RETURNEXIT)</div><div class='del'>-		er.result = ER_EXITFORM;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_UP:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    if(li-&gt;currItem &gt; 0) {</div><div class='del'>-		li-&gt;currItem--;</div><div class='del'>-		if(li-&gt;currItem &lt; li-&gt;startShowItem)</div><div class='del'>-		    li-&gt;startShowItem = li-&gt;currItem;</div><div class='del'>-		if(li-&gt;sb)</div><div class='del'>-		    newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-		listboxDraw(co);</div><div class='del'>-	    }</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_PGUP:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    li-&gt;startShowItem -= li-&gt;curHeight - 1;</div><div class='del'>-	    if(li-&gt;startShowItem &lt; 0)</div><div class='del'>-		li-&gt;startShowItem = 0;</div><div class='del'>-	    li-&gt;currItem -= li-&gt;curHeight - 1;</div><div class='del'>-	    if(li-&gt;currItem &lt; 0)</div><div class='del'>-		li-&gt;currItem = 0;</div><div class='del'>-	    newtListboxRealSetCurrent(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_PGDN:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    li-&gt;startShowItem += li-&gt;curHeight;</div><div class='del'>-	    if(li-&gt;startShowItem &gt; (li-&gt;numItems - li-&gt;curHeight)) {</div><div class='del'>-		li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight;</div><div class='del'>-	    }</div><div class='del'>-	    li-&gt;currItem += li-&gt;curHeight;</div><div class='del'>-	    if(li-&gt;currItem &gt;= li-&gt;numItems) {</div><div class='del'>-		li-&gt;currItem = li-&gt;numItems - 1;</div><div class='del'>-	    }</div><div class='del'>-	    newtListboxRealSetCurrent(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_HOME:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    newtListboxSetCurrent(co, 0);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_END:</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight;</div><div class='del'>-	    if(li-&gt;startShowItem &lt; 0)</div><div class='del'>-		li-&gt;startShowItem = 0;</div><div class='del'>-	    li-&gt;currItem = li-&gt;numItems - 1;</div><div class='del'>-	    newtListboxRealSetCurrent(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	  default:</div><div class='del'>-	      if (li-&gt;numItems &lt;= 0) break;</div><div class='del'>-              if (ev.u.key &lt; NEWT_KEY_EXTRA_BASE &amp;&amp; isalpha(ev.u.key)) {</div><div class='del'>-		  for(i = 0, item = li-&gt;boxItems; item != NULL &amp;&amp;</div><div class='del'>-			  i &lt; li-&gt;currItem; i++, item = item-&gt;next);</div><div class='del'>-</div><div class='del'>-		  if (item &amp;&amp; item-&gt;text &amp;&amp; (toupper(*item-&gt;text) == toupper(ev.u.key))) {</div><div class='del'>-		      item = item-&gt;next;</div><div class='del'>-		      i++;</div><div class='del'>-		  } else { </div><div class='del'>-		      item = li-&gt;boxItems;</div><div class='del'>-		      i = 0;</div><div class='del'>-		  }</div><div class='del'>-		  while (item &amp;&amp; item-&gt;text &amp;&amp;</div><div class='del'>-			 toupper(*item-&gt;text) != toupper(ev.u.key)) {</div><div class='del'>-		      item = item-&gt;next;</div><div class='del'>-		      i++;</div><div class='del'>-		  }</div><div class='del'>-		  if (item) {</div><div class='del'>-		      li-&gt;currItem = i;</div><div class='del'>-		      if(li-&gt;currItem &lt; li-&gt;startShowItem ||</div><div class='del'>-			 li-&gt;currItem &gt; li-&gt;startShowItem)</div><div class='del'>-			  li-&gt;startShowItem =</div><div class='del'>-			      li-&gt;currItem &gt; li-&gt;numItems - li-&gt;curHeight ?</div><div class='del'>-			      li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight :</div><div class='del'>-			      li-&gt;currItem;</div><div class='del'>-		      if(li-&gt;sb)</div><div class='del'>-			  newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-		      newtListboxRealSetCurrent(co);</div><div class='del'>-		      er.result = ER_SWALLOWED;</div><div class='del'>-		  }</div><div class='del'>-	      }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case EV_FOCUS:</div><div class='del'>-	li-&gt;isActive = 1;</div><div class='del'>-	listboxDraw(co);</div><div class='del'>-	er.result = ER_SWALLOWED;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case EV_UNFOCUS:</div><div class='del'>-	li-&gt;isActive = 0;</div><div class='del'>-	listboxDraw(co);</div><div class='del'>-	er.result = ER_SWALLOWED;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-      case EV_MOUSE:</div><div class='del'>-	  /* if this mouse click was within the listbox, make the current</div><div class='del'>-	     item the item clicked on. */</div><div class='del'>-	/* Up scroll arrow */</div><div class='del'>-	if (li-&gt;sb &amp;&amp;</div><div class='del'>-	    ev.u.mouse.x == co-&gt;left + co-&gt;width - li-&gt;bdxAdjust - 1 &amp;&amp;</div><div class='del'>-	    ev.u.mouse.y == co-&gt;top + li-&gt;bdyAdjust) {</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    if(li-&gt;currItem &gt; 0) {</div><div class='del'>-		li-&gt;currItem--;</div><div class='del'>-		if(li-&gt;currItem &lt; li-&gt;startShowItem)</div><div class='del'>-		    li-&gt;startShowItem = li-&gt;currItem;</div><div class='del'>-		if(li-&gt;sb)</div><div class='del'>-		    newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-		listboxDraw(co);</div><div class='del'>-	    }</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	/* Down scroll arrow */</div><div class='del'>-	if (li-&gt;sb &amp;&amp;</div><div class='del'>-	    ev.u.mouse.x == co-&gt;left + co-&gt;width - li-&gt;bdxAdjust - 1 &amp;&amp;</div><div class='del'>-	    ev.u.mouse.y == co-&gt;top + co-&gt;height - li-&gt;bdyAdjust - 1) {</div><div class='del'>-	    if(li-&gt;numItems &lt;= 0) break;</div><div class='del'>-	    if(li-&gt;currItem &lt; li-&gt;numItems - 1) {</div><div class='del'>-		li-&gt;currItem++;</div><div class='del'>-		if(li-&gt;currItem &gt; (li-&gt;startShowItem + li-&gt;curHeight - 1)) {</div><div class='del'>-		    li-&gt;startShowItem = li-&gt;currItem - li-&gt;curHeight + 1;</div><div class='del'>-		    if(li-&gt;startShowItem + li-&gt;curHeight &gt; li-&gt;numItems)</div><div class='del'>-			li-&gt;startShowItem = li-&gt;numItems - li-&gt;curHeight;</div><div class='del'>-		}</div><div class='del'>-		if(li-&gt;sb)</div><div class='del'>-		    newtScrollbarSet(li-&gt;sb, li-&gt;currItem + 1, li-&gt;numItems);</div><div class='del'>-		listboxDraw(co);</div><div class='del'>-	    }</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	if ((ev.u.mouse.y &gt;= co-&gt;top + li-&gt;bdyAdjust) &amp;&amp;</div><div class='del'>-	    (ev.u.mouse.y &lt;= co-&gt;top + co-&gt;height - (li-&gt;bdyAdjust * 2)) &amp;&amp;</div><div class='del'>-	    (ev.u.mouse.x &gt;= co-&gt;left + li-&gt;bdxAdjust) &amp;&amp;</div><div class='del'>-	    (ev.u.mouse.x &lt;= co-&gt;left + co-&gt;width + (li-&gt;bdxAdjust * 2))) {</div><div class='del'>-	    li-&gt;currItem = li-&gt;startShowItem +</div><div class='del'>-		(ev.u.mouse.y - li-&gt;bdyAdjust - co-&gt;top);</div><div class='del'>-	    newtListboxRealSetCurrent(co);</div><div class='del'>-	    listboxDraw(co);</div><div class='del'>-	    if(co-&gt;callback) co-&gt;callback(co, co-&gt;callbackData);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void listboxDestroy(newtComponent co) {</div><div class='del'>-    struct listbox * li = co-&gt;data;</div><div class='del'>-    struct items * item, * nextitem;</div><div class='del'>-</div><div class='del'>-    nextitem = item = li-&gt;boxItems;</div><div class='del'>-</div><div class='del'>-    while (item != NULL) {</div><div class='del'>-	nextitem = item-&gt;next;</div><div class='del'>-	free(item-&gt;text);</div><div class='del'>-	free(item);</div><div class='del'>-	item = nextitem;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (li-&gt;sb) li-&gt;sb-&gt;ops-&gt;destroy(li-&gt;sb);</div><div class='del'>-</div><div class='del'>-    free(li);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/newt.c b/mdk-stage1/newt/newt.c<br/>deleted file mode 100644<br/>index d6cb3cd96..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/newt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/newt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,672 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/signal.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct Window {</div><div class='del'>-    int height, width, top, left;</div><div class='del'>-    short * buffer;</div><div class='del'>-    char * title;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct keymap {</div><div class='del'>-    char * str;</div><div class='del'>-    int code;</div><div class='del'>-    char * tc;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct Window windowStack[20];</div><div class='del'>-static struct Window * currentWindow = NULL;</div><div class='del'>-</div><div class='del'>-static char * helplineStack[20];</div><div class='del'>-static char ** currentHelpline = NULL;</div><div class='del'>-</div><div class='del'>-static int cursorRow, cursorCol;</div><div class='del'>-static int needResize;</div><div class='del'>-static int cursorOn = 1;</div><div class='del'>-</div><div class='del'>-static const char * defaultHelpLine =</div><div class='del'>-"  &lt;Tab&gt;/&lt;Alt-Tab&gt; between elements   |  &lt;Space&gt; selects   |  &lt;F12&gt; next screen"</div><div class='del'>-;</div><div class='del'>-</div><div class='del'>-const struct newtColors newtDefaultColorPalette = {</div><div class='del'>-	  "cyan", "black", 			/* root fg, bg */</div><div class='del'>-	  "black", "blue",			/* border fg, bg */</div><div class='del'>-	  "white", "blue",			/* window fg, bg */</div><div class='del'>-	  "white", "black",			/* shadow fg, bg */</div><div class='del'>-	  "white", "blue",			/* title fg, bg */</div><div class='del'>-	  "black", "cyan",			/* button fg, bg */</div><div class='del'>-	  "yellow", "cyan",			/* active button fg, bg */</div><div class='del'>-	  "yellow", "blue",			/* checkbox fg, bg */</div><div class='del'>-	  "blue", "brown",			/* active checkbox fg, bg */</div><div class='del'>-	  "yellow", "blue",			/* entry box fg, bg */</div><div class='del'>-	  "white", "blue",			/* label fg, bg */</div><div class='del'>-	  "black", "cyan",			/* listbox fg, bg */</div><div class='del'>-	  "yellow", "cyan",			/* active listbox fg, bg */</div><div class='del'>-	  "white", "blue",			/* textbox fg, bg */</div><div class='del'>-	  "cyan", "black",			/* active textbox fg, bg */</div><div class='del'>-	  "white", "blue",			/* help line */</div><div class='del'>-	  "yellow", "blue",			/* root text */</div><div class='del'>-	  "blue",					/* scale full */</div><div class='del'>-	  "red",					/* scale empty */</div><div class='del'>-	  "blue", "cyan",				/* disabled entry fg, bg */</div><div class='del'>-	  "white", "blue",			/* compact button fg, bg */</div><div class='del'>-	  "yellow", "red",			/* active &amp; sel listbox */</div><div class='del'>-	  "black", "brown"			/* selected listbox */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static const struct keymap keymap[] = {</div><div class='del'>-	{ "\033OA", 		NEWT_KEY_UP, 		"kh" },</div><div class='del'>-	{ "\033[A", 		NEWT_KEY_UP, 		"ku" },</div><div class='del'>-	{ "\033OB", 		NEWT_KEY_DOWN, 		"kd" },</div><div class='del'>-	{ "\033[B", 		NEWT_KEY_DOWN, 		"kd" },</div><div class='del'>-	{ "\033[C", 		NEWT_KEY_RIGHT, 	"kr" },</div><div class='del'>-	{ "\033OC", 		NEWT_KEY_RIGHT, 	"kr" },</div><div class='del'>-	{ "\033[D", 		NEWT_KEY_LEFT, 		"kl" },</div><div class='del'>-	{ "\033OD", 		NEWT_KEY_LEFT, 		"kl" },</div><div class='del'>-	{ "\033[H",		NEWT_KEY_HOME, 		"kh" },</div><div class='del'>-	{ "\033[1~",		NEWT_KEY_HOME, 		"kh" },</div><div class='del'>-	{ "\033Ow",		NEWT_KEY_END, 		"kH" },</div><div class='del'>-	{ "\033[4~",		NEWT_KEY_END, 		"kH" },</div><div class='del'>-</div><div class='del'>-	{ "\033[3~",		NEWT_KEY_DELETE,	"kl" },</div><div class='del'>-	{ "\033[2~", 		NEWT_KEY_INSERT,	NULL },</div><div class='del'>-</div><div class='del'>-	{ "\033\t",		NEWT_KEY_UNTAB,		NULL },</div><div class='del'>-</div><div class='del'>-	{ "\033[5~",		NEWT_KEY_PGUP,		NULL },</div><div class='del'>-	{ "\033[6~",		NEWT_KEY_PGDN,		NULL },</div><div class='del'>-	{ "\033V",		NEWT_KEY_PGUP, 		"kH" },</div><div class='del'>-	{ "\033v",		NEWT_KEY_PGUP, 		"kH" },</div><div class='del'>-</div><div class='del'>-	{ "\033[[A",		NEWT_KEY_F1,		NULL },</div><div class='del'>-	{ "\033[[B",		NEWT_KEY_F2,		NULL },</div><div class='del'>-	{ "\033[[C",		NEWT_KEY_F3,		NULL },</div><div class='del'>-	{ "\033[[D",		NEWT_KEY_F4,		NULL },</div><div class='del'>-	{ "\033[[E",		NEWT_KEY_F5,		NULL },</div><div class='del'>-</div><div class='del'>-	{ "\033OP",		NEWT_KEY_F1,		NULL },</div><div class='del'>-	{ "\033OQ",		NEWT_KEY_F2,		NULL },</div><div class='del'>-	{ "\033OR",		NEWT_KEY_F3,		NULL },</div><div class='del'>-	{ "\033OS",		NEWT_KEY_F4,		NULL },</div><div class='del'>-</div><div class='del'>-	{ "\033[11~",		NEWT_KEY_F1,		NULL },</div><div class='del'>-	{ "\033[12~",		NEWT_KEY_F2,		NULL },</div><div class='del'>-	{ "\033[13~",		NEWT_KEY_F3,		NULL },</div><div class='del'>-	{ "\033[14~",		NEWT_KEY_F4,		NULL },</div><div class='del'>-	{ "\033[15~",		NEWT_KEY_F5,		NULL },</div><div class='del'>-	{ "\033[17~",		NEWT_KEY_F6,		NULL },</div><div class='del'>-	{ "\033[18~",		NEWT_KEY_F7,		NULL },</div><div class='del'>-	{ "\033[19~",		NEWT_KEY_F8,		NULL },</div><div class='del'>-	{ "\033[20~",		NEWT_KEY_F9,		NULL },</div><div class='del'>-	{ "\033[21~",		NEWT_KEY_F10,		NULL },</div><div class='del'>-	{ "\033[23~",		NEWT_KEY_F11,		NULL },</div><div class='del'>-	{ "\033[24~",		NEWT_KEY_F12,		NULL },</div><div class='del'>-</div><div class='del'>-	{ NULL, 	0, 			NULL },	/* LEAVE this one */</div><div class='del'>-};</div><div class='del'>-static char keyPrefix = '\033';</div><div class='del'>-</div><div class='del'>-static const char * version = "Newt windowing library version " VERSION</div><div class='del'>-			" - (C) 1996-2000 Red Hat Software. "</div><div class='del'>-		        "Redistributable under the term of the Library "</div><div class='del'>-		        "GNU Public License. "</div><div class='del'>-			"Written by Erik Troan\n";</div><div class='del'>-</div><div class='del'>-static newtSuspendCallback suspendCallback = NULL;</div><div class='del'>-static void * suspendCallbackData = NULL;</div><div class='del'>-</div><div class='del'>-void newtSetSuspendCallback(newtSuspendCallback cb, void * data) {</div><div class='del'>-    suspendCallback = cb;</div><div class='del'>-    suspendCallbackData = data;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void handleSigwinch(int signum __attribute__ ((unused))) {</div><div class='del'>-    needResize = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int getkeyInterruptHook(void) {</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtFlushInput(void) {</div><div class='del'>-    while (SLang_input_pending(0)) {</div><div class='del'>-	SLang_getkey();</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtRefresh(void) {</div><div class='del'>-    SLsmg_refresh();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtSuspend(void) {</div><div class='del'>-    SLtt_set_cursor_visibility (1);</div><div class='del'>-    SLsmg_suspend_smg();</div><div class='del'>-    SLang_reset_tty();</div><div class='del'>-    SLtt_set_cursor_visibility (cursorOn);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtResume(void) {</div><div class='del'>-    SLsmg_resume_smg ();</div><div class='del'>-    SLsmg_refresh();</div><div class='del'>-    SLang_init_tty(0, 0, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCls(void) {</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_ROOT);</div><div class='del'>-    SLsmg_gotorc(0, 0);</div><div class='del'>-    SLsmg_erase_eos();</div><div class='del'>-</div><div class='del'>-    newtRefresh();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if defined(THIS_DOESNT_WORK)</div><div class='del'>-void newtResizeScreen(int redraw) {</div><div class='del'>-    newtPushHelpLine("");</div><div class='del'>-</div><div class='del'>-    SLtt_get_screen_size();</div><div class='del'>-    SLang_init_tty(0, 0, 0);</div><div class='del'>-</div><div class='del'>-    SLsmg_touch_lines (0, SLtt_Screen_Rows - 1);</div><div class='del'>-</div><div class='del'>-    /* I don't know why I need this */</div><div class='del'>-    SLsmg_refresh();</div><div class='del'>-</div><div class='del'>-    newtPopHelpLine();</div><div class='del'>-</div><div class='del'>-    if (redraw)</div><div class='del'>-	SLsmg_refresh();</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int newtInit(void) {</div><div class='del'>-    char * MonoValue, * MonoEnv = "NEWT_MONO";</div><div class='del'>-</div><div class='del'>-    /* use the version variable just to be sure it gets included */</div><div class='del'>-    strlen(version);</div><div class='del'>-</div><div class='del'>-    SLtt_get_terminfo();</div><div class='del'>-    SLtt_get_screen_size();</div><div class='del'>-</div><div class='del'>-    MonoValue = getenv(MonoEnv);</div><div class='del'>-    if ( MonoValue == NULL ) {</div><div class='del'>-	SLtt_Use_Ansi_Colors = 1;</div><div class='del'>-    } else {</div><div class='del'>-	SLtt_Use_Ansi_Colors = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_init_smg();</div><div class='del'>-    SLang_init_tty(0, 0, 0);</div><div class='del'>-</div><div class='del'>-    newtSetColors(newtDefaultColorPalette);</div><div class='del'>-    newtCursorOff();</div><div class='del'>-    /*initKeymap();*/</div><div class='del'>-</div><div class='del'>-    /*memset(&amp;sa, 0, sizeof(sa));</div><div class='del'>-    sa.sa_handler = handleSigwinch;</div><div class='del'>-    sigaction(SIGWINCH, &amp;sa, NULL);*/</div><div class='del'>-</div><div class='del'>-    SLsignal_intr(SIGWINCH, handleSigwinch);</div><div class='del'>-    SLang_getkey_intr_hook = getkeyInterruptHook;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtFinished(void) {</div><div class='del'>-    SLsmg_gotorc(SLtt_Screen_Rows - 1, 0);</div><div class='del'>-    newtCursorOn();</div><div class='del'>-    SLsmg_refresh();</div><div class='del'>-    SLsmg_reset_smg();</div><div class='del'>-    SLang_reset_tty();</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtSetColors(struct newtColors colors) {</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ROOT, "", colors.rootFg, colors.rootBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_BORDER, "", colors.borderFg, colors.borderBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_WINDOW, "", colors.windowFg, colors.windowBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_SHADOW, "", colors.shadowFg, colors.shadowBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_TITLE, "", colors.titleFg, colors.titleBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_BUTTON, "", colors.buttonFg, colors.buttonBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ACTBUTTON, "", colors.actButtonFg,</div><div class='del'>-			colors.actButtonBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_CHECKBOX, "", colors.checkboxFg,</div><div class='del'>-			colors.checkboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ACTCHECKBOX, "", colors.actCheckboxFg,</div><div class='del'>-			colors.actCheckboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ENTRY, "", colors.entryFg, colors.entryBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_LABEL, "", colors.labelFg, colors.labelBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_LISTBOX, "", colors.listboxFg,</div><div class='del'>-			colors.listboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ACTLISTBOX, "", colors.actListboxFg,</div><div class='del'>-			colors.actListboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_TEXTBOX, "", colors.textboxFg,</div><div class='del'>-			colors.textboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ACTTEXTBOX, "", colors.actTextboxFg,</div><div class='del'>-			colors.actTextboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_HELPLINE, "", colors.helpLineFg,</div><div class='del'>-			colors.helpLineBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ROOTTEXT, "", colors.rootTextFg,</div><div class='del'>-			colors.rootTextBg);</div><div class='del'>-</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_EMPTYSCALE, "", "black",</div><div class='del'>-			colors.emptyScale);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_FULLSCALE, "", "black",</div><div class='del'>-			colors.fullScale);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_DISENTRY, "", colors.disabledEntryFg,</div><div class='del'>-			colors.disabledEntryBg);</div><div class='del'>-</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_COMPACTBUTTON, "", colors.compactButtonFg,</div><div class='del'>-			colors.compactButtonBg);</div><div class='del'>-</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_ACTSELLISTBOX, "", colors.actSelListboxFg,</div><div class='del'>-		   colors.actSelListboxBg);</div><div class='del'>-    SLtt_set_color(NEWT_COLORSET_SELLISTBOX, "", colors.selListboxFg,</div><div class='del'>-		   colors.selListboxBg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtGetKey(void) {</div><div class='del'>-    int key;</div><div class='del'>-    char buf[10], * chptr = buf;</div><div class='del'>-    const struct keymap * curr;</div><div class='del'>-</div><div class='del'>-    do {</div><div class='del'>-	key = SLang_getkey();</div><div class='del'>-	if (key == 0xFFFF) {</div><div class='del'>-	    if (needResize)</div><div class='del'>-		return NEWT_KEY_RESIZE;</div><div class='del'>-</div><div class='del'>-	    /* ignore other signals */</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (key == NEWT_KEY_SUSPEND &amp;&amp; suspendCallback)</div><div class='del'>-	    suspendCallback(suspendCallbackData);</div><div class='del'>-    } while (key == NEWT_KEY_SUSPEND);</div><div class='del'>-</div><div class='del'>-    switch (key) {</div><div class='del'>-      case 'v' | 0x80:</div><div class='del'>-      case 'V' | 0x80:</div><div class='del'>-	return NEWT_KEY_PGUP;</div><div class='del'>-</div><div class='del'>-      case 22:</div><div class='del'>-	return NEWT_KEY_PGDN;</div><div class='del'>-</div><div class='del'>-	return NEWT_KEY_BKSPC;</div><div class='del'>-      case 0x7f:</div><div class='del'>-	return NEWT_KEY_BKSPC;</div><div class='del'>-</div><div class='del'>-      case 0x08:</div><div class='del'>-	return NEWT_KEY_BKSPC;</div><div class='del'>-</div><div class='del'>-      default:</div><div class='del'>-	if (key != keyPrefix) return key;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset(buf, 0, sizeof(buf));</div><div class='del'>-</div><div class='del'>-    *chptr++ = key;</div><div class='del'>-    while (SLang_input_pending(5)) {</div><div class='del'>-	key = SLang_getkey();</div><div class='del'>-	if (key == keyPrefix) {</div><div class='del'>-	    /* he hit unknown keys too many times -- start over */</div><div class='del'>-	    memset(buf, 0, sizeof(buf));</div><div class='del'>-	    chptr = buf;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	*chptr++ = key;</div><div class='del'>-</div><div class='del'>-	/* this search should use bsearch(), but when we only look through</div><div class='del'>-	   a list of 20 (or so) keymappings, it's probably faster just to</div><div class='del'>-	   do a inline linear search */</div><div class='del'>-</div><div class='del'>-	for (curr = keymap; curr-&gt;code; curr++) {</div><div class='del'>-	    if (curr-&gt;str) {</div><div class='del'>-		if (!strcmp(curr-&gt;str, buf))</div><div class='del'>-		    return curr-&gt;code;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    for (curr = keymap; curr-&gt;code; curr++) {</div><div class='del'>-	if (curr-&gt;str) {</div><div class='del'>-	    if (!strcmp(curr-&gt;str, buf))</div><div class='del'>-		return curr-&gt;code;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Looks like we were a bit overzealous in reading characters. Return</div><div class='del'>-       just the first character, and put everything else back in the buffer</div><div class='del'>-       for later */</div><div class='del'>-</div><div class='del'>-    chptr--;</div><div class='del'>-    while (chptr &gt; buf)</div><div class='del'>-	SLang_ungetkey(*chptr--);</div><div class='del'>-</div><div class='del'>-    return *chptr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtWaitForKey(void) {</div><div class='del'>-    newtRefresh();</div><div class='del'>-</div><div class='del'>-    SLang_getkey();</div><div class='del'>-    newtClearKeyBuffer();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtClearKeyBuffer(void) {</div><div class='del'>-    while (SLang_input_pending(1)) {</div><div class='del'>-	SLang_getkey();</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtOpenWindow(int left, int top, int width, int height,</div><div class='del'>-			  const char * title) {</div><div class='del'>-    int j, row, col;</div><div class='del'>-    int n;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    newtFlushInput();</div><div class='del'>-</div><div class='del'>-    if (!currentWindow) {</div><div class='del'>-	currentWindow = windowStack;</div><div class='del'>-    } else {</div><div class='del'>-	currentWindow++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    currentWindow-&gt;left = left;</div><div class='del'>-    currentWindow-&gt;top = top;</div><div class='del'>-    currentWindow-&gt;width = width;</div><div class='del'>-    currentWindow-&gt;height = height;</div><div class='del'>-    currentWindow-&gt;title = title ? strdup(title) : NULL;</div><div class='del'>-</div><div class='del'>-    currentWindow-&gt;buffer = malloc(sizeof(short) * (width + 3) * (height + 3));</div><div class='del'>-</div><div class='del'>-    row = top - 1;</div><div class='del'>-    col = left - 1;</div><div class='del'>-    n = 0;</div><div class='del'>-    for (j = 0; j &lt; height + 3; j++, row++) {</div><div class='del'>-	SLsmg_gotorc(row, col);</div><div class='del'>-	SLsmg_read_raw(currentWindow-&gt;buffer + n,</div><div class='del'>-				currentWindow-&gt;width + 3);</div><div class='del'>-	n += currentWindow-&gt;width + 3;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_BORDER);</div><div class='del'>-    SLsmg_draw_box(top - 1, left - 1, height + 2, width + 2);</div><div class='del'>-</div><div class='del'>-    if (currentWindow-&gt;title) {</div><div class='del'>-	i = strlen(currentWindow-&gt;title) + 4;</div><div class='del'>-	i = ((width - i) / 2) + left;</div><div class='del'>-	SLsmg_gotorc(top - 1, i);</div><div class='del'>-	SLsmg_set_char_set(1);</div><div class='del'>-	SLsmg_write_char(SLSMG_RTEE_CHAR);</div><div class='del'>-	SLsmg_set_char_set(0);</div><div class='del'>-	SLsmg_write_char(' ');</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_TITLE);</div><div class='del'>-	SLsmg_write_string((char *)currentWindow-&gt;title);</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_BORDER);</div><div class='del'>-	SLsmg_write_char(' ');</div><div class='del'>-	SLsmg_set_char_set(1);</div><div class='del'>-	SLsmg_write_char(SLSMG_LTEE_CHAR);</div><div class='del'>-	SLsmg_set_char_set(0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_WINDOW);</div><div class='del'>-    SLsmg_fill_region(top, left, height, width, ' ');</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_SHADOW);</div><div class='del'>-    SLsmg_fill_region(top + height + 1, left, 1, width + 2, ' ');</div><div class='del'>-    SLsmg_fill_region(top, left + width + 1, height + 1, 1, ' ');</div><div class='del'>-</div><div class='del'>-    for (i = top; i &lt; (top + height + 1); i++) {</div><div class='del'>-	SLsmg_gotorc(i, left + width + 1);</div><div class='del'>-	SLsmg_write_string(" ");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtCenteredWindow(int width, int height, const char * title) {</div><div class='del'>-    int top, left;</div><div class='del'>-</div><div class='del'>-    top = (SLtt_Screen_Rows - height) / 2;</div><div class='del'>-</div><div class='del'>-    /* I don't know why, but this seems to look better */</div><div class='del'>-    if ((SLtt_Screen_Rows % 2) &amp;&amp; (top % 2)) top--;</div><div class='del'>-</div><div class='del'>-    left = (SLtt_Screen_Cols - width) / 2;</div><div class='del'>-</div><div class='del'>-    newtOpenWindow(left, top, width, height, title);</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtPopWindow(void) {</div><div class='del'>-    int j, row, col;</div><div class='del'>-    int n = 0;</div><div class='del'>-</div><div class='del'>-    row = col = 0;</div><div class='del'>-</div><div class='del'>-    row = currentWindow-&gt;top - 1;</div><div class='del'>-    col = currentWindow-&gt;left - 1;</div><div class='del'>-    for (j = 0; j &lt; currentWindow-&gt;height + 3; j++, row++) {</div><div class='del'>-	SLsmg_gotorc(row, col);</div><div class='del'>-	SLsmg_write_raw(currentWindow-&gt;buffer + n,</div><div class='del'>-				currentWindow-&gt;width + 3);</div><div class='del'>-	n += currentWindow-&gt;width + 3;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    free(currentWindow-&gt;buffer);</div><div class='del'>-    free(currentWindow-&gt;title);</div><div class='del'>-</div><div class='del'>-    if (currentWindow == windowStack)</div><div class='del'>-	currentWindow = NULL;</div><div class='del'>-    else</div><div class='del'>-	currentWindow--;</div><div class='del'>-</div><div class='del'>-    SLsmg_set_char_set(0);</div><div class='del'>-</div><div class='del'>-    newtRefresh();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGetWindowPos(int * x, int * y) {</div><div class='del'>-    if (currentWindow) {</div><div class='del'>-	*x = currentWindow-&gt;left;</div><div class='del'>-	*y = currentWindow-&gt;top;</div><div class='del'>-    } else</div><div class='del'>-	*x = *y = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGetrc(int * row, int * col) {</div><div class='del'>-   *row = cursorRow;</div><div class='del'>-   *col = cursorCol;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGotorc(int newRow, int newCol) {</div><div class='del'>-    if (currentWindow) {</div><div class='del'>-	newRow += currentWindow-&gt;top;</div><div class='del'>-	newCol += currentWindow-&gt;left;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    cursorRow = newRow;</div><div class='del'>-    cursorCol = newCol;</div><div class='del'>-    SLsmg_gotorc(cursorRow, cursorCol);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtDrawBox(int left, int top, int width, int height, int shadow) {</div><div class='del'>-    if (currentWindow) {</div><div class='del'>-	top += currentWindow-&gt;top;</div><div class='del'>-	left += currentWindow-&gt;left;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_draw_box(top, left, height, width);</div><div class='del'>-</div><div class='del'>-    if (shadow) {</div><div class='del'>-	SLsmg_set_color(NEWT_COLORSET_SHADOW);</div><div class='del'>-	SLsmg_fill_region(top + height, left + 1, 1, width - 1, ' ');</div><div class='del'>-	SLsmg_fill_region(top + 1, left + width, height, 1, ' ');</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtClearBox(int left, int top, int width, int height) {</div><div class='del'>-    if (currentWindow) {</div><div class='del'>-	top += currentWindow-&gt;top;</div><div class='del'>-	left += currentWindow-&gt;left;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_fill_region(top, left, height, width, ' ');</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/* This doesn't seem to work quite right. I don't know why not, but when</div><div class='del'>-   I rsh from an rxvt into a box and run this code, the machine returns</div><div class='del'>-   console key's (\033[B) rather then xterm ones (\033OB). */</div><div class='del'>-static void initKeymap(void) {</div><div class='del'>-    struct keymap * curr;</div><div class='del'>-</div><div class='del'>-    for (curr = keymap; curr-&gt;code; curr++) {</div><div class='del'>-	if (!curr-&gt;str)</div><div class='del'>-	    curr-&gt;str = SLtt_tgetstr(curr-&gt;tc);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Newt's keymap handling is a bit broken. It assumes that any extended</div><div class='del'>-       keystrokes begin with ESC. If you're using a homebrek terminal you</div><div class='del'>-       will probably need to fix this, or just yell at me and I'll be so</div><div class='del'>-       ashamed of myself for doing it this way I'll fix it */</div><div class='del'>-</div><div class='del'>-    keyPrefix = 0x1b;		/* ESC */</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void newtDelay(int usecs) {</div><div class='del'>-    fd_set set;</div><div class='del'>-    struct timeval tv;</div><div class='del'>-</div><div class='del'>-    FD_ZERO(&amp;set);</div><div class='del'>-</div><div class='del'>-    tv.tv_sec = usecs / 1000000;</div><div class='del'>-    tv.tv_usec = usecs % 1000000;</div><div class='del'>-</div><div class='del'>-    select(0, &amp;set, &amp;set, &amp;set, &amp;tv);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-struct eventResult newtDefaultEventHandler(newtComponent c __attribute__ ((unused)),</div><div class='del'>-					   struct event ev __attribute__ ((unused))) {</div><div class='del'>-    struct eventResult er;</div><div class='del'>-</div><div class='del'>-    er.result = ER_IGNORED;</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtRedrawHelpLine(void) {</div><div class='del'>-    char * buf;</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_HELPLINE);</div><div class='del'>-</div><div class='del'>-    buf = alloca(SLtt_Screen_Cols + 1);</div><div class='del'>-    memset(buf, ' ', SLtt_Screen_Cols);</div><div class='del'>-    buf[SLtt_Screen_Cols] = '\0';</div><div class='del'>-</div><div class='del'>-    if (currentHelpline)</div><div class='del'>-	memcpy(buf, *currentHelpline, strlen(*currentHelpline));</div><div class='del'>-</div><div class='del'>-    SLsmg_gotorc(SLtt_Screen_Rows - 1, 0);</div><div class='del'>-    SLsmg_write_string(buf);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtPushHelpLine(const char * text) {</div><div class='del'>-    if (!text)</div><div class='del'>-	text = defaultHelpLine;</div><div class='del'>-</div><div class='del'>-    if (currentHelpline)</div><div class='del'>-	(*(++currentHelpline)) = strdup(text);</div><div class='del'>-    else {</div><div class='del'>-	currentHelpline = helplineStack;</div><div class='del'>-	*currentHelpline = strdup(text);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    newtRedrawHelpLine();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtPopHelpLine(void) {</div><div class='del'>-    if (!currentHelpline) return;</div><div class='del'>-</div><div class='del'>-    free(*currentHelpline);</div><div class='del'>-    if (currentHelpline == helplineStack)</div><div class='del'>-	currentHelpline = NULL;</div><div class='del'>-    else</div><div class='del'>-	currentHelpline--;</div><div class='del'>-</div><div class='del'>-    newtRedrawHelpLine();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtDrawRootText(int col, int row, const char * text) {</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_ROOTTEXT);</div><div class='del'>-</div><div class='del'>-    if (col &lt; 0) {</div><div class='del'>-	col = SLtt_Screen_Cols + col;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (row &lt; 0) {</div><div class='del'>-	row = SLtt_Screen_Rows + row;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_gotorc(row, col);</div><div class='del'>-    SLsmg_write_string((char *)text);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtSetFlags(int oldFlags, int newFlags, enum newtFlagsSense sense) {</div><div class='del'>-    switch (sense) {</div><div class='del'>-      case NEWT_FLAGS_SET:</div><div class='del'>-	return oldFlags | newFlags;</div><div class='del'>-</div><div class='del'>-      case NEWT_FLAGS_RESET:</div><div class='del'>-	return oldFlags &amp; (~newFlags);</div><div class='del'>-</div><div class='del'>-      case NEWT_FLAGS_TOGGLE:</div><div class='del'>-	return oldFlags ^ newFlags;</div><div class='del'>-</div><div class='del'>-      default:</div><div class='del'>-	return oldFlags;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtBell(void)</div><div class='del'>-{</div><div class='del'>-    SLtt_beep();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtGetScreenSize(int * cols, int * rows) {</div><div class='del'>-    if (rows) *rows = SLtt_Screen_Rows;</div><div class='del'>-    if (cols) *cols = SLtt_Screen_Cols;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtDefaultPlaceHandler(newtComponent c, int newLeft, int newTop) {</div><div class='del'>-    c-&gt;left = newLeft;</div><div class='del'>-    c-&gt;top = newTop;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtDefaultMappedHandler(newtComponent c, int isMapped) {</div><div class='del'>-    c-&gt;isMapped = isMapped;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCursorOff(void) {</div><div class='del'>-    cursorOn = 0;</div><div class='del'>-    SLtt_set_cursor_visibility (cursorOn);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtCursorOn(void) {</div><div class='del'>-    cursorOn = 1;</div><div class='del'>-    SLtt_set_cursor_visibility (cursorOn);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/newt.h b/mdk-stage1/newt/newt.h<br/>deleted file mode 100644<br/>index d3fd8bedc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/newt.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/newt.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,362 +0,0 @@</div><div class='del'>-#ifndef H_NEWT</div><div class='del'>-#define H_NEWT</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" {</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-</div><div class='del'>-#define NEWT_COLORSET_ROOT 		2</div><div class='del'>-#define NEWT_COLORSET_BORDER 		3</div><div class='del'>-#define NEWT_COLORSET_WINDOW		4</div><div class='del'>-#define NEWT_COLORSET_SHADOW		5</div><div class='del'>-#define NEWT_COLORSET_TITLE		6</div><div class='del'>-#define NEWT_COLORSET_BUTTON		7</div><div class='del'>-#define NEWT_COLORSET_ACTBUTTON		8</div><div class='del'>-#define NEWT_COLORSET_CHECKBOX		9</div><div class='del'>-#define NEWT_COLORSET_ACTCHECKBOX	10</div><div class='del'>-#define NEWT_COLORSET_ENTRY		11</div><div class='del'>-#define NEWT_COLORSET_LABEL		12</div><div class='del'>-#define NEWT_COLORSET_LISTBOX		13</div><div class='del'>-#define NEWT_COLORSET_ACTLISTBOX	14</div><div class='del'>-#define NEWT_COLORSET_TEXTBOX		15</div><div class='del'>-#define NEWT_COLORSET_ACTTEXTBOX	16</div><div class='del'>-#define NEWT_COLORSET_HELPLINE		17</div><div class='del'>-#define NEWT_COLORSET_ROOTTEXT		18</div><div class='del'>-#define NEWT_COLORSET_EMPTYSCALE	19</div><div class='del'>-#define NEWT_COLORSET_FULLSCALE		20</div><div class='del'>-#define NEWT_COLORSET_DISENTRY		21</div><div class='del'>-#define NEWT_COLORSET_COMPACTBUTTON	22</div><div class='del'>-#define NEWT_COLORSET_ACTSELLISTBOX	23</div><div class='del'>-#define NEWT_COLORSET_SELLISTBOX	24</div><div class='del'>-</div><div class='del'>-#define NEWT_ARG_LAST			-100000</div><div class='del'>-#define NEWT_ARG_APPEND			-1</div><div class='del'>-</div><div class='del'>-struct newtColors {</div><div class='del'>-    char * rootFg, * rootBg;</div><div class='del'>-    char * borderFg, * borderBg;</div><div class='del'>-    char * windowFg, * windowBg;</div><div class='del'>-    char * shadowFg, * shadowBg;</div><div class='del'>-    char * titleFg, * titleBg;</div><div class='del'>-    char * buttonFg, * buttonBg;</div><div class='del'>-    char * actButtonFg, * actButtonBg;</div><div class='del'>-    char * checkboxFg, * checkboxBg;</div><div class='del'>-    char * actCheckboxFg, * actCheckboxBg;</div><div class='del'>-    char * entryFg, * entryBg;</div><div class='del'>-    char * labelFg, * labelBg;</div><div class='del'>-    char * listboxFg, * listboxBg;</div><div class='del'>-    char * actListboxFg, * actListboxBg;</div><div class='del'>-    char * textboxFg, * textboxBg;</div><div class='del'>-    char * actTextboxFg, * actTextboxBg;</div><div class='del'>-    char * helpLineFg, * helpLineBg;</div><div class='del'>-    char * rootTextFg, * rootTextBg;</div><div class='del'>-    char * emptyScale, * fullScale;</div><div class='del'>-    char * disabledEntryFg, * disabledEntryBg;</div><div class='del'>-    char * compactButtonFg, * compactButtonBg;</div><div class='del'>-    char * actSelListboxFg, * actSelListboxBg;</div><div class='del'>-    char * selListboxFg, * selListboxBg;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum newtFlagsSense { NEWT_FLAGS_SET, NEWT_FLAGS_RESET, NEWT_FLAGS_TOGGLE };</div><div class='del'>-</div><div class='del'>-#define NEWT_FLAG_RETURNEXIT 	(1 &lt;&lt; 0)</div><div class='del'>-#define NEWT_FLAG_HIDDEN 	(1 &lt;&lt; 1)</div><div class='del'>-#define NEWT_FLAG_SCROLL 	(1 &lt;&lt; 2)</div><div class='del'>-#define NEWT_FLAG_DISABLED 	(1 &lt;&lt; 3)</div><div class='del'>-/* OBSOLETE #define NEWT_FLAG_NOSCROLL 	(1 &lt;&lt; 4)	for listboxes */</div><div class='del'>-#define NEWT_FLAG_BORDER	(1 &lt;&lt; 5)</div><div class='del'>-#define NEWT_FLAG_WRAP		(1 &lt;&lt; 6)</div><div class='del'>-#define NEWT_FLAG_NOF12		(1 &lt;&lt; 7)</div><div class='del'>-#define NEWT_FLAG_MULTIPLE      (1 &lt;&lt; 8)</div><div class='del'>-#define NEWT_FLAG_SELECTED	(1 &lt;&lt; 9)</div><div class='del'>-#define NEWT_FLAG_CHECKBOX	(1 &lt;&lt; 10)</div><div class='del'>-#define NEWT_FLAG_PASSWORD      (1 &lt;&lt; 11)  /* draw '*'  of chars in entrybox */</div><div class='del'>-#define NEWT_FD_READ		(1 &lt;&lt; 0)</div><div class='del'>-#define NEWT_FD_WRITE		(1 &lt;&lt; 1)</div><div class='del'>-</div><div class='del'>-#define NEWT_CHECKBOXTREE_COLLAPSED	'\0'</div><div class='del'>-#define NEWT_CHECKBOXTREE_EXPANDED	'\1'</div><div class='del'>-#define NEWT_CHECKBOXTREE_UNSELECTED	' '</div><div class='del'>-#define NEWT_CHECKBOXTREE_SELECTED	'*'</div><div class='del'>-</div><div class='del'>-/* Backwards compatibility */</div><div class='del'>-#define NEWT_LISTBOX_RETURNEXIT NEWT_FLAG_RETURNEXIT</div><div class='del'>-#define NEWT_ENTRY_SCROLL	NEWT_FLAG_SCROLL</div><div class='del'>-#define NEWT_ENTRY_HIDDEN	NEWT_FLAG_HIDDEN</div><div class='del'>-#define NEWT_ENTRY_RETURNEXIT	NEWT_FLAG_RETURNEXIT</div><div class='del'>-#define NEWT_ENTRY_DISABLED	NEWT_FLAG_DISABLED</div><div class='del'>-</div><div class='del'>-#define NEWT_TEXTBOX_WRAP	NEWT_FLAG_WRAP</div><div class='del'>-#define NEWT_TEXTBOX_SCROLL	NEWT_FLAG_SCROLL</div><div class='del'>-#define NEWT_FORM_NOF12		NEWT_FLAG_NOF12</div><div class='del'>-</div><div class='del'>-#define newtListboxAddEntry	newtListboxAppendEntry</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct newtComponent_struct * newtComponent;</div><div class='del'>-</div><div class='del'>-extern const struct newtColors newtDefaultColorPalette;</div><div class='del'>-</div><div class='del'>-typedef void (*newtCallback)(newtComponent, void *);</div><div class='del'>-typedef void (*newtSuspendCallback)(void * data);</div><div class='del'>-</div><div class='del'>-int newtInit(void);</div><div class='del'>-int newtFinished(void);</div><div class='del'>-void newtCls(void);</div><div class='del'>-void newtResizeScreen(int redraw);</div><div class='del'>-void newtWaitForKey(void);</div><div class='del'>-void newtClearKeyBuffer(void);</div><div class='del'>-void newtDelay(int usecs);</div><div class='del'>-/* top, left are *not* counting the border */</div><div class='del'>-int newtOpenWindow(int left, int top, int width, int height, </div><div class='del'>-			  const char * title);</div><div class='del'>-int newtCenteredWindow(int width, int height, const char * title);</div><div class='del'>-void newtPopWindow(void);</div><div class='del'>-void newtSetColors(struct newtColors colors);</div><div class='del'>-void newtRefresh(void);</div><div class='del'>-void newtSuspend(void);</div><div class='del'>-void newtSetSuspendCallback(newtSuspendCallback cb, void * data);</div><div class='del'>-void newtSetHelpCallback(newtCallback cb);</div><div class='del'>-void newtResume(void);</div><div class='del'>-void newtPushHelpLine(const char * text);</div><div class='del'>-void newtRedrawHelpLine(void);</div><div class='del'>-void newtPopHelpLine(void);</div><div class='del'>-void newtDrawRootText(int col, int row, const char * text);</div><div class='del'>-void newtBell(void);</div><div class='del'>-void newtCursorOff(void);</div><div class='del'>-void newtCursorOn(void);</div><div class='del'>-</div><div class='del'>-/* Components */</div><div class='del'>-</div><div class='del'>-newtComponent newtCompactButton(int left, int top, const char * text);</div><div class='del'>-newtComponent newtButton(int left, int top, const char * text);</div><div class='del'>-newtComponent newtCheckbox(int left, int top, const char * text, char defValue,</div><div class='del'>-			   const char * seq, char * result);</div><div class='del'>-char newtCheckboxGetValue(newtComponent co);</div><div class='del'>-void newtCheckboxSetValue(newtComponent co, char value);</div><div class='del'>-void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense);</div><div class='del'>-</div><div class='del'>-    </div><div class='del'>-newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,</div><div class='del'>-			      newtComponent prevButton);</div><div class='del'>-newtComponent newtRadioGetCurrent(newtComponent setMember);</div><div class='del'>-newtComponent newtListitem(int left, int top, const char * text, int isDefault,</div><div class='del'>-			      newtComponent prevItem, const void * data, int flags);</div><div class='del'>-void newtListitemSet(newtComponent co, const char * text);</div><div class='del'>-void * newtListitemGetData(newtComponent co);</div><div class='del'>-void newtGetScreenSize(int * cols, int * rows);</div><div class='del'>-</div><div class='del'>-newtComponent newtLabel(int left, int top, const char * text);</div><div class='del'>-void newtLabelSetText(newtComponent co, const char * text);</div><div class='del'>-newtComponent newtVerticalScrollbar(int left, int top, int height,</div><div class='del'>-				    int normalColorset, int thumbColorset);</div><div class='del'>-void newtScrollbarSet(newtComponent co, int where, int total);</div><div class='del'>-</div><div class='del'>-newtComponent newtListbox(int left, int top, int height, int flags);</div><div class='del'>-void * newtListboxGetCurrent(newtComponent co);</div><div class='del'>-void newtListboxSetCurrent(newtComponent co, int num);</div><div class='del'>-void newtListboxSetCurrentByKey(newtComponent co, void * key);</div><div class='del'>-void newtListboxSetEntry(newtComponent co, int num, const char * text);</div><div class='del'>-void newtListboxSetWidth(newtComponent co, int width);</div><div class='del'>-void newtListboxSetData(newtComponent co, int num, void * data);</div><div class='del'>-int newtListboxAppendEntry(newtComponent co, const char * text, </div><div class='del'>-			   const void * data);</div><div class='del'>-/* Send the key to insert after, or NULL to insert at the top */</div><div class='del'>-int newtListboxInsertEntry(newtComponent co, const char * text, const void * data, void * key);</div><div class='del'>-int newtListboxDeleteEntry(newtComponent co, void * data);</div><div class='del'>-void newtListboxClear(newtComponent co); /* removes all entries from listbox */</div><div class='del'>-void newtListboxGetEntry(newtComponent co, int num, char **text, void **data);</div><div class='del'>-/* Returns an array of data pointers from items, last element is NULL */</div><div class='del'>-void **newtListboxGetSelection(newtComponent co, int *numitems);</div><div class='del'>-void newtListboxClearSelection(newtComponent co);</div><div class='del'>-void newtListboxSelectItem(newtComponent co, const void * key,</div><div class='del'>-	enum newtFlagsSense sense);</div><div class='del'>-</div><div class='del'>-newtComponent newtCheckboxTree(int left, int top, int height, int flags);</div><div class='del'>-newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags);</div><div class='del'>-const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems);</div><div class='del'>-const void * newtCheckboxTreeGetCurrent(newtComponent co);</div><div class='del'>-const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum);</div><div class='del'>-/* last item is NEWT_ARG_LAST for all of these */</div><div class='del'>-int newtCheckboxTreeAddItem(newtComponent co, </div><div class='del'>-			    const char * text, const void * data,</div><div class='del'>-			    int flags, int index, ...);</div><div class='del'>-int newtCheckboxTreeAddArray(newtComponent co, </div><div class='del'>-			     const char * text, const void * data,</div><div class='del'>-			     int flags, int * indexes);</div><div class='del'>-int * newtCheckboxTreeFindItem(newtComponent co, void * data);</div><div class='del'>-void newtCheckboxTreeSetEntry(newtComponent co, const void * data,</div><div class='del'>-			      const char * text);</div><div class='del'>-char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data);</div><div class='del'>-void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data,</div><div class='del'>-				   char value);</div><div class='del'>-    </div><div class='del'>-newtComponent newtTextboxReflowed(int left, int top, char * text, int width,</div><div class='del'>-				  int flexDown, int flexUp, int flags);</div><div class='del'>-newtComponent newtTextbox(int left, int top, int width, int height, int flags);</div><div class='del'>-void newtTextboxSetText(newtComponent co, const char * text);</div><div class='del'>-void newtTextboxSetHeight(newtComponent co, int height);</div><div class='del'>-int newtTextboxGetNumLines(newtComponent co);</div><div class='del'>-char * newtReflowText(char * text, int width, int flexDown, int flexUp,</div><div class='del'>-		      int * actualWidth, int * actualHeight);</div><div class='del'>-</div><div class='del'>-struct newtExitStruct {</div><div class='del'>-    enum { NEWT_EXIT_HOTKEY, NEWT_EXIT_COMPONENT, NEWT_EXIT_FDREADY,</div><div class='del'>-	   NEWT_EXIT_TIMER } reason;</div><div class='del'>-    union {</div><div class='del'>-	int key;</div><div class='del'>-	newtComponent co;</div><div class='del'>-    } u;</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-newtComponent newtForm(newtComponent vertBar, void * helpTag, int flags);</div><div class='del'>-void newtFormSetTimer(newtComponent form, int millisecs);</div><div class='del'>-void newtFormWatchFd(newtComponent form, int fd, int fdFlags);</div><div class='del'>-void newtFormSetSize(newtComponent co);</div><div class='del'>-newtComponent newtFormGetCurrent(newtComponent co);</div><div class='del'>-void newtFormSetBackground(newtComponent co, int color);</div><div class='del'>-void newtFormSetCurrent(newtComponent co, newtComponent subco);</div><div class='del'>-void newtFormAddComponent(newtComponent form, newtComponent co);</div><div class='del'>-void newtFormAddComponents(newtComponent form, ...);</div><div class='del'>-void newtFormSetHeight(newtComponent co, int height);</div><div class='del'>-void newtFormSetWidth(newtComponent co, int width);</div><div class='del'>-newtComponent newtRunForm(newtComponent form);		/* obsolete */</div><div class='del'>-void newtFormRun(newtComponent co, struct newtExitStruct * es);</div><div class='del'>-void newtDrawForm(newtComponent form);</div><div class='del'>-void newtFormAddHotKey(newtComponent co, int key);</div><div class='del'>-</div><div class='del'>-typedef int (*newtEntryFilter)(newtComponent entry, void * data, int ch,</div><div class='del'>-			       int cursor);</div><div class='del'>-newtComponent newtEntry(int left, int top, const char * initialValue, int width,</div><div class='del'>-			char ** resultPtr, int flags);</div><div class='del'>-void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd);</div><div class='del'>-void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data);</div><div class='del'>-char * newtEntryGetValue(newtComponent co);</div><div class='del'>-void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense);</div><div class='del'>-</div><div class='del'>-newtComponent newtScale(int left, int top, int width, int fullValue);</div><div class='del'>-void newtScaleSet(newtComponent co, unsigned int amount);</div><div class='del'>-</div><div class='del'>-void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);</div><div class='del'>-void newtComponentTakesFocus(newtComponent co, int val);</div><div class='del'>-</div><div class='del'>-/* this also destroys all of the components (including other forms) on the </div><div class='del'>-   form */</div><div class='del'>-void newtFormDestroy(newtComponent form);	</div><div class='del'>-</div><div class='del'>-/* Key codes */</div><div class='del'>-</div><div class='del'>-#define NEWT_KEY_TAB			'\t'</div><div class='del'>-#define NEWT_KEY_ENTER			'\r'</div><div class='del'>-#define NEWT_KEY_SUSPEND		'\032'			/* ctrl - z*/</div><div class='del'>-#define NEWT_KEY_RETURN			NEWT_KEY_ENTER</div><div class='del'>-</div><div class='del'>-#define NEWT_KEY_EXTRA_BASE		0x8000</div><div class='del'>-#define NEWT_KEY_UP			NEWT_KEY_EXTRA_BASE + 1</div><div class='del'>-#define NEWT_KEY_DOWN			NEWT_KEY_EXTRA_BASE + 2</div><div class='del'>-#define NEWT_KEY_LEFT			NEWT_KEY_EXTRA_BASE + 4</div><div class='del'>-#define NEWT_KEY_RIGHT			NEWT_KEY_EXTRA_BASE + 5</div><div class='del'>-#define NEWT_KEY_BKSPC			NEWT_KEY_EXTRA_BASE + 6</div><div class='del'>-#define NEWT_KEY_DELETE			NEWT_KEY_EXTRA_BASE + 7</div><div class='del'>-#define NEWT_KEY_HOME			NEWT_KEY_EXTRA_BASE + 8</div><div class='del'>-#define NEWT_KEY_END			NEWT_KEY_EXTRA_BASE + 9</div><div class='del'>-#define NEWT_KEY_UNTAB			NEWT_KEY_EXTRA_BASE + 10</div><div class='del'>-#define NEWT_KEY_PGUP			NEWT_KEY_EXTRA_BASE + 11</div><div class='del'>-#define NEWT_KEY_PGDN			NEWT_KEY_EXTRA_BASE + 12</div><div class='del'>-#define NEWT_KEY_INSERT			NEWT_KEY_EXTRA_BASE + 13</div><div class='del'>-</div><div class='del'>-#define NEWT_KEY_F1			NEWT_KEY_EXTRA_BASE + 101</div><div class='del'>-#define NEWT_KEY_F2			NEWT_KEY_EXTRA_BASE + 102</div><div class='del'>-#define NEWT_KEY_F3			NEWT_KEY_EXTRA_BASE + 103</div><div class='del'>-#define NEWT_KEY_F4			NEWT_KEY_EXTRA_BASE + 104</div><div class='del'>-#define NEWT_KEY_F5			NEWT_KEY_EXTRA_BASE + 105</div><div class='del'>-#define NEWT_KEY_F6			NEWT_KEY_EXTRA_BASE + 106</div><div class='del'>-#define NEWT_KEY_F7			NEWT_KEY_EXTRA_BASE + 107</div><div class='del'>-#define NEWT_KEY_F8			NEWT_KEY_EXTRA_BASE + 108</div><div class='del'>-#define NEWT_KEY_F9			NEWT_KEY_EXTRA_BASE + 109</div><div class='del'>-#define NEWT_KEY_F10			NEWT_KEY_EXTRA_BASE + 110</div><div class='del'>-#define NEWT_KEY_F11			NEWT_KEY_EXTRA_BASE + 111</div><div class='del'>-#define NEWT_KEY_F12			NEWT_KEY_EXTRA_BASE + 112</div><div class='del'>-</div><div class='del'>-/* not really a key, but newtGetKey returns it */</div><div class='del'>-#define NEWT_KEY_RESIZE			NEWT_KEY_EXTRA_BASE + 113</div><div class='del'>-</div><div class='del'>-#define NEWT_ANCHOR_LEFT		(1 &lt;&lt; 0)</div><div class='del'>-#define NEWT_ANCHOR_RIGHT		(1 &lt;&lt; 1)</div><div class='del'>-#define NEWT_ANCHOR_TOP			(1 &lt;&lt; 2)</div><div class='del'>-#define NEWT_ANCHOR_BOTTOM		(1 &lt;&lt; 3)</div><div class='del'>-</div><div class='del'>-#define NEWT_GRID_FLAG_GROWX		(1 &lt;&lt; 0)</div><div class='del'>-#define NEWT_GRID_FLAG_GROWY		(1 &lt;&lt; 1)</div><div class='del'>-</div><div class='del'>-typedef struct grid_s * newtGrid;</div><div class='del'>-enum newtGridElement { NEWT_GRID_EMPTY = 0,</div><div class='del'>-		       NEWT_GRID_COMPONENT, NEWT_GRID_SUBGRID };</div><div class='del'>-</div><div class='del'>-newtGrid newtCreateGrid(int cols, int rows);</div><div class='del'>-/* TYPE, what, TYPE, what, ..., NULL */</div><div class='del'>-newtGrid newtGridVStacked(enum newtGridElement type, void * what, ...);</div><div class='del'>-newtGrid newtGridVCloseStacked(enum newtGridElement type, void * what, ...);</div><div class='del'>-newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...);</div><div class='del'>-newtGrid newtGridHCloseStacked(enum newtGridElement type1, void * what1, ...);</div><div class='del'>-newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle,</div><div class='del'>-			     newtGrid buttons);</div><div class='del'>-newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle,</div><div class='del'>-			     newtGrid buttons);</div><div class='del'>-void newtGridSetField(newtGrid grid, int col, int row, </div><div class='del'>-		      enum newtGridElement type, void * val, int padLeft,</div><div class='del'>-		      int padTop, int padRight, int padBottom, int anchor,</div><div class='del'>-		      int flags);</div><div class='del'>-void newtGridPlace(newtGrid grid, int left, int top);</div><div class='del'>-#define newtGridDestroy newtGridFree</div><div class='del'>-void newtGridFree(newtGrid grid, int recurse);</div><div class='del'>-void newtGridGetSize(newtGrid grid, int * width, int * height);</div><div class='del'>-void newtGridWrappedWindow(newtGrid grid, char * title);</div><div class='del'>-void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top);</div><div class='del'>-void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, </div><div class='del'>-				 int recurse);</div><div class='del'>-</div><div class='del'>-/* convienve */</div><div class='del'>-newtGrid newtButtonBarv(char * button1, newtComponent * b1comp, va_list args);</div><div class='del'>-newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...);</div><div class='del'>-</div><div class='del'>-/* automatically centered and shrink wrapped */</div><div class='del'>-void newtWinMessage(char * title, char * buttonText, char * text, ...);</div><div class='del'>-void newtWinMessagev(char * title, char * buttonText, char * text, </div><div class='del'>-		     va_list argv);</div><div class='del'>-</div><div class='del'>-/* having separate calls for these two seems silly, but having two separate</div><div class='del'>-   variable length-arg lists seems like a bad idea as well */</div><div class='del'>-</div><div class='del'>-/* Returns 0 if F12 was pressed, 1 for button1, 2 for button2 */</div><div class='del'>-int newtWinChoice(char * title, char * button1, char * button2, </div><div class='del'>-		   char * text, ...);</div><div class='del'>-/* Returns 0 if F12 was pressed, 1 for button1, 2 for button2, </div><div class='del'>-   3 for button3 */</div><div class='del'>-int newtWinTernary(char * title, char * button1, char * button2, </div><div class='del'>-		   char * button3, char * message, ...);</div><div class='del'>-</div><div class='del'>-/* Returns the button number pressed, 0 on F12 */</div><div class='del'>-int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, </div><div class='del'>-		int flexUp, int maxListHeight, char ** items, int * listItem,</div><div class='del'>-		char * button1, ...);</div><div class='del'>-</div><div class='del'>-struct newtWinEntry {</div><div class='del'>-    char * text;</div><div class='del'>-    char ** value;		/* may be initialized to set default */</div><div class='del'>-    int flags;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Returns the button number pressed, 0 on F12. The final values are</div><div class='del'>-   dynamically allocated, and need to be freed. */</div><div class='del'>-int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, </div><div class='del'>-		   int flexUp, int dataWidth, </div><div class='del'>-		   struct newtWinEntry * items, char * button1, ...);</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-} /* End of extern "C" { */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* H_NEWT */</div><div class='head'>diff --git a/mdk-stage1/newt/newt_pr.h b/mdk-stage1/newt/newt_pr.h<br/>deleted file mode 100644<br/>index 76f5e2f6f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/newt_pr.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/newt_pr.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,82 +0,0 @@</div><div class='del'>-#ifndef H_NEWT_PR</div><div class='del'>-#define H_NEWT_PR</div><div class='del'>-</div><div class='del'>-#define COLORSET_ROOT 		NEWT_COLORSET_ROOT</div><div class='del'>-#define COLORSET_BORDER 	NEWT_COLORSET_BORDER</div><div class='del'>-#define COLORSET_WINDOW		NEWT_COLORSET_WINDOW</div><div class='del'>-#define COLORSET_SHADOW		NEWT_COLORSET_SHADOW</div><div class='del'>-#define COLORSET_TITLE		NEWT_COLORSET_TITLE</div><div class='del'>-#define COLORSET_BUTTON		NEWT_COLORSET_BUTTON</div><div class='del'>-#define COLORSET_ACTBUTTON	NEWT_COLORSET_ACTBUTTON</div><div class='del'>-#define COLORSET_CHECKBOX	NEWT_COLORSET_CHECKBOX</div><div class='del'>-#define COLORSET_ACTCHECKBOX	NEWT_COLORSET_ACTCHECKBOX</div><div class='del'>-#define COLORSET_ENTRY		NEWT_COLORSET_ENTRY</div><div class='del'>-#define COLORSET_LABEL		NEWT_COLORSET_LABEL</div><div class='del'>-#define COLORSET_LISTBOX	NEWT_COLORSET_LISTBOX</div><div class='del'>-#define COLORSET_ACTLISTBOX	NEWT_COLORSET_ACTLISTBOX</div><div class='del'>-#define COLORSET_TEXTBOX	NEWT_COLORSET_TEXTBOX</div><div class='del'>-#define COLORSET_ACTTEXTBOX	NEWT_COLORSET_ACTTEXTBOX</div><div class='del'>-</div><div class='del'>-int newtSetFlags(int oldFlags, int newFlags, enum newtFlagsSense sense);</div><div class='del'>-</div><div class='del'>-void newtGotorc(int row, int col);</div><div class='del'>-void newtGetrc(int * row, int * col);</div><div class='del'>-void newtGetWindowPos(int * x, int * y);</div><div class='del'>-void newtDrawBox(int left, int top, int width, int height, int shadow);</div><div class='del'>-void newtClearBox(int left, int top, int width, int height);</div><div class='del'>-</div><div class='del'>-int newtGetKey(void);</div><div class='del'>-</div><div class='del'>-struct newtComponent_struct {</div><div class='del'>-    /* common data */</div><div class='del'>-    int height, width;</div><div class='del'>-    int top, left;</div><div class='del'>-    int takesFocus;</div><div class='del'>-    int isMapped;</div><div class='del'>-</div><div class='del'>-    struct componentOps * ops;</div><div class='del'>-</div><div class='del'>-    newtCallback callback;</div><div class='del'>-    void * callbackData;</div><div class='del'>-</div><div class='del'>-    void * data;</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-enum eventResultTypes { ER_IGNORED, ER_SWALLOWED, ER_EXITFORM, ER_SETFOCUS,</div><div class='del'>-			ER_NEXTCOMP };</div><div class='del'>-struct eventResult {</div><div class='del'>-    enum eventResultTypes result;</div><div class='del'>-    union {</div><div class='del'>-	newtComponent focus;</div><div class='del'>-    } u;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-enum eventTypes { EV_FOCUS, EV_UNFOCUS, EV_KEYPRESS, EV_MOUSE };</div><div class='del'>-enum eventSequence { EV_EARLY, EV_NORMAL, EV_LATE };</div><div class='del'>-</div><div class='del'>-struct event {</div><div class='del'>-    enum eventTypes event;</div><div class='del'>-    enum eventSequence when;</div><div class='del'>-    union {</div><div class='del'>-	int key;</div><div class='del'>-	struct {</div><div class='del'>-	    enum { MOUSE_MOTION, MOUSE_BUTTON_DOWN, MOUSE_BUTTON_UP } type;</div><div class='del'>-	    int x, y;</div><div class='del'>-	} mouse;</div><div class='del'>-    } u;</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-struct componentOps {</div><div class='del'>-    void (* draw)(newtComponent c);</div><div class='del'>-    struct eventResult (* event)(newtComponent c, struct event ev);</div><div class='del'>-    void (* destroy)(newtComponent c);</div><div class='del'>-    void (* place)(newtComponent c, int newLeft, int newTop);</div><div class='del'>-    void (* mapped)(newtComponent c, int isMapped);</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-void newtDefaultPlaceHandler(newtComponent c, int newLeft, int newTop);</div><div class='del'>-void newtDefaultMappedHandler(newtComponent c, int isMapped);</div><div class='del'>-struct eventResult newtDefaultEventHandler(newtComponent c,</div><div class='del'>-					   struct event ev);</div><div class='del'>-</div><div class='del'>-#endif /* H_NEWT_PR */</div><div class='head'>diff --git a/mdk-stage1/newt/scale.c b/mdk-stage1/newt/scale.c<br/>deleted file mode 100644<br/>index 800958580..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/scale.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/scale.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,72 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct scale {</div><div class='del'>-    int fullValue;</div><div class='del'>-    int charsSet;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void scaleDraw(newtComponent co);</div><div class='del'>-</div><div class='del'>-static struct componentOps scaleOps = {</div><div class='del'>-    scaleDraw,</div><div class='del'>-    newtDefaultEventHandler,</div><div class='del'>-    NULL,</div><div class='del'>-    newtDefaultPlaceHandler,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-newtComponent newtScale(int left, int top, int width, int fullValue) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct scale * sc;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    sc = malloc(sizeof(struct scale));</div><div class='del'>-    co-&gt;data = sc;</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;scaleOps;</div><div class='del'>-</div><div class='del'>-    co-&gt;height = 1;</div><div class='del'>-    co-&gt;width = width;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;takesFocus = 0;</div><div class='del'>-</div><div class='del'>-    sc-&gt;fullValue = fullValue;</div><div class='del'>-    sc-&gt;charsSet = 0;</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtScaleSet(newtComponent co, unsigned int amount) {</div><div class='del'>-    struct scale * sc = co-&gt;data;</div><div class='del'>-    int newCharsSet;</div><div class='del'>-</div><div class='del'>-    newCharsSet = (amount * co-&gt;width) / sc-&gt;fullValue;</div><div class='del'>-    </div><div class='del'>-    if (newCharsSet != sc-&gt;charsSet) {</div><div class='del'>-	sc-&gt;charsSet = newCharsSet;</div><div class='del'>-	scaleDraw(co);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void scaleDraw(newtComponent co) {</div><div class='del'>-    struct scale * sc = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (co-&gt;top == -1) return;</div><div class='del'>-</div><div class='del'>-    newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_FULLSCALE);</div><div class='del'>-    for (i = 0; i &lt; sc-&gt;charsSet; i++)</div><div class='del'>-	SLsmg_write_string(" ");</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_EMPTYSCALE);</div><div class='del'>-    for (i = 0; i &lt; (co-&gt;width - sc-&gt;charsSet); i++)</div><div class='del'>-	SLsmg_write_string(" ");</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/scrollbar.c b/mdk-stage1/newt/scrollbar.c<br/>deleted file mode 100644<br/>index cb4bc2757..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/scrollbar.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/scrollbar.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,124 +0,0 @@</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct scrollbar {</div><div class='del'>-    int curr;</div><div class='del'>-    int cs, csThumb;</div><div class='del'>-    int arrows;</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static void sbDraw(newtComponent co);</div><div class='del'>-static void sbDestroy(newtComponent co);</div><div class='del'>-static void sbDrawThumb(newtComponent co, int isOn);</div><div class='del'>-</div><div class='del'>-static struct componentOps sbOps = {</div><div class='del'>-    sbDraw,</div><div class='del'>-    newtDefaultEventHandler,</div><div class='del'>-    sbDestroy,</div><div class='del'>-    newtDefaultPlaceHandler,</div><div class='del'>-    newtDefaultMappedHandler,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-void newtScrollbarSet(newtComponent co, int where, int total) {</div><div class='del'>-    struct scrollbar * sb = co-&gt;data;</div><div class='del'>-    int new;</div><div class='del'>-</div><div class='del'>-    if (sb-&gt;arrows)</div><div class='del'>-	new = (where * (co-&gt;height - 3)) / (total ? total : 1) + 1;</div><div class='del'>-    else</div><div class='del'>-	new = (where * (co-&gt;height - 1)) / (total ? total : 1);</div><div class='del'>-    if (new != sb-&gt;curr) {</div><div class='del'>-	sbDrawThumb(co, 0);</div><div class='del'>-	sb-&gt;curr = new;</div><div class='del'>-	sbDrawThumb(co, 1);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtVerticalScrollbar(int left, int top, int height,</div><div class='del'>-				    int normalColorset, int thumbColorset) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct scrollbar * sb;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    sb = malloc(sizeof(*sb));</div><div class='del'>-    co-&gt;data = sb;</div><div class='del'>-</div><div class='del'>-    if (!strcmp(getenv("TERM"), "linux") &amp;&amp; height &gt;= 2) {</div><div class='del'>-	sb-&gt;arrows = 1;</div><div class='del'>-	sb-&gt;curr = 1;</div><div class='del'>-    } else {</div><div class='del'>-	sb-&gt;arrows = 0;</div><div class='del'>-	sb-&gt;curr = 0;</div><div class='del'>-    }</div><div class='del'>-    sb-&gt;cs = normalColorset;</div><div class='del'>-    sb-&gt;csThumb = thumbColorset;</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;sbOps;</div><div class='del'>-    co-&gt;isMapped = 0;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-    co-&gt;width = 1;</div><div class='del'>-    co-&gt;takesFocus = 0;  </div><div class='del'>-    </div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void sbDraw(newtComponent co) {</div><div class='del'>-    struct scrollbar * sb = co-&gt;data;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return;</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(sb-&gt;cs);</div><div class='del'>-</div><div class='del'>-    SLsmg_set_char_set(1);</div><div class='del'>-    if (sb-&gt;arrows) {</div><div class='del'>-	newtGotorc(co-&gt;top, co-&gt;left);</div><div class='del'>- 	SLsmg_write_char('\x2d');</div><div class='del'>-	for (i = 1; i &lt; co-&gt;height - 1; i++) {</div><div class='del'>-	    newtGotorc(i + co-&gt;top, co-&gt;left);</div><div class='del'>-	    SLsmg_write_char('\x61');</div><div class='del'>-	}</div><div class='del'>-	newtGotorc(co-&gt;top + co-&gt;height - 1, co-&gt;left);</div><div class='del'>- 	SLsmg_write_char('\x2e');</div><div class='del'>-    } else {</div><div class='del'>-	for (i = 0; i &lt; co-&gt;height; i++) {</div><div class='del'>-	    newtGotorc(i + co-&gt;top, co-&gt;left);</div><div class='del'>-	    SLsmg_write_char('\x61');</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_set_char_set(0);</div><div class='del'>-</div><div class='del'>-    sbDrawThumb(co, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void sbDrawThumb(newtComponent co, int isOn) {</div><div class='del'>-    struct scrollbar * sb = co-&gt;data;</div><div class='del'>-    char ch = isOn ? '#' : '\x61';</div><div class='del'>-</div><div class='del'>-    if (!co-&gt;isMapped) return;</div><div class='del'>-</div><div class='del'>-    newtGotorc(sb-&gt;curr + co-&gt;top, co-&gt;left);</div><div class='del'>-    SLsmg_set_char_set(1);</div><div class='del'>-</div><div class='del'>-    /*if (isOn)</div><div class='del'>-	SLsmg_set_color(sb-&gt;csThumb);</div><div class='del'>-    else*/</div><div class='del'>-	SLsmg_set_color(sb-&gt;cs);</div><div class='del'>-</div><div class='del'>-    SLsmg_write_char(ch);</div><div class='del'>-    SLsmg_set_char_set(0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void sbDestroy(newtComponent co) {</div><div class='del'>-    struct scrollbar * sb = co-&gt;data;</div><div class='del'>- </div><div class='del'>-    free(sb);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/textbox.c b/mdk-stage1/newt/textbox.c<br/>deleted file mode 100644<br/>index 8eb4ae4db..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/textbox.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/textbox.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,409 +0,0 @@</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;slang.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "newt.h"</div><div class='del'>-#include "newt_pr.h"</div><div class='del'>-</div><div class='del'>-struct textbox {</div><div class='del'>-    char ** lines;</div><div class='del'>-    int numLines;</div><div class='del'>-    int linesAlloced;</div><div class='del'>-    int doWrap;</div><div class='del'>-    newtComponent sb;</div><div class='del'>-    int topLine;</div><div class='del'>-    int textWidth;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static char * expandTabs(const char * text);</div><div class='del'>-static void textboxDraw(newtComponent co);</div><div class='del'>-static void addLine(newtComponent co, const char * s, int len);</div><div class='del'>-static void doReflow(const char * text, char ** resultPtr, int width, </div><div class='del'>-		     int * badness, int * heightPtr);</div><div class='del'>-static struct eventResult textboxEvent(newtComponent c,</div><div class='del'>-				      struct event ev);</div><div class='del'>-static void textboxDestroy(newtComponent co);</div><div class='del'>-static void textboxPlace(newtComponent co, int newLeft, int newTop);</div><div class='del'>-static void textboxMapped(newtComponent co, int isMapped);</div><div class='del'>-</div><div class='del'>-static struct componentOps textboxOps = {</div><div class='del'>-    textboxDraw,</div><div class='del'>-    textboxEvent,</div><div class='del'>-    textboxDestroy,</div><div class='del'>-    textboxPlace,</div><div class='del'>-    textboxMapped,</div><div class='del'>-} ;</div><div class='del'>-</div><div class='del'>-static void textboxMapped(newtComponent co, int isMapped) {</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;isMapped = isMapped;</div><div class='del'>-    if (tb-&gt;sb)</div><div class='del'>-	tb-&gt;sb-&gt;ops-&gt;mapped(tb-&gt;sb, isMapped);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void textboxPlace(newtComponent co, int newLeft, int newTop) {</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    co-&gt;top = newTop;</div><div class='del'>-    co-&gt;left = newLeft;</div><div class='del'>-</div><div class='del'>-    if (tb-&gt;sb)</div><div class='del'>-	tb-&gt;sb-&gt;ops-&gt;place(tb-&gt;sb, co-&gt;left + co-&gt;width - 1, co-&gt;top);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtTextboxSetHeight(newtComponent co, int height) {</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtTextboxGetNumLines(newtComponent co) {</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    return (tb-&gt;numLines);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtTextboxReflowed(int left, int top, char * text, int width,</div><div class='del'>-				  int flexDown, int flexUp, int flags __attribute__ ((unused))) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    char * reflowedText;</div><div class='del'>-    int actWidth, actHeight;</div><div class='del'>-</div><div class='del'>-    reflowedText = newtReflowText(text, width, flexDown, flexUp,</div><div class='del'>-				  &amp;actWidth, &amp;actHeight);</div><div class='del'>-    </div><div class='del'>-    co = newtTextbox(left, top, actWidth, actHeight, NEWT_FLAG_WRAP);</div><div class='del'>-    newtTextboxSetText(co, reflowedText);</div><div class='del'>-    free(reflowedText);</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-newtComponent newtTextbox(int left, int top, int width, int height, int flags) {</div><div class='del'>-    newtComponent co;</div><div class='del'>-    struct textbox * tb;</div><div class='del'>-</div><div class='del'>-    co = malloc(sizeof(*co));</div><div class='del'>-    tb = malloc(sizeof(*tb));</div><div class='del'>-    co-&gt;data = tb;</div><div class='del'>-</div><div class='del'>-    co-&gt;ops = &amp;textboxOps;</div><div class='del'>-</div><div class='del'>-    co-&gt;height = height;</div><div class='del'>-    co-&gt;top = top;</div><div class='del'>-    co-&gt;left = left;</div><div class='del'>-    co-&gt;takesFocus = 0;</div><div class='del'>-    co-&gt;width = width;</div><div class='del'>-</div><div class='del'>-    tb-&gt;doWrap = flags &amp; NEWT_FLAG_WRAP;</div><div class='del'>-    tb-&gt;numLines = 0;</div><div class='del'>-    tb-&gt;linesAlloced = 0;</div><div class='del'>-    tb-&gt;lines = NULL;</div><div class='del'>-    tb-&gt;topLine = 0;</div><div class='del'>-    tb-&gt;textWidth = width;</div><div class='del'>-</div><div class='del'>-    if (flags &amp; NEWT_FLAG_SCROLL) {</div><div class='del'>-	co-&gt;width += 2;</div><div class='del'>-	tb-&gt;sb = newtVerticalScrollbar(co-&gt;left + co-&gt;width - 1, co-&gt;top, </div><div class='del'>-			   co-&gt;height, COLORSET_TEXTBOX, COLORSET_TEXTBOX);</div><div class='del'>-    } else {</div><div class='del'>-	tb-&gt;sb = NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return co;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static char * expandTabs(const char * text) {</div><div class='del'>-    int bufAlloced = strlen(text) + 40;</div><div class='del'>-    char * buf, * dest;</div><div class='del'>-    const char * src;</div><div class='del'>-    int bufUsed = 0;</div><div class='del'>-    int linePos = 0;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    buf = malloc(bufAlloced + 1);</div><div class='del'>-    for (src = text, dest = buf; *src; src++) {</div><div class='del'>-	if ((bufUsed + 10) &gt; bufAlloced) {</div><div class='del'>-	    bufAlloced += strlen(text) / 2;</div><div class='del'>-	    buf = realloc(buf, bufAlloced + 1);</div><div class='del'>-	    dest = buf + bufUsed;</div><div class='del'>-	}</div><div class='del'>-	if (*src == '\t') {</div><div class='del'>-	    i = 8 - (linePos &amp; 8);</div><div class='del'>-	    memset(dest, ' ', i);</div><div class='del'>-	    dest += i, bufUsed += i, linePos += i;</div><div class='del'>-	} else {</div><div class='del'>-	    if (*src == '\n')</div><div class='del'>-		linePos = 0;</div><div class='del'>-	    else</div><div class='del'>-		linePos++;</div><div class='del'>-</div><div class='del'>-	    *dest++ = *src;</div><div class='del'>-	    bufUsed++;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *dest = '\0';</div><div class='del'>-    return buf;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define iseuckanji(c)   (0xa1 &lt;= (unsigned char)(c&amp;0xff) &amp;&amp; (unsigned char)(c&amp;0xff) &lt;= 0xfe)</div><div class='del'>-</div><div class='del'>-static void doReflow(const char * text, char ** resultPtr, int width, </div><div class='del'>-		     int * badness, int * heightPtr) {</div><div class='del'>-    char * result = NULL;</div><div class='del'>-    const char * chptr, * end;</div><div class='del'>-    int i;</div><div class='del'>-    int howbad = 0;</div><div class='del'>-    int height = 0;</div><div class='del'>-    int kanji = 0;</div><div class='del'>-</div><div class='del'>-    if (resultPtr) {</div><div class='del'>-	/* XXX I think this will work */</div><div class='del'>-	result = malloc(strlen(text) + (strlen(text) / width) + 50);</div><div class='del'>-	*result = '\0';</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    while (*text) {</div><div class='del'>-        kanji = 0;</div><div class='del'>-	end = strchr(text, '\n');</div><div class='del'>-	if (!end)</div><div class='del'>-	    end = text + strlen(text);</div><div class='del'>-</div><div class='del'>-	while (*text &amp;&amp; text &lt; end) {</div><div class='del'>-	    if (end - text &lt; width) {</div><div class='del'>-		if (result) {</div><div class='del'>-		    strncat(result, text, end - text);</div><div class='del'>-		    strcat(result, "\n");</div><div class='del'>-		    height++;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (end - text &lt; (width / 2))</div><div class='del'>-		    howbad += ((width / 2) - (end - text)) / 2;</div><div class='del'>-		text = end;</div><div class='del'>-		if (*text) text++;</div><div class='del'>-	    } else {</div><div class='del'>-	        chptr = text;</div><div class='del'>-	        kanji = 0;</div><div class='del'>-	        for ( i = 0; i &lt; width - 1; i++ ) {</div><div class='del'>-		    if ( !iseuckanji(*chptr)) {</div><div class='del'>-			kanji = 0;</div><div class='del'>-		    } else if ( kanji == 1 ) {</div><div class='del'>-		        kanji = 2; </div><div class='del'>-		    } else {</div><div class='del'>-		        kanji = 1;</div><div class='del'>-		    }</div><div class='del'>-		    chptr++;</div><div class='del'>-		}</div><div class='del'>-	        if (kanji == 0) {</div><div class='del'>-		    while (chptr &gt; text &amp;&amp; !isspace(*chptr)) chptr--;</div><div class='del'>-		    while (chptr &gt; text &amp;&amp; isspace(*chptr)) chptr--;</div><div class='del'>-		    chptr++;</div><div class='del'>-		}</div><div class='del'>-		</div><div class='del'>-		if (chptr-text == 1 &amp;&amp; !isspace(*chptr))</div><div class='del'>-		  chptr = text + width - 1;</div><div class='del'>-</div><div class='del'>-		if (chptr &gt; text)</div><div class='del'>-		    howbad += width - (chptr - text) + 1;</div><div class='del'>-		if (result) {</div><div class='del'>-		  if (kanji == 1) {</div><div class='del'>-		    strncat(result, text, chptr - text + 1);</div><div class='del'>-		    chptr++;</div><div class='del'>-		    kanji = 0;</div><div class='del'>-		  } else {</div><div class='del'>-		    strncat(result, text, chptr - text);</div><div class='del'>-		  }</div><div class='del'>-		    strcat(result, "\n");</div><div class='del'>-		    height++;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	        if (isspace(*chptr))</div><div class='del'>-		    text = chptr + 1;</div><div class='del'>-		else</div><div class='del'>-		  text = chptr;</div><div class='del'>-		while (isspace(*text)) text++;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-//    if (result) printf("result: %s\n", result);</div><div class='del'>-</div><div class='del'>-    if (badness) *badness = howbad;</div><div class='del'>-    if (resultPtr) *resultPtr = result;</div><div class='del'>-    if (heightPtr) *heightPtr = height;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char * newtReflowText(char * text, int width, int flexDown, int flexUp,</div><div class='del'>-		      int * actualWidth, int * actualHeight) {</div><div class='del'>-    int min, max;</div><div class='del'>-    int i;</div><div class='del'>-    char * result;</div><div class='del'>-    int minbad, minbadwidth, howbad;</div><div class='del'>-    char * expandedText;</div><div class='del'>-</div><div class='del'>-    expandedText = expandTabs(text);</div><div class='del'>-</div><div class='del'>-    if (flexDown || flexUp) {</div><div class='del'>-	min = width - flexDown;</div><div class='del'>-	max = width + flexUp;</div><div class='del'>-</div><div class='del'>-	minbad = -1;</div><div class='del'>-	minbadwidth = width;</div><div class='del'>-</div><div class='del'>-	for (i = min; i &lt;= max; i++) {</div><div class='del'>-	    doReflow(expandedText, NULL, i, &amp;howbad, NULL);</div><div class='del'>-</div><div class='del'>-	    if (minbad == -1 || howbad &lt; minbad) {</div><div class='del'>-		minbad = howbad;</div><div class='del'>-		minbadwidth = i;</div><div class='del'>-	    }</div><div class='del'>- 	}</div><div class='del'>-</div><div class='del'>-	width = minbadwidth;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    doReflow(expandedText, &amp;result, width, NULL, actualHeight);</div><div class='del'>-    free(expandedText);</div><div class='del'>-    if (actualWidth) *actualWidth = width;</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtTextboxSetText(newtComponent co, const char * text) {</div><div class='del'>-    const char * start, * end;</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-    char * reflowed, * expanded;</div><div class='del'>-    int badness, height;</div><div class='del'>-</div><div class='del'>-    if (tb-&gt;lines) {</div><div class='del'>-	free(tb-&gt;lines);</div><div class='del'>-	tb-&gt;linesAlloced = tb-&gt;numLines = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    expanded = expandTabs(text);</div><div class='del'>-</div><div class='del'>-    if (tb-&gt;doWrap) {</div><div class='del'>-	doReflow(expanded, &amp;reflowed, tb-&gt;textWidth, &amp;badness, &amp;height);</div><div class='del'>-	free(expanded);</div><div class='del'>-	expanded = reflowed;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    for (start = expanded; *start; start++)</div><div class='del'>-	if (*start == '\n') tb-&gt;linesAlloced++;</div><div class='del'>-</div><div class='del'>-    /* This ++ leaves room for an ending line w/o a \n */</div><div class='del'>-    tb-&gt;linesAlloced++;</div><div class='del'>-    tb-&gt;lines = malloc(sizeof(char *) * tb-&gt;linesAlloced);</div><div class='del'>-</div><div class='del'>-    start = expanded;</div><div class='del'>-    while ((end = strchr(start, '\n'))) {</div><div class='del'>-	addLine(co, start, end - start);</div><div class='del'>-	start = end + 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (*start)</div><div class='del'>-	addLine(co, start, strlen(start));</div><div class='del'>-</div><div class='del'>-    free(expanded);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* This assumes the buffer is allocated properly! */</div><div class='del'>-static void addLine(newtComponent co, const char * s, int len) {</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    if (len &gt; tb-&gt;textWidth) len = tb-&gt;textWidth;</div><div class='del'>-</div><div class='del'>-    tb-&gt;lines[tb-&gt;numLines] = malloc(tb-&gt;textWidth + 1);</div><div class='del'>-    memset(tb-&gt;lines[tb-&gt;numLines], ' ', tb-&gt;textWidth); </div><div class='del'>-    memcpy(tb-&gt;lines[tb-&gt;numLines], s, len);</div><div class='del'>-    tb-&gt;lines[tb-&gt;numLines++][tb-&gt;textWidth] = '\0';</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void textboxDraw(newtComponent c) {</div><div class='del'>-    int i;</div><div class='del'>-    struct textbox * tb = c-&gt;data;</div><div class='del'>-    int size;</div><div class='del'>-</div><div class='del'>-    if (tb-&gt;sb) {</div><div class='del'>-	size = tb-&gt;numLines - c-&gt;height;</div><div class='del'>-	newtScrollbarSet(tb-&gt;sb, tb-&gt;topLine, size ? size : 0);</div><div class='del'>-	tb-&gt;sb-&gt;ops-&gt;draw(tb-&gt;sb);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SLsmg_set_color(NEWT_COLORSET_TEXTBOX);</div><div class='del'>-   </div><div class='del'>-    for (i = 0; (i + tb-&gt;topLine) &lt; tb-&gt;numLines &amp;&amp; i &lt; c-&gt;height; i++) {</div><div class='del'>-	newtGotorc(c-&gt;top + i, c-&gt;left);</div><div class='del'>-	SLsmg_write_string(tb-&gt;lines[i + tb-&gt;topLine]);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct eventResult textboxEvent(newtComponent co, </div><div class='del'>-				      struct event ev) {</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-    struct eventResult er;</div><div class='del'>-</div><div class='del'>-    er.result = ER_IGNORED;</div><div class='del'>-</div><div class='del'>-    if (ev.when == EV_EARLY &amp;&amp; ev.event == EV_KEYPRESS &amp;&amp; tb-&gt;sb) {</div><div class='del'>-	switch (ev.u.key) {</div><div class='del'>-	  case NEWT_KEY_UP:</div><div class='del'>-	    if (tb-&gt;topLine) tb-&gt;topLine--;</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_DOWN:</div><div class='del'>-	    if (tb-&gt;topLine &lt; (tb-&gt;numLines - co-&gt;height)) tb-&gt;topLine++;</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_PGDN:</div><div class='del'>-	    tb-&gt;topLine += co-&gt;height;</div><div class='del'>-	    if (tb-&gt;topLine &gt; (tb-&gt;numLines - co-&gt;height)) {</div><div class='del'>-		tb-&gt;topLine = tb-&gt;numLines - co-&gt;height;</div><div class='del'>-		if (tb-&gt;topLine &lt; 0) tb-&gt;topLine = 0;</div><div class='del'>-	    }</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	  case NEWT_KEY_PGUP:</div><div class='del'>-	    tb-&gt;topLine -= co-&gt;height;</div><div class='del'>-	    if (tb-&gt;topLine &lt; 0) tb-&gt;topLine = 0;</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (ev.when == EV_EARLY &amp;&amp; ev.event == EV_MOUSE &amp;&amp; tb-&gt;sb) {</div><div class='del'>-	/* Top scroll arrow */</div><div class='del'>-	if (ev.u.mouse.x == co-&gt;width &amp;&amp; ev.u.mouse.y == co-&gt;top) {</div><div class='del'>-	    if (tb-&gt;topLine) tb-&gt;topLine--;</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    </div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	}</div><div class='del'>-	/* Bottom scroll arrow */</div><div class='del'>-	if (ev.u.mouse.x == co-&gt;width &amp;&amp;</div><div class='del'>-	    ev.u.mouse.y == co-&gt;top + co-&gt;height - 1) {</div><div class='del'>-	    if (tb-&gt;topLine &lt; (tb-&gt;numLines - co-&gt;height)) tb-&gt;topLine++;</div><div class='del'>-	    textboxDraw(co);</div><div class='del'>-	    </div><div class='del'>-	    er.result = ER_SWALLOWED;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return er;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void textboxDestroy(newtComponent co) {</div><div class='del'>-    int i;</div><div class='del'>-    struct textbox * tb = co-&gt;data;</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; tb-&gt;numLines; i++) </div><div class='del'>-	free(tb-&gt;lines[i]);</div><div class='del'>-    free(tb-&gt;lines);</div><div class='del'>-    free(tb);</div><div class='del'>-    free(co);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/newt/windows.c b/mdk-stage1/newt/windows.c<br/>deleted file mode 100644<br/>index 30a8d526c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/newt/windows.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/newt/windows.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,275 +0,0 @@</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "errno.h"</div><div class='del'>-#include "newt.h"</div><div class='del'>-</div><div class='del'>-static void * newtvwindow(char * title, char * button1, char * button2, </div><div class='del'>-		       char * button3, char * message, va_list args) {</div><div class='del'>-    newtComponent b1, b2 = NULL, b3 = NULL, t, f, answer;</div><div class='del'>-    char * buf = NULL;</div><div class='del'>-    int size = 0;</div><div class='del'>-    int i = 0;</div><div class='del'>-    int scroll = 0;</div><div class='del'>-    int width, height;</div><div class='del'>-    char * flowedText;</div><div class='del'>-    newtGrid grid, buttonGrid;</div><div class='del'>-</div><div class='del'>-    do {</div><div class='del'>-	size += 1000;</div><div class='del'>-	if (buf) free(buf);</div><div class='del'>-	buf = malloc(size);</div><div class='del'>-	i = vsnprintf(buf, size, message, args);</div><div class='del'>-    } while (i &gt;= size || i == -1);</div><div class='del'>-</div><div class='del'>-    flowedText = newtReflowText(buf, 50, 5, 5, &amp;width, &amp;height);</div><div class='del'>-    if (height &gt; 6) {</div><div class='del'>-	free(flowedText);</div><div class='del'>-	flowedText = newtReflowText(buf, 60, 5, 5, &amp;width, &amp;height);</div><div class='del'>-    }</div><div class='del'>-    free(buf);</div><div class='del'>-</div><div class='del'>-    if (height &gt; 12) {</div><div class='del'>-	height = 12;</div><div class='del'>-	scroll = NEWT_FLAG_SCROLL;</div><div class='del'>-    }</div><div class='del'>-    t = newtTextbox(-1, -1, width, height, NEWT_TEXTBOX_WRAP | scroll);</div><div class='del'>-    newtTextboxSetText(t, flowedText);</div><div class='del'>-    free(flowedText);</div><div class='del'>-</div><div class='del'>-    if (button3) {</div><div class='del'>-	buttonGrid = newtButtonBar(button1, &amp;b1, button2, &amp;b2, </div><div class='del'>-				   button3, &amp;b3, NULL);</div><div class='del'>-    } else if (button2) {</div><div class='del'>-	buttonGrid = newtButtonBar(button1, &amp;b1, button2, &amp;b2, NULL);</div><div class='del'>-    } else {</div><div class='del'>-	buttonGrid = newtButtonBar(button1, &amp;b1, NULL);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    newtGridSetField(buttonGrid, 0, 0, NEWT_GRID_COMPONENT, b1, </div><div class='del'>-		     0, 0, button2 ? 1 : 0, 0, 0, 0);</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(1, 2);</div><div class='del'>-    newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, t, 0, 0, 0, 0, 0, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, buttonGrid, </div><div class='del'>-		     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);</div><div class='del'>-    newtGridWrappedWindow(grid, title);</div><div class='del'>-</div><div class='del'>-    f = newtForm(NULL, NULL, 0);</div><div class='del'>-    newtFormAddComponents(f, t, b1, NULL);</div><div class='del'>-</div><div class='del'>-    if (button2)</div><div class='del'>-	newtFormAddComponent(f, b2);</div><div class='del'>-    if (button3)</div><div class='del'>-	newtFormAddComponent(f, b3);</div><div class='del'>-</div><div class='del'>-    answer = newtRunForm(f);</div><div class='del'>-    newtGridFree(grid, 1);</div><div class='del'>- </div><div class='del'>-    newtFormDestroy(f);</div><div class='del'>-    newtPopWindow();</div><div class='del'>-</div><div class='del'>-    if (answer == f)</div><div class='del'>-	return NULL;</div><div class='del'>-    else if (answer == b1)</div><div class='del'>-	return button1;</div><div class='del'>-    else if (answer == b2)</div><div class='del'>-	return button2;</div><div class='del'>-</div><div class='del'>-    return button3;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtWinChoice(char * title, char * button1, char * button2, </div><div class='del'>-		   char * message, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    void * rc;</div><div class='del'>-</div><div class='del'>-    va_start(args, message);</div><div class='del'>-    rc = newtvwindow(title, button1, button2, NULL, message, args);</div><div class='del'>-    va_end(args);</div><div class='del'>-</div><div class='del'>-    if (rc == button1)</div><div class='del'>-	return 1;</div><div class='del'>-    else if (rc == button2)</div><div class='del'>-	return 2;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtWinMessage(char * title, char * buttonText, char * text, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-</div><div class='del'>-    va_start(args, text);</div><div class='del'>-    newtvwindow(title, buttonText, NULL, NULL, text, args);</div><div class='del'>-    va_end(args);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void newtWinMessagev(char * title, char * buttonText, char * text, </div><div class='del'>-		     va_list argv) {</div><div class='del'>-    newtvwindow(title, buttonText, NULL, NULL, text, argv);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int newtWinTernary(char * title, char * button1, char * button2, </div><div class='del'>-		   char * button3, char * message, ...) {</div><div class='del'>-    va_list args;</div><div class='del'>-    void * rc;</div><div class='del'>-</div><div class='del'>-    va_start(args, message);</div><div class='del'>-    rc = newtvwindow(title, button1, button2, button3, message, args);</div><div class='del'>-    va_end(args);</div><div class='del'>-</div><div class='del'>-    if (rc == button1)</div><div class='del'>-	return 1;</div><div class='del'>-    else if (rc == button2)</div><div class='del'>-	return 2;</div><div class='del'>-    else if (rc == button3)</div><div class='del'>-	return 3;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* only supports up to 50 buttons -- shucks! */</div><div class='del'>-int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, </div><div class='del'>-		int flexUp, int maxListHeight, char ** items, int * listItem,</div><div class='del'>-		char * button1, ...) {</div><div class='del'>-    newtComponent textbox, listbox, result, form;</div><div class='del'>-    va_list args;</div><div class='del'>-    newtComponent buttons[50];</div><div class='del'>-    newtGrid grid, buttonBar;</div><div class='del'>-    int numButtons;</div><div class='del'>-    int i, rc;</div><div class='del'>-    int needScroll;</div><div class='del'>-    char * buttonName;</div><div class='del'>-</div><div class='del'>-    textbox = newtTextboxReflowed(-1, -1, text, suggestedWidth, flexDown,</div><div class='del'>-			          flexUp, 0);</div><div class='del'>-</div><div class='del'>-    for (i = 0; items[i]; i++) ;</div><div class='del'>-    if (i &lt; maxListHeight) maxListHeight = i;</div><div class='del'>-    needScroll = i &gt; maxListHeight;</div><div class='del'>-</div><div class='del'>-    listbox = newtListbox(-1, -1, maxListHeight, </div><div class='del'>-		  (needScroll ? NEWT_FLAG_SCROLL : 0) | NEWT_FLAG_RETURNEXIT);</div><div class='del'>-    for (i = 0; items[i]; i++) {</div><div class='del'>-	newtListboxAddEntry(listbox, items[i], (void *) (long)i);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    newtListboxSetCurrent(listbox, *listItem);</div><div class='del'>-</div><div class='del'>-    buttonName = button1, numButtons = 0;</div><div class='del'>-    va_start(args, button1);</div><div class='del'>-    while (buttonName) {</div><div class='del'>-	buttons[numButtons] = newtButton(-1, -1, buttonName);</div><div class='del'>-	numButtons++;</div><div class='del'>-	buttonName = va_arg(args, char *);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    va_end(args);</div><div class='del'>-</div><div class='del'>-    buttonBar = newtCreateGrid(numButtons, 1);</div><div class='del'>-    for (i = 0; i &lt; numButtons; i++) {</div><div class='del'>-	newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, </div><div class='del'>-			 buttons[i],</div><div class='del'>-			 i ? 1 : 0, 0, 0, 0, 0, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    grid = newtGridSimpleWindow(textbox, listbox, buttonBar);</div><div class='del'>-    newtGridWrappedWindow(grid, title);</div><div class='del'>-</div><div class='del'>-    form = newtForm(NULL, 0, 0);</div><div class='del'>-    newtGridAddComponentsToForm(grid, form, 1);</div><div class='del'>-    newtGridFree(grid, 1);</div><div class='del'>-</div><div class='del'>-    result = newtRunForm(form);</div><div class='del'>-</div><div class='del'>-    *listItem = ((long) newtListboxGetCurrent(listbox));</div><div class='del'>-</div><div class='del'>-    for (rc = 0; result != buttons[rc] &amp;&amp; rc &lt; numButtons; rc++);</div><div class='del'>-    if (rc == numButtons) </div><div class='del'>-	rc = 0; /* F12 or return-on-exit (which are the same for us) */</div><div class='del'>-    else </div><div class='del'>-	rc++;</div><div class='del'>-</div><div class='del'>-    newtFormDestroy(form);</div><div class='del'>-    newtPopWindow();</div><div class='del'>-</div><div class='del'>-    return rc;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* only supports up to 50 buttons and entries -- shucks! */</div><div class='del'>-int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown, </div><div class='del'>-		   int flexUp, int dataWidth, </div><div class='del'>-		   struct newtWinEntry * items, char * button1, ...) {</div><div class='del'>-    newtComponent buttons[50], result, form, textw;</div><div class='del'>-    newtGrid grid, buttonBar, subgrid;</div><div class='del'>-    int numItems;</div><div class='del'>-    int rc, i;</div><div class='del'>-    int numButtons;</div><div class='del'>-    char * buttonName;</div><div class='del'>-    va_list args;</div><div class='del'>-</div><div class='del'>-    textw = newtTextboxReflowed(-1, -1, text, suggestedWidth, flexDown,</div><div class='del'>-			        flexUp, 0);</div><div class='del'>-</div><div class='del'>-    for (numItems = 0; items[numItems].text; numItems++); </div><div class='del'>-</div><div class='del'>-    buttonName = button1, numButtons = 0;</div><div class='del'>-    va_start(args, button1);</div><div class='del'>-    while (buttonName) {</div><div class='del'>-	buttons[numButtons] = newtButton(-1, -1, buttonName);</div><div class='del'>-	numButtons++;</div><div class='del'>-	buttonName = va_arg(args, char *);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    va_end(args);</div><div class='del'>-</div><div class='del'>-    buttonBar = newtCreateGrid(numButtons, 1);</div><div class='del'>-    for (i = 0; i &lt; numButtons; i++) {</div><div class='del'>-	newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT, </div><div class='del'>-			 buttons[i],</div><div class='del'>-			 i ? 1 : 0, 0, 0, 0, 0, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    subgrid = newtCreateGrid(2, numItems);</div><div class='del'>-    for (i = 0; i &lt; numItems; i++) {</div><div class='del'>-	newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,</div><div class='del'>-		         newtLabel(-1, -1, items[i].text),</div><div class='del'>-		         0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-	newtGridSetField(subgrid, 1, i, NEWT_GRID_COMPONENT,</div><div class='del'>-		         newtEntry(-1, -1, items[i].value ? </div><div class='del'>-				    *items[i].value : NULL, dataWidth,</div><div class='del'>-				    items[i].value, items[i].flags),</div><div class='del'>-		         1, 0, 0, 0, 0, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    grid = newtCreateGrid(1, 3);</div><div class='del'>-    form = newtForm(NULL, 0, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, textw, </div><div class='del'>-		     0, 0, 0, 0, NEWT_ANCHOR_LEFT, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 1, NEWT_GRID_SUBGRID, subgrid, </div><div class='del'>-		     0, 1, 0, 0, 0, 0);</div><div class='del'>-    newtGridSetField(grid, 0, 2, NEWT_GRID_SUBGRID, buttonBar, </div><div class='del'>-		     0, 1, 0, 0, 0, NEWT_GRID_FLAG_GROWX);</div><div class='del'>-    newtGridAddComponentsToForm(grid, form, 1);</div><div class='del'>-    newtGridWrappedWindow(grid, title);</div><div class='del'>-    newtGridFree(grid, 1);</div><div class='del'>-</div><div class='del'>-    result = newtRunForm(form);</div><div class='del'>-</div><div class='del'>-    for (rc = 0; rc &lt; numItems; rc++)</div><div class='del'>-	*items[rc].value = strdup(*items[rc].value);</div><div class='del'>-</div><div class='del'>-    for (rc = 0; result != buttons[rc] &amp;&amp; rc &lt; numButtons; rc++);</div><div class='del'>-    if (rc == numButtons) </div><div class='del'>-	rc = 0; /* F12 */</div><div class='del'>-    else </div><div class='del'>-	rc++;</div><div class='del'>-</div><div class='del'>-    newtFormDestroy(form);</div><div class='del'>-    newtPopWindow();</div><div class='del'>-</div><div class='del'>-    return rc;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/nfsmount.c b/mdk-stage1/nfsmount.c<br/>deleted file mode 100644<br/>index 032fde60c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/nfsmount.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/nfsmount.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,294 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* this is based on work from redhat, made it lighter (gc)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* MODIFIED for Red Hat Linux installer</div><div class='del'>- * msw@redhat.com</div><div class='del'>- * o always mounts without lockd</div><div class='del'>- * o uses our own host resolution</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * nfsmount.c -- Linux NFS mount</div><div class='del'>- * Copyright (C) 1993 Rick Sladkey &lt;jrs@world.std.com&gt;</div><div class='del'>- *</div><div class='del'>- * This program is free software; you can redistribute it and/or modify</div><div class='del'>- * it under the terms of the GNU General Public License as published by</div><div class='del'>- * the Free Software Foundation; either version 2, or (at your option)</div><div class='del'>- * any later version.</div><div class='del'>- *</div><div class='del'>- * This program is distributed in the hope that it will be useful,</div><div class='del'>- * but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div class='del'>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</div><div class='del'>- * GNU General Public License for more details.</div><div class='del'>- *</div><div class='del'>- * Wed Feb  8 12:51:48 1995, biro@yggdrasil.com (Ross Biro): allow all port</div><div class='del'>- * numbers to be specified on the command line.</div><div class='del'>- *</div><div class='del'>- * Fri, 8 Mar 1996 18:01:39, Swen Thuemmler &lt;swen@uni-paderborn.de&gt;:</div><div class='del'>- * Omit the call to connect() for Linux version 1.3.11 or later.</div><div class='del'>- *</div><div class='del'>- * Wed Oct  1 23:55:28 1997: Dick Streefland &lt;dick_streefland@tasking.com&gt;</div><div class='del'>- * Implemented the "bg", "fg" and "retry" mount options for NFS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/mount.h&gt;</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_prot.h&gt;</div><div class='del'>-#include &lt;rpc/pmap_clnt.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-#include "linux-2.2/nfs.h"</div><div class='del'>-#include "linux-2.2/nfs_mount.h" //#include "mount_constants.h"</div><div class='del'>-</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "dns.h"</div><div class='del'>-</div><div class='del'>-#include "nfsmount.h"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-bool_t</div><div class='del'>-xdr_fhandle(XDR *xdrs, fhandle objp)</div><div class='del'>-{</div><div class='del'>-	 if (!xdr_opaque(xdrs, objp, FHSIZE)) {</div><div class='del'>-		 return (FALSE);</div><div class='del'>-	 }</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-bool_t</div><div class='del'>-xdr_fhstatus(XDR *xdrs, fhstatus *objp)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	 if (!xdr_u_int(xdrs, &amp;objp-&gt;fhs_status)) {</div><div class='del'>-		 return (FALSE);</div><div class='del'>-	 }</div><div class='del'>-	switch (objp-&gt;fhs_status) {</div><div class='del'>-	case 0:</div><div class='del'>-		 if (!xdr_fhandle(xdrs, objp-&gt;fhstatus_u.fhs_fhandle)) {</div><div class='del'>-			 return (FALSE);</div><div class='del'>-		 }</div><div class='del'>-		break;</div><div class='del'>-	default:</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-bool_t</div><div class='del'>-xdr_dirpath(XDR *xdrs, dirpath *objp)</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-	 if (!xdr_string(xdrs, objp, MNTPATHLEN)) {</div><div class='del'>-		 return (FALSE);</div><div class='del'>-	 }</div><div class='del'>-	return (TRUE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int nfs_mount_version = 3; /* kernel &gt;= 2.1.32 */   /* *********** TODO for kernel 2.4, nfs-mount version 4 */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int nfsmount_prepare(const char *spec, int *flags, char **mount_opts)</div><div class='del'>-{</div><div class='del'>-	char hostdir[1024];</div><div class='del'>-	CLIENT *mclient;</div><div class='del'>-	char *hostname, *dirname;</div><div class='del'>-	fhandle root_fhandle;</div><div class='del'>-	struct timeval total_timeout;</div><div class='del'>-	enum clnt_stat clnt_stat;</div><div class='del'>-	static struct nfs_mount_data data;</div><div class='del'>-	struct sockaddr_in server_addr;</div><div class='del'>-	struct sockaddr_in mount_server_addr;</div><div class='del'>-	int msock, fsock;</div><div class='del'>-	struct timeval retry_timeout;</div><div class='del'>-	struct fhstatus status;</div><div class='del'>-	char *s;</div><div class='del'>-	int port;</div><div class='del'>-</div><div class='del'>-	msock = fsock = -1;</div><div class='del'>-	mclient = NULL;</div><div class='del'>-</div><div class='del'>-	strncpy(hostdir, spec, sizeof(hostdir));</div><div class='del'>-	if ((s = (strchr(hostdir, ':')))) {</div><div class='del'>-		hostname = hostdir;</div><div class='del'>-		dirname = s + 1;</div><div class='del'>-		*s = '\0';</div><div class='del'>-	} else {</div><div class='del'>-		log_message("nfsmount: format not host:dir");</div><div class='del'>-		goto fail;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	server_addr.sin_family = AF_INET;</div><div class='del'>-</div><div class='del'>-	/* first, try as IP address */</div><div class='del'>-	if (!inet_aton(hostname, &amp;server_addr.sin_addr)) {</div><div class='del'>-		/* failure, try as machine name */</div><div class='del'>-		if (mygethostbyname(hostname, &amp;server_addr.sin_addr))</div><div class='del'>-			goto fail;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memcpy (&amp;mount_server_addr, &amp;server_addr, sizeof (mount_server_addr));</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	/* Set default options.</div><div class='del'>-	 * timeo is filled in after we know whether it'll be TCP or UDP. */</div><div class='del'>-	memset(&amp;data, 0, sizeof(data));</div><div class='del'>-	data.retrans	= 3;</div><div class='del'>-	data.acregmin	= 3;</div><div class='del'>-	data.acregmax	= 60;</div><div class='del'>-	data.acdirmin	= 30;</div><div class='del'>-	data.acdirmax	= 60;</div><div class='del'>-	data.rsize = 8192;</div><div class='del'>-	data.wsize = 8192;</div><div class='del'>-	data.bsize = 8192;</div><div class='del'>-#if NFS_MOUNT_VERSION &gt;= 2</div><div class='del'>-	data.namlen	= NAME_MAX;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if NFS_MOUNT_VERSION &gt;= 3</div><div class='del'>-	if (nfs_mount_version &gt;= 3)</div><div class='del'>-	        data.flags |= NFS_MOUNT_NONLM; /* HACK HACK msw */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	/* Adjust options if none specified */</div><div class='del'>-	if (!data.timeo)</div><div class='del'>-		data.timeo = 7;  /* udp */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	data.version = nfs_mount_version;</div><div class='del'>-	*mount_opts = (char *) &amp;data;</div><div class='del'>-</div><div class='del'>-	if (*flags &amp; MS_REMOUNT)</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	retry_timeout.tv_sec = 3;</div><div class='del'>-	retry_timeout.tv_usec = 0;</div><div class='del'>-	total_timeout.tv_sec = 20;</div><div class='del'>-	total_timeout.tv_usec = 0;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	/* contact the mount daemon via TCP */</div><div class='del'>-	mount_server_addr.sin_port = htons(0);</div><div class='del'>-	msock = RPC_ANYSOCK;</div><div class='del'>-	mclient = clnttcp_create(&amp;mount_server_addr, MOUNTPROG, MOUNTVERS, &amp;msock, 0, 0);</div><div class='del'>-	</div><div class='del'>-	/* if this fails, contact the mount daemon via UDP */</div><div class='del'>-	if (!mclient) {</div><div class='del'>-		mount_server_addr.sin_port = htons(0);</div><div class='del'>-		msock = RPC_ANYSOCK;</div><div class='del'>-		mclient = clntudp_create(&amp;mount_server_addr, MOUNTPROG, MOUNTVERS, retry_timeout, &amp;msock);</div><div class='del'>-	}</div><div class='del'>-	if (mclient) {</div><div class='del'>-				/* try to mount hostname:dirname */</div><div class='del'>-		mclient-&gt;cl_auth = authunix_create_default();</div><div class='del'>-		clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,</div><div class='del'>-				      (xdrproc_t) xdr_dirpath, (caddr_t) &amp;dirname,</div><div class='del'>-				      (xdrproc_t) xdr_fhstatus, (caddr_t) &amp;status,</div><div class='del'>-				      total_timeout);</div><div class='del'>-		if (clnt_stat != RPC_SUCCESS) {</div><div class='del'>-			if (errno != ECONNREFUSED) {</div><div class='del'>-				log_message(clnt_sperror(mclient, "mount"));</div><div class='del'>-				goto fail;	/* don't retry */</div><div class='del'>-			}</div><div class='del'>-			log_message(clnt_sperror(mclient, "mount"));</div><div class='del'>-			auth_destroy(mclient-&gt;cl_auth);</div><div class='del'>-			clnt_destroy(mclient);</div><div class='del'>-			mclient = 0;</div><div class='del'>-			close(msock);</div><div class='del'>-		}</div><div class='del'>-	} else</div><div class='del'>-		goto fail;</div><div class='del'>-</div><div class='del'>-	if (status.fhs_status != 0) {</div><div class='del'>-		if (status.fhs_status == 2)</div><div class='del'>-			log_message("NFS server says: No such file or directory");</div><div class='del'>-		else if (status.fhs_status == 13)</div><div class='del'>-			log_message("NFS server says: Permission denied");</div><div class='del'>-		else </div><div class='del'>-			log_message("nfsmount prepare failed, reason given by server: %d", status.fhs_status);</div><div class='del'>-		goto fail;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	memcpy((char *) &amp;root_fhandle, (char *) status.fhstatus_u.fhs_fhandle, sizeof (root_fhandle));</div><div class='del'>-</div><div class='del'>-	/* create nfs socket for kernel */</div><div class='del'>-</div><div class='del'>-	fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);</div><div class='del'>-	if (fsock &lt; 0) {</div><div class='del'>-		log_perror("nfs socket");</div><div class='del'>-		goto fail;</div><div class='del'>-	}</div><div class='del'>-	if (bindresvport(fsock, 0) &lt; 0) {</div><div class='del'>-		log_perror("nfs bindresvport");</div><div class='del'>-		goto fail;</div><div class='del'>-	}</div><div class='del'>-	server_addr.sin_port = PMAPPORT;</div><div class='del'>-	port = pmap_getport(&amp;server_addr, NFS_PROGRAM, NFS_VERSION, IPPROTO_UDP);</div><div class='del'>-	if (port == 0)</div><div class='del'>-		port = NFS_PORT;</div><div class='del'>-#ifdef NFS_MOUNT_DEBUG</div><div class='del'>-	else</div><div class='del'>-		log_message("used portmapper to find NFS port\n");</div><div class='del'>-	log_message("using port %d for nfs deamon\n", port);</div><div class='del'>-#endif</div><div class='del'>-	server_addr.sin_port = htons(port);</div><div class='del'>-</div><div class='del'>-	/* prepare data structure for kernel */</div><div class='del'>-</div><div class='del'>-	data.fd = fsock;</div><div class='del'>-	memcpy((char *) &amp;data.root, (char *) &amp;root_fhandle, sizeof (root_fhandle));</div><div class='del'>-	memcpy((char *) &amp;data.addr, (char *) &amp;server_addr, sizeof(data.addr));</div><div class='del'>-	strncpy(data.hostname, hostname, sizeof(data.hostname));</div><div class='del'>-</div><div class='del'>-	/* clean up */</div><div class='del'>-</div><div class='del'>-	auth_destroy(mclient-&gt;cl_auth);</div><div class='del'>-	clnt_destroy(mclient);</div><div class='del'>-	close(msock);</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-	/* abort */</div><div class='del'>-</div><div class='del'>- fail:</div><div class='del'>-	if (msock != -1) {</div><div class='del'>-		if (mclient) {</div><div class='del'>-			auth_destroy(mclient-&gt;cl_auth);</div><div class='del'>-			clnt_destroy(mclient);</div><div class='del'>-		}</div><div class='del'>-		close(msock);</div><div class='del'>-	}</div><div class='del'>-	if (fsock != -1)</div><div class='del'>-		close(fsock);</div><div class='del'>-</div><div class='del'>-	return -1;</div><div class='del'>-}	</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/nfsmount.h b/mdk-stage1/nfsmount.h<br/>deleted file mode 100644<br/>index 12ffa69a6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/nfsmount.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/nfsmount.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,328 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Please do not edit this file.</div><div class='del'>- * It was generated using rpcgen.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _NFSMOUNT_H_RPCGEN</div><div class='del'>-#define _NFSMOUNT_H_RPCGEN</div><div class='del'>-</div><div class='del'>-#include &lt;rpc/rpc.h&gt;</div><div class='del'>-</div><div class='del'>-int nfsmount_prepare(const char *spec, int *flags, char **mount_opts);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for</div><div class='del'>- * unrestricted use provided that this legend is included on all tape</div><div class='del'>- * media and as a part of the software program in whole or part.  Users</div><div class='del'>- * may copy or modify Sun RPC without charge, but are not authorized</div><div class='del'>- * to license or distribute it to anyone else except as part of a product or</div><div class='del'>- * program developed by the user or with the express written consent of</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- *</div><div class='del'>- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE</div><div class='del'>- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR</div><div class='del'>- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.</div><div class='del'>- *</div><div class='del'>- * Sun RPC is provided with no support and without any obligation on the</div><div class='del'>- * part of Sun Microsystems, Inc. to assist in its use, correction,</div><div class='del'>- * modification or enhancement.</div><div class='del'>- *</div><div class='del'>- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE</div><div class='del'>- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC</div><div class='del'>- * OR ANY PART THEREOF.</div><div class='del'>- *</div><div class='del'>- * In no event will Sun Microsystems, Inc. be liable for any lost revenue</div><div class='del'>- * or profits or other special, indirect and consequential damages, even if</div><div class='del'>- * Sun has been advised of the possibility of such damages.</div><div class='del'>- *</div><div class='del'>- * Sun Microsystems, Inc.</div><div class='del'>- * 2550 Garcia Avenue</div><div class='del'>- * Mountain View, California  94043</div><div class='del'>- */</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* from @(#)mount.x	1.3 91/03/11 TIRPC 1.0 */</div><div class='del'>-#ifndef _rpcsvc_mount_h</div><div class='del'>-#define _rpcsvc_mount_h</div><div class='del'>-#define MNTPATHLEN 1024</div><div class='del'>-#define MNTNAMLEN 255</div><div class='del'>-#define FHSIZE 32</div><div class='del'>-</div><div class='del'>-typedef char fhandle[FHSIZE];</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_fhandle(XDR *, fhandle);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_fhandle(XDR *, fhandle);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_fhandle();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct fhstatus {</div><div class='del'>-	u_int fhs_status;</div><div class='del'>-	union {</div><div class='del'>-		fhandle fhs_fhandle;</div><div class='del'>-	} fhstatus_u;</div><div class='del'>-};</div><div class='del'>-typedef struct fhstatus fhstatus;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_fhstatus(XDR *, fhstatus*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_fhstatus(XDR *, fhstatus*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_fhstatus();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char *dirpath;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_dirpath(XDR *, dirpath*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_dirpath(XDR *, dirpath*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_dirpath();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef char *name;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_name(XDR *, name*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_name(XDR *, name*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_name();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct mountbody *mountlist;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_mountlist(XDR *, mountlist*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_mountlist(XDR *, mountlist*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_mountlist();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct mountbody {</div><div class='del'>-	name ml_hostname;</div><div class='del'>-	dirpath ml_directory;</div><div class='del'>-	mountlist ml_next;</div><div class='del'>-};</div><div class='del'>-typedef struct mountbody mountbody;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_mountbody(XDR *, mountbody*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_mountbody(XDR *, mountbody*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_mountbody();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct groupnode *groups;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_groups(XDR *, groups*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_groups(XDR *, groups*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_groups();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct groupnode {</div><div class='del'>-	name gr_name;</div><div class='del'>-	groups gr_next;</div><div class='del'>-};</div><div class='del'>-typedef struct groupnode groupnode;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_groupnode(XDR *, groupnode*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_groupnode(XDR *, groupnode*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_groupnode();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct exportnode *exports;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_exports(XDR *, exports*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_exports(XDR *, exports*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_exports();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct exportnode {</div><div class='del'>-	dirpath ex_dir;</div><div class='del'>-	groups ex_groups;</div><div class='del'>-	exports ex_next;</div><div class='del'>-};</div><div class='del'>-typedef struct exportnode exportnode;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_exportnode(XDR *, exportnode*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_exportnode(XDR *, exportnode*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_exportnode();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct ppathcnf {</div><div class='del'>-	int pc_link_max;</div><div class='del'>-	short pc_max_canon;</div><div class='del'>-	short pc_max_input;</div><div class='del'>-	short pc_name_max;</div><div class='del'>-	short pc_path_max;</div><div class='del'>-	short pc_pipe_buf;</div><div class='del'>-	u_char pc_vdisable;</div><div class='del'>-	char pc_xxx;</div><div class='del'>-	short pc_mask[2];</div><div class='del'>-};</div><div class='del'>-typedef struct ppathcnf ppathcnf;</div><div class='del'>-#ifdef __cplusplus </div><div class='del'>-extern "C" bool_t xdr_ppathcnf(XDR *, ppathcnf*);</div><div class='del'>-#elif __STDC__ </div><div class='del'>-extern  bool_t xdr_ppathcnf(XDR *, ppathcnf*);</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-bool_t xdr_ppathcnf();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-#endif /*!_rpcsvc_mount_h*/</div><div class='del'>-</div><div class='del'>-#define MOUNTPROG ((u_long)100005)</div><div class='del'>-#define MOUNTVERS ((u_long)1)</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern "C" void * mountproc_null_1(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_null_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern "C" mountlist * mountproc_dump_1(void *, CLIENT *);</div><div class='del'>-extern "C" mountlist * mountproc_dump_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern "C" void * mountproc_umnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern "C" void * mountproc_umntall_1(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umntall_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern "C" exports * mountproc_export_1(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_export_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern "C" exports * mountproc_exportall_1(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_exportall_1_svc(void *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#elif __STDC__</div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern  void * mountproc_null_1(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_null_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern  fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern  fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern  mountlist * mountproc_dump_1(void *, CLIENT *);</div><div class='del'>-extern  mountlist * mountproc_dump_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern  void * mountproc_umnt_1(dirpath *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern  void * mountproc_umntall_1(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umntall_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern  exports * mountproc_export_1(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_export_1_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern  exports * mountproc_exportall_1(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_exportall_1_svc(void *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-#define MOUNTPROC_NULL ((u_long)0)</div><div class='del'>-extern  void * mountproc_null_1();</div><div class='del'>-extern  void * mountproc_null_1_svc();</div><div class='del'>-#define MOUNTPROC_MNT ((u_long)1)</div><div class='del'>-extern  fhstatus * mountproc_mnt_1();</div><div class='del'>-extern  fhstatus * mountproc_mnt_1_svc();</div><div class='del'>-#define MOUNTPROC_DUMP ((u_long)2)</div><div class='del'>-extern  mountlist * mountproc_dump_1();</div><div class='del'>-extern  mountlist * mountproc_dump_1_svc();</div><div class='del'>-#define MOUNTPROC_UMNT ((u_long)3)</div><div class='del'>-extern  void * mountproc_umnt_1();</div><div class='del'>-extern  void * mountproc_umnt_1_svc();</div><div class='del'>-#define MOUNTPROC_UMNTALL ((u_long)4)</div><div class='del'>-extern  void * mountproc_umntall_1();</div><div class='del'>-extern  void * mountproc_umntall_1_svc();</div><div class='del'>-#define MOUNTPROC_EXPORT ((u_long)5)</div><div class='del'>-extern  exports * mountproc_export_1();</div><div class='del'>-extern  exports * mountproc_export_1_svc();</div><div class='del'>-#define MOUNTPROC_EXPORTALL ((u_long)6)</div><div class='del'>-extern  exports * mountproc_exportall_1();</div><div class='del'>-extern  exports * mountproc_exportall_1_svc();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-#define MOUNTVERS_POSIX ((u_long)2)</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" void * mountproc_null_2(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_null_2_svc(void *, struct svc_req *);</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);</div><div class='del'>-extern "C" fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-extern "C" mountlist * mountproc_dump_2(void *, CLIENT *);</div><div class='del'>-extern "C" mountlist * mountproc_dump_2_svc(void *, struct svc_req *);</div><div class='del'>-extern "C" void * mountproc_umnt_2(dirpath *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-extern "C" void * mountproc_umntall_2(void *, CLIENT *);</div><div class='del'>-extern "C" void * mountproc_umntall_2_svc(void *, struct svc_req *);</div><div class='del'>-extern "C" exports * mountproc_export_2(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_export_2_svc(void *, struct svc_req *);</div><div class='del'>-extern "C" exports * mountproc_exportall_2(void *, CLIENT *);</div><div class='del'>-extern "C" exports * mountproc_exportall_2_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_PATHCONF ((u_long)7)</div><div class='del'>-extern "C" ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);</div><div class='del'>-extern "C" ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#elif __STDC__</div><div class='del'>-extern  void * mountproc_null_2(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_null_2_svc(void *, struct svc_req *);</div><div class='del'>-extern  fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);</div><div class='del'>-extern  fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-extern  mountlist * mountproc_dump_2(void *, CLIENT *);</div><div class='del'>-extern  mountlist * mountproc_dump_2_svc(void *, struct svc_req *);</div><div class='del'>-extern  void * mountproc_umnt_2(dirpath *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umnt_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-extern  void * mountproc_umntall_2(void *, CLIENT *);</div><div class='del'>-extern  void * mountproc_umntall_2_svc(void *, struct svc_req *);</div><div class='del'>-extern  exports * mountproc_export_2(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_export_2_svc(void *, struct svc_req *);</div><div class='del'>-extern  exports * mountproc_exportall_2(void *, CLIENT *);</div><div class='del'>-extern  exports * mountproc_exportall_2_svc(void *, struct svc_req *);</div><div class='del'>-#define MOUNTPROC_PATHCONF ((u_long)7)</div><div class='del'>-extern  ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *);</div><div class='del'>-extern  ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *);</div><div class='del'>-</div><div class='del'>-#else /* Old Style C */ </div><div class='del'>-extern  void * mountproc_null_2();</div><div class='del'>-extern  void * mountproc_null_2_svc();</div><div class='del'>-extern  fhstatus * mountproc_mnt_2();</div><div class='del'>-extern  fhstatus * mountproc_mnt_2_svc();</div><div class='del'>-extern  mountlist * mountproc_dump_2();</div><div class='del'>-extern  mountlist * mountproc_dump_2_svc();</div><div class='del'>-extern  void * mountproc_umnt_2();</div><div class='del'>-extern  void * mountproc_umnt_2_svc();</div><div class='del'>-extern  void * mountproc_umntall_2();</div><div class='del'>-extern  void * mountproc_umntall_2_svc();</div><div class='del'>-extern  exports * mountproc_export_2();</div><div class='del'>-extern  exports * mountproc_export_2_svc();</div><div class='del'>-extern  exports * mountproc_exportall_2();</div><div class='del'>-extern  exports * mountproc_exportall_2_svc();</div><div class='del'>-#define MOUNTPROC_PATHCONF ((u_long)7)</div><div class='del'>-extern  ppathcnf * mountproc_pathconf_2();</div><div class='del'>-extern  ppathcnf * mountproc_pathconf_2_svc();</div><div class='del'>-#endif /* Old Style C */ </div><div class='del'>-</div><div class='del'>-#endif /* !_NFSMOUNT_H_RPCGEN */</div><div class='head'>diff --git a/mdk-stage1/pci-resource/.cvsignore b/mdk-stage1/pci-resource/.cvsignore<br/>deleted file mode 100644<br/>index 4c7b0844b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pci-resource/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pci-resource/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-pci-ids.h</div><div class='head'>diff --git a/mdk-stage1/pci-resource/Makefile b/mdk-stage1/pci-resource/Makefile<br/>deleted file mode 100644<br/>index 046ab29dd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pci-resource/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pci-resource/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # $Id$</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: pci-ids.h</div><div class='del'>-</div><div class='del'>-pci-ids.h: /usr/share/ldetect-lst/pcitable update-pci-ids.pl</div><div class='del'>-	perl update-pci-ids.pl &gt; $@ || { rm -f $@; exit 1; }</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f pci-ids.h</div><div class='head'>diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl<br/>deleted file mode 100755<br/>index 73f1d151b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pci-resource/update-pci-ids.pl?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pci-resource/update-pci-ids.pl</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-</div><div class='del'>-use strict;</div><div class='del'>-use MDK::Common;</div><div class='del'>-</div><div class='del'>-require '/usr/bin/merge2pcitable.pl';</div><div class='del'>-my $pci = read_pcitable("/usr/share/ldetect-lst/pcitable");</div><div class='del'>-</div><div class='del'>-print '</div><div class='del'>-#define PCI_REVISION_ID         0x08    /* Revision ID */</div><div class='del'>-</div><div class='del'>-struct pci_module_map {</div><div class='del'>-	unsigned short	vendor;     /* PCI vendor id */</div><div class='del'>-	unsigned short	device;     /* PCI device id */</div><div class='del'>-	const char      *name;      /* PCI human readable name */</div><div class='del'>-	const char      *module;    /* module to load */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-';</div><div class='del'>-</div><div class='del'>-my %t = ( </div><div class='del'>-    network =&gt; 'network/main',</div><div class='del'>-    medias  =&gt; 'disk/scsi|hardware_raid',</div><div class='del'>-);</div><div class='del'>-</div><div class='del'>-foreach my $type (keys %t) {</div><div class='del'>-    my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1:"$t{$type}"`);</div><div class='del'>-</div><div class='del'>-    print "#ifndef DISABLE_".uc($type)."</div><div class='del'>-struct pci_module_map ${type}_pci_ids[] = {</div><div class='del'>-";</div><div class='del'>-</div><div class='del'>-    foreach my $k (sort keys %$pci) {</div><div class='del'>-	my $v = $pci-&gt;{$k};</div><div class='del'>-	member($v-&gt;[0], @modules) or next;</div><div class='del'>-	$k =~ /^(....)(....)/;</div><div class='del'>-	printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|,</div><div class='del'>-	  $1, $2, $v-&gt;[1], $v-&gt;[0];</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    print "};</div><div class='del'>-int ${type}_num_ids = sizeof(${type}_pci_ids) / sizeof(struct pci_module_map);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-";</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/Makefile b/mdk-stage1/pcmcia_/Makefile<br/>deleted file mode 100644<br/>index bb3b0257e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,48 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2001 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: libpcmcia.a libpcmcia-DIET.a</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o libpcmcia.a</div><div class='del'>-</div><div class='del'>-FLAGS = -D__linux__ -Wall -Werror -Os -fomit-frame-pointer -pipe -c -I..</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-OBJS = probe.o cardmgr.o lex_config.o yacc_config.o</div><div class='del'>-</div><div class='del'>-OBJS-DIET = $(subst .o,-DIET.o,$(OBJS))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-libpcmcia.a: $(OBJS)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-libpcmcia-DIET.a: $(OBJS-DIET)</div><div class='del'>-	ar -cru $@ $^</div><div class='del'>-	ranlib $@</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-$(OBJS): %.o: %.c</div><div class='del'>-	gcc $(FLAGS) $(GLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(OBJS-DIET): %-DIET.o: %.c</div><div class='del'>-	gcc $(FLAGS)  $(DIETLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/bulkmem.h b/mdk-stage1/pcmcia_/bulkmem.h<br/>deleted file mode 100644<br/>index 7748d4432..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/bulkmem.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/bulkmem.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,195 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Definitions for bulk memory services</div><div class='del'>- *</div><div class='del'>- * bulkmem.h 1.13 2001/08/24 12:16:12</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- * bulkmem.h 1.3 1995/05/27 04:49:49</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_BULKMEM_H</div><div class='del'>-#define _LINUX_BULKMEM_H</div><div class='del'>-</div><div class='del'>-/* For GetFirstRegion and GetNextRegion */</div><div class='del'>-typedef struct region_info_t {</div><div class='del'>-    u_int		Attributes;</div><div class='del'>-    u_int		CardOffset;</div><div class='del'>-    u_int		RegionSize;</div><div class='del'>-    u_int		AccessSpeed;</div><div class='del'>-    u_int		BlockSize;</div><div class='del'>-    u_int		PartMultiple;</div><div class='del'>-    u_char		JedecMfr, JedecInfo;</div><div class='del'>-    memory_handle_t	next;</div><div class='del'>-} region_info_t;</div><div class='del'>-</div><div class='del'>-#define REGION_TYPE		0x0001</div><div class='del'>-#define REGION_TYPE_CM		0x0000</div><div class='del'>-#define REGION_TYPE_AM		0x0001</div><div class='del'>-#define REGION_PREFETCH		0x0008</div><div class='del'>-#define REGION_CACHEABLE	0x0010</div><div class='del'>-#define REGION_BAR_MASK		0xe000</div><div class='del'>-#define REGION_BAR_SHIFT	13</div><div class='del'>-</div><div class='del'>-/* For OpenMemory */</div><div class='del'>-typedef struct open_mem_t {</div><div class='del'>-    u_int		Attributes;</div><div class='del'>-    u_int		Offset;</div><div class='del'>-} open_mem_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for OpenMemory */</div><div class='del'>-#define MEMORY_TYPE		0x0001</div><div class='del'>-#define MEMORY_TYPE_CM		0x0000</div><div class='del'>-#define MEMORY_TYPE_AM		0x0001</div><div class='del'>-#define MEMORY_EXCLUSIVE	0x0002</div><div class='del'>-#define MEMORY_PREFETCH		0x0008</div><div class='del'>-#define MEMORY_CACHEABLE	0x0010</div><div class='del'>-#define MEMORY_BAR_MASK		0xe000</div><div class='del'>-#define MEMORY_BAR_SHIFT	13</div><div class='del'>-</div><div class='del'>-typedef struct eraseq_entry_t {</div><div class='del'>-    memory_handle_t	Handle;</div><div class='del'>-    u_char		State;</div><div class='del'>-    u_int		Size;</div><div class='del'>-    u_int		Offset;</div><div class='del'>-    void		*Optional;</div><div class='del'>-} eraseq_entry_t;</div><div class='del'>-</div><div class='del'>-typedef struct eraseq_hdr_t {</div><div class='del'>-    int			QueueEntryCnt;</div><div class='del'>-    eraseq_entry_t	*QueueEntryArray;</div><div class='del'>-} eraseq_hdr_t;</div><div class='del'>-</div><div class='del'>-#define ERASE_QUEUED		0x00</div><div class='del'>-#define ERASE_IN_PROGRESS(n)	(((n) &gt; 0) &amp;&amp; ((n) &lt; 0x80))</div><div class='del'>-#define ERASE_IDLE		0xff</div><div class='del'>-#define ERASE_PASSED		0xe0</div><div class='del'>-#define ERASE_FAILED		0xe1</div><div class='del'>-</div><div class='del'>-#define ERASE_MISSING		0x80</div><div class='del'>-#define ERASE_MEDIA_WRPROT	0x84</div><div class='del'>-#define ERASE_NOT_ERASABLE	0x85</div><div class='del'>-#define ERASE_BAD_OFFSET	0xc1</div><div class='del'>-#define ERASE_BAD_TECH		0xc2</div><div class='del'>-#define ERASE_BAD_SOCKET	0xc3</div><div class='del'>-#define ERASE_BAD_VCC		0xc4</div><div class='del'>-#define ERASE_BAD_VPP		0xc5</div><div class='del'>-#define ERASE_BAD_SIZE		0xc6</div><div class='del'>-</div><div class='del'>-/* For CopyMemory */</div><div class='del'>-typedef struct copy_op_t {</div><div class='del'>-    u_int		Attributes;</div><div class='del'>-    u_int		SourceOffset;</div><div class='del'>-    u_int		DestOffset;</div><div class='del'>-    u_int		Count;</div><div class='del'>-} copy_op_t;</div><div class='del'>-</div><div class='del'>-/* For ReadMemory and WriteMemory */</div><div class='del'>-typedef struct mem_op_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	Offset;</div><div class='del'>-    u_int	Count;</div><div class='del'>-} mem_op_t;</div><div class='del'>-</div><div class='del'>-#define MEM_OP_BUFFER		0x01</div><div class='del'>-#define MEM_OP_BUFFER_USER	0x00</div><div class='del'>-#define MEM_OP_BUFFER_KERNEL	0x01</div><div class='del'>-#define MEM_OP_DISABLE_ERASE	0x02</div><div class='del'>-#define MEM_OP_VERIFY		0x04</div><div class='del'>-</div><div class='del'>-/* For RegisterMTD */</div><div class='del'>-typedef struct mtd_reg_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	Offset;</div><div class='del'>-    u_long	MediaID;</div><div class='del'>-} mtd_reg_t;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Definitions for MTD requests</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef struct mtd_request_t {</div><div class='del'>-    u_int	SrcCardOffset;</div><div class='del'>-    u_int	DestCardOffset;</div><div class='del'>-    u_int	TransferLength;</div><div class='del'>-    u_int	Function;</div><div class='del'>-    u_long	MediaID;</div><div class='del'>-    u_int	Status;</div><div class='del'>-    u_int	Timeout;</div><div class='del'>-} mtd_request_t;</div><div class='del'>-</div><div class='del'>-/* Fields in MTD Function */</div><div class='del'>-#define MTD_REQ_ACTION		0x003</div><div class='del'>-#define MTD_REQ_ERASE		0x000</div><div class='del'>-#define MTD_REQ_READ		0x001</div><div class='del'>-#define MTD_REQ_WRITE		0x002</div><div class='del'>-#define MTD_REQ_COPY		0x003</div><div class='del'>-#define MTD_REQ_NOERASE		0x004</div><div class='del'>-#define MTD_REQ_VERIFY		0x008</div><div class='del'>-#define MTD_REQ_READY		0x010</div><div class='del'>-#define MTD_REQ_TIMEOUT		0x020</div><div class='del'>-#define MTD_REQ_LAST		0x040</div><div class='del'>-#define MTD_REQ_FIRST		0x080</div><div class='del'>-#define MTD_REQ_KERNEL		0x100</div><div class='del'>-</div><div class='del'>-/* Status codes */</div><div class='del'>-#define MTD_WAITREQ	0x00</div><div class='del'>-#define MTD_WAITTIMER	0x01</div><div class='del'>-#define MTD_WAITRDY	0x02</div><div class='del'>-#define MTD_WAITPOWER	0x03</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Definitions for MTD helper functions</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* For MTDModifyWindow */</div><div class='del'>-typedef struct mtd_mod_win_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	AccessSpeed;</div><div class='del'>-    u_int	CardOffset;</div><div class='del'>-} mtd_mod_win_t;</div><div class='del'>-</div><div class='del'>-/* For MTDSetVpp */</div><div class='del'>-typedef struct mtd_vpp_req_t {</div><div class='del'>-    u_char	Vpp1, Vpp2;</div><div class='del'>-} mtd_vpp_req_t;</div><div class='del'>-</div><div class='del'>-/* For MTDRDYMask */</div><div class='del'>-typedef struct mtd_rdy_req_t {</div><div class='del'>-    u_int	Mask;</div><div class='del'>-} mtd_rdy_req_t;</div><div class='del'>-</div><div class='del'>-enum mtd_helper {</div><div class='del'>-    MTDRequestWindow, MTDModifyWindow, MTDReleaseWindow,</div><div class='del'>-    MTDSetVpp, MTDRDYMask</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifdef IN_CARD_SERVICES</div><div class='del'>-extern int MTDHelperEntry(int func, void *a1, void *a2);</div><div class='del'>-#else</div><div class='del'>-extern int MTDHelperEntry(int func, ...);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_BULKMEM_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cardmgr.c b/mdk-stage1/pcmcia_/cardmgr.c<br/>deleted file mode 100644<br/>index 1db18b55b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cardmgr.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cardmgr.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1652 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * Code comes from /anonymous@projects.sourceforge.net:/pub/pcmcia-cs/pcmcia-cs-3.1.29.tar.bz2</div><div class='del'>- *</div><div class='del'>- *   Licence of this code follows:</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    PCMCIA Card Manager daemon</div><div class='del'>-</div><div class='del'>-    cardmgr.c 1.161 2001/08/24 12:19:19</div><div class='del'>-</div><div class='del'>-    The contents of this file are subject to the Mozilla Public</div><div class='del'>-    License Version 1.1 (the "License"); you may not use this file</div><div class='del'>-    except in compliance with the License. You may obtain a copy of</div><div class='del'>-    the License at http://www.mozilla.org/MPL/</div><div class='del'>-</div><div class='del'>-    Software distributed under the License is distributed on an "AS</div><div class='del'>-    IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or</div><div class='del'>-    implied. See the License for the specific language governing</div><div class='del'>-    rights and limitations under the License.</div><div class='del'>-</div><div class='del'>-    The initial developer of the original code is David A. Hinds</div><div class='del'>-    &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>-    are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>-</div><div class='del'>-    Alternatively, the contents of this file may be used under the</div><div class='del'>-    terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>-    which case the provisions of the GPL are applicable instead of the</div><div class='del'>-    above.  If you wish to allow the use of your version of this file</div><div class='del'>-    only under the terms of the GPL and not to allow others to use</div><div class='del'>-    your version of this file under the MPL, indicate your decision</div><div class='del'>-    by deleting the provisions above and replace them with the notice</div><div class='del'>-    and other provisions required by the GPL.  If you do not delete</div><div class='del'>-    the provisions above, a recipient may use your version of this</div><div class='del'>-    file under either the MPL or the GPL.</div><div class='del'>-    </div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#ifndef __linux__</div><div class='del'>-#include &lt;pcmcia/u_compat.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-//mdk-stage1// #include &lt;syslog.h&gt;</div><div class='del'>-//mdk-stage1// #include &lt;getopt.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-#include &lt;sys/file.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pcmcia_/version.h&gt;</div><div class='del'>-//mdk-stage1// #include &lt;pcmcia/config.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cs_types.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cs.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cistpl.h&gt;</div><div class='del'>-#include &lt;pcmcia_/ds.h&gt;</div><div class='del'>-</div><div class='del'>-#include "cardmgr.h"</div><div class='del'>-</div><div class='del'>-#include "../log.h"</div><div class='del'>-#include "modules.h"</div><div class='del'>-#include "pcmcia.h"</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-typedef struct socket_info_t {</div><div class='del'>-    int			fd;</div><div class='del'>-    int			state;</div><div class='del'>-    card_info_t		*card;</div><div class='del'>-    bind_info_t		*bind[MAX_BINDINGS];</div><div class='del'>-    mtd_ident_t		*mtd[2*CISTPL_MAX_DEVICES];</div><div class='del'>-} socket_info_t;</div><div class='del'>-</div><div class='del'>-#define SOCKET_PRESENT	0x01</div><div class='del'>-#define SOCKET_READY	0x02</div><div class='del'>-#define SOCKET_HOTPLUG	0x04</div><div class='del'>-</div><div class='del'>-/* Linked list of resource adjustments */</div><div class='del'>-struct adjust_list_t *root_adjust = NULL;</div><div class='del'>-</div><div class='del'>-/* Linked list of device definitions */</div><div class='del'>-struct device_info_t *root_device = NULL;</div><div class='del'>-</div><div class='del'>-/* Special pointer to "anonymous" card definition */</div><div class='del'>-struct card_info_t *blank_card = NULL;</div><div class='del'>-</div><div class='del'>-/* Linked list of card definitions */</div><div class='del'>-struct card_info_t *root_card = NULL;</div><div class='del'>-</div><div class='del'>-/* Linked list of function definitions */</div><div class='del'>-struct card_info_t *root_func = NULL;</div><div class='del'>-</div><div class='del'>-/* Linked list of MTD definitions */</div><div class='del'>-struct mtd_ident_t *root_mtd = NULL;</div><div class='del'>-</div><div class='del'>-/* Default MTD */</div><div class='del'>-struct mtd_ident_t *default_mtd = NULL;</div><div class='del'>-</div><div class='del'>-static int sockets;</div><div class='del'>-static struct socket_info_t socket[MAX_SOCKS];</div><div class='del'>-</div><div class='del'>-/* Default path for config file, device scripts */</div><div class='del'>-#ifdef ETC</div><div class='del'>-static char *configpath = ETC;</div><div class='del'>-#else</div><div class='del'>-static char *configpath = "/etc/pcmcia";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Default path for pid file */</div><div class='del'>-//mdk-stage1// static char *pidfile = "/var/run/cardmgr.pid";</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-/* Default path for finding modules */</div><div class='del'>-//mdk-stage1// static char *modpath = NULL;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Default path for socket info table */</div><div class='del'>-static char *stabfile;</div><div class='del'>-</div><div class='del'>-/* If set, don't generate beeps when cards are inserted */</div><div class='del'>-//mdk-stage1// static int be_quiet = 0;</div><div class='del'>-</div><div class='del'>-/* If set, use modprobe instead of insmod */</div><div class='del'>-//mdk-stage1// static int do_modprobe = 0;</div><div class='del'>-</div><div class='del'>-/* If set, configure already inserted cards, then exit */</div><div class='del'>-//mdk-stage1// static int one_pass = 0;</div><div class='del'>-</div><div class='del'>-/* Extra message logging? */</div><div class='del'>-//mdk-stage1// static int verbose = 0;</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-</div><div class='del'>-static int major = 0;</div><div class='del'>-</div><div class='del'>-static int lookup_dev(char *name)</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    int n;</div><div class='del'>-    char s[32], t[32];</div><div class='del'>-    </div><div class='del'>-    f = fopen("/proc/devices", "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	return -errno;</div><div class='del'>-    while (fgets(s, 32, f) != NULL) {</div><div class='del'>-	if (sscanf(s, "%d %s", &amp;n, t) == 2)</div><div class='del'>-	    if (strcmp(name, t) == 0)</div><div class='del'>-		break;</div><div class='del'>-    }</div><div class='del'>-    fclose(f);</div><div class='del'>-    if (strcmp(name, t) == 0)</div><div class='del'>-	return n;</div><div class='del'>-    else</div><div class='del'>-	return -ENODEV;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int open_dev(dev_t dev, int mode)</div><div class='del'>-{</div><div class='del'>-    char * fn = "/tmp/cardmgr_tmp";</div><div class='del'>-    int fd;</div><div class='del'>-</div><div class='del'>-    unlink(fn);</div><div class='del'>-	if (mknod(fn, mode, dev) != 0)</div><div class='del'>-		return -1;</div><div class='del'>-    fd = open(fn, (mode&amp;S_IWRITE)?O_RDWR:O_RDONLY);</div><div class='del'>-    if (fd &lt; 0)</div><div class='del'>-	fd = open(fn, O_NONBLOCK|((mode&amp;S_IWRITE)?O_RDWR:O_RDONLY));</div><div class='del'>-    unlink(fn);</div><div class='del'>-    return fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* __linux__ */</div><div class='del'>-</div><div class='del'>-int open_sock(int sock, int mode)</div><div class='del'>-{</div><div class='del'>-#ifdef __linux__</div><div class='del'>-    dev_t dev = (major&lt;&lt;8)+sock;</div><div class='del'>-    return open_dev(dev, mode);</div><div class='del'>-#endif</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-    int fd;</div><div class='del'>-    char fn[B_OS_NAME_LENGTH];</div><div class='del'>-    sprintf(fn, "/dev/pcmcia/sock%d", sock);</div><div class='del'>-    return open(fn, (mode &amp; S_IWRITE) ? O_RDWR: O_RDONLY);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    xlate_scsi_name() is a sort-of-hack used to deduce the minor</div><div class='del'>-    device numbers of SCSI devices, from the information available to</div><div class='del'>-    the low-level driver.</div><div class='del'>-    </div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-</div><div class='del'>-#include &lt;linux/major.h&gt;</div><div class='del'>-#include &lt;scsi/scsi.h&gt;</div><div class='del'>-//mdk-stage1// #define VERSION(v,p,s) (((v)&lt;&lt;16)+(p&lt;&lt;8)+s)</div><div class='del'>-//mdk-stage1// #if (LINUX_VERSION_CODE &lt; VERSION(2,1,126))</div><div class='del'>-//mdk-stage1// #define SCSI_DISK0_MAJOR SCSI_DISK_MAJOR</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-</div><div class='del'>-static int xlate_scsi_name(bind_info_t *bind)</div><div class='del'>-{</div><div class='del'>-    int i, fd, mode, minor;</div><div class='del'>-    u_long arg[2], id1, id2;</div><div class='del'>-</div><div class='del'>-    id1 = strtol(bind-&gt;name+3, NULL, 16);</div><div class='del'>-    if ((bind-&gt;major == SCSI_DISK0_MAJOR) ||</div><div class='del'>-	(bind-&gt;major == SCSI_CDROM_MAJOR))</div><div class='del'>-	mode = S_IREAD|S_IFBLK;</div><div class='del'>-    else</div><div class='del'>-	mode = S_IREAD|S_IFCHR;</div><div class='del'>-    </div><div class='del'>-    for (i = 0; i &lt; 16; i++) {</div><div class='del'>-	minor = (bind-&gt;major == SCSI_DISK0_MAJOR) ? (i&lt;&lt;4) : i;</div><div class='del'>-	fd = open_dev((bind-&gt;major&lt;&lt;8)+minor, mode);</div><div class='del'>-	if (fd &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	if (ioctl(fd, SCSI_IOCTL_GET_IDLUN, arg) == 0) {</div><div class='del'>-	    id2 = (arg[0]&amp;0x0f) + ((arg[0]&gt;&gt;4)&amp;0xf0) +</div><div class='del'>-		((arg[0]&gt;&gt;8)&amp;0xf00) + ((arg[0]&gt;&gt;12)&amp;0xf000);</div><div class='del'>-	    if (id1 == id2) {</div><div class='del'>-		close(fd);</div><div class='del'>-		switch (bind-&gt;major) {</div><div class='del'>-		case SCSI_DISK0_MAJOR:</div><div class='del'>-		case SCSI_GENERIC_MAJOR:</div><div class='del'>-		    sprintf(bind-&gt;name+2, "%c", 'a'+i); break;</div><div class='del'>-		case SCSI_CDROM_MAJOR:</div><div class='del'>-		    sprintf(bind-&gt;name, "scd%d", i); break;</div><div class='del'>-		case SCSI_TAPE_MAJOR:</div><div class='del'>-		    sprintf(bind-&gt;name+2, "%d", i); break;</div><div class='del'>-		}</div><div class='del'>-		bind-&gt;minor = minor;</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	close(fd);</div><div class='del'>-    }</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-#define BEEP_TIME 150</div><div class='del'>-#define BEEP_OK   1000</div><div class='del'>-#define BEEP_WARN 2000</div><div class='del'>-#define BEEP_ERR  4000</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #include &lt;sys/kd.h&gt;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-static void beep(unsigned int ms, unsigned int freq)</div><div class='del'>-{</div><div class='del'>-//mdk-stage1//     int fd, arg;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     if (be_quiet)</div><div class='del'>-//mdk-stage1// 	return;</div><div class='del'>-//mdk-stage1//     fd = open("/dev/console", O_RDWR);</div><div class='del'>-//mdk-stage1//     if (fd &lt; 0)</div><div class='del'>-//mdk-stage1// 	return;</div><div class='del'>-//mdk-stage1//     arg = (ms &lt;&lt; 16) | freq;</div><div class='del'>-//mdk-stage1//     ioctl(fd, KDMKTONE, arg);</div><div class='del'>-//mdk-stage1//     close(fd);</div><div class='del'>-//mdk-stage1//     usleep(ms*1000);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* __linux__ */</div><div class='del'>-</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-static void beep(unsigned int ms, unsigned int freq)</div><div class='del'>-{</div><div class='del'>-    if (!be_quiet) system("/bin/beep");</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-//mdk-stage1// static void write_pid(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     FILE *f;</div><div class='del'>-//mdk-stage1//     f = fopen(pidfile, "w");</div><div class='del'>-//mdk-stage1//     if (f == NULL)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_WARNING, "could not open %s: %m", pidfile);</div><div class='del'>-//mdk-stage1//     else {</div><div class='del'>-//mdk-stage1// 	fprintf(f, "%d\n", getpid());</div><div class='del'>-//mdk-stage1// 	fclose(f);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-static void write_stab(void)</div><div class='del'>-{</div><div class='del'>-    int i, j, k;</div><div class='del'>-    FILE *f;</div><div class='del'>-    socket_info_t *s;</div><div class='del'>-    bind_info_t *bind;</div><div class='del'>-</div><div class='del'>-    f = fopen(stabfile, "w");</div><div class='del'>-    if (f == NULL) {</div><div class='del'>-	log_message("CM: fopen(stabfile) failed: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-#ifndef __BEOS__</div><div class='del'>-    if (flock(fileno(f), LOCK_EX) != 0) {</div><div class='del'>-	log_message("CM: flock(stabfile) failed: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    for (i = 0; i &lt; sockets; i++) {</div><div class='del'>-	s = &amp;socket[i];</div><div class='del'>-	fprintf(f, "Socket %d: ", i);</div><div class='del'>-	if (!(s-&gt;state &amp; SOCKET_PRESENT)) {</div><div class='del'>-	    fprintf(f, "empty\n");</div><div class='del'>-//mdk-stage1// 	} else if (s-&gt;state &amp; SOCKET_HOTPLUG) {</div><div class='del'>-//mdk-stage1// 	    fprintf(f, "CardBus hotplug device\n");</div><div class='del'>-	} else if (!s-&gt;card) {</div><div class='del'>-	    fprintf(f, "unsupported card\n");</div><div class='del'>-	} else {</div><div class='del'>-	    fprintf(f, "%s\n", s-&gt;card-&gt;name);</div><div class='del'>-	    for (j = 0; j &lt; s-&gt;card-&gt;bindings; j++)</div><div class='del'>-		for (k = 0, bind = s-&gt;bind[j];</div><div class='del'>-		     bind != NULL;</div><div class='del'>-		     k++, bind = bind-&gt;next) {</div><div class='del'>-		    char *class = s-&gt;card-&gt;device[j]-&gt;class;</div><div class='del'>-		    fprintf(f, "%d\t%s\t%s\t%d\t%s",</div><div class='del'>-			    i, (class ? class : "none"),</div><div class='del'>-			    bind-&gt;dev_info, k, bind-&gt;name);</div><div class='del'>-		    if (bind-&gt;major)</div><div class='del'>-			fprintf(f, "\t%d\t%d\n",</div><div class='del'>-				bind-&gt;major, bind-&gt;minor);</div><div class='del'>-		    else</div><div class='del'>-			fputc('\n', f);</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    fflush(f);</div><div class='del'>-#ifndef __BEOS__</div><div class='del'>-    flock(fileno(f), LOCK_UN);</div><div class='del'>-#endif</div><div class='del'>-    fclose(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static int get_tuple(int ns, cisdata_t code, ds_ioctl_arg_t *arg)</div><div class='del'>-{</div><div class='del'>-    socket_info_t *s = &amp;socket[ns];</div><div class='del'>-    </div><div class='del'>-    arg-&gt;tuple.DesiredTuple = code;</div><div class='del'>-    arg-&gt;tuple.Attributes = 0;</div><div class='del'>-    if (ioctl(s-&gt;fd, DS_GET_FIRST_TUPLE, arg) != 0)</div><div class='del'>-	return -1;</div><div class='del'>-    arg-&gt;tuple.TupleOffset = 0;</div><div class='del'>-    if (ioctl(s-&gt;fd, DS_GET_TUPLE_DATA, arg) != 0) {</div><div class='del'>-	log_message("CM: error reading CIS data on socket %d: %m", ns);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    if (ioctl(s-&gt;fd, DS_PARSE_TUPLE, arg) != 0) {</div><div class='del'>-	log_message("CM: error parsing CIS on socket %d: %m", ns);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    Code to fetch a 2.4 kernel's hot plug PCI driver list</div><div class='del'>-</div><div class='del'>-    This is distasteful but is the best I could come up with.</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-</div><div class='del'>-typedef struct pci_id {</div><div class='del'>-    u_short vendor, device;</div><div class='del'>-    struct pci_id *next;</div><div class='del'>-} pci_id_t;</div><div class='del'>-</div><div class='del'>-static int get_pci_id(int ns, pci_id_t *id)</div><div class='del'>-{</div><div class='del'>-    socket_info_t *s = &amp;socket[ns];</div><div class='del'>-    config_info_t config;</div><div class='del'>-</div><div class='del'>-    config.Function = config.ConfigBase = 0;</div><div class='del'>-    if ((ioctl(s-&gt;fd, DS_GET_CONFIGURATION_INFO, &amp;config) != 0) ||</div><div class='del'>-	(config.IntType != INT_CARDBUS) || !config.ConfigBase)</div><div class='del'>-	return 0;</div><div class='del'>-    id-&gt;vendor = config.ConfigBase &amp; 0xffff;</div><div class='del'>-    id-&gt;device = config.ConfigBase &gt;&gt; 16;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* __linux__ */</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-//mdk-stage1// static void log_card_info(cistpl_vers_1_t *vers,</div><div class='del'>-//mdk-stage1// 			  cistpl_manfid_t *manfid,</div><div class='del'>-//mdk-stage1// 			  cistpl_funcid_t *funcid,</div><div class='del'>-//mdk-stage1// 			  pci_id_t *pci_id)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     char v[256] = "";</div><div class='del'>-//mdk-stage1//     int i;</div><div class='del'>-//mdk-stage1//     static char *fn[] = {</div><div class='del'>-//mdk-stage1// 	"multi", "memory", "serial", "parallel", "fixed disk",</div><div class='del'>-//mdk-stage1// 	"video", "network", "AIMS", "SCSI"</div><div class='del'>-//mdk-stage1//     };</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     if (vers) {</div><div class='del'>-//mdk-stage1// 	for (i = 0; i &lt; vers-&gt;ns; i++)</div><div class='del'>-//mdk-stage1// 	    sprintf(v+strlen(v), "%s\"%s\"",</div><div class='del'>-//mdk-stage1// 		    (i&gt;0) ? ", " : "", vers-&gt;str+vers-&gt;ofs[i]);</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "  product info: %s", v);</div><div class='del'>-//mdk-stage1//     } else {</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "  no product info available");</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     *v = '\0';</div><div class='del'>-//mdk-stage1//     if (manfid-&gt;manf != 0)</div><div class='del'>-//mdk-stage1// 	sprintf(v, "  manfid: 0x%04x, 0x%04x",</div><div class='del'>-//mdk-stage1// 		manfid-&gt;manf, manfid-&gt;card);</div><div class='del'>-//mdk-stage1//     if (funcid-&gt;func != 0xff)</div><div class='del'>-//mdk-stage1// 	sprintf(v+strlen(v), "  function: %d (%s)", funcid-&gt;func,</div><div class='del'>-//mdk-stage1// 		fn[funcid-&gt;func]);</div><div class='del'>-//mdk-stage1//     if (strlen(v) &gt; 0) syslog(LOG_INFO, "%s", v);</div><div class='del'>-//mdk-stage1//     if (pci_id-&gt;vendor != 0)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "  PCI id: 0x%04x, 0x%04x",</div><div class='del'>-//mdk-stage1// 	       pci_id-&gt;vendor, pci_id-&gt;device);</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-static card_info_t *lookup_card(int ns)</div><div class='del'>-{</div><div class='del'>-    socket_info_t *s = &amp;socket[ns];</div><div class='del'>-    card_info_t *card = NULL;</div><div class='del'>-    ds_ioctl_arg_t arg;</div><div class='del'>-    cistpl_vers_1_t *vers = NULL;</div><div class='del'>-    cistpl_manfid_t manfid = { 0, 0 };</div><div class='del'>-    pci_id_t pci_id = { 0, 0 };</div><div class='del'>-    cistpl_funcid_t funcid = { 0xff, 0xff };</div><div class='del'>-    cs_status_t status;</div><div class='del'>-    int i, ret, has_cis = 0;</div><div class='del'>-</div><div class='del'>-    /* Do we have a CIS structure? */</div><div class='del'>-    ret = ioctl(s-&gt;fd, DS_VALIDATE_CIS, &amp;arg);</div><div class='del'>-    has_cis = ((ret == 0) &amp;&amp; (arg.cisinfo.Chains &gt; 0));</div><div class='del'>-    </div><div class='del'>-    /* Try to read VERS_1, MANFID tuples */</div><div class='del'>-    if (has_cis) {</div><div class='del'>-	/* rule of thumb: cards with no FUNCID, but with common memory</div><div class='del'>-	   device geometry information, are probably memory cards */</div><div class='del'>-	if (get_tuple(ns, CISTPL_FUNCID, &amp;arg) == 0)</div><div class='del'>-	    memcpy(&amp;funcid, &amp;arg.tuple_parse.parse.funcid,</div><div class='del'>-		   sizeof(funcid));</div><div class='del'>-	else if (get_tuple(ns, CISTPL_DEVICE_GEO, &amp;arg) == 0)</div><div class='del'>-	    funcid.func = CISTPL_FUNCID_MEMORY;</div><div class='del'>-	if (get_tuple(ns, CISTPL_MANFID, &amp;arg) == 0)</div><div class='del'>-	    memcpy(&amp;manfid, &amp;arg.tuple_parse.parse.manfid,</div><div class='del'>-		   sizeof(manfid));</div><div class='del'>-	if (get_tuple(ns, CISTPL_VERS_1, &amp;arg) == 0)</div><div class='del'>-	    vers = &amp;arg.tuple_parse.parse.version_1;</div><div class='del'>-</div><div class='del'>-	for (card = root_card; card; card = card-&gt;next) {</div><div class='del'>-</div><div class='del'>-	    if (card-&gt;ident_type &amp;</div><div class='del'>-		~(VERS_1_IDENT|MANFID_IDENT|TUPLE_IDENT))</div><div class='del'>-		continue;</div><div class='del'>-</div><div class='del'>-	    if (card-&gt;ident_type &amp; VERS_1_IDENT) {</div><div class='del'>-		if (vers == NULL)</div><div class='del'>-		    continue;</div><div class='del'>-		for (i = 0; i &lt; card-&gt;id.vers.ns; i++) {</div><div class='del'>-		    if (strcmp(card-&gt;id.vers.pi[i], "*") == 0)</div><div class='del'>-			continue;</div><div class='del'>-		    if (i &gt;= vers-&gt;ns)</div><div class='del'>-			break;</div><div class='del'>-		    if (strcmp(card-&gt;id.vers.pi[i],</div><div class='del'>-			       vers-&gt;str+vers-&gt;ofs[i]) != 0)</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-		if (i &lt; card-&gt;id.vers.ns)</div><div class='del'>-		    continue;</div><div class='del'>-	    }</div><div class='del'>-	    </div><div class='del'>-	    if (card-&gt;ident_type &amp; MANFID_IDENT) {</div><div class='del'>-		if ((manfid.manf != card-&gt;manfid.manf) ||</div><div class='del'>-		    (manfid.card != card-&gt;manfid.card))</div><div class='del'>-		    continue;</div><div class='del'>-	    }</div><div class='del'>-		</div><div class='del'>-	    if (card-&gt;ident_type &amp; TUPLE_IDENT) {</div><div class='del'>-		arg.tuple.DesiredTuple = card-&gt;id.tuple.code;</div><div class='del'>-		arg.tuple.Attributes = 0;</div><div class='del'>-		ret = ioctl(s-&gt;fd, DS_GET_FIRST_TUPLE, &amp;arg);</div><div class='del'>-		if (ret != 0) continue;</div><div class='del'>-		arg.tuple.TupleOffset = card-&gt;id.tuple.ofs;</div><div class='del'>-		ret = ioctl(s-&gt;fd, DS_GET_TUPLE_DATA, &amp;arg);</div><div class='del'>-		if (ret != 0) continue;</div><div class='del'>-		if (strncmp((char *)arg.tuple_parse.data,</div><div class='del'>-			    card-&gt;id.tuple.info,</div><div class='del'>-			    strlen(card-&gt;id.tuple.info)) != 0)</div><div class='del'>-		    continue;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    break; /* we have a match */</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Check PCI vendor/device info */</div><div class='del'>-    status.Function = 0;</div><div class='del'>-    ioctl(s-&gt;fd, DS_GET_STATUS, &amp;status);</div><div class='del'>-    if (status.CardState &amp; CS_EVENT_CB_DETECT) {</div><div class='del'>-	if (get_pci_id(ns, &amp;pci_id)) {</div><div class='del'>-	    if (!card) {</div><div class='del'>-		for (card = root_card; card; card = card-&gt;next)</div><div class='del'>-		    if ((card-&gt;ident_type == PCI_IDENT) &amp;&amp;</div><div class='del'>-			(pci_id.vendor == card-&gt;manfid.manf) &amp;&amp;</div><div class='del'>-			(pci_id.device == card-&gt;manfid.card))</div><div class='del'>-			break;</div><div class='del'>-	    }</div><div class='del'>-	} else {</div><div class='del'>-	    /* this is a 2.4 kernel; hotplug handles these cards */</div><div class='del'>-//mdk-stage1//	    s-&gt;state |= SOCKET_HOTPLUG;</div><div class='del'>-	    log_message("CM: socket %d: CardBus hotplug device", ns);</div><div class='del'>-	    //beep(BEEP_TIME, BEEP_OK);</div><div class='del'>-//mdk-stage1//	    return NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Try for a FUNCID match */</div><div class='del'>-    if (!card &amp;&amp; (funcid.func != 0xff)) {</div><div class='del'>-	for (card = root_func; card; card = card-&gt;next)</div><div class='del'>-	    if (card-&gt;id.func.funcid == funcid.func)</div><div class='del'>-		break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (card) {</div><div class='del'>-	log_message("CM: socket %d: %s", ns, card-&gt;name);</div><div class='del'>- 	beep(BEEP_TIME, BEEP_OK);</div><div class='del'>-//mdk-stage1// 	if (verbose) log_card_info(vers, &amp;manfid, &amp;funcid, &amp;pci_id);</div><div class='del'>-	return card;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!blank_card || (status.CardState &amp; CS_EVENT_CB_DETECT) ||</div><div class='del'>-	manfid.manf || manfid.card || pci_id.vendor || vers) {</div><div class='del'>-	log_message("CM: unsupported card in socket %d", ns);</div><div class='del'>-//mdk-stage1// 	if (one_pass) return NULL;</div><div class='del'>-	beep(BEEP_TIME, BEEP_ERR);</div><div class='del'>-//mdk-stage1// 	log_card_info(vers, &amp;manfid, &amp;funcid, &amp;pci_id);</div><div class='del'>-	return NULL;</div><div class='del'>-    } else {</div><div class='del'>-	card = blank_card;</div><div class='del'>-	log_message("CM: socket %d: %s", ns, card-&gt;name);</div><div class='del'>- 	beep(BEEP_TIME, BEEP_WARN);</div><div class='del'>-	return card;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static int load_config(void)</div><div class='del'>-{</div><div class='del'>-    if (chdir(configpath) != 0) {</div><div class='del'>-	    log_message("CM: chdir to %s failed: %m", configpath);</div><div class='del'>-	    return -1;</div><div class='del'>-    }</div><div class='del'>-    if (parse_configfile("config") != 0) {</div><div class='del'>-	    log_message("CM: parsing of config file failed: %m");</div><div class='del'>-	    return -1;</div><div class='del'>-    }</div><div class='del'>-    if (root_device == NULL)</div><div class='del'>-		log_message("CM: no device drivers defined");</div><div class='del'>-    if ((root_card == NULL) &amp;&amp; (root_func == NULL))</div><div class='del'>-		log_message("CM: no cards defined");</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void free_card(card_info_t *card)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     if (card &amp;&amp; (--card-&gt;refs == 0)) {</div><div class='del'>-//mdk-stage1// 	int i;</div><div class='del'>-//mdk-stage1// 	free(card-&gt;name);</div><div class='del'>-//mdk-stage1// 	switch(card-&gt;ident_type) {</div><div class='del'>-//mdk-stage1// 	case VERS_1_IDENT:</div><div class='del'>-//mdk-stage1// 	    for (i = 0; i &lt; card-&gt;id.vers.ns; i++)</div><div class='del'>-//mdk-stage1// 		free(card-&gt;id.vers.pi[i]);</div><div class='del'>-//mdk-stage1// 	break;</div><div class='del'>-//mdk-stage1// 	case TUPLE_IDENT:</div><div class='del'>-//mdk-stage1// 	    free(card-&gt;id.tuple.info);</div><div class='del'>-//mdk-stage1// 	    break;</div><div class='del'>-//mdk-stage1// 	default:</div><div class='del'>-//mdk-stage1// 	    break;</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// 	free(card);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void free_device(device_info_t *dev)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     if (dev &amp;&amp; (--dev-&gt;refs == 0)) {</div><div class='del'>-//mdk-stage1// 	int i;</div><div class='del'>-//mdk-stage1// 	for (i = 0; i &lt; dev-&gt;modules; i++) {</div><div class='del'>-//mdk-stage1// 	    free(dev-&gt;module[i]);</div><div class='del'>-//mdk-stage1// 	    if (dev-&gt;opts[i]) free(dev-&gt;opts[i]);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// 	if (dev-&gt;class) free(dev-&gt;class);</div><div class='del'>-//mdk-stage1// 	free(dev);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void free_mtd(mtd_ident_t *mtd)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     if (mtd &amp;&amp; (--mtd-&gt;refs == 0)) {</div><div class='del'>-//mdk-stage1// 	free(mtd-&gt;name);</div><div class='del'>-//mdk-stage1// 	free(mtd-&gt;module);</div><div class='del'>-//mdk-stage1// 	free(mtd);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void free_config(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     while (root_adjust != NULL) {</div><div class='del'>-//mdk-stage1// 	adjust_list_t *adj = root_adjust;</div><div class='del'>-//mdk-stage1// 	root_adjust = root_adjust-&gt;next;</div><div class='del'>-//mdk-stage1// 	free(adj);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     while (root_device != NULL) {</div><div class='del'>-//mdk-stage1// 	device_info_t *dev = root_device;</div><div class='del'>-//mdk-stage1// 	root_device = root_device-&gt;next;</div><div class='del'>-//mdk-stage1// 	free_device(dev);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     while (root_card != NULL) {</div><div class='del'>-//mdk-stage1// 	card_info_t *card = root_card;</div><div class='del'>-//mdk-stage1// 	root_card = root_card-&gt;next;</div><div class='del'>-//mdk-stage1// 	free_card(card);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     while (root_func != NULL) {</div><div class='del'>-//mdk-stage1// 	card_info_t *card = root_func;</div><div class='del'>-//mdk-stage1// 	root_func = root_func-&gt;next;</div><div class='del'>-//mdk-stage1// 	free_card(card);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     blank_card = NULL;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     while (root_mtd != NULL) {</div><div class='del'>-//mdk-stage1// 	mtd_ident_t *mtd = root_mtd;</div><div class='del'>-//mdk-stage1// 	root_mtd = root_mtd-&gt;next;</div><div class='del'>-//mdk-stage1// 	free_mtd(mtd);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     default_mtd = NULL;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int execute(char *msg, char *cmd)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int ret;</div><div class='del'>-//mdk-stage1//     FILE *f;</div><div class='del'>-//mdk-stage1//     char line[256];</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     syslog(LOG_INFO, "executing: '%s'", cmd);</div><div class='del'>-//mdk-stage1//     strcat(cmd, " 2&gt;&amp;1");</div><div class='del'>-//mdk-stage1//     f = popen(cmd, "r");</div><div class='del'>-//mdk-stage1//     while (fgets(line, 255, f)) {</div><div class='del'>-//mdk-stage1// 	line[strlen(line)-1] = '\0';</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "+ %s", line);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     ret = pclose(f);</div><div class='del'>-//mdk-stage1//     if (WIFEXITED(ret)) {</div><div class='del'>-//mdk-stage1// 	if (WEXITSTATUS(ret))</div><div class='del'>-//mdk-stage1// 	    syslog(LOG_INFO, "%s exited with status %d",</div><div class='del'>-//mdk-stage1// 		   msg, WEXITSTATUS(ret));</div><div class='del'>-//mdk-stage1// 	return WEXITSTATUS(ret);</div><div class='del'>-//mdk-stage1//     } else</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "%s exited on signal %d",</div><div class='del'>-//mdk-stage1// 	       msg, WTERMSIG(ret));</div><div class='del'>-//mdk-stage1//     return -1;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int execute_on_dev(char *action, char *class, char *dev)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     /* Fixed length strings are ok here */</div><div class='del'>-//mdk-stage1//     char msg[128], cmd[128];</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     sprintf(msg, "%s cmd", action);</div><div class='del'>-//mdk-stage1//     sprintf(cmd, "./%s %s %s", class, action, dev);</div><div class='del'>-//mdk-stage1//     return execute(msg, cmd);</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int execute_on_all(char *cmd, char *class, int sn, int fn)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     socket_info_t *s = &amp;socket[sn];</div><div class='del'>-//mdk-stage1//     bind_info_t *bind;</div><div class='del'>-//mdk-stage1//     int ret = 0;</div><div class='del'>-//mdk-stage1//     for (bind = s-&gt;bind[fn]; bind != NULL; bind = bind-&gt;next)</div><div class='del'>-//mdk-stage1// 	if (bind-&gt;name[0] &amp;&amp; (bind-&gt;name[2] != '#'))</div><div class='del'>-//mdk-stage1// 	    ret |= execute_on_dev(cmd, class, bind-&gt;name);</div><div class='del'>-//mdk-stage1//     return ret;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef __linux__</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// typedef struct module_list_t {</div><div class='del'>-//mdk-stage1//     char *mod;</div><div class='del'>-//mdk-stage1//     int usage;</div><div class='del'>-//mdk-stage1//     struct module_list_t *next;</div><div class='del'>-//mdk-stage1// } module_list_t;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static module_list_t *module_list = NULL;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int try_insmod(char *mod, char *opts)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     char *cmd = malloc(strlen(mod) + strlen(modpath) +</div><div class='del'>-//mdk-stage1// 		       (opts ? strlen(opts) : 0) + 30);</div><div class='del'>-//mdk-stage1//     int ret;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     strcpy(cmd, "insmod ");</div><div class='del'>-//mdk-stage1//     if (strchr(mod, '/') != NULL)</div><div class='del'>-//mdk-stage1// 	sprintf(cmd+7, "%s/%s.o", modpath, mod);</div><div class='del'>-//mdk-stage1//     else</div><div class='del'>-//mdk-stage1// 	sprintf(cmd+7, "%s/pcmcia/%s.o", modpath, mod);</div><div class='del'>-//mdk-stage1//     if (access(cmd+7, R_OK) != 0) {</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "module %s not available", cmd+7);</div><div class='del'>-//mdk-stage1// 	free(cmd);</div><div class='del'>-//mdk-stage1// 	return -1;</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     if (opts) {</div><div class='del'>-//mdk-stage1// 	strcat(cmd, " ");</div><div class='del'>-//mdk-stage1// 	strcat(cmd, opts);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     ret = execute("insmod", cmd);</div><div class='del'>-//mdk-stage1//     free(cmd);</div><div class='del'>-//mdk-stage1//     return ret;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int try_modprobe(char *mod, char *opts)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     char *cmd = malloc(strlen(mod) + (opts ? strlen(opts) : 0) + 20);</div><div class='del'>-//mdk-stage1//     char *s = strrchr(mod, '/');</div><div class='del'>-//mdk-stage1//     int ret;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     sprintf(cmd, "modprobe %s", (s) ? s+1 : mod);</div><div class='del'>-//mdk-stage1//     if (opts) {</div><div class='del'>-//mdk-stage1// 	strcat(cmd, " ");</div><div class='del'>-//mdk-stage1// 	strcat(cmd, opts);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     ret = execute("modprobe", cmd);</div><div class='del'>-//mdk-stage1//     free(cmd);</div><div class='del'>-//mdk-stage1//     return ret;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-static void install_module(char *mod, char *opts)</div><div class='del'>-{</div><div class='del'>-	my_insmod(mod, ANY_DRIVER_TYPE, opts);</div><div class='del'>-//mdk-stage1//     module_list_t *ml;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     for (ml = module_list; ml != NULL; ml = ml-&gt;next)</div><div class='del'>-//mdk-stage1// 	if (strcmp(mod, ml-&gt;mod) == 0) break;</div><div class='del'>-//mdk-stage1//     if (ml == NULL) {</div><div class='del'>-//mdk-stage1// 	ml = (module_list_t *)malloc(sizeof(struct module_list_t));</div><div class='del'>-//mdk-stage1// 	ml-&gt;mod = mod;</div><div class='del'>-//mdk-stage1// 	ml-&gt;usage = 0;</div><div class='del'>-//mdk-stage1// 	ml-&gt;next = module_list;</div><div class='del'>-//mdk-stage1// 	module_list = ml;</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     ml-&gt;usage++;</div><div class='del'>-//mdk-stage1//     if (ml-&gt;usage != 1)</div><div class='del'>-//mdk-stage1// 	return;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef __linux__</div><div class='del'>-//mdk-stage1//     if (access("/proc/bus/pccard/drivers", R_OK) == 0) {</div><div class='del'>-//mdk-stage1// 	FILE *f = fopen("/proc/bus/pccard/drivers", "r");</div><div class='del'>-//mdk-stage1// 	if (f) {</div><div class='del'>-//mdk-stage1// 	    char a[61], s[33];</div><div class='del'>-//mdk-stage1// 	    while (fgets(a, 60, f)) {</div><div class='del'>-//mdk-stage1// 		int is_kernel;</div><div class='del'>-//mdk-stage1// 		sscanf(a, "%s %d", s, &amp;is_kernel);</div><div class='del'>-//mdk-stage1// 		if (strcmp(s, mod) != 0) continue;</div><div class='del'>-//mdk-stage1// 		/* If it isn't a module, we won't try to rmmod */</div><div class='del'>-//mdk-stage1// 		ml-&gt;usage += is_kernel;</div><div class='del'>-//mdk-stage1// 		fclose(f);</div><div class='del'>-//mdk-stage1// 		return;</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	    fclose(f);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     if (do_modprobe) {</div><div class='del'>-//mdk-stage1// 	if (try_modprobe(mod, opts) != 0)</div><div class='del'>-//mdk-stage1// 	    try_insmod(mod, opts);</div><div class='del'>-//mdk-stage1//     } else {</div><div class='del'>-//mdk-stage1// 	if (try_insmod(mod, opts) != 0)</div><div class='del'>-//mdk-stage1// 	    try_modprobe(mod, opts);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-//mdk-stage1// static void remove_module(char *mod)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     char *s, cmd[128];</div><div class='del'>-//mdk-stage1//     module_list_t *ml;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     for (ml = module_list; ml != NULL; ml = ml-&gt;next)</div><div class='del'>-//mdk-stage1// 	if (strcmp(mod, ml-&gt;mod) == 0) break;</div><div class='del'>-//mdk-stage1//     if (ml != NULL) {</div><div class='del'>-//mdk-stage1// 	ml-&gt;usage--;</div><div class='del'>-//mdk-stage1// 	if (ml-&gt;usage == 0) {</div><div class='del'>-//mdk-stage1// 	    /* Strip off leading path names */</div><div class='del'>-//mdk-stage1// 	    s = strrchr(mod, '/');</div><div class='del'>-//mdk-stage1// 	    s = (s) ? s+1 : mod;</div><div class='del'>-//mdk-stage1// 	    sprintf(cmd, do_modprobe ? "modprobe -r %s" : "rmmod %s", s);</div><div class='del'>-//mdk-stage1// 	    execute(do_modprobe ? "modprobe" : "rmmod", cmd);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #endif /* __linux__ */</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef __BEOS__</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #define install_module(a,b)</div><div class='del'>-//mdk-stage1// #define remove_module(a)</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void republish_driver(char *mod)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int fd = open("/dev", O_RDWR);</div><div class='del'>-//mdk-stage1//     write(fd, mod, strlen(mod));</div><div class='del'>-//mdk-stage1//     close(fd);</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #endif /* __BEOS__ */</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-</div><div class='del'>-static mtd_ident_t *lookup_mtd(region_info_t *region)</div><div class='del'>-{</div><div class='del'>-    mtd_ident_t *mtd;</div><div class='del'>-    int match = 0;</div><div class='del'>-    </div><div class='del'>-    for (mtd = root_mtd; mtd; mtd = mtd-&gt;next) {</div><div class='del'>-	switch (mtd-&gt;mtd_type) {</div><div class='del'>-	case JEDEC_MTD:</div><div class='del'>-	    if ((mtd-&gt;jedec_mfr == region-&gt;JedecMfr) &amp;&amp;</div><div class='del'>-		(mtd-&gt;jedec_info == region-&gt;JedecInfo)) {</div><div class='del'>-		match = 1;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	case DTYPE_MTD:</div><div class='del'>-	    break;</div><div class='del'>-	default:</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	if (match) break;</div><div class='del'>-    }</div><div class='del'>-    if (mtd)</div><div class='del'>-	return mtd;</div><div class='del'>-    else</div><div class='del'>-	return default_mtd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static void bind_mtd(int sn)</div><div class='del'>-{</div><div class='del'>-    socket_info_t *s = &amp;socket[sn];</div><div class='del'>-    region_info_t region;</div><div class='del'>-    bind_info_t bind;</div><div class='del'>-    mtd_info_t mtd_info;</div><div class='del'>-    mtd_ident_t *mtd;</div><div class='del'>-    int i, attr, ret, nr;</div><div class='del'>-</div><div class='del'>-    nr = 0;</div><div class='del'>-    for (attr = 0; attr &lt; 2; attr++) {</div><div class='del'>-	region.Attributes = attr;</div><div class='del'>-	ret = ioctl(s-&gt;fd, DS_GET_FIRST_REGION, &amp;region);</div><div class='del'>-	while (ret == 0) {</div><div class='del'>-	    mtd = lookup_mtd(&amp;region);</div><div class='del'>-	    if (mtd) {</div><div class='del'>-		/* Have we seen this MTD before? */</div><div class='del'>-		for (i = 0; i &lt; nr; i++)</div><div class='del'>-		    if (s-&gt;mtd[i] == mtd) break;</div><div class='del'>-		if (i == nr) {</div><div class='del'>-		    install_module(mtd-&gt;module, mtd-&gt;opts);</div><div class='del'>-		    s-&gt;mtd[nr] = mtd;</div><div class='del'>-		    mtd-&gt;refs++;</div><div class='del'>-		    nr++;</div><div class='del'>-		}</div><div class='del'>-		log_message("CM: %s memory region at 0x%x: %s",</div><div class='del'>-		       attr ? "Attribute" : "Common", region.CardOffset,</div><div class='del'>-		       mtd-&gt;name);</div><div class='del'>-		/* Bind MTD to this region */</div><div class='del'>-		strcpy(mtd_info.dev_info, s-&gt;mtd[i]-&gt;module);</div><div class='del'>-		mtd_info.Attributes = region.Attributes;</div><div class='del'>-		mtd_info.CardOffset = region.CardOffset;</div><div class='del'>-		if (ioctl(s-&gt;fd, DS_BIND_MTD, &amp;mtd_info) != 0) {</div><div class='del'>-		    log_message("CM: bind MTD '%s' to region at 0x%x failed: %m",</div><div class='del'>-			   (char *)mtd_info.dev_info, region.CardOffset);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    ret = ioctl(s-&gt;fd, DS_GET_NEXT_REGION, &amp;region);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    s-&gt;mtd[nr] = NULL;</div><div class='del'>-    </div><div class='del'>-    /* Now bind each unique MTD as a normal client of this socket */</div><div class='del'>-    for (i = 0; i &lt; nr; i++) {</div><div class='del'>-	strcpy(bind.dev_info, s-&gt;mtd[i]-&gt;module);</div><div class='del'>-	bind.function = 0;</div><div class='del'>-	if (ioctl(s-&gt;fd, DS_BIND_REQUEST, &amp;bind) != 0)</div><div class='del'>-	    log_message("CM: bind MTD '%s' to socket %d failed: %m",</div><div class='del'>-		   (char *)bind.dev_info, sn);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static void update_cis(socket_info_t *s)</div><div class='del'>-{</div><div class='del'>-    cisdump_t cis;</div><div class='del'>-    FILE *f = fopen(s-&gt;card-&gt;cis_file, "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	log_message("CM: could not open '%s': %m", s-&gt;card-&gt;cis_file);</div><div class='del'>-    else {</div><div class='del'>-	cis.Length = fread(cis.Data, 1, CISTPL_MAX_CIS_SIZE, f);</div><div class='del'>-	fclose(f);</div><div class='del'>-	if (ioctl(s-&gt;fd, DS_REPLACE_CIS, &amp;cis) != 0)</div><div class='del'>-	    log_message("CM: could not replace CIS: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static void do_insert(int sn)</div><div class='del'>-{</div><div class='del'>-    socket_info_t *s = &amp;socket[sn];</div><div class='del'>-    card_info_t *card;</div><div class='del'>-    device_info_t **dev;</div><div class='del'>-    bind_info_t *bind, **tail;</div><div class='del'>-    int i, j, ret;</div><div class='del'>-</div><div class='del'>-    /* Already identified? */</div><div class='del'>-    if ((s-&gt;card != NULL) &amp;&amp; (s-&gt;card != blank_card))</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    log_message("CM: initializing socket %d", sn);</div><div class='del'>-    card = lookup_card(sn);</div><div class='del'>-    if (s-&gt;state &amp; SOCKET_HOTPLUG) {</div><div class='del'>-	write_stab();</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    /* Make sure we've learned something new before continuing */</div><div class='del'>-    if (card == s-&gt;card)</div><div class='del'>-	return;</div><div class='del'>-    s-&gt;card = card;</div><div class='del'>-    card-&gt;refs++;</div><div class='del'>-    if (card-&gt;cis_file) update_cis(s);</div><div class='del'>-</div><div class='del'>-    dev = card-&gt;device;</div><div class='del'>-</div><div class='del'>-    /* Set up MTD's */</div><div class='del'>-    for (i = 0; i &lt; card-&gt;bindings; i++)</div><div class='del'>-	if (dev[i]-&gt;needs_mtd)</div><div class='del'>-	    break;</div><div class='del'>-    if (i &lt; card-&gt;bindings)</div><div class='del'>-	bind_mtd(sn);</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-    /* Install kernel modules */</div><div class='del'>-    for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-	dev[i]-&gt;refs++;</div><div class='del'>-	for (j = 0; j &lt; dev[i]-&gt;modules; j++)</div><div class='del'>-	    install_module(dev[i]-&gt;module[j], dev[i]-&gt;opts[j]);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    </div><div class='del'>-    /* Bind drivers by their dev_info identifiers */</div><div class='del'>-    for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-	bind = calloc(1, sizeof(bind_info_t));</div><div class='del'>-	strcpy((char *)bind-&gt;dev_info, (char *)dev[i]-&gt;dev_info);</div><div class='del'>-	if (strcmp(bind-&gt;dev_info, "cb_enabler") == 0)</div><div class='del'>-	    bind-&gt;function = BIND_FN_ALL;</div><div class='del'>-	else</div><div class='del'>-	    bind-&gt;function = card-&gt;dev_fn[i];</div><div class='del'>-	if (ioctl(s-&gt;fd, DS_BIND_REQUEST, bind) != 0) {</div><div class='del'>-	    if (errno == EBUSY) {</div><div class='del'>-		log_message("CM: '%s' already bound to socket %d",</div><div class='del'>-		       (char *)bind-&gt;dev_info, sn);</div><div class='del'>-	    } else {</div><div class='del'>-		log_message("CM: bind '%s' to socket %d failed: %m",</div><div class='del'>-		       (char *)bind-&gt;dev_info, sn);</div><div class='del'>-		beep(BEEP_TIME, BEEP_ERR);</div><div class='del'>-		write_stab();</div><div class='del'>-		return;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-	republish_driver(dev[i]-&gt;module[0]);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	for (ret = j = 0; j &lt; 10; j++) {</div><div class='del'>-	    ret = ioctl(s-&gt;fd, DS_GET_DEVICE_INFO, bind);</div><div class='del'>-	    if ((ret == 0) || (errno != EAGAIN))</div><div class='del'>-		break;</div><div class='del'>-	    usleep(100000);</div><div class='del'>-	}</div><div class='del'>-	if (ret != 0) {</div><div class='del'>-	    log_message("CM: get dev info on socket %d failed: %m",</div><div class='del'>-		   sn);</div><div class='del'>-	    ioctl(s-&gt;fd, DS_UNBIND_REQUEST, bind);</div><div class='del'>-	    beep(BEEP_TIME, BEEP_ERR);</div><div class='del'>-	    write_stab();</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-	tail = &amp;s-&gt;bind[i];</div><div class='del'>-	while (ret == 0) {</div><div class='del'>-	    bind_info_t *old;</div><div class='del'>-#ifdef __linux__</div><div class='del'>-	    if ((strlen(bind-&gt;name) &gt; 3) &amp;&amp; (bind-&gt;name[2] == '#'))</div><div class='del'>-		xlate_scsi_name(bind);</div><div class='del'>-#endif</div><div class='del'>-	    old = *tail = bind; tail = (bind_info_t **)&amp;bind-&gt;next;</div><div class='del'>-	    bind = (bind_info_t *)malloc(sizeof(bind_info_t));</div><div class='del'>-	    memcpy(bind, old, sizeof(bind_info_t));</div><div class='del'>-	    ret = ioctl(s-&gt;fd, DS_GET_NEXT_DEVICE, bind);</div><div class='del'>-	}</div><div class='del'>-	*tail = NULL; free(bind);</div><div class='del'>-	write_stab();</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-//mdk-stage1//     /* Run "start" commands */</div><div class='del'>-//mdk-stage1//     for (i = ret = 0; i &lt; card-&gt;bindings; i++)</div><div class='del'>-//mdk-stage1// 	if (dev[i]-&gt;class)</div><div class='del'>-//mdk-stage1// 	    ret |= execute_on_all("start", dev[i]-&gt;class, sn, i);</div><div class='del'>-//mdk-stage1//     beep(BEEP_TIME, (ret) ? BEEP_ERR : BEEP_OK);</div><div class='del'>-    </div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int do_check(int sn)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     socket_info_t *s = &amp;socket[sn];</div><div class='del'>-//mdk-stage1//     card_info_t *card;</div><div class='del'>-//mdk-stage1//     device_info_t **dev;</div><div class='del'>-//mdk-stage1//     int i, ret;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     card = s-&gt;card;</div><div class='del'>-//mdk-stage1//     if (card == NULL)</div><div class='del'>-//mdk-stage1// 	return 0;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     /* Run "check" commands */</div><div class='del'>-//mdk-stage1//     dev = card-&gt;device;</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	if (dev[i]-&gt;class) {</div><div class='del'>-//mdk-stage1// 	    ret = execute_on_all("check", dev[i]-&gt;class, sn, i);</div><div class='del'>-//mdk-stage1// 	    if (ret != 0)</div><div class='del'>-//mdk-stage1// 		return CS_IN_USE;</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     return 0;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void do_remove(int sn)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     socket_info_t *s = &amp;socket[sn];</div><div class='del'>-//mdk-stage1//     card_info_t *card;</div><div class='del'>-//mdk-stage1//     device_info_t **dev;</div><div class='del'>-//mdk-stage1//     bind_info_t *bind;</div><div class='del'>-//mdk-stage1//     int i, j;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     if (verbose) syslog(LOG_INFO, "shutting down socket %d", sn);</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     card = s-&gt;card;</div><div class='del'>-//mdk-stage1//     if (card == NULL)</div><div class='del'>-//mdk-stage1// 	goto done;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* Run "stop" commands */</div><div class='del'>-//mdk-stage1//     dev = card-&gt;device;</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	if (dev[i]-&gt;class) {</div><div class='del'>-//mdk-stage1// 	    execute_on_all("stop", dev[i]-&gt;class, sn, i);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* unbind driver instances */</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	if (s-&gt;bind[i]) {</div><div class='del'>-//mdk-stage1// 	    if (ioctl(s-&gt;fd, DS_UNBIND_REQUEST, s-&gt;bind[i]) != 0)</div><div class='del'>-//mdk-stage1// 		syslog(LOG_INFO, "unbind '%s' from socket %d failed: %m",</div><div class='del'>-//mdk-stage1// 		       (char *)s-&gt;bind[i]-&gt;dev_info, sn);</div><div class='del'>-//mdk-stage1// 	    while (s-&gt;bind[i]) {</div><div class='del'>-//mdk-stage1// 		bind = s-&gt;bind[i];</div><div class='del'>-//mdk-stage1// 		s-&gt;bind[i] = bind-&gt;next;</div><div class='del'>-//mdk-stage1// 		free(bind);</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     for (i = 0; (s-&gt;mtd[i] != NULL); i++) {</div><div class='del'>-//mdk-stage1// 	bind_info_t b;</div><div class='del'>-//mdk-stage1// 	strcpy(b.dev_info, s-&gt;mtd[i]-&gt;module);</div><div class='del'>-//mdk-stage1// 	b.function = 0;</div><div class='del'>-//mdk-stage1// 	if (ioctl(s-&gt;fd, DS_UNBIND_REQUEST, &amp;b) != 0)</div><div class='del'>-//mdk-stage1// 	    syslog(LOG_INFO, "unbind MTD '%s' from socket %d failed: %m",</div><div class='del'>-//mdk-stage1// 		   s-&gt;mtd[i]-&gt;module, sn);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* remove kernel modules in inverse order */</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	for (j = dev[i]-&gt;modules-1; j &gt;= 0; j--)</div><div class='del'>-//mdk-stage1// 	    remove_module(dev[i]-&gt;module[j]);</div><div class='del'>-//mdk-stage1// 	free_device(dev[i]);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     /* Remove any MTD's bound to this socket */</div><div class='del'>-//mdk-stage1//     for (i = 0; (s-&gt;mtd[i] != NULL); i++) {</div><div class='del'>-//mdk-stage1// 	remove_module(s-&gt;mtd[i]-&gt;module);</div><div class='del'>-//mdk-stage1// 	free_mtd(s-&gt;mtd[i]);</div><div class='del'>-//mdk-stage1// 	s-&gt;mtd[i] = NULL;</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// done:</div><div class='del'>-//mdk-stage1//     beep(BEEP_TIME, BEEP_OK);</div><div class='del'>-//mdk-stage1//     free_card(card);</div><div class='del'>-//mdk-stage1//     s-&gt;card = NULL;</div><div class='del'>-//mdk-stage1//     write_stab();</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void do_suspend(int sn)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     socket_info_t *s = &amp;socket[sn];</div><div class='del'>-//mdk-stage1//     card_info_t *card;</div><div class='del'>-//mdk-stage1//     device_info_t **dev;</div><div class='del'>-//mdk-stage1//     int i, ret;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     card = s-&gt;card;</div><div class='del'>-//mdk-stage1//     if (card == NULL)</div><div class='del'>-//mdk-stage1// 	return;</div><div class='del'>-//mdk-stage1//     dev = card-&gt;device;</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	if (dev[i]-&gt;class) {</div><div class='del'>-//mdk-stage1// 	    ret = execute_on_all("suspend", dev[i]-&gt;class, sn, i);</div><div class='del'>-//mdk-stage1// 	    if (ret != 0)</div><div class='del'>-//mdk-stage1// 		beep(BEEP_TIME, BEEP_ERR);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void do_resume(int sn)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     socket_info_t *s = &amp;socket[sn];</div><div class='del'>-//mdk-stage1//     card_info_t *card;</div><div class='del'>-//mdk-stage1//     device_info_t **dev;</div><div class='del'>-//mdk-stage1//     int i, ret;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     card = s-&gt;card;</div><div class='del'>-//mdk-stage1//     if (card == NULL)</div><div class='del'>-//mdk-stage1// 	return;</div><div class='del'>-//mdk-stage1//     dev = card-&gt;device;</div><div class='del'>-//mdk-stage1//     for (i = 0; i &lt; card-&gt;bindings; i++) {</div><div class='del'>-//mdk-stage1// 	if (dev[i]-&gt;class) {</div><div class='del'>-//mdk-stage1// 	    ret = execute_on_all("resume", dev[i]-&gt;class, sn, i);</div><div class='del'>-//mdk-stage1// 	    if (ret != 0)</div><div class='del'>-//mdk-stage1// 		beep(BEEP_TIME, BEEP_ERR);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static void wait_for_pending(void)</div><div class='del'>-{</div><div class='del'>-    cs_status_t status;</div><div class='del'>-    int i;</div><div class='del'>-    status.Function = 0;</div><div class='del'>-    for (;;) {</div><div class='del'>-	usleep(100000);</div><div class='del'>-	for (i = 0; i &lt; sockets; i++)</div><div class='del'>-	    if ((ioctl(socket[i].fd, DS_GET_STATUS, &amp;status) == 0) &amp;&amp;</div><div class='del'>-		(status.CardState &amp; CS_EVENT_CARD_INSERTION))</div><div class='del'>-		break;</div><div class='del'>-	if (i == sockets) break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void free_resources(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     adjust_list_t *al;</div><div class='del'>-//mdk-stage1//     int fd = socket[0].fd;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     for (al = root_adjust; al; al = al-&gt;next) {</div><div class='del'>-//mdk-stage1// 	if (al-&gt;adj.Action == ADD_MANAGED_RESOURCE) {</div><div class='del'>-//mdk-stage1// 	    al-&gt;adj.Action = REMOVE_MANAGED_RESOURCE;</div><div class='del'>-//mdk-stage1// 	    ioctl(fd, DS_ADJUST_RESOURCE_INFO, &amp;al-&gt;adj);</div><div class='del'>-//mdk-stage1// 	} else if ((al-&gt;adj.Action == REMOVE_MANAGED_RESOURCE) &amp;&amp;</div><div class='del'>-//mdk-stage1// 		   (al-&gt;adj.Resource == RES_IRQ)) {</div><div class='del'>-//mdk-stage1// 	    al-&gt;adj.Action = ADD_MANAGED_RESOURCE;</div><div class='del'>-//mdk-stage1// 	    ioctl(fd, DS_ADJUST_RESOURCE_INFO, &amp;al-&gt;adj);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static void adjust_resources(void)</div><div class='del'>-{</div><div class='del'>-    adjust_list_t *al;</div><div class='del'>-    int ret;</div><div class='del'>-    char tmp[64];</div><div class='del'>-    int fd = socket[0].fd;</div><div class='del'>-    </div><div class='del'>-    for (al = root_adjust; al; al = al-&gt;next) {</div><div class='del'>-	ret = ioctl(fd, DS_ADJUST_RESOURCE_INFO, &amp;al-&gt;adj);</div><div class='del'>-	if (ret != 0) {</div><div class='del'>-	    switch (al-&gt;adj.Resource) {</div><div class='del'>-	    case RES_MEMORY_RANGE:</div><div class='del'>-		sprintf(tmp, "memory %#lx-%#lx",</div><div class='del'>-			al-&gt;adj.resource.memory.Base,</div><div class='del'>-			al-&gt;adj.resource.memory.Base +</div><div class='del'>-			al-&gt;adj.resource.memory.Size - 1);</div><div class='del'>-		break;</div><div class='del'>-	    case RES_IO_RANGE:</div><div class='del'>-		sprintf(tmp, "IO ports %#x-%#x",</div><div class='del'>-			al-&gt;adj.resource.io.BasePort,</div><div class='del'>-			al-&gt;adj.resource.io.BasePort +</div><div class='del'>-			al-&gt;adj.resource.io.NumPorts - 1);</div><div class='del'>-		break;</div><div class='del'>-	    case RES_IRQ:</div><div class='del'>-		sprintf(tmp, "irq %u", al-&gt;adj.resource.irq.IRQ);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    log_message("CM: could not adjust resource: %s: %m", tmp);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-    </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static int cleanup_files = 0;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void fork_now(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int ret;</div><div class='del'>-//mdk-stage1//     if ((ret = fork()) &gt; 0) {</div><div class='del'>-//mdk-stage1// 	cleanup_files = 0;</div><div class='del'>-//mdk-stage1// 	exit(0);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     if (ret == -1)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "forking: %m");</div><div class='del'>-//mdk-stage1//     if (setsid() &lt; 0)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "detaching from tty: %m");</div><div class='del'>-//mdk-stage1// }    </div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void done(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     syslog(LOG_INFO, "exiting");</div><div class='del'>-//mdk-stage1//     if (cleanup_files) {</div><div class='del'>-//mdk-stage1// 	unlink(pidfile);</div><div class='del'>-//mdk-stage1// 	unlink(stabfile);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// /* most recent signal */</div><div class='del'>-//mdk-stage1// static int caught_signal = 0;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void catch_signal(int sig)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     caught_signal = sig;</div><div class='del'>-//mdk-stage1//     if (signal(sig, catch_signal) == SIG_ERR)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "signal(%d): %m", sig);</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// static void handle_signal(void)</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int i;</div><div class='del'>-//mdk-stage1//     switch (caught_signal) {</div><div class='del'>-//mdk-stage1//     case SIGTERM:</div><div class='del'>-//mdk-stage1//     case SIGINT:</div><div class='del'>-//mdk-stage1// 	for (i = 0; i &lt; sockets; i++)</div><div class='del'>-//mdk-stage1// 	    if ((socket[i].state &amp; SOCKET_PRESENT) &amp;&amp;</div><div class='del'>-//mdk-stage1// 		(do_check(i) == 0)) do_remove(i);</div><div class='del'>-//mdk-stage1// 	free_resources();</div><div class='del'>-//mdk-stage1// 	exit(0);</div><div class='del'>-//mdk-stage1// 	break;</div><div class='del'>-//mdk-stage1//     case SIGHUP:</div><div class='del'>-//mdk-stage1// 	free_resources();</div><div class='del'>-//mdk-stage1// 	free_config();</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "re-loading config file");</div><div class='del'>-//mdk-stage1// 	load_config();</div><div class='del'>-//mdk-stage1// 	adjust_resources();</div><div class='del'>-//mdk-stage1// 	break;</div><div class='del'>-//mdk-stage1// #ifdef SIGPWR</div><div class='del'>-//mdk-stage1//     case SIGPWR:</div><div class='del'>-//mdk-stage1// 	break;</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-static int init_sockets(void)</div><div class='del'>-{</div><div class='del'>-    int fd, i;</div><div class='del'>-    servinfo_t serv;</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-    major = lookup_dev("pcmcia");</div><div class='del'>-    if (major &lt; 0) {</div><div class='del'>-	if (major == -ENODEV)</div><div class='del'>-	    log_message("CM: no pcmcia driver in /proc/devices");</div><div class='del'>-	else</div><div class='del'>-	    log_message("CM: could not open /proc/devices: %m");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    for (fd = -1, i = 0; i &lt; MAX_SOCKS; i++) {</div><div class='del'>-	fd = open_sock(i, S_IFCHR|S_IREAD|S_IWRITE);</div><div class='del'>-	if (fd &lt; 0) break;</div><div class='del'>-	socket[i].fd = fd;</div><div class='del'>-	socket[i].state = 0;</div><div class='del'>-    }</div><div class='del'>-    if ((fd &lt; 0) &amp;&amp; (errno != ENODEV) &amp;&amp; (errno != ENOENT))</div><div class='del'>-	log_message("CM: open_sock(socket %d) failed: %m", i);</div><div class='del'>-    sockets = i;</div><div class='del'>-    if (sockets == 0) {</div><div class='del'>-	log_message("CM: no sockets found!");</div><div class='del'>-	return -1;</div><div class='del'>-    } else</div><div class='del'>-	log_message("CM: watching %d sockets", sockets);</div><div class='del'>-</div><div class='del'>-    if (ioctl(socket[0].fd, DS_GET_CARD_SERVICES_INFO, &amp;serv) == 0) {</div><div class='del'>-	if (serv.Revision != CS_RELEASE_CODE)</div><div class='del'>-	    log_message("CM: warning, Card Services release does not match kernel (generally harmless)");</div><div class='del'>-    } else {</div><div class='del'>-	log_message("CM: could not get CS revision info!");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    adjust_resources();</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// int main(int argc, char *argv[])</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int optch, errflg;</div><div class='del'>-//mdk-stage1//     int i, max_fd, ret, event, pass;</div><div class='del'>-//mdk-stage1//     int delay_fork = 0;</div><div class='del'>-//mdk-stage1//     struct timeval tv;</div><div class='del'>-//mdk-stage1//     fd_set fds;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     if (access("/var/lib/pcmcia", R_OK) == 0) {</div><div class='del'>-//mdk-stage1// 	stabfile = "/var/lib/pcmcia/stab";</div><div class='del'>-//mdk-stage1//     } else {</div><div class='del'>-//mdk-stage1// 	stabfile = "/var/run/stab";</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     errflg = 0;</div><div class='del'>-//mdk-stage1//     while ((optch = getopt(argc, argv, "Vqdvofc:m:p:s:")) != -1) {</div><div class='del'>-//mdk-stage1// 	switch (optch) {</div><div class='del'>-//mdk-stage1// 	case 'V':</div><div class='del'>-//mdk-stage1// 	    fprintf(stderr, "cardmgr version " CS_RELEASE "\n");</div><div class='del'>-//mdk-stage1// 	    return 0;</div><div class='del'>-//mdk-stage1// 	    break;</div><div class='del'>-//mdk-stage1// 	case 'q':</div><div class='del'>-//mdk-stage1// 	    be_quiet = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'v':</div><div class='del'>-//mdk-stage1// 	    verbose = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'o':</div><div class='del'>-//mdk-stage1// 	    one_pass = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'f':</div><div class='del'>-//mdk-stage1// 	    delay_fork = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'c':</div><div class='del'>-//mdk-stage1// 	    configpath = strdup(optarg); break;</div><div class='del'>-//mdk-stage1// #ifdef __linux__</div><div class='del'>-//mdk-stage1// 	case 'd':</div><div class='del'>-//mdk-stage1// 	    do_modprobe = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'm':</div><div class='del'>-//mdk-stage1// 	    modpath = strdup(optarg); break;</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1// 	case 'p':</div><div class='del'>-//mdk-stage1// 	    pidfile = strdup(optarg); break;</div><div class='del'>-//mdk-stage1// 	case 's':</div><div class='del'>-//mdk-stage1// 	    stabfile = strdup(optarg); break;</div><div class='del'>-//mdk-stage1// 	default:</div><div class='del'>-//mdk-stage1// 	    errflg = 1; break;</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     if (errflg || (optind &lt; argc)) {</div><div class='del'>-//mdk-stage1// 	fprintf(stderr, "usage: %s [-V] [-q] [-v] [-d] [-o] [-f] "</div><div class='del'>-//mdk-stage1// 		"[-c configpath] [-m modpath]\n               "</div><div class='del'>-//mdk-stage1// 		"[-p pidfile] [-s stabfile]\n", argv[0]);</div><div class='del'>-//mdk-stage1// 	exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef DEBUG</div><div class='del'>-//mdk-stage1//     openlog("cardmgr", LOG_PID|LOG_PERROR, LOG_DAEMON);</div><div class='del'>-//mdk-stage1// #else</div><div class='del'>-//mdk-stage1//     openlog("cardmgr", LOG_PID|LOG_CONS, LOG_DAEMON);</div><div class='del'>-//mdk-stage1//     close(0); close(1); close(2);</div><div class='del'>-//mdk-stage1//     if (!delay_fork &amp;&amp; !one_pass)</div><div class='del'>-//mdk-stage1// 	fork_now();</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     syslog(LOG_INFO, "starting, version is " CS_RELEASE);</div><div class='del'>-//mdk-stage1//     atexit(&amp;done);</div><div class='del'>-//mdk-stage1//     putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin");</div><div class='del'>-//mdk-stage1//     if (verbose)</div><div class='del'>-//mdk-stage1// 	putenv("VERBOSE=1");</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef __linux__</div><div class='del'>-//mdk-stage1//     if (modpath == NULL) {</div><div class='del'>-//mdk-stage1// 	if (access("/lib/modules/preferred", X_OK) == 0)</div><div class='del'>-//mdk-stage1// 	    modpath = "/lib/modules/preferred";</div><div class='del'>-//mdk-stage1// 	else {</div><div class='del'>-//mdk-stage1// 	    struct utsname utsname;</div><div class='del'>-//mdk-stage1// 	    if (uname(&amp;utsname) != 0) {</div><div class='del'>-//mdk-stage1// 		syslog(LOG_ERR, "uname(): %m");</div><div class='del'>-//mdk-stage1// 		exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	    modpath = (char *)malloc(strlen(utsname.release)+14);</div><div class='del'>-//mdk-stage1// 	    sprintf(modpath, "/lib/modules/%s", utsname.release);</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     if (access(modpath, X_OK) != 0)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_INFO, "cannot access %s: %m", modpath);</div><div class='del'>-//mdk-stage1//     /* We default to using modprobe if it is available */</div><div class='del'>-//mdk-stage1//     do_modprobe |= (access("/sbin/modprobe", X_OK) == 0);</div><div class='del'>-//mdk-stage1// #endif /* __linux__ */</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     load_config();</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     if (init_sockets() != 0)</div><div class='del'>-//mdk-stage1// 	exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* If we've gotten this far, then clean up pid and stab at exit */</div><div class='del'>-//mdk-stage1//     write_pid();</div><div class='del'>-//mdk-stage1//     write_stab();</div><div class='del'>-//mdk-stage1//     cleanup_files = 1;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     if (signal(SIGHUP, catch_signal) == SIG_ERR)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "signal(SIGHUP): %m");</div><div class='del'>-//mdk-stage1//     if (signal(SIGTERM, catch_signal) == SIG_ERR)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "signal(SIGTERM): %m");</div><div class='del'>-//mdk-stage1//     if (signal(SIGINT, catch_signal) == SIG_ERR)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "signal(SIGINT): %m");</div><div class='del'>-//mdk-stage1// #ifdef SIGPWR</div><div class='del'>-//mdk-stage1//     if (signal(SIGPWR, catch_signal) == SIG_ERR)</div><div class='del'>-//mdk-stage1// 	syslog(LOG_ERR, "signal(SIGPWR): %m");</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     for (i = max_fd = 0; i &lt; sockets; i++)</div><div class='del'>-//mdk-stage1// 	max_fd = (socket[i].fd &gt; max_fd) ? socket[i].fd : max_fd;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* First select() call: poll, don't wait */</div><div class='del'>-//mdk-stage1//     tv.tv_sec = tv.tv_usec = 0;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1//     /* Wait for sockets in setup-pending state to settle */</div><div class='del'>-//mdk-stage1//     if (one_pass || delay_fork)</div><div class='del'>-//mdk-stage1// 	wait_for_pending();</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     for (pass = 0; ; pass++) {</div><div class='del'>-//mdk-stage1// 	FD_ZERO(&amp;fds);</div><div class='del'>-//mdk-stage1// 	for (i = 0; i &lt; sockets; i++)</div><div class='del'>-//mdk-stage1// 	    FD_SET(socket[i].fd, &amp;fds);</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	while ((ret = select(max_fd+1, &amp;fds, NULL, NULL,</div><div class='del'>-//mdk-stage1// 			     ((pass == 0) ? &amp;tv : NULL))) &lt; 0) {</div><div class='del'>-//mdk-stage1// 	    if (errno == EINTR) {</div><div class='del'>-//mdk-stage1// 		handle_signal();</div><div class='del'>-//mdk-stage1// 	    } else {</div><div class='del'>-//mdk-stage1// 		syslog(LOG_ERR, "select(): %m");</div><div class='del'>-//mdk-stage1// 		exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	for (i = 0; i &lt; sockets; i++) {</div><div class='del'>-//mdk-stage1// 	    if (!FD_ISSET(socket[i].fd, &amp;fds))</div><div class='del'>-//mdk-stage1// 		continue;</div><div class='del'>-//mdk-stage1// 	    ret = read(socket[i].fd, &amp;event, 4);</div><div class='del'>-//mdk-stage1// 	    if ((ret == -1) &amp;&amp; (errno != EAGAIN))</div><div class='del'>-//mdk-stage1// 		syslog(LOG_INFO, "read(%d): %m\n", i);</div><div class='del'>-//mdk-stage1// 	    if (ret != 4)</div><div class='del'>-//mdk-stage1// 		continue;</div><div class='del'>-//mdk-stage1// 	    </div><div class='del'>-//mdk-stage1// 	    switch (event) {</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_CARD_REMOVAL:</div><div class='del'>-//mdk-stage1// 		socket[i].state = 0;</div><div class='del'>-//mdk-stage1// 		do_remove(i);</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_EJECTION_REQUEST:</div><div class='del'>-//mdk-stage1// 		ret = do_check(i);</div><div class='del'>-//mdk-stage1// 		if (ret == 0) {</div><div class='del'>-//mdk-stage1// 		    socket[i].state = 0;</div><div class='del'>-//mdk-stage1// 		    do_remove(i);</div><div class='del'>-//mdk-stage1// 		}</div><div class='del'>-//mdk-stage1// 		write(socket[i].fd, &amp;ret, 4);</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_CARD_INSERTION:</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_INSERTION_REQUEST:</div><div class='del'>-//mdk-stage1// 		socket[i].state |= SOCKET_PRESENT;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_CARD_RESET:</div><div class='del'>-//mdk-stage1// 		socket[i].state |= SOCKET_READY;</div><div class='del'>-//mdk-stage1// 		do_insert(i);</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_RESET_PHYSICAL:</div><div class='del'>-//mdk-stage1// 		socket[i].state &amp;= ~SOCKET_READY;</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_PM_SUSPEND:</div><div class='del'>-//mdk-stage1// 		do_suspend(i);</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    case CS_EVENT_PM_RESUME:</div><div class='del'>-//mdk-stage1// 		do_resume(i);</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	    </div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	if (one_pass)</div><div class='del'>-//mdk-stage1// 	    exit(EXIT_SUCCESS);</div><div class='del'>-//mdk-stage1// 	if (delay_fork) {</div><div class='del'>-//mdk-stage1// 	    fork_now();</div><div class='del'>-//mdk-stage1// 	    write_pid();</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// 	</div><div class='del'>-//mdk-stage1//     } /* repeat */</div><div class='del'>-//mdk-stage1//     return 0;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void cardmgr_fail(void)</div><div class='del'>-{</div><div class='del'>-	log_message("CM: cardmgr: failed");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int cardmgr_call(void)</div><div class='del'>-{</div><div class='del'>-	int i, max_fd, ret, event;</div><div class='del'>-	struct timeval tv;</div><div class='del'>-	fd_set fds;</div><div class='del'>-	</div><div class='del'>-	stabfile = "/var/run/stab";</div><div class='del'>-	</div><div class='del'>-	log_message("CM: cardmgr/hacked starting, version is " CS_RELEASE);</div><div class='del'>-	</div><div class='del'>-	if (load_config()) {</div><div class='del'>-		cardmgr_fail();</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (init_sockets()) {</div><div class='del'>-		cardmgr_fail();</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	/* If we've gotten this far, then clean up pid and stab at exit */</div><div class='del'>-	write_stab();</div><div class='del'>-    </div><div class='del'>-	for (i = max_fd = 0; i &lt; sockets; i++)</div><div class='del'>-		max_fd = (socket[i].fd &gt; max_fd) ? socket[i].fd : max_fd;</div><div class='del'>-</div><div class='del'>-	/* First select() call: poll, don't wait */</div><div class='del'>-	tv.tv_sec = tv.tv_usec = 0;</div><div class='del'>-</div><div class='del'>-	/* Wait for sockets in setup-pending state to settle */</div><div class='del'>-	wait_for_pending();</div><div class='del'>-    </div><div class='del'>-</div><div class='del'>-	FD_ZERO(&amp;fds);</div><div class='del'>-	for (i = 0; i &lt; sockets; i++)</div><div class='del'>-		FD_SET(socket[i].fd, &amp;fds);</div><div class='del'>-</div><div class='del'>-	if (select(max_fd+1, &amp;fds, NULL, NULL, &amp;tv) &lt; 0) {</div><div class='del'>-		log_perror("CM: select fails");</div><div class='del'>-		return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; sockets; i++) {</div><div class='del'>-		if (!FD_ISSET(socket[i].fd, &amp;fds))</div><div class='del'>-			continue;</div><div class='del'>-		ret = read(socket[i].fd, &amp;event, 4);</div><div class='del'>-		if ((ret == -1) &amp;&amp; (errno != EAGAIN))</div><div class='del'>-			log_message("CM: read(%d): %m", i);</div><div class='del'>-		if (ret != 4)</div><div class='del'>-			continue;</div><div class='del'>-	    </div><div class='del'>-		switch (event) {</div><div class='del'>-		case CS_EVENT_CARD_INSERTION:</div><div class='del'>-		case CS_EVENT_INSERTION_REQUEST:</div><div class='del'>-			socket[i].state |= SOCKET_PRESENT;</div><div class='del'>-		case CS_EVENT_CARD_RESET:</div><div class='del'>-			socket[i].state |= SOCKET_READY;</div><div class='del'>-			do_insert(i);</div><div class='del'>-			break;</div><div class='del'>-		case CS_EVENT_RESET_PHYSICAL:</div><div class='del'>-			socket[i].state &amp;= ~SOCKET_READY;</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	    </div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-	</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cardmgr.h b/mdk-stage1/pcmcia_/cardmgr.h<br/>deleted file mode 100644<br/>index 1d002e972..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cardmgr.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cardmgr.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,112 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cardmgr.h 1.37 2001/08/24 12:19:20</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define MAX_SOCKS	8</div><div class='del'>-#define MAX_BINDINGS	4</div><div class='del'>-#define MAX_MODULES	4</div><div class='del'>-</div><div class='del'>-typedef struct adjust_list_t {</div><div class='del'>-    adjust_t		adj;</div><div class='del'>-    struct adjust_list_t *next;</div><div class='del'>-} adjust_list_t;</div><div class='del'>-</div><div class='del'>-typedef struct func_ident_t {</div><div class='del'>-    u_char		funcid;</div><div class='del'>-} func_ident_t;</div><div class='del'>-</div><div class='del'>-typedef struct manfid_ident_t {</div><div class='del'>-    u_short		manf;</div><div class='del'>-    u_short		card;</div><div class='del'>-} manfid_ident_t;</div><div class='del'>-</div><div class='del'>-typedef struct vers_ident_t {</div><div class='del'>-    int			ns;</div><div class='del'>-    char		*pi[4];</div><div class='del'>-} vers_ident_t;</div><div class='del'>-</div><div class='del'>-typedef struct tuple_ident_t {</div><div class='del'>-    cisdata_t		code;</div><div class='del'>-    long		ofs;</div><div class='del'>-    char		*info;</div><div class='del'>-} tuple_ident_t;</div><div class='del'>-</div><div class='del'>-typedef struct device_info_t {</div><div class='del'>-    dev_info_t		dev_info;</div><div class='del'>-    int			needs_mtd;</div><div class='del'>-    int			modules;</div><div class='del'>-    char		*module[MAX_MODULES];</div><div class='del'>-    char		*opts[MAX_MODULES];</div><div class='del'>-    char		*class;</div><div class='del'>-    int			refs;</div><div class='del'>-    struct device_info_t *next;</div><div class='del'>-} device_info_t;</div><div class='del'>-</div><div class='del'>-#define VERS_1_IDENT	0x0001</div><div class='del'>-#define MANFID_IDENT	0x0002</div><div class='del'>-#define TUPLE_IDENT	0x0010</div><div class='del'>-#define FUNC_IDENT	0x0020</div><div class='del'>-#define BLANK_IDENT	0x0040</div><div class='del'>-#define PCI_IDENT	0x0080</div><div class='del'>-#define EXCL_IDENT	0x00f0</div><div class='del'>-</div><div class='del'>-typedef struct card_info_t {</div><div class='del'>-    char		*name;</div><div class='del'>-    int			ident_type;</div><div class='del'>-    union {</div><div class='del'>-	vers_ident_t	vers;</div><div class='del'>-	tuple_ident_t	tuple;</div><div class='del'>-	func_ident_t	func;</div><div class='del'>-    } id;</div><div class='del'>-    manfid_ident_t	manfid;</div><div class='del'>-    int			bindings;</div><div class='del'>-    device_info_t	*device[MAX_BINDINGS];</div><div class='del'>-    int			dev_fn[MAX_BINDINGS];</div><div class='del'>-    char		*cis_file;</div><div class='del'>-    int			refs;</div><div class='del'>-    struct card_info_t	*next;</div><div class='del'>-} card_info_t;</div><div class='del'>-</div><div class='del'>-typedef struct mtd_ident_t {</div><div class='del'>-    char		*name;</div><div class='del'>-    enum {</div><div class='del'>-	JEDEC_MTD=1, DTYPE_MTD, DEFAULT_MTD</div><div class='del'>-    } mtd_type;</div><div class='del'>-    int			dtype, jedec_mfr, jedec_info;</div><div class='del'>-    char		*module, *opts;</div><div class='del'>-    int			refs;</div><div class='del'>-    struct mtd_ident_t	*next;</div><div class='del'>-} mtd_ident_t;</div><div class='del'>-    </div><div class='del'>-extern adjust_list_t	*root_adjust;</div><div class='del'>-extern device_info_t	*root_device;</div><div class='del'>-extern card_info_t	*blank_card;</div><div class='del'>-extern card_info_t	*root_card, *root_func;</div><div class='del'>-extern mtd_ident_t	*root_mtd, *default_mtd;</div><div class='del'>-</div><div class='del'>-int parse_configfile(char *fn);</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cirrus.h b/mdk-stage1/pcmcia_/cirrus.h<br/>deleted file mode 100644<br/>index 49d7fa2de..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cirrus.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cirrus.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,182 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cirrus.h 1.10 2001/08/24 12:15:33</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_CIRRUS_H</div><div class='del'>-#define _LINUX_CIRRUS_H</div><div class='del'>-</div><div class='del'>-#ifndef PCI_VENDOR_ID_CIRRUS</div><div class='del'>-#define PCI_VENDOR_ID_CIRRUS		0x1013</div><div class='del'>-#endif</div><div class='del'>-#ifndef PCI_DEVICE_ID_CIRRUS_6729</div><div class='del'>-#define PCI_DEVICE_ID_CIRRUS_6729	0x1100</div><div class='del'>-#endif</div><div class='del'>-#ifndef PCI_DEVICE_ID_CIRRUS_6832</div><div class='del'>-#define PCI_DEVICE_ID_CIRRUS_6832	0x1110</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define PD67_MISC_CTL_1		0x16	/* Misc control 1 */</div><div class='del'>-#define PD67_FIFO_CTL		0x17	/* FIFO control */</div><div class='del'>-#define PD67_MISC_CTL_2		0x1E	/* Misc control 2 */</div><div class='del'>-#define PD67_CHIP_INFO		0x1f	/* Chip information */</div><div class='del'>-#define PD67_ATA_CTL		0x026	/* 6730: ATA control */</div><div class='del'>-#define PD67_EXT_INDEX		0x2e	/* Extension index */</div><div class='del'>-#define PD67_EXT_DATA		0x2f	/* Extension data */</div><div class='del'>-</div><div class='del'>-#define pd67_ext_get(s, r) \</div><div class='del'>-    (i365_set(s, PD67_EXT_INDEX, r), i365_get(s, PD67_EXT_DATA))</div><div class='del'>-#define pd67_ext_set(s, r, v) \</div><div class='del'>-    (i365_set(s, PD67_EXT_INDEX, r), i365_set(s, PD67_EXT_DATA, v))</div><div class='del'>-</div><div class='del'>-/* PD6722 extension registers -- indexed in PD67_EXT_INDEX */</div><div class='del'>-#define PD67_DATA_MASK0		0x01	/* Data mask 0 */</div><div class='del'>-#define PD67_DATA_MASK1		0x02	/* Data mask 1 */</div><div class='del'>-#define PD67_DMA_CTL		0x03	/* DMA control */</div><div class='del'>-</div><div class='del'>-/* PD6730 extension registers -- indexed in PD67_EXT_INDEX */</div><div class='del'>-#define PD67_EXT_CTL_1		0x03	/* Extension control 1 */</div><div class='del'>-#define PD67_MEM_PAGE(n)	((n)+5)	/* PCI window bits 31:24 */</div><div class='del'>-#define PD67_EXTERN_DATA	0x0a</div><div class='del'>-#define PD67_MISC_CTL_3		0x25</div><div class='del'>-#define PD67_SMB_PWR_CTL	0x26</div><div class='del'>-</div><div class='del'>-/* I/O window address offset */</div><div class='del'>-#define PD67_IO_OFF(w)		(0x36+((w)&lt;&lt;1))</div><div class='del'>-</div><div class='del'>-/* Timing register sets */</div><div class='del'>-#define PD67_TIME_SETUP(n)	(0x3a + 3*(n))</div><div class='del'>-#define PD67_TIME_CMD(n)	(0x3b + 3*(n))</div><div class='del'>-#define PD67_TIME_RECOV(n)	(0x3c + 3*(n))</div><div class='del'>-</div><div class='del'>-/* Flags for PD67_MISC_CTL_1 */</div><div class='del'>-#define PD67_MC1_5V_DET		0x01	/* 5v detect */</div><div class='del'>-#define PD67_MC1_MEDIA_ENA	0x01	/* 6730: Multimedia enable */</div><div class='del'>-#define PD67_MC1_VCC_3V		0x02	/* 3.3v Vcc */</div><div class='del'>-#define PD67_MC1_PULSE_MGMT	0x04</div><div class='del'>-#define PD67_MC1_PULSE_IRQ	0x08</div><div class='del'>-#define PD67_MC1_SPKR_ENA	0x10</div><div class='del'>-#define PD67_MC1_INPACK_ENA	0x80</div><div class='del'>-</div><div class='del'>-/* Flags for PD67_FIFO_CTL */</div><div class='del'>-#define PD67_FIFO_EMPTY		0x80</div><div class='del'>-</div><div class='del'>-/* Flags for PD67_MISC_CTL_2 */</div><div class='del'>-#define PD67_MC2_FREQ_BYPASS	0x01</div><div class='del'>-#define PD67_MC2_DYNAMIC_MODE	0x02</div><div class='del'>-#define PD67_MC2_SUSPEND	0x04</div><div class='del'>-#define PD67_MC2_5V_CORE	0x08</div><div class='del'>-#define PD67_MC2_LED_ENA	0x10	/* IRQ 12 is LED enable */</div><div class='del'>-#define PD67_MC2_FAST_PCI	0x10	/* 6729: PCI bus &gt; 25 MHz */</div><div class='del'>-#define PD67_MC2_3STATE_BIT7	0x20	/* Floppy change bit */</div><div class='del'>-#define PD67_MC2_DMA_MODE	0x40</div><div class='del'>-#define PD67_MC2_IRQ15_RI	0x80	/* IRQ 15 is ring enable */</div><div class='del'>-</div><div class='del'>-/* Flags for PD67_CHIP_INFO */</div><div class='del'>-#define PD67_INFO_SLOTS		0x20	/* 0 = 1 slot, 1 = 2 slots */</div><div class='del'>-#define PD67_INFO_CHIP_ID	0xc0</div><div class='del'>-#define PD67_INFO_REV		0x1c</div><div class='del'>-</div><div class='del'>-/* Fields in PD67_TIME_* registers */</div><div class='del'>-#define PD67_TIME_SCALE		0xc0</div><div class='del'>-#define PD67_TIME_SCALE_1	0x00</div><div class='del'>-#define PD67_TIME_SCALE_16	0x40</div><div class='del'>-#define PD67_TIME_SCALE_256	0x80</div><div class='del'>-#define PD67_TIME_SCALE_4096	0xc0</div><div class='del'>-#define PD67_TIME_MULT		0x3f</div><div class='del'>-</div><div class='del'>-/* Fields in PD67_DMA_CTL */</div><div class='del'>-#define PD67_DMA_MODE		0xc0</div><div class='del'>-#define PD67_DMA_OFF		0x00</div><div class='del'>-#define PD67_DMA_DREQ_INPACK	0x40</div><div class='del'>-#define PD67_DMA_DREQ_WP	0x80</div><div class='del'>-#define PD67_DMA_DREQ_BVD2	0xc0</div><div class='del'>-#define PD67_DMA_PULLUP		0x20	/* Disable socket pullups? */</div><div class='del'>-</div><div class='del'>-/* Fields in PD67_EXT_CTL_1 */</div><div class='del'>-#define PD67_EC1_VCC_PWR_LOCK	0x01</div><div class='del'>-#define PD67_EC1_AUTO_PWR_CLEAR	0x02</div><div class='del'>-#define PD67_EC1_LED_ENA	0x04</div><div class='del'>-#define PD67_EC1_INV_CARD_IRQ	0x08</div><div class='del'>-#define PD67_EC1_INV_MGMT_IRQ	0x10</div><div class='del'>-#define PD67_EC1_PULLUP_CTL	0x20</div><div class='del'>-</div><div class='del'>-/* Fields in PD67_EXTERN_DATA */</div><div class='del'>-#define PD67_EXD_VS1(s)		(0x01 &lt;&lt; ((s)&lt;&lt;1))</div><div class='del'>-#define PD67_EXD_VS2(s)		(0x02 &lt;&lt; ((s)&lt;&lt;1))</div><div class='del'>-</div><div class='del'>-/* Fields in PD67_MISC_CTL_3 */</div><div class='del'>-#define PD67_MC3_IRQ_MASK	0x03</div><div class='del'>-#define PD67_MC3_IRQ_PCPCI	0x00</div><div class='del'>-#define PD67_MC3_IRQ_EXTERN	0x01</div><div class='del'>-#define PD67_MC3_IRQ_PCIWAY	0x02</div><div class='del'>-#define PD67_MC3_IRQ_PCI	0x03</div><div class='del'>-#define PD67_MC3_PWR_MASK	0x0c</div><div class='del'>-#define PD67_MC3_PWR_SERIAL	0x00</div><div class='del'>-#define PD67_MC3_PWR_TI2202	0x08</div><div class='del'>-#define PD67_MC3_PWR_SMB	0x0c</div><div class='del'>-</div><div class='del'>-/* Register definitions for Cirrus PD6832 PCI-to-CardBus bridge */</div><div class='del'>-</div><div class='del'>-/* PD6832 extension registers -- indexed in PD67_EXT_INDEX */</div><div class='del'>-#define PD68_EXT_CTL_2			0x0b</div><div class='del'>-#define PD68_PCI_SPACE			0x22</div><div class='del'>-#define PD68_PCCARD_SPACE		0x23</div><div class='del'>-#define PD68_WINDOW_TYPE		0x24</div><div class='del'>-#define PD68_EXT_CSC			0x2e</div><div class='del'>-#define PD68_MISC_CTL_4			0x2f</div><div class='del'>-#define PD68_MISC_CTL_5			0x30</div><div class='del'>-#define PD68_MISC_CTL_6			0x31</div><div class='del'>-</div><div class='del'>-/* Extra flags in PD67_MISC_CTL_3 */</div><div class='del'>-#define PD68_MC3_HW_SUSP		0x10</div><div class='del'>-#define PD68_MC3_MM_EXPAND		0x40</div><div class='del'>-#define PD68_MC3_MM_ARM			0x80</div><div class='del'>-</div><div class='del'>-/* Bridge Control Register */</div><div class='del'>-#define  PD6832_BCR_MGMT_IRQ_ENA	0x0800</div><div class='del'>-</div><div class='del'>-/* Socket Number Register */</div><div class='del'>-#define PD6832_SOCKET_NUMBER		0x004c	/* 8 bit */</div><div class='del'>-</div><div class='del'>-/* Data structure for tracking vendor-specific state */</div><div class='del'>-typedef struct cirrus_state_t {</div><div class='del'>-    u_char		misc1;		/* PD67_MISC_CTL_1 */</div><div class='del'>-    u_char		misc2;		/* PD67_MISC_CTL_2 */</div><div class='del'>-    u_char		ectl1;		/* PD67_EXT_CTL_1 */</div><div class='del'>-    u_char		timer[6];	/* PD67_TIME_* */</div><div class='del'>-} cirrus_state_t;</div><div class='del'>-</div><div class='del'>-#define CIRRUS_PCIC_ID \</div><div class='del'>-    IS_PD6729, IS_PD6730, IS_PD6832</div><div class='del'>-</div><div class='del'>-#define CIRRUS_PCIC_INFO \</div><div class='del'>-    { "Cirrus PD6729", IS_CIRRUS|IS_PCI, ID(CIRRUS, 6729) },		\</div><div class='del'>-    { "Cirrus PD6730", IS_CIRRUS|IS_PCI, PCI_VENDOR_ID_CIRRUS, -1 },	\</div><div class='del'>-    { "Cirrus PD6832", IS_CIRRUS|IS_CARDBUS, ID(CIRRUS, 6832) }</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_CIRRUS_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cistpl.h b/mdk-stage1/pcmcia_/cistpl.h<br/>deleted file mode 100644<br/>index 1d4cac20e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cistpl.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cistpl.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,604 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cistpl.h 1.35 2001/08/24 12:16:12</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_CISTPL_H</div><div class='del'>-#define _LINUX_CISTPL_H</div><div class='del'>-</div><div class='del'>-#define CISTPL_NULL		0x00</div><div class='del'>-#define CISTPL_DEVICE		0x01</div><div class='del'>-#define CISTPL_LONGLINK_CB	0x02</div><div class='del'>-#define CISTPL_INDIRECT		0x03</div><div class='del'>-#define CISTPL_CONFIG_CB	0x04</div><div class='del'>-#define CISTPL_CFTABLE_ENTRY_CB	0x05</div><div class='del'>-#define CISTPL_LONGLINK_MFC	0x06</div><div class='del'>-#define CISTPL_BAR		0x07</div><div class='del'>-#define CISTPL_PWR_MGMNT	0x08</div><div class='del'>-#define CISTPL_EXTDEVICE	0x09</div><div class='del'>-#define CISTPL_CHECKSUM		0x10</div><div class='del'>-#define CISTPL_LONGLINK_A	0x11</div><div class='del'>-#define CISTPL_LONGLINK_C	0x12</div><div class='del'>-#define CISTPL_LINKTARGET	0x13</div><div class='del'>-#define CISTPL_NO_LINK		0x14</div><div class='del'>-#define CISTPL_VERS_1		0x15</div><div class='del'>-#define CISTPL_ALTSTR		0x16</div><div class='del'>-#define CISTPL_DEVICE_A		0x17</div><div class='del'>-#define CISTPL_JEDEC_C		0x18</div><div class='del'>-#define CISTPL_JEDEC_A		0x19</div><div class='del'>-#define CISTPL_CONFIG		0x1a</div><div class='del'>-#define CISTPL_CFTABLE_ENTRY	0x1b</div><div class='del'>-#define CISTPL_DEVICE_OC	0x1c</div><div class='del'>-#define CISTPL_DEVICE_OA	0x1d</div><div class='del'>-#define CISTPL_DEVICE_GEO	0x1e</div><div class='del'>-#define CISTPL_DEVICE_GEO_A	0x1f</div><div class='del'>-#define CISTPL_MANFID		0x20</div><div class='del'>-#define CISTPL_FUNCID		0x21</div><div class='del'>-#define CISTPL_FUNCE		0x22</div><div class='del'>-#define CISTPL_SWIL		0x23</div><div class='del'>-#define CISTPL_END		0xff</div><div class='del'>-/* Layer 2 tuples */</div><div class='del'>-#define CISTPL_VERS_2		0x40</div><div class='del'>-#define CISTPL_FORMAT		0x41</div><div class='del'>-#define CISTPL_GEOMETRY		0x42</div><div class='del'>-#define CISTPL_BYTEORDER	0x43</div><div class='del'>-#define CISTPL_DATE		0x44</div><div class='del'>-#define CISTPL_BATTERY		0x45</div><div class='del'>-#define CISTPL_FORMAT_A		0x47</div><div class='del'>-/* Layer 3 tuples */</div><div class='del'>-#define CISTPL_ORG		0x46</div><div class='del'>-#define CISTPL_SPCL		0x90</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_longlink_t {</div><div class='del'>-    u_int	addr;</div><div class='del'>-} cistpl_longlink_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_checksum_t {</div><div class='del'>-    u_short	addr;</div><div class='del'>-    u_short	len;</div><div class='del'>-    u_char	sum;</div><div class='del'>-} cistpl_checksum_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_MAX_FUNCTIONS	8</div><div class='del'>-#define CISTPL_MFC_ATTR		0x00</div><div class='del'>-#define CISTPL_MFC_COMMON	0x01</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_longlink_mfc_t {</div><div class='del'>-    u_char	nfn;</div><div class='del'>-    struct {</div><div class='del'>-	u_char	space;</div><div class='del'>-	u_int	addr;</div><div class='del'>-    } fn[CISTPL_MAX_FUNCTIONS];</div><div class='del'>-} cistpl_longlink_mfc_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_MAX_ALTSTR_STRINGS	4</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_altstr_t {</div><div class='del'>-    u_char	ns;</div><div class='del'>-    u_char	ofs[CISTPL_MAX_ALTSTR_STRINGS];</div><div class='del'>-    char	str[254];</div><div class='del'>-} cistpl_altstr_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_DTYPE_NULL	0x00</div><div class='del'>-#define CISTPL_DTYPE_ROM	0x01</div><div class='del'>-#define CISTPL_DTYPE_OTPROM	0x02</div><div class='del'>-#define CISTPL_DTYPE_EPROM	0x03</div><div class='del'>-#define CISTPL_DTYPE_EEPROM	0x04</div><div class='del'>-#define CISTPL_DTYPE_FLASH	0x05</div><div class='del'>-#define CISTPL_DTYPE_SRAM	0x06</div><div class='del'>-#define CISTPL_DTYPE_DRAM	0x07</div><div class='del'>-#define CISTPL_DTYPE_FUNCSPEC	0x0d</div><div class='del'>-#define CISTPL_DTYPE_EXTEND	0x0e</div><div class='del'>-</div><div class='del'>-#define CISTPL_MAX_DEVICES	4</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_device_t {</div><div class='del'>-    u_char	ndev;</div><div class='del'>-    struct {</div><div class='del'>-	u_char 	type;</div><div class='del'>-	u_char	wp;</div><div class='del'>-	u_int	speed;</div><div class='del'>-	u_int	size;</div><div class='del'>-    } dev[CISTPL_MAX_DEVICES];</div><div class='del'>-} cistpl_device_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_DEVICE_MWAIT	0x01</div><div class='del'>-#define CISTPL_DEVICE_3VCC	0x02</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_device_o_t {</div><div class='del'>-    u_char		flags;</div><div class='del'>-    cistpl_device_t	device;</div><div class='del'>-} cistpl_device_o_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_VERS_1_MAX_PROD_STRINGS	4</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_vers_1_t {</div><div class='del'>-    u_char	major;</div><div class='del'>-    u_char	minor;</div><div class='del'>-    u_char	ns;</div><div class='del'>-    u_char	ofs[CISTPL_VERS_1_MAX_PROD_STRINGS];</div><div class='del'>-    char	str[254];</div><div class='del'>-} cistpl_vers_1_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_jedec_t {</div><div class='del'>-    u_char	nid;</div><div class='del'>-    struct {</div><div class='del'>-	u_char	mfr;</div><div class='del'>-	u_char	info;</div><div class='del'>-    } id[CISTPL_MAX_DEVICES];</div><div class='del'>-} cistpl_jedec_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_manfid_t {</div><div class='del'>-    u_short	manf;</div><div class='del'>-    u_short	card;</div><div class='del'>-} cistpl_manfid_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_FUNCID_MULTI	0x00</div><div class='del'>-#define CISTPL_FUNCID_MEMORY	0x01</div><div class='del'>-#define CISTPL_FUNCID_SERIAL	0x02</div><div class='del'>-#define CISTPL_FUNCID_PARALLEL	0x03</div><div class='del'>-#define CISTPL_FUNCID_FIXED	0x04</div><div class='del'>-#define CISTPL_FUNCID_VIDEO	0x05</div><div class='del'>-#define CISTPL_FUNCID_NETWORK	0x06</div><div class='del'>-#define CISTPL_FUNCID_AIMS	0x07</div><div class='del'>-#define CISTPL_FUNCID_SCSI	0x08</div><div class='del'>-</div><div class='del'>-#define CISTPL_SYSINIT_POST	0x01</div><div class='del'>-#define CISTPL_SYSINIT_ROM	0x02</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_funcid_t {</div><div class='del'>-    u_char	func;</div><div class='del'>-    u_char	sysinit;</div><div class='del'>-} cistpl_funcid_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_funce_t {</div><div class='del'>-    u_char	type;</div><div class='del'>-    u_char	data[0];</div><div class='del'>-} cistpl_funce_t;</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    Modem Function Extension Tuples</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_IF		0x00</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_CAP		0x01</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_SERV_DATA	0x02</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_SERV_FAX	0x03</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_SERV_VOICE	0x04</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_CAP_DATA	0x05</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_CAP_FAX	0x06</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_CAP_VOICE	0x07</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_IF_DATA	0x08</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_IF_FAX	0x09</div><div class='del'>-#define CISTPL_FUNCE_SERIAL_IF_VOICE	0x0a</div><div class='del'>-</div><div class='del'>-/* UART identification */</div><div class='del'>-#define CISTPL_SERIAL_UART_8250		0x00</div><div class='del'>-#define CISTPL_SERIAL_UART_16450	0x01</div><div class='del'>-#define CISTPL_SERIAL_UART_16550	0x02</div><div class='del'>-#define CISTPL_SERIAL_UART_8251		0x03</div><div class='del'>-#define CISTPL_SERIAL_UART_8530		0x04</div><div class='del'>-#define CISTPL_SERIAL_UART_85230	0x05</div><div class='del'>-</div><div class='del'>-/* UART capabilities */</div><div class='del'>-#define CISTPL_SERIAL_UART_SPACE	0x01</div><div class='del'>-#define CISTPL_SERIAL_UART_MARK		0x02</div><div class='del'>-#define CISTPL_SERIAL_UART_ODD		0x04</div><div class='del'>-#define CISTPL_SERIAL_UART_EVEN		0x08</div><div class='del'>-#define CISTPL_SERIAL_UART_5BIT		0x01</div><div class='del'>-#define CISTPL_SERIAL_UART_6BIT		0x02</div><div class='del'>-#define CISTPL_SERIAL_UART_7BIT		0x04</div><div class='del'>-#define CISTPL_SERIAL_UART_8BIT		0x08</div><div class='del'>-#define CISTPL_SERIAL_UART_1STOP	0x10</div><div class='del'>-#define CISTPL_SERIAL_UART_MSTOP	0x20</div><div class='del'>-#define CISTPL_SERIAL_UART_2STOP	0x40</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_serial_t {</div><div class='del'>-    u_char	uart_type;</div><div class='del'>-    u_char	uart_cap_0;</div><div class='del'>-    u_char	uart_cap_1;</div><div class='del'>-} cistpl_serial_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_modem_cap_t {</div><div class='del'>-    u_char	flow;</div><div class='del'>-    u_char	cmd_buf;</div><div class='del'>-    u_char	rcv_buf_0, rcv_buf_1, rcv_buf_2;</div><div class='del'>-    u_char	xmit_buf_0, xmit_buf_1, xmit_buf_2;</div><div class='del'>-} cistpl_modem_cap_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_SERIAL_MOD_103		0x01</div><div class='del'>-#define CISTPL_SERIAL_MOD_V21		0x02</div><div class='del'>-#define CISTPL_SERIAL_MOD_V23		0x04</div><div class='del'>-#define CISTPL_SERIAL_MOD_V22		0x08</div><div class='del'>-#define CISTPL_SERIAL_MOD_212A		0x10</div><div class='del'>-#define CISTPL_SERIAL_MOD_V22BIS	0x20</div><div class='del'>-#define CISTPL_SERIAL_MOD_V26		0x40</div><div class='del'>-#define CISTPL_SERIAL_MOD_V26BIS	0x80</div><div class='del'>-#define CISTPL_SERIAL_MOD_V27BIS	0x01</div><div class='del'>-#define CISTPL_SERIAL_MOD_V29		0x02</div><div class='del'>-#define CISTPL_SERIAL_MOD_V32		0x04</div><div class='del'>-#define CISTPL_SERIAL_MOD_V32BIS	0x08</div><div class='del'>-#define CISTPL_SERIAL_MOD_V34		0x10</div><div class='del'>-</div><div class='del'>-#define CISTPL_SERIAL_ERR_MNP2_4	0x01</div><div class='del'>-#define CISTPL_SERIAL_ERR_V42_LAPM	0x02</div><div class='del'>-</div><div class='del'>-#define CISTPL_SERIAL_CMPR_V42BIS	0x01</div><div class='del'>-#define CISTPL_SERIAL_CMPR_MNP5		0x02</div><div class='del'>-</div><div class='del'>-#define CISTPL_SERIAL_CMD_AT1		0x01</div><div class='del'>-#define CISTPL_SERIAL_CMD_AT2		0x02</div><div class='del'>-#define CISTPL_SERIAL_CMD_AT3		0x04</div><div class='del'>-#define CISTPL_SERIAL_CMD_MNP_AT	0x08</div><div class='del'>-#define CISTPL_SERIAL_CMD_V25BIS	0x10</div><div class='del'>-#define CISTPL_SERIAL_CMD_V25A		0x20</div><div class='del'>-#define CISTPL_SERIAL_CMD_DMCL		0x40</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_data_serv_t {</div><div class='del'>-    u_char	max_data_0;</div><div class='del'>-    u_char	max_data_1;</div><div class='del'>-    u_char	modulation_0;</div><div class='del'>-    u_char	modulation_1;</div><div class='del'>-    u_char	error_control;</div><div class='del'>-    u_char	compression;</div><div class='del'>-    u_char	cmd_protocol;</div><div class='del'>-    u_char	escape;</div><div class='del'>-    u_char	encrypt;</div><div class='del'>-    u_char	misc_features;</div><div class='del'>-    u_char	ccitt_code[0];</div><div class='del'>-} cistpl_data_serv_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_fax_serv_t {</div><div class='del'>-    u_char	max_data_0;</div><div class='del'>-    u_char	max_data_1;</div><div class='del'>-    u_char	modulation;</div><div class='del'>-    u_char	encrypt;</div><div class='del'>-    u_char	features_0;</div><div class='del'>-    u_char	features_1;</div><div class='del'>-    u_char	ccitt_code[0];</div><div class='del'>-} cistpl_fax_serv_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_voice_serv_t {</div><div class='del'>-    u_char	max_data_0;</div><div class='del'>-    u_char	max_data_1;</div><div class='del'>-} cistpl_voice_serv_t;</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    LAN Function Extension Tuples</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#define CISTPL_FUNCE_LAN_TECH		0x01</div><div class='del'>-#define CISTPL_FUNCE_LAN_SPEED		0x02</div><div class='del'>-#define CISTPL_FUNCE_LAN_MEDIA		0x03</div><div class='del'>-#define CISTPL_FUNCE_LAN_NODE_ID	0x04</div><div class='del'>-#define CISTPL_FUNCE_LAN_CONNECTOR	0x05</div><div class='del'>-</div><div class='del'>-/* LAN technologies */</div><div class='del'>-#define CISTPL_LAN_TECH_ARCNET		0x01</div><div class='del'>-#define CISTPL_LAN_TECH_ETHERNET	0x02</div><div class='del'>-#define CISTPL_LAN_TECH_TOKENRING	0x03</div><div class='del'>-#define CISTPL_LAN_TECH_LOCALTALK	0x04</div><div class='del'>-#define CISTPL_LAN_TECH_FDDI		0x05</div><div class='del'>-#define CISTPL_LAN_TECH_ATM		0x06</div><div class='del'>-#define CISTPL_LAN_TECH_WIRELESS	0x07</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_lan_tech_t {</div><div class='del'>-    u_char	tech;</div><div class='del'>-} cistpl_lan_tech_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_lan_speed_t {</div><div class='del'>-    u_int	speed;</div><div class='del'>-} cistpl_lan_speed_t;</div><div class='del'>-</div><div class='del'>-/* LAN media definitions */</div><div class='del'>-#define CISTPL_LAN_MEDIA_UTP		0x01</div><div class='del'>-#define CISTPL_LAN_MEDIA_STP		0x02</div><div class='del'>-#define CISTPL_LAN_MEDIA_THIN_COAX	0x03</div><div class='del'>-#define CISTPL_LAN_MEDIA_THICK_COAX	0x04</div><div class='del'>-#define CISTPL_LAN_MEDIA_FIBER		0x05</div><div class='del'>-#define CISTPL_LAN_MEDIA_900MHZ		0x06</div><div class='del'>-#define CISTPL_LAN_MEDIA_2GHZ		0x07</div><div class='del'>-#define CISTPL_LAN_MEDIA_5GHZ		0x08</div><div class='del'>-#define CISTPL_LAN_MEDIA_DIFF_IR	0x09</div><div class='del'>-#define CISTPL_LAN_MEDIA_PTP_IR		0x0a</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_lan_media_t {</div><div class='del'>-    u_char	media;</div><div class='del'>-} cistpl_lan_media_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_lan_node_id_t {</div><div class='del'>-    u_char	nb;</div><div class='del'>-    u_char	id[16];</div><div class='del'>-} cistpl_lan_node_id_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_lan_connector_t {</div><div class='del'>-    u_char	code;</div><div class='del'>-} cistpl_lan_connector_t;</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    IDE Function Extension Tuples</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#define CISTPL_IDE_INTERFACE		0x01</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_ide_interface_t {</div><div class='del'>-    u_char	interface;</div><div class='del'>-} cistpl_ide_interface_t;</div><div class='del'>-</div><div class='del'>-/* First feature byte */</div><div class='del'>-#define CISTPL_IDE_SILICON		0x04</div><div class='del'>-#define CISTPL_IDE_UNIQUE		0x08</div><div class='del'>-#define CISTPL_IDE_DUAL			0x10</div><div class='del'>-</div><div class='del'>-/* Second feature byte */</div><div class='del'>-#define CISTPL_IDE_HAS_SLEEP		0x01</div><div class='del'>-#define CISTPL_IDE_HAS_STANDBY		0x02</div><div class='del'>-#define CISTPL_IDE_HAS_IDLE		0x04</div><div class='del'>-#define CISTPL_IDE_LOW_POWER		0x08</div><div class='del'>-#define CISTPL_IDE_REG_INHIBIT		0x10</div><div class='del'>-#define CISTPL_IDE_HAS_INDEX		0x20</div><div class='del'>-#define CISTPL_IDE_IOIS16		0x40</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_ide_feature_t {</div><div class='del'>-    u_char	feature1;</div><div class='del'>-    u_char	feature2;</div><div class='del'>-} cistpl_ide_feature_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_FUNCE_IDE_IFACE		0x01</div><div class='del'>-#define CISTPL_FUNCE_IDE_MASTER		0x02</div><div class='del'>-#define CISTPL_FUNCE_IDE_SLAVE		0x03</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    Configuration Table Entries</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#define CISTPL_BAR_SPACE	0x07</div><div class='del'>-#define CISTPL_BAR_SPACE_IO	0x10</div><div class='del'>-#define CISTPL_BAR_PREFETCH	0x20</div><div class='del'>-#define CISTPL_BAR_CACHEABLE	0x40</div><div class='del'>-#define CISTPL_BAR_1MEG_MAP	0x80</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_bar_t {</div><div class='del'>-    u_char	attr;</div><div class='del'>-    u_int	size;</div><div class='del'>-} cistpl_bar_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_config_t {</div><div class='del'>-    u_char	last_idx;</div><div class='del'>-    u_int	base;</div><div class='del'>-    u_int	rmask[4];</div><div class='del'>-    u_char	subtuples;</div><div class='del'>-} cistpl_config_t;</div><div class='del'>-</div><div class='del'>-/* These are bits in the 'present' field, and indices in 'param' */</div><div class='del'>-#define CISTPL_POWER_VNOM	0</div><div class='del'>-#define CISTPL_POWER_VMIN	1</div><div class='del'>-#define CISTPL_POWER_VMAX	2</div><div class='del'>-#define CISTPL_POWER_ISTATIC	3</div><div class='del'>-#define CISTPL_POWER_IAVG	4</div><div class='del'>-#define CISTPL_POWER_IPEAK	5</div><div class='del'>-#define CISTPL_POWER_IDOWN	6</div><div class='del'>-</div><div class='del'>-#define CISTPL_POWER_HIGHZ_OK	0x01</div><div class='del'>-#define CISTPL_POWER_HIGHZ_REQ	0x02</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_power_t {</div><div class='del'>-    u_char	present;</div><div class='del'>-    u_char	flags;</div><div class='del'>-    u_int	param[7];</div><div class='del'>-} cistpl_power_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_timing_t {</div><div class='del'>-    u_int	wait, waitscale;</div><div class='del'>-    u_int	ready, rdyscale;</div><div class='del'>-    u_int	reserved, rsvscale;</div><div class='del'>-} cistpl_timing_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_IO_LINES_MASK	0x1f</div><div class='del'>-#define CISTPL_IO_8BIT		0x20</div><div class='del'>-#define CISTPL_IO_16BIT		0x40</div><div class='del'>-#define CISTPL_IO_RANGE		0x80</div><div class='del'>-</div><div class='del'>-#define CISTPL_IO_MAX_WIN	16</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_io_t {</div><div class='del'>-    u_char	flags;</div><div class='del'>-    u_char	nwin;</div><div class='del'>-    struct {</div><div class='del'>-	u_int	base;</div><div class='del'>-	u_int	len;</div><div class='del'>-    } win[CISTPL_IO_MAX_WIN];</div><div class='del'>-} cistpl_io_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_irq_t {</div><div class='del'>-    u_int	IRQInfo1;</div><div class='del'>-    u_int	IRQInfo2;</div><div class='del'>-} cistpl_irq_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_MEM_MAX_WIN	8</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_mem_t {</div><div class='del'>-    u_char	flags;</div><div class='del'>-    u_char	nwin;</div><div class='del'>-    struct {</div><div class='del'>-	u_int	len;</div><div class='del'>-	u_int	card_addr;</div><div class='del'>-	u_int	host_addr;</div><div class='del'>-    } win[CISTPL_MEM_MAX_WIN];</div><div class='del'>-} cistpl_mem_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_CFTABLE_DEFAULT		0x0001</div><div class='del'>-#define CISTPL_CFTABLE_BVDS		0x0002</div><div class='del'>-#define CISTPL_CFTABLE_WP		0x0004</div><div class='del'>-#define CISTPL_CFTABLE_RDYBSY		0x0008</div><div class='del'>-#define CISTPL_CFTABLE_MWAIT		0x0010</div><div class='del'>-#define CISTPL_CFTABLE_AUDIO		0x0800</div><div class='del'>-#define CISTPL_CFTABLE_READONLY		0x1000</div><div class='del'>-#define CISTPL_CFTABLE_PWRDOWN		0x2000</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_cftable_entry_t {</div><div class='del'>-    u_char		index;</div><div class='del'>-    u_short		flags;</div><div class='del'>-    u_char		interface;</div><div class='del'>-    cistpl_power_t	vcc, vpp1, vpp2;</div><div class='del'>-    cistpl_timing_t	timing;</div><div class='del'>-    cistpl_io_t		io;</div><div class='del'>-    cistpl_irq_t	irq;</div><div class='del'>-    cistpl_mem_t	mem;</div><div class='del'>-    u_char		subtuples;</div><div class='del'>-} cistpl_cftable_entry_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_CFTABLE_MASTER		0x000100</div><div class='del'>-#define CISTPL_CFTABLE_INVALIDATE	0x000200</div><div class='del'>-#define CISTPL_CFTABLE_VGA_PALETTE	0x000400</div><div class='del'>-#define CISTPL_CFTABLE_PARITY		0x000800</div><div class='del'>-#define CISTPL_CFTABLE_WAIT		0x001000</div><div class='del'>-#define CISTPL_CFTABLE_SERR		0x002000</div><div class='del'>-#define CISTPL_CFTABLE_FAST_BACK	0x004000</div><div class='del'>-#define CISTPL_CFTABLE_BINARY_AUDIO	0x010000</div><div class='del'>-#define CISTPL_CFTABLE_PWM_AUDIO	0x020000</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_cftable_entry_cb_t {</div><div class='del'>-    u_char		index;</div><div class='del'>-    u_int		flags;</div><div class='del'>-    cistpl_power_t	vcc, vpp1, vpp2;</div><div class='del'>-    u_char		io;</div><div class='del'>-    cistpl_irq_t	irq;</div><div class='del'>-    u_char		mem;</div><div class='del'>-    u_char		subtuples;</div><div class='del'>-} cistpl_cftable_entry_cb_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_device_geo_t {</div><div class='del'>-    u_char		ngeo;</div><div class='del'>-    struct {</div><div class='del'>-	u_char		buswidth;</div><div class='del'>-	u_int		erase_block;</div><div class='del'>-	u_int		read_block;</div><div class='del'>-	u_int		write_block;</div><div class='del'>-	u_int		partition;</div><div class='del'>-	u_int		interleave;</div><div class='del'>-    } geo[CISTPL_MAX_DEVICES];</div><div class='del'>-} cistpl_device_geo_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_vers_2_t {</div><div class='del'>-    u_char	vers;</div><div class='del'>-    u_char	comply;</div><div class='del'>-    u_short	dindex;</div><div class='del'>-    u_char	vspec8, vspec9;</div><div class='del'>-    u_char	nhdr;</div><div class='del'>-    u_char	vendor, info;</div><div class='del'>-    char	str[244];</div><div class='del'>-} cistpl_vers_2_t;</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_org_t {</div><div class='del'>-    u_char	data_org;</div><div class='del'>-    char	desc[30];</div><div class='del'>-} cistpl_org_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_ORG_FS		0x00</div><div class='del'>-#define CISTPL_ORG_APPSPEC	0x01</div><div class='del'>-#define CISTPL_ORG_XIP		0x02</div><div class='del'>-</div><div class='del'>-typedef struct cistpl_format_t {</div><div class='del'>-    u_char	type;</div><div class='del'>-    u_char	edc;</div><div class='del'>-    u_int	offset;</div><div class='del'>-    u_int	length;</div><div class='del'>-} cistpl_format_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_FORMAT_DISK	0x00</div><div class='del'>-#define CISTPL_FORMAT_MEM	0x01</div><div class='del'>-</div><div class='del'>-#define CISTPL_EDC_NONE		0x00</div><div class='del'>-#define CISTPL_EDC_CKSUM	0x01</div><div class='del'>-#define CISTPL_EDC_CRC		0x02</div><div class='del'>-#define CISTPL_EDC_PCC		0x03</div><div class='del'>-</div><div class='del'>-typedef union cisparse_t {</div><div class='del'>-    cistpl_device_t		device;</div><div class='del'>-    cistpl_checksum_t		checksum;</div><div class='del'>-    cistpl_longlink_t		longlink;</div><div class='del'>-    cistpl_longlink_mfc_t	longlink_mfc;</div><div class='del'>-    cistpl_vers_1_t		version_1;</div><div class='del'>-    cistpl_altstr_t		altstr;</div><div class='del'>-    cistpl_jedec_t		jedec;</div><div class='del'>-    cistpl_manfid_t		manfid;</div><div class='del'>-    cistpl_funcid_t		funcid;</div><div class='del'>-    cistpl_funce_t		funce;</div><div class='del'>-    cistpl_bar_t		bar;</div><div class='del'>-    cistpl_config_t		config;</div><div class='del'>-    cistpl_cftable_entry_t	cftable_entry;</div><div class='del'>-    cistpl_cftable_entry_cb_t	cftable_entry_cb;</div><div class='del'>-    cistpl_device_geo_t		device_geo;</div><div class='del'>-    cistpl_vers_2_t		vers_2;</div><div class='del'>-    cistpl_org_t		org;</div><div class='del'>-    cistpl_format_t		format;</div><div class='del'>-} cisparse_t;</div><div class='del'>-</div><div class='del'>-typedef struct tuple_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    cisdata_t 	DesiredTuple;</div><div class='del'>-    u_int	Flags;		/* internal use */</div><div class='del'>-    u_int	LinkOffset;	/* internal use */</div><div class='del'>-    u_int	CISOffset;	/* internal use */</div><div class='del'>-    cisdata_t	TupleCode;</div><div class='del'>-    cisdata_t	TupleLink;</div><div class='del'>-    cisdata_t	TupleOffset;</div><div class='del'>-    cisdata_t	TupleDataMax;</div><div class='del'>-    cisdata_t	TupleDataLen;</div><div class='del'>-    cisdata_t	*TupleData;</div><div class='del'>-} tuple_t;</div><div class='del'>-</div><div class='del'>-/* Special cisdata_t value */</div><div class='del'>-#define RETURN_FIRST_TUPLE	0xff</div><div class='del'>-</div><div class='del'>-/* Attributes for tuple calls */</div><div class='del'>-#define TUPLE_RETURN_LINK	0x01</div><div class='del'>-#define TUPLE_RETURN_COMMON	0x02</div><div class='del'>-</div><div class='del'>-/* For ValidateCIS */</div><div class='del'>-typedef struct cisinfo_t {</div><div class='del'>-    u_int	Chains;</div><div class='del'>-} cisinfo_t;</div><div class='del'>-</div><div class='del'>-#define CISTPL_MAX_CIS_SIZE	0x200</div><div class='del'>-</div><div class='del'>-/* For ReplaceCIS */</div><div class='del'>-typedef struct cisdump_t {</div><div class='del'>-    u_int	Length;</div><div class='del'>-    cisdata_t	Data[CISTPL_MAX_CIS_SIZE];</div><div class='del'>-} cisdump_t;</div><div class='del'>-</div><div class='del'>-#endif /* LINUX_CISTPL_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cs.h b/mdk-stage1/pcmcia_/cs.h<br/>deleted file mode 100644<br/>index dea6937eb..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,465 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cs.h 1.73 2001/08/24 12:16:12</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_CS_H</div><div class='del'>-#define _LINUX_CS_H</div><div class='del'>-</div><div class='del'>-/* For AccessConfigurationRegister */</div><div class='del'>-typedef struct conf_reg_t {</div><div class='del'>-    u_char	Function;</div><div class='del'>-    u_int	Action;</div><div class='del'>-    off_t	Offset;</div><div class='del'>-    u_int	Value;</div><div class='del'>-} conf_reg_t;</div><div class='del'>-</div><div class='del'>-/* Actions */</div><div class='del'>-#define CS_READ		1</div><div class='del'>-#define CS_WRITE	2</div><div class='del'>-</div><div class='del'>-/* for AdjustResourceInfo */</div><div class='del'>-typedef struct adjust_t {</div><div class='del'>-    u_int	Action;</div><div class='del'>-    u_int	Resource;</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    union {</div><div class='del'>-	struct memory {</div><div class='del'>-	    u_long	Base;</div><div class='del'>-	    u_long	Size;</div><div class='del'>-	} memory;</div><div class='del'>-	struct io {</div><div class='del'>-	    ioaddr_t	BasePort;</div><div class='del'>-	    ioaddr_t	NumPorts;</div><div class='del'>-	    u_int	IOAddrLines;</div><div class='del'>-	} io;</div><div class='del'>-	struct irq {</div><div class='del'>-	    u_int	IRQ;</div><div class='del'>-	} irq;</div><div class='del'>-    } resource;</div><div class='del'>-} adjust_t;</div><div class='del'>-</div><div class='del'>-/* Action field */</div><div class='del'>-#define REMOVE_MANAGED_RESOURCE		1</div><div class='del'>-#define ADD_MANAGED_RESOURCE		2</div><div class='del'>-#define GET_FIRST_MANAGED_RESOURCE	3</div><div class='del'>-#define GET_NEXT_MANAGED_RESOURCE	4</div><div class='del'>-/* Resource field */</div><div class='del'>-#define RES_MEMORY_RANGE		1</div><div class='del'>-#define RES_IO_RANGE			2</div><div class='del'>-#define RES_IRQ				3</div><div class='del'>-/* Attribute field */</div><div class='del'>-#define RES_IRQ_TYPE			0x03</div><div class='del'>-#define RES_IRQ_TYPE_EXCLUSIVE		0</div><div class='del'>-#define RES_IRQ_TYPE_TIME		1</div><div class='del'>-#define RES_IRQ_TYPE_DYNAMIC		2</div><div class='del'>-#define RES_IRQ_CSC			0x04</div><div class='del'>-#define RES_SHARED			0x08</div><div class='del'>-#define RES_RESERVED			0x10</div><div class='del'>-#define RES_ALLOCATED			0x20</div><div class='del'>-#define RES_REMOVED			0x40</div><div class='del'>-</div><div class='del'>-typedef struct servinfo_t {</div><div class='del'>-    char	Signature[2];</div><div class='del'>-    u_int	Count;</div><div class='del'>-    u_int	Revision;</div><div class='del'>-    u_int	CSLevel;</div><div class='del'>-    char	*VendorString;</div><div class='del'>-} servinfo_t;</div><div class='del'>-</div><div class='del'>-typedef struct event_callback_args_t {</div><div class='del'>-    client_handle_t client_handle;</div><div class='del'>-    void	*info;</div><div class='del'>-    void	*mtdrequest;</div><div class='del'>-    void	*buffer;</div><div class='del'>-    void	*misc;</div><div class='del'>-    void	*client_data;</div><div class='del'>-    struct bus_operations *bus;</div><div class='del'>-} event_callback_args_t;</div><div class='del'>-</div><div class='del'>-/* for GetConfigurationInfo */</div><div class='del'>-typedef struct config_info_t {</div><div class='del'>-    u_char	Function;</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	Vcc, Vpp1, Vpp2;</div><div class='del'>-    u_int	IntType;</div><div class='del'>-    u_int	ConfigBase;</div><div class='del'>-    u_char	Status, Pin, Copy, Option, ExtStatus;</div><div class='del'>-    u_int	Present;</div><div class='del'>-    u_int	CardValues;</div><div class='del'>-    u_int	AssignedIRQ;</div><div class='del'>-    u_int	IRQAttributes;</div><div class='del'>-    ioaddr_t	BasePort1;</div><div class='del'>-    ioaddr_t	NumPorts1;</div><div class='del'>-    u_int	Attributes1;</div><div class='del'>-    ioaddr_t	BasePort2;</div><div class='del'>-    ioaddr_t	NumPorts2;</div><div class='del'>-    u_int	Attributes2;</div><div class='del'>-    u_int	IOAddrLines;</div><div class='del'>-} config_info_t;</div><div class='del'>-</div><div class='del'>-/* For CardValues field */</div><div class='del'>-#define CV_OPTION_VALUE		0x01</div><div class='del'>-#define CV_STATUS_VALUE		0x02</div><div class='del'>-#define CV_PIN_REPLACEMENT	0x04</div><div class='del'>-#define CV_COPY_VALUE		0x08</div><div class='del'>-#define CV_EXT_STATUS		0x10</div><div class='del'>-</div><div class='del'>-/* For GetFirst/NextClient */</div><div class='del'>-typedef struct client_req_t {</div><div class='del'>-    socket_t	Socket;</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-} client_req_t;</div><div class='del'>-</div><div class='del'>-#define CLIENT_THIS_SOCKET	0x01</div><div class='del'>-</div><div class='del'>-/* For RegisterClient */</div><div class='del'>-typedef struct client_reg_t {</div><div class='del'>-    dev_info_t	*dev_info;</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	EventMask;</div><div class='del'>-    int		(*event_handler)(event_t event, int priority,</div><div class='del'>-				 event_callback_args_t *);</div><div class='del'>-    event_callback_args_t event_callback_args;</div><div class='del'>-    u_int	Version;</div><div class='del'>-} client_reg_t;</div><div class='del'>-</div><div class='del'>-/* ModifyConfiguration */</div><div class='del'>-typedef struct modconf_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	Vcc, Vpp1, Vpp2;</div><div class='del'>-} modconf_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for ModifyConfiguration */</div><div class='del'>-#define CONF_IRQ_CHANGE_VALID	0x100</div><div class='del'>-#define CONF_VCC_CHANGE_VALID	0x200</div><div class='del'>-#define CONF_VPP1_CHANGE_VALID	0x400</div><div class='del'>-#define CONF_VPP2_CHANGE_VALID	0x800</div><div class='del'>-</div><div class='del'>-/* For RequestConfiguration */</div><div class='del'>-typedef struct config_req_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	Vcc, Vpp1, Vpp2;</div><div class='del'>-    u_int	IntType;</div><div class='del'>-    u_int	ConfigBase;</div><div class='del'>-    u_char	Status, Pin, Copy, ExtStatus;</div><div class='del'>-    u_char	ConfigIndex;</div><div class='del'>-    u_int	Present;</div><div class='del'>-} config_req_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for RequestConfiguration */</div><div class='del'>-#define CONF_ENABLE_IRQ		0x01</div><div class='del'>-#define CONF_ENABLE_DMA		0x02</div><div class='del'>-#define CONF_ENABLE_SPKR	0x04</div><div class='del'>-#define CONF_VALID_CLIENT	0x100</div><div class='del'>-</div><div class='del'>-/* IntType field */</div><div class='del'>-#define INT_MEMORY		0x01</div><div class='del'>-#define INT_MEMORY_AND_IO	0x02</div><div class='del'>-#define INT_CARDBUS		0x04</div><div class='del'>-#define INT_ZOOMED_VIDEO	0x08</div><div class='del'>-</div><div class='del'>-/* For RequestIO and ReleaseIO */</div><div class='del'>-typedef struct io_req_t {</div><div class='del'>-    ioaddr_t	BasePort1;</div><div class='del'>-    ioaddr_t	NumPorts1;</div><div class='del'>-    u_int	Attributes1;</div><div class='del'>-    ioaddr_t	BasePort2;</div><div class='del'>-    ioaddr_t	NumPorts2;</div><div class='del'>-    u_int	Attributes2;</div><div class='del'>-    u_int	IOAddrLines;</div><div class='del'>-} io_req_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for RequestIO and ReleaseIO */</div><div class='del'>-#define IO_SHARED		0x01</div><div class='del'>-#define IO_FIRST_SHARED		0x02</div><div class='del'>-#define IO_FORCE_ALIAS_ACCESS	0x04</div><div class='del'>-#define IO_DATA_PATH_WIDTH	0x18</div><div class='del'>-#define IO_DATA_PATH_WIDTH_8	0x00</div><div class='del'>-#define IO_DATA_PATH_WIDTH_16	0x08</div><div class='del'>-#define IO_DATA_PATH_WIDTH_AUTO	0x10</div><div class='del'>-</div><div class='del'>-/* For RequestIRQ and ReleaseIRQ */</div><div class='del'>-typedef struct irq_req_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	AssignedIRQ;</div><div class='del'>-    u_int	IRQInfo1, IRQInfo2;</div><div class='del'>-    void	*Handler;</div><div class='del'>-    void	*Instance;</div><div class='del'>-} irq_req_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for RequestIRQ and ReleaseIRQ */</div><div class='del'>-#define IRQ_TYPE			0x03</div><div class='del'>-#define IRQ_TYPE_EXCLUSIVE		0x00</div><div class='del'>-#define IRQ_TYPE_TIME			0x01</div><div class='del'>-#define IRQ_TYPE_DYNAMIC_SHARING	0x02</div><div class='del'>-#define IRQ_FORCED_PULSE		0x04</div><div class='del'>-#define IRQ_FIRST_SHARED		0x08</div><div class='del'>-#define IRQ_HANDLE_PRESENT		0x10</div><div class='del'>-#define IRQ_PULSE_ALLOCATED		0x100</div><div class='del'>-</div><div class='del'>-/* Bits in IRQInfo1 field */</div><div class='del'>-#define IRQ_MASK		0x0f</div><div class='del'>-#define IRQ_NMI_ID		0x01</div><div class='del'>-#define IRQ_IOCK_ID		0x02</div><div class='del'>-#define IRQ_BERR_ID		0x04</div><div class='del'>-#define IRQ_VEND_ID		0x08</div><div class='del'>-#define IRQ_INFO2_VALID		0x10</div><div class='del'>-#define IRQ_LEVEL_ID		0x20</div><div class='del'>-#define IRQ_PULSE_ID		0x40</div><div class='del'>-#define IRQ_SHARE_ID		0x80</div><div class='del'>-</div><div class='del'>-typedef struct eventmask_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	EventMask;</div><div class='del'>-} eventmask_t;</div><div class='del'>-</div><div class='del'>-#define CONF_EVENT_MASK_VALID	0x01</div><div class='del'>-</div><div class='del'>-/* Configuration registers present */</div><div class='del'>-#define PRESENT_OPTION		0x001</div><div class='del'>-#define PRESENT_STATUS		0x002</div><div class='del'>-#define PRESENT_PIN_REPLACE	0x004</div><div class='del'>-#define PRESENT_COPY		0x008</div><div class='del'>-#define PRESENT_EXT_STATUS	0x010</div><div class='del'>-#define PRESENT_IOBASE_0	0x020</div><div class='del'>-#define PRESENT_IOBASE_1	0x040</div><div class='del'>-#define PRESENT_IOBASE_2	0x080</div><div class='del'>-#define PRESENT_IOBASE_3	0x100</div><div class='del'>-#define PRESENT_IOSIZE		0x200</div><div class='del'>-</div><div class='del'>-/* For GetMemPage, MapMemPage */</div><div class='del'>-typedef struct memreq_t {</div><div class='del'>-    u_int	CardOffset;</div><div class='del'>-    page_t	Page;</div><div class='del'>-} memreq_t;</div><div class='del'>-</div><div class='del'>-/* For ModifyWindow */</div><div class='del'>-typedef struct modwin_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	AccessSpeed;</div><div class='del'>-} modwin_t;</div><div class='del'>-</div><div class='del'>-/* For RequestWindow */</div><div class='del'>-typedef struct win_req_t {</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_long	Base;</div><div class='del'>-    u_int	Size;</div><div class='del'>-    u_int	AccessSpeed;</div><div class='del'>-} win_req_t;</div><div class='del'>-</div><div class='del'>-/* Attributes for RequestWindow */</div><div class='del'>-#define WIN_ADDR_SPACE		0x0001</div><div class='del'>-#define WIN_ADDR_SPACE_MEM	0x0000</div><div class='del'>-#define WIN_ADDR_SPACE_IO	0x0001</div><div class='del'>-#define WIN_MEMORY_TYPE		0x0002</div><div class='del'>-#define WIN_MEMORY_TYPE_CM	0x0000</div><div class='del'>-#define WIN_MEMORY_TYPE_AM	0x0002</div><div class='del'>-#define WIN_ENABLE		0x0004</div><div class='del'>-#define WIN_DATA_WIDTH		0x0018</div><div class='del'>-#define WIN_DATA_WIDTH_8	0x0000</div><div class='del'>-#define WIN_DATA_WIDTH_16	0x0008</div><div class='del'>-#define WIN_DATA_WIDTH_32	0x0010</div><div class='del'>-#define WIN_PAGED		0x0020</div><div class='del'>-#define WIN_SHARED		0x0040</div><div class='del'>-#define WIN_FIRST_SHARED	0x0080</div><div class='del'>-#define WIN_USE_WAIT		0x0100</div><div class='del'>-#define WIN_STRICT_ALIGN	0x0200</div><div class='del'>-#define WIN_MAP_BELOW_1MB	0x0400</div><div class='del'>-#define WIN_PREFETCH		0x0800</div><div class='del'>-#define WIN_CACHEABLE		0x1000</div><div class='del'>-#define WIN_BAR_MASK		0xe000</div><div class='del'>-#define WIN_BAR_SHIFT		13</div><div class='del'>-</div><div class='del'>-/* Attributes for RegisterClient */</div><div class='del'>-#define INFO_MASTER_CLIENT	0x01</div><div class='del'>-#define INFO_IO_CLIENT		0x02</div><div class='del'>-#define INFO_MTD_CLIENT		0x04</div><div class='del'>-#define INFO_MEM_CLIENT		0x08</div><div class='del'>-#define MAX_NUM_CLIENTS		3</div><div class='del'>-</div><div class='del'>-#define INFO_CARD_SHARE		0x10</div><div class='del'>-#define INFO_CARD_EXCL		0x20</div><div class='del'>-</div><div class='del'>-typedef struct cs_status_t {</div><div class='del'>-    u_char	Function;</div><div class='del'>-    event_t 	CardState;</div><div class='del'>-    event_t	SocketState;</div><div class='del'>-} cs_status_t;</div><div class='del'>-</div><div class='del'>-typedef struct error_info_t {</div><div class='del'>-    int		func;</div><div class='del'>-    int		retcode;</div><div class='del'>-} error_info_t;</div><div class='del'>-</div><div class='del'>-/* Special stuff for binding drivers to sockets */</div><div class='del'>-typedef struct bind_req_t {</div><div class='del'>-    socket_t	Socket;</div><div class='del'>-    u_char	Function;</div><div class='del'>-    dev_info_t	*dev_info;</div><div class='del'>-} bind_req_t;</div><div class='del'>-</div><div class='del'>-/* Flag to bind to all functions */</div><div class='del'>-#define BIND_FN_ALL	0xff</div><div class='del'>-</div><div class='del'>-typedef struct mtd_bind_t {</div><div class='del'>-    socket_t	Socket;</div><div class='del'>-    u_int	Attributes;</div><div class='del'>-    u_int	CardOffset;</div><div class='del'>-    dev_info_t	*dev_info;</div><div class='del'>-} mtd_bind_t;</div><div class='del'>-</div><div class='del'>-/* Events */</div><div class='del'>-#define CS_EVENT_PRI_LOW		0</div><div class='del'>-#define CS_EVENT_PRI_HIGH		1</div><div class='del'>-</div><div class='del'>-#define CS_EVENT_WRITE_PROTECT		0x000001</div><div class='del'>-#define CS_EVENT_CARD_LOCK		0x000002</div><div class='del'>-#define CS_EVENT_CARD_INSERTION		0x000004</div><div class='del'>-#define CS_EVENT_CARD_REMOVAL		0x000008</div><div class='del'>-#define CS_EVENT_BATTERY_DEAD		0x000010</div><div class='del'>-#define CS_EVENT_BATTERY_LOW		0x000020</div><div class='del'>-#define CS_EVENT_READY_CHANGE		0x000040</div><div class='del'>-#define CS_EVENT_CARD_DETECT		0x000080</div><div class='del'>-#define CS_EVENT_RESET_REQUEST		0x000100</div><div class='del'>-#define CS_EVENT_RESET_PHYSICAL		0x000200</div><div class='del'>-#define CS_EVENT_CARD_RESET		0x000400</div><div class='del'>-#define CS_EVENT_REGISTRATION_COMPLETE	0x000800</div><div class='del'>-#define CS_EVENT_RESET_COMPLETE		0x001000</div><div class='del'>-#define CS_EVENT_PM_SUSPEND		0x002000</div><div class='del'>-#define CS_EVENT_PM_RESUME		0x004000</div><div class='del'>-#define CS_EVENT_INSERTION_REQUEST	0x008000</div><div class='del'>-#define CS_EVENT_EJECTION_REQUEST	0x010000</div><div class='del'>-#define CS_EVENT_MTD_REQUEST		0x020000</div><div class='del'>-#define CS_EVENT_ERASE_COMPLETE		0x040000</div><div class='del'>-#define CS_EVENT_REQUEST_ATTENTION	0x080000</div><div class='del'>-#define CS_EVENT_CB_DETECT		0x100000</div><div class='del'>-#define CS_EVENT_3VCARD			0x200000</div><div class='del'>-#define CS_EVENT_XVCARD			0x400000</div><div class='del'>-</div><div class='del'>-/* Return codes */</div><div class='del'>-#define CS_SUCCESS		0x00</div><div class='del'>-#define CS_BAD_ADAPTER		0x01</div><div class='del'>-#define CS_BAD_ATTRIBUTE	0x02</div><div class='del'>-#define CS_BAD_BASE		0x03</div><div class='del'>-#define CS_BAD_EDC		0x04</div><div class='del'>-#define CS_BAD_IRQ		0x06</div><div class='del'>-#define CS_BAD_OFFSET		0x07</div><div class='del'>-#define CS_BAD_PAGE		0x08</div><div class='del'>-#define CS_READ_FAILURE		0x09</div><div class='del'>-#define CS_BAD_SIZE		0x0a</div><div class='del'>-#define CS_BAD_SOCKET		0x0b</div><div class='del'>-#define CS_BAD_TYPE		0x0d</div><div class='del'>-#define CS_BAD_VCC		0x0e</div><div class='del'>-#define CS_BAD_VPP		0x0f</div><div class='del'>-#define CS_BAD_WINDOW		0x11</div><div class='del'>-#define CS_WRITE_FAILURE	0x12</div><div class='del'>-#define CS_NO_CARD		0x14</div><div class='del'>-#define CS_UNSUPPORTED_FUNCTION	0x15</div><div class='del'>-#define CS_UNSUPPORTED_MODE	0x16</div><div class='del'>-#define CS_BAD_SPEED		0x17</div><div class='del'>-#define CS_BUSY			0x18</div><div class='del'>-#define CS_GENERAL_FAILURE	0x19</div><div class='del'>-#define CS_WRITE_PROTECTED	0x1a</div><div class='del'>-#define CS_BAD_ARG_LENGTH	0x1b</div><div class='del'>-#define CS_BAD_ARGS		0x1c</div><div class='del'>-#define CS_CONFIGURATION_LOCKED	0x1d</div><div class='del'>-#define CS_IN_USE		0x1e</div><div class='del'>-#define CS_NO_MORE_ITEMS	0x1f</div><div class='del'>-#define CS_OUT_OF_RESOURCE	0x20</div><div class='del'>-#define CS_BAD_HANDLE		0x21</div><div class='del'>-</div><div class='del'>-#define CS_BAD_TUPLE		0x40</div><div class='del'>-</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Calls to set up low-level "Socket Services" drivers</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef int (*ss_entry_t)(u_int sock, u_int cmd, void *arg);</div><div class='del'>-extern int register_ss_entry(int nsock, ss_entry_t entry);</div><div class='del'>-extern void unregister_ss_entry(ss_entry_t entry);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  The main Card Services entry point</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-enum service {</div><div class='del'>-    AccessConfigurationRegister, AddSocketServices,</div><div class='del'>-    AdjustResourceInfo, CheckEraseQueue, CloseMemory, CopyMemory,</div><div class='del'>-    DeregisterClient, DeregisterEraseQueue, GetCardServicesInfo,</div><div class='del'>-    GetClientInfo, GetConfigurationInfo, GetEventMask,</div><div class='del'>-    GetFirstClient, GetFirstPartion, GetFirstRegion, GetFirstTuple,</div><div class='del'>-    GetNextClient, GetNextPartition, GetNextRegion, GetNextTuple,</div><div class='del'>-    GetStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage,</div><div class='del'>-    MapPhySocket, MapPhyWindow, ModifyConfiguration, ModifyWindow,</div><div class='del'>-    OpenMemory, ParseTuple, ReadMemory, RegisterClient,</div><div class='del'>-    RegisterEraseQueue, RegisterMTD, RegisterTimer,</div><div class='del'>-    ReleaseConfiguration, ReleaseExclusive, ReleaseIO, ReleaseIRQ,</div><div class='del'>-    ReleaseSocketMask, ReleaseWindow, ReplaceSocketServices,</div><div class='del'>-    RequestConfiguration, RequestExclusive, RequestIO, RequestIRQ,</div><div class='del'>-    RequestSocketMask, RequestWindow, ResetCard, ReturnSSEntry,</div><div class='del'>-    SetEventMask, SetRegion, ValidateCIS, VendorSpecific,</div><div class='del'>-    WriteMemory, BindDevice, BindMTD, ReportError,</div><div class='del'>-    SuspendCard, ResumeCard, EjectCard, InsertCard, ReplaceCIS,</div><div class='del'>-    GetFirstWindow, GetNextWindow, GetMemPage</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifdef IN_CARD_SERVICES</div><div class='del'>-extern int CardServices(int func, void *a1, void *a2, void *a3);</div><div class='del'>-#else</div><div class='del'>-extern int CardServices(int func, ...);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-#define SS_MODULE_NAME(s)	("busses/pcmcia/" s "/v1")</div><div class='del'>-#define MTD_MODULE_NAME(s)	("busses/pcmcia/" s "/v1")</div><div class='del'>-#define CS_CLIENT_MODULE_NAME	"bus_managers/pcmcia_cs/client/v1"</div><div class='del'>-typedef struct cs_client_module_info {</div><div class='del'>-    bus_manager_info	binfo;</div><div class='del'>-    int (*_CardServices)(int, ...);</div><div class='del'>-    int (*_MTDHelperEntry)(int, ...);</div><div class='del'>-    void (*_add_timer)(struct timer_list *);</div><div class='del'>-    void (*_del_timer)(struct timer_list *);</div><div class='del'>-} cs_client_module_info;</div><div class='del'>-#define CS_SOCKET_MODULE_NAME "bus_managers/pcmcia_cs/socket/v1"</div><div class='del'>-typedef struct cs_socket_module_info {</div><div class='del'>-    bus_manager_info	binfo;</div><div class='del'>-    int (*_register_ss_entry)(int, ss_entry_t);</div><div class='del'>-    void (*_unregister_ss_entry)(ss_entry_t);</div><div class='del'>-    void (*_add_timer)(struct timer_list *);</div><div class='del'>-    void (*_del_timer)(struct timer_list *);</div><div class='del'>-    int (*register_resource)(int, u_long, u_long);</div><div class='del'>-    int (*release_resource)(int, u_long, u_long);</div><div class='del'>-    int (*check_resource)(int, u_long, u_long);</div><div class='del'>-} cs_socket_module_info;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_CS_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/cs_types.h b/mdk-stage1/pcmcia_/cs_types.h<br/>deleted file mode 100644<br/>index a6b56b6bf..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/cs_types.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/cs_types.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,65 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cs_types.h 1.19 2001/08/24 12:16:12</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_CS_TYPES_H</div><div class='del'>-#define _LINUX_CS_TYPES_H</div><div class='del'>-</div><div class='del'>-#ifdef __linux__</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-typedef u_short	socket_t;</div><div class='del'>-typedef u_short	ioaddr_t;</div><div class='del'>-typedef u_int	event_t;</div><div class='del'>-typedef u_char	cisdata_t;</div><div class='del'>-typedef u_short	page_t;</div><div class='del'>-</div><div class='del'>-struct client_t;</div><div class='del'>-typedef struct client_t *client_handle_t;</div><div class='del'>-</div><div class='del'>-struct window_t;</div><div class='del'>-typedef struct window_t *window_handle_t;</div><div class='del'>-</div><div class='del'>-struct region_t;</div><div class='del'>-typedef struct region_t *memory_handle_t;</div><div class='del'>-</div><div class='del'>-struct eraseq_t;</div><div class='del'>-typedef struct eraseq_t *eraseq_handle_t;</div><div class='del'>-</div><div class='del'>-#ifndef DEV_NAME_LEN</div><div class='del'>-#define DEV_NAME_LEN 32</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-typedef char dev_info_t[DEV_NAME_LEN];</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_CS_TYPES_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/driver_ops.h b/mdk-stage1/pcmcia_/driver_ops.h<br/>deleted file mode 100644<br/>index a7223e2c6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/driver_ops.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/driver_ops.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,82 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * driver_ops.h 1.16 2001/08/24 12:16:13</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_DRIVER_OPS_H</div><div class='del'>-#define _LINUX_DRIVER_OPS_H</div><div class='del'>-</div><div class='del'>-#ifndef DEV_NAME_LEN</div><div class='del'>-#define DEV_NAME_LEN	32</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-</div><div class='del'>-typedef struct dev_node_t {</div><div class='del'>-    char		dev_name[DEV_NAME_LEN];</div><div class='del'>-    u_short		major, minor;</div><div class='del'>-    struct dev_node_t	*next;</div><div class='del'>-} dev_node_t;</div><div class='del'>-</div><div class='del'>-typedef struct dev_locator_t {</div><div class='del'>-    enum { LOC_ISA, LOC_PCI } bus;</div><div class='del'>-    union {</div><div class='del'>-	struct {</div><div class='del'>-	    u_short	io_base_1, io_base_2;</div><div class='del'>-	    u_long	mem_base;</div><div class='del'>-	    u_char	irq, dma;</div><div class='del'>-	} isa;</div><div class='del'>-	struct {</div><div class='del'>-	    u_char	bus;</div><div class='del'>-	    u_char	devfn;</div><div class='del'>-	} pci;</div><div class='del'>-    } b;</div><div class='del'>-} dev_locator_t;</div><div class='del'>-</div><div class='del'>-typedef struct driver_operations {</div><div class='del'>-    char		*name;</div><div class='del'>-    dev_node_t		*(*attach) (dev_locator_t *loc);</div><div class='del'>-    void		(*suspend) (dev_node_t *dev);</div><div class='del'>-    void		(*resume) (dev_node_t *dev);</div><div class='del'>-    void		(*detach) (dev_node_t *dev);</div><div class='del'>-} driver_operations;</div><div class='del'>-</div><div class='del'>-int register_driver(struct driver_operations *ops);</div><div class='del'>-void unregister_driver(struct driver_operations *ops);</div><div class='del'>-</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-#define CB_ENABLER_MODULE_NAME	"bus_managers/cb_enabler/v1"</div><div class='del'>-typedef struct cb_enabler_module_info {</div><div class='del'>-    bus_manager_info	binfo;</div><div class='del'>-    int (*register_driver)(struct driver_operations *ops);</div><div class='del'>-    void (*unregister_driver)(struct driver_operations *ops);</div><div class='del'>-} cb_enabler_module_info;</div><div class='del'>-#endif /* __BEOS__ */</div><div class='del'>-</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_DRIVER_OPS_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/ds.h b/mdk-stage1/pcmcia_/ds.h<br/>deleted file mode 100644<br/>index d191b09d6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/ds.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/ds.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,163 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ds.h 1.57 2001/08/24 12:16:13</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_DS_H</div><div class='del'>-#define _LINUX_DS_H</div><div class='del'>-</div><div class='del'>-#include &lt;pcmcia_/driver_ops.h&gt;</div><div class='del'>-#include &lt;pcmcia_/bulkmem.h&gt;</div><div class='del'>-</div><div class='del'>-typedef struct tuple_parse_t {</div><div class='del'>-    tuple_t		tuple;</div><div class='del'>-    cisdata_t		data[255];</div><div class='del'>-    cisparse_t		parse;</div><div class='del'>-} tuple_parse_t;</div><div class='del'>-</div><div class='del'>-typedef struct win_info_t {</div><div class='del'>-    window_handle_t	handle;</div><div class='del'>-    win_req_t		window;</div><div class='del'>-    memreq_t		map;</div><div class='del'>-} win_info_t;</div><div class='del'>-    </div><div class='del'>-typedef struct bind_info_t {</div><div class='del'>-    dev_info_t		dev_info;</div><div class='del'>-    u_char		function;</div><div class='del'>-    struct dev_link_t	*instance;</div><div class='del'>-    char		name[DEV_NAME_LEN];</div><div class='del'>-    u_short		major, minor;</div><div class='del'>-    void		*next;</div><div class='del'>-} bind_info_t;</div><div class='del'>-</div><div class='del'>-typedef struct mtd_info_t {</div><div class='del'>-    dev_info_t		dev_info;</div><div class='del'>-    u_int		Attributes;</div><div class='del'>-    u_int		CardOffset;</div><div class='del'>-} mtd_info_t;</div><div class='del'>-</div><div class='del'>-typedef union ds_ioctl_arg_t {</div><div class='del'>-    servinfo_t		servinfo;</div><div class='del'>-    adjust_t		adjust;</div><div class='del'>-    config_info_t	config;</div><div class='del'>-    tuple_t		tuple;</div><div class='del'>-    tuple_parse_t	tuple_parse;</div><div class='del'>-    client_req_t	client_req;</div><div class='del'>-    cs_status_t		status;</div><div class='del'>-    conf_reg_t		conf_reg;</div><div class='del'>-    cisinfo_t		cisinfo;</div><div class='del'>-    region_info_t	region;</div><div class='del'>-    bind_info_t		bind_info;</div><div class='del'>-    mtd_info_t		mtd_info;</div><div class='del'>-    win_info_t		win_info;</div><div class='del'>-    cisdump_t		cisdump;</div><div class='del'>-} ds_ioctl_arg_t;</div><div class='del'>-</div><div class='del'>-#define DS_GET_CARD_SERVICES_INFO	_IOR ('d', 1, servinfo_t)</div><div class='del'>-#define DS_ADJUST_RESOURCE_INFO		_IOWR('d', 2, adjust_t)</div><div class='del'>-#define DS_GET_CONFIGURATION_INFO	_IOWR('d', 3, config_info_t)</div><div class='del'>-#define DS_GET_FIRST_TUPLE		_IOWR('d', 4, tuple_t)</div><div class='del'>-#define DS_GET_NEXT_TUPLE		_IOWR('d', 5, tuple_t)</div><div class='del'>-#define DS_GET_TUPLE_DATA		_IOWR('d', 6, tuple_parse_t)</div><div class='del'>-#define DS_PARSE_TUPLE			_IOWR('d', 7, tuple_parse_t)</div><div class='del'>-#define DS_RESET_CARD			_IO  ('d', 8)</div><div class='del'>-#define DS_GET_STATUS			_IOWR('d', 9, cs_status_t)</div><div class='del'>-#define DS_ACCESS_CONFIGURATION_REGISTER _IOWR('d', 10, conf_reg_t)</div><div class='del'>-#define DS_VALIDATE_CIS			_IOR ('d', 11, cisinfo_t)</div><div class='del'>-#define DS_SUSPEND_CARD			_IO  ('d', 12)</div><div class='del'>-#define DS_RESUME_CARD			_IO  ('d', 13)</div><div class='del'>-#define DS_EJECT_CARD			_IO  ('d', 14)</div><div class='del'>-#define DS_INSERT_CARD			_IO  ('d', 15)</div><div class='del'>-#define DS_GET_FIRST_REGION		_IOWR('d', 16, region_info_t)</div><div class='del'>-#define DS_GET_NEXT_REGION		_IOWR('d', 17, region_info_t)</div><div class='del'>-#define DS_REPLACE_CIS			_IOWR('d', 18, cisdump_t)</div><div class='del'>-#define DS_GET_FIRST_WINDOW		_IOR ('d', 19, win_info_t)</div><div class='del'>-#define DS_GET_NEXT_WINDOW		_IOWR('d', 20, win_info_t)</div><div class='del'>-#define DS_GET_MEM_PAGE			_IOWR('d', 21, win_info_t)</div><div class='del'>-</div><div class='del'>-#define DS_BIND_REQUEST			_IOWR('d', 60, bind_info_t)</div><div class='del'>-#define DS_GET_DEVICE_INFO		_IOWR('d', 61, bind_info_t) </div><div class='del'>-#define DS_GET_NEXT_DEVICE		_IOWR('d', 62, bind_info_t) </div><div class='del'>-#define DS_UNBIND_REQUEST		_IOW ('d', 63, bind_info_t)</div><div class='del'>-#define DS_BIND_MTD			_IOWR('d', 64, mtd_info_t)</div><div class='del'>-</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-</div><div class='del'>-typedef struct dev_link_t {</div><div class='del'>-    dev_node_t		*dev;</div><div class='del'>-    u_int		state, open;</div><div class='del'>-    wait_queue_head_t	pending;</div><div class='del'>-    struct timer_list	release;</div><div class='del'>-    client_handle_t	handle;</div><div class='del'>-    io_req_t		io;</div><div class='del'>-    irq_req_t		irq;</div><div class='del'>-    config_req_t	conf;</div><div class='del'>-    window_handle_t	win;</div><div class='del'>-    void		*priv;</div><div class='del'>-    struct dev_link_t	*next;</div><div class='del'>-} dev_link_t;</div><div class='del'>-</div><div class='del'>-/* Flags for device state */</div><div class='del'>-#define DEV_PRESENT		0x01</div><div class='del'>-#define DEV_CONFIG		0x02</div><div class='del'>-#define DEV_STALE_CONFIG	0x04	/* release on close */</div><div class='del'>-#define DEV_STALE_LINK		0x08	/* detach on release */</div><div class='del'>-#define DEV_CONFIG_PENDING	0x10</div><div class='del'>-#define DEV_RELEASE_PENDING	0x20</div><div class='del'>-#define DEV_SUSPEND		0x40</div><div class='del'>-#define DEV_BUSY		0x80</div><div class='del'>-</div><div class='del'>-#define DEV_OK(l) \</div><div class='del'>-    ((l) &amp;&amp; ((l-&gt;state &amp; ~DEV_BUSY) == (DEV_CONFIG|DEV_PRESENT)))</div><div class='del'>-</div><div class='del'>-int register_pccard_driver(dev_info_t *dev_info,</div><div class='del'>-			   dev_link_t *(*attach)(void),</div><div class='del'>-			   void (*detach)(dev_link_t *));</div><div class='del'>-</div><div class='del'>-int unregister_pccard_driver(dev_info_t *dev_info);</div><div class='del'>-</div><div class='del'>-#define register_pcmcia_driver register_pccard_driver</div><div class='del'>-#define unregister_pcmcia_driver unregister_pccard_driver</div><div class='del'>-</div><div class='del'>-#ifdef __BEOS__</div><div class='del'>-#define DS_MODULE_NAME "bus_managers/pcmcia_ds/v1"</div><div class='del'>-typedef struct ds_module_info {</div><div class='del'>-    bus_manager_info binfo;</div><div class='del'>-    int (*_register_pccard_driver)(dev_info_t *,</div><div class='del'>-				   dev_link_t *(*)(void),</div><div class='del'>-				   void (*)(dev_link_t *));</div><div class='del'>-    int (*_unregister_pccard_driver)(dev_info_t *);</div><div class='del'>-    struct driver_info_t **root_driver;</div><div class='del'>-    int *sockets;</div><div class='del'>-    struct socket_info_t **socket_table;</div><div class='del'>-    sem_id *list_sem;</div><div class='del'>-} ds_module_info;</div><div class='del'>-#endif /* __BEOS__ */</div><div class='del'>-</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_DS_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/i82365.h b/mdk-stage1/pcmcia_/i82365.h<br/>deleted file mode 100644<br/>index 27ee5837c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/i82365.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/i82365.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,154 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * i82365.h 1.21 2001/08/24 12:15:33</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_I82365_H</div><div class='del'>-#define _LINUX_I82365_H</div><div class='del'>-</div><div class='del'>-/* register definitions for the Intel 82365SL PCMCIA controller */</div><div class='del'>-</div><div class='del'>-/* Offsets for PCIC registers */</div><div class='del'>-#define I365_IDENT	0x00	/* Identification and revision */</div><div class='del'>-#define I365_STATUS	0x01	/* Interface status */</div><div class='del'>-#define I365_POWER	0x02	/* Power and RESETDRV control */</div><div class='del'>-#define I365_INTCTL	0x03	/* Interrupt and general control */</div><div class='del'>-#define I365_CSC	0x04	/* Card status change */</div><div class='del'>-#define I365_CSCINT	0x05	/* Card status change interrupt control */</div><div class='del'>-#define I365_ADDRWIN	0x06	/* Address window enable */</div><div class='del'>-#define I365_IOCTL	0x07	/* I/O control */</div><div class='del'>-#define I365_GENCTL	0x16	/* Card detect and general control */</div><div class='del'>-#define I365_GBLCTL	0x1E	/* Global control register */</div><div class='del'>-</div><div class='del'>-/* Offsets for I/O and memory window registers */</div><div class='del'>-#define I365_IO(map)	(0x08+((map)&lt;&lt;2))</div><div class='del'>-#define I365_MEM(map)	(0x10+((map)&lt;&lt;3))</div><div class='del'>-#define I365_W_START	0</div><div class='del'>-#define I365_W_STOP	2</div><div class='del'>-#define I365_W_OFF	4</div><div class='del'>-</div><div class='del'>-/* Flags for I365_STATUS */</div><div class='del'>-#define I365_CS_BVD1	0x01</div><div class='del'>-#define I365_CS_STSCHG	0x01</div><div class='del'>-#define I365_CS_BVD2	0x02</div><div class='del'>-#define I365_CS_SPKR	0x02</div><div class='del'>-#define I365_CS_DETECT	0x0C</div><div class='del'>-#define I365_CS_WRPROT	0x10</div><div class='del'>-#define I365_CS_READY	0x20	/* Inverted */</div><div class='del'>-#define I365_CS_POWERON	0x40</div><div class='del'>-#define I365_CS_GPI	0x80</div><div class='del'>-</div><div class='del'>-/* Flags for I365_POWER */</div><div class='del'>-#define I365_PWR_OFF	0x00	/* Turn off the socket */</div><div class='del'>-#define I365_PWR_OUT	0x80	/* Output enable */</div><div class='del'>-#define I365_PWR_NORESET 0x40	/* Disable RESETDRV on resume */</div><div class='del'>-#define I365_PWR_AUTO	0x20	/* Auto pwr switch enable */</div><div class='del'>-#define I365_VCC_MASK	0x18	/* Mask for turning off Vcc */</div><div class='del'>-/* There are different layouts for B-step and DF-step chips: the B</div><div class='del'>-   step has independent Vpp1/Vpp2 control, and the DF step has only</div><div class='del'>-   Vpp1 control, plus 3V control */</div><div class='del'>-#define I365_VCC_5V	0x10	/* Vcc = 5.0v */</div><div class='del'>-#define I365_VCC_3V	0x18	/* Vcc = 3.3v */</div><div class='del'>-#define I365_VPP2_MASK	0x0c	/* Mask for turning off Vpp2 */</div><div class='del'>-#define I365_VPP2_5V	0x04	/* Vpp2 = 5.0v */</div><div class='del'>-#define I365_VPP2_12V	0x08	/* Vpp2 = 12.0v */</div><div class='del'>-#define I365_VPP1_MASK	0x03	/* Mask for turning off Vpp1 */</div><div class='del'>-#define I365_VPP1_5V	0x01	/* Vpp2 = 5.0v */</div><div class='del'>-#define I365_VPP1_12V	0x02	/* Vpp2 = 12.0v */</div><div class='del'>-</div><div class='del'>-/* Flags for I365_INTCTL */</div><div class='del'>-#define I365_RING_ENA	0x80</div><div class='del'>-#define I365_PC_RESET	0x40</div><div class='del'>-#define I365_PC_IOCARD	0x20</div><div class='del'>-#define I365_INTR_ENA	0x10</div><div class='del'>-#define I365_IRQ_MASK	0x0F</div><div class='del'>-</div><div class='del'>-/* Flags for I365_CSC and I365_CSCINT*/</div><div class='del'>-#define I365_CSC_BVD1	0x01</div><div class='del'>-#define I365_CSC_STSCHG	0x01</div><div class='del'>-#define I365_CSC_BVD2	0x02</div><div class='del'>-#define I365_CSC_READY	0x04</div><div class='del'>-#define I365_CSC_DETECT	0x08</div><div class='del'>-#define I365_CSC_ANY	0x0F</div><div class='del'>-#define I365_CSC_GPI	0x10</div><div class='del'>-</div><div class='del'>-/* Flags for I365_ADDRWIN */</div><div class='del'>-#define I365_ADDR_MEMCS16	0x20</div><div class='del'>-#define I365_ENA_IO(map)	(0x40 &lt;&lt; (map))</div><div class='del'>-#define I365_ENA_MEM(map)	(0x01 &lt;&lt; (map))</div><div class='del'>-</div><div class='del'>-/* Flags for I365_IOCTL */</div><div class='del'>-#define I365_IOCTL_MASK(map)	(0x0F &lt;&lt; (map&lt;&lt;2))</div><div class='del'>-#define I365_IOCTL_WAIT(map)	(0x08 &lt;&lt; (map&lt;&lt;2))</div><div class='del'>-#define I365_IOCTL_0WS(map)	(0x04 &lt;&lt; (map&lt;&lt;2))</div><div class='del'>-#define I365_IOCTL_IOCS16(map)	(0x02 &lt;&lt; (map&lt;&lt;2))</div><div class='del'>-#define I365_IOCTL_16BIT(map)	(0x01 &lt;&lt; (map&lt;&lt;2))</div><div class='del'>-</div><div class='del'>-/* Flags for I365_GENCTL */</div><div class='del'>-#define I365_CTL_16DELAY	0x01</div><div class='del'>-#define I365_CTL_RESET		0x02</div><div class='del'>-#define I365_CTL_GPI_ENA	0x04</div><div class='del'>-#define I365_CTL_GPI_CTL	0x08</div><div class='del'>-#define I365_CTL_RESUME		0x10</div><div class='del'>-#define I365_CTL_SW_IRQ		0x20</div><div class='del'>-</div><div class='del'>-/* Flags for I365_GBLCTL */</div><div class='del'>-#define I365_GBL_PWRDOWN	0x01</div><div class='del'>-#define I365_GBL_CSC_LEV	0x02</div><div class='del'>-#define I365_GBL_WRBACK		0x04</div><div class='del'>-#define I365_GBL_IRQ_0_LEV	0x08</div><div class='del'>-#define I365_GBL_IRQ_1_LEV	0x10</div><div class='del'>-</div><div class='del'>-/* Flags for memory window registers */</div><div class='del'>-#define I365_MEM_16BIT	0x8000	/* In memory start high byte */</div><div class='del'>-#define I365_MEM_0WS	0x4000</div><div class='del'>-#define I365_MEM_WS1	0x8000	/* In memory stop high byte */</div><div class='del'>-#define I365_MEM_WS0	0x4000</div><div class='del'>-#define I365_MEM_WRPROT	0x8000	/* In offset high byte */</div><div class='del'>-#define I365_MEM_REG	0x4000</div><div class='del'>-</div><div class='del'>-#define I365_REG(slot, reg)	(((slot) &lt;&lt; 6) | (reg))</div><div class='del'>-</div><div class='del'>-/* Default ISA interrupt mask */</div><div class='del'>-#define I365_ISA_IRQ_MASK	0xdeb8	/* irq's 3-5,7,9-12,14,15 */</div><div class='del'>-</div><div class='del'>-/* Device ID's for PCI-to-PCMCIA bridges */</div><div class='del'>-</div><div class='del'>-#ifndef PCI_VENDOR_ID_INTEL</div><div class='del'>-#define PCI_VENDOR_ID_INTEL		0x8086</div><div class='del'>-#endif</div><div class='del'>-#ifndef PCI_DEVICE_ID_INTEL_82092AA_0</div><div class='del'>-#define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221</div><div class='del'>-#endif</div><div class='del'>-#ifndef PCI_VENDOR_ID_OMEGA</div><div class='del'>-#define PCI_VENDOR_ID_OMEGA		0x119b</div><div class='del'>-#endif</div><div class='del'>-#ifndef PCI_DEVICE_ID_OMEGA_82C092G</div><div class='del'>-#define PCI_DEVICE_ID_OMEGA_82C092G	0x1221</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_I82365_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/lex_config.c b/mdk-stage1/pcmcia_/lex_config.c<br/>deleted file mode 100644<br/>index 2f990618d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/lex_config.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/lex_config.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2053 +0,0 @@</div><div class='del'>-/* A lexical scanner generated by flex */</div><div class='del'>-</div><div class='del'>-/* Scanner skeleton version:</div><div class='del'>- * $Header$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define FLEX_SCANNER</div><div class='del'>-#define YY_FLEX_MAJOR_VERSION 2</div><div class='del'>-#define YY_FLEX_MINOR_VERSION 5</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */</div><div class='del'>-#ifdef c_plusplus</div><div class='del'>-#ifndef __cplusplus</div><div class='del'>-#define __cplusplus</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/* Use prototypes in function declarations. */</div><div class='del'>-#define YY_USE_PROTOS</div><div class='del'>-</div><div class='del'>-/* The "const" storage-class-modifier is valid. */</div><div class='del'>-#define YY_USE_CONST</div><div class='del'>-</div><div class='del'>-#else	/* ! __cplusplus */</div><div class='del'>-</div><div class='del'>-#if __STDC__</div><div class='del'>-</div><div class='del'>-#define YY_USE_PROTOS</div><div class='del'>-#define YY_USE_CONST</div><div class='del'>-</div><div class='del'>-#endif	/* __STDC__ */</div><div class='del'>-#endif	/* ! __cplusplus */</div><div class='del'>-</div><div class='del'>-#ifdef __TURBOC__</div><div class='del'>- #pragma warn -rch</div><div class='del'>- #pragma warn -use</div><div class='del'>-#include &lt;io.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#define YY_USE_CONST</div><div class='del'>-#define YY_USE_PROTOS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_CONST</div><div class='del'>-#define yyconst const</div><div class='del'>-#else</div><div class='del'>-#define yyconst</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-#define YY_PROTO(proto) proto</div><div class='del'>-#else</div><div class='del'>-#define YY_PROTO(proto) ()</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Returned upon end-of-file. */</div><div class='del'>-#define YY_NULL 0</div><div class='del'>-</div><div class='del'>-/* Promotes a possibly negative, possibly signed char to an unsigned</div><div class='del'>- * integer for use as an array index.  If the signed char is negative,</div><div class='del'>- * we want to instead treat it as an 8-bit unsigned char, hence the</div><div class='del'>- * double cast.</div><div class='del'>- */</div><div class='del'>-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)</div><div class='del'>-</div><div class='del'>-/* Enter a start condition.  This macro really ought to take a parameter,</div><div class='del'>- * but we do it the disgusting crufty way forced on us by the ()-less</div><div class='del'>- * definition of BEGIN.</div><div class='del'>- */</div><div class='del'>-#define BEGIN yy_start = 1 + 2 *</div><div class='del'>-</div><div class='del'>-/* Translate the current start state into a value that can be later handed</div><div class='del'>- * to BEGIN to return to the state.  The YYSTATE alias is for lex</div><div class='del'>- * compatibility.</div><div class='del'>- */</div><div class='del'>-#define YY_START ((yy_start - 1) / 2)</div><div class='del'>-#define YYSTATE YY_START</div><div class='del'>-</div><div class='del'>-/* Action number for EOF rule of a given start state. */</div><div class='del'>-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)</div><div class='del'>-</div><div class='del'>-/* Special action meaning "start processing a new file". */</div><div class='del'>-#define YY_NEW_FILE yyrestart( yyin )</div><div class='del'>-</div><div class='del'>-#define YY_END_OF_BUFFER_CHAR 0</div><div class='del'>-</div><div class='del'>-/* Size of default input buffer. */</div><div class='del'>-#define YY_BUF_SIZE 16384</div><div class='del'>-</div><div class='del'>-typedef struct yy_buffer_state *YY_BUFFER_STATE;</div><div class='del'>-</div><div class='del'>-extern int yyleng;</div><div class='del'>-extern FILE *yyin, *yyout;</div><div class='del'>-</div><div class='del'>-#define EOB_ACT_CONTINUE_SCAN 0</div><div class='del'>-#define EOB_ACT_END_OF_FILE 1</div><div class='del'>-#define EOB_ACT_LAST_MATCH 2</div><div class='del'>-</div><div class='del'>-/* The funky do-while in the following #define is used to turn the definition</div><div class='del'>- * int a single C statement (which needs a semi-colon terminator).  This</div><div class='del'>- * avoids problems with code like:</div><div class='del'>- *</div><div class='del'>- * 	if ( condition_holds )</div><div class='del'>- *		yyless( 5 );</div><div class='del'>- *	else</div><div class='del'>- *		do_something_else();</div><div class='del'>- *</div><div class='del'>- * Prior to using the do-while the compiler would get upset at the</div><div class='del'>- * "else" because it interpreted the "if" statement as being all</div><div class='del'>- * done when it reached the ';' after the yyless() call.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* Return all but the first 'n' matched characters back to the input stream. */</div><div class='del'>-</div><div class='del'>-#define yyless(n) \</div><div class='del'>-	do \</div><div class='del'>-		{ \</div><div class='del'>-		/* Undo effects of setting up yytext. */ \</div><div class='del'>-		*yy_cp = yy_hold_char; \</div><div class='del'>-		YY_RESTORE_YY_MORE_OFFSET \</div><div class='del'>-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \</div><div class='del'>-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \</div><div class='del'>-		} \</div><div class='del'>-	while ( 0 )</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #define unput(c) yyunput( c, yytext_ptr )</div><div class='del'>-</div><div class='del'>-/* The following is because we cannot portably get our hands on size_t</div><div class='del'>- * (without autoconf's help, which isn't available because we want</div><div class='del'>- * flex-generated scanners to compile on their own).</div><div class='del'>- */</div><div class='del'>-typedef unsigned int yy_size_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct yy_buffer_state</div><div class='del'>-	{</div><div class='del'>-	FILE *yy_input_file;</div><div class='del'>-</div><div class='del'>-	char *yy_ch_buf;		/* input buffer */</div><div class='del'>-	char *yy_buf_pos;		/* current position in input buffer */</div><div class='del'>-</div><div class='del'>-	/* Size of input buffer in bytes, not including room for EOB</div><div class='del'>-	 * characters.</div><div class='del'>-	 */</div><div class='del'>-	yy_size_t yy_buf_size;</div><div class='del'>-</div><div class='del'>-	/* Number of characters read into yy_ch_buf, not including EOB</div><div class='del'>-	 * characters.</div><div class='del'>-	 */</div><div class='del'>-	int yy_n_chars;</div><div class='del'>-</div><div class='del'>-	/* Whether we "own" the buffer - i.e., we know we created it,</div><div class='del'>-	 * and can realloc() it to grow it, and should free() it to</div><div class='del'>-	 * delete it.</div><div class='del'>-	 */</div><div class='del'>-	int yy_is_our_buffer;</div><div class='del'>-</div><div class='del'>-	/* Whether this is an "interactive" input source; if so, and</div><div class='del'>-	 * if we're using stdio for input, then we want to use getc()</div><div class='del'>-	 * instead of fread(), to make sure we stop fetching input after</div><div class='del'>-	 * each newline.</div><div class='del'>-	 */</div><div class='del'>-	int yy_is_interactive;</div><div class='del'>-</div><div class='del'>-	/* Whether we're considered to be at the beginning of a line.</div><div class='del'>-	 * If so, '^' rules will be active on the next match, otherwise</div><div class='del'>-	 * not.</div><div class='del'>-	 */</div><div class='del'>-	int yy_at_bol;</div><div class='del'>-</div><div class='del'>-	/* Whether to try to fill the input buffer when we reach the</div><div class='del'>-	 * end of it.</div><div class='del'>-	 */</div><div class='del'>-	int yy_fill_buffer;</div><div class='del'>-</div><div class='del'>-	int yy_buffer_status;</div><div class='del'>-#define YY_BUFFER_NEW 0</div><div class='del'>-#define YY_BUFFER_NORMAL 1</div><div class='del'>-	/* When an EOF's been seen but there's still some text to process</div><div class='del'>-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we</div><div class='del'>-	 * shouldn't try reading from the input source any more.  We might</div><div class='del'>-	 * still have a bunch of tokens to match, though, because of</div><div class='del'>-	 * possible backing-up.</div><div class='del'>-	 *</div><div class='del'>-	 * When we actually see the EOF, we change the status to "new"</div><div class='del'>-	 * (via yyrestart()), so that the user can continue scanning by</div><div class='del'>-	 * just pointing yyin at a new input file.</div><div class='del'>-	 */</div><div class='del'>-#define YY_BUFFER_EOF_PENDING 2</div><div class='del'>-	};</div><div class='del'>-</div><div class='del'>-static YY_BUFFER_STATE yy_current_buffer = 0;</div><div class='del'>-</div><div class='del'>-/* We provide macros for accessing buffer states in case in the</div><div class='del'>- * future we want to put the buffer states in a more general</div><div class='del'>- * "scanner state".</div><div class='del'>- */</div><div class='del'>-#define YY_CURRENT_BUFFER yy_current_buffer</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* yy_hold_char holds the character lost when yytext is formed. */</div><div class='del'>-static char yy_hold_char;</div><div class='del'>-</div><div class='del'>-static int yy_n_chars;		/* number of characters read into yy_ch_buf */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int yyleng;</div><div class='del'>-</div><div class='del'>-/* Points to current character in buffer. */</div><div class='del'>-static char *yy_c_buf_p = (char *) 0;</div><div class='del'>-static int yy_init = 1;		/* whether we need to initialize */</div><div class='del'>-static int yy_start = 0;	/* start state number */</div><div class='del'>-</div><div class='del'>-/* Flag which is used to allow yywrap()'s to do buffer switches</div><div class='del'>- * instead of setting up a fresh yyin.  A bit of a hack ...</div><div class='del'>- */</div><div class='del'>-static int yy_did_buffer_switch_on_eof;</div><div class='del'>-</div><div class='del'>-void yyrestart YY_PROTO(( FILE *input_file ));</div><div class='del'>-</div><div class='del'>-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));</div><div class='del'>-void yy_load_buffer_state YY_PROTO(( void ));</div><div class='del'>-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));</div><div class='del'>-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));</div><div class='del'>-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));</div><div class='del'>-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));</div><div class='del'>-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )</div><div class='del'>-</div><div class='del'>-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));</div><div class='del'>-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));</div><div class='del'>-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));</div><div class='del'>-</div><div class='del'>-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));</div><div class='del'>-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));</div><div class='del'>-static void yy_flex_free YY_PROTO(( void * ));</div><div class='del'>-</div><div class='del'>-#define yy_new_buffer yy_create_buffer</div><div class='del'>-</div><div class='del'>-#define yy_set_interactive(is_interactive) \</div><div class='del'>-	{ \</div><div class='del'>-	if ( ! yy_current_buffer ) \</div><div class='del'>-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \</div><div class='del'>-	yy_current_buffer-&gt;yy_is_interactive = is_interactive; \</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#define yy_set_bol(at_bol) \</div><div class='del'>-	{ \</div><div class='del'>-	if ( ! yy_current_buffer ) \</div><div class='del'>-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \</div><div class='del'>-	yy_current_buffer-&gt;yy_at_bol = at_bol; \</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#define YY_AT_BOL() (yy_current_buffer-&gt;yy_at_bol)</div><div class='del'>-</div><div class='del'>-typedef unsigned char YY_CHAR;</div><div class='del'>-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;</div><div class='del'>-typedef int yy_state_type;</div><div class='del'>-extern char *yytext;</div><div class='del'>-#define yytext_ptr yytext</div><div class='del'>-</div><div class='del'>-static yy_state_type yy_get_previous_state YY_PROTO(( void ));</div><div class='del'>-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));</div><div class='del'>-static int yy_get_next_buffer YY_PROTO(( void ));</div><div class='del'>-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));</div><div class='del'>-</div><div class='del'>-/* Done after the current pattern has been matched and before the</div><div class='del'>- * corresponding action - sets up yytext.</div><div class='del'>- */</div><div class='del'>-#define YY_DO_BEFORE_ACTION \</div><div class='del'>-	yytext_ptr = yy_bp; \</div><div class='del'>-	yyleng = (int) (yy_cp - yy_bp); \</div><div class='del'>-	yy_hold_char = *yy_cp; \</div><div class='del'>-	*yy_cp = '\0'; \</div><div class='del'>-	yy_c_buf_p = yy_cp;</div><div class='del'>-</div><div class='del'>-#define YY_NUM_RULES 45</div><div class='del'>-#define YY_END_OF_BUFFER 46</div><div class='del'>-static yyconst short int yy_accept[247] =</div><div class='del'>-    {   0,</div><div class='del'>-        5,    5,    2,    2,   46,   44,    5,    4,    5,   44,</div><div class='del'>-        6,   41,   41,   44,   44,   44,   44,   44,   44,   44,</div><div class='del'>-       44,   44,   44,   44,   44,   44,   44,   44,   44,    3,</div><div class='del'>-        2,   45,    5,    5,    6,    0,   43,    0,    6,   41,</div><div class='del'>-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,    0,    0,    0,    0,    0,    0,   30,    0,</div><div class='del'>-        0,    0,    3,    2,    0,   43,    0,   42,    0,    0,</div><div class='del'>-        0,    0,    9,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,   18,    0,    0,    0,    0,   23,    0,    0,    0,</div><div class='del'>-</div><div class='del'>-        0,   26,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,    0,    8,   10,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,    0,    0,    0,    0,    0,    0,    0,   25,</div><div class='del'>-        0,   27,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,   11,    0,    0,   14,    0,    0,    0,    0,</div><div class='del'>-       19,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-        0,    0,   31,    0,    0,    0,    0,    0,   13,    0,</div><div class='del'>-        0,    0,    0,   20,   21,   22,    0,    0,    0,   28,</div><div class='del'>-        0,    0,    0,    1,    0,    0,    0,    0,   12,   15,</div><div class='del'>-        0,    0,   17,    0,    0,    0,    0,   29,    0,    0,</div><div class='del'>-</div><div class='del'>-       32,    0,    0,    0,    0,   16,    0,    0,    0,    0,</div><div class='del'>-        0,    0,    0,   39,    7,    0,    0,   24,    0,    0,</div><div class='del'>-        0,    0,    0,   36,    0,    0,    0,    0,    0,    0,</div><div class='del'>-       33,    0,    0,    0,   34,    0,    0,    0,   40,    0,</div><div class='del'>-        0,   35,   37,    0,   38,    0</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst int yy_ec[256] =</div><div class='del'>-    {   0,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    4,    1,    5,    6,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    7,    8,    8,</div><div class='del'>-        8,    8,    8,    8,    8,    8,    8,    1,    6,    1,</div><div class='del'>-        1,    1,    1,    1,    9,    9,    9,    9,    9,    9,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,   10,    1,    1,   11,    1,   12,   13,   14,   15,</div><div class='del'>-</div><div class='del'>-       16,   17,   18,    1,   19,   20,   21,   22,   23,   24,</div><div class='del'>-       25,   26,   27,   28,   29,   30,   31,   32,   33,   34,</div><div class='del'>-       35,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst int yy_meta[36] =</div><div class='del'>-    {   0,</div><div class='del'>-        1,    2,    3,    2,    1,    1,    4,    4,    4,    1,</div><div class='del'>-        1,    4,    4,    4,    4,    4,    4,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst short int yy_base[253] =</div><div class='del'>-    {   0,</div><div class='del'>-        0,    0,   34,   37,  293,  294,   40,  294,   41,   41,</div><div class='del'>-        0,   41,   45,   31,  273,   42,   40,  257,   38,   34,</div><div class='del'>-      274,   47,  273,  262,   53,  271,   57,   35,   60,    0,</div><div class='del'>-       79,  294,   82,   83,    0,   83,  294,   87,    0,   87,</div><div class='del'>-        0,  263,  260,  260,  255,  253,  269,   74,  245,  265,</div><div class='del'>-      244,  253,  262,  248,  259,  249,  249,  256,  255,   80,</div><div class='del'>-      239,  240,  248,  238,   80,  236,  236,  232,  294,  236,</div><div class='del'>-      233,  245,    0,   97,   95,   97,  108,    0,  230,  234,</div><div class='del'>-      242,  241,  294,  226,  242,  234,  226,  229,  234,  235,</div><div class='del'>-      226,  294,  231,  229,  220,  213,  294,  228,  209,  212,</div><div class='del'>-</div><div class='del'>-      228,  294,  209,  219,  221,  217,  216,  206,  211,  203,</div><div class='del'>-      215,  219,  194,  294,  294,  199,  196,  212,  209,  193,</div><div class='del'>-      208,  192,  190,  206,  200,  190,  195,  187,  190,  294,</div><div class='del'>-      192,  294,  188,  184,  200,  198,  195,  192,  188,  181,</div><div class='del'>-      191,  181,  294,  181,  186,  294,  186,  189,  180,  183,</div><div class='del'>-      294,  182,  161,  179,  183,  165,  170,  167,  158,  177,</div><div class='del'>-      166,  171,  294,  161,  174,  172,  158,  152,  294,  165,</div><div class='del'>-      165,  154,  162,  294,  166,  294,  153,  154,  158,  294,</div><div class='del'>-      157,  157,  160,  294,  146,  157,  140,  136,  294,  294,</div><div class='del'>-      147,  141,  294,  150,  133,  151,  139,  294,  148,  133,</div><div class='del'>-</div><div class='del'>-      294,  143,  142,  127,  126,  294,  142,  138,  140,  140,</div><div class='del'>-      124,  124,  136,  294,  294,  126,  118,  294,  130,  118,</div><div class='del'>-      113,  114,  115,  294,  125,  127,  108,  116,   99,   87,</div><div class='del'>-      294,   90,   87,   86,  294,   96,   78,   74,  294,   75,</div><div class='del'>-       64,  294,  294,   46,  294,  294,  118,  122,  126,  130,</div><div class='del'>-      134,   64</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst short int yy_def[253] =</div><div class='del'>-    {   0,</div><div class='del'>-      246,    1,  247,  247,  246,  246,  246,  246,  246,  248,</div><div class='del'>-      249,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  250,</div><div class='del'>-      246,  246,  246,  246,  249,  248,  246,  251,  249,  246,</div><div class='del'>-      252,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  250,  246,  248,  248,  251,  252,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,    0,  246,  246,  246,  246,</div><div class='del'>-      246,  246</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst short int yy_nxt[330] =</div><div class='del'>-    {   0,</div><div class='del'>-        6,    7,    8,    9,   10,   11,   12,   13,    6,    6,</div><div class='del'>-        6,   14,   15,   16,   17,   18,   19,    6,   20,   21,</div><div class='del'>-        6,    6,   22,   23,   24,   25,    6,   26,   27,   28,</div><div class='del'>-        6,   29,    6,    6,    6,   31,   32,   31,   31,   32,</div><div class='del'>-       31,   33,   33,   33,   34,   37,   35,   40,   40,   42,</div><div class='del'>-       38,   40,   40,   45,   43,   48,   51,   53,   56,   69,</div><div class='del'>-       46,   54,   57,   47,   62,   70,   63,   78,   52,   49,</div><div class='del'>-       66,   58,   67,  245,   41,   71,   59,   64,   72,  244,</div><div class='del'>-       74,   68,   74,   33,   33,   33,   34,   37,   35,   36,</div><div class='del'>-       85,   76,   38,   40,   40,   98,   77,  104,   74,   37,</div><div class='del'>-</div><div class='del'>-       74,   37,  243,  242,   38,   86,   38,  241,  105,   99,</div><div class='del'>-       36,  240,   76,  239,  238,  237,  236,   77,   30,   30,</div><div class='del'>-       30,   30,   36,   36,   36,   36,   39,   39,  235,   39,</div><div class='del'>-       73,  234,  233,   73,   75,   75,   75,   75,  232,  231,</div><div class='del'>-      230,  229,  228,  227,  226,  225,  224,  223,  222,  221,</div><div class='del'>-      220,  219,  218,  217,  216,  215,  214,  213,  212,  211,</div><div class='del'>-      210,  209,  208,  207,  206,  205,  204,  203,  202,  201,</div><div class='del'>-      200,  199,  198,  197,  196,  195,  194,  193,  192,  191,</div><div class='del'>-      190,  189,  188,  187,  186,  185,  184,  183,  182,  181,</div><div class='del'>-      180,  179,  178,  177,  176,  175,  174,  173,  172,  171,</div><div class='del'>-</div><div class='del'>-      170,  169,  168,  167,  166,  165,  164,  163,  162,  161,</div><div class='del'>-      160,  159,  158,  157,  156,  155,  154,  153,  152,  151,</div><div class='del'>-      150,  149,  148,  147,  146,  145,  144,  143,  142,  141,</div><div class='del'>-      140,  139,  138,  137,  136,  135,  134,  133,  132,  131,</div><div class='del'>-      130,  129,  128,  127,  126,  125,  124,  123,  122,  121,</div><div class='del'>-      120,  119,  118,  117,  116,  115,  114,  113,  112,  111,</div><div class='del'>-      110,  109,  108,  107,  106,  103,  102,  101,  100,   97,</div><div class='del'>-       96,   95,   94,   93,   92,   91,   90,   89,   88,   87,</div><div class='del'>-       84,   83,   82,   81,   80,   79,   65,   61,   60,   55,</div><div class='del'>-       50,   44,  246,    5,  246,  246,  246,  246,  246,  246,</div><div class='del'>-</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yyconst short int yy_chk[330] =</div><div class='del'>-    {   0,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,</div><div class='del'>-        1,    1,    1,    1,    1,    3,    3,    3,    4,    4,</div><div class='del'>-        4,    7,    9,    7,    9,   10,    9,   12,   12,   14,</div><div class='del'>-       10,   13,   13,   16,   14,   17,   19,   20,   22,   28,</div><div class='del'>-       16,   20,   22,   16,   25,   28,   25,  252,   19,   17,</div><div class='del'>-       27,   22,   27,  244,   12,   29,   22,   25,   29,  241,</div><div class='del'>-       31,   27,   31,   33,   34,   33,   34,   36,   34,   38,</div><div class='del'>-       48,   38,   36,   40,   40,   60,   38,   65,   74,   75,</div><div class='del'>-</div><div class='del'>-       74,   76,  240,  238,   75,   48,   76,  237,   65,   60,</div><div class='del'>-       77,  236,   77,  234,  233,  232,  230,   77,  247,  247,</div><div class='del'>-      247,  247,  248,  248,  248,  248,  249,  249,  229,  249,</div><div class='del'>-      250,  228,  227,  250,  251,  251,  251,  251,  226,  225,</div><div class='del'>-      223,  222,  221,  220,  219,  217,  216,  213,  212,  211,</div><div class='del'>-      210,  209,  208,  207,  205,  204,  203,  202,  200,  199,</div><div class='del'>-      197,  196,  195,  194,  192,  191,  188,  187,  186,  185,</div><div class='del'>-      183,  182,  181,  179,  178,  177,  175,  173,  172,  171,</div><div class='del'>-      170,  168,  167,  166,  165,  164,  162,  161,  160,  159,</div><div class='del'>-      158,  157,  156,  155,  154,  153,  152,  150,  149,  148,</div><div class='del'>-</div><div class='del'>-      147,  145,  144,  142,  141,  140,  139,  138,  137,  136,</div><div class='del'>-      135,  134,  133,  131,  129,  128,  127,  126,  125,  124,</div><div class='del'>-      123,  122,  121,  120,  119,  118,  117,  116,  113,  112,</div><div class='del'>-      111,  110,  109,  108,  107,  106,  105,  104,  103,  101,</div><div class='del'>-      100,   99,   98,   96,   95,   94,   93,   91,   90,   89,</div><div class='del'>-       88,   87,   86,   85,   84,   82,   81,   80,   79,   72,</div><div class='del'>-       71,   70,   68,   67,   66,   64,   63,   62,   61,   59,</div><div class='del'>-       58,   57,   56,   55,   54,   53,   52,   51,   50,   49,</div><div class='del'>-       47,   46,   45,   44,   43,   42,   26,   24,   23,   21,</div><div class='del'>-       18,   15,    5,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,</div><div class='del'>-      246,  246,  246,  246,  246,  246,  246,  246,  246</div><div class='del'>-    } ;</div><div class='del'>-</div><div class='del'>-static yy_state_type yy_last_accepting_state;</div><div class='del'>-static char *yy_last_accepting_cpos;</div><div class='del'>-</div><div class='del'>-/* The intent behind this definition is that it'll catch</div><div class='del'>- * any uses of REJECT which flex missed.</div><div class='del'>- */</div><div class='del'>-#define REJECT reject_used_but_not_detected</div><div class='del'>-#define yymore() yymore_used_but_not_detected</div><div class='del'>-#define YY_MORE_ADJ 0</div><div class='del'>-#define YY_RESTORE_YY_MORE_OFFSET</div><div class='del'>-char *yytext;</div><div class='del'>-#line 1 "lex_config.l"</div><div class='del'>-#define INITIAL 0</div><div class='del'>-/* Special state for handling include files */</div><div class='del'>-#define src 1</div><div class='del'>-</div><div class='del'>-#line 5 "lex_config.l"</div><div class='del'>-/*</div><div class='del'>- * lex_config.l 1.40 2001/08/24 12:21:25</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#undef src</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;glob.h&gt;</div><div class='del'>-#define src 1</div><div class='del'>-</div><div class='del'>-#include &lt;pcmcia_/cs_types.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cs.h&gt;</div><div class='del'>-</div><div class='del'>-#include "yacc_config.h"</div><div class='del'>-</div><div class='del'>-/* For assembling nice error messages */</div><div class='del'>-char *current_file;</div><div class='del'>-int current_lineno;</div><div class='del'>-</div><div class='del'>-static int lex_number(char *s);</div><div class='del'>-static int lex_string(char *s);</div><div class='del'>-static void do_source(char *fn);</div><div class='del'>-static int do_eof(void);</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Macros after this point can all be overridden by user definitions in</div><div class='del'>- * section 1.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef YY_SKIP_YYWRAP</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" int yywrap YY_PROTO(( void ));</div><div class='del'>-#else</div><div class='del'>-extern int yywrap YY_PROTO(( void ));</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_UNPUT</div><div class='del'>-//mdk-stage1// static void yyunput YY_PROTO(( int c, char *buf_ptr ));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef yytext_ptr</div><div class='del'>-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_NEED_STRLEN</div><div class='del'>-static int yy_flex_strlen YY_PROTO(( yyconst char * ));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_INPUT</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-static int yyinput YY_PROTO(( void ));</div><div class='del'>-#else</div><div class='del'>-static int input YY_PROTO(( void ));</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if YY_STACK_USED</div><div class='del'>-static int yy_start_stack_ptr = 0;</div><div class='del'>-static int yy_start_stack_depth = 0;</div><div class='del'>-static int *yy_start_stack = 0;</div><div class='del'>-#ifndef YY_NO_PUSH_STATE</div><div class='del'>-static void yy_push_state YY_PROTO(( int new_state ));</div><div class='del'>-#endif</div><div class='del'>-#ifndef YY_NO_POP_STATE</div><div class='del'>-static void yy_pop_state YY_PROTO(( void ));</div><div class='del'>-#endif</div><div class='del'>-#ifndef YY_NO_TOP_STATE</div><div class='del'>-static int yy_top_state YY_PROTO(( void ));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-#define YY_NO_PUSH_STATE 1</div><div class='del'>-#define YY_NO_POP_STATE 1</div><div class='del'>-#define YY_NO_TOP_STATE 1</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_MALLOC_DECL</div><div class='del'>-YY_MALLOC_DECL</div><div class='del'>-#else</div><div class='del'>-#if __STDC__</div><div class='del'>-#ifndef __cplusplus</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#else</div><div class='del'>-/* Just try to get by without declaring the routines.  This will fail</div><div class='del'>- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)</div><div class='del'>- * or sizeof(void*) != sizeof(int).</div><div class='del'>- */</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Amount of stuff to slurp up with each read. */</div><div class='del'>-#ifndef YY_READ_BUF_SIZE</div><div class='del'>-#define YY_READ_BUF_SIZE 8192</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Copy whatever the last rule matched to the standard output. */</div><div class='del'>-</div><div class='del'>-#ifndef ECHO</div><div class='del'>-/* This used to be an fputs(), but since the string might contain NUL's,</div><div class='del'>- * we now use fwrite().</div><div class='del'>- */</div><div class='del'>-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,</div><div class='del'>- * is returned in "result".</div><div class='del'>- */</div><div class='del'>-#ifndef YY_INPUT</div><div class='del'>-#define YY_INPUT(buf,result,max_size) \</div><div class='del'>-	if ( yy_current_buffer-&gt;yy_is_interactive ) \</div><div class='del'>-		{ \</div><div class='del'>-		int c = '*', n; \</div><div class='del'>-		for ( n = 0; n &lt; max_size &amp;&amp; \</div><div class='del'>-			     (c = getc( yyin )) != EOF &amp;&amp; c != '\n'; ++n ) \</div><div class='del'>-			buf[n] = (char) c; \</div><div class='del'>-		if ( c == '\n' ) \</div><div class='del'>-			buf[n++] = (char) c; \</div><div class='del'>-		if ( c == EOF &amp;&amp; ferror( yyin ) ) \</div><div class='del'>-			YY_FATAL_ERROR( "input in flex scanner failed" ); \</div><div class='del'>-		result = n; \</div><div class='del'>-		} \</div><div class='del'>-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \</div><div class='del'>-		  &amp;&amp; ferror( yyin ) ) \</div><div class='del'>-		YY_FATAL_ERROR( "input in flex scanner failed" );</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* No semi-colon after return; correct usage is to write "yyterminate();" -</div><div class='del'>- * we don't want an extra ';' after the "return" because that will cause</div><div class='del'>- * some compilers to complain about unreachable statements.</div><div class='del'>- */</div><div class='del'>-#ifndef yyterminate</div><div class='del'>-#define yyterminate() return YY_NULL</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Number of entries by which start-condition stack grows. */</div><div class='del'>-#ifndef YY_START_STACK_INCR</div><div class='del'>-#define YY_START_STACK_INCR 25</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Report a fatal error. */</div><div class='del'>-#ifndef YY_FATAL_ERROR</div><div class='del'>-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Default declaration of generated scanner - a define so the user can</div><div class='del'>- * easily add parameters.</div><div class='del'>- */</div><div class='del'>-#ifndef YY_DECL</div><div class='del'>-#define YY_DECL int yylex YY_PROTO(( void ))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Code executed at the beginning of each rule, after yytext and yyleng</div><div class='del'>- * have been set up.</div><div class='del'>- */</div><div class='del'>-#ifndef YY_USER_ACTION</div><div class='del'>-#define YY_USER_ACTION</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Code executed at the end of each rule. */</div><div class='del'>-#ifndef YY_BREAK</div><div class='del'>-#define YY_BREAK break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define YY_RULE_SETUP \</div><div class='del'>-	YY_USER_ACTION</div><div class='del'>-</div><div class='del'>-YY_DECL</div><div class='del'>-	{</div><div class='del'>-	register yy_state_type yy_current_state;</div><div class='del'>-	register char *yy_cp = NULL, *yy_bp = NULL;</div><div class='del'>-	register int yy_act;</div><div class='del'>-</div><div class='del'>-#line 63 "lex_config.l"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	if ( yy_init )</div><div class='del'>-		{</div><div class='del'>-		yy_init = 0;</div><div class='del'>-</div><div class='del'>-#ifdef YY_USER_INIT</div><div class='del'>-		YY_USER_INIT;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-		if ( ! yy_start )</div><div class='del'>-			yy_start = 1;	/* first start state */</div><div class='del'>-</div><div class='del'>-		if ( ! yyin )</div><div class='del'>-			yyin = stdin;</div><div class='del'>-</div><div class='del'>-		if ( ! yyout )</div><div class='del'>-			yyout = stdout;</div><div class='del'>-</div><div class='del'>-		if ( ! yy_current_buffer )</div><div class='del'>-			yy_current_buffer =</div><div class='del'>-				yy_create_buffer( yyin, YY_BUF_SIZE );</div><div class='del'>-</div><div class='del'>-		yy_load_buffer_state();</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	while ( 1 )		/* loops until end-of-file is reached */</div><div class='del'>-		{</div><div class='del'>-		yy_cp = yy_c_buf_p;</div><div class='del'>-</div><div class='del'>-		/* Support of yytext. */</div><div class='del'>-		*yy_cp = yy_hold_char;</div><div class='del'>-</div><div class='del'>-		/* yy_bp points to the position in yy_ch_buf of the start of</div><div class='del'>-		 * the current run.</div><div class='del'>-		 */</div><div class='del'>-		yy_bp = yy_cp;</div><div class='del'>-</div><div class='del'>-		yy_current_state = yy_start;</div><div class='del'>-yy_match:</div><div class='del'>-		do</div><div class='del'>-			{</div><div class='del'>-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];</div><div class='del'>-			if ( yy_accept[yy_current_state] )</div><div class='del'>-				{</div><div class='del'>-				yy_last_accepting_state = yy_current_state;</div><div class='del'>-				yy_last_accepting_cpos = yy_cp;</div><div class='del'>-				}</div><div class='del'>-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )</div><div class='del'>-				{</div><div class='del'>-				yy_current_state = (int) yy_def[yy_current_state];</div><div class='del'>-				if ( yy_current_state &gt;= 247 )</div><div class='del'>-					yy_c = yy_meta[(unsigned int) yy_c];</div><div class='del'>-				}</div><div class='del'>-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];</div><div class='del'>-			++yy_cp;</div><div class='del'>-			}</div><div class='del'>-		while ( yy_base[yy_current_state] != 294 );</div><div class='del'>-</div><div class='del'>-yy_find_action:</div><div class='del'>-		yy_act = yy_accept[yy_current_state];</div><div class='del'>-		if ( yy_act == 0 )</div><div class='del'>-			{ /* have to back up */</div><div class='del'>-			yy_cp = yy_last_accepting_cpos;</div><div class='del'>-			yy_current_state = yy_last_accepting_state;</div><div class='del'>-			yy_act = yy_accept[yy_current_state];</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		YY_DO_BEFORE_ACTION;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-do_action:	/* This label is used only to access EOF actions. */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-		switch ( yy_act )</div><div class='del'>-	{ /* beginning of action switch */</div><div class='del'>-			case 0: /* must back up */</div><div class='del'>-			/* undo the effects of YY_DO_BEFORE_ACTION */</div><div class='del'>-			*yy_cp = yy_hold_char;</div><div class='del'>-			yy_cp = yy_last_accepting_cpos;</div><div class='del'>-			yy_current_state = yy_last_accepting_state;</div><div class='del'>-			goto yy_find_action;</div><div class='del'>-</div><div class='del'>-case 1:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 65 "lex_config.l"</div><div class='del'>-BEGIN(src);</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 2:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 66 "lex_config.l"</div><div class='del'>-/* skip */ ;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 3:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 67 "lex_config.l"</div><div class='del'>-do_source(yytext); BEGIN(INITIAL);</div><div class='del'>-	YY_BREAK</div><div class='del'>-case YY_STATE_EOF(INITIAL):</div><div class='del'>-case YY_STATE_EOF(src):</div><div class='del'>-#line 68 "lex_config.l"</div><div class='del'>-if (do_eof()) yyterminate();</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 4:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 70 "lex_config.l"</div><div class='del'>-current_lineno++;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 5:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 71 "lex_config.l"</div><div class='del'>-/* skip */ ;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 6:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 72 "lex_config.l"</div><div class='del'>-/* skip */ ;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 7:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 74 "lex_config.l"</div><div class='del'>-return ANONYMOUS;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 8:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 75 "lex_config.l"</div><div class='del'>-return BIND;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 9:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 76 "lex_config.l"</div><div class='del'>-return CIS;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 10:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 77 "lex_config.l"</div><div class='del'>-return CARD;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 11:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 78 "lex_config.l"</div><div class='del'>-return CLASS;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 12:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 79 "lex_config.l"</div><div class='del'>-return DEFAULT;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 13:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 80 "lex_config.l"</div><div class='del'>-return DEVICE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 14:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 81 "lex_config.l"</div><div class='del'>-return DTYPE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 15:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 82 "lex_config.l"</div><div class='del'>-return EXCLUDE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 16:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 83 "lex_config.l"</div><div class='del'>-return FUNCTION;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 17:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 84 "lex_config.l"</div><div class='del'>-return INCLUDE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 18:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 85 "lex_config.l"</div><div class='del'>-return IRQ_NO;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 19:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 86 "lex_config.l"</div><div class='del'>-return JEDEC;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 20:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 87 "lex_config.l"</div><div class='del'>-return MANFID;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 21:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 88 "lex_config.l"</div><div class='del'>-return MEMORY;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 22:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 89 "lex_config.l"</div><div class='del'>-return MODULE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 23:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 90 "lex_config.l"</div><div class='del'>-return MTD;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 24:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 91 "lex_config.l"</div><div class='del'>-return NEEDS_MTD;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 25:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 92 "lex_config.l"</div><div class='del'>-return OPTS;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 26:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 93 "lex_config.l"</div><div class='del'>-return PCI;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 27:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 94 "lex_config.l"</div><div class='del'>-return PORT;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 28:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 95 "lex_config.l"</div><div class='del'>-return REGION;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 29:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 96 "lex_config.l"</div><div class='del'>-return RESERVE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 30:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 97 "lex_config.l"</div><div class='del'>-return TO;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 31:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 98 "lex_config.l"</div><div class='del'>-return TUPLE;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 32:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 99 "lex_config.l"</div><div class='del'>-return VERSION;</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 33:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 101 "lex_config.l"</div><div class='del'>-return lex_number("1");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 34:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 102 "lex_config.l"</div><div class='del'>-return lex_number("2");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 35:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 103 "lex_config.l"</div><div class='del'>-return lex_number("3");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 36:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 104 "lex_config.l"</div><div class='del'>-return lex_number("4");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 37:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 105 "lex_config.l"</div><div class='del'>-return lex_number("5");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 38:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 106 "lex_config.l"</div><div class='del'>-return lex_number("6");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 39:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 107 "lex_config.l"</div><div class='del'>-return lex_number("7");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 40:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 108 "lex_config.l"</div><div class='del'>-return lex_number("8");</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 41:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 110 "lex_config.l"</div><div class='del'>-return lex_number(yytext);</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 42:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 112 "lex_config.l"</div><div class='del'>-return lex_number(yytext);</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 43:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 114 "lex_config.l"</div><div class='del'>-return lex_string(yytext);</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 44:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 116 "lex_config.l"</div><div class='del'>-return yytext[0];</div><div class='del'>-	YY_BREAK</div><div class='del'>-case 45:</div><div class='del'>-YY_RULE_SETUP</div><div class='del'>-#line 118 "lex_config.l"</div><div class='del'>-ECHO;</div><div class='del'>-	YY_BREAK</div><div class='del'>-</div><div class='del'>-	case YY_END_OF_BUFFER:</div><div class='del'>-		{</div><div class='del'>-		/* Amount of text matched not including the EOB char. */</div><div class='del'>-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;</div><div class='del'>-</div><div class='del'>-		/* Undo the effects of YY_DO_BEFORE_ACTION. */</div><div class='del'>-		*yy_cp = yy_hold_char;</div><div class='del'>-		YY_RESTORE_YY_MORE_OFFSET</div><div class='del'>-</div><div class='del'>-		if ( yy_current_buffer-&gt;yy_buffer_status == YY_BUFFER_NEW )</div><div class='del'>-			{</div><div class='del'>-			/* We're scanning a new file or input source.  It's</div><div class='del'>-			 * possible that this happened because the user</div><div class='del'>-			 * just pointed yyin at a new source and called</div><div class='del'>-			 * yylex().  If so, then we have to assure</div><div class='del'>-			 * consistency between yy_current_buffer and our</div><div class='del'>-			 * globals.  Here is the right place to do so, because</div><div class='del'>-			 * this is the first action (other than possibly a</div><div class='del'>-			 * back-up) that will match for the new input source.</div><div class='del'>-			 */</div><div class='del'>-			yy_n_chars = yy_current_buffer-&gt;yy_n_chars;</div><div class='del'>-			yy_current_buffer-&gt;yy_input_file = yyin;</div><div class='del'>-			yy_current_buffer-&gt;yy_buffer_status = YY_BUFFER_NORMAL;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		/* Note that here we test for yy_c_buf_p "&lt;=" to the position</div><div class='del'>-		 * of the first EOB in the buffer, since yy_c_buf_p will</div><div class='del'>-		 * already have been incremented past the NUL character</div><div class='del'>-		 * (since all states make transitions on EOB to the</div><div class='del'>-		 * end-of-buffer state).  Contrast this with the test</div><div class='del'>-		 * in input().</div><div class='del'>-		 */</div><div class='del'>-		if ( yy_c_buf_p &lt;= &amp;yy_current_buffer-&gt;yy_ch_buf[yy_n_chars] )</div><div class='del'>-			{ /* This was really a NUL. */</div><div class='del'>-			yy_state_type yy_next_state;</div><div class='del'>-</div><div class='del'>-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;</div><div class='del'>-</div><div class='del'>-			yy_current_state = yy_get_previous_state();</div><div class='del'>-</div><div class='del'>-			/* Okay, we're now positioned to make the NUL</div><div class='del'>-			 * transition.  We couldn't have</div><div class='del'>-			 * yy_get_previous_state() go ahead and do it</div><div class='del'>-			 * for us because it doesn't know how to deal</div><div class='del'>-			 * with the possibility of jamming (and we don't</div><div class='del'>-			 * want to build jamming into it because then it</div><div class='del'>-			 * will run more slowly).</div><div class='del'>-			 */</div><div class='del'>-</div><div class='del'>-			yy_next_state = yy_try_NUL_trans( yy_current_state );</div><div class='del'>-</div><div class='del'>-			yy_bp = yytext_ptr + YY_MORE_ADJ;</div><div class='del'>-</div><div class='del'>-			if ( yy_next_state )</div><div class='del'>-				{</div><div class='del'>-				/* Consume the NUL. */</div><div class='del'>-				yy_cp = ++yy_c_buf_p;</div><div class='del'>-				yy_current_state = yy_next_state;</div><div class='del'>-				goto yy_match;</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-			else</div><div class='del'>-				{</div><div class='del'>-				yy_cp = yy_c_buf_p;</div><div class='del'>-				goto yy_find_action;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		else switch ( yy_get_next_buffer() )</div><div class='del'>-			{</div><div class='del'>-			case EOB_ACT_END_OF_FILE:</div><div class='del'>-				{</div><div class='del'>-				yy_did_buffer_switch_on_eof = 0;</div><div class='del'>-</div><div class='del'>-				if ( yywrap() )</div><div class='del'>-					{</div><div class='del'>-					/* Note: because we've taken care in</div><div class='del'>-					 * yy_get_next_buffer() to have set up</div><div class='del'>-					 * yytext, we can now set up</div><div class='del'>-					 * yy_c_buf_p so that if some total</div><div class='del'>-					 * hoser (like flex itself) wants to</div><div class='del'>-					 * call the scanner after we return the</div><div class='del'>-					 * YY_NULL, it'll still work - another</div><div class='del'>-					 * YY_NULL will get returned.</div><div class='del'>-					 */</div><div class='del'>-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;</div><div class='del'>-</div><div class='del'>-					yy_act = YY_STATE_EOF(YY_START);</div><div class='del'>-					goto do_action;</div><div class='del'>-					}</div><div class='del'>-</div><div class='del'>-				else</div><div class='del'>-					{</div><div class='del'>-					if ( ! yy_did_buffer_switch_on_eof )</div><div class='del'>-						YY_NEW_FILE;</div><div class='del'>-					}</div><div class='del'>-				break;</div><div class='del'>-				}</div><div class='del'>-</div><div class='del'>-			case EOB_ACT_CONTINUE_SCAN:</div><div class='del'>-				yy_c_buf_p =</div><div class='del'>-					yytext_ptr + yy_amount_of_matched_text;</div><div class='del'>-</div><div class='del'>-				yy_current_state = yy_get_previous_state();</div><div class='del'>-</div><div class='del'>-				yy_cp = yy_c_buf_p;</div><div class='del'>-				yy_bp = yytext_ptr + YY_MORE_ADJ;</div><div class='del'>-				goto yy_match;</div><div class='del'>-</div><div class='del'>-			case EOB_ACT_LAST_MATCH:</div><div class='del'>-				yy_c_buf_p =</div><div class='del'>-				&amp;yy_current_buffer-&gt;yy_ch_buf[yy_n_chars];</div><div class='del'>-</div><div class='del'>-				yy_current_state = yy_get_previous_state();</div><div class='del'>-</div><div class='del'>-				yy_cp = yy_c_buf_p;</div><div class='del'>-				yy_bp = yytext_ptr + YY_MORE_ADJ;</div><div class='del'>-				goto yy_find_action;</div><div class='del'>-			}</div><div class='del'>-		break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-		YY_FATAL_ERROR(</div><div class='del'>-			"fatal flex scanner internal error--no action found" );</div><div class='del'>-	} /* end of action switch */</div><div class='del'>-		} /* end of scanning one token */</div><div class='del'>-	} /* end of yylex */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* yy_get_next_buffer - try to read in a new buffer</div><div class='del'>- *</div><div class='del'>- * Returns a code representing an action:</div><div class='del'>- *	EOB_ACT_LAST_MATCH -</div><div class='del'>- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position</div><div class='del'>- *	EOB_ACT_END_OF_FILE - end of file</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int yy_get_next_buffer()</div><div class='del'>-	{</div><div class='del'>-	register char *dest = yy_current_buffer-&gt;yy_ch_buf;</div><div class='del'>-	register char *source = yytext_ptr;</div><div class='del'>-	register int number_to_move, i;</div><div class='del'>-	int ret_val;</div><div class='del'>-</div><div class='del'>-	if ( yy_c_buf_p &gt; &amp;yy_current_buffer-&gt;yy_ch_buf[yy_n_chars + 1] )</div><div class='del'>-		YY_FATAL_ERROR(</div><div class='del'>-		"fatal flex scanner internal error--end of buffer missed" );</div><div class='del'>-</div><div class='del'>-	if ( yy_current_buffer-&gt;yy_fill_buffer == 0 )</div><div class='del'>-		{ /* Don't try to fill the buffer, so this is an EOF. */</div><div class='del'>-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )</div><div class='del'>-			{</div><div class='del'>-			/* We matched a single character, the EOB, so</div><div class='del'>-			 * treat this as a final EOF.</div><div class='del'>-			 */</div><div class='del'>-			return EOB_ACT_END_OF_FILE;</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		else</div><div class='del'>-			{</div><div class='del'>-			/* We matched some text prior to the EOB, first</div><div class='del'>-			 * process it.</div><div class='del'>-			 */</div><div class='del'>-			return EOB_ACT_LAST_MATCH;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	/* Try to read more data. */</div><div class='del'>-</div><div class='del'>-	/* First move last chars to start of buffer. */</div><div class='del'>-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;</div><div class='del'>-</div><div class='del'>-	for ( i = 0; i &lt; number_to_move; ++i )</div><div class='del'>-		*(dest++) = *(source++);</div><div class='del'>-</div><div class='del'>-	if ( yy_current_buffer-&gt;yy_buffer_status == YY_BUFFER_EOF_PENDING )</div><div class='del'>-		/* don't do the read, it's not guaranteed to return an EOF,</div><div class='del'>-		 * just force an EOF</div><div class='del'>-		 */</div><div class='del'>-		yy_current_buffer-&gt;yy_n_chars = yy_n_chars = 0;</div><div class='del'>-</div><div class='del'>-	else</div><div class='del'>-		{</div><div class='del'>-		int num_to_read =</div><div class='del'>-			yy_current_buffer-&gt;yy_buf_size - number_to_move - 1;</div><div class='del'>-</div><div class='del'>-		while ( num_to_read &lt;= 0 )</div><div class='del'>-			{ /* Not enough room in the buffer - grow it. */</div><div class='del'>-#ifdef YY_USES_REJECT</div><div class='del'>-			YY_FATAL_ERROR(</div><div class='del'>-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );</div><div class='del'>-#else</div><div class='del'>-</div><div class='del'>-			/* just a shorter name for the current buffer */</div><div class='del'>-			YY_BUFFER_STATE b = yy_current_buffer;</div><div class='del'>-</div><div class='del'>-			int yy_c_buf_p_offset =</div><div class='del'>-				(int) (yy_c_buf_p - b-&gt;yy_ch_buf);</div><div class='del'>-</div><div class='del'>-			if ( b-&gt;yy_is_our_buffer )</div><div class='del'>-				{</div><div class='del'>-				int new_size = b-&gt;yy_buf_size * 2;</div><div class='del'>-</div><div class='del'>-				if ( new_size &lt;= 0 )</div><div class='del'>-					b-&gt;yy_buf_size += b-&gt;yy_buf_size / 8;</div><div class='del'>-				else</div><div class='del'>-					b-&gt;yy_buf_size *= 2;</div><div class='del'>-</div><div class='del'>-				b-&gt;yy_ch_buf = (char *)</div><div class='del'>-					/* Include room in for 2 EOB chars. */</div><div class='del'>-					yy_flex_realloc( (void *) b-&gt;yy_ch_buf,</div><div class='del'>-							 b-&gt;yy_buf_size + 2 );</div><div class='del'>-				}</div><div class='del'>-			else</div><div class='del'>-				/* Can't grow it, we don't own it. */</div><div class='del'>-				b-&gt;yy_ch_buf = 0;</div><div class='del'>-</div><div class='del'>-			if ( ! b-&gt;yy_ch_buf )</div><div class='del'>-				YY_FATAL_ERROR(</div><div class='del'>-				"fatal error - scanner input buffer overflow" );</div><div class='del'>-</div><div class='del'>-			yy_c_buf_p = &amp;b-&gt;yy_ch_buf[yy_c_buf_p_offset];</div><div class='del'>-</div><div class='del'>-			num_to_read = yy_current_buffer-&gt;yy_buf_size -</div><div class='del'>-						number_to_move - 1;</div><div class='del'>-#endif</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		if ( num_to_read &gt; YY_READ_BUF_SIZE )</div><div class='del'>-			num_to_read = YY_READ_BUF_SIZE;</div><div class='del'>-</div><div class='del'>-		/* Read in more data. */</div><div class='del'>-		YY_INPUT( (&amp;yy_current_buffer-&gt;yy_ch_buf[number_to_move]),</div><div class='del'>-			yy_n_chars, num_to_read );</div><div class='del'>-</div><div class='del'>-		yy_current_buffer-&gt;yy_n_chars = yy_n_chars;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	if ( yy_n_chars == 0 )</div><div class='del'>-		{</div><div class='del'>-		if ( number_to_move == YY_MORE_ADJ )</div><div class='del'>-			{</div><div class='del'>-			ret_val = EOB_ACT_END_OF_FILE;</div><div class='del'>-			yyrestart( yyin );</div><div class='del'>-			}</div><div class='del'>-</div><div class='del'>-		else</div><div class='del'>-			{</div><div class='del'>-			ret_val = EOB_ACT_LAST_MATCH;</div><div class='del'>-			yy_current_buffer-&gt;yy_buffer_status =</div><div class='del'>-				YY_BUFFER_EOF_PENDING;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	else</div><div class='del'>-		ret_val = EOB_ACT_CONTINUE_SCAN;</div><div class='del'>-</div><div class='del'>-	yy_n_chars += number_to_move;</div><div class='del'>-	yy_current_buffer-&gt;yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;</div><div class='del'>-	yy_current_buffer-&gt;yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;</div><div class='del'>-</div><div class='del'>-	yytext_ptr = &amp;yy_current_buffer-&gt;yy_ch_buf[0];</div><div class='del'>-</div><div class='del'>-	return ret_val;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* yy_get_previous_state - get the state just before the EOB char was reached */</div><div class='del'>-</div><div class='del'>-static yy_state_type yy_get_previous_state()</div><div class='del'>-	{</div><div class='del'>-	register yy_state_type yy_current_state;</div><div class='del'>-	register char *yy_cp;</div><div class='del'>-</div><div class='del'>-	yy_current_state = yy_start;</div><div class='del'>-</div><div class='del'>-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp &lt; yy_c_buf_p; ++yy_cp )</div><div class='del'>-		{</div><div class='del'>-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);</div><div class='del'>-		if ( yy_accept[yy_current_state] )</div><div class='del'>-			{</div><div class='del'>-			yy_last_accepting_state = yy_current_state;</div><div class='del'>-			yy_last_accepting_cpos = yy_cp;</div><div class='del'>-			}</div><div class='del'>-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )</div><div class='del'>-			{</div><div class='del'>-			yy_current_state = (int) yy_def[yy_current_state];</div><div class='del'>-			if ( yy_current_state &gt;= 247 )</div><div class='del'>-				yy_c = yy_meta[(unsigned int) yy_c];</div><div class='del'>-			}</div><div class='del'>-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	return yy_current_state;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* yy_try_NUL_trans - try to make a transition on the NUL character</div><div class='del'>- *</div><div class='del'>- * synopsis</div><div class='del'>- *	next_state = yy_try_NUL_trans( current_state );</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )</div><div class='del'>-#else</div><div class='del'>-static yy_state_type yy_try_NUL_trans( yy_current_state )</div><div class='del'>-yy_state_type yy_current_state;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	register int yy_is_jam;</div><div class='del'>-	register char *yy_cp = yy_c_buf_p;</div><div class='del'>-</div><div class='del'>-	register YY_CHAR yy_c = 1;</div><div class='del'>-	if ( yy_accept[yy_current_state] )</div><div class='del'>-		{</div><div class='del'>-		yy_last_accepting_state = yy_current_state;</div><div class='del'>-		yy_last_accepting_cpos = yy_cp;</div><div class='del'>-		}</div><div class='del'>-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )</div><div class='del'>-		{</div><div class='del'>-		yy_current_state = (int) yy_def[yy_current_state];</div><div class='del'>-		if ( yy_current_state &gt;= 247 )</div><div class='del'>-			yy_c = yy_meta[(unsigned int) yy_c];</div><div class='del'>-		}</div><div class='del'>-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];</div><div class='del'>-	yy_is_jam = (yy_current_state == 246);</div><div class='del'>-</div><div class='del'>-	return yy_is_jam ? 0 : yy_current_state;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #ifndef YY_NO_UNPUT</div><div class='del'>-//mdk-stage1// #ifdef YY_USE_PROTOS</div><div class='del'>-//mdk-stage1// static void yyunput( int c, register char *yy_bp )</div><div class='del'>-//mdk-stage1// #else</div><div class='del'>-//mdk-stage1// static void yyunput( c, yy_bp )</div><div class='del'>-//mdk-stage1// int c;</div><div class='del'>-//mdk-stage1// register char *yy_bp;</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1// 	{</div><div class='del'>-//mdk-stage1// 	register char *yy_cp = yy_c_buf_p;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	/* undo effects of setting up yytext */</div><div class='del'>-//mdk-stage1// 	*yy_cp = yy_hold_char;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	if ( yy_cp &lt; yy_current_buffer-&gt;yy_ch_buf + 2 )</div><div class='del'>-//mdk-stage1// 		{ /* need to shift things up to make room */</div><div class='del'>-//mdk-stage1// 		/* +2 for EOB chars. */</div><div class='del'>-//mdk-stage1// 		register int number_to_move = yy_n_chars + 2;</div><div class='del'>-//mdk-stage1// 		register char *dest = &amp;yy_current_buffer-&gt;yy_ch_buf[</div><div class='del'>-//mdk-stage1// 					yy_current_buffer-&gt;yy_buf_size + 2];</div><div class='del'>-//mdk-stage1// 		register char *source =</div><div class='del'>-//mdk-stage1// 				&amp;yy_current_buffer-&gt;yy_ch_buf[number_to_move];</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 		while ( source &gt; yy_current_buffer-&gt;yy_ch_buf )</div><div class='del'>-//mdk-stage1// 			*--dest = *--source;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 		yy_cp += (int) (dest - source);</div><div class='del'>-//mdk-stage1// 		yy_bp += (int) (dest - source);</div><div class='del'>-//mdk-stage1// 		yy_current_buffer-&gt;yy_n_chars =</div><div class='del'>-//mdk-stage1// 			yy_n_chars = yy_current_buffer-&gt;yy_buf_size;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 		if ( yy_cp &lt; yy_current_buffer-&gt;yy_ch_buf + 2 )</div><div class='del'>-//mdk-stage1// 			YY_FATAL_ERROR( "flex scanner push-back overflow" );</div><div class='del'>-//mdk-stage1// 		}</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	*--yy_cp = (char) c;</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// 	yytext_ptr = yy_bp;</div><div class='del'>-//mdk-stage1// 	yy_hold_char = *yy_cp;</div><div class='del'>-//mdk-stage1// 	yy_c_buf_p = yy_cp;</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1// #endif	/* ifndef YY_NO_UNPUT */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-static int yyinput()</div><div class='del'>-#else</div><div class='del'>-static int input()</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	int c;</div><div class='del'>-</div><div class='del'>-	*yy_c_buf_p = yy_hold_char;</div><div class='del'>-</div><div class='del'>-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )</div><div class='del'>-		{</div><div class='del'>-		/* yy_c_buf_p now points to the character we want to return.</div><div class='del'>-		 * If this occurs *before* the EOB characters, then it's a</div><div class='del'>-		 * valid NUL; if not, then we've hit the end of the buffer.</div><div class='del'>-		 */</div><div class='del'>-		if ( yy_c_buf_p &lt; &amp;yy_current_buffer-&gt;yy_ch_buf[yy_n_chars] )</div><div class='del'>-			/* This was really a NUL. */</div><div class='del'>-			*yy_c_buf_p = '\0';</div><div class='del'>-</div><div class='del'>-		else</div><div class='del'>-			{ /* need more input */</div><div class='del'>-			int offset = yy_c_buf_p - yytext_ptr;</div><div class='del'>-			++yy_c_buf_p;</div><div class='del'>-</div><div class='del'>-			switch ( yy_get_next_buffer() )</div><div class='del'>-				{</div><div class='del'>-				case EOB_ACT_LAST_MATCH:</div><div class='del'>-					/* This happens because yy_g_n_b()</div><div class='del'>-					 * sees that we've accumulated a</div><div class='del'>-					 * token and flags that we need to</div><div class='del'>-					 * try matching the token before</div><div class='del'>-					 * proceeding.  But for input(),</div><div class='del'>-					 * there's no matching to consider.</div><div class='del'>-					 * So convert the EOB_ACT_LAST_MATCH</div><div class='del'>-					 * to EOB_ACT_END_OF_FILE.</div><div class='del'>-					 */</div><div class='del'>-</div><div class='del'>-					/* Reset buffer status. */</div><div class='del'>-					yyrestart( yyin );</div><div class='del'>-</div><div class='del'>-					/* fall through */</div><div class='del'>-</div><div class='del'>-				case EOB_ACT_END_OF_FILE:</div><div class='del'>-					{</div><div class='del'>-					if ( yywrap() )</div><div class='del'>-						return EOF;</div><div class='del'>-</div><div class='del'>-					if ( ! yy_did_buffer_switch_on_eof )</div><div class='del'>-						YY_NEW_FILE;</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-					return yyinput();</div><div class='del'>-#else</div><div class='del'>-					return input();</div><div class='del'>-#endif</div><div class='del'>-					}</div><div class='del'>-</div><div class='del'>-				case EOB_ACT_CONTINUE_SCAN:</div><div class='del'>-					yy_c_buf_p = yytext_ptr + offset;</div><div class='del'>-					break;</div><div class='del'>-				}</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */</div><div class='del'>-	*yy_c_buf_p = '\0';	/* preserve yytext */</div><div class='del'>-	yy_hold_char = *++yy_c_buf_p;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	return c;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yyrestart( FILE *input_file )</div><div class='del'>-#else</div><div class='del'>-void yyrestart( input_file )</div><div class='del'>-FILE *input_file;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	if ( ! yy_current_buffer )</div><div class='del'>-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );</div><div class='del'>-</div><div class='del'>-	yy_init_buffer( yy_current_buffer, input_file );</div><div class='del'>-	yy_load_buffer_state();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )</div><div class='del'>-#else</div><div class='del'>-void yy_switch_to_buffer( new_buffer )</div><div class='del'>-YY_BUFFER_STATE new_buffer;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	if ( yy_current_buffer == new_buffer )</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	if ( yy_current_buffer )</div><div class='del'>-		{</div><div class='del'>-		/* Flush out information for old buffer. */</div><div class='del'>-		*yy_c_buf_p = yy_hold_char;</div><div class='del'>-		yy_current_buffer-&gt;yy_buf_pos = yy_c_buf_p;</div><div class='del'>-		yy_current_buffer-&gt;yy_n_chars = yy_n_chars;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	yy_current_buffer = new_buffer;</div><div class='del'>-	yy_load_buffer_state();</div><div class='del'>-</div><div class='del'>-	/* We don't actually know whether we did this switch during</div><div class='del'>-	 * EOF (yywrap()) processing, but the only time this flag</div><div class='del'>-	 * is looked at is after yywrap() is called, so it's safe</div><div class='del'>-	 * to go ahead and always set it.</div><div class='del'>-	 */</div><div class='del'>-	yy_did_buffer_switch_on_eof = 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yy_load_buffer_state( void )</div><div class='del'>-#else</div><div class='del'>-void yy_load_buffer_state()</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	yy_n_chars = yy_current_buffer-&gt;yy_n_chars;</div><div class='del'>-	yytext_ptr = yy_c_buf_p = yy_current_buffer-&gt;yy_buf_pos;</div><div class='del'>-	yyin = yy_current_buffer-&gt;yy_input_file;</div><div class='del'>-	yy_hold_char = *yy_c_buf_p;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )</div><div class='del'>-#else</div><div class='del'>-YY_BUFFER_STATE yy_create_buffer( file, size )</div><div class='del'>-FILE *file;</div><div class='del'>-int size;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	YY_BUFFER_STATE b;</div><div class='del'>-</div><div class='del'>-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );</div><div class='del'>-	if ( ! b )</div><div class='del'>-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_buf_size = size;</div><div class='del'>-</div><div class='del'>-	/* yy_ch_buf has to be 2 characters longer than the size given because</div><div class='del'>-	 * we need to put in 2 end-of-buffer characters.</div><div class='del'>-	 */</div><div class='del'>-	b-&gt;yy_ch_buf = (char *) yy_flex_alloc( b-&gt;yy_buf_size + 2 );</div><div class='del'>-	if ( ! b-&gt;yy_ch_buf )</div><div class='del'>-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_is_our_buffer = 1;</div><div class='del'>-</div><div class='del'>-	yy_init_buffer( b, file );</div><div class='del'>-</div><div class='del'>-	return b;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yy_delete_buffer( YY_BUFFER_STATE b )</div><div class='del'>-#else</div><div class='del'>-void yy_delete_buffer( b )</div><div class='del'>-YY_BUFFER_STATE b;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	if ( ! b )</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	if ( b == yy_current_buffer )</div><div class='del'>-		yy_current_buffer = (YY_BUFFER_STATE) 0;</div><div class='del'>-</div><div class='del'>-	if ( b-&gt;yy_is_our_buffer )</div><div class='del'>-		yy_flex_free( (void *) b-&gt;yy_ch_buf );</div><div class='del'>-</div><div class='del'>-	yy_flex_free( (void *) b );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_ALWAYS_INTERACTIVE</div><div class='del'>-#ifndef YY_NEVER_INTERACTIVE</div><div class='del'>-extern int isatty YY_PROTO(( int ));</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )</div><div class='del'>-#else</div><div class='del'>-void yy_init_buffer( b, file )</div><div class='del'>-YY_BUFFER_STATE b;</div><div class='del'>-FILE *file;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	{</div><div class='del'>-	yy_flush_buffer( b );</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_input_file = file;</div><div class='del'>-	b-&gt;yy_fill_buffer = 1;</div><div class='del'>-</div><div class='del'>-#if YY_ALWAYS_INTERACTIVE</div><div class='del'>-	b-&gt;yy_is_interactive = 1;</div><div class='del'>-#else</div><div class='del'>-#if YY_NEVER_INTERACTIVE</div><div class='del'>-	b-&gt;yy_is_interactive = 0;</div><div class='del'>-#else</div><div class='del'>-	b-&gt;yy_is_interactive = file ? (isatty( fileno(file) ) &gt; 0) : 0;</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-void yy_flush_buffer( YY_BUFFER_STATE b )</div><div class='del'>-#else</div><div class='del'>-void yy_flush_buffer( b )</div><div class='del'>-YY_BUFFER_STATE b;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	{</div><div class='del'>-	if ( ! b )</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_n_chars = 0;</div><div class='del'>-</div><div class='del'>-	/* We always need two end-of-buffer characters.  The first causes</div><div class='del'>-	 * a transition to the end-of-buffer state.  The second causes</div><div class='del'>-	 * a jam in that state.</div><div class='del'>-	 */</div><div class='del'>-	b-&gt;yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;</div><div class='del'>-	b-&gt;yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_buf_pos = &amp;b-&gt;yy_ch_buf[0];</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_at_bol = 1;</div><div class='del'>-	b-&gt;yy_buffer_status = YY_BUFFER_NEW;</div><div class='del'>-</div><div class='del'>-	if ( b == yy_current_buffer )</div><div class='del'>-		yy_load_buffer_state();</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_SCAN_BUFFER</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )</div><div class='del'>-#else</div><div class='del'>-YY_BUFFER_STATE yy_scan_buffer( base, size )</div><div class='del'>-char *base;</div><div class='del'>-yy_size_t size;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	YY_BUFFER_STATE b;</div><div class='del'>-</div><div class='del'>-	if ( size &lt; 2 ||</div><div class='del'>-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||</div><div class='del'>-	     base[size-1] != YY_END_OF_BUFFER_CHAR )</div><div class='del'>-		/* They forgot to leave room for the EOB's. */</div><div class='del'>-		return 0;</div><div class='del'>-</div><div class='del'>-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );</div><div class='del'>-	if ( ! b )</div><div class='del'>-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );</div><div class='del'>-</div><div class='del'>-	b-&gt;yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */</div><div class='del'>-	b-&gt;yy_buf_pos = b-&gt;yy_ch_buf = base;</div><div class='del'>-	b-&gt;yy_is_our_buffer = 0;</div><div class='del'>-	b-&gt;yy_input_file = 0;</div><div class='del'>-	b-&gt;yy_n_chars = b-&gt;yy_buf_size;</div><div class='del'>-	b-&gt;yy_is_interactive = 0;</div><div class='del'>-	b-&gt;yy_at_bol = 1;</div><div class='del'>-	b-&gt;yy_fill_buffer = 0;</div><div class='del'>-	b-&gt;yy_buffer_status = YY_BUFFER_NEW;</div><div class='del'>-</div><div class='del'>-	yy_switch_to_buffer( b );</div><div class='del'>-</div><div class='del'>-	return b;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_SCAN_STRING</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )</div><div class='del'>-#else</div><div class='del'>-YY_BUFFER_STATE yy_scan_string( yy_str )</div><div class='del'>-yyconst char *yy_str;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	int len;</div><div class='del'>-	for ( len = 0; yy_str[len]; ++len )</div><div class='del'>-		;</div><div class='del'>-</div><div class='del'>-	return yy_scan_bytes( yy_str, len );</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_SCAN_BYTES</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )</div><div class='del'>-#else</div><div class='del'>-YY_BUFFER_STATE yy_scan_bytes( bytes, len )</div><div class='del'>-yyconst char *bytes;</div><div class='del'>-int len;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	YY_BUFFER_STATE b;</div><div class='del'>-	char *buf;</div><div class='del'>-	yy_size_t n;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	/* Get memory for full buffer, including space for trailing EOB's. */</div><div class='del'>-	n = len + 2;</div><div class='del'>-	buf = (char *) yy_flex_alloc( n );</div><div class='del'>-	if ( ! buf )</div><div class='del'>-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );</div><div class='del'>-</div><div class='del'>-	for ( i = 0; i &lt; len; ++i )</div><div class='del'>-		buf[i] = bytes[i];</div><div class='del'>-</div><div class='del'>-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;</div><div class='del'>-</div><div class='del'>-	b = yy_scan_buffer( buf, n );</div><div class='del'>-	if ( ! b )</div><div class='del'>-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );</div><div class='del'>-</div><div class='del'>-	/* It's okay to grow etc. this buffer, and we should throw it</div><div class='del'>-	 * away when we're done.</div><div class='del'>-	 */</div><div class='del'>-	b-&gt;yy_is_our_buffer = 1;</div><div class='del'>-</div><div class='del'>-	return b;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_PUSH_STATE</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void yy_push_state( int new_state )</div><div class='del'>-#else</div><div class='del'>-static void yy_push_state( new_state )</div><div class='del'>-int new_state;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	if ( yy_start_stack_ptr &gt;= yy_start_stack_depth )</div><div class='del'>-		{</div><div class='del'>-		yy_size_t new_size;</div><div class='del'>-</div><div class='del'>-		yy_start_stack_depth += YY_START_STACK_INCR;</div><div class='del'>-		new_size = yy_start_stack_depth * sizeof( int );</div><div class='del'>-</div><div class='del'>-		if ( ! yy_start_stack )</div><div class='del'>-			yy_start_stack = (int *) yy_flex_alloc( new_size );</div><div class='del'>-</div><div class='del'>-		else</div><div class='del'>-			yy_start_stack = (int *) yy_flex_realloc(</div><div class='del'>-					(void *) yy_start_stack, new_size );</div><div class='del'>-</div><div class='del'>-		if ( ! yy_start_stack )</div><div class='del'>-			YY_FATAL_ERROR(</div><div class='del'>-			"out of memory expanding start-condition stack" );</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-	yy_start_stack[yy_start_stack_ptr++] = YY_START;</div><div class='del'>-</div><div class='del'>-	BEGIN(new_state);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_POP_STATE</div><div class='del'>-static void yy_pop_state()</div><div class='del'>-	{</div><div class='del'>-	if ( --yy_start_stack_ptr &lt; 0 )</div><div class='del'>-		YY_FATAL_ERROR( "start-condition stack underflow" );</div><div class='del'>-</div><div class='del'>-	BEGIN(yy_start_stack[yy_start_stack_ptr]);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef YY_NO_TOP_STATE</div><div class='del'>-static int yy_top_state()</div><div class='del'>-	{</div><div class='del'>-	return yy_start_stack[yy_start_stack_ptr - 1];</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef YY_EXIT_FAILURE</div><div class='del'>-#define YY_EXIT_FAILURE 2</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void yy_fatal_error( yyconst char msg[] )</div><div class='del'>-#else</div><div class='del'>-static void yy_fatal_error( msg )</div><div class='del'>-char msg[];</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	(void) fprintf( stderr, "%s\n", msg );</div><div class='del'>-	exit( YY_EXIT_FAILURE );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Redefine yyless() so it works in section 3 code. */</div><div class='del'>-</div><div class='del'>-#undef yyless</div><div class='del'>-#define yyless(n) \</div><div class='del'>-	do \</div><div class='del'>-		{ \</div><div class='del'>-		/* Undo effects of setting up yytext. */ \</div><div class='del'>-		yytext[yyleng] = yy_hold_char; \</div><div class='del'>-		yy_c_buf_p = yytext + n; \</div><div class='del'>-		yy_hold_char = *yy_c_buf_p; \</div><div class='del'>-		*yy_c_buf_p = '\0'; \</div><div class='del'>-		yyleng = n; \</div><div class='del'>-		} \</div><div class='del'>-	while ( 0 )</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Internal utility routines. */</div><div class='del'>-</div><div class='del'>-#ifndef yytext_ptr</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )</div><div class='del'>-#else</div><div class='del'>-static void yy_flex_strncpy( s1, s2, n )</div><div class='del'>-char *s1;</div><div class='del'>-yyconst char *s2;</div><div class='del'>-int n;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	register int i;</div><div class='del'>-	for ( i = 0; i &lt; n; ++i )</div><div class='del'>-		s1[i] = s2[i];</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef YY_NEED_STRLEN</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static int yy_flex_strlen( yyconst char *s )</div><div class='del'>-#else</div><div class='del'>-static int yy_flex_strlen( s )</div><div class='del'>-yyconst char *s;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	register int n;</div><div class='del'>-	for ( n = 0; s[n]; ++n )</div><div class='del'>-		;</div><div class='del'>-</div><div class='del'>-	return n;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void *yy_flex_alloc( yy_size_t size )</div><div class='del'>-#else</div><div class='del'>-static void *yy_flex_alloc( size )</div><div class='del'>-yy_size_t size;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	return (void *) malloc( size );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void *yy_flex_realloc( void *ptr, yy_size_t size )</div><div class='del'>-#else</div><div class='del'>-static void *yy_flex_realloc( ptr, size )</div><div class='del'>-void *ptr;</div><div class='del'>-yy_size_t size;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	/* The cast to (char *) in the following accommodates both</div><div class='del'>-	 * implementations that use char* generic pointers, and those</div><div class='del'>-	 * that use void* generic pointers.  It works with the latter</div><div class='del'>-	 * because both ANSI C and C++ allow castless assignment from</div><div class='del'>-	 * any pointer type to void*, and deal with argument conversions</div><div class='del'>-	 * as though doing an assignment.</div><div class='del'>-	 */</div><div class='del'>-	return (void *) realloc( (char *) ptr, size );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef YY_USE_PROTOS</div><div class='del'>-static void yy_flex_free( void *ptr )</div><div class='del'>-#else</div><div class='del'>-static void yy_flex_free( ptr )</div><div class='del'>-void *ptr;</div><div class='del'>-#endif</div><div class='del'>-	{</div><div class='del'>-	free( ptr );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#if YY_MAIN</div><div class='del'>-int main()</div><div class='del'>-	{</div><div class='del'>-	yylex();</div><div class='del'>-	return 0;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-#line 118 "lex_config.l"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef yywrap</div><div class='del'>-int yywrap() { return 1; }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    Stuff to parse basic data types</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-static int lex_number(char *s)</div><div class='del'>-{</div><div class='del'>-    yylval.num = strtoul(s, NULL, 0);</div><div class='del'>-    return NUMBER;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int lex_string(char *s)</div><div class='del'>-{</div><div class='del'>-    int n = strlen(s);</div><div class='del'>-    yylval.str = malloc(n-1);</div><div class='del'>-    strncpy(yylval.str, s+1, n-2);</div><div class='del'>-    yylval.str[n-2] = '\0';</div><div class='del'>-    return STRING;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    Code to support nesting of configuration files</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#define MAX_SOURCE_DEPTH 4</div><div class='del'>-struct source_stack {</div><div class='del'>-    YY_BUFFER_STATE	buffer;</div><div class='del'>-    char		*filename;</div><div class='del'>-    int			lineno, fileno;</div><div class='del'>-    FILE		*file;</div><div class='del'>-    glob_t		glob;</div><div class='del'>-} source_stack[MAX_SOURCE_DEPTH];</div><div class='del'>-static int source_stack_ptr = 0;</div><div class='del'>-static int parse_env = 0;</div><div class='del'>-</div><div class='del'>-static int get_glob(void)</div><div class='del'>-{</div><div class='del'>-    struct source_stack *s = &amp;source_stack[source_stack_ptr];</div><div class='del'>-    while (s-&gt;fileno &lt; s-&gt;glob.gl_pathc) {</div><div class='del'>-	char *fn = s-&gt;glob.gl_pathv[s-&gt;fileno];</div><div class='del'>-	s-&gt;file = fopen(fn, "r");</div><div class='del'>-	if (s-&gt;file == NULL) {</div><div class='del'>-	    if (strpbrk(fn, "?*[") == NULL)</div><div class='del'>-		syslog(LOG_INFO, "could not open '%s': %m", fn);</div><div class='del'>-	    s-&gt;fileno++;</div><div class='del'>-	} else {</div><div class='del'>-	    current_lineno = 1;</div><div class='del'>-	    current_file = strdup(fn);</div><div class='del'>-	    yy_switch_to_buffer(yy_create_buffer(s-&gt;file, YY_BUF_SIZE));</div><div class='del'>-	    source_stack_ptr++;</div><div class='del'>-	    s-&gt;fileno++;</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void do_source(char *fn)</div><div class='del'>-{</div><div class='del'>-    struct source_stack *s = &amp;source_stack[source_stack_ptr];</div><div class='del'>-</div><div class='del'>-    if (source_stack_ptr &gt;= MAX_SOURCE_DEPTH) {</div><div class='del'>-	syslog(LOG_INFO, "source depth limit exceeded");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    glob(fn, GLOB_NOCHECK, NULL, &amp;s-&gt;glob);</div><div class='del'>-    s-&gt;fileno = 0;</div><div class='del'>-    s-&gt;buffer = YY_CURRENT_BUFFER;</div><div class='del'>-    s-&gt;lineno = current_lineno;</div><div class='del'>-    s-&gt;filename = current_file;</div><div class='del'>-    get_glob();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int do_eof(void)</div><div class='del'>-{</div><div class='del'>-    struct source_stack *s = &amp;source_stack[--source_stack_ptr];</div><div class='del'>-    if (source_stack_ptr &lt; 0) {</div><div class='del'>-	if (parse_env == 0) {</div><div class='del'>-	    char *t = getenv("PCMCIA_OPTS");</div><div class='del'>-	    if (t == NULL) return -1;</div><div class='del'>-	    parse_env = 1;</div><div class='del'>-	    source_stack_ptr = 0;</div><div class='del'>-	    current_file = "PCMCIA_OPTS";</div><div class='del'>-	    current_lineno = 1;</div><div class='del'>-	    yy_scan_string(t);</div><div class='del'>-	    return 0;</div><div class='del'>-	} else</div><div class='del'>-	    return -1;</div><div class='del'>-    }</div><div class='del'>-    fclose(s-&gt;file);</div><div class='del'>-    free(current_file);</div><div class='del'>-    yy_delete_buffer(YY_CURRENT_BUFFER);</div><div class='del'>-    if (get_glob() != 0) {</div><div class='del'>-	yy_switch_to_buffer(s-&gt;buffer);</div><div class='del'>-	current_lineno = s-&gt;lineno;</div><div class='del'>-	current_file = s-&gt;filename;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    The main entry point... returns -1 if the file can't be accessed.</div><div class='del'>-</div><div class='del'>-======================================================================*/</div><div class='del'>-int yyparse(void);</div><div class='del'>-</div><div class='del'>-int parse_configfile(char *fn)</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    </div><div class='del'>-    f = fopen(fn, "r");</div><div class='del'>-    if (!f) {</div><div class='del'>-	syslog(LOG_INFO, "could not open '%s': %m", fn);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    current_lineno = 1;</div><div class='del'>-    current_file = fn;</div><div class='del'>-    source_stack_ptr = 0;</div><div class='del'>-    yyrestart(f);</div><div class='del'>-    yyparse();</div><div class='del'>-    fclose(f);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/merge_from_pcitable b/mdk-stage1/pcmcia_/merge_from_pcitable<br/>deleted file mode 100755<br/>index 74fc56f31..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/merge_from_pcitable?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/merge_from_pcitable</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,51 +0,0 @@</div><div class='del'>-#!/usr/bin/perl</div><div class='del'>-</div><div class='del'>-# This program will show on stdout yenta_socket stuff from pcitable</div><div class='del'>-# which is not in probe.c</div><div class='del'>-</div><div class='del'>-use MDK::Common;</div><div class='del'>-</div><div class='del'>-my @probelines = cat_('probe.c');</div><div class='del'>-my $status = 0;</div><div class='del'>-foreach (@probelines) {</div><div class='del'>-    if ($status == 0) {</div><div class='del'>-	/^pci_id_t pci_id\[\] = {/ and $status = 1;</div><div class='del'>-    } elsif ($status == 1) {</div><div class='del'>-	/^\s*{\s*0x([\da-f]+),\s*0x([\da-f]+),\s*"([^"]*)",\s*"([^"]*)"\s*}/</div><div class='del'>-	  and push @probes, { vendor =&gt; $1, device =&gt; $2, tag =&gt; $3, name =&gt; $4, vd =&gt; "$1$2" };</div><div class='del'>-	/^};/ and last;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-require '/usr/bin/merge2pcitable.pl';</div><div class='del'>-my $drivers = read_pcitable("/usr/share/ldetect-lst/pcitable");</div><div class='del'>-</div><div class='del'>-foreach my $k (sort keys %$drivers) {</div><div class='del'>-    $v = $drivers-&gt;{$k};</div><div class='del'>-    $k =~ /^(....)(....)/;</div><div class='del'>-    push @pcitable, { vendor =&gt; $1, device =&gt; $2, driver =&gt; $v-&gt;[0], name =&gt; $v-&gt;[1], vd =&gt; "$1$2" };</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-my @res;</div><div class='del'>-print "Missing in `probe.c':\n";</div><div class='del'>-foreach my $p (@pcitable) {</div><div class='del'>-    next if $p-&gt;{driver} ne 'yenta_socket';</div><div class='del'>-    member($p-&gt;{vd}, map { $_-&gt;{vd} } @probes) or</div><div class='del'>-      push @res, "    { 0x$p-&gt;{vendor}, 0x$p-&gt;{device}, \"..\", \"$p-&gt;{name}\" },\n";</div><div class='del'>-}</div><div class='del'>-print sort @res;</div><div class='del'>-@res = ();</div><div class='del'>-print "\n";</div><div class='del'>-</div><div class='del'>-print "Missing in pcitable:\n";</div><div class='del'>-foreach my $p (@probes) {</div><div class='del'>-    my @r = grep { $_-&gt;{vd} eq $p-&gt;{vd} } @pcitable;</div><div class='del'>-    @r &gt; 1 and die "duplicate entry in pcitable &lt;$p-&gt;{vd}&gt;\n";</div><div class='del'>-    if (@r &amp;&amp; $r[0]-&gt;{driver} ne 'yenta_socket') {</div><div class='del'>-	push @res, "0x$p-&gt;{vendor}\t0x$p-&gt;{device}\t\"yenta_socket\"\t\"$r[0]-&gt;{name}\"\n";</div><div class='del'>-	$r[0]-&gt;{driver} ne 'unknown' and print STDERR "WARNING, driver for &lt;$p-&gt;{vd}&gt; was &lt;$r[0]-&gt;{driver}&gt;\n";</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-print sort @res;</div><div class='del'>-@res = ();</div><div class='del'>-print "\n";</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/pcmcia.h b/mdk-stage1/pcmcia_/pcmcia.h<br/>deleted file mode 100644<br/>index 1967b3497..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/pcmcia.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/pcmcia.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,21 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _PCMCIA_CARDMGR_INTERFACE_H_</div><div class='del'>-#define _PCMCIA_CARDMGR_INTERFACE_H_</div><div class='del'>-</div><div class='del'>-char * pcmcia_probe(void);</div><div class='del'>-int cardmgr_call(void);</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/probe.c b/mdk-stage1/pcmcia_/probe.c<br/>deleted file mode 100644<br/>index 7a61d2f62..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/probe.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/probe.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,509 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- *</div><div class='del'>- * Copyright 2000-2001 MandrakeSoft</div><div class='del'>- *</div><div class='del'>- * This software may be freely redistributed under the terms of the GNU</div><div class='del'>- * public license.</div><div class='del'>- *</div><div class='del'>- * You should have received a copy of the GNU General Public License</div><div class='del'>- * along with this program; if not, write to the Free Software</div><div class='del'>- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * Code comes from /anonymous@projects.sourceforge.net:/pub/pcmcia-cs/pcmcia-cs-3.1.29.tar.bz2</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*======================================================================</div><div class='del'>-</div><div class='del'>-    PCMCIA controller probe</div><div class='del'>-</div><div class='del'>-    probe.c 1.55 2001/08/24 12:19:20</div><div class='del'>-</div><div class='del'>-    The contents of this file are subject to the Mozilla Public</div><div class='del'>-    License Version 1.1 (the "License"); you may not use this file</div><div class='del'>-    except in compliance with the License. You may obtain a copy of</div><div class='del'>-    the License at http://www.mozilla.org/MPL/</div><div class='del'>-</div><div class='del'>-    Software distributed under the License is distributed on an "AS</div><div class='del'>-    IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or</div><div class='del'>-    implied. See the License for the specific language governing</div><div class='del'>-    rights and limitations under the License.</div><div class='del'>-</div><div class='del'>-    The initial developer of the original code is David A. Hinds</div><div class='del'>-    &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>-    are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>-</div><div class='del'>-    Alternatively, the contents of this file may be used under the</div><div class='del'>-    terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>-    which case the provisions of the GPL are applicable instead of the</div><div class='del'>-    above.  If you wish to allow the use of your version of this file</div><div class='del'>-    only under the terms of the GPL and not to allow others to use</div><div class='del'>-    your version of this file under the MPL, indicate your decision</div><div class='del'>-    by deleting the provisions above and replace them with the notice</div><div class='del'>-    and other provisions required by the GPL.  If you do not delete</div><div class='del'>-    the provisions above, a recipient may use your version of this</div><div class='del'>-    file under either the MPL or the GPL.</div><div class='del'>-    </div><div class='del'>-======================================================================*/</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #include &lt;pcmcia/config.h&gt;</div><div class='del'>-#include "log.h"</div><div class='del'>-#include "pcmcia.h"</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #ifdef CONFIG_PCI</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-    u_short	vendor, device;</div><div class='del'>-    char	*modname;</div><div class='del'>-    char	*name;</div><div class='del'>-} pci_id_t;</div><div class='del'>-</div><div class='del'>-pci_id_t pci_id[] = {</div><div class='del'>-    { 0x1013, 0x1100, "i82365", "Cirrus Logic CL 6729" },</div><div class='del'>-    { 0x1013, 0x1110, "yenta_socket", "Cirrus Logic PD 6832" },</div><div class='del'>-    { 0x10b3, 0xb106, "yenta_socket", "SMC 34C90" },</div><div class='del'>-    { 0x1180, 0x0465, "yenta_socket", "Ricoh RL5C465" },</div><div class='del'>-    { 0x1180, 0x0466, "yenta_socket", "Ricoh RL5C466" },</div><div class='del'>-    { 0x1180, 0x0475, "yenta_socket", "Ricoh RL5C475" },</div><div class='del'>-    { 0x1180, 0x0476, "yenta_socket", "Ricoh RL5C476" },</div><div class='del'>-    { 0x1180, 0x0477, "yenta_socket", "Ricoh RL5C477" },</div><div class='del'>-    { 0x1180, 0x0478, "yenta_socket", "Ricoh RL5C478" },</div><div class='del'>-    { 0x104c, 0xac12, "yenta_socket", "Texas Instruments PCI1130" }, </div><div class='del'>-    { 0x104c, 0xac13, "yenta_socket", "Texas Instruments PCI1031" }, </div><div class='del'>-    { 0x104c, 0xac15, "yenta_socket", "Texas Instruments PCI1131" }, </div><div class='del'>-    { 0x104c, 0xac1a, "yenta_socket", "Texas Instruments PCI1210" }, </div><div class='del'>-    { 0x104c, 0xac1e, "yenta_socket", "Texas Instruments PCI1211" }, </div><div class='del'>-    { 0x104c, 0xac17, "yenta_socket", "Texas Instruments PCI1220" }, </div><div class='del'>-    { 0x104c, 0xac19, "yenta_socket", "Texas Instruments PCI1221" }, </div><div class='del'>-    { 0x104c, 0xac1c, "yenta_socket", "Texas Instruments PCI1225" }, </div><div class='del'>-    { 0x104c, 0xac16, "yenta_socket", "Texas Instruments PCI1250" }, </div><div class='del'>-    { 0x104c, 0xac1d, "yenta_socket", "Texas Instruments PCI1251A" }, </div><div class='del'>-    { 0x104c, 0xac1f, "yenta_socket", "Texas Instruments PCI1251B" }, </div><div class='del'>-    { 0x104c, 0xac50, "yenta_socket", "Texas Instruments PCI1410" }, </div><div class='del'>-    { 0x104c, 0xac51, "yenta_socket", "Texas Instruments PCI1420" }, </div><div class='del'>-    { 0x104c, 0xac1b, "yenta_socket", "Texas Instruments PCI1450" }, </div><div class='del'>-    { 0x104c, 0xac52, "yenta_socket", "Texas Instruments PCI1451" }, </div><div class='del'>-    { 0x104c, 0xac41, "yenta_socket", "Texas Instruments PCI4410" }, </div><div class='del'>-    { 0x104c, 0xac40, "yenta_socket", "Texas Instruments PCI4450" }, </div><div class='del'>-    { 0x104c, 0xac42, "yenta_socket", "Texas Instruments PCI4451" }, </div><div class='del'>-    { 0x1217, 0x6729, "i82365", "O2 Micro 6729" }, </div><div class='del'>-    { 0x1217, 0x673a, "i82365", "O2 Micro 6730" }, </div><div class='del'>-    { 0x1217, 0x6832, "yenta_socket", "O2 Micro 6832/6833" }, </div><div class='del'>-    { 0x1217, 0x6836, "yenta_socket", "O2 Micro 6836/6860" }, </div><div class='del'>-    { 0x1217, 0x6872, "yenta_socket", "O2 Micro 6812" }, </div><div class='del'>-    { 0x1217, 0x6925, "yenta_socket", "O2 Micro 6922" }, </div><div class='del'>-    { 0x1217, 0x6933, "yenta_socket", "O2 Micro 6933" }, </div><div class='del'>-    { 0x1217, 0x6972, "yenta_socket", "O2 Micro 6912" }, </div><div class='del'>-    { 0x1179, 0x0603, "i82365", "Toshiba ToPIC95-A" }, </div><div class='del'>-    { 0x1179, 0x060a, "yenta_socket", "Toshiba ToPIC95-B" }, </div><div class='del'>-    { 0x1179, 0x060f, "yenta_socket", "Toshiba ToPIC97" }, </div><div class='del'>-    { 0x1179, 0x0617, "yenta_socket", "Toshiba ToPIC100" }, </div><div class='del'>-    { 0x119b, 0x1221, "i82365", "Omega Micro 82C092G" }, </div><div class='del'>-    { 0x8086, 0x1221, "i82092", "Intel 82092AA_0" }, </div><div class='del'>-    { 0x8086, 0x1222, "i82092", "Intel 82092AA_1" }, </div><div class='del'>-};</div><div class='del'>-#define PCI_COUNT (sizeof(pci_id)/sizeof(pci_id_t))</div><div class='del'>-</div><div class='del'>-char * driver = NULL;</div><div class='del'>-</div><div class='del'>-static int pci_probe(void)</div><div class='del'>-{</div><div class='del'>-    char s[256], *name = NULL;</div><div class='del'>-    u_int device, vendor, i;</div><div class='del'>-    FILE *f;</div><div class='del'>-    </div><div class='del'>-//mdk-stage1//     if (!module)</div><div class='del'>-    log_message("PCMCIA: probing PCI bus..");</div><div class='del'>-</div><div class='del'>-    if ((f = fopen("/proc/bus/pci/devices", "r")) != NULL) {</div><div class='del'>-	while (fgets(s, 256, f) != NULL) {</div><div class='del'>-	    u_int n = strtoul(s+5, NULL, 16);</div><div class='del'>-	    vendor = (n &gt;&gt; 16); device = (n &amp; 0xffff);</div><div class='del'>-	    for (i = 0; i &lt; PCI_COUNT; i++)</div><div class='del'>-		if ((vendor == pci_id[i].vendor) &amp;&amp;</div><div class='del'>-		    (device == pci_id[i].device)) break;</div><div class='del'>-	    if (i &lt; PCI_COUNT) {</div><div class='del'>-		name = pci_id[i].name;</div><div class='del'>-		driver = pci_id[i].modname;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-//mdk-stage1// else if ((f = fopen("/proc/pci", "r")) != NULL) {</div><div class='del'>-//mdk-stage1// 	while (fgets(s, 256, f) != NULL) {</div><div class='del'>-//mdk-stage1// 	    t = strstr(s, "Device id=");</div><div class='del'>-//mdk-stage1// 	    if (t) {</div><div class='del'>-//mdk-stage1// 		device = strtoul(t+10, NULL, 16);</div><div class='del'>-//mdk-stage1// 		t = strstr(s, "Vendor id=");</div><div class='del'>-//mdk-stage1// 		vendor = strtoul(t+10, NULL, 16);</div><div class='del'>-//mdk-stage1// 		for (i = 0; i &lt; PCI_COUNT; i++)</div><div class='del'>-//mdk-stage1// 		    if ((vendor == pci_id[i].vendor) &amp;&amp;</div><div class='del'>-//mdk-stage1// 			(device == pci_id[i].device)) break;</div><div class='del'>-//mdk-stage1// 	    } else</div><div class='del'>-//mdk-stage1// 		for (i = 0; i &lt; PCI_COUNT; i++)</div><div class='del'>-//mdk-stage1// 		    if (strstr(s, pci_id[i].tag) != NULL) break;</div><div class='del'>-//mdk-stage1// 	    if (i != PCI_COUNT) {</div><div class='del'>-//mdk-stage1// 		name = pci_id[i].name;</div><div class='del'>-//mdk-stage1// 		break;</div><div class='del'>-//mdk-stage1// 	    } else {</div><div class='del'>-//mdk-stage1// 		t = strstr(s, "CardBus bridge");</div><div class='del'>-//mdk-stage1// 		if (t != NULL) {</div><div class='del'>-//mdk-stage1// 		    name = t + 16;</div><div class='del'>-//mdk-stage1// 		    t = strchr(s, '(');</div><div class='del'>-//mdk-stage1// 		    t[-1] = '\0';</div><div class='del'>-//mdk-stage1// 		    break;</div><div class='del'>-//mdk-stage1// 		}</div><div class='del'>-//mdk-stage1// 	    }</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-    fclose(f);</div><div class='del'>-</div><div class='del'>-    if (name) {</div><div class='del'>-//mdk-stage1// 	if (module)</div><div class='del'>-//mdk-stage1// 	    printf("i82365\n");</div><div class='del'>-//mdk-stage1// 	else</div><div class='del'>-	    log_message("\t%s found, 2 sockets (driver %s).", name, driver);</div><div class='del'>-	return 0;</div><div class='del'>-    } else {</div><div class='del'>-//mdk-stage1// 	if (!module)</div><div class='del'>-	    log_message("\tnot found.");</div><div class='del'>-	return -ENODEV;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #ifdef CONFIG_ISA</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef __GLIBC__</div><div class='del'>-#include &lt;sys/io.h&gt;</div><div class='del'>-//mdk-stage1// #else</div><div class='del'>-//mdk-stage1// #include &lt;asm/io.h&gt;</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-typedef u_short ioaddr_t;</div><div class='del'>-</div><div class='del'>-#include "i82365.h"</div><div class='del'>-#include "cirrus.h"</div><div class='del'>-#include "vg468.h"</div><div class='del'>-</div><div class='del'>-static ioaddr_t i365_base = 0x03e0;</div><div class='del'>-</div><div class='del'>-static u_char i365_get(u_short sock, u_short reg)</div><div class='del'>-{</div><div class='del'>-    u_char val = I365_REG(sock, reg);</div><div class='del'>-    outb(val, i365_base); val = inb(i365_base+1);</div><div class='del'>-    return val;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void i365_set(u_short sock, u_short reg, u_char data)</div><div class='del'>-{</div><div class='del'>-    u_char val = I365_REG(sock, reg);</div><div class='del'>-    outb(val, i365_base); outb(data, i365_base+1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void i365_bset(u_short sock, u_short reg, u_char mask)</div><div class='del'>-{</div><div class='del'>-    u_char d = i365_get(sock, reg);</div><div class='del'>-    d |= mask;</div><div class='del'>-    i365_set(sock, reg, d);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void i365_bclr(u_short sock, u_short reg, u_char mask)</div><div class='del'>-{</div><div class='del'>-    u_char d = i365_get(sock, reg);</div><div class='del'>-    d &amp;= ~mask;</div><div class='del'>-    i365_set(sock, reg, d);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int i365_probe(void)</div><div class='del'>-{</div><div class='del'>-    int val, sock, done;</div><div class='del'>-    char *name = "i82365sl";</div><div class='del'>-</div><div class='del'>-//mdk-stage1// if (!module)</div><div class='del'>-    log_message("PCMCIA: probing for Intel PCIC (ISA)..");</div><div class='del'>-//mdk-stage1//     if (verbose) printf("\n");</div><div class='del'>-    </div><div class='del'>-    sock = done = 0;</div><div class='del'>-    if (ioperm(i365_base, 4, 1)) {</div><div class='del'>-               log_perror("PCMCIA: ioperm");</div><div class='del'>-               return -1;</div><div class='del'>-    }</div><div class='del'>-    ioperm(0x80, 1, 1);</div><div class='del'>-    for (; sock &lt; 2; sock++) {</div><div class='del'>-	val = i365_get(sock, I365_IDENT);</div><div class='del'>-//mdk-stage1//	if (verbose)</div><div class='del'>-//mdk-stage1//	    printf("  ident(%d)=%#2.2x", sock, val); </div><div class='del'>-	switch (val) {</div><div class='del'>-	case 0x82:</div><div class='del'>-	    name = "i82365sl A step";</div><div class='del'>-	    break;</div><div class='del'>-	case 0x83:</div><div class='del'>-	    name = "i82365sl B step";</div><div class='del'>-	    break;</div><div class='del'>-	case 0x84:</div><div class='del'>-	    name = "VLSI 82C146";</div><div class='del'>-	    break;</div><div class='del'>-	case 0x88: case 0x89: case 0x8a:</div><div class='del'>-	    name = "IBM Clone";</div><div class='del'>-	    break;</div><div class='del'>-	case 0x8b: case 0x8c:</div><div class='del'>-	    break;</div><div class='del'>-	default:</div><div class='del'>-	    done = 1;</div><div class='del'>-	}</div><div class='del'>-	if (done) break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-//mdk-stage1//    if (verbose) printf("\n  ");</div><div class='del'>-    if (sock == 0) {</div><div class='del'>-//mdk-stage1//	if (!module)</div><div class='del'>-	log_message("\tnot found.");</div><div class='del'>-	return -ENODEV;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((sock == 2) &amp;&amp; (strcmp(name, "VLSI 82C146") == 0))</div><div class='del'>-	name = "i82365sl DF";</div><div class='del'>-</div><div class='del'>-    /* Check for Vadem chips */</div><div class='del'>-    outb(0x0e, i365_base);</div><div class='del'>-    outb(0x37, i365_base);</div><div class='del'>-    i365_bset(0, VG468_MISC, VG468_MISC_VADEMREV);</div><div class='del'>-    val = i365_get(0, I365_IDENT);</div><div class='del'>-    if (val &amp; I365_IDENT_VADEM) {</div><div class='del'>-	if ((val &amp; 7) &lt; 4)</div><div class='del'>-	    name = "Vadem VG-468";</div><div class='del'>-	else</div><div class='del'>-	    name = "Vadem VG-469";</div><div class='del'>-	i365_bclr(0, VG468_MISC, VG468_MISC_VADEMREV);</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /* Check for Cirrus CL-PD67xx chips */</div><div class='del'>-    i365_set(0, PD67_CHIP_INFO, 0);</div><div class='del'>-    val = i365_get(0, PD67_CHIP_INFO);</div><div class='del'>-    if ((val &amp; PD67_INFO_CHIP_ID) == PD67_INFO_CHIP_ID) {</div><div class='del'>-	val = i365_get(0, PD67_CHIP_INFO);</div><div class='del'>-	if ((val &amp; PD67_INFO_CHIP_ID) == 0) {</div><div class='del'>-	    if (val &amp; PD67_INFO_SLOTS)</div><div class='del'>-		name = "Cirrus CL-PD672x";</div><div class='del'>-	    else {</div><div class='del'>-		name = "Cirrus CL-PD6710";</div><div class='del'>-		sock = 1;</div><div class='del'>-	    }</div><div class='del'>-	    i365_set(0, PD67_EXT_INDEX, 0xe5);</div><div class='del'>-	    if (i365_get(0, PD67_EXT_INDEX) != 0xe5)</div><div class='del'>-		name = "VIA VT83C469";</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-//mdk-stage1//    if (module)</div><div class='del'>-//mdk-stage1//	printf("i82365\n");</div><div class='del'>-//mdk-stage1//    else</div><div class='del'>-	printf("\t%s found, %d sockets.\n", name, sock);</div><div class='del'>-    return 0;</div><div class='del'>-    </div><div class='del'>-} /* i365_probe */</div><div class='del'>-</div><div class='del'>-//mdk-stage1//#endif /* CONFIG_ISA */</div><div class='del'>-</div><div class='del'>-/*====================================================================*/</div><div class='del'>-</div><div class='del'>-//mdk-stage1//#ifdef CONFIG_ISA</div><div class='del'>-</div><div class='del'>-#include "tcic.h"</div><div class='del'>-</div><div class='del'>-//mdk-stage1//static ioaddr_t tcic_base = TCIC_BASE;</div><div class='del'>-</div><div class='del'>-static u_char tcic_getb(ioaddr_t base, u_char reg)</div><div class='del'>-{</div><div class='del'>-    u_char val = inb(base+reg);</div><div class='del'>-    return val;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void tcic_setb(ioaddr_t base, u_char reg, u_char data)</div><div class='del'>-{</div><div class='del'>-    outb(data, base+reg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_short tcic_getw(ioaddr_t base, u_char reg)</div><div class='del'>-{</div><div class='del'>-    u_short val = inw(base+reg);</div><div class='del'>-    return val;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void tcic_setw(ioaddr_t base, u_char reg, u_short data)</div><div class='del'>-{</div><div class='del'>-    outw(data, base+reg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static u_short tcic_aux_getw(ioaddr_t base, u_short reg)</div><div class='del'>-{</div><div class='del'>-    u_char mode = (tcic_getb(base, TCIC_MODE) &amp; TCIC_MODE_PGMMASK) | reg;</div><div class='del'>-    tcic_setb(base, TCIC_MODE, mode);</div><div class='del'>-    return tcic_getw(base, TCIC_AUX);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void tcic_aux_setw(ioaddr_t base, u_short reg, u_short data)</div><div class='del'>-{</div><div class='del'>-    u_char mode = (tcic_getb(base, TCIC_MODE) &amp; TCIC_MODE_PGMMASK) | reg;</div><div class='del'>-    tcic_setb(base, TCIC_MODE, mode);</div><div class='del'>-    tcic_setw(base, TCIC_AUX, data);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int get_tcic_id(ioaddr_t base)</div><div class='del'>-{</div><div class='del'>-    u_short id;</div><div class='del'>-    tcic_aux_setw(base, TCIC_AUX_TEST, TCIC_TEST_DIAG);</div><div class='del'>-    id = tcic_aux_getw(base, TCIC_AUX_ILOCK);</div><div class='del'>-    id = (id &amp; TCIC_ILOCKTEST_ID_MASK) &gt;&gt; TCIC_ILOCKTEST_ID_SH;</div><div class='del'>-    tcic_aux_setw(base, TCIC_AUX_TEST, 0);</div><div class='del'>-    return id;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int tcic_probe_at(ioaddr_t base)</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    u_short old;</div><div class='del'>-    </div><div class='del'>-    /* Anything there?? */</div><div class='del'>-    for (i = 0; i &lt; 0x10; i += 2)</div><div class='del'>-	if (tcic_getw(base, i) == 0xffff)</div><div class='del'>-	    return -1;</div><div class='del'>-</div><div class='del'>-//mdk-stage1//    if (!module)</div><div class='del'>-    log_message("\tat %#3.3x: ", base); fflush(stdout);</div><div class='del'>-</div><div class='del'>-    /* Try to reset the chip */</div><div class='del'>-    tcic_setw(base, TCIC_SCTRL, TCIC_SCTRL_RESET);</div><div class='del'>-    tcic_setw(base, TCIC_SCTRL, 0);</div><div class='del'>-    </div><div class='del'>-    /* Can we set the addr register? */</div><div class='del'>-    old = tcic_getw(base, TCIC_ADDR);</div><div class='del'>-    tcic_setw(base, TCIC_ADDR, 0);</div><div class='del'>-    if (tcic_getw(base, TCIC_ADDR) != 0) {</div><div class='del'>-	tcic_setw(base, TCIC_ADDR, old);</div><div class='del'>-	return -2;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    tcic_setw(base, TCIC_ADDR, 0xc3a5);</div><div class='del'>-    if (tcic_getw(base, TCIC_ADDR) != 0xc3a5)</div><div class='del'>-	return -3;</div><div class='del'>-</div><div class='del'>-    return 2;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int tcic_probe(void)</div><div class='del'>-{</div><div class='del'>-    int sock, id;</div><div class='del'>-</div><div class='del'>-//mdk-stage1//     if (!module)</div><div class='del'>-    log_message("PCMCIA: probing for Databook TCIC-2 (ISA).."); fflush(stdout);</div><div class='del'>-    </div><div class='del'>-    if (ioperm(TCIC_BASE, 16, 1)) {</div><div class='del'>-	    log_perror("PCMCIA: ioperm");</div><div class='del'>-	    return -1;</div><div class='del'>-    }</div><div class='del'>-    ioperm(0x80, 1, 1);</div><div class='del'>-    sock = tcic_probe_at(TCIC_BASE);</div><div class='del'>-    </div><div class='del'>-    if (sock &lt;= 0) {</div><div class='del'>-//mdk-stage1//	if (!module)</div><div class='del'>-	    log_message("\tnot found.");</div><div class='del'>-	return -ENODEV;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-//mdk-stage1//    if (module)</div><div class='del'>-//mdk-stage1//	printf("tcic\n");</div><div class='del'>-//mdk-stage1//    else {</div><div class='del'>-	id = get_tcic_id(TCIC_BASE);</div><div class='del'>-	switch (id) {</div><div class='del'>-	case TCIC_ID_DB86082:</div><div class='del'>-	    log_message("DB86082"); break;</div><div class='del'>-	case TCIC_ID_DB86082A:</div><div class='del'>-	    log_message("DB86082A"); break;</div><div class='del'>-	case TCIC_ID_DB86084:</div><div class='del'>-	    log_message("DB86084"); break;</div><div class='del'>-	case TCIC_ID_DB86084A:</div><div class='del'>-	    log_message("DB86084A"); break;</div><div class='del'>-	case TCIC_ID_DB86072:</div><div class='del'>-	    log_message("DB86072"); break;</div><div class='del'>-	case TCIC_ID_DB86184:</div><div class='del'>-	    log_message("DB86184"); break;</div><div class='del'>-	case TCIC_ID_DB86082B:</div><div class='del'>-	    log_message("DB86082B"); break;</div><div class='del'>-	default:</div><div class='del'>-	    log_message("Unknown TCIC-2 ID 0x%02x", id);</div><div class='del'>-	}</div><div class='del'>-	log_message(" found at %#6x, %d sockets.", TCIC_BASE, sock);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-    return 0;</div><div class='del'>-    </div><div class='del'>-} /* tcic_probe */</div><div class='del'>-</div><div class='del'>-//mdk-stage1// #endif /* CONFIG_ISA */</div><div class='del'>-</div><div class='del'>-//mdk-stage1// /*====================================================================*/</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// int main(int argc, char *argv[])</div><div class='del'>-//mdk-stage1// {</div><div class='del'>-//mdk-stage1//     int optch, errflg;</div><div class='del'>-//mdk-stage1//     extern char *optarg;</div><div class='del'>-//mdk-stage1//     int verbose = 0, module = 0;</div><div class='del'>-//mdk-stage1//     </div><div class='del'>-//mdk-stage1//     errflg = 0;</div><div class='del'>-//mdk-stage1//     while ((optch = getopt(argc, argv, "t:vxm")) != -1) {</div><div class='del'>-//mdk-stage1// 	switch (optch) {</div><div class='del'>-//mdk-stage1// #ifdef CONFIG_ISA</div><div class='del'>-//mdk-stage1// 	case 't':</div><div class='del'>-//mdk-stage1// 	    tcic_base = strtoul(optarg, NULL, 0); break;</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1// 	case 'v':</div><div class='del'>-//mdk-stage1// 	    verbose = 1; break;</div><div class='del'>-//mdk-stage1// 	case 'm':</div><div class='del'>-//mdk-stage1// 	    module = 1; break;</div><div class='del'>-//mdk-stage1// 	default:</div><div class='del'>-//mdk-stage1// 	    errflg = 1; break;</div><div class='del'>-//mdk-stage1// 	}</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1//     if (errflg || (optind &lt; argc)) {</div><div class='del'>-//mdk-stage1// 	fprintf(stderr, "usage: %s [-t tcic_base] [-v] [-m]\n", argv[0]);</div><div class='del'>-//mdk-stage1// 	exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1//     }</div><div class='del'>-//mdk-stage1// </div><div class='del'>-//mdk-stage1// #ifdef CONFIG_PCI</div><div class='del'>-//mdk-stage1//     if (pci_probe(verbose, module) == 0)</div><div class='del'>-//mdk-stage1// 	exit(EXIT_SUCCESS);</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1// #ifdef CONFIG_ISA</div><div class='del'>-//mdk-stage1//     if (i365_probe(verbose, module) == 0)</div><div class='del'>-//mdk-stage1// 	exit(EXIT_SUCCESS);</div><div class='del'>-//mdk-stage1//     else if (tcic_probe(verbose, module, tcic_base) == 0)</div><div class='del'>-//mdk-stage1// 	exit(EXIT_SUCCESS);</div><div class='del'>-//mdk-stage1// #endif</div><div class='del'>-//mdk-stage1//     exit(EXIT_FAILURE);</div><div class='del'>-//mdk-stage1//     return 0;</div><div class='del'>-//mdk-stage1// }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-char * pcmcia_probe(void)</div><div class='del'>-{</div><div class='del'>-	if (!pci_probe())</div><div class='del'>-		return driver;</div><div class='del'>-	else if (!i365_probe())</div><div class='del'>-		return "i82365";</div><div class='del'>-	else if (!tcic_probe())</div><div class='del'>-		return "tcic";</div><div class='del'>-	else</div><div class='del'>-		return NULL;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/tcic.h b/mdk-stage1/pcmcia_/tcic.h<br/>deleted file mode 100644<br/>index cad193885..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/tcic.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/tcic.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,266 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * tcic.h 1.15 2001/08/24 12:15:34</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_TCIC_H</div><div class='del'>-#define _LINUX_TCIC_H</div><div class='del'>-</div><div class='del'>-#define TCIC_BASE		0x240</div><div class='del'>-</div><div class='del'>-/* offsets of registers from TCIC_BASE */</div><div class='del'>-#define TCIC_DATA		0x00</div><div class='del'>-#define TCIC_ADDR		0x02</div><div class='del'>-#define TCIC_SCTRL		0x06</div><div class='del'>-#define TCIC_SSTAT		0x07</div><div class='del'>-#define TCIC_MODE		0x08</div><div class='del'>-#define TCIC_PWR		0x09</div><div class='del'>-#define TCIC_EDC		0x0A</div><div class='del'>-#define TCIC_ICSR		0x0C</div><div class='del'>-#define TCIC_IENA		0x0D</div><div class='del'>-#define TCIC_AUX		0x0E</div><div class='del'>-</div><div class='del'>-#define TCIC_SS_SHFT		12</div><div class='del'>-#define TCIC_SS_MASK		0x7000</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_ADDR */</div><div class='del'>-#define TCIC_ADR2_REG		0x8000</div><div class='del'>-#define TCIC_ADR2_INDREG	0x0800</div><div class='del'>-</div><div class='del'>-#define TCIC_ADDR_REG		0x80000000</div><div class='del'>-#define TCIC_ADDR_SS_SHFT	(TCIC_SS_SHFT+16)</div><div class='del'>-#define TCIC_ADDR_SS_MASK	(TCIC_SS_MASK&lt;&lt;16)</div><div class='del'>-#define TCIC_ADDR_INDREG	0x08000000</div><div class='del'>-#define TCIC_ADDR_IO		0x04000000</div><div class='del'>-#define TCIC_ADDR_MASK		0x03ffffff</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_SCTRL */</div><div class='del'>-#define TCIC_SCTRL_ENA		0x01</div><div class='del'>-#define TCIC_SCTRL_INCMODE	0x18</div><div class='del'>-#define TCIC_SCTRL_INCMODE_HOLD	0x00</div><div class='del'>-#define TCIC_SCTRL_INCMODE_WORD	0x08</div><div class='del'>-#define TCIC_SCTRL_INCMODE_REG	0x10</div><div class='del'>-#define TCIC_SCTRL_INCMODE_AUTO	0x18</div><div class='del'>-#define TCIC_SCTRL_EDCSUM	0x20</div><div class='del'>-#define TCIC_SCTRL_RESET	0x80</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_SSTAT */</div><div class='del'>-#define TCIC_SSTAT_6US		0x01</div><div class='del'>-#define TCIC_SSTAT_10US		0x02</div><div class='del'>-#define TCIC_SSTAT_PROGTIME	0x04</div><div class='del'>-#define TCIC_SSTAT_LBAT1	0x08</div><div class='del'>-#define TCIC_SSTAT_LBAT2	0x10</div><div class='del'>-#define TCIC_SSTAT_RDY		0x20	/* Inverted */</div><div class='del'>-#define TCIC_SSTAT_WP		0x40</div><div class='del'>-#define TCIC_SSTAT_CD		0x80	/* Card detect */</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_MODE */</div><div class='del'>-#define TCIC_MODE_PGMMASK	0x1f</div><div class='del'>-#define TCIC_MODE_NORMAL	0x00</div><div class='del'>-#define TCIC_MODE_PGMWR		0x01</div><div class='del'>-#define TCIC_MODE_PGMRD		0x02</div><div class='del'>-#define TCIC_MODE_PGMCE		0x04</div><div class='del'>-#define TCIC_MODE_PGMDBW	0x08</div><div class='del'>-#define TCIC_MODE_PGMWORD	0x10</div><div class='del'>-#define TCIC_MODE_AUXSEL_MASK	0xe0</div><div class='del'>-</div><div class='del'>-/* Registers accessed through TCIC_AUX, by setting TCIC_MODE */</div><div class='del'>-#define TCIC_AUX_TCTL		(0&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_PCTL		(1&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_WCTL		(2&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_EXTERN		(3&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_PDATA		(4&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_SYSCFG		(5&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_ILOCK		(6&lt;&lt;5)</div><div class='del'>-#define TCIC_AUX_TEST		(7&lt;&lt;5)</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_PWR */</div><div class='del'>-#define TCIC_PWR_VCC(sock)	(0x01&lt;&lt;(sock))</div><div class='del'>-#define TCIC_PWR_VCC_MASK	0x03</div><div class='del'>-#define TCIC_PWR_VPP(sock)	(0x08&lt;&lt;(sock))</div><div class='del'>-#define TCIC_PWR_VPP_MASK	0x18</div><div class='del'>-#define TCIC_PWR_CLIMENA	0x40</div><div class='del'>-#define TCIC_PWR_CLIMSTAT	0x80</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_ICSR */</div><div class='del'>-#define TCIC_ICSR_CLEAR		0x01</div><div class='del'>-#define TCIC_ICSR_SET		0x02</div><div class='del'>-#define TCIC_ICSR_JAM		(TCIC_ICSR_CLEAR|TCIC_ICSR_SET)</div><div class='del'>-#define TCIC_ICSR_STOPCPU	0x04</div><div class='del'>-#define TCIC_ICSR_ILOCK		0x08</div><div class='del'>-#define TCIC_ICSR_PROGTIME	0x10</div><div class='del'>-#define TCIC_ICSR_ERR		0x20</div><div class='del'>-#define TCIC_ICSR_CDCHG		0x40</div><div class='del'>-#define TCIC_ICSR_IOCHK		0x80</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_IENA */</div><div class='del'>-#define TCIC_IENA_CFG_MASK	0x03</div><div class='del'>-#define TCIC_IENA_CFG_OFF	0x00	/* disabled */</div><div class='del'>-#define TCIC_IENA_CFG_OD	0x01	/* active low, open drain */</div><div class='del'>-#define TCIC_IENA_CFG_LOW	0x02	/* active low, totem pole */</div><div class='del'>-#define TCIC_IENA_CFG_HIGH	0x03	/* active high, totem pole */</div><div class='del'>-#define TCIC_IENA_ILOCK		0x08</div><div class='del'>-#define TCIC_IENA_PROGTIME	0x10</div><div class='del'>-#define TCIC_IENA_ERR		0x20	/* overcurrent or iochk */</div><div class='del'>-#define TCIC_IENA_CDCHG		0x40</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_AUX_WCTL */</div><div class='del'>-#define TCIC_WAIT_COUNT_MASK	0x001f</div><div class='del'>-#define TCIC_WAIT_ASYNC		0x0020</div><div class='del'>-#define TCIC_WAIT_SENSE		0x0040</div><div class='del'>-#define TCIC_WAIT_SRC		0x0080</div><div class='del'>-#define TCIC_WCTL_WR		0x0100</div><div class='del'>-#define TCIC_WCTL_RD		0x0200</div><div class='del'>-#define TCIC_WCTL_CE		0x0400</div><div class='del'>-#define TCIC_WCTL_LLBAT1	0x0800</div><div class='del'>-#define TCIC_WCTL_LLBAT2	0x1000</div><div class='del'>-#define TCIC_WCTL_LRDY		0x2000</div><div class='del'>-#define TCIC_WCTL_LWP		0x4000</div><div class='del'>-#define TCIC_WCTL_LCD		0x8000</div><div class='del'>-</div><div class='del'>-/* Flags for TCIC_AUX_SYSCFG */</div><div class='del'>-#define TCIC_SYSCFG_IRQ_MASK	0x000f</div><div class='del'>-#define TCIC_SYSCFG_MCSFULL	0x0010</div><div class='del'>-#define TCIC_SYSCFG_IO1723	0x0020</div><div class='del'>-#define TCIC_SYSCFG_MCSXB	0x0040</div><div class='del'>-#define TCIC_SYSCFG_ICSXB	0x0080</div><div class='del'>-#define TCIC_SYSCFG_NOPDN	0x0100</div><div class='del'>-#define TCIC_SYSCFG_MPSEL_SHFT	9</div><div class='del'>-#define TCIC_SYSCFG_MPSEL_MASK	0x0e00</div><div class='del'>-#define TCIC_SYSCFG_MPSENSE	0x2000</div><div class='del'>-#define TCIC_SYSCFG_AUTOBUSY	0x4000</div><div class='del'>-#define TCIC_SYSCFG_ACC		0x8000</div><div class='del'>-</div><div class='del'>-#define TCIC_ILOCK_OUT		0x01</div><div class='del'>-#define TCIC_ILOCK_SENSE	0x02</div><div class='del'>-#define TCIC_ILOCK_CRESET	0x04</div><div class='del'>-#define TCIC_ILOCK_CRESENA	0x08</div><div class='del'>-#define TCIC_ILOCK_CWAIT	0x10</div><div class='del'>-#define TCIC_ILOCK_CWAITSNS	0x20</div><div class='del'>-#define TCIC_ILOCK_HOLD_MASK	0xc0</div><div class='del'>-#define TCIC_ILOCK_HOLD_CCLK	0xc0</div><div class='del'>-</div><div class='del'>-#define TCIC_ILOCKTEST_ID_SH	8</div><div class='del'>-#define TCIC_ILOCKTEST_ID_MASK	0x7f00</div><div class='del'>-#define TCIC_ILOCKTEST_MCIC_1	0x8000</div><div class='del'>-</div><div class='del'>-#define TCIC_ID_DB86082		0x02</div><div class='del'>-#define TCIC_ID_DB86082A	0x03</div><div class='del'>-#define TCIC_ID_DB86084		0x04</div><div class='del'>-#define TCIC_ID_DB86084A	0x08</div><div class='del'>-#define TCIC_ID_DB86072		0x15</div><div class='del'>-#define TCIC_ID_DB86184		0x14</div><div class='del'>-#define TCIC_ID_DB86082B	0x17</div><div class='del'>-</div><div class='del'>-#define TCIC_TEST_DIAG		0x8000</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Indirectly addressed registers</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define TCIC_SCF1(sock)	((sock)&lt;&lt;3)</div><div class='del'>-#define TCIC_SCF2(sock) (((sock)&lt;&lt;3)+2)</div><div class='del'>-</div><div class='del'>-/* Flags for SCF1 */</div><div class='del'>-#define TCIC_SCF1_IRQ_MASK	0x000f</div><div class='del'>-#define TCIC_SCF1_IRQ_OFF	0x0000</div><div class='del'>-#define TCIC_SCF1_IRQOC		0x0010</div><div class='del'>-#define TCIC_SCF1_PCVT		0x0020</div><div class='del'>-#define TCIC_SCF1_IRDY		0x0040</div><div class='del'>-#define TCIC_SCF1_ATA		0x0080</div><div class='del'>-#define TCIC_SCF1_DMA_SHIFT	8</div><div class='del'>-#define TCIC_SCF1_DMA_MASK	0x0700</div><div class='del'>-#define TCIC_SCF1_DMA_OFF	0</div><div class='del'>-#define TCIC_SCF1_DREQ2		2</div><div class='del'>-#define TCIC_SCF1_IOSTS		0x0800</div><div class='del'>-#define TCIC_SCF1_SPKR		0x1000</div><div class='del'>-#define TCIC_SCF1_FINPACK	0x2000</div><div class='del'>-#define TCIC_SCF1_DELWR		0x4000</div><div class='del'>-#define TCIC_SCF1_HD7IDE	0x8000</div><div class='del'>-</div><div class='del'>-/* Flags for SCF2 */</div><div class='del'>-#define TCIC_SCF2_RI		0x0001</div><div class='del'>-#define TCIC_SCF2_IDBR		0x0002</div><div class='del'>-#define TCIC_SCF2_MDBR		0x0004</div><div class='del'>-#define TCIC_SCF2_MLBAT1	0x0008</div><div class='del'>-#define TCIC_SCF2_MLBAT2	0x0010</div><div class='del'>-#define TCIC_SCF2_MRDY		0x0020</div><div class='del'>-#define TCIC_SCF2_MWP		0x0040</div><div class='del'>-#define TCIC_SCF2_MCD		0x0080</div><div class='del'>-#define TCIC_SCF2_MALL		0x00f8</div><div class='del'>-</div><div class='del'>-/* Indirect addresses for memory window registers */</div><div class='del'>-#define TCIC_MWIN(sock,map)	(0x100+(((map)+((sock)&lt;&lt;2))&lt;&lt;3))</div><div class='del'>-#define TCIC_MBASE_X		2</div><div class='del'>-#define TCIC_MMAP_X		4</div><div class='del'>-#define TCIC_MCTL_X		6</div><div class='del'>-</div><div class='del'>-#define TCIC_MBASE_4K_BIT	0x4000</div><div class='del'>-#define TCIC_MBASE_HA_SHFT	12</div><div class='del'>-#define TCIC_MBASE_HA_MASK	0x0fff</div><div class='del'>-</div><div class='del'>-#define TCIC_MMAP_REG		0x8000</div><div class='del'>-#define TCIC_MMAP_CA_SHFT	12</div><div class='del'>-#define TCIC_MMAP_CA_MASK	0x3fff</div><div class='del'>-</div><div class='del'>-#define TCIC_MCTL_WSCNT_MASK	0x001f</div><div class='del'>-#define TCIC_MCTL_WCLK		0x0020</div><div class='del'>-#define TCIC_MCTL_WCLK_CCLK	0x0000</div><div class='del'>-#define TCIC_MCTL_WCLK_BCLK	0x0020</div><div class='del'>-#define TCIC_MCTL_QUIET		0x0040</div><div class='del'>-#define TCIC_MCTL_WP		0x0080</div><div class='del'>-#define TCIC_MCTL_ACC		0x0100</div><div class='del'>-#define TCIC_MCTL_KE		0x0200</div><div class='del'>-#define TCIC_MCTL_EDC		0x0400</div><div class='del'>-#define TCIC_MCTL_B8		0x0800</div><div class='del'>-#define TCIC_MCTL_SS_SHFT	TCIC_SS_SHFT</div><div class='del'>-#define TCIC_MCTL_SS_MASK	TCIC_SS_MASK</div><div class='del'>-#define TCIC_MCTL_ENA		0x8000</div><div class='del'>-</div><div class='del'>-/* Indirect addresses for I/O window registers */</div><div class='del'>-#define TCIC_IWIN(sock,map)	(0x200+(((map)+((sock)&lt;&lt;1))&lt;&lt;2))</div><div class='del'>-#define TCIC_IBASE_X		0</div><div class='del'>-#define TCIC_ICTL_X		2</div><div class='del'>-</div><div class='del'>-#define TCIC_ICTL_WSCNT_MASK	TCIC_MCTL_WSCNT_MASK</div><div class='del'>-#define TCIC_ICTL_QUIET		TCIC_MCTL_QUIET</div><div class='del'>-#define TCIC_ICTL_1K		0x0080</div><div class='del'>-#define TCIC_ICTL_PASS16	0x0100</div><div class='del'>-#define TCIC_ICTL_ACC		TCIC_MCTL_ACC</div><div class='del'>-#define TCIC_ICTL_TINY		0x0200</div><div class='del'>-#define TCIC_ICTL_B16		0x0400</div><div class='del'>-#define TCIC_ICTL_B8		TCIC_MCTL_B8</div><div class='del'>-#define TCIC_ICTL_BW_MASK	(TCIC_ICTL_B16|TCIC_ICTL_B8)</div><div class='del'>-#define TCIC_ICTL_BW_DYN	0</div><div class='del'>-#define TCIC_ICTL_BW_8		TCIC_ICTL_B8</div><div class='del'>-#define TCIC_ICTL_BW_16		TCIC_ICTL_B16</div><div class='del'>-#define TCIC_ICTL_BW_ATA	(TCIC_ICTL_B16|TCIC_ICTL_B8)</div><div class='del'>-#define TCIC_ICTL_SS_SHFT	TCIC_SS_SHFT</div><div class='del'>-#define TCIC_ICTL_SS_MASK	TCIC_SS_MASK</div><div class='del'>-#define TCIC_ICTL_ENA		TCIC_MCTL_ENA</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_TCIC_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/version.h b/mdk-stage1/pcmcia_/version.h<br/>deleted file mode 100644<br/>index 3be8f28bc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/version.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/version.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-/* version.h 1.101 2001/08/09 12:29:14 (David Hinds) */</div><div class='del'>-</div><div class='del'>-#define CS_RELEASE "3.1.29"</div><div class='del'>-#define CS_RELEASE_CODE 0x311d</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/vg468.h b/mdk-stage1/pcmcia_/vg468.h<br/>deleted file mode 100644<br/>index 93dc00b37..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/vg468.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/vg468.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,112 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * vg468.h 1.14 2001/08/24 12:15:34</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _LINUX_VG468_H</div><div class='del'>-#define _LINUX_VG468_H</div><div class='del'>-</div><div class='del'>-/* Special bit in I365_IDENT used for Vadem chip detection */</div><div class='del'>-#define I365_IDENT_VADEM	0x08</div><div class='del'>-</div><div class='del'>-/* Special definitions in I365_POWER */</div><div class='del'>-#define VG468_VPP2_MASK		0x0c</div><div class='del'>-#define VG468_VPP2_5V		0x04</div><div class='del'>-#define VG468_VPP2_12V		0x08</div><div class='del'>-</div><div class='del'>-/* Unique Vadem registers */</div><div class='del'>-#define VG469_VSENSE		0x1f	/* Card voltage sense */</div><div class='del'>-#define VG469_VSELECT		0x2f	/* Card voltage select */</div><div class='del'>-#define VG468_CTL		0x38	/* Control register */</div><div class='del'>-#define VG468_TIMER		0x39	/* Timer control */</div><div class='del'>-#define VG468_MISC		0x3a	/* Miscellaneous */</div><div class='del'>-#define VG468_GPIO_CFG		0x3b	/* GPIO configuration */</div><div class='del'>-#define VG469_EXT_MODE		0x3c	/* Extended mode register */</div><div class='del'>-#define VG468_SELECT		0x3d	/* Programmable chip select */</div><div class='del'>-#define VG468_SELECT_CFG	0x3e	/* Chip select configuration */</div><div class='del'>-#define VG468_ATA		0x3f	/* ATA control */</div><div class='del'>-</div><div class='del'>-/* Flags for VG469_VSENSE */</div><div class='del'>-#define VG469_VSENSE_A_VS1	0x01</div><div class='del'>-#define VG469_VSENSE_A_VS2	0x02</div><div class='del'>-#define VG469_VSENSE_B_VS1	0x04</div><div class='del'>-#define VG469_VSENSE_B_VS2	0x08</div><div class='del'>-</div><div class='del'>-/* Flags for VG469_VSELECT */</div><div class='del'>-#define VG469_VSEL_VCC		0x03</div><div class='del'>-#define VG469_VSEL_5V		0x00</div><div class='del'>-#define VG469_VSEL_3V		0x03</div><div class='del'>-#define VG469_VSEL_MAX		0x0c</div><div class='del'>-#define VG469_VSEL_EXT_STAT	0x10</div><div class='del'>-#define VG469_VSEL_EXT_BUS	0x20</div><div class='del'>-#define VG469_VSEL_MIXED	0x40</div><div class='del'>-#define VG469_VSEL_ISA		0x80</div><div class='del'>-</div><div class='del'>-/* Flags for VG468_CTL */</div><div class='del'>-#define VG468_CTL_SLOW		0x01	/* 600ns memory timing */</div><div class='del'>-#define VG468_CTL_ASYNC		0x02	/* Asynchronous bus clocking */</div><div class='del'>-#define VG468_CTL_TSSI		0x08	/* Tri-state some outputs */</div><div class='del'>-#define VG468_CTL_DELAY		0x10	/* Card detect debounce */</div><div class='del'>-#define VG468_CTL_INPACK	0x20	/* Obey INPACK signal? */</div><div class='del'>-#define VG468_CTL_POLARITY	0x40	/* VCCEN polarity */</div><div class='del'>-#define VG468_CTL_COMPAT	0x80	/* Compatibility stuff */</div><div class='del'>-</div><div class='del'>-#define VG469_CTL_WS_COMPAT	0x04	/* Wait state compatibility */</div><div class='del'>-#define VG469_CTL_STRETCH	0x10	/* LED stretch */</div><div class='del'>-</div><div class='del'>-/* Flags for VG468_TIMER */</div><div class='del'>-#define VG468_TIMER_ZEROPWR	0x10	/* Zero power control */</div><div class='del'>-#define VG468_TIMER_SIGEN	0x20	/* Power up */</div><div class='del'>-#define VG468_TIMER_STATUS	0x40	/* Activity timer status */</div><div class='del'>-#define VG468_TIMER_RES		0x80	/* Timer resolution */</div><div class='del'>-#define VG468_TIMER_MASK	0x0f	/* Activity timer timeout */</div><div class='del'>-</div><div class='del'>-/* Flags for VG468_MISC */</div><div class='del'>-#define VG468_MISC_GPIO		0x04	/* General-purpose IO */</div><div class='del'>-#define VG468_MISC_DMAWSB	0x08	/* DMA wait state control */</div><div class='del'>-#define VG469_MISC_LEDENA	0x10	/* LED enable */</div><div class='del'>-#define VG468_MISC_VADEMREV	0x40	/* Vadem revision control */</div><div class='del'>-#define VG468_MISC_UNLOCK	0x80	/* Unique register lock */</div><div class='del'>-</div><div class='del'>-/* Flags for VG469_EXT_MODE_A */</div><div class='del'>-#define VG469_MODE_VPPST	0x03	/* Vpp steering control */</div><div class='del'>-#define VG469_MODE_INT_SENSE	0x04	/* Internal voltage sense */</div><div class='del'>-#define VG469_MODE_CABLE	0x08</div><div class='del'>-#define VG469_MODE_COMPAT	0x10	/* i82365sl B or DF step */</div><div class='del'>-#define VG469_MODE_TEST		0x20</div><div class='del'>-#define VG469_MODE_RIO		0x40	/* Steer RIO to INTR? */</div><div class='del'>-</div><div class='del'>-/* Flags for VG469_EXT_MODE_B */</div><div class='del'>-#define VG469_MODE_B_3V		0x01	/* 3.3v for socket B */</div><div class='del'>-</div><div class='del'>-/* Data structure for tracking vendor-specific state */</div><div class='del'>-typedef struct vg46x_state_t {</div><div class='del'>-    u_char		ctl;		/* VG468_CTL */</div><div class='del'>-    u_char		ema;		/* VG468_EXT_MODE_A */</div><div class='del'>-} vg46x_state_t;</div><div class='del'>-</div><div class='del'>-#endif /* _LINUX_VG468_H */</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/yacc_config.c b/mdk-stage1/pcmcia_/yacc_config.c<br/>deleted file mode 100644<br/>index 79ec16eb5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/yacc_config.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/yacc_config.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1015 +0,0 @@</div><div class='del'>-#define YYBYACC 1</div><div class='del'>-#define YYMAJOR 1</div><div class='del'>-#define YYMINOR 9</div><div class='del'>-#define yyclearin (yychar=(-1))</div><div class='del'>-#define yyerrok (yyerrflag=0)</div><div class='del'>-#define YYRECOVERING (yyerrflag!=0)</div><div class='del'>-#define YYPREFIX "yy"</div><div class='del'>-#line 2 "yacc_config.y"</div><div class='del'>-/*</div><div class='del'>- * yacc_config.y 1.53 2001/08/24 12:21:34</div><div class='del'>- *</div><div class='del'>- * The contents of this file are subject to the Mozilla Public License</div><div class='del'>- * Version 1.1 (the "License"); you may not use this file except in</div><div class='del'>- * compliance with the License. You may obtain a copy of the License</div><div class='del'>- * at http://www.mozilla.org/MPL/</div><div class='del'>- *</div><div class='del'>- * Software distributed under the License is distributed on an "AS IS"</div><div class='del'>- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</div><div class='del'>- * the License for the specific language governing rights and</div><div class='del'>- * limitations under the License. </div><div class='del'>- *</div><div class='del'>- * The initial developer of the original code is David A. Hinds</div><div class='del'>- * &lt;dahinds@users.sourceforge.net&gt;.  Portions created by David A. Hinds</div><div class='del'>- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.</div><div class='del'>- *</div><div class='del'>- * Alternatively, the contents of this file may be used under the</div><div class='del'>- * terms of the GNU General Public License version 2 (the "GPL"), in</div><div class='del'>- * which case the provisions of the GPL are applicable instead of the</div><div class='del'>- * above.  If you wish to allow the use of your version of this file</div><div class='del'>- * only under the terms of the GPL and not to allow others to use</div><div class='del'>- * your version of this file under the MPL, indicate your decision by</div><div class='del'>- * deleting the provisions above and replace them with the notice and</div><div class='del'>- * other provisions required by the GPL.  If you do not delete the</div><div class='del'>- * provisions above, a recipient may use your version of this file</div><div class='del'>- * under either the MPL or the GPL.</div><div class='del'>- */</div><div class='del'>-    </div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;pcmcia_/cs_types.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cs.h&gt;</div><div class='del'>-#include &lt;pcmcia_/cistpl.h&gt;</div><div class='del'>-#include &lt;pcmcia_/ds.h&gt;</div><div class='del'>-    </div><div class='del'>-#include "cardmgr.h"</div><div class='del'>-</div><div class='del'>-/* If bison: generate nicer error messages */ </div><div class='del'>-#define YYERROR_VERBOSE 1</div><div class='del'>- </div><div class='del'>-/* from lex_config, for nice error messages */</div><div class='del'>-extern char *current_file;</div><div class='del'>-extern int current_lineno;</div><div class='del'>-</div><div class='del'>-void yyerror(char *msg, ...);</div><div class='del'>-</div><div class='del'>-static int add_binding(card_info_t *card, char *name, int fn);</div><div class='del'>-static int add_module(device_info_t *card, char *name);</div><div class='del'>-</div><div class='del'>-#line 65 "yacc_config.y"</div><div class='del'>-typedef union {</div><div class='del'>-    char *str;</div><div class='del'>-    u_long num;</div><div class='del'>-    struct device_info_t *device;</div><div class='del'>-    struct card_info_t *card;</div><div class='del'>-    struct mtd_ident_t *mtd;</div><div class='del'>-    struct adjust_list_t *adjust;</div><div class='del'>-} YYSTYPE;</div><div class='del'>-#line 77 "y.tab.c"</div><div class='del'>-#define DEVICE 257</div><div class='del'>-#define CARD 258</div><div class='del'>-#define ANONYMOUS 259</div><div class='del'>-#define TUPLE 260</div><div class='del'>-#define MANFID 261</div><div class='del'>-#define VERSION 262</div><div class='del'>-#define FUNCTION 263</div><div class='del'>-#define PCI 264</div><div class='del'>-#define BIND 265</div><div class='del'>-#define CIS 266</div><div class='del'>-#define TO 267</div><div class='del'>-#define NEEDS_MTD 268</div><div class='del'>-#define MODULE 269</div><div class='del'>-#define OPTS 270</div><div class='del'>-#define CLASS 271</div><div class='del'>-#define REGION 272</div><div class='del'>-#define JEDEC 273</div><div class='del'>-#define DTYPE 274</div><div class='del'>-#define DEFAULT 275</div><div class='del'>-#define MTD 276</div><div class='del'>-#define INCLUDE 277</div><div class='del'>-#define EXCLUDE 278</div><div class='del'>-#define RESERVE 279</div><div class='del'>-#define IRQ_NO 280</div><div class='del'>-#define PORT 281</div><div class='del'>-#define MEMORY 282</div><div class='del'>-#define STRING 283</div><div class='del'>-#define NUMBER 284</div><div class='del'>-#define YYERRCODE 256</div><div class='del'>-short yylhs[] = {                                        -1,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    1,    1,</div><div class='del'>-    1,    1,    2,    2,    2,    3,    3,    3,    3,    7,</div><div class='del'>-    7,    7,    7,    7,    7,    7,    7,    7,    8,    9,</div><div class='del'>-   10,   11,   12,   12,   13,   15,   14,   14,   14,   14,</div><div class='del'>-    4,   21,    5,    5,    5,    6,   16,   16,   16,   16,</div><div class='del'>-   18,   17,   19,   20,   20,   22,</div><div class='del'>-};</div><div class='del'>-short yylen[] = {                                         2,</div><div class='del'>-    0,    2,    2,    2,    2,    2,    2,    2,    2,    2,</div><div class='del'>-    2,    3,    2,    4,    4,    2,    1,    1,    1,    2,</div><div class='del'>-    1,    1,    1,    1,    1,    1,    1,    1,    2,    7,</div><div class='del'>-    5,    5,    3,    3,    3,    3,    3,    5,    3,    5,</div><div class='del'>-    2,    4,    3,    3,    3,    3,    2,    1,    1,    1,</div><div class='del'>-    3,    4,    2,    3,    3,    4,</div><div class='del'>-};</div><div class='del'>-short yydefred[] = {                                      1,</div><div class='del'>-    0,    8,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,   17,    0,   19,    0,   21,   22,   23,   24,</div><div class='del'>-    0,   26,    0,   28,    0,   49,   48,   50,    0,    6,</div><div class='del'>-    7,   16,   20,    0,   47,    0,    0,    0,    0,    9,</div><div class='del'>-   10,   11,    0,   41,    0,    0,    0,    0,   29,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-   53,    0,    0,    0,    0,   13,    0,    0,   12,   43,</div><div class='del'>-   46,   44,   45,    0,    0,   33,   35,    0,    0,   36,</div><div class='del'>-   34,    0,    0,   51,   54,   55,   42,   56,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,   52,   14,   15,    0,   31,</div><div class='del'>-   32,   38,   40,    0,   30,</div><div class='del'>-};</div><div class='del'>-short yydgoto[] = {                                       1,</div><div class='del'>-   11,   40,   12,   13,   14,   15,   16,   17,   18,   19,</div><div class='del'>-   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,</div><div class='del'>-   30,   31,</div><div class='del'>-};</div><div class='del'>-short yysindex[] = {                                      0,</div><div class='del'>- -250,    0, -279, -278, -274, -265, -259, -242, -242, -242,</div><div class='del'>-  -10, -248,    0,  -44,    0, -249,    0,    0,    0,    0,</div><div class='del'>-   -9,    0,   -3,    0, -243,    0,    0,    0, -233,    0,</div><div class='del'>-    0,    0,    0, -228,    0, -227, -240, -238, -237,    0,</div><div class='del'>-    0,    0, -242,    0, -235, -232, -231, -230,    0, -234,</div><div class='del'>- -229, -226, -225, -224, -222, -221, -220, -219, -218, -217,</div><div class='del'>-    0, -215, -213, -212, -211,    0,    9,   11,    0,    0,</div><div class='del'>-    0,    0,    0,   14,   21,    0,    0,   30, -192,    0,</div><div class='del'>-    0, -191, -207,    0,    0,    0,    0,    0, -206, -205,</div><div class='del'>- -204, -203, -202, -201, -200,    0,    0,    0,   41,    0,</div><div class='del'>-    0,    0,    0, -197,    0,</div><div class='del'>-};</div><div class='del'>-short yyrindex[] = {                                      0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-  107,  149,    0,   90,    0,  124,    0,    0,    0,    0,</div><div class='del'>-   49,    0,   73,    0,    0,    0,    0,    0,  141,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    1,    0,</div><div class='del'>-    0,   25,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,</div><div class='del'>-};</div><div class='del'>-short yygindex[] = {                                      0,</div><div class='del'>-    0,   -7,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,</div><div class='del'>-};</div><div class='del'>-#define YYTABLESIZE 428</div><div class='del'>-short yytable[] = {                                      48,</div><div class='del'>-   37,   41,   42,   32,   33,    2,    3,    4,   34,   49,</div><div class='del'>-   50,   51,   52,   53,   54,   55,   56,   35,    5,   44,</div><div class='del'>-   45,    6,   46,   36,   39,    7,    8,    9,   10,   59,</div><div class='del'>-   60,   61,   62,   43,   57,   69,   63,   37,   38,   39,</div><div class='del'>-   58,   64,   65,   66,   37,   67,   68,   70,   25,   74,</div><div class='del'>-   71,   72,   73,   89,   75,   90,   76,   91,   77,   78,</div><div class='del'>-   79,   80,   81,   82,   92,   83,   84,   85,   39,   86,</div><div class='del'>-   87,   88,   27,   93,   94,   95,   96,   97,   98,   99,</div><div class='del'>-  100,  101,  102,  103,  104,  105,    0,    0,    0,   18,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    2,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    5,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    4,    0,    0,    0,    0,    0,    0,    0,    3,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,   47,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    0,   37,   37,   37,   37,</div><div class='del'>-   37,   37,   37,   37,   37,   37,   37,    0,    0,   37,</div><div class='del'>-    0,    0,   37,    0,    0,    0,   37,   37,   37,   37,</div><div class='del'>-   39,   39,   39,   39,   39,   39,   39,   39,   39,   39,</div><div class='del'>-   39,    0,    0,   39,    0,    0,   39,    0,    0,    0,</div><div class='del'>-   39,   39,   39,   39,   25,   25,   25,   25,   25,   25,</div><div class='del'>-   25,   25,   25,   25,   25,    0,    0,   25,    0,    0,</div><div class='del'>-   25,    0,    0,    0,   25,   25,   25,   25,   27,   27,</div><div class='del'>-   27,   27,   27,   27,   27,   27,   27,   27,   27,    0,</div><div class='del'>-    0,   27,    0,    0,   27,   18,   18,   18,   27,   27,</div><div class='del'>-   27,   27,    0,    0,    0,    0,    0,   18,   18,    0,</div><div class='del'>-   18,   18,    2,    2,    2,   18,   18,   18,   18,    0,</div><div class='del'>-    0,    0,    0,    0,    0,    2,    0,    0,    2,    5,</div><div class='del'>-    5,    5,    2,    2,    2,    2,    0,    0,    0,    0,</div><div class='del'>-    0,    0,    5,    0,    0,    5,    4,    4,    4,    5,</div><div class='del'>-    5,    5,    5,    0,    3,    3,    3,    0,    0,    4,</div><div class='del'>-    0,    0,    4,    0,    0,    0,    4,    4,    4,    4,</div><div class='del'>-    3,    0,    0,    0,    3,    3,    3,    3,</div><div class='del'>-};</div><div class='del'>-short yycheck[] = {                                      44,</div><div class='del'>-    0,    9,   10,  283,  283,  256,  257,  258,  283,  259,</div><div class='del'>-  260,  261,  262,  263,  264,  265,  266,  283,  269,  268,</div><div class='del'>-  269,  272,  271,  283,    0,  276,  277,  278,  279,  273,</div><div class='del'>-  274,  275,  276,   44,   44,   43,  270,  280,  281,  282,</div><div class='del'>-   44,  270,  270,  284,   44,  284,  284,  283,    0,  284,</div><div class='del'>-  283,  283,  283,   45,  284,   45,  283,   44,  284,  284,</div><div class='del'>-  283,  283,  283,  283,   44,  284,  284,  283,   44,  283,</div><div class='del'>-  283,  283,    0,   44,  267,  267,  284,  284,  284,  284,</div><div class='del'>-  284,  284,  284,  284,   44,  283,   -1,   -1,   -1,    0,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,    0,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,    0,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,    0,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,  270,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,   -1,  256,  257,  258,  259,</div><div class='del'>-  260,  261,  262,  263,  264,  265,  266,   -1,   -1,  269,</div><div class='del'>-   -1,   -1,  272,   -1,   -1,   -1,  276,  277,  278,  279,</div><div class='del'>-  256,  257,  258,  259,  260,  261,  262,  263,  264,  265,</div><div class='del'>-  266,   -1,   -1,  269,   -1,   -1,  272,   -1,   -1,   -1,</div><div class='del'>-  276,  277,  278,  279,  256,  257,  258,  259,  260,  261,</div><div class='del'>-  262,  263,  264,  265,  266,   -1,   -1,  269,   -1,   -1,</div><div class='del'>-  272,   -1,   -1,   -1,  276,  277,  278,  279,  256,  257,</div><div class='del'>-  258,  259,  260,  261,  262,  263,  264,  265,  266,   -1,</div><div class='del'>-   -1,  269,   -1,   -1,  272,  256,  257,  258,  276,  277,</div><div class='del'>-  278,  279,   -1,   -1,   -1,   -1,   -1,  268,  269,   -1,</div><div class='del'>-  271,  272,  256,  257,  258,  276,  277,  278,  279,   -1,</div><div class='del'>-   -1,   -1,   -1,   -1,   -1,  269,   -1,   -1,  272,  256,</div><div class='del'>-  257,  258,  276,  277,  278,  279,   -1,   -1,   -1,   -1,</div><div class='del'>-   -1,   -1,  269,   -1,   -1,  272,  256,  257,  258,  276,</div><div class='del'>-  277,  278,  279,   -1,  256,  257,  258,   -1,   -1,  269,</div><div class='del'>-   -1,   -1,  272,   -1,   -1,   -1,  276,  277,  278,  279,</div><div class='del'>-  272,   -1,   -1,   -1,  276,  277,  278,  279,</div><div class='del'>-};</div><div class='del'>-#define YYFINAL 1</div><div class='del'>-#ifndef YYDEBUG</div><div class='del'>-#define YYDEBUG 0</div><div class='del'>-#endif</div><div class='del'>-#define YYMAXTOKEN 284</div><div class='del'>-#if YYDEBUG</div><div class='del'>-char *yyname[] = {</div><div class='del'>-"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,"','","'-'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,</div><div class='del'>-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"DEVICE","CARD",</div><div class='del'>-"ANONYMOUS","TUPLE","MANFID","VERSION","FUNCTION","PCI","BIND","CIS","TO",</div><div class='del'>-"NEEDS_MTD","MODULE","OPTS","CLASS","REGION","JEDEC","DTYPE","DEFAULT","MTD",</div><div class='del'>-"INCLUDE","EXCLUDE","RESERVE","IRQ_NO","PORT","MEMORY","STRING","NUMBER",</div><div class='del'>-};</div><div class='del'>-char *yyrule[] = {</div><div class='del'>-"$accept : list",</div><div class='del'>-"list :",</div><div class='del'>-"list : list adjust",</div><div class='del'>-"list : list device",</div><div class='del'>-"list : list mtd",</div><div class='del'>-"list : list card",</div><div class='del'>-"list : list opts",</div><div class='del'>-"list : list mtd_opts",</div><div class='del'>-"list : list error",</div><div class='del'>-"adjust : INCLUDE resource",</div><div class='del'>-"adjust : EXCLUDE resource",</div><div class='del'>-"adjust : RESERVE resource",</div><div class='del'>-"adjust : adjust ',' resource",</div><div class='del'>-"resource : IRQ_NO NUMBER",</div><div class='del'>-"resource : PORT NUMBER '-' NUMBER",</div><div class='del'>-"resource : MEMORY NUMBER '-' NUMBER",</div><div class='del'>-"device : DEVICE STRING",</div><div class='del'>-"device : needs_mtd",</div><div class='del'>-"device : module",</div><div class='del'>-"device : class",</div><div class='del'>-"card : CARD STRING",</div><div class='del'>-"card : anonymous",</div><div class='del'>-"card : tuple",</div><div class='del'>-"card : manfid",</div><div class='del'>-"card : pci",</div><div class='del'>-"card : version",</div><div class='del'>-"card : function",</div><div class='del'>-"card : bind",</div><div class='del'>-"card : cis",</div><div class='del'>-"anonymous : card ANONYMOUS",</div><div class='del'>-"tuple : card TUPLE NUMBER ',' NUMBER ',' STRING",</div><div class='del'>-"manfid : card MANFID NUMBER ',' NUMBER",</div><div class='del'>-"pci : card PCI NUMBER ',' NUMBER",</div><div class='del'>-"version : card VERSION STRING",</div><div class='del'>-"version : version ',' STRING",</div><div class='del'>-"function : card FUNCTION NUMBER",</div><div class='del'>-"cis : card CIS STRING",</div><div class='del'>-"bind : card BIND STRING",</div><div class='del'>-"bind : card BIND STRING TO NUMBER",</div><div class='del'>-"bind : bind ',' STRING",</div><div class='del'>-"bind : bind ',' STRING TO NUMBER",</div><div class='del'>-"needs_mtd : device NEEDS_MTD",</div><div class='del'>-"opts : MODULE STRING OPTS STRING",</div><div class='del'>-"module : device MODULE STRING",</div><div class='del'>-"module : module OPTS STRING",</div><div class='del'>-"module : module ',' STRING",</div><div class='del'>-"class : device CLASS STRING",</div><div class='del'>-"region : REGION STRING",</div><div class='del'>-"region : dtype",</div><div class='del'>-"region : jedec",</div><div class='del'>-"region : default",</div><div class='del'>-"dtype : region DTYPE NUMBER",</div><div class='del'>-"jedec : region JEDEC NUMBER NUMBER",</div><div class='del'>-"default : region DEFAULT",</div><div class='del'>-"mtd : region MTD STRING",</div><div class='del'>-"mtd : mtd OPTS STRING",</div><div class='del'>-"mtd_opts : MTD STRING OPTS STRING",</div><div class='del'>-};</div><div class='del'>-#endif</div><div class='del'>-#ifdef YYSTACKSIZE</div><div class='del'>-#undef YYMAXDEPTH</div><div class='del'>-#define YYMAXDEPTH YYSTACKSIZE</div><div class='del'>-#else</div><div class='del'>-#ifdef YYMAXDEPTH</div><div class='del'>-#define YYSTACKSIZE YYMAXDEPTH</div><div class='del'>-#else</div><div class='del'>-#define YYSTACKSIZE 500</div><div class='del'>-#define YYMAXDEPTH 500</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-int yydebug;</div><div class='del'>-int yynerrs;</div><div class='del'>-int yyerrflag;</div><div class='del'>-int yychar;</div><div class='del'>-short *yyssp;</div><div class='del'>-YYSTYPE *yyvsp;</div><div class='del'>-YYSTYPE yyval;</div><div class='del'>-YYSTYPE yylval;</div><div class='del'>-short yyss[YYSTACKSIZE];</div><div class='del'>-YYSTYPE yyvs[YYSTACKSIZE];</div><div class='del'>-#define yystacksize YYSTACKSIZE</div><div class='del'>-#line 468 "yacc_config.y"</div><div class='del'>-void yyerror(char *msg, ...)</div><div class='del'>-{</div><div class='del'>-     va_list ap;</div><div class='del'>-     char str[256];</div><div class='del'>-</div><div class='del'>-     va_start(ap, msg);</div><div class='del'>-     sprintf(str, "config error, file '%s' line %d: ",</div><div class='del'>-	     current_file, current_lineno);</div><div class='del'>-     vsprintf(str+strlen(str), msg, ap);</div><div class='del'>-#if YYDEBUG</div><div class='del'>-     fprintf(stderr, "%s\n", str);</div><div class='del'>-#else</div><div class='del'>-     syslog(LOG_ERR, "%s", str);</div><div class='del'>-#endif</div><div class='del'>-     va_end(ap);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int add_binding(card_info_t *card, char *name, int fn)</div><div class='del'>-{</div><div class='del'>-    device_info_t *dev = root_device;</div><div class='del'>-    if (card-&gt;bindings == MAX_BINDINGS) {</div><div class='del'>-	yyerror("too many bindings\n");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    for (; dev; dev = dev-&gt;next)</div><div class='del'>-	if (strcmp((char *)dev-&gt;dev_info, name) == 0) break;</div><div class='del'>-    if (dev == NULL) {</div><div class='del'>-	yyerror("unknown device: %s", name);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    card-&gt;device[card-&gt;bindings] = dev;</div><div class='del'>-    card-&gt;dev_fn[card-&gt;bindings] = fn;</div><div class='del'>-    card-&gt;bindings++;</div><div class='del'>-    free(name);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int add_module(device_info_t *dev, char *name)</div><div class='del'>-{</div><div class='del'>-    if (dev-&gt;modules == MAX_MODULES) {</div><div class='del'>-	yyerror("too many modules");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    dev-&gt;module[dev-&gt;modules] = name;</div><div class='del'>-    dev-&gt;opts[dev-&gt;modules] = NULL;</div><div class='del'>-    dev-&gt;modules++;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if YYDEBUG</div><div class='del'>-adjust_list_t *root_adjust = NULL;</div><div class='del'>-device_info_t *root_device = NULL;</div><div class='del'>-card_info_t *root_card = NULL, *blank_card = NULL, *root_func = NULL;</div><div class='del'>-mtd_ident_t *root_mtd = NULL, *default_mtd = NULL;</div><div class='del'>-</div><div class='del'>-void main(int argc, char *argv[])</div><div class='del'>-{</div><div class='del'>-    yydebug = 1;</div><div class='del'>-    if (argc &gt; 1)</div><div class='del'>-	parse_configfile(argv[1]);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#line 426 "y.tab.c"</div><div class='del'>-#define YYABORT goto yyabort</div><div class='del'>-#define YYREJECT goto yyabort</div><div class='del'>-#define YYACCEPT goto yyaccept</div><div class='del'>-#define YYERROR goto yyerrlab</div><div class='del'>-int yylex(void);</div><div class='del'>-int</div><div class='del'>-yyparse()</div><div class='del'>-{</div><div class='del'>-    register int yym, yyn, yystate;</div><div class='del'>-#if YYDEBUG</div><div class='del'>-    register char *yys;</div><div class='del'>-    extern char *getenv();</div><div class='del'>-</div><div class='del'>-    if (yys = getenv("YYDEBUG"))</div><div class='del'>-    {</div><div class='del'>-        yyn = *yys;</div><div class='del'>-        if (yyn &gt;= '0' &amp;&amp; yyn &lt;= '9')</div><div class='del'>-            yydebug = yyn - '0';</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    yynerrs = 0;</div><div class='del'>-    yyerrflag = 0;</div><div class='del'>-    yychar = (-1);</div><div class='del'>-</div><div class='del'>-    yyssp = yyss;</div><div class='del'>-    yyvsp = yyvs;</div><div class='del'>-    *yyssp = yystate = 0;</div><div class='del'>-</div><div class='del'>-yyloop:</div><div class='del'>-    if ((yyn = yydefred[yystate])) goto yyreduce;</div><div class='del'>-    if (yychar &lt; 0)</div><div class='del'>-    {</div><div class='del'>-        if ((yychar = yylex()) &lt; 0) yychar = 0;</div><div class='del'>-#if YYDEBUG</div><div class='del'>-        if (yydebug)</div><div class='del'>-        {</div><div class='del'>-            yys = 0;</div><div class='del'>-            if (yychar &lt;= YYMAXTOKEN) yys = yyname[yychar];</div><div class='del'>-            if (!yys) yys = "illegal-symbol";</div><div class='del'>-            printf("%sdebug: state %d, reading %d (%s)\n",</div><div class='del'>-                    YYPREFIX, yystate, yychar, yys);</div><div class='del'>-        }</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-    if ((yyn = yysindex[yystate]) &amp;&amp; (yyn += yychar) &gt;= 0 &amp;&amp;</div><div class='del'>-            yyn &lt;= YYTABLESIZE &amp;&amp; yycheck[yyn] == yychar)</div><div class='del'>-    {</div><div class='del'>-#if YYDEBUG</div><div class='del'>-        if (yydebug)</div><div class='del'>-            printf("%sdebug: state %d, shifting to state %d\n",</div><div class='del'>-                    YYPREFIX, yystate, yytable[yyn]);</div><div class='del'>-#endif</div><div class='del'>-        if (yyssp &gt;= yyss + yystacksize - 1)</div><div class='del'>-        {</div><div class='del'>-            goto yyoverflow;</div><div class='del'>-        }</div><div class='del'>-        *++yyssp = yystate = yytable[yyn];</div><div class='del'>-        *++yyvsp = yylval;</div><div class='del'>-        yychar = (-1);</div><div class='del'>-        if (yyerrflag &gt; 0)  --yyerrflag;</div><div class='del'>-        goto yyloop;</div><div class='del'>-    }</div><div class='del'>-    if ((yyn = yyrindex[yystate]) &amp;&amp; (yyn += yychar) &gt;= 0 &amp;&amp;</div><div class='del'>-            yyn &lt;= YYTABLESIZE &amp;&amp; yycheck[yyn] == yychar)</div><div class='del'>-    {</div><div class='del'>-        yyn = yytable[yyn];</div><div class='del'>-        goto yyreduce;</div><div class='del'>-    }</div><div class='del'>-    if (yyerrflag) goto yyinrecovery;</div><div class='del'>-    yyerror("syntax error");</div><div class='del'>-#ifdef lint</div><div class='del'>-    goto yyerrlab;</div><div class='del'>-#endif</div><div class='del'>-yyerrlab:</div><div class='del'>-    ++yynerrs;</div><div class='del'>-yyinrecovery:</div><div class='del'>-    if (yyerrflag &lt; 3)</div><div class='del'>-    {</div><div class='del'>-        yyerrflag = 3;</div><div class='del'>-        for (;;)</div><div class='del'>-        {</div><div class='del'>-            if ((yyn = yysindex[*yyssp]) &amp;&amp; (yyn += YYERRCODE) &gt;= 0 &amp;&amp;</div><div class='del'>-                    yyn &lt;= YYTABLESIZE &amp;&amp; yycheck[yyn] == YYERRCODE)</div><div class='del'>-            {</div><div class='del'>-#if YYDEBUG</div><div class='del'>-                if (yydebug)</div><div class='del'>-                    printf("%sdebug: state %d, error recovery shifting\</div><div class='del'>- to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);</div><div class='del'>-#endif</div><div class='del'>-                if (yyssp &gt;= yyss + yystacksize - 1)</div><div class='del'>-                {</div><div class='del'>-                    goto yyoverflow;</div><div class='del'>-                }</div><div class='del'>-                *++yyssp = yystate = yytable[yyn];</div><div class='del'>-                *++yyvsp = yylval;</div><div class='del'>-                goto yyloop;</div><div class='del'>-            }</div><div class='del'>-            else</div><div class='del'>-            {</div><div class='del'>-#if YYDEBUG</div><div class='del'>-                if (yydebug)</div><div class='del'>-                    printf("%sdebug: error recovery discarding state %d\n",</div><div class='del'>-                            YYPREFIX, *yyssp);</div><div class='del'>-#endif</div><div class='del'>-                if (yyssp &lt;= yyss) goto yyabort;</div><div class='del'>-                --yyssp;</div><div class='del'>-                --yyvsp;</div><div class='del'>-            }</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    else</div><div class='del'>-    {</div><div class='del'>-        if (yychar == 0) goto yyabort;</div><div class='del'>-#if YYDEBUG</div><div class='del'>-        if (yydebug)</div><div class='del'>-        {</div><div class='del'>-            yys = 0;</div><div class='del'>-            if (yychar &lt;= YYMAXTOKEN) yys = yyname[yychar];</div><div class='del'>-            if (!yys) yys = "illegal-symbol";</div><div class='del'>-            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",</div><div class='del'>-                    YYPREFIX, yystate, yychar, yys);</div><div class='del'>-        }</div><div class='del'>-#endif</div><div class='del'>-        yychar = (-1);</div><div class='del'>-        goto yyloop;</div><div class='del'>-    }</div><div class='del'>-yyreduce:</div><div class='del'>-#if YYDEBUG</div><div class='del'>-    if (yydebug)</div><div class='del'>-        printf("%sdebug: state %d, reducing by rule %d (%s)\n",</div><div class='del'>-                YYPREFIX, yystate, yyn, yyrule[yyn]);</div><div class='del'>-#endif</div><div class='del'>-    yym = yylen[yyn];</div><div class='del'>-    yyval = yyvsp[1-yym];</div><div class='del'>-    switch (yyn)</div><div class='del'>-    {</div><div class='del'>-case 2:</div><div class='del'>-#line 84 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    adjust_list_t **tail = &amp;root_adjust;</div><div class='del'>-		    while (*tail != NULL) tail = &amp;(*tail)-&gt;next;</div><div class='del'>-		    *tail = yyvsp[0].adjust;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 3:</div><div class='del'>-#line 90 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[0].device-&gt;next = root_device;</div><div class='del'>-		    root_device = yyvsp[0].device;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 4:</div><div class='del'>-#line 95 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[0].mtd-&gt;mtd_type == 0) {</div><div class='del'>-			yyerror("no ID method for this card");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    if (yyvsp[0].mtd-&gt;module == NULL) {</div><div class='del'>-			yyerror("no MTD module specified");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[0].mtd-&gt;next = root_mtd;</div><div class='del'>-		    root_mtd = yyvsp[0].mtd;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 5:</div><div class='del'>-#line 108 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[0].card-&gt;ident_type == 0) {</div><div class='del'>-			yyerror("no ID method for this card");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    if (yyvsp[0].card-&gt;bindings == 0) {</div><div class='del'>-			yyerror("no function bindings");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    if (yyvsp[0].card-&gt;ident_type == FUNC_IDENT) {</div><div class='del'>-			yyvsp[0].card-&gt;next = root_func;</div><div class='del'>-			root_func = yyvsp[0].card;</div><div class='del'>-		    } else {</div><div class='del'>-			yyvsp[0].card-&gt;next = root_card;</div><div class='del'>-			root_card = yyvsp[0].card;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 9:</div><div class='del'>-#line 131 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Action = ADD_MANAGED_RESOURCE;</div><div class='del'>-		    yyval.adjust = yyvsp[0].adjust;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 10:</div><div class='del'>-#line 136 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Action = REMOVE_MANAGED_RESOURCE;</div><div class='del'>-		    yyval.adjust = yyvsp[0].adjust;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 11:</div><div class='del'>-#line 141 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Action = ADD_MANAGED_RESOURCE;</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Attributes |= RES_RESERVED;</div><div class='del'>-		    yyval.adjust = yyvsp[0].adjust;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 12:</div><div class='del'>-#line 147 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Action = yyvsp[-2].adjust-&gt;adj.Action;</div><div class='del'>-		    yyvsp[0].adjust-&gt;adj.Attributes = yyvsp[-2].adjust-&gt;adj.Attributes;</div><div class='del'>-		    yyvsp[0].adjust-&gt;next = yyvsp[-2].adjust;</div><div class='del'>-		    yyval.adjust = yyvsp[0].adjust;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 13:</div><div class='del'>-#line 156 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyval.adjust = calloc(sizeof(adjust_list_t), 1);</div><div class='del'>-		    yyval.adjust-&gt;adj.Resource = RES_IRQ;</div><div class='del'>-		    yyval.adjust-&gt;adj.resource.irq.IRQ = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 14:</div><div class='del'>-#line 162 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if ((yyvsp[0].num &lt; yyvsp[-2].num) || (yyvsp[0].num &gt; 0xffff)) {</div><div class='del'>-			yyerror("invalid port range");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyval.adjust = calloc(sizeof(adjust_list_t), 1);</div><div class='del'>-		    yyval.adjust-&gt;adj.Resource = RES_IO_RANGE;</div><div class='del'>-		    yyval.adjust-&gt;adj.resource.io.BasePort = yyvsp[-2].num;</div><div class='del'>-		    yyval.adjust-&gt;adj.resource.io.NumPorts = yyvsp[0].num - yyvsp[-2].num + 1;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 15:</div><div class='del'>-#line 173 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[0].num &lt; yyvsp[-2].num) {</div><div class='del'>-			yyerror("invalid address range");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyval.adjust = calloc(sizeof(adjust_list_t), 1);</div><div class='del'>-		    yyval.adjust-&gt;adj.Resource = RES_MEMORY_RANGE;</div><div class='del'>-		    yyval.adjust-&gt;adj.resource.memory.Base = yyvsp[-2].num;</div><div class='del'>-		    yyval.adjust-&gt;adj.resource.memory.Size = yyvsp[0].num - yyvsp[-2].num + 1;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 16:</div><div class='del'>-#line 186 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyval.device = calloc(sizeof(device_info_t), 1);</div><div class='del'>-		    yyval.device-&gt;refs = 1;</div><div class='del'>-		    strcpy(yyval.device-&gt;dev_info, yyvsp[0].str);</div><div class='del'>-		    free(yyvsp[0].str);</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 20:</div><div class='del'>-#line 198 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyval.card = calloc(sizeof(card_info_t), 1);</div><div class='del'>-		    yyval.card-&gt;refs = 1;</div><div class='del'>-		    yyval.card-&gt;name = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 29:</div><div class='del'>-#line 214 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-1].card-&gt;ident_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    if (blank_card) {</div><div class='del'>-			yyerror("Anonymous card already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-1].card-&gt;ident_type = BLANK_IDENT;</div><div class='del'>-		    blank_card = yyvsp[-1].card;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 30:</div><div class='del'>-#line 229 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-6].card-&gt;ident_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-6].card-&gt;ident_type = TUPLE_IDENT;</div><div class='del'>-		    yyvsp[-6].card-&gt;id.tuple.code = yyvsp[-4].num;</div><div class='del'>-		    yyvsp[-6].card-&gt;id.tuple.ofs = yyvsp[-2].num;</div><div class='del'>-		    yyvsp[-6].card-&gt;id.tuple.info = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 31:</div><div class='del'>-#line 242 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-4].card-&gt;ident_type &amp; EXCL_IDENT) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-4].card-&gt;ident_type = MANFID_IDENT;</div><div class='del'>-		    yyvsp[-4].card-&gt;manfid.manf = yyvsp[-2].num;</div><div class='del'>-		    yyvsp[-4].card-&gt;manfid.card = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 32:</div><div class='del'>-#line 253 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-4].card-&gt;ident_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-4].card-&gt;ident_type = PCI_IDENT;</div><div class='del'>-		    yyvsp[-4].card-&gt;manfid.manf = yyvsp[-2].num;</div><div class='del'>-		    yyvsp[-4].card-&gt;manfid.card = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 33:</div><div class='del'>-#line 264 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].card-&gt;ident_type &amp; EXCL_IDENT) {</div><div class='del'>-			yyerror("ID method already defined\n");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].card-&gt;ident_type = VERS_1_IDENT;</div><div class='del'>-		    yyvsp[-2].card-&gt;id.vers.ns = 1;</div><div class='del'>-		    yyvsp[-2].card-&gt;id.vers.pi[0] = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 34:</div><div class='del'>-#line 274 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].card-&gt;id.vers.ns == 4) {</div><div class='del'>-			yyerror("too many version strings");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].card-&gt;id.vers.pi[yyvsp[-2].card-&gt;id.vers.ns] = yyvsp[0].str;</div><div class='del'>-		    yyvsp[-2].card-&gt;id.vers.ns++;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 35:</div><div class='del'>-#line 285 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].card-&gt;ident_type != 0) {</div><div class='del'>-			yyerror("ID method already defined\n");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].card-&gt;ident_type = FUNC_IDENT;</div><div class='del'>-		    yyvsp[-2].card-&gt;id.func.funcid = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 36:</div><div class='del'>-#line 296 "yacc_config.y"</div><div class='del'>-{ yyvsp[-2].card-&gt;cis_file = strdup(yyvsp[0].str); }</div><div class='del'>-break;</div><div class='del'>-case 37:</div><div class='del'>-#line 300 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_binding(yyvsp[-2].card, yyvsp[0].str, 0) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 38:</div><div class='del'>-#line 305 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_binding(yyvsp[-4].card, yyvsp[-2].str, yyvsp[0].num) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 39:</div><div class='del'>-#line 310 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_binding(yyvsp[-2].card, yyvsp[0].str, 0) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 40:</div><div class='del'>-#line 315 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_binding(yyvsp[-4].card, yyvsp[-2].str, yyvsp[0].num) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 41:</div><div class='del'>-#line 322 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyvsp[-1].device-&gt;needs_mtd = 1;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 42:</div><div class='del'>-#line 328 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    device_info_t *d;</div><div class='del'>-		    int i, found = 0;</div><div class='del'>-		    for (d = root_device; d; d = d-&gt;next) {</div><div class='del'>-			for (i = 0; i &lt; d-&gt;modules; i++)</div><div class='del'>-			    if (strcmp(yyvsp[-2].str, d-&gt;module[i]) == 0) break;</div><div class='del'>-			if (i &lt; d-&gt;modules) {</div><div class='del'>-			    if (d-&gt;opts[i])</div><div class='del'>-				free(d-&gt;opts[i]);</div><div class='del'>-			    d-&gt;opts[i] = strdup(yyvsp[0].str);</div><div class='del'>-			    found = 1;</div><div class='del'>-			}</div><div class='del'>-		    }</div><div class='del'>-		    free(yyvsp[-2].str); free(yyvsp[0].str);</div><div class='del'>-		    if (!found) {</div><div class='del'>-			yyerror("module name not found!");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 43:</div><div class='del'>-#line 350 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_module(yyvsp[-2].device, yyvsp[0].str) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 44:</div><div class='del'>-#line 355 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].device-&gt;opts[yyvsp[-2].device-&gt;modules-1] == NULL) {</div><div class='del'>-			yyvsp[-2].device-&gt;opts[yyvsp[-2].device-&gt;modules-1] = yyvsp[0].str;</div><div class='del'>-		    } else {</div><div class='del'>-			yyerror("too many options");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 45:</div><div class='del'>-#line 364 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (add_module(yyvsp[-2].device, yyvsp[0].str) != 0)</div><div class='del'>-			YYERROR;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 46:</div><div class='del'>-#line 371 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].device-&gt;class != NULL) {</div><div class='del'>-			yyerror("extra class string");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].device-&gt;class = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 47:</div><div class='del'>-#line 381 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    yyval.mtd = calloc(sizeof(mtd_ident_t), 1);</div><div class='del'>-		    yyval.mtd-&gt;refs = 1;</div><div class='del'>-		    yyval.mtd-&gt;name = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 51:</div><div class='del'>-#line 392 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].mtd-&gt;mtd_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].mtd-&gt;mtd_type = DTYPE_MTD;</div><div class='del'>-		    yyvsp[-2].mtd-&gt;dtype = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 52:</div><div class='del'>-#line 403 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-3].mtd-&gt;mtd_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-3].mtd-&gt;mtd_type = JEDEC_MTD;</div><div class='del'>-		    yyvsp[-3].mtd-&gt;jedec_mfr = yyvsp[-1].num;</div><div class='del'>-		    yyvsp[-3].mtd-&gt;jedec_info = yyvsp[0].num;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 53:</div><div class='del'>-#line 415 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-1].mtd-&gt;mtd_type != 0) {</div><div class='del'>-			yyerror("ID method already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    if (default_mtd) {</div><div class='del'>-			yyerror("Default MTD already defined");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-1].mtd-&gt;mtd_type = DEFAULT_MTD;</div><div class='del'>-		    default_mtd = yyvsp[-1].mtd;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 54:</div><div class='del'>-#line 430 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].mtd-&gt;module != NULL) {</div><div class='del'>-			yyerror("extra MTD entry");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		    yyvsp[-2].mtd-&gt;module = yyvsp[0].str;</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 55:</div><div class='del'>-#line 438 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    if (yyvsp[-2].mtd-&gt;opts == NULL) {</div><div class='del'>-			yyvsp[-2].mtd-&gt;opts = yyvsp[0].str;</div><div class='del'>-		    } else {</div><div class='del'>-			yyerror("too many options");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-case 56:</div><div class='del'>-#line 449 "yacc_config.y"</div><div class='del'>-{</div><div class='del'>-		    mtd_ident_t *m;</div><div class='del'>-		    int found = 0;</div><div class='del'>-		    for (m = root_mtd; m; m = m-&gt;next)</div><div class='del'>-			if (strcmp(yyvsp[-2].str, m-&gt;module) == 0) break;</div><div class='del'>-		    if (m) {</div><div class='del'>-			if (m-&gt;opts) free(m-&gt;opts);</div><div class='del'>-			m-&gt;opts = strdup(yyvsp[0].str);</div><div class='del'>-			found = 1;</div><div class='del'>-		    }</div><div class='del'>-		    free(yyvsp[-2].str); free(yyvsp[0].str);</div><div class='del'>-		    if (!found) {</div><div class='del'>-			yyerror("MTD name not found!");</div><div class='del'>-			YYERROR;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-break;</div><div class='del'>-#line 966 "y.tab.c"</div><div class='del'>-    }</div><div class='del'>-    yyssp -= yym;</div><div class='del'>-    yystate = *yyssp;</div><div class='del'>-    yyvsp -= yym;</div><div class='del'>-    yym = yylhs[yyn];</div><div class='del'>-    if (yystate == 0 &amp;&amp; yym == 0)</div><div class='del'>-    {</div><div class='del'>-#if YYDEBUG</div><div class='del'>-        if (yydebug)</div><div class='del'>-            printf("%sdebug: after reduction, shifting from state 0 to\</div><div class='del'>- state %d\n", YYPREFIX, YYFINAL);</div><div class='del'>-#endif</div><div class='del'>-        yystate = YYFINAL;</div><div class='del'>-        *++yyssp = YYFINAL;</div><div class='del'>-        *++yyvsp = yyval;</div><div class='del'>-        if (yychar &lt; 0)</div><div class='del'>-        {</div><div class='del'>-            if ((yychar = yylex()) &lt; 0) yychar = 0;</div><div class='del'>-#if YYDEBUG</div><div class='del'>-            if (yydebug)</div><div class='del'>-            {</div><div class='del'>-                yys = 0;</div><div class='del'>-                if (yychar &lt;= YYMAXTOKEN) yys = yyname[yychar];</div><div class='del'>-                if (!yys) yys = "illegal-symbol";</div><div class='del'>-                printf("%sdebug: state %d, reading %d (%s)\n",</div><div class='del'>-                        YYPREFIX, YYFINAL, yychar, yys);</div><div class='del'>-            }</div><div class='del'>-#endif</div><div class='del'>-        }</div><div class='del'>-        if (yychar == 0) goto yyaccept;</div><div class='del'>-        goto yyloop;</div><div class='del'>-    }</div><div class='del'>-    if ((yyn = yygindex[yym]) &amp;&amp; (yyn += yystate) &gt;= 0 &amp;&amp;</div><div class='del'>-            yyn &lt;= YYTABLESIZE &amp;&amp; yycheck[yyn] == yystate)</div><div class='del'>-        yystate = yytable[yyn];</div><div class='del'>-    else</div><div class='del'>-        yystate = yydgoto[yym];</div><div class='del'>-#if YYDEBUG</div><div class='del'>-    if (yydebug)</div><div class='del'>-        printf("%sdebug: after reduction, shifting from state %d \</div><div class='del'>-to state %d\n", YYPREFIX, *yyssp, yystate);</div><div class='del'>-#endif</div><div class='del'>-    if (yyssp &gt;= yyss + yystacksize - 1)</div><div class='del'>-    {</div><div class='del'>-        goto yyoverflow;</div><div class='del'>-    }</div><div class='del'>-    *++yyssp = yystate;</div><div class='del'>-    *++yyvsp = yyval;</div><div class='del'>-    goto yyloop;</div><div class='del'>-yyoverflow:</div><div class='del'>-    yyerror("yacc stack overflow");</div><div class='del'>-yyabort:</div><div class='del'>-    return (1);</div><div class='del'>-yyaccept:</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/pcmcia_/yacc_config.h b/mdk-stage1/pcmcia_/yacc_config.h<br/>deleted file mode 100644<br/>index b4902c8e6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/pcmcia_/yacc_config.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/pcmcia_/yacc_config.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,37 +0,0 @@</div><div class='del'>-#define DEVICE 257</div><div class='del'>-#define CARD 258</div><div class='del'>-#define ANONYMOUS 259</div><div class='del'>-#define TUPLE 260</div><div class='del'>-#define MANFID 261</div><div class='del'>-#define VERSION 262</div><div class='del'>-#define FUNCTION 263</div><div class='del'>-#define PCI 264</div><div class='del'>-#define BIND 265</div><div class='del'>-#define CIS 266</div><div class='del'>-#define TO 267</div><div class='del'>-#define NEEDS_MTD 268</div><div class='del'>-#define MODULE 269</div><div class='del'>-#define OPTS 270</div><div class='del'>-#define CLASS 271</div><div class='del'>-#define REGION 272</div><div class='del'>-#define JEDEC 273</div><div class='del'>-#define DTYPE 274</div><div class='del'>-#define DEFAULT 275</div><div class='del'>-#define MTD 276</div><div class='del'>-#define INCLUDE 277</div><div class='del'>-#define EXCLUDE 278</div><div class='del'>-#define RESERVE 279</div><div class='del'>-#define IRQ_NO 280</div><div class='del'>-#define PORT 281</div><div class='del'>-#define MEMORY 282</div><div class='del'>-#define STRING 283</div><div class='del'>-#define NUMBER 284</div><div class='del'>-typedef union {</div><div class='del'>-    char *str;</div><div class='del'>-    u_long num;</div><div class='del'>-    struct device_info_t *device;</div><div class='del'>-    struct card_info_t *card;</div><div class='del'>-    struct mtd_ident_t *mtd;</div><div class='del'>-    struct adjust_list_t *adjust;</div><div class='del'>-} YYSTYPE;</div><div class='del'>-extern YYSTYPE yylval;</div><div class='head'>diff --git a/mdk-stage1/ppp/.cvsignore b/mdk-stage1/ppp/.cvsignore<br/>deleted file mode 100644<br/>index c258b925d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-pppd-bin</div><div class='head'>diff --git a/mdk-stage1/ppp/Changes-2.3 b/mdk-stage1/ppp/Changes-2.3<br/>deleted file mode 100644<br/>index f5c954b4b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/Changes-2.3?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/Changes-2.3</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,441 +0,0 @@</div><div class='del'>-What was new in ppp-2.3.11.</div><div class='del'>-***************************</div><div class='del'>-</div><div class='del'>-* Support for Solaris 8 has been added, including support for</div><div class='del'>-  replumbing and IPV6.</div><div class='del'>-</div><div class='del'>-* The Solaris `snoop' utility should now work on ppp interfaces.</div><div class='del'>-</div><div class='del'>-* New hooks have been added - pap_logout_hook, ip_up_hook, and</div><div class='del'>-  ip_down_hook.</div><div class='del'>-</div><div class='del'>-* A new `passprompt' plugin is included, thanks to Alan Curry, which</div><div class='del'>-  makes it possible for pppd to call an external program to get the</div><div class='del'>-  PAP password to send to the peer.</div><div class='del'>-</div><div class='del'>-* The error messages for the situation where authentication is</div><div class='del'>-  required because the system has a default route have been improved.</div><div class='del'>-</div><div class='del'>-* There is a new connect_delay option which specifies how long pppd</div><div class='del'>-  should pause after the connect script finishes.  Previously this</div><div class='del'>-  delay was fixed at 1 second.  (This delay terminates as soon as pppd</div><div class='del'>-  sees a valid PPP frame from the peer.)</div><div class='del'>-</div><div class='del'>-* The `hide-password' option is now the default, and there is a new</div><div class='del'>-  `show-password' option to enable the printing of password strings in</div><div class='del'>-  the debug output.</div><div class='del'>-</div><div class='del'>-* A fairly complete list of the names of PPP protocols has been added</div><div class='del'>-  so that when pppd rejects a frame because its protocol is not</div><div class='del'>-  supported, it can print the name of the unsupported protocol.</div><div class='del'>-</div><div class='del'>-* Synchronous serial lines are supported under Linux 2.3.x.</div><div class='del'>-</div><div class='del'>-* The bug where pppd would not recognize a modem hangup under Linux</div><div class='del'>-  2.3.x kernels has been fixed.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.10.</div><div class='del'>-***************************</div><div class='del'>-</div><div class='del'>-* Pppd now supports `plugins', which are pieces of code (packaged as</div><div class='del'>-  shared libraries) which can be loaded into pppd at runtime and which</div><div class='del'>-  can affect its behaviour.  The intention is that plugins provide a</div><div class='del'>-  way for people to customize the behaviour of pppd for their own</div><div class='del'>-  needs without needing to change the base pppd source.  I have added</div><div class='del'>-  some hooks into pppd (places where pppd will call a function</div><div class='del'>-  pointer, if non-zero, to replace some of pppd's code) and I will be</div><div class='del'>-  receptive to suggestions about places to add more hooks.  Plugins</div><div class='del'>-  are supported under Linux and Solaris at present.</div><div class='del'>-</div><div class='del'>-* We have a new maintainer for the Solaris port, Adi Masputra of Sun</div><div class='del'>-  Microsystems, and he has updated the Solaris port so that it should</div><div class='del'>-  work on 64-bit machines under Solaris 7 and later.</div><div class='del'>-</div><div class='del'>-* Pppd now has an `allow-ip' option, which takes an argument which is</div><div class='del'>-  an IP address (or subnet) which peers are permitted to use without</div><div class='del'>-  authenticating themselves.  The argument takes the same form as each</div><div class='del'>-  element of the allowed IP address list in the secrets files.  The</div><div class='del'>-  allow-ip option is privileged and may be specified multiple times.</div><div class='del'>-  Using the allow-ip option should be cleaner than putting a line like</div><div class='del'>-  `"" * "" address' in /etc/ppp/pap-secrets.</div><div class='del'>-</div><div class='del'>-* Chat can now substitute environment variables into the script.  This</div><div class='del'>-  is enabled by the -E flag.  (Thanks to Andreas Arens for the patch.)</div><div class='del'>-</div><div class='del'>-* If the PAP username and password from the peer contains unprintable</div><div class='del'>-  characters, they will be translated to a printable form before</div><div class='del'>-  looking in the pap-secrets file.  Characters &gt;= 0x80 are translated</div><div class='del'>-  to a M- form, and characters from 0 to 0x1f (and 0x7f as well) are</div><div class='del'>-  translated to a ^X form.  If this change causes you grief, let me</div><div class='del'>-  know what would be a better translation.  It appears that some peers</div><div class='del'>-  send nulls or other control characters in their usernames and</div><div class='del'>-  passwords.</div><div class='del'>-</div><div class='del'>-* Pppd has new `ktune' and `noktune' options, which enable/disable</div><div class='del'>-  it to change kernel settings as appropriate.  This is only</div><div class='del'>-  implemented under Linux, and requires the /proc filesystem to be</div><div class='del'>-  mounted.  Under Linux, with the ktune option, pppd will enable IP</div><div class='del'>-  forwarding in the kernel if the proxyarp option is used, and will</div><div class='del'>-  enable the dynamic IP address kernel option in demand mode if the</div><div class='del'>-  local IP address changes.</div><div class='del'>-</div><div class='del'>-* Pppd no longer requires a remote address to be specified for demand</div><div class='del'>-  dialling.  If none is specified, it will use a default value of</div><div class='del'>-  10.112.112.112+unit_number.  (It will not propose this default to</div><div class='del'>-  the peer.)</div><div class='del'>-</div><div class='del'>-* The default holdoff is now 0 if no connect script is given.</div><div class='del'>-</div><div class='del'>-* The IPV6 code from Tommi Komulainen, which I unfortunately only</div><div class='del'>-  partially merged in to ppp-2.3.9, has been fixed and updated.</div><div class='del'>-</div><div class='del'>-* The linux compilation glitches should be fixed now.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.9.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Support for the new generic PPP layer under development for the</div><div class='del'>-  Linux kernel.</div><div class='del'>-</div><div class='del'>-* You can now place extra options to apply to specific users at the</div><div class='del'>-  end of the line with their password in the pap-secrets or</div><div class='del'>-  chap-secrets file, separated from the IP address(es) with a "--"</div><div class='del'>-  separator.  These options are parsed after the peer is authenticated</div><div class='del'>-  but before network protocol (IPCP, IPXCP) or CCP negotiation</div><div class='del'>-  commences.</div><div class='del'>-</div><div class='del'>-* Pppd will apply the holdoff period if the link was terminated by the</div><div class='del'>-  peer.  It doesn't apply it if the link was terminated because the</div><div class='del'>-  local pppd thought it was idle.</div><div class='del'>-</div><div class='del'>-* Synchronous support for Solaris has been added, thanks to John</div><div class='del'>-  Morrison, and for FreeBSD, thanks to Paul Fulghum.</div><div class='del'>-</div><div class='del'>-* IPV6 support has been merged in, from Tommi Komulainen.  At the</div><div class='del'>-  moment it only supports Linux and it is not tested by me.</div><div class='del'>-</div><div class='del'>-* The `nodefaultip' option can be used in demand mode to say that pppd</div><div class='del'>-  should not suggest its local IP address to the peer.</div><div class='del'>-</div><div class='del'>-* The `init' option has been added; this causes pppd to run a script</div><div class='del'>-  to initialize the serial device (e.g. by sending an init string to</div><div class='del'>-  the modem).  Unlike the connect option, this can be used in a</div><div class='del'>-  dial-in situation.  (Thanks to Tobias Ringstrom.)</div><div class='del'>-</div><div class='del'>-* There is a new `logfile' option to send log messages to a file as</div><div class='del'>-  well as syslog.</div><div class='del'>-</div><div class='del'>-* There is a new, privileged `linkname' option which sets a logical</div><div class='del'>-  name for the link.  Pppd will create a /var/run/ppp-&lt;linkname&gt;.pid</div><div class='del'>-  file containing its process ID.</div><div class='del'>-</div><div class='del'>-* There is a new `maxfail' option which specifies how many consecutive</div><div class='del'>-  failed connection attempts are permitted before pppd will exit.  The</div><div class='del'>-  default value is 10, and 0 means infinity. :-)</div><div class='del'>-</div><div class='del'>-* Sundry bugs fixed.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.8.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* The exit status of pppd will now indicate whether the link was</div><div class='del'>-  successfully established, or if not, what error was encountered.</div><div class='del'>-</div><div class='del'>-* Pppd has two new options: fdlog &lt;n&gt; will send log messages to file</div><div class='del'>-  descriptor &lt;n&gt; instead of standard output, and nofdlog will stop log</div><div class='del'>-  messages from being sent to any file descriptor (they will still be</div><div class='del'>-  sent to syslog).  Pppd now will not send log messages to a file</div><div class='del'>-  descriptor if the serial port is open on that file descriptor.</div><div class='del'>-</div><div class='del'>-* Pppd sets an environment variable called PPPLOGNAME for scripts that</div><div class='del'>-  it runs, indicating the login name of the user who invoked pppd.</div><div class='del'>-</div><div class='del'>-* Pppd sets environment variables CONNECT_TIME, BYTES_SENT and</div><div class='del'>-  BYTES_RCVD for the ip-down and auth-down scripts indicating the</div><div class='del'>-  statistics for the connection just terminated.  (CONNECT_TIME is in</div><div class='del'>-  seconds.)</div><div class='del'>-</div><div class='del'>-* If the user has the serial device open on standard input and</div><div class='del'>-  specifies a symbolic link to the serial device on the command line,</div><div class='del'>-  pppd will detect this and behave correctly (i.e. not detach from its</div><div class='del'>-  controlling terminal).  Furthermore, if the serial port is open for</div><div class='del'>-  reading and writing on standard input, pppd will assume that it is</div><div class='del'>-  locked by its invoker and not lock it itself.</div><div class='del'>-</div><div class='del'>-* Chat now has a feature where if a string to be sent begins with an</div><div class='del'>-  at sign (@), the rest of the string is taken as the name of a file</div><div class='del'>-  (regular file or named pipe), and the actual string to send is taken</div><div class='del'>-  from that file.</div><div class='del'>-</div><div class='del'>-* Support for FreeBSD-2.2.8 and 3.0 has been added, thanks to Paul</div><div class='del'>-  Fulghum.</div><div class='del'>-</div><div class='del'>-* The Tru64 (aka Digital Unix aka OSF/1) port has been updated.</div><div class='del'>-</div><div class='del'>-* The system panics on Solaris SMP systems related to PPP connections</div><div class='del'>-  being established and terminated should no longer occur.</div><div class='del'>-</div><div class='del'>-* Fixed quite a few bugs.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.7.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Pppd can now automatically allocate itself a pseudo-tty to use as</div><div class='del'>-  the serial device.  This has made three new options possible:</div><div class='del'>-</div><div class='del'>-  - `pty script' will run `script' with its standard input and output</div><div class='del'>-    connected to the master side of the pty.  For example:</div><div class='del'>-	pppd pty 'ssh -t server.my.net pppd'</div><div class='del'>-    is a basic command for setting up a PPP link (tunnel) over ssh.</div><div class='del'>-    (In practice you may need to specify other options such as IP</div><div class='del'>-    addresses, etc.)</div><div class='del'>-</div><div class='del'>-  - `notty' tells pppd to communicate over its standard input and</div><div class='del'>-    output, which do not have to be a terminal device.</div><div class='del'>-</div><div class='del'>-  - `record filename' tells pppd to record all of the characters sent</div><div class='del'>-    and received over the serial device to a file called `filename'.</div><div class='del'>-    The data is recorded in a tagged format with timestamps, which can</div><div class='del'>-    be printed in a readable form with the pppdump program, which is</div><div class='del'>-    included in this distribution.</div><div class='del'>-</div><div class='del'>-* Pppd now logs the connect time and number of bytes sent and received</div><div class='del'>-  (at the level of the serial device) when the connection is</div><div class='del'>-  terminated.</div><div class='del'>-</div><div class='del'>-* If you use the updetach or nodetach option, pppd will print its</div><div class='del'>-  messages to standard output as well as logging them with syslog</div><div class='del'>-  (provided of course pppd isn't using its standard input or output as</div><div class='del'>-  its serial device).</div><div class='del'>-</div><div class='del'>-* There is a new `privgroup groupname' option (a privileged option).</div><div class='del'>-  If the user running pppd is in group `groupname', s/he can use</div><div class='del'>-  privileged options without restriction.</div><div class='del'>-</div><div class='del'>-* There is a new `receive-all' option, which causes pppd to accept all</div><div class='del'>-  control characters, even the ones that the peer should be escaping</div><div class='del'>-  (i.e. the receive asyncmap is 0).  This is useful with some buggy</div><div class='del'>-  peers.</div><div class='del'>-</div><div class='del'>-* The default asyncmap is now 0.</div><div class='del'>-</div><div class='del'>-* There is a new `sync' option, currently only implemented under</div><div class='del'>-  Linux, which allows pppd to run on synchronous HDLC devices.</div><div class='del'>-</div><div class='del'>-* If a value for the device name or for the connect, disconnect,</div><div class='del'>-  welcome or pty option is given in a privileged option file</div><div class='del'>-  (i.e. /etc/ppp/options or a file loaded with the `call' option), it</div><div class='del'>-  cannot be overridden by a non-privileged user.</div><div class='del'>-</div><div class='del'>-* Many bugs have been fixed, notably:</div><div class='del'>-  - signals are not blocked unnecessarily, as they were in 2.3.6.</div><div class='del'>-  - the usepeerdns option should work now.</div><div class='del'>-  - the SPEED environment variable for scripts is set correctly.</div><div class='del'>-  - the /etc/ppp/auth-down script is not run until auth-up completes.</div><div class='del'>-  - the device is opened as root if it is the device on standard</div><div class='del'>-    input.</div><div class='del'>-  - pppd doesn't die with the ioctl(PPPIOCSASYNCMAP) error under linux</div><div class='del'>-    if a hangup occurs at the wrong time.</div><div class='del'>-</div><div class='del'>-* Some error messages have been changed to be clearer (I hope :-)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.6.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Pppd now opens the tty device as the user (rather than as root) if</div><div class='del'>-  the device name was given by the user, i.e. on the command line or</div><div class='del'>-  in the ~/.ppprc file.  If the device name was given in</div><div class='del'>-  /etc/ppp/options or in a file loaded with the `call' option, the</div><div class='del'>-  device is opened as root.</div><div class='del'>-</div><div class='del'>-* The default behaviour of pppd is now to let a peer which has not</div><div class='del'>-  authenticated itself (e.g. your ISP) use any IP address to which the</div><div class='del'>-  system does not already have a route.  (This is currently only</div><div class='del'>-  supported under Linux, Solaris and Digital Unix; on the other</div><div class='del'>-  systems, the peer must now authenticate itself unless the noauth</div><div class='del'>-  option is used.)</div><div class='del'>-</div><div class='del'>-* Added new option `usepeerdns', thanks to Nick Walker</div><div class='del'>-  &lt;nickwalker@email.com&gt;.  If the peer supplies DNS addresses, these</div><div class='del'>-  will be written to /etc/ppp/resolv.conf.  The ip-up script can then</div><div class='del'>-  be used to add these addresses to /etc/resolv.conf if desired (see</div><div class='del'>-  the ip-up.local.add and ip-down.local.add files in the scripts</div><div class='del'>-  directory).</div><div class='del'>-</div><div class='del'>-* The Solaris ppp driver should now work correctly on SMP systems.</div><div class='del'>-</div><div class='del'>-* Minor corrections so that the code can compile under Solaris 7,</div><div class='del'>-  and under Linux with glibc-2.1.</div><div class='del'>-</div><div class='del'>-* The Linux kernel driver has been restructured for improved</div><div class='del'>-  performance.</div><div class='del'>-</div><div class='del'>-* Pppd now won't start the ip-down script until the ip-up script has</div><div class='del'>-  finished.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.5.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Minor corrections to the Digital UNIX and NetBSD ports.</div><div class='del'>-</div><div class='del'>-* A workaround to avoid tickling a bug in the `se' serial port driver</div><div class='del'>-on Sun PCI Ultra machines running Solaris.</div><div class='del'>-</div><div class='del'>-* Fixed a bug in the negotiation of the Microsoft WINS server address</div><div class='del'>-option.</div><div class='del'>-</div><div class='del'>-* Fixed a bug in the Linux port where it would fail for kernel</div><div class='del'>-versions above 2.1.99.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.4.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* The NeXT port has been updated, thanks to Steve Perkins.</div><div class='del'>-</div><div class='del'>-* ppp-2.3.4 compiles and works under Solaris 2.6, using either gcc or</div><div class='del'>-cc.</div><div class='del'>-</div><div class='del'>-* With the Solaris, SVR4 and SunOS ports, you can control the choice</div><div class='del'>-of C compiler, C compiler options, and installation directories by</div><div class='del'>-editing the svr4/Makedefs or sunos4/Makedefs file.</div><div class='del'>-</div><div class='del'>-* Until now, we have been using the number 24 to identify Deflate</div><div class='del'>-compression in the CCP negotiations, which was the number in the draft</div><div class='del'>-RFC describing Deflate.  The number actually assigned to Deflate is</div><div class='del'>-26.  The code has been changed to use 26, but to allow the use of 24</div><div class='del'>-for now for backwards compatibility.  (This can be disabled with the</div><div class='del'>-`nodeflatedraft' option to pppd.)</div><div class='del'>-</div><div class='del'>-* Fixed some bugs in the linux driver and deflate compressor which</div><div class='del'>-were causing compression problems, including corrupting long</div><div class='del'>-incompressible packets sometimes.</div><div class='del'>-</div><div class='del'>-* Fixes to the PAM and shadow password support in pppd, from Al</div><div class='del'>-Longyear and others.</div><div class='del'>-</div><div class='del'>-* Pppd now sets some environment variables for scripts it invokes</div><div class='del'>-(ip-up/down, auth-ip/down), giving information about the connection.</div><div class='del'>-The variables it sets are PEERNAME, IPLOCAL, IPREMOTE, UID, DEVICE,</div><div class='del'>-SPEED, and IFNAME.</div><div class='del'>-</div><div class='del'>-* Pppd now has an `updetach' option, which will cause it to detach</div><div class='del'>-from its controlling terminal once the link has come up (i.e. once it</div><div class='del'>-is available for IP traffic).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.3.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Fixed compilation problems under SunOS.</div><div class='del'>-</div><div class='del'>-* Fixed a bug introduced into chat in 2.3.2, and compilation problems</div><div class='del'>-introduced into the MS-CHAP implementation in 2.3.2.</div><div class='del'>-</div><div class='del'>-* The linux kernel driver has been updated for recent 2.1-series</div><div class='del'>-kernel changes, and it now will ask kerneld to load compression</div><div class='del'>-modules when required, if the kernel is configured to support kerneld.</div><div class='del'>-</div><div class='del'>-* Pppd should now compile correctly under linux on systems with glibc.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.2.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* In 2.3.1, I made a change which was intended to make pppd able to</div><div class='del'>-detect loss of CD during or immediately after the connection script</div><div class='del'>-runs.  Unfortunately, this had the side-effect that the connection</div><div class='del'>-script wouldn't work at all on some systems.  This change has been</div><div class='del'>-reversed.</div><div class='del'>-</div><div class='del'>-* Fix compilation problems in the Linux kernel driver.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.1.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Enhancements to chat, thanks to Francis Demierre.  Chat can now</div><div class='del'>-accept comments in the chat script file, and has new SAY, HANGUP,</div><div class='del'>-CLR_ABORT and CLR_REPORT keywords.</div><div class='del'>-</div><div class='del'>-* Fixed a bug which causes 2.3.0 to crash Solaris systems.</div><div class='del'>-</div><div class='del'>-* Bug-fixes and restructuring of the Linux kernel driver.</div><div class='del'>-</div><div class='del'>-* The holdoff behaviour of pppd has been changed slightly: now, if</div><div class='del'>-the link comes up for IP (or other network protocol) traffic, we</div><div class='del'>-consider that the link has been successfully established, and don't</div><div class='del'>-enforce the holdoff period after the link goes down.</div><div class='del'>-</div><div class='del'>-* Pppd should now correctly wait for CD (carrier detect) from the</div><div class='del'>-modem, even when the serial port initially had CLOCAL set, and it</div><div class='del'>-should also detect loss of CD during or immediately after the</div><div class='del'>-connection script runs.</div><div class='del'>-</div><div class='del'>-* Under linux, pppd will work with older 2.2.0* version kernel</div><div class='del'>-drivers, although demand-dialling is not supported with them.</div><div class='del'>-</div><div class='del'>-* Minor bugfixes for pppd.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.3.</div><div class='del'>-************************</div><div class='del'>-</div><div class='del'>-* Demand-dialling.  Pppd now has a mode where it will establish the</div><div class='del'>-network interface immediately when it starts, but not actually bring</div><div class='del'>-the link up until it sees some data to be sent.  Look for the demand</div><div class='del'>-option description in the pppd man page.  Demand-dialling is not</div><div class='del'>-supported under Ultrix or NeXTStep.</div><div class='del'>-</div><div class='del'>-* Idle timeout.  Pppd will optionally terminate the link if no data</div><div class='del'>-packets are sent or received within a certain time interval.</div><div class='del'>-</div><div class='del'>-* Pppd now runs the /etc/ppp/auth-up script, if it exists, when the</div><div class='del'>-peer successfully authenticates itself, and /etc/ppp/auth-down when</div><div class='del'>-the connection is subsequently terminated.  This can be useful for</div><div class='del'>-accounting purposes.</div><div class='del'>-</div><div class='del'>-* A new packet compression scheme, Deflate, has been implemented.</div><div class='del'>-This uses the same compression method as `gzip'.  This method is free</div><div class='del'>-of patent or copyright restrictions, and it achieves better</div><div class='del'>-compression than BSD-Compress.  It does consume more CPU cycles for</div><div class='del'>-compression than BSD-Compress, but this shouldn't be a problem for</div><div class='del'>-links running at 100kbit/s or less.</div><div class='del'>-</div><div class='del'>-* There is no code in this distribution which is covered by Brad</div><div class='del'>-Clements' restrictive copyright notice.  The STREAMS modules for SunOS</div><div class='del'>-and OSF/1 have been rewritten, based on the Solaris 2 modules, which</div><div class='del'>-were written from scratch without any Clements code.</div><div class='del'>-</div><div class='del'>-* Pppstats has been reworked to clean up the output format somewhat.</div><div class='del'>-It also has a new -d option which displays data rate in kbyte/s for</div><div class='del'>-those columns which would normally display bytes.</div><div class='del'>-</div><div class='del'>-* Pppd options beginning with - or + have been renamed, e.g. -ip</div><div class='del'>-became noip, +chap became require-chap, etc.  The old options are</div><div class='del'>-still accepted for compatibility but may be removed in future.</div><div class='del'>-</div><div class='del'>-* Pppd now has some options (such as the new `noauth' option) which</div><div class='del'>-can only be specified if it is being run by root, or in an</div><div class='del'>-"privileged" options file: /etc/ppp/options or an options file in the</div><div class='del'>-/etc/ppp/peers directory.  There is a new "call" option to read</div><div class='del'>-options from a file in /etc/ppp/peers, making it possible for non-root</div><div class='del'>-users to make unauthenticated connections, but only to certain trusted</div><div class='del'>-peers.  My intention is to make the `auth' option the default in a</div><div class='del'>-future release.</div><div class='del'>-</div><div class='del'>-* Several minor new features have been added to pppd, including the</div><div class='del'>-maxconnect and welcome options.  Pppd will now terminate the</div><div class='del'>-connection when there are no network control protocols running.  The</div><div class='del'>-allowed IP address(es) field in the secrets files can now specify</div><div class='del'>-subnets (with a notation like 123.45.67.89/24) and addresses which are</div><div class='del'>-not acceptable (put a ! on the front).</div><div class='del'>-</div><div class='del'>-* Numerous bugs have been fixed (no doubt some have been introduced :-)</div><div class='del'>-Thanks to those who reported bugs in ppp-2.2.</div><div class='head'>diff --git a/mdk-stage1/ppp/FAQ b/mdk-stage1/ppp/FAQ<br/>deleted file mode 100644<br/>index 96bc5c708..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/FAQ?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/FAQ</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,634 +0,0 @@</div><div class='del'>-This is a list of Frequently Asked Questions about using ppp-2.x and</div><div class='del'>-their answers.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Can you give me an example of how I might set up my machine to dial</div><div class='del'>-out to an ISP?</div><div class='del'>-</div><div class='del'>-A: Here's an example for dialling out to an ISP via a modem on</div><div class='del'>-/dev/tty02.  The modem uses hardware (CTS/RTS) flow control, and the</div><div class='del'>-serial port is run at 38400 baud.  The ISP assigns our IP address.</div><div class='del'>-</div><div class='del'>-To configure pppd for this connection, create a file under</div><div class='del'>-/etc/ppp/peers called (say) my-isp containing the following:</div><div class='del'>-</div><div class='del'>-tty02 crtscts 38400</div><div class='del'>-connect 'chat -v -f /etc/ppp/chat/my-isp'</div><div class='del'>-defaultroute</div><div class='del'>-</div><div class='del'>-The ppp connection is then initiated using the following command:</div><div class='del'>-</div><div class='del'>-pppd call my-isp</div><div class='del'>-</div><div class='del'>-Of course, if the directory containing pppd is not in your path, you</div><div class='del'>-will need to give the full pathname for pppd, for example,</div><div class='del'>-/usr/sbin/pppd.</div><div class='del'>-</div><div class='del'>-When you run this, pppd will use the chat program to dial the ISP and</div><div class='del'>-invoke its ppp service.  Chat will read the file specified with -f,</div><div class='del'>-namely /etc/ppp/chat/my-isp, to find a list of strings to expect to</div><div class='del'>-receive, and strings to send.  This file would contain something like</div><div class='del'>-this:</div><div class='del'>-</div><div class='del'>-ABORT "NO CARRIER"</div><div class='del'>-ABORT "NO DIALTONE"</div><div class='del'>-ABORT "ERROR"</div><div class='del'>-ABORT "NO ANSWER"</div><div class='del'>-ABORT "BUSY"</div><div class='del'>-ABORT "Username/Password Incorrect"</div><div class='del'>-"" "at"</div><div class='del'>-OK "at&amp;d2&amp;c1"</div><div class='del'>-OK "atdt2479381"</div><div class='del'>-"name:" "^Uusername"</div><div class='del'>-"word:" "\qpassword"</div><div class='del'>-"annex" "\q^Uppp"</div><div class='del'>-"Switching to PPP-ppp-Switching to PPP"</div><div class='del'>-</div><div class='del'>-You will need to change the details here.  The first string on each</div><div class='del'>-line is a string to expect to receive; the second is the string to</div><div class='del'>-send.  You can add or delete lines according to the dialog required to</div><div class='del'>-access your ISP's system.  This example is for a modem with a standard</div><div class='del'>-AT command set, dialling out to an Annex terminal server.  The \q</div><div class='del'>-toggles "quiet" mode; when quiet mode is on, the strings to be sent</div><div class='del'>-are replaced by ?????? in the log.  You may need to go through the</div><div class='del'>-dialog manually using kermit or tip first to determine what should go</div><div class='del'>-in the script.</div><div class='del'>-</div><div class='del'>-To terminate the link, run the following script, called (say)</div><div class='del'>-kill-ppp:</div><div class='del'>-</div><div class='del'>-#!/bin/sh</div><div class='del'>-unit=ppp${1-0}</div><div class='del'>-piddir=/var/run</div><div class='del'>-if [ -f $piddir/$unit.pid ]; then</div><div class='del'>-  kill -1 `cat $piddir/$unit.pid`</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-On some systems (SunOS, Solaris, Ultrix), you will need to change</div><div class='del'>-/var/run to /etc/ppp.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Can you give me an example of how I could set up my office machine</div><div class='del'>-so I can dial in to it from home?</div><div class='del'>-</div><div class='del'>-A: Let's assume that the office machine is called "office" and is on a</div><div class='del'>-local ethernet subnet.  Call the home machine "home" and give it an IP</div><div class='del'>-address on the same subnet as "office".  We'll require both machines</div><div class='del'>-to authenticate themselves to each other.</div><div class='del'>-</div><div class='del'>-Set up the files on "office" as follows:</div><div class='del'>-</div><div class='del'>-/etc/ppp/options contains:</div><div class='del'>-</div><div class='del'>-auth		# require the peer to authenticate itself</div><div class='del'>-lock</div><div class='del'>-# other options can go here if desired</div><div class='del'>-</div><div class='del'>-/etc/ppp/chap-secrets contains:</div><div class='del'>-</div><div class='del'>-home	office	"beware the frub-jub"	home</div><div class='del'>-office	home	"bird, my son!%&amp;*"	-</div><div class='del'>-</div><div class='del'>-Set up a modem on a serial port so that users can dial in to the</div><div class='del'>-modem and get a login prompt.</div><div class='del'>-</div><div class='del'>-On "home", set up the files as follows:</div><div class='del'>-</div><div class='del'>-/etc/ppp/options contains the same as on "office".</div><div class='del'>-</div><div class='del'>-/etc/ppp/chap-secrets contains:</div><div class='del'>-</div><div class='del'>-home	office	"beware the frub-jub"	-</div><div class='del'>-office	home	"bird, my son!%&amp;*"	office</div><div class='del'>-</div><div class='del'>-Create a file called /etc/ppp/peers/office containing the following:</div><div class='del'>-</div><div class='del'>-tty02 crtscts 38400</div><div class='del'>-connect 'chat -v -f /etc/ppp/chat/office'</div><div class='del'>-defaultroute</div><div class='del'>-</div><div class='del'>-(You may need to change some of the details here.)</div><div class='del'>-</div><div class='del'>-Create the /etc/ppp/chat/office file containing the following:</div><div class='del'>-</div><div class='del'>-ABORT "NO CARRIER"</div><div class='del'>-ABORT "NO DIALTONE"</div><div class='del'>-ABORT "ERROR"</div><div class='del'>-ABORT "NO ANSWER"</div><div class='del'>-ABORT "BUSY"</div><div class='del'>-ABORT "ogin incorrect"</div><div class='del'>-"" "at"</div><div class='del'>-OK "at&amp;d2&amp;c1"</div><div class='del'>-OK "atdt2479381"</div><div class='del'>-"name:" "^Uusername"</div><div class='del'>-"word:" "\qpassword"</div><div class='del'>-"$" "\q^U/usr/sbin/pppd proxyarp"</div><div class='del'>-"~"</div><div class='del'>-</div><div class='del'>-You will need to change the details.  Note that the "$" in the</div><div class='del'>-second-last line is expecting the shell prompt after a successful</div><div class='del'>-login - you may need to change it to "%" or something else.</div><div class='del'>-</div><div class='del'>-You then initiate the connection (from home) with the command:</div><div class='del'>-</div><div class='del'>-pppd call office</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: When I try to establish a connection, the modem successfully dials</div><div class='del'>-the remote system, but then hangs up a few seconds later.  How do I</div><div class='del'>-find out what's going wrong?</div><div class='del'>-</div><div class='del'>-A: There are a number of possible problems here.  The first thing to</div><div class='del'>-do is to ensure that pppd's messages are visible.  Pppd uses the</div><div class='del'>-syslog facility to log messages which help to identify specific</div><div class='del'>-problems.  Messages from pppd have facility "daemon" and levels</div><div class='del'>-ranging from "debug" to "error".</div><div class='del'>-</div><div class='del'>-Usually it is useful to see messages of level "notice" or higher on</div><div class='del'>-the console.  To see these, find the line in /etc/syslog.conf which</div><div class='del'>-has /dev/console on the right-hand side, and add "daemon.notice" in</div><div class='del'>-the list on the left.  The line will end up looking something like</div><div class='del'>-this:</div><div class='del'>-</div><div class='del'>-*.err;kern.debug;auth.notice;mail.crit;daemon.notice	/dev/console</div><div class='del'>-</div><div class='del'>-Note that the whitespace is tabs, *not* spaces.</div><div class='del'>-</div><div class='del'>-If you are having problems, it may be useful to see messages of level</div><div class='del'>-"info" as well, in which case you would change "daemon.notice" to</div><div class='del'>-"daemon.info".</div><div class='del'>-</div><div class='del'>-In addition, it is useful to collect pppd's debugging output in a</div><div class='del'>-file - the debug option to pppd causes it to log the contents of all</div><div class='del'>-control packets sent and received in human-readable form.  To do this,</div><div class='del'>-add a line like this to /etc/syslog.conf:</div><div class='del'>-</div><div class='del'>-daemon,local2.debug		/etc/ppp/log</div><div class='del'>-</div><div class='del'>-and create an empty /etc/ppp/log file.</div><div class='del'>-</div><div class='del'>-When you change syslog.conf, you will need to send a HUP signal to</div><div class='del'>-syslogd to causes it to re-read syslog.conf.  You can do this with a</div><div class='del'>-command like this (as root):</div><div class='del'>-</div><div class='del'>-	kill -HUP `cat /etc/syslogd.pid`</div><div class='del'>-</div><div class='del'>-(On some systems, you need to use /var/run/syslog.pid instead of</div><div class='del'>-/etc/syslogd.pid.)</div><div class='del'>-</div><div class='del'>-After setting up syslog like this, you can use the -v flag to chat and</div><div class='del'>-the `debug' option to pppd to get more information.  Try initiating</div><div class='del'>-the connection again; when it fails, inspect /etc/ppp/log to see what</div><div class='del'>-happened and where the connection failed.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: When I try to establish a connection, I get an error message saying</div><div class='del'>-"Serial link is not 8-bit clean".  Why?</div><div class='del'>-</div><div class='del'>-A: The most common cause is that your connection script hasn't</div><div class='del'>-successfully dialled out to the remote system and invoked ppp service</div><div class='del'>-there.  Instead, pppd is talking to something (a shell or login</div><div class='del'>-process on the remote machine, or maybe just the modem) which is only</div><div class='del'>-outputting 7-bit characters.</div><div class='del'>-</div><div class='del'>-This can also arise with a modem which uses an AT command set if the</div><div class='del'>-dial command is issued before pppd is invoked, rather than within a</div><div class='del'>-connect script started by pppd.  If the serial port is set to 7</div><div class='del'>-bits/character plus parity when the last AT command is issued, the</div><div class='del'>-modem serial port will be set to the same setting.</div><div class='del'>-</div><div class='del'>-Note that pppd *always* sets the local serial port to 8 bits per</div><div class='del'>-character, with no parity and 1 stop bit.  So you shouldn't need to</div><div class='del'>-issue an stty command before invoking pppd.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: When I try to establish a connection, I get an error message saying</div><div class='del'>-"Serial line is looped back".  Why?</div><div class='del'>-</div><div class='del'>-A: Probably your connection script hasn't successfully dialled out to</div><div class='del'>-the remote system and invoked ppp service there.  Instead, pppd is</div><div class='del'>-talking to something which is just echoing back the characters it</div><div class='del'>-receives.  The -v option to chat can help you find out what's going</div><div class='del'>-on.  It can be useful to include "~" as the last expect string to</div><div class='del'>-chat, so chat won't return until it's seen the start of the first PPP</div><div class='del'>-frame from the remote system.</div><div class='del'>-</div><div class='del'>-Another possibility is that your phone connection has dropped for some</div><div class='del'>-obscure reason and the modem is echoing the characters it receives</div><div class='del'>-from your system.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I installed pppd successfully, but when I try to run it, I get a</div><div class='del'>-message saying something like "peer authentication required but no</div><div class='del'>-authentication files accessible".</div><div class='del'>-</div><div class='del'>-A: When pppd is used on a machine which already has a connection to</div><div class='del'>-the Internet (or to be more precise, one which has a default route in</div><div class='del'>-its routing table), it will require all peers to authenticate</div><div class='del'>-themselves.  The reason for this is that if you don't require</div><div class='del'>-authentication, you have a security hole, because the peer can</div><div class='del'>-basically choose any IP address it wants, even the IP address of some</div><div class='del'>-trusted host (for example, a host mentioned in some .rhosts file).</div><div class='del'>-</div><div class='del'>-On machines which don't have a default route, pppd does not require</div><div class='del'>-the peer to authenticate itself.  The reason is that such machines</div><div class='del'>-would mostly be using pppd to dial out to an ISP which will refuse to</div><div class='del'>-authenticate itself.  In that case the peer can use any IP address as</div><div class='del'>-long as the system does not already have a route to that address.</div><div class='del'>-For example, if you have a local ethernet network, the peer can't use</div><div class='del'>-an address on that network.  (In fact it could if it authenticated</div><div class='del'>-itself and it was permitted to use that address by the pap-secrets or</div><div class='del'>-chap-secrets file.)</div><div class='del'>-</div><div class='del'>-There are 3 ways around the problem:</div><div class='del'>-</div><div class='del'>-1. If possible, arrange for the peer to authenticate itself, and</div><div class='del'>-create the necessary secrets files (/etc/ppp/pap-secrets and/or</div><div class='del'>-/etc/ppp/chap-secrets).</div><div class='del'>-</div><div class='del'>-2. If the peer refuses to authenticate itself, and will always be</div><div class='del'>-using the same IP address, or one of a small set of IP addresses, you</div><div class='del'>-can create an entry in the /etc/ppp/pap-secrets file like this:</div><div class='del'>-</div><div class='del'>-  ""	  *	  ""	  his-ip.his-domain his-other-ip.other-domain</div><div class='del'>-</div><div class='del'>-(that is, using the empty string for the client name and password</div><div class='del'>-fields).  Of couse, you replace the 4th and following fields in the</div><div class='del'>-example above with the IP address(es) that the peer may use.  You can</div><div class='del'>-use either hostnames or numeric IP addresses.</div><div class='del'>-</div><div class='del'>-3. You can add the `noauth' option to the /etc/ppp/options file.</div><div class='del'>-Pppd will then not ask the peer to authenticate itself.  If you do</div><div class='del'>-this, I *strongly* recommend that you remove the set-uid bit from the</div><div class='del'>-permissions on the pppd executable, with a command like this:</div><div class='del'>-</div><div class='del'>-	chmod u-s /usr/sbin/pppd</div><div class='del'>-</div><div class='del'>-Then, an intruder could only use pppd maliciously if they had already</div><div class='del'>-become root, in which case they couldn't do any more damage using pppd</div><div class='del'>-than they could anyway.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: What do I need to put in the secrets files?</div><div class='del'>-</div><div class='del'>-A: Three things:</div><div class='del'>-   - secrets (i.e. passwords) to use for authenticating this host to</div><div class='del'>-     other hosts (i.e., for proving our identity to others);</div><div class='del'>-   - secrets which other hosts can use for authenticating themselves</div><div class='del'>-     to us (i.e., so that they can prove their identity to us); and</div><div class='del'>-   - information about which IP addresses other hosts may use, once</div><div class='del'>-     they have authenticated themselves.</div><div class='del'>-</div><div class='del'>-There are two authentication files: /etc/ppp/pap-secrets, which</div><div class='del'>-contains secrets for use with PAP (the Password Authentication</div><div class='del'>-Protocol), and /etc/ppp/chap-secrets, which contains secrets for use</div><div class='del'>-with CHAP (the Challenge Handshake Authentication Protocol).  Both</div><div class='del'>-files have the same simple format, which is as follows:</div><div class='del'>-</div><div class='del'>-- The file contains a series of entries, each of which contains a</div><div class='del'>-secret for authenticating one machine to another.</div><div class='del'>-</div><div class='del'>-- Each entry is contained on a single logical line.  A logical line</div><div class='del'>-may be continued across several lines by placing a backslash (\) at</div><div class='del'>-the end of each line except the last.</div><div class='del'>-</div><div class='del'>-- Each entry has 3 or more fields, separated by whitespace (spaces</div><div class='del'>-and/or tabs).  These fields are, in order:</div><div class='del'>-	* The name of the machine that is authenticating itself</div><div class='del'>-	  (the "client").</div><div class='del'>-	* The name of the machine that is authenticating the client</div><div class='del'>-	  (the "server").</div><div class='del'>-	* The secret to be used for authenticating that client to that</div><div class='del'>-	  server.  If this field begins with the at-sign `@', the rest</div><div class='del'>-	  of the field is taken as the name of a file containing the</div><div class='del'>-	  actual secret.</div><div class='del'>-	* The 4th and any following fields list the IP address(es)</div><div class='del'>-	  that the client may use.</div><div class='del'>-</div><div class='del'>-- The file may contain comments, which begin with a `#' and continue</div><div class='del'>-to the end of the line.</div><div class='del'>-</div><div class='del'>-- Double quotes `"' should be used around a field if it contains</div><div class='del'>-characters with special significance, such as space, tab, `#', etc.</div><div class='del'>-</div><div class='del'>-- The backslash `\' may be used before characters with special</div><div class='del'>-significance (space, tab, `#', `\', etc.) to remove that significance.</div><div class='del'>-</div><div class='del'>-Some important points to note:</div><div class='del'>-</div><div class='del'>-* A machine can be *both* a "client" and a "server" for the purposes</div><div class='del'>-of authentication - this happens when both peers require the other to</div><div class='del'>-authenticate itself.  So A would authenticate itself to B, and B would</div><div class='del'>-also authenticate itself to A (possibly using a different</div><div class='del'>-authentication protocol).</div><div class='del'>-</div><div class='del'>-* If both the "client" and the "server" are running ppp-2.x, they need</div><div class='del'>-to have a similar entry in the appropriate secrets file; the first two</div><div class='del'>-fields are *not* swapped on the client, compared to the server.  So</div><div class='del'>-the client might have an entry like this:</div><div class='del'>-</div><div class='del'>-	ay	bee	"our little secret"	-</div><div class='del'>-</div><div class='del'>-and the corresponding entry on the server could look like this:</div><div class='del'>-</div><div class='del'>-	ay	bee	"our little secret"	123.45.67.89</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Explain about PAP and CHAP?</div><div class='del'>-</div><div class='del'>-PAP stands for the Password Authentication Protocol.  With this</div><div class='del'>-protocol, the "client" (the machine that needs to authenticate itself)</div><div class='del'>-sends its name and a password, in clear text, to the "server".  The</div><div class='del'>-server returns a message indicating whether the name and password are</div><div class='del'>-valid.</div><div class='del'>-</div><div class='del'>-CHAP stands for the Challenge Handshake Authentication Protocol.  It</div><div class='del'>-is designed to address some of the deficiencies and vulnerabilities of</div><div class='del'>-PAP.  Like PAP, it is based on the client and server having a shared</div><div class='del'>-secret, but the secret is never passed in clear text over the link.</div><div class='del'>-Instead, the server sends a "challenge" - an arbitrary string of</div><div class='del'>-bytes, and the client must prove it knows the shared secret by</div><div class='del'>-generating a hash value from the challenge combined with the shared</div><div class='del'>-secret, and sending the hash value back to the server.  The server</div><div class='del'>-also generates the hash value and compares it with the value received</div><div class='del'>-from the client.</div><div class='del'>-</div><div class='del'>-At a practical level, CHAP can be slightly easier to configure than</div><div class='del'>-PAP because the server sends its name with the challenge.  Thus, when</div><div class='del'>-finding the appropriate secret in the secrets file, the client knows</div><div class='del'>-the server's name.  In contrast, with PAP, the client has to find its</div><div class='del'>-password (i.e. the shared secret) before it has received anything from</div><div class='del'>-the server.  Thus, it may be necessary to use the `remotename' option</div><div class='del'>-to pppd when using PAP authentication so that it can select the</div><div class='del'>-appropriate secret from /etc/ppp/pap-secrets.</div><div class='del'>-</div><div class='del'>-Microsoft also has a variant of CHAP which uses a different hashing</div><div class='del'>-arrangement from normal CHAP.  There is a client-side implementation</div><div class='del'>-of Microsoft's CHAP in ppp-2.3; see README.MSCHAP80.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: When the modem hangs up, without the remote system having</div><div class='del'>-terminated the connection properly, pppd does not notice the hangup,</div><div class='del'>-but just keeps running.  How do I get pppd to notice the hangup and</div><div class='del'>-exit?</div><div class='del'>-</div><div class='del'>-A: Pppd detects modem hangup by looking for an end-of-file indication</div><div class='del'>-from the serial driver, which should be generated when the CD (carrier</div><div class='del'>-detect) signal on the serial port is deasserted.  For this to work:</div><div class='del'>-</div><div class='del'>-- The modem has to be set to assert CD when the connection is made and</div><div class='del'>-deassert it when the phone line hangs up.  Usually the AT&amp;C1 modem</div><div class='del'>-command sets this mode.</div><div class='del'>-</div><div class='del'>-- The cable from the modem to the serial port must connect the CD</div><div class='del'>-signal (on pin 8).</div><div class='del'>-</div><div class='del'>-- Some serial drivers have a "software carrier detect" mode, which</div><div class='del'>-must be *disabled*.  The method of doing this varies between systems.</div><div class='del'>-Under SunOS, use the ttysoftcar command.  Under NetBSD, edit /etc/ttys</div><div class='del'>-to remove the "softcar" flag from the line for the serial port, and</div><div class='del'>-run ttyflags.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Why should I use PPP compression (BSD-Compress or Deflate) when my</div><div class='del'>-modem already does V.42 compression?  Won't it slow the CPU down a</div><div class='del'>-lot?</div><div class='del'>-</div><div class='del'>-A: Using PPP compression is preferable, especially when using modems</div><div class='del'>-over phone lines, for the following reasons:</div><div class='del'>-</div><div class='del'>-- The V.42 compression in the modem isn't very strong - it's an LZW</div><div class='del'>-technique (same as BSD-Compress) with a 10, 11 or 12 bit code size.</div><div class='del'>-With BSD-Compress you can use a code size of up to 15 bits and get</div><div class='del'>-much better compression, or you can use Deflate and get even better</div><div class='del'>-compression ratios.</div><div class='del'>-</div><div class='del'>-- I have found that enabling V.42 compression in my 14.4k modem</div><div class='del'>-increases the round-trip time for a character to be sent, echoed and</div><div class='del'>-returned by around 40ms, from 160ms to 200ms (with error correction</div><div class='del'>-enabled).  This is enough to make it feel less responsive on rlogin or</div><div class='del'>-telnet sessions.  Using PPP compression adds less than 5ms (small</div><div class='del'>-enough that I couldn't measure it reliably).  I admit my modem is a</div><div class='del'>-cheapie and other modems may well perform better.</div><div class='del'>-</div><div class='del'>-- While compression and decompression do require some CPU time, they</div><div class='del'>-reduce the amount of time spent in the serial driver to transmit a</div><div class='del'>-given amount of data.  Many machines require an interrupt for each</div><div class='del'>-character sent or received, and the interrupt handler can take a</div><div class='del'>-significant amount of CPU time.  So the increase in CPU load isn't as</div><div class='del'>-great as you might think.  My measurements indicate that a system with</div><div class='del'>-a 33MHz 486 CPU should be able to do Deflate compression for serial</div><div class='del'>-link speeds of up to 100kb/s or more.  It depends somewhat on the type</div><div class='del'>-of data, of course; for example, when compressing a string of nulls</div><div class='del'>-with Deflate, it's hard to get a high output data rate from the</div><div class='del'>-compressor, simply because it compresses strings of nulls so well that</div><div class='del'>-it has to eat a very large amount of input data to get each byte of</div><div class='del'>-output.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I get messages saying "Unsupported protocol (...) received".  What do</div><div class='del'>-these mean?</div><div class='del'>-</div><div class='del'>-A: If you only get one or two when pppd starts negotiating with the</div><div class='del'>-peer, they mean that the peer wanted to negotiate some PPP protocol</div><div class='del'>-that pppd doesn't understand.  This doesn't represent a problem, it</div><div class='del'>-simply means that there is some functionality that the peer supports</div><div class='del'>-that pppd doesn't, so that functionality can't be used.</div><div class='del'>-</div><div class='del'>-If you get them sporadically while the link is operating, or if the</div><div class='del'>-protocol numbers (in parentheses) don't correspond to any valid PPP</div><div class='del'>-protocol that the peer might be using, then the problem is probably</div><div class='del'>-that characters are getting corrupted on the receive side, or that</div><div class='del'>-extra characters are being inserted into the receive stream somehow.</div><div class='del'>-If this is happening, most packets that get corrupted should get</div><div class='del'>-discarded by the FCS (Frame Check Sequence, a 16-bit CRC) check, but a</div><div class='del'>-small number may get through.</div><div class='del'>-</div><div class='del'>-One possibility may be that you are receiving broadcast messages on</div><div class='del'>-the remote system which are being sent over your serial link.  Another</div><div class='del'>-possibility is that your modem is set for XON/XOFF (software) flow</div><div class='del'>-control and is inserting ^Q and ^S characters into the receive data</div><div class='del'>-stream.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I get messages saying "Protocol-Reject for unsupported protocol ...".</div><div class='del'>-What do these mean?</div><div class='del'>-</div><div class='del'>-A: This is the other side of the previous question.  If characters are</div><div class='del'>-getting corrupted on the way to the peer, or if your system is</div><div class='del'>-inserting extra bogus characters into the transmit data stream, the</div><div class='del'>-peer may send protocol-reject messages to you, resulting in the above</div><div class='del'>-message (since your pppd doesn't recognize the protocol number</div><div class='del'>-either.)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I get a message saying something like "ioctl(TIOCSETD): Operation</div><div class='del'>-not permitted".  How do I fix this?</div><div class='del'>-</div><div class='del'>-A: This is because pppd is not running as root.  If you have not</div><div class='del'>-installed pppd setuid-root, you will have to be root to run it.  If</div><div class='del'>-you have installed pppd setuid-root and you still get this message, it</div><div class='del'>-is probably because your shell is using some other copy of pppd than</div><div class='del'>-the installed one - for example, if you are in the pppd directory</div><div class='del'>-where you've just built pppd and your $PATH has . before /usr/sbin (or</div><div class='del'>-wherever pppd gets installed).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Has your package been ported to HP/UX or IRIX or AIX?</div><div class='del'>-</div><div class='del'>-A: No.  I don't have access to systems running HP/UX or AIX.  No-one</div><div class='del'>-has volunteered to port it to HP/UX.  I had someone who did a port for</div><div class='del'>-AIX 4.x, but who is no longer able to maintain it.  And apparently AIX</div><div class='del'>-3.x is quite different, so it would need a separate port.</div><div class='del'>-</div><div class='del'>-IRIX includes a good PPP implementation in the standard distribution,</div><div class='del'>-as far as I know.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Under SunOS 4, when I try to modload the ppp modules, I get the</div><div class='del'>-message "can't open /dev/vd: No such device".</div><div class='del'>-</div><div class='del'>-A: First check in /dev that there is an entry like this:</div><div class='del'>-</div><div class='del'>-crw-r--r--  1  root         57,   0 Oct 2  1991 vd</div><div class='del'>-</div><div class='del'>-If not, make one (mknod /dev/vd c 57 0).  If the problem still exists,</div><div class='del'>-probably your kernel has been configured without the vd driver</div><div class='del'>-included.  The vd driver is needed for loadable module support.</div><div class='del'>-</div><div class='del'>-First, identify the config file that was used.  When you boot your</div><div class='del'>-machine, or if you run /etc/dmesg, you'll see a line that looks</div><div class='del'>-something like this:</div><div class='del'>-</div><div class='del'>-SunOS Release 4.1.3_U1 (CAP_XBOX) #7: Thu Mar 21 15:31:56 EST 1996</div><div class='del'>-			^^^^^^^^</div><div class='del'>-			this is the config file name</div><div class='del'>-</div><div class='del'>-The config file will be in the /sys/`arch -k`/conf directory (arch -k</div><div class='del'>-should return sun4m for a SparcStation 10, sun3x for a Sun 3/80,</div><div class='del'>-etc.).  Look in there for a line saying "options VDDRV".  If that line</div><div class='del'>-isn't present (or is commented out), add it (or uncomment it).</div><div class='del'>-</div><div class='del'>-You then need to rebuild the kernel as described in the SunOS</div><div class='del'>-manuals.  Basically you need to run config and make like this:</div><div class='del'>-</div><div class='del'>-	/usr/etc/config CAP_XBOX</div><div class='del'>-	cd ../CAP_XBOX</div><div class='del'>-	make</div><div class='del'>-</div><div class='del'>-(replacing the string CAP_XBOX by the name of the config file for your</div><div class='del'>-kernel, of course).</div><div class='del'>-</div><div class='del'>-Then copy the new kernel to /:</div><div class='del'>-</div><div class='del'>-	mv /vmunix /vmunix.working</div><div class='del'>-	cp vmunix /</div><div class='del'>-</div><div class='del'>-and reboot.  Modload should then work.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I'm running Linux (or NetBSD or FreeBSD), and my system comes with</div><div class='del'>-PPP already.  Should I consider installing this package?  Why?</div><div class='del'>-</div><div class='del'>-A: The PPP that is already installed in your system is (or is derived</div><div class='del'>-from) some version of this PPP package.  You can find out what version</div><div class='del'>-of this package is already installed with the command "pppd --help".</div><div class='del'>-If this is older than the latest version, you may wish to install the</div><div class='del'>-latest version so that you can take advantage of the new features or</div><div class='del'>-bug fixes.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: I'm running pppd in demand mode, and I find that pppd often dials</div><div class='del'>-out unnecessarily when I try to make a connection within my local</div><div class='del'>-machine or with a machine on my local LAN.  What can I do about this?</div><div class='del'>-</div><div class='del'>-A: Very often the cause of this is that a program is trying to contact</div><div class='del'>-a nameserver to resolve a hostname, and the nameserver (specified in</div><div class='del'>-/etc/resolv.conf, usually) is on the far side of the ppp link.  You</div><div class='del'>-can try executing a command such as `ping myhost' (where myhost is the</div><div class='del'>-name of the local machine, or some other machine on a local LAN), to</div><div class='del'>-see whether that starts the ppp link.  If it does, check the setup of</div><div class='del'>-your /etc/hosts file to make sure you have the local machine and any</div><div class='del'>-hosts on your local LAN listed, and /etc/resolv.conf and/or</div><div class='del'>-/etc/nsswitch.conf files to make sure you resolve hostnames from</div><div class='del'>-/etc/hosts if possible before trying to contact a nameserver.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: Since I installed ppp-2.3.6, dialin users to my server have been</div><div class='del'>-getting this message when they run pppd:</div><div class='del'>-</div><div class='del'>-peer authentication required but no suitable secret(s) found for </div><div class='del'>-authenticating any peer to us (ispserver)</div><div class='del'>-</div><div class='del'>-A: In 2.3.6, the default is to let an unauthenticated peer only use IP</div><div class='del'>-addresses to which the machine doesn't already have a route.  So on a</div><div class='del'>-machine with a default route, everyone has to authenticate.  If you</div><div class='del'>-really don't want that, you can put `noauth' in the /etc/ppp/options</div><div class='del'>-file.  Note that there is then no check on who is using which IP</div><div class='del'>-address.  IMHO, this is undesirably insecure, but I guess it may be</div><div class='del'>-tolerable as long as you don't use any .rhosts files or anything like</div><div class='del'>-that.  I recommend that you require dialin users to authenticate, even</div><div class='del'>-if just with PAP using their login password (using the `login' option</div><div class='del'>-to pppd).  If you do use `noauth', you should at least have a pppusers</div><div class='del'>-group and set the permissions on pppd to allow only user and group to</div><div class='del'>-execute it.</div><div class='del'>-</div><div class='del'>-------------------------------------------------------------------------</div><div class='del'>-</div><div class='del'>-Q: When running pppd as a dial-in server, I often get the message</div><div class='del'>-"LCP: timeout sending Config-Requests" from pppd.  It seems to be</div><div class='del'>-random, but dial-out always works fine.  What is wrong?</div><div class='del'>-</div><div class='del'>-A: Most modern modems auto-detects the speed of the serial line</div><div class='del'>-between the modem and the computer.  This auto-detection occurs when</div><div class='del'>-the computer sends characters to the modem, when the modem is in</div><div class='del'>-command mode.  It does not occur when the modem is in data mode.</div><div class='del'>-Thus, if you send commands to the modem at 2400 bps, and then change</div><div class='del'>-the serial port speed to 115200 bps, the modem will not detect this</div><div class='del'>-change until something is transmitted from the computer to the modem.</div><div class='del'>-When running pppd in dial-in mode (i.e. without a connect script),</div><div class='del'>-pppd sets the speed of the serial port, but does not transmit</div><div class='del'>-anything.  If the modem was already running at the specified speed,</div><div class='del'>-everything is fine, but if not, you will just receive garbage from the</div><div class='del'>-modem.  To cure this, use an init script such as the following:</div><div class='del'>-</div><div class='del'>-	pppd ttyS0 115200 modem crtscts init "chat '' AT OK"</div><div class='del'>-</div><div class='del'>-To reset the modem and enable auto-answer, use:</div><div class='del'>-</div><div class='del'>-	pppd ttyS0 115200 modem crtscts init "chat '' ATZ OK ATS0=1 OK"</div><div class='head'>diff --git a/mdk-stage1/ppp/PLUGINS b/mdk-stage1/ppp/PLUGINS<br/>deleted file mode 100644<br/>index 0eeabe249..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/PLUGINS?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/PLUGINS</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,131 +0,0 @@</div><div class='del'>-Starting with version 2.3.10, pppd includes support for `plugins' -</div><div class='del'>-pieces of code which can be loaded into pppd at runtime and which can</div><div class='del'>-affect its behaviour in various ways.  The idea of plugins is to</div><div class='del'>-provide a way for people to customize the behaviour of pppd without</div><div class='del'>-having to either apply local patches to each version or get their</div><div class='del'>-patches accepted into the standard distribution.  My aim is that</div><div class='del'>-plugins will be able to be used with successive versions of pppd</div><div class='del'>-without needing to recompile the plugins.</div><div class='del'>-</div><div class='del'>-A plugin is a standard shared library object, typically with a name</div><div class='del'>-ending in .so.  They are loaded using the standard dlopen() library</div><div class='del'>-call, so plugins are only supported on systems which support shared</div><div class='del'>-libraries and the dlopen call.  At present pppd is compiled with</div><div class='del'>-plugin support only under Linux and Solaris.</div><div class='del'>-</div><div class='del'>-Plugins are loaded into pppd using the `plugin' option, which takes</div><div class='del'>-one argument, the name of a shared object file.  The plugin option is</div><div class='del'>-a privileged option.  I suggest that you give the full path name of</div><div class='del'>-the shared object file; if you don't, it may be possible for</div><div class='del'>-unscrupulous users to substitute another shared object file for the</div><div class='del'>-one you mean to load, e.g. by setting the LD_LIBRARY_PATH variable.</div><div class='del'>-</div><div class='del'>-Plugins are usually written in C and compiled and linked to a shared</div><div class='del'>-object file in the appropriate manner for your platform.  Using gcc</div><div class='del'>-under Linux, a plugin called `xyz' could be compiled and linked with</div><div class='del'>-the following commands:</div><div class='del'>-</div><div class='del'>-	gcc -c -O xyz.c</div><div class='del'>-	gcc -shared -o xyz.so xyz.o</div><div class='del'>-</div><div class='del'>-There are some example plugins in the pppd/plugins directory in the</div><div class='del'>-ppp distribution.  Currently there is one example, minconn.c, which</div><div class='del'>-implements a `minconnect' option, which specifies a minimum connect</div><div class='del'>-time before the idle timeout applies.</div><div class='del'>-</div><div class='del'>-Plugins can access global variables within pppd, so it is useful for</div><div class='del'>-them to #include "pppd.h" from the pppd source directory.</div><div class='del'>-</div><div class='del'>-Every plugin must contain a global procedure called `plugin_init'.</div><div class='del'>-This procedure will get called (with no arguments) immediately after</div><div class='del'>-the plugin is loaded.</div><div class='del'>-</div><div class='del'>-Plugins can affect the behaviour of pppd in at least three ways:</div><div class='del'>-</div><div class='del'>-1. They can add extra options which pppd will then recognize.  This is</div><div class='del'>-   done by calling the add_options() procedure with a pointer to an</div><div class='del'>-   array of option_t structures.  The last entry in the array must</div><div class='del'>-   have its name field set to NULL.</div><div class='del'>-</div><div class='del'>-2. Pppd contains `hook' variables which are procedure pointers.  If a</div><div class='del'>-   given hook is not NULL, pppd will call the procedure it points to</div><div class='del'>-   at the appropriate point in its processing.  The plugin can set any</div><div class='del'>-   of these hooks to point to its own procedures.  See below for a</div><div class='del'>-   description of the hooks which are currently implemented.</div><div class='del'>-</div><div class='del'>-3. Plugin code can call any global procedures and access any global</div><div class='del'>-   variables in pppd.</div><div class='del'>-</div><div class='del'>-Here is a list of the currently implemented hooks in pppd.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int (*idle_time_hook)(struct ppp_idle *idlep);</div><div class='del'>-</div><div class='del'>-The idle_time_hook is called when the link first comes up (i.e. when</div><div class='del'>-the first network protocol comes up) and at intervals thereafter.  On</div><div class='del'>-the first call, the idlep parameter is NULL, and the return value is</div><div class='del'>-the number of seconds before pppd should check the link activity, or 0</div><div class='del'>-if there is to be no idle timeout.</div><div class='del'>-</div><div class='del'>-On subsequent calls, idlep points to a structure giving the number of</div><div class='del'>-seconds since the last packets were sent and received.  If the return</div><div class='del'>-value is &gt; 0, pppd will wait that many seconds before checking again.</div><div class='del'>-If it is &lt;= 0, that indicates that the link should be terminated due</div><div class='del'>-to lack of activity.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int (*holdoff_hook)(void);</div><div class='del'>-</div><div class='del'>-The holdoff_hook is called when an attempt to bring up the link fails,</div><div class='del'>-or the link is terminated, and the persist or demand option was used.</div><div class='del'>-It returns the number of seconds that pppd should wait before trying</div><div class='del'>-to reestablish the link (0 means immediately).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int (*pap_check_hook)(void);</div><div class='del'>-int (*pap_passwd_hook)(char *user, char *passwd);</div><div class='del'>-int (*pap_auth_hook)(char *user, int userlen,</div><div class='del'>-		     char *passwd, int passlen,</div><div class='del'>-		     char **msgp, int *msglenp,</div><div class='del'>-		     struct wordlist **paddrs,</div><div class='del'>-		     struct wordlist **popts);</div><div class='del'>-</div><div class='del'>-These hooks are designed to allow a plugin to replace the normal PAP</div><div class='del'>-password processing in pppd with something different (e.g. contacting</div><div class='del'>-an external server).</div><div class='del'>-</div><div class='del'>-The pap_check_hook is called to check whether there is any possibility</div><div class='del'>-that the peer could authenticate itself to us.  If it returns 1, pppd</div><div class='del'>-will ask the peer to authenticate itself.  If it returns 0, pppd will</div><div class='del'>-not ask the peer to authenticate itself (but if authentication is</div><div class='del'>-required, pppd may exit, or terminate the link before network protocol</div><div class='del'>-negotiation).  If it returns -1, pppd will look in the pap-secrets</div><div class='del'>-file as it would normally.</div><div class='del'>-</div><div class='del'>-The pap_passwd_hook is called to determine what username and password</div><div class='del'>-pppd should use in authenticating itself to the peer with PAP.  The</div><div class='del'>-user string will already be initialized, by the `user' option, the</div><div class='del'>-`name' option, or from the hostname, but can be changed if necessary.</div><div class='del'>-MAXNAMELEN bytes of space are available at *user, and MAXSECRETLEN</div><div class='del'>-bytes of space at *passwd.  If this hook returns 0, pppd will use the</div><div class='del'>-values at *user and *passwd; if it returns -1, pppd will look in the</div><div class='del'>-pap-secrets file, or use the value from the +ua or password option, as</div><div class='del'>-it would normally.</div><div class='del'>-</div><div class='del'>-The pap_auth_hook is called to determine whether the username and</div><div class='del'>-password supplied by the peer are valid.  user and passwd point to</div><div class='del'>-null-terminated strings containing the username and password supplied</div><div class='del'>-by the peer, with non-printable characters converted to a printable</div><div class='del'>-form.  The pap_auth_hook function should set msg to a string to be</div><div class='del'>-returned to the peer and return 1 if the username/password was valid</div><div class='del'>-and 0 if not.  If the hook returns -1, pppd will look in the</div><div class='del'>-pap-secrets file as usual.</div><div class='del'>-</div><div class='del'>-If the username/password was valid, the hook can set *paddrs to point</div><div class='del'>-to a wordlist containing the IP address(es) which the peer is</div><div class='del'>-permitted to use, formatted as in the pap-secrets file.  It can also</div><div class='del'>-set *popts to a wordlist containing any extra options for this user</div><div class='del'>-which pppd should apply at this point.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-## $Id$ ##</div><div class='head'>diff --git a/mdk-stage1/ppp/README b/mdk-stage1/ppp/README<br/>deleted file mode 100644<br/>index aa1e5f9c2..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,168 +0,0 @@</div><div class='del'>-This is the README file for ppp-2.4, a package which implements the</div><div class='del'>-Point-to-Point Protocol (PPP) to provide Internet connections over</div><div class='del'>-serial lines.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Introduction.</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-The Point-to-Point Protocol (PPP) provides a standard way to establish</div><div class='del'>-a network connection over a serial link.  At present, this package</div><div class='del'>-supports IP and the protocols layered above IP, such as TCP and UDP.</div><div class='del'>-The Linux and Solaris ports of this package have optional support for</div><div class='del'>-IPV6; the Linux port of this package also has support for IPX.</div><div class='del'>-</div><div class='del'>-This software consists of two parts:</div><div class='del'>-</div><div class='del'>-- Kernel code, which establishes a network interface and passes</div><div class='del'>-packets between the serial port, the kernel networking code and the</div><div class='del'>-PPP daemon (pppd).  This code is implemented using STREAMS modules on</div><div class='del'>-SunOS 4.x and Solaris, and as a line discipline under Linux and FreeBSD.</div><div class='del'>-</div><div class='del'>-- The PPP daemon (pppd), which negotiates with the peer to establish</div><div class='del'>-the link and sets up the ppp network interface.  Pppd includes support</div><div class='del'>-for authentication, so you can control which other systems may make a</div><div class='del'>-PPP connection and what IP addresses they may use.</div><div class='del'>-</div><div class='del'>-The primary platforms supported by this package are Linux and Solaris.</div><div class='del'>-Code for SunOS 4.x is included here but is largely untested.  I have</div><div class='del'>-code for NeXTStep, FreeBSD, SVR4, Tru64 (Digital Unix), AIX and Ultrix</div><div class='del'>-but no active maintainers for these platforms.  Code for all of these</div><div class='del'>-except AIX is included in the ppp-2.3.11 release.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Installation.</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-The file SETUP contains general information about setting up your</div><div class='del'>-system for using PPP.  There is also a README file for each supported</div><div class='del'>-system, which contains more specific details for installing PPP on</div><div class='del'>-that system.  The supported systems, and the corresponding README</div><div class='del'>-files, are:</div><div class='del'>-</div><div class='del'>-	Linux				README.linux</div><div class='del'>-	Solaris 2			README.sol2</div><div class='del'>-	SunOS 4.x			README.sunos4</div><div class='del'>-</div><div class='del'>-In each case you start by running the ./configure script.  This works</div><div class='del'>-out which operating system you are using and creates symbolic links to</div><div class='del'>-the appropriate makefiles.  You then run `make' to compile the</div><div class='del'>-user-level code, and (as root) `make install' to install the</div><div class='del'>-user-level programs pppd, chat and pppstats.</div><div class='del'>-</div><div class='del'>-N.B. Since 2.3.0, leaving the permitted IP addresses column of the</div><div class='del'>-pap-secrets or chap-secrets file empty means that no addresses are</div><div class='del'>-permitted.  You need to put a "*" in that column to allow the peer to</div><div class='del'>-use any IP address.  (This only applies where the peer is</div><div class='del'>-authenticating itself to you, of course.)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What's new in ppp-2.4.1.</div><div class='del'>-************************</div><div class='del'>-</div><div class='del'>-* Pppd can now print out the set of options that are in effect.  The</div><div class='del'>-  new `dump' option causes pppd to print out the option values after</div><div class='del'>-  option parsing is complete.  The `dryrun' option causes pppd to</div><div class='del'>-  print the options and then exit.</div><div class='del'>-</div><div class='del'>-* The option parsing code has been fixed so that options in the</div><div class='del'>-  per-tty options file are parsed correctly, and don't override values</div><div class='del'>-  from the command line in most cases.</div><div class='del'>-</div><div class='del'>-* The plugin option now looks in /usr/lib/pppd/&lt;pppd-version&gt; (for</div><div class='del'>-  example, /usr/lib/pppd/2.4.1b1) for shared objects for plugins if</div><div class='del'>-  there is no slash in the plugin name.</div><div class='del'>-</div><div class='del'>-* When loading a plugin, pppd will now check the version of pppd for</div><div class='del'>-  which the plugin was compiled, and refuse to load it if it is</div><div class='del'>-  different to pppd's version string.  To enable this, the plugin</div><div class='del'>-  source needs to #include "pppd.h" and have a line saying:</div><div class='del'>-	char pppd_version[] = VERSION;</div><div class='del'>-</div><div class='del'>-* There is a bug in zlib, discovered by James Carlson, which can cause</div><div class='del'>-  kernel memory corruption if Deflate is used with the lowest setting,</div><div class='del'>-  8.  As a workaround pppd will now insist on using at least 9.</div><div class='del'>-</div><div class='del'>-* Pppd should compile on Solaris and SunOS again.</div><div class='del'>-</div><div class='del'>-* Pppd should now set the MTU correctly on demand-dialled interfaces.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-What was new in ppp-2.4.0.</div><div class='del'>-**************************</div><div class='del'>-</div><div class='del'>-* Multilink: this package now allows you to combine multiple serial</div><div class='del'>-  links into one logical link or `bundle', for increased bandwidth and</div><div class='del'>-  reduced latency.  This is currently only supported under the</div><div class='del'>-  Linux-2.3.99pre5 or later kernels.</div><div class='del'>-</div><div class='del'>-* All the pppd processes running on a system now write information</div><div class='del'>-  into a common database.  I used the `tdb' code from samba for this.</div><div class='del'>-</div><div class='del'>-* New hooks have been added.</div><div class='del'>-</div><div class='del'>-For a list of the changes made during the 2.3 series releases of this</div><div class='del'>-package, see the Changes-2.3 file.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Compression methods.</div><div class='del'>-********************</div><div class='del'>-</div><div class='del'>-This package supports two packet compression methods: Deflate and</div><div class='del'>-BSD-Compress.  Other compression methods which are in common use</div><div class='del'>-include Predictor, LZS, and MPPC.  These methods are not supported for</div><div class='del'>-two reasons - they are patent-encumbered, and they cause some packets</div><div class='del'>-to expand slightly, which pppd doesn't currently allow for.</div><div class='del'>-BSD-Compress is also patent-encumbered (its inclusion in this package</div><div class='del'>-can be considered a historical anomaly :-) but it doesn't ever expand</div><div class='del'>-packets.  Neither does Deflate, which uses the same algorithm as gzip.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Patents.</div><div class='del'>-********</div><div class='del'>-</div><div class='del'>-The BSD-Compress algorithm used for packet compression is the same as</div><div class='del'>-that used in the Unix "compress" command.  It is apparently covered by</div><div class='del'>-U.S. patents 4,814,746 (owned by IBM) and 4,558,302 (owned by Unisys),</div><div class='del'>-and corresponding patents in various other countries (but not</div><div class='del'>-Australia).  If this is of concern, you can build the package without</div><div class='del'>-including BSD-Compress.  To do this, edit net/ppp-comp.h to change the</div><div class='del'>-definition of DO_BSD_COMPRESS to 0.  The bsd-comp.c files are then no</div><div class='del'>-longer needed, so the references to bsd-comp.o may optionally be</div><div class='del'>-removed from the Makefiles.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Contacts.</div><div class='del'>-*********</div><div class='del'>-</div><div class='del'>-The comp.protocols.ppp newsgroup is a useful place to get help if you</div><div class='del'>-have trouble getting your ppp connections to work.  Please do not send</div><div class='del'>-me questions of the form "please help me get connected to my ISP" -</div><div class='del'>-I'm sorry, but I simply do not have the time to answer all the</div><div class='del'>-questions like this that I get.</div><div class='del'>-</div><div class='del'>-If you find bugs in this package, please report them to the maintainer</div><div class='del'>-for the port for the operating system you are using:</div><div class='del'>-</div><div class='del'>-Linux			Paul Mackerras &lt;paulus@linuxcare.com&gt;</div><div class='del'>-Solaris 2		James Carlson &lt;james.d.carlson@east.sun.com&gt;</div><div class='del'>-SunOS 4.x		Adi Masputra &lt;adi.masputra@sun.com&gt;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Copyrights:</div><div class='del'>-***********</div><div class='del'>-</div><div class='del'>-All of the code can be freely used and redistributed.  The individual</div><div class='del'>-source files each have their own copyright and permission notice; some</div><div class='del'>-have a BSD-style notice and some are under the GPL.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Distribution:</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-The primary site for releases of this software is:</div><div class='del'>-</div><div class='del'>-	ftp://linuxcare.com.au/pub/ppp/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-($Id$)</div><div class='head'>diff --git a/mdk-stage1/ppp/README.MSCHAP80 b/mdk-stage1/ppp/README.MSCHAP80<br/>deleted file mode 100644<br/>index d3ed291b7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README.MSCHAP80?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README.MSCHAP80</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,284 +0,0 @@</div><div class='del'>-PPP Client Support for Microsoft's CHAP-80</div><div class='del'>-==========================================</div><div class='del'>-</div><div class='del'>-Eric Rosenquist          rosenqui@strataware.com</div><div class='del'>-(updated by Paul Mackerras)</div><div class='del'>-(updated by Al Longyear)</div><div class='del'>-(updated by Farrell Woods)</div><div class='del'>-</div><div class='del'>-INTRODUCTION</div><div class='del'>-</div><div class='del'>-Microsoft has introduced an extension to the Challenge/Handshake</div><div class='del'>-Authentication Protocol (CHAP) which avoids storing cleartext</div><div class='del'>-passwords on a server.  (Unfortunately, this is not as secure as it</div><div class='del'>-sounds, because the encrypted password stored on a server can be used</div><div class='del'>-by a bogus client to gain access to the server just as easily as if</div><div class='del'>-the password were stored in cleartext.)  The details of the Microsoft</div><div class='del'>-extensions can be found in the document:</div><div class='del'>-</div><div class='del'>-    &lt;ftp://ftp.microsoft.com/developr/rfc/chapexts.txt&gt;</div><div class='del'>-</div><div class='del'>-In short, MS-CHAP is identified as &lt;auth chap 80&gt; since the hex value</div><div class='del'>-of 80 is used to designate Microsoft's scheme.  Standard PPP CHAP uses</div><div class='del'>-a value of 5.  If you enable PPP debugging with the "debug" option and</div><div class='del'>-see something like the following in your logs, the remote server is</div><div class='del'>-requesting MS-CHAP:</div><div class='del'>-</div><div class='del'>-  rcvd [LCP ConfReq id=0x2 &lt;asyncmap 0x0&gt; &lt;auth chap 80&gt; &lt;magic 0x46a3&gt;]</div><div class='del'>-                                           ^^^^^^^^^^^^</div><div class='del'>-</div><div class='del'>-The standard pppd implementation will indicate its lack of support for</div><div class='del'>-MS-CHAP by NAKing it:</div><div class='del'>-</div><div class='del'>-  sent [LCP ConfNak id=0x2 &lt;auth chap 05&gt;]</div><div class='del'>-</div><div class='del'>-Windows NT Server systems are often configured to "Accept only</div><div class='del'>-Microsoft Authentication" (this is intended to enhance security).  Up</div><div class='del'>-until now, that meant that you couldn't use this version of PPPD to</div><div class='del'>-connect to such a system.  I've managed to get a client-only</div><div class='del'>-implementation of MS-CHAP working; it will authenticate itself to</div><div class='del'>-another system using MS-CHAP, but if you're using PPPD as a dial-in</div><div class='del'>-server, you won't be able to use MS-CHAP to authenticate the clients.</div><div class='del'>-This would not be a lot of extra work given that the framework is in</div><div class='del'>-place, but I didn't need it myself so I didn't implement it.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-BUILDING THE PPPD</div><div class='del'>-</div><div class='del'>-MS-CHAP uses a combination of MD4 hashing and DES encryption for</div><div class='del'>-authentication.  You may need to get Eric Young's libdes library in</div><div class='del'>-order to use my MS-CHAP extensions.  A lot of UNIX systems already</div><div class='del'>-have DES encryption available via the crypt(3), encrypt(3) and</div><div class='del'>-setkey(3) interfaces.  Some may (such as that on Digital UNIX)</div><div class='del'>-provide only the encryption mechanism and will not perform</div><div class='del'>-decryption.  This is okay.  We only need to encrypt to perform</div><div class='del'>-MS-CHAP authentication.</div><div class='del'>-</div><div class='del'>-If you have encrypt/setkey available, then hopefully you need only</div><div class='del'>-define these two things in your Makefile: -DUSE_CRYPT and -DCHAPMS.</div><div class='del'>-Skip the paragraphs below about obtaining and building libdes.  Do</div><div class='del'>-the "make clean" and "make" as described below.  Linux users</div><div class='del'>-should not need to modify their Makefiles.  Instead,</div><div class='del'>-just do "make CHAPMS=1 USE_CRYPT=1".</div><div class='del'>-</div><div class='del'>-If you don't have encrypt and setkey, you will need Eric Young's</div><div class='del'>-libdes library.  You can find it in:</div><div class='del'>-</div><div class='del'>-ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.psy.uq.oz.au/DES/libdes-3.06.tar.gz</div><div class='del'>-</div><div class='del'>-Australian residents can get libdes from Eric Young's site:</div><div class='del'>-</div><div class='del'>-ftp://ftp.psy.uq.oz.au/pub/Crypto/DES/libdes-3.06.tar.gz</div><div class='del'>-</div><div class='del'>-It is also available on many other sites (ask Archie).</div><div class='del'>-</div><div class='del'>-I used libdes-3.06, but hopefully anything newer than that will work</div><div class='del'>-also.  Get the library, build and test it on your system, and install</div><div class='del'>-it somewhere (typically /usr/local/lib and /usr/local/include).</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-You should now be ready to (re)compile the PPPD.  Go to the pppd</div><div class='del'>-subdirectory and make sure the Makefile contains "-DCHAPMS" in the</div><div class='del'>-CFLAGS or COMPILE_FLAGS macro, and that the LIBS macro (or LDADD for</div><div class='del'>-BSD systems) contains "-ldes".  Depending on your system and where the</div><div class='del'>-DES library was installed, you may also need to alter the include and</div><div class='del'>-library paths used by your compiler.</div><div class='del'>-</div><div class='del'>-Do a "make clean" and then a "make" to rebuild pppd.  Assuming all</div><div class='del'>-goes well, install the new pppd and move on to the CONFIGURATION</div><div class='del'>-section.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-CONFIGURATION</div><div class='del'>-</div><div class='del'>-If you've never used PPPD with CHAP before, read the man page (type</div><div class='del'>-"man pppd") and read the description in there.  Basically, you need to</div><div class='del'>-edit the "chap-secrets" file typically named /etc/ppp/chap-secrets.</div><div class='del'>-This should contain the following two lines for each system with which</div><div class='del'>-you use CHAP (with no leading blanks):</div><div class='del'>-</div><div class='del'>-    RemoteHost  Account     Secret</div><div class='del'>-    Account     RemoteHost  Secret</div><div class='del'>-</div><div class='del'>-Note that you need both lines and that item 1 and 2 are swapped in the</div><div class='del'>-second line.  I'm not sure why you need it twice, but it works and I didn't</div><div class='del'>-have time to look into it further.  The "RemoteHost" is a somewhat</div><div class='del'>-arbitrary name for the remote Windows NT system you're dialing.  It doesn't</div><div class='del'>-have to match the NT system's name, but it *does* have to match what you</div><div class='del'>-use with the "remotename" parameter.  The "Account" is the Windows NT</div><div class='del'>-account name you have been told to use when dialing, and the "Secret" is</div><div class='del'>-the password for that account.  For example, if your service provider calls</div><div class='del'>-their machine "DialupNT" and tells you your account and password are</div><div class='del'>-"customer47" and "foobar", add the following to your chap-secrets file:</div><div class='del'>-</div><div class='del'>-    DialupNT    customer47  foobar</div><div class='del'>-    customer47  DialupNT    foobar</div><div class='del'>-</div><div class='del'>-The only other thing you need to do for MS-CHAP (compared to normal CHAP)</div><div class='del'>-is to always use the "remotename" option, either on the command line or in</div><div class='del'>-your "options" file (see the pppd man page for details).  In the case of</div><div class='del'>-the above example, you would need to use the following command line:</div><div class='del'>-</div><div class='del'>-    pppd name customer47 remotename DialupNT &lt;other options&gt;</div><div class='del'>-</div><div class='del'>-or add:</div><div class='del'>-</div><div class='del'>-    name customer47</div><div class='del'>-    remotename DialupNT</div><div class='del'>-</div><div class='del'>-to your PPPD "options" file.</div><div class='del'>-</div><div class='del'>-The "remotename" option is required for MS-CHAP since Microsoft PPP servers</div><div class='del'>-don't send their system name in the CHAP challenge packet.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-E=691 (AUTHENTICATION_FAILURE) ERRORS WHEN YOU HAVE THE VALID SECRET (PASSWORD)</div><div class='del'>-</div><div class='del'>-If your RAS server is not the domain controller and is not a 'stand-alone'</div><div class='del'>-server then it must make a query to the domain controller for your domain.</div><div class='del'>-</div><div class='del'>-You need to specify the domain name with the user name when you attempt to</div><div class='del'>-use this type of a configuration. The domain name is specified with the</div><div class='del'>-local name in the chap-secrets file and with the option for the 'name'</div><div class='del'>-parameter.</div><div class='del'>-</div><div class='del'>-For example, the previous example would become:</div><div class='del'>-</div><div class='del'>-    DialupNT            domain\\customer47   foobar</div><div class='del'>-    domain\\customer47  DialupNT             foobar</div><div class='del'>-</div><div class='del'>-and</div><div class='del'>-</div><div class='del'>-    pppd name 'domain\\customer47' remotename DialupNT &lt;other options&gt;</div><div class='del'>-</div><div class='del'>-or add:</div><div class='del'>-</div><div class='del'>-    name domain\\customer47</div><div class='del'>-    remotename DialupNT</div><div class='del'>-</div><div class='del'>-when the Windows NT domain name is simply called 'domain'.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-TROUBLESHOOTING</div><div class='del'>-</div><div class='del'>-Assuming that everything else has been configured correctly for PPP and</div><div class='del'>-CHAP, the MS-CHAP-specific problems you're likely to encounter are mostly</div><div class='del'>-related to your Windows NT account and its settings.  A Microsoft server</div><div class='del'>-returns error codes in its CHAP response.  The following are extracted from</div><div class='del'>-Microsoft's "chapexts.txt" file referenced above:</div><div class='del'>-</div><div class='del'>- 646 ERROR_RESTRICTED_LOGON_HOURS</div><div class='del'>- 647 ERROR_ACCT_DISABLED</div><div class='del'>- 648 ERROR_PASSWD_EXPIRED</div><div class='del'>- 649 ERROR_NO_DIALIN_PERMISSION</div><div class='del'>- 691 ERROR_AUTHENTICATION_FAILURE</div><div class='del'>- 709 ERROR_CHANGING_PASSWORD</div><div class='del'>-</div><div class='del'>-You'll see these in your pppd log as a line similar to:</div><div class='del'>-</div><div class='del'>-   Remote message: E=649 R=0</div><div class='del'>-</div><div class='del'>-The "E=" is the error number from the table above, and the "R=" flag</div><div class='del'>-indicates whether the error is transient and the client should retry.  If</div><div class='del'>-you consistently get error 691, then either you're using the wrong account</div><div class='del'>-name/password, or the DES library or MD4 hashing (in md4.c) aren't working</div><div class='del'>-properly.  Verify your account name and password (use a Windows NT or</div><div class='del'>-Windows 95 system to dial-in if you have one available).  If that checks</div><div class='del'>-out, test the DES library with the "destest" program included with the DES</div><div class='del'>-library.  If DES checks out, the md4.c routines are probably failing</div><div class='del'>-(system byte ordering may be a problem) or my code is screwing up.  I've</div><div class='del'>-only got access to a Linux system, so you're on your own for anything else.</div><div class='del'>-</div><div class='del'>-Another thing that might cause problems is that some RAS servers won't</div><div class='del'>-respond at all to LCP config requests without seeing the word "CLIENT"</div><div class='del'>-from the other end.  If you see pppd sending out LCP config requests</div><div class='del'>-without getting any reply, try putting something in your chat script</div><div class='del'>-to send the word CLIENT after the modem has connected.</div><div class='del'>-</div><div class='del'>-If everything compiles cleanly, but fails at authentication time, then</div><div class='del'>-it might be a case of the MD4 or DES code screwing up.  The following</div><div class='del'>-small program can be used to test the MS-CHAP code to see if it</div><div class='del'>-produces a known response:</div><div class='del'>-</div><div class='del'>------------------</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#include "chap_ms.h"</div><div class='del'>-</div><div class='del'>-int main(argc, argv)</div><div class='del'>-    int     argc;</div><div class='del'>-    char    *argv[];</div><div class='del'>-{</div><div class='del'>-    u_char          challenge[8];</div><div class='del'>-    int             challengeInt[sizeof(challenge)];</div><div class='del'>-    chap_state      cstate;</div><div class='del'>-    int             i;</div><div class='del'>-</div><div class='del'>-    if (argc != 3) {</div><div class='del'>-        fprintf(stderr, "Usage: %s &lt;16-hexchar challenge&gt; &lt;password&gt;\n",</div><div class='del'>-        argv[0]); exit(1);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    sscanf(argv[1], "%2x%2x%2x%2x%2x%2x%2x%2x",</div><div class='del'>-           challengeInt + 0, challengeInt + 1, challengeInt + 2,</div><div class='del'>-           challengeInt + 3, challengeInt + 4, challengeInt + 5,</div><div class='del'>-           challengeInt + 6, challengeInt + 7);</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; sizeof(challenge); i++)</div><div class='del'>-        challenge[i] = (u_char)challengeInt[i];</div><div class='del'>-</div><div class='del'>-    ChapMS(&amp;cstate, challenge, sizeof(challenge), argv[2], strlen(argv[2]));</div><div class='del'>-    printf("Response length is %d, response is:", cstate.resp_length);</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; cstate.resp_length; i++) {</div><div class='del'>-        if (i % 8 == 0)</div><div class='del'>-            putchar('\n');</div><div class='del'>-        printf("%02X ", (unsigned int)cstate.response[i]);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    putchar('\n');</div><div class='del'>-</div><div class='del'>-    exit(0);</div><div class='del'>-}</div><div class='del'>--------------</div><div class='del'>-</div><div class='del'>-This needs to link against chap_ms.o, md4.o, and the DES library.  When </div><div class='del'>-you run it with the command line:</div><div class='del'>-</div><div class='del'>- $ testchap 00000000000000000000000000000000 hello</div><div class='del'>-</div><div class='del'>-it should output the following:</div><div class='del'>-</div><div class='del'>- Response length is 49, response is:</div><div class='del'>- 00 00 00 00 00 00 00 00</div><div class='del'>- 00 00 00 00 00 00 00 00</div><div class='del'>- 00 00 00 00 00 00 00 00</div><div class='del'>- F4 D9 9D AF 82 64 DC 3C</div><div class='del'>- 53 F9 BC 92 14 B5 5D 9E</div><div class='del'>- 78 C4 21 48 9D B7 A8 B4</div><div class='del'>- 01</div><div class='del'>-</div><div class='del'>-if not, then either the DES library is not working, the MD4 code isn't </div><div class='del'>-working, or there are some problems with the port of the code in </div><div class='del'>-chap_ms.c.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-STILL TO DO</div><div class='del'>-</div><div class='del'>-A site using only MS-CHAP to authenticate has no need to store cleartext</div><div class='del'>-passwords in the "chap-secrets" file.  A utility that spits out the ASCII</div><div class='del'>-hex MD4 hash of a given password would be nice, and would allow that hash</div><div class='del'>-to be used in chap-secrets in place of the password.  The code to do this</div><div class='del'>-could quite easily be lifted from chap_ms.c (you have to convert the</div><div class='del'>-password to Unicode before hashing it).  The chap_ms.c file would also have</div><div class='del'>-to be changed to recognize a password hash (16 binary bytes == 32 ASCII hex</div><div class='del'>-characters) and skip the hashing stage.</div><div class='del'>-</div><div class='del'>-A server implementation would allow MS-CHAP to be used with Windows NT and</div><div class='del'>-Windows 95 clients for enhanced security.  Some new command-line options</div><div class='del'>-would be required, as would code to generate the Challenge packet and</div><div class='del'>-verify the response.  Most of the helper functions are in place, so this</div><div class='del'>-shouldn't be too hard for someone to add.</div><div class='head'>diff --git a/mdk-stage1/ppp/README.cbcp b/mdk-stage1/ppp/README.cbcp<br/>deleted file mode 100644<br/>index 6f7b7685e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README.cbcp?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README.cbcp</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-	     Microsoft Call Back Configuration Protocol.</div><div class='del'>-			by Pedro Roque Marques</div><div class='del'>-			(updated by Paul Mackerras)</div><div class='del'>-</div><div class='del'>-The CBCP is a method by which the Microsoft Windows NT Server may</div><div class='del'>-implement additional security. It is possible to configure the server</div><div class='del'>-in such a manner so as to require that the client systems which</div><div class='del'>-connect with it are required that following a valid authentication to</div><div class='del'>-leave a method by which the number may be returned call.</div><div class='del'>-</div><div class='del'>-It is a requirement of servers so configured that the protocol be</div><div class='del'>-exchanged.</div><div class='del'>-</div><div class='del'>-So, this set of patches may be applied to the pppd process to enable</div><div class='del'>-the cbcp client *only* portion of the specification. It is primarily</div><div class='del'>-meant to permit connection with Windows NT Servers.</div><div class='del'>-</div><div class='del'>-The ietf-working specification may be obtained from ftp.microsoft.com</div><div class='del'>-in the developr/rfc directory.</div><div class='del'>-</div><div class='del'>-The ietf task group has decided to recommend that the LCP sequence be</div><div class='del'>-extended to permit the callback operation. For this reason, these</div><div class='del'>-patches are not 'part' of pppd but are an adjunct to the code.</div><div class='del'>-</div><div class='del'>-To enable CBCP support, all that is required is to change the</div><div class='del'>-appropriate Makefile in the pppd subdirectory to add "-DCBCP_SUPPORT"</div><div class='del'>-to the CFLAGS definition and add cbcp.o to the list of object files,</div><div class='del'>-and then recompile pppd.  The patch below does this for Makefile.bsd</div><div class='del'>-and Makefile.linux.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>---------------------------------cut here-------------------------------</div><div class='del'>-diff -r -c ppp-2.3.orig/pppd/Makefile.bsd ppp-2.3/pppd/Makefile.bsd</div><div class='del'>-*** ppp-2.3.orig/pppd/Makefile.bsd	Tue Oct  8 13:33:33 1996</div><div class='del'>---- ppp-2.3/pppd/Makefile.bsd	Fri Apr 11 23:59:15 1997</div><div class='del'>-***************</div><div class='del'>-*** 4,14 ****</div><div class='del'>-  # -D_BITYPES is for FreeBSD, which doesn't define anything to</div><div class='del'>-  # tell us that u_int32_t gets defined if &lt;sys/types.h&gt; is included.</div><div class='del'>-  # Remove for older *BSD systems for which this isn't true.</div><div class='del'>-! CFLAGS+= -g -I.. -DHAVE_PATHS_H -D_BITYPES</div><div class='del'>-  </div><div class='del'>-  PROG=	pppd</div><div class='del'>-  SRCS=	main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \</div><div class='del'>-! 	demand.c auth.c options.c sys-bsd.c</div><div class='del'>-  MAN=	pppd.cat8</div><div class='del'>-  MAN8=	pppd.8</div><div class='del'>-  BINMODE=4555</div><div class='del'>---- 4,14 ----</div><div class='del'>-  # -D_BITYPES is for FreeBSD, which doesn't define anything to</div><div class='del'>-  # tell us that u_int32_t gets defined if &lt;sys/types.h&gt; is included.</div><div class='del'>-  # Remove for older *BSD systems for which this isn't true.</div><div class='del'>-! CFLAGS+= -I.. -DHAVE_PATHS_H -D_BITYPES -DCBCP_SUPPORT</div><div class='del'>-  </div><div class='del'>-  PROG=	pppd</div><div class='del'>-  SRCS=	main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \</div><div class='del'>-! 	demand.c auth.c options.c sys-bsd.c cbcp.c</div><div class='del'>-  MAN=	pppd.cat8</div><div class='del'>-  MAN8=	pppd.8</div><div class='del'>-  BINMODE=4555</div><div class='del'>-diff -r -c ppp-2.3.orig/pppd/Makefile.linux ppp-2.3/pppd/Makefile.linux</div><div class='del'>-*** ppp-2.3.orig/pppd/Makefile.linux	Tue Oct  8 15:42:41 1996</div><div class='del'>---- ppp-2.3/pppd/Makefile.linux	Sat Apr 12 00:02:28 1997</div><div class='del'>-***************</div><div class='del'>-*** 14,20 ****</div><div class='del'>-  	   ipxcp.h cbcp.h</div><div class='del'>-  MANPAGES = pppd.8</div><div class='del'>-  PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-! 	   auth.o options.o demand.o sys-linux.o ipxcp.o</div><div class='del'>-  </div><div class='del'>-  all: pppd</div><div class='del'>-  </div><div class='del'>---- 14,20 ----</div><div class='del'>-  	   ipxcp.h cbcp.h</div><div class='del'>-  MANPAGES = pppd.8</div><div class='del'>-  PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-! 	   auth.o options.o demand.o sys-linux.o ipxcp.o cbcp.o</div><div class='del'>-  </div><div class='del'>-  all: pppd</div><div class='del'>-  </div><div class='del'>-***************</div><div class='del'>-*** 36,42 ****</div><div class='del'>-  #INCLUDE_DIRS= -I/usr/include -I..</div><div class='del'>-  INCLUDE_DIRS=</div><div class='del'>-  </div><div class='del'>-! COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE</div><div class='del'>-  </div><div class='del'>-  CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)</div><div class='del'>-  </div><div class='del'>---- 36,42 ----</div><div class='del'>-  #INCLUDE_DIRS= -I/usr/include -I..</div><div class='del'>-  INCLUDE_DIRS=</div><div class='del'>-  </div><div class='del'>-! COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DCBCP_SUPPORT</div><div class='del'>-  </div><div class='del'>-  CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)</div><div class='del'>-  </div><div class='head'>diff --git a/mdk-stage1/ppp/README.linux b/mdk-stage1/ppp/README.linux<br/>deleted file mode 100644<br/>index 62ed9ca7f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README.linux?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README.linux</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,297 +0,0 @@</div><div class='del'>-		PPP for Linux</div><div class='del'>-		-------------</div><div class='del'>-</div><div class='del'>-		Paul Mackerras</div><div class='del'>-		8 March 2001</div><div class='del'>-</div><div class='del'>-		for ppp-2.4.1</div><div class='del'>-</div><div class='del'>-1. Introduction</div><div class='del'>----------------</div><div class='del'>-</div><div class='del'>-The Linux PPP implementation includes both kernel and user-level</div><div class='del'>-parts.  This package contains the user-level part, which consists of</div><div class='del'>-the PPP daemon (pppd) and associated utilities.  In the past this</div><div class='del'>-package has contained updated kernel drivers.  This is no longer</div><div class='del'>-necessary, as the current 2.2 and 2.4 kernel sources contain</div><div class='del'>-up-to-date drivers.</div><div class='del'>-</div><div class='del'>-The Linux PPP implementation is capable of being used both for</div><div class='del'>-initiating PPP connections (as a `client') or for handling incoming</div><div class='del'>-PPP connections (as a `server').  Note that this is an operational</div><div class='del'>-distinction, based on how the connection is created, rather than a</div><div class='del'>-distinction that is made in the PPP protocols themselves.</div><div class='del'>-</div><div class='del'>-Mostly this package is used for PPP connections over modems connected</div><div class='del'>-via asynchronous serial ports, so this guide concentrates on this</div><div class='del'>-situation.</div><div class='del'>-</div><div class='del'>-The PPP protocol consists of two parts.  One is a scheme for framing</div><div class='del'>-and encoding packets, the other is a series of protocols called LCP,</div><div class='del'>-IPCP, PAP and CHAP, for negotiating link options and for</div><div class='del'>-authentication.  This package similarly consists of two parts: a</div><div class='del'>-kernel module which handles PPP's low-level framing protocol, and a</div><div class='del'>-user-level program called pppd which implements PPP's negotiation</div><div class='del'>-protocols.</div><div class='del'>-</div><div class='del'>-The kernel module assembles/disassembles PPP frames, handles error</div><div class='del'>-detection, and forwards packets between the serial port and either the</div><div class='del'>-kernel network code or the user-level program pppd.  IP packets go</div><div class='del'>-directly to the kernel network code.  So once pppd has negotiated the</div><div class='del'>-link, it in practice lies completely dormant until you want to take</div><div class='del'>-the link down, when it negotiates a graceful disconnect.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2. Installation</div><div class='del'>----------------</div><div class='del'>-</div><div class='del'>-2.1 Kernel driver</div><div class='del'>-</div><div class='del'>-Assuming you are running a recent 2.2 or 2.4 (or later) series kernel,</div><div class='del'>-the kernel source code will contain an up-to-date kernel PPP driver.</div><div class='del'>-If the PPP driver was included in your kernel configuration when your</div><div class='del'>-kernel was built, then you only need to install the user-level</div><div class='del'>-programs.  Otherwise you will need to get the source tree for your</div><div class='del'>-kernel version, configure it with PPP included, and recompile.  Most</div><div class='del'>-Linux distribution vendors ship kernels with PPP included in the</div><div class='del'>-configuration.</div><div class='del'>-</div><div class='del'>-The PPP driver can be either compiled into the kernel or compiled as a</div><div class='del'>-kernel module.  If it is compiled into the kernel, the PPP driver is</div><div class='del'>-included in the kernel image which is loaded at boot time.  If it is</div><div class='del'>-compiled as a module, the PPP driver is present in one or more files</div><div class='del'>-under /lib/modules and is loaded into the kernel when needed.</div><div class='del'>-</div><div class='del'>-The 2.2 series kernels contain an older version of the kernel PPP</div><div class='del'>-driver, one which doesn't support multilink.  If you want multilink,</div><div class='del'>-you need to run the latest 2.4 series kernel.  The kernel PPP driver</div><div class='del'>-was completely rewritten for the 2.4 series kernels to support</div><div class='del'>-multilink and to allow it to operate over diverse kinds of</div><div class='del'>-communication medium (the 2.2 driver only operates over serial ports</div><div class='del'>-and devices which look like serial ports, such as pseudo-ttys).</div><div class='del'>-</div><div class='del'>-Under the 2.2 kernels, if PPP is compiled as a module, the PPP driver</div><div class='del'>-modules should be present in the /lib/modules/`uname -r`/net directory</div><div class='del'>-(where `uname -r` represents the kernel version number).  The PPP</div><div class='del'>-driver module itself is called ppp.o, and there will usually be</div><div class='del'>-compression modules there, ppp_deflate.o and bsd_comp.o, as well as</div><div class='del'>-slhc.o, which handles TCP/IP header compression.  If the PPP driver is</div><div class='del'>-compiled into the kernel, the compression code will still be compiled</div><div class='del'>-as modules, for kernels before 2.2.17pre12.  For 2.2.17pre12 and later,</div><div class='del'>-if the PPP driver is compiled in, the compression code will also.</div><div class='del'>-</div><div class='del'>-Under the 2.4 kernels, there are two PPP modules, ppp_generic.o and</div><div class='del'>-ppp_async.o, plus the compression modules (ppp_deflate.o, bsd_comp.o</div><div class='del'>-and slhc.o).  If the PPP generic driver is compiled into the kernel,</div><div class='del'>-the other four can then be present either as modules or compiled into</div><div class='del'>-the kernel.  There is a sixth module, ppp_synctty.o, which is used for</div><div class='del'>-synchronous tty devices such as high-speed WAN adaptors.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2.2 User-level programs</div><div class='del'>-</div><div class='del'>-If you obtained this package in .rpm or .deb format, you simply follow</div><div class='del'>-the usual procedure for installing the package.</div><div class='del'>-</div><div class='del'>-If you are using the .tar.gz form of this package, then cd into the</div><div class='del'>-ppp-2.4.1b1 directory you obtained by unpacking the archive and issue</div><div class='del'>-the following commands:</div><div class='del'>-</div><div class='del'>-$ ./configure</div><div class='del'>-$ make</div><div class='del'>-# make install</div><div class='del'>-</div><div class='del'>-The `make install' has to be done as root.  This makes and installs</div><div class='del'>-four programs and their man pages: pppd, chat, pppstats and pppdump.</div><div class='del'>-If the /etc/ppp configuration directory doesn't exist, the `make</div><div class='del'>-install' step will create it and install some default configuration</div><div class='del'>-files.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2.3 System setup for 2.4 kernels</div><div class='del'>-</div><div class='del'>-Under the 2.4 series kernels, pppd needs to be able to open /dev/ppp,</div><div class='del'>-character device (108,0).  If you are using devfs (the device</div><div class='del'>-filesystem), the /dev/ppp node will automagically appear when the</div><div class='del'>-ppp_generic module is loaded, or at startup if ppp_generic is compiled</div><div class='del'>-in.</div><div class='del'>-</div><div class='del'>-If you have ppp_generic as a module, and you are using devfsd (the</div><div class='del'>-devfs daemon), you will need to add a line like this to your</div><div class='del'>-/etc/devfsd.conf:</div><div class='del'>-</div><div class='del'>-LOOKUP		ppp		MODLOAD</div><div class='del'>-</div><div class='del'>-Otherwise you will need to create a /dev/ppp device node with the</div><div class='del'>-commands:</div><div class='del'>-</div><div class='del'>-# mknod /dev/ppp c 108 0</div><div class='del'>-# chmod 600 /dev/ppp</div><div class='del'>-</div><div class='del'>-If you use module autoloading and have PPP as a module, you will need</div><div class='del'>-to add the following to your /etc/modules.conf or /etc/conf.modules:</div><div class='del'>-</div><div class='del'>-alias /dev/ppp		ppp_generic</div><div class='del'>-alias char-major-108	ppp_generic</div><div class='del'>-alias tty-ldisc-3	ppp_async</div><div class='del'>-alias tty-ldisc-14	ppp_synctty</div><div class='del'>-alias ppp-compress-21	bsd_comp</div><div class='del'>-alias ppp-compress-24	ppp_deflate</div><div class='del'>-alias ppp-compress-26	ppp_deflate</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-2.4 System setup under 2.2 series kernels</div><div class='del'>-</div><div class='del'>-Under the 2.2 series kernels, you should add the following to your</div><div class='del'>-/etc/modules.conf or /etc/conf.modules:</div><div class='del'>-</div><div class='del'>-alias tty-ldisc-3	ppp</div><div class='del'>-alias ppp-compress-21	bsd_comp</div><div class='del'>-alias ppp-compress-24	ppp_deflate</div><div class='del'>-alias ppp-compress-26	ppp_deflate</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-3. Getting help with problems</div><div class='del'>------------------------------</div><div class='del'>-</div><div class='del'>-If you have problems with your PPP setup, or you just want to ask some</div><div class='del'>-questions, or better yet if you can help others with their PPP</div><div class='del'>-questions, then you should join the linux-ppp mailing list.  Send an</div><div class='del'>-email to majordomo@vger.kernel.org with a line in the body saying</div><div class='del'>-</div><div class='del'>-subscribe linux-ppp</div><div class='del'>-</div><div class='del'>-To leave the mailing list, send an email to majordomo@vger.kernel.org</div><div class='del'>-with a line in the body saying</div><div class='del'>-</div><div class='del'>-unsubscribe linux-ppp</div><div class='del'>-</div><div class='del'>-To send a message to the list, email it to linux-ppp@vger.kernel.org.</div><div class='del'>-You don't have to be subscribed to send messages to the list.</div><div class='del'>-</div><div class='del'>-You can also email me (paulus@linuxcare.com.au) but I am overloaded</div><div class='del'>-with email and I can't respond to most messages I get in a timely</div><div class='del'>-fashion.</div><div class='del'>-</div><div class='del'>-There are also several relevant news groups, such as comp.protocols.ppp,</div><div class='del'>-comp.os.linux.networking, or comp.os.linux.setup.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-4. Configuring your dial-out PPP connections</div><div class='del'>---------------------------------------------</div><div class='del'>-</div><div class='del'>-Some Linux distribution makers include tools in their distributions</div><div class='del'>-for setting up PPP connections.  For example, for Red Hat Linux and</div><div class='del'>-derivatives, you should probably use linuxconf or netcfg to set up</div><div class='del'>-your PPP connections.</div><div class='del'>-</div><div class='del'>-The two main windowing environments for Linux, KDE and Gnome, both</div><div class='del'>-come with GUI utilities for configuring and controlling PPP dial-out</div><div class='del'>-connections.  They are convenient and relatively easy to configure.</div><div class='del'>-</div><div class='del'>-A third alternative is to use a PPP front-end package such as wvdial</div><div class='del'>-or ezppp.  These also will handle most of the details of talking to</div><div class='del'>-the modem and setting up the PPP connection for you.</div><div class='del'>-</div><div class='del'>-Assuming that you don't want to use any of these tools, you want to</div><div class='del'>-set up the configuration manually yourself, then read on.  This</div><div class='del'>-document gives a brief description and example.  More details can be</div><div class='del'>-found by reading the pppd and chat man pages and the PPP-HOWTO.</div><div class='del'>-</div><div class='del'>-We assume that you have a modem that uses the Hayes-compatible AT</div><div class='del'>-command set connected to an async serial port (e.g. /dev/ttyS0) and</div><div class='del'>-that you are dialling out to an ISP.  </div><div class='del'>-</div><div class='del'>-The trickiest and most variable part of setting up a dial-out PPP</div><div class='del'>-connection is the part which involves getting the modem to dial and</div><div class='del'>-then invoking PPP service at the far end.  Generally, once both ends</div><div class='del'>-are talking PPP the rest is relatively straightforward.</div><div class='del'>-</div><div class='del'>-Now in fact pppd doesn't know anything about how to get modems to dial</div><div class='del'>-or what you have to say to the system at the far end to get it to talk</div><div class='del'>-PPP.  That's handled by an external program such as chat, specified</div><div class='del'>-with the connect option to pppd.  Chat takes a series of strings to</div><div class='del'>-expect from the modem interleaved with a series of strings to send to</div><div class='del'>-the modem.  See the chat man page for more information.  Here is a</div><div class='del'>-simple example for connecting to an ISP, assuming that the ISP's</div><div class='del'>-system starts talking PPP as soon as it answers the phone:</div><div class='del'>-</div><div class='del'>-pppd connect 'chat -v "" AT OK ATDT5551212 ~' \</div><div class='del'>-	/dev/ttyS0 57600 crtscts debug defaultroute</div><div class='del'>-</div><div class='del'>-Going through pppd's options in order:</div><div class='del'>-    connect 'chat ...'  This gives a command to run to contact the</div><div class='del'>-    PPP server.  Here the supplied 'chat' program is used to dial a</div><div class='del'>-    remote computer.  The whole command is enclosed in single quotes</div><div class='del'>-    because pppd expects a one-word argument for the 'connect' option.</div><div class='del'>-    The options to 'chat' itself are:</div><div class='del'>-</div><div class='del'>-         -v            verbose mode; log what we do to syslog</div><div class='del'>-         ""            don't wait for any prompt, but instead...</div><div class='del'>-	 AT	       send the string "AT"</div><div class='del'>-	 OK	       expect the response "OK", then</div><div class='del'>-         ATDT5551212   dial the modem, then</div><div class='del'>-         ~             wait for a ~ character, indicating the start</div><div class='del'>-		       of a PPP frame from the server</div><div class='del'>-</div><div class='del'>-    /dev/ttyS0	       specifies which serial port the modem is connected to</div><div class='del'>-    57600	       specifies the baud rate to use</div><div class='del'>-    crtscts	       use hardware flow control using the RTS &amp; CTS signals</div><div class='del'>-    debug	       log the PPP negotiation with syslog</div><div class='del'>-    defaultroute       add default network route via the PPP link</div><div class='del'>-</div><div class='del'>-Pppd will write error messages and debugging logs to the syslogd</div><div class='del'>-daemon using the facility name "daemon".  These messages may already</div><div class='del'>-be logged to the console or to a file like /var/log/messages; consult</div><div class='del'>-your /etc/syslog.conf file to see.  If you want to make all pppd</div><div class='del'>-messages go to a file such as /var/log/ppp-debug, add the line</div><div class='del'>-</div><div class='del'>-daemon.*					/var/log/ppp-debug</div><div class='del'>-        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div class='del'>-           This is one or more tabs. Do not use spaces.</div><div class='del'>-</div><div class='del'>-to syslog.conf; make sure to put one or more TAB characters (not</div><div class='del'>-spaces!) between the two fields.  Then you need to create an empty</div><div class='del'>-/var/log/ppp-debug file with a command such as</div><div class='del'>-</div><div class='del'>-	touch /var/log/ppp-debug</div><div class='del'>-</div><div class='del'>-and then restart syslogd, usually by sending it a SIGHUP signal with a</div><div class='del'>-command like this:</div><div class='del'>-</div><div class='del'>-	killall -HUP syslogd</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-4.1 Is the link up?</div><div class='del'>-</div><div class='del'>-The main way to tell if your PPP link is up and operational is the</div><div class='del'>-ifconfig ("interface configuration") command.  Type</div><div class='del'>-</div><div class='del'>-	/sbin/ifconfig</div><div class='del'>-</div><div class='del'>-at a shell prompt.  It should print a list of interfaces including one</div><div class='del'>-like this example:</div><div class='del'>-</div><div class='del'>-ppp0      Link encap Point-to-Point Protocol</div><div class='del'>-          inet addr 192.76.32.3  P-t-P 129.67.1.165  Mask 255.255.255.0</div><div class='del'>-          UP POINTOPOINT RUNNING  MTU 1500  Metric 1</div><div class='del'>-          RX packets 33 errors 0 dropped 0 overrun 0</div><div class='del'>-          TX packets 42 errors 0 dropped 0 overrun 0</div><div class='del'>-</div><div class='del'>-Assuming that ifconfig shows the ppp network interface, you can test</div><div class='del'>-the link using the ping command like this:</div><div class='del'>-</div><div class='del'>-	/sbin/ping -c 3 129.67.1.165</div><div class='del'>-</div><div class='del'>-where the address you give is the address shown as the P-t-P address</div><div class='del'>-in the ifconfig output.  If the link is operating correctly, you</div><div class='del'>-should see output like this:</div><div class='del'>-</div><div class='del'>-  PING 129.67.1.165 (129.67.1.165): 56 data bytes</div><div class='del'>-  64 bytes from 129.67.1.165: icmp_seq=0 ttl=255 time=268 ms</div><div class='del'>-  64 bytes from 129.67.1.165: icmp_seq=1 ttl=255 time=247 ms</div><div class='del'>-  64 bytes from 129.67.1.165: icmp_seq=2 ttl=255 time=266 ms</div><div class='del'>-  --- 129.67.1.165 ping statistics ---</div><div class='del'>-  3 packets transmitted, 3 packets received, 0% packet loss</div><div class='del'>-  round-trip min/avg/max = 247/260/268 ms</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/README.sol2 b/mdk-stage1/ppp/README.sol2<br/>deleted file mode 100644<br/>index 4c862208f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README.sol2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README.sol2</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,220 +0,0 @@</div><div class='del'>-This file describes the installation process for ppp-2.3 on systems</div><div class='del'>-running Solaris 2.  The Solaris 2 and SVR4 ports share a lot of code</div><div class='del'>-but are not identical.  The STREAMS kernel modules and driver for</div><div class='del'>-Solaris 2 are in the svr4 directory (and use some code from the</div><div class='del'>-modules directory).</div><div class='del'>-</div><div class='del'>-NOTE: Although the kernel driver and modules have been designed to</div><div class='del'>-operate correctly on SMP systems, they have not been extensively</div><div class='del'>-tested on SMP machines.  Some users of SMP Solaris x86 systems have</div><div class='del'>-reported system problems apparently linked to the use of previous</div><div class='del'>-versions of this software.  I believe these problems have been fixed.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Installation.</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-1. Run the configure script and make the user-level programs and the</div><div class='del'>-kernel modules.</div><div class='del'>-</div><div class='del'>-	./configure</div><div class='del'>-	make</div><div class='del'>-</div><div class='del'>-If you wish to use gcc (or another compiler) instead of Sun's cc, edit</div><div class='del'>-the svr4/Makedefs file and uncomment the definition of CC.  You can</div><div class='del'>-also change the options passed to the C compiler by editing the COPTS</div><div class='del'>-definition.</div><div class='del'>-</div><div class='del'>-2. Install the programs and kernel modules: as root, do</div><div class='del'>-</div><div class='del'>-	make install</div><div class='del'>-</div><div class='del'>-This installs pppd, chat and pppstats in /usr/local/bin and the kernel</div><div class='del'>-modules in /kernel/drv and /kernel/strmod, and creates the /etc/ppp</div><div class='del'>-directory and populates it with default configuration files.  You can</div><div class='del'>-change the installation directories by editing svr4/Makedefs.</div><div class='del'>-</div><div class='del'>-If your system normally has only one network interface, the default</div><div class='del'>-Solaris 2 system startup scripts will disable IP forwarding in the IP</div><div class='del'>-kernel module.  This will prevent the remote machine from using the</div><div class='del'>-local machine as a gateway to access other hosts.  The solution is to</div><div class='del'>-create an /etc/ppp/ip-up script containing something like this:</div><div class='del'>-</div><div class='del'>-	#!/bin/sh</div><div class='del'>-	/usr/sbin/ndd -set /dev/ip ip_forwarding 1</div><div class='del'>-</div><div class='del'>-See the man page for ip(7p) for details.</div><div class='del'>-</div><div class='del'>-Dynamic STREAMS Re-Plumbing Support.</div><div class='del'>-************************************</div><div class='del'>-</div><div class='del'>-Solaris 8 includes dynamic re-plumbing support. With this, modules</div><div class='del'>-below ip can be inserted, or removed, without having the ip stream be</div><div class='del'>-unplumbed, and re-plumbed again. All states in ip for an interface</div><div class='del'>-will therefore now be preserved. Users can install (or upgrade)</div><div class='del'>-modules like firewall, bandwidth manager, cache manager, tunneling,</div><div class='del'>-etc., without shutting the machine down.</div><div class='del'>-</div><div class='del'>-To support this, ppp driver now uses /dev/udp instead of /dev/ip for</div><div class='del'>-the ip stream. The interface stream (where ip module pushed on top of</div><div class='del'>-ppp) is then I_PLINK'ed below the ip stream. /dev/udp is used because</div><div class='del'>-STREAMS will not let a driver be PLINK'ed under itself, and /dev/ip is</div><div class='del'>-typically the driver at the bottom of the tunneling interfaces</div><div class='del'>-stream.  The mux ids of the ip streams are then added using</div><div class='del'>-SIOCSxIFMUXID ioctl.</div><div class='del'>-</div><div class='del'>-Users will be able to see the modules on the interface stream by, for</div><div class='del'>-example:</div><div class='del'>-</div><div class='del'>-    pikapon% ifconfig ppp modlist</div><div class='del'>-    0 ip</div><div class='del'>-    1 ppp</div><div class='del'>-</div><div class='del'>-Or arbitrarily if bandwidth manager and firewall modules are installed:</div><div class='del'>-</div><div class='del'>-    pikapon% ifconfig hme0 modlist</div><div class='del'>-    0 arp</div><div class='del'>-    1 ip</div><div class='del'>-    2 ipqos</div><div class='del'>-    3 firewall</div><div class='del'>-    4 hme</div><div class='del'>-</div><div class='del'>-Snoop Support.</div><div class='del'>-**************</div><div class='del'>-</div><div class='del'>-This version includes support for /usr/sbin/snoop. Tests has been done</div><div class='del'>-on both Solaris 7 and 8. Only IPv4 and IPv6 packets will be sent up to</div><div class='del'>-stream(s) marked as promiscuous, e.g, snoop et al.</div><div class='del'>-</div><div class='del'>-Users will be able to see the packets on the ppp interface by, for example:</div><div class='del'>-</div><div class='del'>-    snoop -d ppp0</div><div class='del'>-</div><div class='del'>-See the man page for snoop(1M) for details.</div><div class='del'>-</div><div class='del'>-IPv6 Support.</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-This is for Solaris 8 and later.</div><div class='del'>-</div><div class='del'>-This version has been tested under Solaris 8 running IPv6. As of now,</div><div class='del'>-interoperability testing has only been done between Solaris machines</div><div class='del'>-in terms of the IPV6 NCP. An additional command line option for the</div><div class='del'>-pppd daemon has been added: ipv6cp-use-persistent.</div><div class='del'>-</div><div class='del'>-By default, compilation for IPv6 support is not enabled.  Uncomment</div><div class='del'>-the necessary lines in pppd/Makefile.sol2 to enable it. Once done, the</div><div class='del'>-quickest way to get IPv6 running is to add the following somewhere in</div><div class='del'>-the command line option:</div><div class='del'>-</div><div class='del'>-	+ipv6 ipv6cp-use-persistent</div><div class='del'>-</div><div class='del'>-The persistent id for the link-local address was added to conform to</div><div class='del'>-RFC 2472; such that if there's an EUI-48 available, use that to make</div><div class='del'>-up the EUI-64.  As of now, the Solaris implementation extracts the</div><div class='del'>-EUI-48 id from the Ethernet's MAC address (the ethernet interface</div><div class='del'>-needs to be up).  Future works might support other ways of obtaining a</div><div class='del'>-unique yet persistent id, such as EEPROM serial numbers, etc.</div><div class='del'>-</div><div class='del'>-There need not be any up/down scripts for ipv6, e.g. /etc/ppp/ipv6-up</div><div class='del'>-or /etc/ppp/ipv6-down, to trigger IPv6 neighbor discovery for auto</div><div class='del'>-configuration and routing.  The in.ndpd daemon will perform all of the</div><div class='del'>-necessary jobs in the background. /etc/inet/ndpd.conf can be further</div><div class='del'>-customized to enable the machine as an IPv6 router. See the man page</div><div class='del'>-for in.ndpd(1M) and ndpd.conf(4) for details.</div><div class='del'>-</div><div class='del'>-Below is a sample output of "ifconfig -a" with persistent link-local</div><div class='del'>-address.  Note the UNNUMBERED flag is set because hme0 and ppp0 both</div><div class='del'>-have identical link-local IPv6 addresses:</div><div class='del'>-</div><div class='del'>-lo0: flags=1000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4&gt; mtu 8232 index 1</div><div class='del'>-        inet 127.0.0.1 netmask ff000000 </div><div class='del'>-hme0: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2</div><div class='del'>-        inet 129.146.86.248 netmask ffffff00 broadcast 129.146.86.255</div><div class='del'>-        ether 8:0:20:8d:38:c1 </div><div class='del'>-lo0: flags=2000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv6&gt; mtu 8252 index 1</div><div class='del'>-        inet6 ::1/128 </div><div class='del'>-hme0: flags=2000841&lt;UP,RUNNING,MULTICAST,IPv6&gt; mtu 1500 index 2</div><div class='del'>-        ether 8:0:20:8d:38:c1 </div><div class='del'>-        inet6 fe80::a00:20ff:fe8d:38c1/10 </div><div class='del'>-hme0:1: flags=2080841&lt;UP,RUNNING,MULTICAST,ADDRCONF,IPv6&gt; mtu 1500 index 2</div><div class='del'>-        inet6 fec0::56:a00:20ff:fe8d:38c1/64 </div><div class='del'>-hme0:2: flags=2080841&lt;UP,RUNNING,MULTICAST,ADDRCONF,IPv6&gt; mtu 1500 index 2</div><div class='del'>-        inet6 2000::56:a00:20ff:fe8d:38c1/64 </div><div class='del'>-hme0:3: flags=2080841&lt;UP,RUNNING,MULTICAST,ADDRCONF,IPv6&gt; mtu 1500 index 2</div><div class='del'>-        inet6 2::56:a00:20ff:fe8d:38c1/64 </div><div class='del'>-ppp0: flags=10008d1&lt;UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4&gt; mtu 1500 index 12</div><div class='del'>-        inet 172.16.1.1 --&gt; 172.16.1.2 netmask ffffff00 </div><div class='del'>-ppp0: flags=2202851&lt;UP,POINTOPOINT,RUNNING,MULTICAST,UNNUMBERED,NONUD,IPv6&gt; mtu 1500 index 12</div><div class='del'>-        inet6 fe80::a00:20ff:fe8d:38c1/10 --&gt; fe80::a00:20ff:fe7a:24fb</div><div class='del'>-</div><div class='del'>-Note also that a plumbed ipv6 interface stream will exist throughout</div><div class='del'>-the entire PPP session in the case where the peer rejects IPV6CP,</div><div class='del'>-which further causes the interface state to stay down. Unplumbing will</div><div class='del'>-happen when the daemon exits. This is done by design and is not a bug.</div><div class='del'>-</div><div class='del'>-64-bit Support.</div><div class='del'>-***************</div><div class='del'>-</div><div class='del'>-This version has been tested under Solaris 7 (and Solaris 8 ) in both</div><div class='del'>-32- and 64-bits environments (Ultra class machines).  Installing the</div><div class='del'>-package by executing "make install" will result in additional files</div><div class='del'>-residing in /kernel/drv/sparcv9 and /kernel/strmod/sparcv9</div><div class='del'>-subdirectories.</div><div class='del'>-</div><div class='del'>-64-bit modules and driver have been compiled and tested using Sun's cc.</div><div class='del'>-</div><div class='del'>-Synchronous Serial Support.</div><div class='del'>-***************************</div><div class='del'>-</div><div class='del'>-This version has working but limited support for the on-board</div><div class='del'>-synchronous HDLC interfaces. It has been tested with the /dev/se_hdlc</div><div class='del'>-and /dev/zsh drivers.  Synchronous mode was tested with a Cisco</div><div class='del'>-router.</div><div class='del'>-</div><div class='del'>-There ppp daemon does not directly support controlling the serial</div><div class='del'>-interface.  It relies on the /usr/sbin/syncinit command to initialize</div><div class='del'>-HDLC mode and clocking.</div><div class='del'>-</div><div class='del'>-Some bugs remain: large sized frames are not sent/received properly,</div><div class='del'>-and may be related to the IP mtu.  This may be due to bugs in pppd</div><div class='del'>-itself, bugs in Solaris or the serial drivers.  The /dev/zsh driver</div><div class='del'>-seems more larger and can send/receive larger frames than the</div><div class='del'>-/dev/se_hdlc driver. There is a confirmed bug with NRZ/NRZI mode in</div><div class='del'>-the /dev/se_hdlc driver, and Solaris patch 104596-11 is needed to</div><div class='del'>-correct it. (However this patch seems to introduce other serial</div><div class='del'>-problems. If you don't apply the patch, the workaround is to change</div><div class='del'>-the nrzi mode to yes or no, whichever works)</div><div class='del'>-</div><div class='del'>-How to start pppd with synchronous support:</div><div class='del'>-</div><div class='del'>-#!/bin/sh</div><div class='del'>-</div><div class='del'>-local=1.1.1.1   # your ip address here</div><div class='del'>-baud=38400	# needed, but ignored by serial driver</div><div class='del'>-</div><div class='del'>-# Change to the correct serial driver/port</div><div class='del'>-#dev=/dev/zsh0</div><div class='del'>-dev=/dev/se_hdlc0</div><div class='del'>- </div><div class='del'>-# Change the driver, nrzi mode, speed and clocking to match your setup</div><div class='del'>-# This configuration is for external clocking from the DCE</div><div class='del'>-connect="syncinit se_hdlc0 nrzi=no speed=64000 txc=rxc rxc=rxc"</div><div class='del'>- </div><div class='del'>-/usr/sbin/pppd $dev sync $baud novj noauth $local: connect "$connect"</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Sample Cisco router config excerpt:</div><div class='del'>-</div><div class='del'>-!</div><div class='del'>-! Cisco router setup as DCE with RS-232 DCE cable</div><div class='del'>-! </div><div class='del'>-!         </div><div class='del'>-interface Serial0</div><div class='del'>- ip address 1.1.1.2 255.255.255.0</div><div class='del'>- encapsulation ppp</div><div class='del'>- clockrate 64000</div><div class='del'>- no nrzi-encoding</div><div class='del'>- no shutdown</div><div class='del'>-!         </div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/README.sunos4 b/mdk-stage1/ppp/README.sunos4<br/>deleted file mode 100644<br/>index b48aec377..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/README.sunos4?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/README.sunos4</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,62 +0,0 @@</div><div class='del'>-This file describes the installation process for ppp-2.3 on systems</div><div class='del'>-running SunOS 4.1.x (or the equivalent).</div><div class='del'>-</div><div class='del'>-The STREAMS modules in the sunos4 directory provide kernel support for</div><div class='del'>-PPP on SunOS 4.1.x systems.  They have been tested under SunOS 4.1.3</div><div class='del'>-on a SparcStation 1+.  They should work under earlier SunOS 4.1.x</div><div class='del'>-systems, but no guarantees are given.</div><div class='del'>-</div><div class='del'>-These modules are designed to be loaded into the running kernel using</div><div class='del'>-the `modload' command.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-Installation.</div><div class='del'>-*************</div><div class='del'>-</div><div class='del'>-1. Run the configure script and make the user-level programs and the</div><div class='del'>-kernel modules.</div><div class='del'>-</div><div class='del'>-	./configure</div><div class='del'>-	make</div><div class='del'>-</div><div class='del'>-If you wish to compile using gcc instead of cc, edit the</div><div class='del'>-sunos4/Makedefs file and uncomment the line saying "CC = gcc".  You</div><div class='del'>-can also change the C compiler options by editing the COPTS</div><div class='del'>-definition.</div><div class='del'>-</div><div class='del'>-2. Install the pppd, pppstats and chat programs and the loadable</div><div class='del'>-module object files (you need to be root to do this):</div><div class='del'>-</div><div class='del'>-	make install</div><div class='del'>-</div><div class='del'>-By default, the programs and the loadable module object files go into</div><div class='del'>-/usr/local/etc.  Doing `make install' also copies a script called</div><div class='del'>-ppp.INSTALL into /dev, and makes ppp.LOAD, ppp.UNLOAD, ppp.MKDEV and</div><div class='del'>-ppp.RMDEV links to it.  You can change the installation directories by</div><div class='del'>-editing sunos4/Makedefs.</div><div class='del'>-</div><div class='del'>-3. Load the ppp modules (you need to be root for this too):</div><div class='del'>-</div><div class='del'>-	/dev/ppp.LOAD</div><div class='del'>-</div><div class='del'>-You will want to do this in your /etc/rc.local file once you have</div><div class='del'>-everything installed.  I suggest you put something like the following</div><div class='del'>-in /etc/rc.local (or /etc/loadable, if you have one):</div><div class='del'>-</div><div class='del'>-	if [ -f /dev/ppp.AUTOLOAD ]; then</div><div class='del'>-		/dev/ppp.LOAD</div><div class='del'>-	fi</div><div class='del'>-</div><div class='del'>-and then create a /dev/ppp.AUTOLOAD file with the command</div><div class='del'>-</div><div class='del'>-	touch /dev/ppp.AUTOLOAD</div><div class='del'>-</div><div class='del'>-It is not advisable to unload the "if_ppp" module, because it creates</div><div class='del'>-network interface units, and SunOS does not provide any way to destroy</div><div class='del'>-network interfaces once created.  If you do unload it, the system will</div><div class='del'>-probably crash at some later stage.</div><div class='del'>-</div><div class='del'>-If you have previously had ppp-2.2 installed, you may have statements</div><div class='del'>-in your /etc/rc.local to load the ppp module.  You will need to remove</div><div class='del'>-those.  Having done this, you will need to reboot to remove the old</div><div class='del'>-ppp module and load the new modules.</div><div class='head'>diff --git a/mdk-stage1/ppp/SETUP b/mdk-stage1/ppp/SETUP<br/>deleted file mode 100644<br/>index fb28a2138..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/SETUP?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/SETUP</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,111 +0,0 @@</div><div class='del'>-		Configuring a PPP link.</div><div class='del'>-</div><div class='del'>-After you have compiled and installed this package, there are some</div><div class='del'>-configuration files which will generally need to be set up.  The</div><div class='del'>-pppd(8) man page is the best reference for the full details; this file</div><div class='del'>-outlines the configuration process for the most common case, where</div><div class='del'>-this package is being used to enable a machine to dial an ISP and</div><div class='del'>-connect to the internet.  The FAQ and README.linux files also provide</div><div class='del'>-useful information about setting up PPP.</div><div class='del'>-</div><div class='del'>-Dialling an ISP.</div><div class='del'>-****************</div><div class='del'>-</div><div class='del'>-Usually, an ISP will assign an IP address to your machine, and will</div><div class='del'>-refuse to authenticate itself to you.  Some ISPs require a username</div><div class='del'>-and password to be entered before PPP service commences, while others</div><div class='del'>-use PPP authentication (using either the PAP or CHAP protocols).</div><div class='del'>-</div><div class='del'>-The recommended way to set up to dial an ISP is for the system</div><div class='del'>-administrator to create a file under /etc/ppp/peers, named for the ISP</div><div class='del'>-that you will be dialling.  For example, suppose the file is called</div><div class='del'>-/etc/ppp/peers/isp.  This file would contain something like this:</div><div class='del'>-</div><div class='del'>-cua0		# modem is connected to /dev/cua0</div><div class='del'>-38400		# run the serial port at 38400 baud</div><div class='del'>-crtscts		# use hardware flow control</div><div class='del'>-noauth		# don't require the ISP to authenticate itself</div><div class='del'>-defaultroute	# use the ISP as our default route</div><div class='del'>-connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'</div><div class='del'>-</div><div class='del'>-If there are any other pppd options that should apply when calling</div><div class='del'>-this ISP, they can also be placed in this file.</div><div class='del'>-</div><div class='del'>-The /etc/ppp/chat-isp file named in the last line contains the script</div><div class='del'>-for chat(8) to use to dial the ISP and go through any username/</div><div class='del'>-password authentication required before PPP service starts.  Here is</div><div class='del'>-an example (for dialling an Annex terminal server):</div><div class='del'>-</div><div class='del'>-ABORT "NO CARRIER"</div><div class='del'>-ABORT "NO DIALTONE"</div><div class='del'>-ABORT "ERROR"</div><div class='del'>-ABORT "NO ANSWER"</div><div class='del'>-ABORT "BUSY"</div><div class='del'>-ABORT "Username/Password Incorrect"</div><div class='del'>-"" "at"</div><div class='del'>-OK "at&amp;d2&amp;c1"</div><div class='del'>-OK "atdt2479381"</div><div class='del'>-"name:" "^Uusername"</div><div class='del'>-"word:" "\qpassword"</div><div class='del'>-"annex" "ppp"</div><div class='del'>-"Switching to PPP-ppp-Switching to PPP"</div><div class='del'>-</div><div class='del'>-See the chat(8) man page for details of the script.  If you are not</div><div class='del'>-sure how the initial dialog with your ISP will go, you could use</div><div class='del'>-a terminal emulator such as kermit or minicom to go through the</div><div class='del'>-process manually.</div><div class='del'>-</div><div class='del'>-If your ISP requires PAP or CHAP authentication, you will have to</div><div class='del'>-create a line in /etc/ppp/pap-secrets or /etc/ppp/chap-secrets like</div><div class='del'>-this:</div><div class='del'>-</div><div class='del'>-myhostname	*	"password"</div><div class='del'>-</div><div class='del'>-(Replace myhostname with the hostname of your machine.)</div><div class='del'>-</div><div class='del'>-At this point, you can initiate the link with the command:</div><div class='del'>-</div><div class='del'>-/usr/sbin/pppd call isp</div><div class='del'>-</div><div class='del'>-(N.B.: pppd might be installed in a different directory on some</div><div class='del'>-systems).</div><div class='del'>-</div><div class='del'>-This will return to the shell prompt immediately, as pppd will detach</div><div class='del'>-itself from its controlling terminal.  (If you don't want it to do</div><div class='del'>-this, use the "nodetach" option.)</div><div class='del'>-</div><div class='del'>-Pppd will log messages describing the progress of the connection and</div><div class='del'>-any errors using the syslog facility (see the syslogd(8) and</div><div class='del'>-syslog.conf(5) man pages).  Pppd issues messages using syslog facility</div><div class='del'>-daemon (or local2 if it has been compiled with debugging enabled);</div><div class='del'>-chat uses facility local2.  It is often useful to see messages of</div><div class='del'>-priority notice or higher on the console.  To see these, find the line</div><div class='del'>-in /etc/syslog.conf which has /dev/console on the right-hand side, and</div><div class='del'>-add `daemon.notice' on the left.  This line should end up something</div><div class='del'>-like this:</div><div class='del'>-</div><div class='del'>-*.err;kern.debug;daemon,local2,auth.notice;mail.crit	/dev/console</div><div class='del'>-</div><div class='del'>-If you want to see more messages from pppd, request messages of</div><div class='del'>-priority info or higher for facility daemon, like this:</div><div class='del'>-</div><div class='del'>-*.err;kern.debug;daemon.info;local2,auth.notice;mail.crit  /dev/console</div><div class='del'>-</div><div class='del'>-It is also useful to add a line like this:</div><div class='del'>-</div><div class='del'>-daemon,local2.debug		/etc/ppp/ppp-log</div><div class='del'>-</div><div class='del'>-If you do this, you will need to create an empty /etc/ppp/ppp-log</div><div class='del'>-file.</div><div class='del'>-</div><div class='del'>-After modifying syslog.conf, you will then need to send a HUP signal</div><div class='del'>-to syslogd (or reboot).</div><div class='del'>-</div><div class='del'>-When you wish terminate the PPP link, you should send a TERM or INTR</div><div class='del'>-signal to pppd.  Pppd writes its process ID to a file called</div><div class='del'>-ppp&lt;n&gt;.pid in /var/run (or /etc/ppp on older systems such as SunOS or</div><div class='del'>-Ultrix).  Here &lt;n&gt; is the PPP interface unit number, which will be 0</div><div class='del'>-unless you have more than one PPP link running simultaneously.  Thus</div><div class='del'>-you can terminate the link with a command like</div><div class='del'>-</div><div class='del'>-	kill `cat /var/run/ppp0.pid`</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/Makefile.linux b/mdk-stage1/ppp/chat/Makefile.linux<br/>deleted file mode 100644<br/>index 586cbd876..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/Makefile.linux?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/Makefile.linux</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#	$Id$</div><div class='del'>-</div><div class='del'>-CDEF1=	-DTERMIOS			# Use the termios structure</div><div class='del'>-CDEF2=	-DSIGTYPE=void			# Standard definition</div><div class='del'>-CDEF3=	-UNO_SLEEP			# Use the usleep function</div><div class='del'>-CDEF4=	-DFNDELAY=O_NDELAY		# Old name value</div><div class='del'>-CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)</div><div class='del'>-</div><div class='del'>-CFLAGS=	$(RPM_OPT_FLAGS) $(CDEFS)</div><div class='del'>-</div><div class='del'>-INSTALL= install</div><div class='del'>-</div><div class='del'>-all:	chat</div><div class='del'>-</div><div class='del'>-chat:	chat.o</div><div class='del'>-	$(CC) -o chat chat.o</div><div class='del'>-</div><div class='del'>-chat.o:	chat.c</div><div class='del'>-	$(CC) -c $(CFLAGS) -o chat.o chat.c</div><div class='del'>-</div><div class='del'>-install: chat</div><div class='del'>-	mkdir -p $(BINDIR)</div><div class='del'>-	$(INSTALL) -s -c chat $(BINDIR)</div><div class='del'>-	$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f chat.o chat *~</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/Makefile.linux.makeopt b/mdk-stage1/ppp/chat/Makefile.linux.makeopt<br/>deleted file mode 100644<br/>index 974680a93..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/Makefile.linux.makeopt?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/Makefile.linux.makeopt</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#	$Id$</div><div class='del'>-</div><div class='del'>-CDEF1=	-DTERMIOS			# Use the termios structure</div><div class='del'>-CDEF2=	-DSIGTYPE=void			# Standard definition</div><div class='del'>-CDEF3=	-UNO_SLEEP			# Use the usleep function</div><div class='del'>-CDEF4=	-DFNDELAY=O_NDELAY		# Old name value</div><div class='del'>-CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)</div><div class='del'>-</div><div class='del'>-CFLAGS=	-O2 -g -pipe $(CDEFS)</div><div class='del'>-</div><div class='del'>-INSTALL= install</div><div class='del'>-</div><div class='del'>-all:	chat</div><div class='del'>-</div><div class='del'>-chat:	chat.o</div><div class='del'>-	$(CC) -o chat chat.o</div><div class='del'>-</div><div class='del'>-chat.o:	chat.c</div><div class='del'>-	$(CC) -c $(CFLAGS) -o chat.o chat.c</div><div class='del'>-</div><div class='del'>-install: chat</div><div class='del'>-	mkdir -p $(BINDIR)</div><div class='del'>-	$(INSTALL) -s -c chat $(BINDIR)</div><div class='del'>-	$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f chat.o chat *~</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/Makefile.sol2 b/mdk-stage1/ppp/chat/Makefile.sol2<br/>deleted file mode 100644<br/>index f566cc68b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/Makefile.sol2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/Makefile.sol2</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# Makefile for chat on Solaris 2</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-include ../solaris/Makedefs</div><div class='del'>-</div><div class='del'>-CFLAGS = $(COPTS) -DNO_USLEEP -DSOL2</div><div class='del'>-</div><div class='del'>-all:	chat</div><div class='del'>-</div><div class='del'>-chat: chat.o</div><div class='del'>-	$(CC) -o chat chat.o</div><div class='del'>-</div><div class='del'>-install: chat</div><div class='del'>-	$(INSTALL) -f $(BINDIR) chat</div><div class='del'>-	$(INSTALL) -m 444 -f $(MANDIR)/man8 chat.8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *~ *.o chat</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/Makefile.sunos4 b/mdk-stage1/ppp/chat/Makefile.sunos4<br/>deleted file mode 100644<br/>index b3507360e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/Makefile.sunos4</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# Makefile for chat on suns</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-include ../sunos4/Makedefs</div><div class='del'>-</div><div class='del'>-CFLAGS = -DSUNOS $(COPTS)</div><div class='del'>-</div><div class='del'>-all:	chat</div><div class='del'>-</div><div class='del'>-chat: chat.o</div><div class='del'>-	$(CC) -o chat chat.o</div><div class='del'>-</div><div class='del'>-install: chat</div><div class='del'>-	$(INSTALL) -c chat $(BINDIR)/chat</div><div class='del'>-	$(INSTALL) -c -m 444 chat.8 $(MANDIR)/man8/chat.8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *~ *.o chat</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/chat.8 b/mdk-stage1/ppp/chat/chat.8<br/>deleted file mode 100644<br/>index 8d2029609..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/chat.8?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/chat.8</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,515 +0,0 @@</div><div class='del'>-.\" -*- nroff -*-</div><div class='del'>-.\" manual page [] for chat 1.8</div><div class='del'>-.\" $Id$</div><div class='del'>-.\" SH section heading</div><div class='del'>-.\" SS subsection heading</div><div class='del'>-.\" LP paragraph</div><div class='del'>-.\" IP indented paragraph</div><div class='del'>-.\" TP hanging label</div><div class='del'>-.TH CHAT 8 "22 May 1999" "Chat Version 1.22"</div><div class='del'>-.SH NAME</div><div class='del'>-chat \- Automated conversational script with a modem</div><div class='del'>-.SH SYNOPSIS</div><div class='del'>-.B chat</div><div class='del'>-[</div><div class='del'>-.I options</div><div class='del'>-]</div><div class='del'>-.I script</div><div class='del'>-.SH DESCRIPTION</div><div class='del'>-.LP</div><div class='del'>-The \fIchat\fR program defines a conversational exchange between the</div><div class='del'>-computer and the modem. Its primary purpose is to establish the</div><div class='del'>-connection between the Point-to-Point Protocol Daemon (\fIpppd\fR) and</div><div class='del'>-the remote's \fIpppd\fR process.</div><div class='del'>-.SH OPTIONS</div><div class='del'>-.TP</div><div class='del'>-.B -f \fI&lt;chat file&gt;</div><div class='del'>-Read the chat script from the chat \fIfile\fR. The use of this option</div><div class='del'>-is mutually exclusive with the chat script parameters. The user must</div><div class='del'>-have read access to the file. Multiple lines are permitted in the</div><div class='del'>-file. Space or horizontal tab characters should be used to separate</div><div class='del'>-the strings.</div><div class='del'>-.TP</div><div class='del'>-.B -t \fI&lt;timeout&gt;</div><div class='del'>-Set the timeout for the expected string to be received. If the string</div><div class='del'>-is not received within the time limit then the reply string is not</div><div class='del'>-sent. An alternate reply may be sent or the script will fail if there</div><div class='del'>-is no alternate reply string. A failed script will cause the</div><div class='del'>-\fIchat\fR program to terminate with a non-zero error code.</div><div class='del'>-.TP</div><div class='del'>-.B -r \fI&lt;report file&gt;</div><div class='del'>-Set the file for output of the report strings. If you use the keyword</div><div class='del'>-\fIREPORT\fR, the resulting strings are written to this file. If this</div><div class='del'>-option is not used and you still use \fIREPORT\fR keywords, the</div><div class='del'>-\fIstderr\fR file is used for the report strings.</div><div class='del'>-.TP</div><div class='del'>-.B -e</div><div class='del'>-Start with the echo option turned on. Echoing may also be turned on</div><div class='del'>-or off at specific points in the chat script by using the \fIECHO\fR</div><div class='del'>-keyword. When echoing is enabled, all output from the modem is echoed</div><div class='del'>-to \fIstderr\fR.</div><div class='del'>-.TP</div><div class='del'>-.B -E</div><div class='del'>-Enables environment variable substituion within chat scripts using the</div><div class='del'>-standard \fI$xxx\fR syntax.</div><div class='del'>-.TP</div><div class='del'>-.B -v</div><div class='del'>-Request that the \fIchat\fR script be executed in a verbose mode. The</div><div class='del'>-\fIchat\fR program will then log the execution state of the chat</div><div class='del'>-script as well as all text received from the modem and the output</div><div class='del'>-strings sent to the modem.  The default is to log through the SYSLOG;</div><div class='del'>-the logging method may be altered with the -S and -s flags.</div><div class='del'>-.TP</div><div class='del'>-.B -V</div><div class='del'>-Request that the \fIchat\fR script be executed in a stderr verbose</div><div class='del'>-mode. The \fIchat\fR program will then log all text received from the</div><div class='del'>-modem and the output strings sent to the modem to the stderr device. This</div><div class='del'>-device is usually the local console at the station running the chat or</div><div class='del'>-pppd program.</div><div class='del'>-.TP</div><div class='del'>-.B -s</div><div class='del'>-Use stderr.  All log messages from '-v' and all error messages will be</div><div class='del'>-sent to stderr.</div><div class='del'>-.TP</div><div class='del'>-.B -S</div><div class='del'>-Do not use the SYSLOG.  By default, error messages are sent to the</div><div class='del'>-SYSLOG.  The use of -S will prevent both log messages from '-v' and</div><div class='del'>-error messages from being sent to the SYSLOG.</div><div class='del'>-.TP</div><div class='del'>-.B -T \fI&lt;phone number&gt;</div><div class='del'>-Pass in an arbitary string, usually a phone number, that will be</div><div class='del'>-substituted for the \\T substitution metacharacter in a send string.</div><div class='del'>-.TP</div><div class='del'>-.B -U \fI&lt;phone number 2&gt;</div><div class='del'>-Pass in a second string, usually a phone number, that will be</div><div class='del'>-substituted for the \\U substitution metacharacter in a send string.</div><div class='del'>-This is useful when dialing an ISDN terminal adapter that requires two </div><div class='del'>-numbers.</div><div class='del'>-.TP</div><div class='del'>-.B script</div><div class='del'>-If the script is not specified in a file with the \fI-f\fR option then</div><div class='del'>-the script is included as parameters to the \fIchat\fR program.</div><div class='del'>-.SH CHAT SCRIPT</div><div class='del'>-.LP</div><div class='del'>-The \fIchat\fR script defines the communications.</div><div class='del'>-.LP</div><div class='del'>-A script consists of one or more "expect-send" pairs of strings,</div><div class='del'>-separated by spaces, with an optional "subexpect-subsend" string pair,</div><div class='del'>-separated by a dash as in the following example:</div><div class='del'>-.IP</div><div class='del'>-ogin:-BREAK-ogin: ppp ssword: hello2u2</div><div class='del'>-.LP</div><div class='del'>-This line indicates that the \fIchat\fR program should expect the string</div><div class='del'>-"ogin:". If it fails to receive a login prompt within the time interval</div><div class='del'>-allotted, it is to send a break sequence to the remote and then expect the</div><div class='del'>-string "ogin:". If the first "ogin:" is received then the break sequence is</div><div class='del'>-not generated.</div><div class='del'>-.LP</div><div class='del'>-Once it received the login prompt the \fIchat\fR program will send the</div><div class='del'>-string ppp and then expect the prompt "ssword:". When it receives the</div><div class='del'>-prompt for the password, it will send the password hello2u2.</div><div class='del'>-.LP</div><div class='del'>-A carriage return is normally sent following the reply string. It is not</div><div class='del'>-expected in the "expect" string unless it is specifically requested by using</div><div class='del'>-the \\r character sequence.</div><div class='del'>-.LP</div><div class='del'>-The expect sequence should contain only what is needed to identify the</div><div class='del'>-string. Since it is normally stored on a disk file, it should not contain</div><div class='del'>-variable information. It is generally not acceptable to look for time</div><div class='del'>-strings, network identification strings, or other variable pieces of data as</div><div class='del'>-an expect string.</div><div class='del'>-.LP</div><div class='del'>-To help correct for characters which may be corrupted during the initial</div><div class='del'>-sequence, look for the string "ogin:" rather than "login:". It is possible</div><div class='del'>-that the leading "l" character may be received in error and you may never</div><div class='del'>-find the string even though it was sent by the system. For this reason,</div><div class='del'>-scripts look for "ogin:" rather than "login:" and "ssword:" rather than</div><div class='del'>-"password:".</div><div class='del'>-.LP</div><div class='del'>-A very simple script might look like this:</div><div class='del'>-.IP</div><div class='del'>-ogin: ppp ssword: hello2u2</div><div class='del'>-.LP</div><div class='del'>-In other words, expect ....ogin:, send ppp, expect ...ssword:, send hello2u2.</div><div class='del'>-.LP</div><div class='del'>-In actual practice, simple scripts are rare. At the vary least, you</div><div class='del'>-should include sub-expect sequences should the original string not be</div><div class='del'>-received. For example, consider the following script:</div><div class='del'>-.IP</div><div class='del'>-ogin:--ogin: ppp ssword: hello2u2</div><div class='del'>-.LP</div><div class='del'>-This would be a better script than the simple one used earlier. This would look</div><div class='del'>-for the same login: prompt, however, if one was not received, a single</div><div class='del'>-return sequence is sent and then it will look for login: again. Should line</div><div class='del'>-noise obscure the first login prompt then sending the empty line will</div><div class='del'>-usually generate a login prompt again.</div><div class='del'>-.SH COMMENTS</div><div class='del'>-Comments can be embedded in the chat script. A comment is a line which</div><div class='del'>-starts with the \fB#\fR (hash) character in column 1. Such comment</div><div class='del'>-lines are just ignored by the chat program. If a '#' character is to</div><div class='del'>-be expected as the first character of the expect sequence, you should</div><div class='del'>-quote the expect string.</div><div class='del'>-If you want to wait for a prompt that starts with a # (hash)</div><div class='del'>-character, you would have to write something like this:</div><div class='del'>-.IP</div><div class='del'>-# Now wait for the prompt and send logout string</div><div class='del'>-.br</div><div class='del'>-\'# ' logout</div><div class='del'>-.LP</div><div class='del'>-</div><div class='del'>-.SH SENDING DATA FROM A FILE</div><div class='del'>-If the string to send starts with an at sign (@), the rest of the</div><div class='del'>-string is taken to be the name of a file to read to get the string to</div><div class='del'>-send.  If the last character of the data read is a newline, it is</div><div class='del'>-removed.  The file can be a named pipe (or fifo) instead of a regular</div><div class='del'>-file.  This provides a way for \fBchat\fR to communicate with another</div><div class='del'>-program, for example, a program to prompt the user and receive a</div><div class='del'>-password typed in.</div><div class='del'>-.LP</div><div class='del'>-</div><div class='del'>-.SH ABORT STRINGS</div><div class='del'>-Many modems will report the status of the call as a string. These</div><div class='del'>-strings may be \fBCONNECTED\fR or \fBNO CARRIER\fR or \fBBUSY\fR. It</div><div class='del'>-is often desirable to terminate the script should the modem fail to</div><div class='del'>-connect to the remote. The difficulty is that a script would not know</div><div class='del'>-exactly which modem string it may receive. On one attempt, it may</div><div class='del'>-receive \fBBUSY\fR while the next time it may receive \fBNO CARRIER\fR.</div><div class='del'>-.LP</div><div class='del'>-These "abort" strings may be specified in the script using the \fIABORT\fR</div><div class='del'>-sequence. It is written in the script as in the following example:</div><div class='del'>-.IP</div><div class='del'>-ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT</div><div class='del'>-.LP</div><div class='del'>-This sequence will expect nothing; and then send the string ATZ. The</div><div class='del'>-expected response to this is the string \fIOK\fR. When it receives \fIOK\fR,</div><div class='del'>-the string ATDT5551212 to dial the telephone. The expected string is</div><div class='del'>-\fICONNECT\fR. If the string \fICONNECT\fR is received the remainder of the</div><div class='del'>-script is executed. However, should the modem find a busy telephone, it will</div><div class='del'>-send the string \fIBUSY\fR. This will cause the string to match the abort</div><div class='del'>-character sequence. The script will then fail because it found a match to</div><div class='del'>-the abort string. If it received the string \fINO CARRIER\fR, it will abort</div><div class='del'>-for the same reason. Either string may be received. Either string will</div><div class='del'>-terminate the \fIchat\fR script.</div><div class='del'>-.SH CLR_ABORT STRINGS</div><div class='del'>-This sequence allows for clearing previously set \fBABORT\fR strings.</div><div class='del'>-\fBABORT\fR strings are kept in an array of a pre-determined size (at</div><div class='del'>-compilation time); \fBCLR_ABORT\fR will reclaim the space for cleared</div><div class='del'>-entries so that new strings can use that space.</div><div class='del'>-.SH SAY STRINGS</div><div class='del'>-The \fBSAY\fR directive allows the script to send strings to the user</div><div class='del'>-at the terminal via standard error.  If \fBchat\fR is being run by</div><div class='del'>-pppd, and pppd is running as a daemon (detached from its controlling</div><div class='del'>-terminal), standard error will normally be redirected to the file</div><div class='del'>-/etc/ppp/connect-errors.</div><div class='del'>-.LP</div><div class='del'>-\fBSAY\fR strings must be enclosed in single or double quotes. If</div><div class='del'>-carriage return and line feed are needed in the string to be output,</div><div class='del'>-you must explicitely add them to your string.</div><div class='del'>-.LP</div><div class='del'>-The SAY strings could be used to give progress messages in sections of</div><div class='del'>-the script where you want to have 'ECHO OFF' but still let the user</div><div class='del'>-know what is happening.  An example is:</div><div class='del'>-.IP</div><div class='del'>-ABORT BUSY </div><div class='del'>-.br</div><div class='del'>-ECHO OFF </div><div class='del'>-.br</div><div class='del'>-SAY "Dialling your ISP...\\n" </div><div class='del'>-.br</div><div class='del'>-\'' ATDT5551212 </div><div class='del'>-.br</div><div class='del'>-TIMEOUT 120</div><div class='del'>-.br</div><div class='del'>-SAY "Waiting up to 2 minutes for connection ... "</div><div class='del'>-.br</div><div class='del'>-CONNECT '' </div><div class='del'>-.br</div><div class='del'>-SAY "Connected, now logging in ...\n"</div><div class='del'>-.br</div><div class='del'>-ogin: account</div><div class='del'>-.br</div><div class='del'>-ssword: pass</div><div class='del'>-.br</div><div class='del'>-$ \c</div><div class='del'>-SAY "Logged in OK ...\n"</div><div class='del'>-\fIetc ...\fR</div><div class='del'>-.LP</div><div class='del'>-This sequence will only present the SAY strings to the user and all</div><div class='del'>-the details of the script will remain hidden. For example, if the</div><div class='del'>-above script works, the user will see:</div><div class='del'>-.IP</div><div class='del'>-Dialling your ISP...</div><div class='del'>-.br</div><div class='del'>-Waiting up to 2 minutes for connection ... Connected, now logging in ...</div><div class='del'>-.br</div><div class='del'>-Logged in OK ...</div><div class='del'>-.LP</div><div class='del'>-</div><div class='del'>-.SH REPORT STRINGS</div><div class='del'>-A \fBreport\fR string is similar to the ABORT string. The difference</div><div class='del'>-is that the strings, and all characters to the next control character</div><div class='del'>-such as a carriage return, are written to the report file.</div><div class='del'>-.LP</div><div class='del'>-The report strings may be used to isolate the transmission rate of the</div><div class='del'>-modem's connect string and return the value to the chat user. The</div><div class='del'>-analysis of the report string logic occurs in conjunction with the</div><div class='del'>-other string processing such as looking for the expect string. The use</div><div class='del'>-of the same string for a report and abort sequence is probably not</div><div class='del'>-very useful, however, it is possible.</div><div class='del'>-.LP</div><div class='del'>-The report strings to no change the completion code of the program.</div><div class='del'>-.LP</div><div class='del'>-These "report" strings may be specified in the script using the \fIREPORT\fR</div><div class='del'>-sequence. It is written in the script as in the following example:</div><div class='del'>-.IP</div><div class='del'>-REPORT CONNECT ABORT BUSY '' ATDT5551212 CONNECT '' ogin: account</div><div class='del'>-.LP</div><div class='del'>-This sequence will expect nothing; and then send the string</div><div class='del'>-ATDT5551212 to dial the telephone. The expected string is</div><div class='del'>-\fICONNECT\fR. If the string \fICONNECT\fR is received the remainder</div><div class='del'>-of the script is executed. In addition the program will write to the</div><div class='del'>-expect-file the string "CONNECT" plus any characters which follow it</div><div class='del'>-such as the connection rate.</div><div class='del'>-.SH CLR_REPORT STRINGS</div><div class='del'>-This sequence allows for clearing previously set \fBREPORT\fR strings.</div><div class='del'>-\fBREPORT\fR strings are kept in an array of a pre-determined size (at</div><div class='del'>-compilation time); \fBCLR_REPORT\fR will reclaim the space for cleared</div><div class='del'>-entries so that new strings can use that space.</div><div class='del'>-.SH ECHO</div><div class='del'>-The echo options controls whether the output from the modem is echoed</div><div class='del'>-to \fIstderr\fR. This option may be set with the \fI-e\fR option, but</div><div class='del'>-it can also be controlled by the \fIECHO\fR keyword. The "expect-send"</div><div class='del'>-pair \fIECHO\fR \fION\fR enables echoing, and \fIECHO\fR \fIOFF\fR</div><div class='del'>-disables it. With this keyword you can select which parts of the</div><div class='del'>-conversation should be visible. For instance, with the following</div><div class='del'>-script:</div><div class='del'>-.IP</div><div class='del'>-ABORT   'BUSY'</div><div class='del'>-.br</div><div class='del'>-ABORT   'NO CARRIER'</div><div class='del'>-.br</div><div class='del'>-''      ATZ</div><div class='del'>-.br</div><div class='del'>-OK\\r\\n  ATD1234567</div><div class='del'>-.br</div><div class='del'>-\\r\\n    \\c</div><div class='del'>-.br</div><div class='del'>-ECHO    ON</div><div class='del'>-.br</div><div class='del'>-CONNECT \\c</div><div class='del'>-.br</div><div class='del'>-ogin:   account</div><div class='del'>-.LP</div><div class='del'>-all output resulting from modem configuration and dialing is not visible,</div><div class='del'>-but starting with the \fICONNECT\fR (or \fIBUSY\fR) message, everything</div><div class='del'>-will be echoed.</div><div class='del'>-.SH HANGUP</div><div class='del'>-The HANGUP options control whether a modem hangup should be considered</div><div class='del'>-as an error or not.  This option is useful in scripts for dialling</div><div class='del'>-systems which will hang up and call your system back.  The HANGUP</div><div class='del'>-options can be \fBON\fR or \fBOFF\fR.</div><div class='del'>-.br</div><div class='del'>-When HANGUP is set OFF and the modem hangs up (e.g., after the first</div><div class='del'>-stage of logging in to a callback system), \fBchat\fR will continue</div><div class='del'>-running the script (e.g., waiting for the incoming call and second</div><div class='del'>-stage login prompt). As soon as the incoming call is connected, you</div><div class='del'>-should use the \fBHANGUP ON\fR directive to reinstall normal hang up</div><div class='del'>-signal behavior.  Here is an (simple) example script:</div><div class='del'>-.IP</div><div class='del'>-ABORT   'BUSY'</div><div class='del'>-.br</div><div class='del'>-''      ATZ</div><div class='del'>-.br</div><div class='del'>-OK\\r\\n  ATD1234567</div><div class='del'>-.br</div><div class='del'>-\\r\\n    \\c</div><div class='del'>-.br</div><div class='del'>-CONNECT \\c</div><div class='del'>-.br</div><div class='del'>-\'Callback login:' call_back_ID</div><div class='del'>-.br</div><div class='del'>-HANGUP OFF</div><div class='del'>-.br</div><div class='del'>-ABORT "Bad Login"</div><div class='del'>-.br</div><div class='del'>-\'Callback Password:' Call_back_password</div><div class='del'>-.br</div><div class='del'>-TIMEOUT 120</div><div class='del'>-.br</div><div class='del'>-CONNECT \\c</div><div class='del'>-.br</div><div class='del'>-HANGUP ON</div><div class='del'>-.br</div><div class='del'>-ABORT "NO CARRIER"</div><div class='del'>-.br</div><div class='del'>-ogin:--BREAK--ogin: real_account</div><div class='del'>-.br</div><div class='del'>-\fIetc ...\fR</div><div class='del'>-.LP</div><div class='del'>-.SH TIMEOUT</div><div class='del'>-The initial timeout value is 45 seconds. This may be changed using the \fB-t\fR</div><div class='del'>-parameter.</div><div class='del'>-.LP</div><div class='del'>-To change the timeout value for the next expect string, the following</div><div class='del'>-example may be used:</div><div class='del'>-.IP</div><div class='del'>-ATZ OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin: TIMEOUT 5 assword: hello2u2</div><div class='del'>-.LP</div><div class='del'>-This will change the timeout to 10 seconds when it expects the login:</div><div class='del'>-prompt. The timeout is then changed to 5 seconds when it looks for the</div><div class='del'>-password prompt.</div><div class='del'>-.LP</div><div class='del'>-The timeout, once changed, remains in effect until it is changed again.</div><div class='del'>-.SH SENDING EOT</div><div class='del'>-The special reply string of \fIEOT\fR indicates that the chat program</div><div class='del'>-should send an EOT character to the remote. This is normally the</div><div class='del'>-End-of-file character sequence. A return character is not sent</div><div class='del'>-following the EOT.</div><div class='del'>-.PR</div><div class='del'>-The EOT sequence may be embedded into the send string using the</div><div class='del'>-sequence \fI^D\fR.</div><div class='del'>-.SH GENERATING BREAK</div><div class='del'>-The special reply string of \fIBREAK\fR will cause a break condition</div><div class='del'>-to be sent. The break is a special signal on the transmitter. The</div><div class='del'>-normal processing on the receiver is to change the transmission rate.</div><div class='del'>-It may be used to cycle through the available transmission rates on</div><div class='del'>-the remote until you are able to receive a valid login prompt.</div><div class='del'>-.PR</div><div class='del'>-The break sequence may be embedded into the send string using the</div><div class='del'>-\fI\\K\fR sequence.</div><div class='del'>-.SH ESCAPE SEQUENCES</div><div class='del'>-The expect and reply strings may contain escape sequences. All of the</div><div class='del'>-sequences are legal in the reply string. Many are legal in the expect.</div><div class='del'>-Those which are not valid in the expect sequence are so indicated.</div><div class='del'>-.TP</div><div class='del'>-.B ''</div><div class='del'>-Expects or sends a null string. If you send a null string then it will still</div><div class='del'>-send the return character. This sequence may either be a pair of apostrophe</div><div class='del'>-or quote characters.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\b</div><div class='del'>-represents a backspace character.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\c</div><div class='del'>-Suppresses the newline at the end of the reply string. This is the only</div><div class='del'>-method to send a string without a trailing return character. It must</div><div class='del'>-be at the end of the send string. For example,</div><div class='del'>-the sequence hello\\c will simply send the characters h, e, l, l, o.</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\d</div><div class='del'>-Delay for one second. The program uses sleep(1) which will delay to a</div><div class='del'>-maximum of one second.</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\K</div><div class='del'>-Insert a BREAK</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\n</div><div class='del'>-Send a newline or linefeed character.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\N</div><div class='del'>-Send a null character. The same sequence may be represented by \\0.</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\p</div><div class='del'>-Pause for a fraction of a second. The delay is 1/10th of a second.</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\q</div><div class='del'>-Suppress writing the string to the SYSLOG file. The string ?????? is</div><div class='del'>-written to the log in its place.</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\r</div><div class='del'>-Send or expect a carriage return.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\s</div><div class='del'>-Represents a space character in the string. This may be used when it</div><div class='del'>-is not desirable to quote the strings which contains spaces. The</div><div class='del'>-sequence 'HI TIM' and HI\\sTIM are the same.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\t</div><div class='del'>-Send or expect a tab character.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\T</div><div class='del'>-Send the phone number string as specified with the \fI-T\fR option</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\U</div><div class='del'>-Send the phone number 2 string as specified with the \fI-U\fR option</div><div class='del'>-.I (not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \\\\\\\\</div><div class='del'>-Send or expect a backslash character.</div><div class='del'>-.TP</div><div class='del'>-.B \\\\ddd</div><div class='del'>-Collapse the octal digits (ddd) into a single ASCII character and send that</div><div class='del'>-character.</div><div class='del'>-.I (some characters are not valid in expect.)</div><div class='del'>-.TP</div><div class='del'>-.B \^^C</div><div class='del'>-Substitute the sequence with the control character represented by C.</div><div class='del'>-For example, the character DC1 (17) is shown as \^^Q.</div><div class='del'>-.I (some characters are not valid in expect.)</div><div class='del'>-.SH ENVIRONMENT VARIABLES</div><div class='del'>-Environment variables are available within chat scripts, if  the \fI-E\fR</div><div class='del'>-option was specified in the command line. The metacharacter \fI$\fR is used</div><div class='del'>-to introduce the name of the environment variable to substitute. If the</div><div class='del'>-substition fails, because the requested environment variable is not set,</div><div class='del'>-\fInothing\fR is replaced for the variable.</div><div class='del'>-.SH TERMINATION CODES</div><div class='del'>-The \fIchat\fR program will terminate with the following completion</div><div class='del'>-codes.</div><div class='del'>-.TP</div><div class='del'>-.B 0</div><div class='del'>-The normal termination of the program. This indicates that the script</div><div class='del'>-was executed without error to the normal conclusion.</div><div class='del'>-.TP</div><div class='del'>-.B 1</div><div class='del'>-One or more of the parameters are invalid or an expect string was too</div><div class='del'>-large for the internal buffers. This indicates that the program as not</div><div class='del'>-properly executed.</div><div class='del'>-.TP</div><div class='del'>-.B 2</div><div class='del'>-An error occurred during the execution of the program. This may be due</div><div class='del'>-to a read or write operation failing for some reason or chat receiving</div><div class='del'>-a signal such as SIGINT.</div><div class='del'>-.TP</div><div class='del'>-.B 3</div><div class='del'>-A timeout event occurred when there was an \fIexpect\fR string without</div><div class='del'>-having a "-subsend" string. This may mean that you did not program the</div><div class='del'>-script correctly for the condition or that some unexpected event has</div><div class='del'>-occurred and the expected string could not be found.</div><div class='del'>-.TP</div><div class='del'>-.B 4</div><div class='del'>-The first string marked as an \fIABORT\fR condition occurred.</div><div class='del'>-.TP</div><div class='del'>-.B 5</div><div class='del'>-The second string marked as an \fIABORT\fR condition occurred.</div><div class='del'>-.TP</div><div class='del'>-.B 6</div><div class='del'>-The third string marked as an \fIABORT\fR condition occurred.</div><div class='del'>-.TP</div><div class='del'>-.B 7</div><div class='del'>-The fourth string marked as an \fIABORT\fR condition occurred.</div><div class='del'>-.TP</div><div class='del'>-.B ...</div><div class='del'>-The other termination codes are also strings marked as an \fIABORT\fR</div><div class='del'>-condition.</div><div class='del'>-.LP</div><div class='del'>-Using the termination code, it is possible to determine which event</div><div class='del'>-terminated the script. It is possible to decide if the string "BUSY"</div><div class='del'>-was received from the modem as opposed to "NO DIAL TONE". While the</div><div class='del'>-first event may be retried, the second will probably have little</div><div class='del'>-chance of succeeding during a retry.</div><div class='del'>-.SH SEE ALSO</div><div class='del'>-Additional information about \fIchat\fR scripts may be found with UUCP</div><div class='del'>-documentation. The \fIchat\fR script was taken from the ideas proposed</div><div class='del'>-by the scripts used by the \fIuucico\fR program.</div><div class='del'>-.LP</div><div class='del'>-uucico(1), uucp(1)</div><div class='del'>-.SH COPYRIGHT</div><div class='del'>-The \fIchat\fR program is in public domain. This is not the GNU public</div><div class='del'>-license. If it breaks then you get to keep both pieces.</div><div class='head'>diff --git a/mdk-stage1/ppp/chat/chat.c b/mdk-stage1/ppp/chat/chat.c<br/>deleted file mode 100644<br/>index 1b22907a8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/chat/chat.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/chat/chat.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1756 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- *	Chat -- a program for automatic session establishment (i.e. dial</div><div class='del'>- *		the phone and log in).</div><div class='del'>- *</div><div class='del'>- * Standard termination codes:</div><div class='del'>- *  0 - successful completion of the script</div><div class='del'>- *  1 - invalid argument, expect string too large, etc.</div><div class='del'>- *  2 - error on an I/O operation or fatal error condition.</div><div class='del'>- *  3 - timeout waiting for a simple string.</div><div class='del'>- *  4 - the first string declared as "ABORT"</div><div class='del'>- *  5 - the second string declared as "ABORT"</div><div class='del'>- *  6 - ... and so on for successive ABORT strings.</div><div class='del'>- *</div><div class='del'>- *	This software is in the public domain.</div><div class='del'>- *</div><div class='del'>- * -----------------</div><div class='del'>- *	22-May-99 added environment substitutuion, enabled with -E switch.</div><div class='del'>- *	Andreas Arens &lt;andras@cityweb.de&gt;.</div><div class='del'>- *</div><div class='del'>- *	12-May-99 added a feature to read data to be sent from a file,</div><div class='del'>- *	if the send string starts with @.  Idea from gpk &lt;gpk@onramp.net&gt;.</div><div class='del'>- *</div><div class='del'>- *	added -T and -U option and \T and \U substitution to pass a phone</div><div class='del'>- *	number into chat script. Two are needed for some ISDN TA applications.</div><div class='del'>- *	Keith Dart &lt;kdart@cisco.com&gt;</div><div class='del'>- *	</div><div class='del'>- *</div><div class='del'>- *	Added SAY keyword to send output to stderr.</div><div class='del'>- *      This allows to turn ECHO OFF and to output specific, user selected,</div><div class='del'>- *      text to give progress messages. This best works when stderr</div><div class='del'>- *      exists (i.e.: pppd in nodetach mode).</div><div class='del'>- *</div><div class='del'>- * 	Added HANGUP directives to allow for us to be called</div><div class='del'>- *      back. When HANGUP is set to NO, chat will not hangup at HUP signal.</div><div class='del'>- *      We rely on timeouts in that case.</div><div class='del'>- *</div><div class='del'>- *      Added CLR_ABORT to clear previously set ABORT string. This has been</div><div class='del'>- *      dictated by the HANGUP above as "NO CARRIER" (for example) must be</div><div class='del'>- *      an ABORT condition until we know the other host is going to close</div><div class='del'>- *      the connection for call back. As soon as we have completed the</div><div class='del'>- *      first stage of the call back sequence, "NO CARRIER" is a valid, non</div><div class='del'>- *      fatal string. As soon as we got called back (probably get "CONNECT"),</div><div class='del'>- *      we should re-arm the ABORT "NO CARRIER". Hence the CLR_ABORT command.</div><div class='del'>- *      Note that CLR_ABORT packs the abort_strings[] array so that we do not</div><div class='del'>- *      have unused entries not being reclaimed.</div><div class='del'>- *</div><div class='del'>- *      In the same vein as above, added CLR_REPORT keyword.</div><div class='del'>- *</div><div class='del'>- *      Allow for comments. Line starting with '#' are comments and are</div><div class='del'>- *      ignored. If a '#' is to be expected as the first character, the </div><div class='del'>- *      expect string must be quoted.</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- *		Francis Demierre &lt;Francis@SwissMail.Com&gt;</div><div class='del'>- * 		Thu May 15 17:15:40 MET DST 1997</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- *      Added -r "report file" switch &amp; REPORT keyword.</div><div class='del'>- *              Robert Geer &lt;bgeer@xmission.com&gt;</div><div class='del'>- *</div><div class='del'>- *      Added -s "use stderr" and -S "don't use syslog" switches.</div><div class='del'>- *              June 18, 1997</div><div class='del'>- *              Karl O. Pinc &lt;kop@meme.com&gt;</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- *	Added -e "echo" switch &amp; ECHO keyword</div><div class='del'>- *		Dick Streefland &lt;dicks@tasking.nl&gt;</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- *	Considerable updates and modifications by</div><div class='del'>- *		Al Longyear &lt;longyear@pobox.com&gt;</div><div class='del'>- *		Paul Mackerras &lt;paulus@cs.anu.edu.au&gt;</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- *	The original author is:</div><div class='del'>- *</div><div class='del'>- *		Karl Fox &lt;karl@MorningStar.Com&gt;</div><div class='del'>- *		Morning Star Technologies, Inc.</div><div class='del'>- *		1760 Zollinger Road</div><div class='del'>- *		Columbus, OH  43221</div><div class='del'>- *		(614)451-1883</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __STDC__</div><div class='del'>-#define const</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef lint</div><div class='del'>-static const char rcsid[] = "$Id$";</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef TERMIO</div><div class='del'>-#undef	TERMIOS</div><div class='del'>-#define TERMIOS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef TERMIO</div><div class='del'>-#include &lt;termio.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#ifdef TERMIOS</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define	STR_LEN	1024</div><div class='del'>-</div><div class='del'>-#ifndef SIGTYPE</div><div class='del'>-#define SIGTYPE void</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#undef __P</div><div class='del'>-#undef __V</div><div class='del'>-</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#define __V(x)	x</div><div class='del'>-#define __P(x)	x</div><div class='del'>-#else</div><div class='del'>-#include &lt;varargs.h&gt;</div><div class='del'>-#define __V(x)	(va_alist) va_dcl</div><div class='del'>-#define __P(x)	()</div><div class='del'>-#define const</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef O_NONBLOCK</div><div class='del'>-#define O_NONBLOCK	O_NDELAY</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef SUNOS</div><div class='del'>-extern int sys_nerr;</div><div class='del'>-extern char *sys_errlist[];</div><div class='del'>-#define memmove(to, from, n)	bcopy(from, to, n)</div><div class='del'>-#define strerror(n)		((unsigned)(n) &lt; sys_nerr? sys_errlist[(n)] :\</div><div class='del'>-				 "unknown error")</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*************** Micro getopt() *********************************************/</div><div class='del'>-#define	OPTION(c,v)	(_O&amp;2&amp;&amp;**v?*(*v)++:!c||_O&amp;4?0:(!(_O&amp;1)&amp;&amp; \</div><div class='del'>-				(--c,++v),_O=4,c&amp;&amp;**v=='-'&amp;&amp;v[0][1]?*++*v=='-'\</div><div class='del'>-				&amp;&amp;!v[0][1]?(--c,++v,0):(_O=2,*(*v)++):0))</div><div class='del'>-#define	OPTARG(c,v)	(_O&amp;2?**v||(++v,--c)?(_O=1,--c,*v++): \</div><div class='del'>-				(_O=4,(char*)0):(char*)0)</div><div class='del'>-#define	OPTONLYARG(c,v)	(_O&amp;2&amp;&amp;**v?(_O=1,--c,*v++):(char*)0)</div><div class='del'>-#define	ARG(c,v)	(c?(--c,*v++):(char*)0)</div><div class='del'>-</div><div class='del'>-static int _O = 0;		/* Internal state */</div><div class='del'>-/*************** Micro getopt() *********************************************/</div><div class='del'>-</div><div class='del'>-char *program_name;</div><div class='del'>-</div><div class='del'>-#define	MAX_ABORTS		50</div><div class='del'>-#define	MAX_REPORTS		50</div><div class='del'>-#define	DEFAULT_CHAT_TIMEOUT	45</div><div class='del'>-</div><div class='del'>-int echo          = 0;</div><div class='del'>-int verbose       = 0;</div><div class='del'>-int to_log        = 1;</div><div class='del'>-int to_stderr     = 0;</div><div class='del'>-int Verbose       = 0;</div><div class='del'>-int quiet         = 0;</div><div class='del'>-int report        = 0;</div><div class='del'>-int use_env       = 0;</div><div class='del'>-int exit_code     = 0;</div><div class='del'>-FILE* report_fp   = (FILE *) 0;</div><div class='del'>-char *report_file = (char *) 0;</div><div class='del'>-char *chat_file   = (char *) 0;</div><div class='del'>-char *phone_num   = (char *) 0;</div><div class='del'>-char *phone_num2  = (char *) 0;</div><div class='del'>-int timeout       = DEFAULT_CHAT_TIMEOUT;</div><div class='del'>-</div><div class='del'>-int have_tty_parameters = 0;</div><div class='del'>-</div><div class='del'>-#ifdef TERMIO</div><div class='del'>-#define term_parms struct termio</div><div class='del'>-#define get_term_param(param) ioctl(0, TCGETA, param)</div><div class='del'>-#define set_term_param(param) ioctl(0, TCSETA, param)</div><div class='del'>-struct termio saved_tty_parameters;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef TERMIOS</div><div class='del'>-#define term_parms struct termios</div><div class='del'>-#define get_term_param(param) tcgetattr(0, param)</div><div class='del'>-#define set_term_param(param) tcsetattr(0, TCSANOW, param)</div><div class='del'>-struct termios saved_tty_parameters;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-char *abort_string[MAX_ABORTS], *fail_reason = (char *)0,</div><div class='del'>-	fail_buffer[50];</div><div class='del'>-int n_aborts = 0, abort_next = 0, timeout_next = 0, echo_next = 0;</div><div class='del'>-int clear_abort_next = 0;</div><div class='del'>-</div><div class='del'>-char *report_string[MAX_REPORTS] ;</div><div class='del'>-char  report_buffer[50] ;</div><div class='del'>-int n_reports = 0, report_next = 0, report_gathering = 0 ; </div><div class='del'>-int clear_report_next = 0;</div><div class='del'>-</div><div class='del'>-int say_next = 0, hup_next = 0;</div><div class='del'>-</div><div class='del'>-void *dup_mem __P((void *b, size_t c));</div><div class='del'>-void *copy_of __P((char *s));</div><div class='del'>-void usage __P((void));</div><div class='del'>-void logf __P((const char *fmt, ...));</div><div class='del'>-void fatal __P((int code, const char *fmt, ...));</div><div class='del'>-SIGTYPE sigalrm __P((int signo));</div><div class='del'>-SIGTYPE sigint __P((int signo));</div><div class='del'>-SIGTYPE sigterm __P((int signo));</div><div class='del'>-SIGTYPE sighup __P((int signo));</div><div class='del'>-void unalarm __P((void));</div><div class='del'>-void init __P((void));</div><div class='del'>-void set_tty_parameters __P((void));</div><div class='del'>-void echo_stderr __P((int));</div><div class='del'>-void break_sequence __P((void));</div><div class='del'>-void terminate __P((int status));</div><div class='del'>-void do_file __P((char *chat_file));</div><div class='del'>-int  get_string __P((register char *string));</div><div class='del'>-int  put_string __P((register char *s));</div><div class='del'>-int  write_char __P((int c));</div><div class='del'>-int  put_char __P((int c));</div><div class='del'>-int  get_char __P((void));</div><div class='del'>-void chat_send __P((register char *s));</div><div class='del'>-char *character __P((int c));</div><div class='del'>-void chat_expect __P((register char *s));</div><div class='del'>-char *clean __P((register char *s, int sending));</div><div class='del'>-void break_sequence __P((void));</div><div class='del'>-void terminate __P((int status));</div><div class='del'>-void pack_array __P((char **array, int end));</div><div class='del'>-char *expect_strtok __P((char *, char *));</div><div class='del'>-int vfmtmsg __P((char *, int, const char *, va_list));	/* vsprintf++ */</div><div class='del'>-</div><div class='del'>-int main __P((int, char *[]));</div><div class='del'>-</div><div class='del'>-void *dup_mem(b, c)</div><div class='del'>-void *b;</div><div class='del'>-size_t c;</div><div class='del'>-{</div><div class='del'>-    void *ans = malloc (c);</div><div class='del'>-    if (!ans)</div><div class='del'>-	fatal(2, "memory error!");</div><div class='del'>-</div><div class='del'>-    memcpy (ans, b, c);</div><div class='del'>-    return ans;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void *copy_of (s)</div><div class='del'>-char *s;</div><div class='del'>-{</div><div class='del'>-    return dup_mem (s, strlen (s) + 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * chat [ -v ] [ -E ] [ -T number ] [ -U number ] [ -t timeout ] [ -f chat-file ] \</div><div class='del'>- * [ -r report-file ] \</div><div class='del'>- *		[...[[expect[-say[-expect...]] say expect[-say[-expect]] ...]]]</div><div class='del'>- *</div><div class='del'>- *	Perform a UUCP-dialer-like chat script on stdin and stdout.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-main(argc, argv)</div><div class='del'>-     int argc;</div><div class='del'>-     char **argv;</div><div class='del'>-{</div><div class='del'>-    int option;</div><div class='del'>-    char *arg;</div><div class='del'>-</div><div class='del'>-    program_name = *argv;</div><div class='del'>-    tzset();</div><div class='del'>-</div><div class='del'>-    while ((option = OPTION(argc, argv)) != 0) {</div><div class='del'>-	switch (option) {</div><div class='del'>-	case 'e':</div><div class='del'>-	    ++echo;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'E':</div><div class='del'>-	    ++use_env;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'v':</div><div class='del'>-	    ++verbose;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'V':</div><div class='del'>-	    ++Verbose;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 's':</div><div class='del'>-	    ++to_stderr;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'S':</div><div class='del'>-	    to_log = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'f':</div><div class='del'>-	    if ((arg = OPTARG(argc, argv)) != NULL)</div><div class='del'>-		    chat_file = copy_of(arg);</div><div class='del'>-	    else</div><div class='del'>-		usage();</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 't':</div><div class='del'>-	    if ((arg = OPTARG(argc, argv)) != NULL)</div><div class='del'>-		timeout = atoi(arg);</div><div class='del'>-	    else</div><div class='del'>-		usage();</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'r':</div><div class='del'>-	    arg = OPTARG (argc, argv);</div><div class='del'>-	    if (arg) {</div><div class='del'>-		if (report_fp != NULL)</div><div class='del'>-		    fclose (report_fp);</div><div class='del'>-		report_file = copy_of (arg);</div><div class='del'>-		report_fp   = fopen (report_file, "a");</div><div class='del'>-		if (report_fp != NULL) {</div><div class='del'>-		    if (verbose)</div><div class='del'>-			fprintf (report_fp, "Opening \"%s\"...\n",</div><div class='del'>-				 report_file);</div><div class='del'>-		    report = 1;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'T':</div><div class='del'>-	    if ((arg = OPTARG(argc, argv)) != NULL)</div><div class='del'>-		phone_num = copy_of(arg);</div><div class='del'>-	    else</div><div class='del'>-		usage();</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'U':</div><div class='del'>-	    if ((arg = OPTARG(argc, argv)) != NULL)</div><div class='del'>-		phone_num2 = copy_of(arg);</div><div class='del'>-	    else</div><div class='del'>-		usage();</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    usage();</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Default the report file to the stderr location</div><div class='del'>- */</div><div class='del'>-    if (report_fp == NULL)</div><div class='del'>-	report_fp = stderr;</div><div class='del'>-</div><div class='del'>-    if (to_log) {</div><div class='del'>-#ifdef ultrix</div><div class='del'>-	openlog("chat", LOG_PID);</div><div class='del'>-#else</div><div class='del'>-	openlog("chat", LOG_PID | LOG_NDELAY, LOG_LOCAL2);</div><div class='del'>-</div><div class='del'>-	if (verbose)</div><div class='del'>-	    setlogmask(LOG_UPTO(LOG_INFO));</div><div class='del'>-	else</div><div class='del'>-	    setlogmask(LOG_UPTO(LOG_WARNING));</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    init();</div><div class='del'>-    </div><div class='del'>-    if (chat_file != NULL) {</div><div class='del'>-	arg = ARG(argc, argv);</div><div class='del'>-	if (arg != NULL)</div><div class='del'>-	    usage();</div><div class='del'>-	else</div><div class='del'>-	    do_file (chat_file);</div><div class='del'>-    } else {</div><div class='del'>-	while ((arg = ARG(argc, argv)) != NULL) {</div><div class='del'>-	    chat_expect(arg);</div><div class='del'>-</div><div class='del'>-	    if ((arg = ARG(argc, argv)) != NULL)</div><div class='del'>-		chat_send(arg);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    terminate(0);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Process a chat script when read from a file.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void do_file (chat_file)</div><div class='del'>-char *chat_file;</div><div class='del'>-{</div><div class='del'>-    int linect, sendflg;</div><div class='del'>-    char *sp, *arg, quote;</div><div class='del'>-    char buf [STR_LEN];</div><div class='del'>-    FILE *cfp;</div><div class='del'>-</div><div class='del'>-    cfp = fopen (chat_file, "r");</div><div class='del'>-    if (cfp == NULL)</div><div class='del'>-	fatal(1, "%s -- open failed: %m", chat_file);</div><div class='del'>-</div><div class='del'>-    linect = 0;</div><div class='del'>-    sendflg = 0;</div><div class='del'>-</div><div class='del'>-    while (fgets(buf, STR_LEN, cfp) != NULL) {</div><div class='del'>-	sp = strchr (buf, '\n');</div><div class='del'>-	if (sp)</div><div class='del'>-	    *sp = '\0';</div><div class='del'>-</div><div class='del'>-	linect++;</div><div class='del'>-	sp = buf;</div><div class='del'>-</div><div class='del'>-        /* lines starting with '#' are comments. If a real '#'</div><div class='del'>-           is to be expected, it should be quoted .... */</div><div class='del'>-        if ( *sp == '#' )</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	while (*sp != '\0') {</div><div class='del'>-	    if (*sp == ' ' || *sp == '\t') {</div><div class='del'>-		++sp;</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (*sp == '"' || *sp == '\'') {</div><div class='del'>-		quote = *sp++;</div><div class='del'>-		arg = sp;</div><div class='del'>-		while (*sp != quote) {</div><div class='del'>-		    if (*sp == '\0')</div><div class='del'>-			fatal(1, "unterminated quote (line %d)", linect);</div><div class='del'>-</div><div class='del'>-		    if (*sp++ == '\\') {</div><div class='del'>-			if (*sp != '\0')</div><div class='del'>-			    ++sp;</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		arg = sp;</div><div class='del'>-		while (*sp != '\0' &amp;&amp; *sp != ' ' &amp;&amp; *sp != '\t')</div><div class='del'>-		    ++sp;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (*sp != '\0')</div><div class='del'>-		*sp++ = '\0';</div><div class='del'>-</div><div class='del'>-	    if (sendflg)</div><div class='del'>-		chat_send (arg);</div><div class='del'>-	    else</div><div class='del'>-		chat_expect (arg);</div><div class='del'>-	    sendflg = !sendflg;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    fclose (cfp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	We got an error parsing the command line.</div><div class='del'>- */</div><div class='del'>-void usage()</div><div class='del'>-{</div><div class='del'>-    fprintf(stderr, "\</div><div class='del'>-Usage: %s [-e] [-E] [-v] [-V] [-t timeout] [-r report-file]\n\</div><div class='del'>-     [-T phone-number] [-U phone-number2] {-f chat-file | chat-script}\n", program_name);</div><div class='del'>-    exit(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char line[1024];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Send a message to syslog and/or stderr.</div><div class='del'>- */</div><div class='del'>-void logf __V((const char *fmt, ...))</div><div class='del'>-{</div><div class='del'>-    va_list args;</div><div class='del'>-</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-    va_start(args, fmt);</div><div class='del'>-#else</div><div class='del'>-    char *fmt;</div><div class='del'>-    va_start(args);</div><div class='del'>-    fmt = va_arg(args, char *);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    vfmtmsg(line, sizeof(line), fmt, args);</div><div class='del'>-    if (to_log)</div><div class='del'>-	syslog(LOG_INFO, "%s", line);</div><div class='del'>-    if (to_stderr)</div><div class='del'>-	fprintf(stderr, "%s\n", line);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Print an error message and terminate.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void fatal __V((int code, const char *fmt, ...))</div><div class='del'>-{</div><div class='del'>-    va_list args;</div><div class='del'>-</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-    va_start(args, fmt);</div><div class='del'>-#else</div><div class='del'>-    int code;</div><div class='del'>-    char *fmt;</div><div class='del'>-    va_start(args);</div><div class='del'>-    code = va_arg(args, int);</div><div class='del'>-    fmt = va_arg(args, char *);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    vfmtmsg(line, sizeof(line), fmt, args);</div><div class='del'>-    if (to_log)</div><div class='del'>-	syslog(LOG_ERR, "%s", line);</div><div class='del'>-    if (to_stderr)</div><div class='del'>-	fprintf(stderr, "%s\n", line);</div><div class='del'>-    terminate(code);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int alarmed = 0;</div><div class='del'>-</div><div class='del'>-SIGTYPE sigalrm(signo)</div><div class='del'>-int signo;</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    alarm(1);</div><div class='del'>-    alarmed = 1;		/* Reset alarm to avoid race window */</div><div class='del'>-    signal(SIGALRM, sigalrm);	/* that can cause hanging in read() */</div><div class='del'>-</div><div class='del'>-    if ((flags = fcntl(0, F_GETFL, 0)) == -1)</div><div class='del'>-	fatal(2, "Can't get file mode flags on stdin: %m");</div><div class='del'>-</div><div class='del'>-    if (fcntl(0, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	fatal(2, "Can't set file mode flags on stdin: %m");</div><div class='del'>-</div><div class='del'>-    if (verbose)</div><div class='del'>-	logf("alarm");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void unalarm()</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    if ((flags = fcntl(0, F_GETFL, 0)) == -1)</div><div class='del'>-	fatal(2, "Can't get file mode flags on stdin: %m");</div><div class='del'>-</div><div class='del'>-    if (fcntl(0, F_SETFL, flags &amp; ~O_NONBLOCK) == -1)</div><div class='del'>-	fatal(2, "Can't set file mode flags on stdin: %m");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-SIGTYPE sigint(signo)</div><div class='del'>-int signo;</div><div class='del'>-{</div><div class='del'>-    fatal(2, "SIGINT");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-SIGTYPE sigterm(signo)</div><div class='del'>-int signo;</div><div class='del'>-{</div><div class='del'>-    fatal(2, "SIGTERM");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-SIGTYPE sighup(signo)</div><div class='del'>-int signo;</div><div class='del'>-{</div><div class='del'>-    fatal(2, "SIGHUP");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void init()</div><div class='del'>-{</div><div class='del'>-    signal(SIGINT, sigint);</div><div class='del'>-    signal(SIGTERM, sigterm);</div><div class='del'>-    signal(SIGHUP, sighup);</div><div class='del'>-</div><div class='del'>-    set_tty_parameters();</div><div class='del'>-    signal(SIGALRM, sigalrm);</div><div class='del'>-    alarm(0);</div><div class='del'>-    alarmed = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void set_tty_parameters()</div><div class='del'>-{</div><div class='del'>-#if defined(get_term_param)</div><div class='del'>-    term_parms t;</div><div class='del'>-</div><div class='del'>-    if (get_term_param (&amp;t) &lt; 0)</div><div class='del'>-	fatal(2, "Can't get terminal parameters: %m");</div><div class='del'>-</div><div class='del'>-    saved_tty_parameters = t;</div><div class='del'>-    have_tty_parameters  = 1;</div><div class='del'>-</div><div class='del'>-    t.c_iflag     |= IGNBRK | ISTRIP | IGNPAR;</div><div class='del'>-    t.c_oflag      = 0;</div><div class='del'>-    t.c_lflag      = 0;</div><div class='del'>-    t.c_cc[VERASE] =</div><div class='del'>-    t.c_cc[VKILL]  = 0;</div><div class='del'>-    t.c_cc[VMIN]   = 1;</div><div class='del'>-    t.c_cc[VTIME]  = 0;</div><div class='del'>-</div><div class='del'>-    if (set_term_param (&amp;t) &lt; 0)</div><div class='del'>-	fatal(2, "Can't set terminal parameters: %m");</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void break_sequence()</div><div class='del'>-{</div><div class='del'>-#ifdef TERMIOS</div><div class='del'>-    tcsendbreak (0, 0);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void terminate(status)</div><div class='del'>-int status;</div><div class='del'>-{</div><div class='del'>-    static int terminating = 0;</div><div class='del'>-</div><div class='del'>-    if (terminating)</div><div class='del'>-	exit(status);</div><div class='del'>-    terminating = 1;</div><div class='del'>-    echo_stderr(-1);</div><div class='del'>-/*</div><div class='del'>- * Allow the last of the report string to be gathered before we terminate.</div><div class='del'>- */</div><div class='del'>-    if (report_gathering) {</div><div class='del'>-	int c, rep_len;</div><div class='del'>-</div><div class='del'>-	rep_len = strlen(report_buffer);</div><div class='del'>-	while (rep_len + 1 &lt;= sizeof(report_buffer)) {</div><div class='del'>-	    alarm(1);</div><div class='del'>-	    c = get_char();</div><div class='del'>-	    alarm(0);</div><div class='del'>-	    if (c &lt; 0 || iscntrl(c))</div><div class='del'>-		break;</div><div class='del'>-	    report_buffer[rep_len] = c;</div><div class='del'>-	    ++rep_len;</div><div class='del'>-	}</div><div class='del'>-	report_buffer[rep_len] = 0;</div><div class='del'>-	fprintf (report_fp, "chat:  %s\n", report_buffer);</div><div class='del'>-    }</div><div class='del'>-    if (report_file != (char *) 0 &amp;&amp; report_fp != (FILE *) NULL) {</div><div class='del'>-	if (verbose)</div><div class='del'>-	    fprintf (report_fp, "Closing \"%s\".\n", report_file);</div><div class='del'>-	fclose (report_fp);</div><div class='del'>-	report_fp = (FILE *) NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(get_term_param)</div><div class='del'>-    if (have_tty_parameters) {</div><div class='del'>-	if (set_term_param (&amp;saved_tty_parameters) &lt; 0)</div><div class='del'>-	    fatal(2, "Can't restore terminal parameters: %m");</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    exit(status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	'Clean up' this string.</div><div class='del'>- */</div><div class='del'>-char *clean(s, sending)</div><div class='del'>-register char *s;</div><div class='del'>-int sending;  /* set to 1 when sending (putting) this string. */</div><div class='del'>-{</div><div class='del'>-    char temp[STR_LEN], env_str[STR_LEN], cur_chr;</div><div class='del'>-    register char *s1, *phchar;</div><div class='del'>-    int add_return = sending;</div><div class='del'>-#define isoctal(chr)	(((chr) &gt;= '0') &amp;&amp; ((chr) &lt;= '7'))</div><div class='del'>-#define isalnumx(chr)	((((chr) &gt;= '0') &amp;&amp; ((chr) &lt;= '9')) \</div><div class='del'>-			 || (((chr) &gt;= 'a') &amp;&amp; ((chr) &lt;= 'z')) \</div><div class='del'>-			 || (((chr) &gt;= 'A') &amp;&amp; ((chr) &lt;= 'Z')) \</div><div class='del'>-			 || (chr) == '_')</div><div class='del'>-</div><div class='del'>-    s1 = temp;</div><div class='del'>-    while (*s) {</div><div class='del'>-	cur_chr = *s++;</div><div class='del'>-	if (cur_chr == '^') {</div><div class='del'>-	    cur_chr = *s++;</div><div class='del'>-	    if (cur_chr == '\0') {</div><div class='del'>-		*s1++ = '^';</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    cur_chr &amp;= 0x1F;</div><div class='del'>-	    if (cur_chr != 0) {</div><div class='del'>-		*s1++ = cur_chr;</div><div class='del'>-	    }</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (use_env &amp;&amp; cur_chr == '$') {		/* ARI */</div><div class='del'>-	    phchar = env_str;</div><div class='del'>-	    while (isalnumx(*s))</div><div class='del'>-		*phchar++ = *s++;</div><div class='del'>-	    *phchar = '\0';</div><div class='del'>-	    phchar = getenv(env_str);</div><div class='del'>-	    if (phchar)</div><div class='del'>-		while (*phchar)</div><div class='del'>-		    *s1++ = *phchar++;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (cur_chr != '\\') {</div><div class='del'>-	    *s1++ = cur_chr;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	cur_chr = *s++;</div><div class='del'>-	if (cur_chr == '\0') {</div><div class='del'>-	    if (sending) {</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	switch (cur_chr) {</div><div class='del'>-	case 'b':</div><div class='del'>-	    *s1++ = '\b';</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'c':</div><div class='del'>-	    if (sending &amp;&amp; *s == '\0')</div><div class='del'>-		add_return = 0;</div><div class='del'>-	    else</div><div class='del'>-		*s1++ = cur_chr;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case '\\':</div><div class='del'>-	case 'K':</div><div class='del'>-	case 'p':</div><div class='del'>-	case 'd':</div><div class='del'>-	    if (sending)</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-	    *s1++ = cur_chr;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'T':</div><div class='del'>-	    if (sending &amp;&amp; phone_num) {</div><div class='del'>-		for (phchar = phone_num; *phchar != '\0'; phchar++) </div><div class='del'>-		    *s1++ = *phchar;</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-		*s1++ = 'T';</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'U':</div><div class='del'>-	    if (sending &amp;&amp; phone_num2) {</div><div class='del'>-		for (phchar = phone_num2; *phchar != '\0'; phchar++) </div><div class='del'>-		    *s1++ = *phchar;</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-		*s1++ = 'U';</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'q':</div><div class='del'>-	    quiet = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'r':</div><div class='del'>-	    *s1++ = '\r';</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'n':</div><div class='del'>-	    *s1++ = '\n';</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 's':</div><div class='del'>-	    *s1++ = ' ';</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 't':</div><div class='del'>-	    *s1++ = '\t';</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'N':</div><div class='del'>-	    if (sending) {</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-		*s1++ = '\0';</div><div class='del'>-	    }</div><div class='del'>-	    else</div><div class='del'>-		*s1++ = 'N';</div><div class='del'>-	    break;</div><div class='del'>-	    </div><div class='del'>-	case '$':			/* ARI */</div><div class='del'>-	    if (use_env) {</div><div class='del'>-		*s1++ = cur_chr;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    /* FALL THROUGH */</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    if (isoctal (cur_chr)) {</div><div class='del'>-		cur_chr &amp;= 0x07;</div><div class='del'>-		if (isoctal (*s)) {</div><div class='del'>-		    cur_chr &lt;&lt;= 3;</div><div class='del'>-		    cur_chr |= *s++ - '0';</div><div class='del'>-		    if (isoctal (*s)) {</div><div class='del'>-			cur_chr &lt;&lt;= 3;</div><div class='del'>-			cur_chr |= *s++ - '0';</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (cur_chr != 0 || sending) {</div><div class='del'>-		    if (sending &amp;&amp; (cur_chr == '\\' || cur_chr == 0))</div><div class='del'>-			*s1++ = '\\';</div><div class='del'>-		    *s1++ = cur_chr;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (sending)</div><div class='del'>-		*s1++ = '\\';</div><div class='del'>-	    *s1++ = cur_chr;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (add_return)</div><div class='del'>-	*s1++ = '\r';</div><div class='del'>-</div><div class='del'>-    *s1++ = '\0'; /* guarantee closure */</div><div class='del'>-    *s1++ = '\0'; /* terminate the string */</div><div class='del'>-    return dup_mem (temp, (size_t) (s1 - temp)); /* may have embedded nuls */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A modified version of 'strtok'. This version skips \ sequences.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-char *expect_strtok (s, term)</div><div class='del'>-     char *s, *term;</div><div class='del'>-{</div><div class='del'>-    static  char *str   = "";</div><div class='del'>-    int	    escape_flag = 0;</div><div class='del'>-    char   *result;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If a string was specified then do initial processing.</div><div class='del'>- */</div><div class='del'>-    if (s)</div><div class='del'>-	str = s;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If this is the escape flag then reset it and ignore the character.</div><div class='del'>- */</div><div class='del'>-    if (*str)</div><div class='del'>-	result = str;</div><div class='del'>-    else</div><div class='del'>-	result = (char *) 0;</div><div class='del'>-</div><div class='del'>-    while (*str) {</div><div class='del'>-	if (escape_flag) {</div><div class='del'>-	    escape_flag = 0;</div><div class='del'>-	    ++str;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (*str == '\\') {</div><div class='del'>-	    ++str;</div><div class='del'>-	    escape_flag = 1;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If this is not in the termination string, continue.</div><div class='del'>- */</div><div class='del'>-	if (strchr (term, *str) == (char *) 0) {</div><div class='del'>-	    ++str;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is the terminator. Mark the end of the string and stop.</div><div class='del'>- */</div><div class='del'>-	*str++ = '\0';</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return (result);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Process the expect string</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void chat_expect (s)</div><div class='del'>-char *s;</div><div class='del'>-{</div><div class='del'>-    char *expect;</div><div class='del'>-    char *reply;</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "HANGUP") == 0) {</div><div class='del'>-	++hup_next;</div><div class='del'>-        return;</div><div class='del'>-    }</div><div class='del'>- </div><div class='del'>-    if (strcmp(s, "ABORT") == 0) {</div><div class='del'>-	++abort_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "CLR_ABORT") == 0) {</div><div class='del'>-	++clear_abort_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "REPORT") == 0) {</div><div class='del'>-	++report_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "CLR_REPORT") == 0) {</div><div class='del'>-	++clear_report_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "TIMEOUT") == 0) {</div><div class='del'>-	++timeout_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "ECHO") == 0) {</div><div class='del'>-	++echo_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "SAY") == 0) {</div><div class='del'>-	++say_next;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Fetch the expect and reply string.</div><div class='del'>- */</div><div class='del'>-    for (;;) {</div><div class='del'>-	expect = expect_strtok (s, "-");</div><div class='del'>-	s      = (char *) 0;</div><div class='del'>-</div><div class='del'>-	if (expect == (char *) 0)</div><div class='del'>-	    return;</div><div class='del'>-</div><div class='del'>-	reply = expect_strtok (s, "-");</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Handle the expect string. If successful then exit.</div><div class='del'>- */</div><div class='del'>-	if (get_string (expect))</div><div class='del'>-	    return;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If there is a sub-reply string then send it. Otherwise any condition</div><div class='del'>- * is terminal.</div><div class='del'>- */</div><div class='del'>-	if (reply == (char *) 0 || exit_code != 3)</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	chat_send (reply);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The expectation did not occur. This is terminal.</div><div class='del'>- */</div><div class='del'>-    if (fail_reason)</div><div class='del'>-	logf("Failed (%s)", fail_reason);</div><div class='del'>-    else</div><div class='del'>-	logf("Failed");</div><div class='del'>-    terminate(exit_code);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Translate the input character to the appropriate string for printing</div><div class='del'>- * the data.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-char *character(c)</div><div class='del'>-int c;</div><div class='del'>-{</div><div class='del'>-    static char string[10];</div><div class='del'>-    char *meta;</div><div class='del'>-</div><div class='del'>-    meta = (c &amp; 0x80) ? "M-" : "";</div><div class='del'>-    c &amp;= 0x7F;</div><div class='del'>-</div><div class='del'>-    if (c &lt; 32)</div><div class='del'>-	sprintf(string, "%s^%c", meta, (int)c + '@');</div><div class='del'>-    else if (c == 127)</div><div class='del'>-	sprintf(string, "%s^?", meta);</div><div class='del'>-    else</div><div class='del'>-	sprintf(string, "%s%c", meta, c);</div><div class='del'>-</div><div class='del'>-    return (string);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  process the reply string</div><div class='del'>- */</div><div class='del'>-void chat_send (s)</div><div class='del'>-register char *s;</div><div class='del'>-{</div><div class='del'>-    char file_data[STR_LEN];</div><div class='del'>-</div><div class='del'>-    if (say_next) {</div><div class='del'>-	say_next = 0;</div><div class='del'>-	s = clean(s, 1);</div><div class='del'>-	write(2, s, strlen(s));</div><div class='del'>-        free(s);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (hup_next) {</div><div class='del'>-        hup_next = 0;</div><div class='del'>-	if (strcmp(s, "OFF") == 0)</div><div class='del'>-           signal(SIGHUP, SIG_IGN);</div><div class='del'>-        else</div><div class='del'>-           signal(SIGHUP, sighup);</div><div class='del'>-        return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (echo_next) {</div><div class='del'>-	echo_next = 0;</div><div class='del'>-	echo = (strcmp(s, "ON") == 0);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (abort_next) {</div><div class='del'>-	char *s1;</div><div class='del'>-	</div><div class='del'>-	abort_next = 0;</div><div class='del'>-	</div><div class='del'>-	if (n_aborts &gt;= MAX_ABORTS)</div><div class='del'>-	    fatal(2, "Too many ABORT strings");</div><div class='del'>-	</div><div class='del'>-	s1 = clean(s, 0);</div><div class='del'>-	</div><div class='del'>-	if (strlen(s1) &gt; strlen(s)</div><div class='del'>-	    || strlen(s1) + 1 &gt; sizeof(fail_buffer))</div><div class='del'>-	    fatal(1, "Illegal or too-long ABORT string ('%v')", s);</div><div class='del'>-</div><div class='del'>-	abort_string[n_aborts++] = s1;</div><div class='del'>-</div><div class='del'>-	if (verbose)</div><div class='del'>-	    logf("abort on (%v)", s);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (clear_abort_next) {</div><div class='del'>-	char *s1;</div><div class='del'>-	int   i;</div><div class='del'>-        int   old_max;</div><div class='del'>-	int   pack = 0;</div><div class='del'>-	</div><div class='del'>-	clear_abort_next = 0;</div><div class='del'>-	</div><div class='del'>-	s1 = clean(s, 0);</div><div class='del'>-	</div><div class='del'>-	if (strlen(s1) &gt; strlen(s)</div><div class='del'>-	    || strlen(s1) + 1 &gt; sizeof(fail_buffer))</div><div class='del'>-	    fatal(1, "Illegal or too-long CLR_ABORT string ('%v')", s);</div><div class='del'>-</div><div class='del'>-        old_max = n_aborts;</div><div class='del'>-	for (i=0; i &lt; n_aborts; i++) {</div><div class='del'>-	    if ( strcmp(s1,abort_string[i]) == 0 ) {</div><div class='del'>-		free(abort_string[i]);</div><div class='del'>-		abort_string[i] = NULL;</div><div class='del'>-		pack++;</div><div class='del'>-		n_aborts--;</div><div class='del'>-		if (verbose)</div><div class='del'>-		    logf("clear abort on (%v)", s);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-        free(s1);</div><div class='del'>-	if (pack)</div><div class='del'>-	    pack_array(abort_string,old_max);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (report_next) {</div><div class='del'>-	char *s1;</div><div class='del'>-	</div><div class='del'>-	report_next = 0;</div><div class='del'>-	if (n_reports &gt;= MAX_REPORTS)</div><div class='del'>-	    fatal(2, "Too many REPORT strings");</div><div class='del'>-	</div><div class='del'>-	s1 = clean(s, 0);</div><div class='del'>-	</div><div class='del'>-	if (strlen(s1) &gt; strlen(s) || strlen(s1) &gt; sizeof fail_buffer - 1)</div><div class='del'>-	    fatal(1, "Illegal or too-long REPORT string ('%v')", s);</div><div class='del'>-	</div><div class='del'>-	report_string[n_reports++] = s1;</div><div class='del'>-	</div><div class='del'>-	if (verbose)</div><div class='del'>-	    logf("report (%v)", s);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (clear_report_next) {</div><div class='del'>-	char *s1;</div><div class='del'>-	int   i;</div><div class='del'>-	int   old_max;</div><div class='del'>-	int   pack = 0;</div><div class='del'>-	</div><div class='del'>-	clear_report_next = 0;</div><div class='del'>-	</div><div class='del'>-	s1 = clean(s, 0);</div><div class='del'>-	</div><div class='del'>-	if (strlen(s1) &gt; strlen(s) || strlen(s1) &gt; sizeof fail_buffer - 1)</div><div class='del'>-	    fatal(1, "Illegal or too-long REPORT string ('%v')", s);</div><div class='del'>-</div><div class='del'>-	old_max = n_reports;</div><div class='del'>-	for (i=0; i &lt; n_reports; i++) {</div><div class='del'>-	    if ( strcmp(s1,report_string[i]) == 0 ) {</div><div class='del'>-		free(report_string[i]);</div><div class='del'>-		report_string[i] = NULL;</div><div class='del'>-		pack++;</div><div class='del'>-		n_reports--;</div><div class='del'>-		if (verbose)</div><div class='del'>-		    logf("clear report (%v)", s);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-        free(s1);</div><div class='del'>-        if (pack)</div><div class='del'>-	    pack_array(report_string,old_max);</div><div class='del'>-	</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (timeout_next) {</div><div class='del'>-	timeout_next = 0;</div><div class='del'>-	timeout = atoi(s);</div><div class='del'>-	</div><div class='del'>-	if (timeout &lt;= 0)</div><div class='del'>-	    timeout = DEFAULT_CHAT_TIMEOUT;</div><div class='del'>-</div><div class='del'>-	if (verbose)</div><div class='del'>-	    logf("timeout set to %d seconds", timeout);</div><div class='del'>-</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * The syntax @filename means read the string to send from the</div><div class='del'>-     * file `filename'.</div><div class='del'>-     */</div><div class='del'>-    if (s[0] == '@') {</div><div class='del'>-	/* skip the @ and any following white-space */</div><div class='del'>-	char *fn = s;</div><div class='del'>-	while (*++fn == ' ' || *fn == '\t')</div><div class='del'>-	    ;</div><div class='del'>-</div><div class='del'>-	if (*fn != 0) {</div><div class='del'>-	    FILE *f;</div><div class='del'>-	    int n = 0;</div><div class='del'>-</div><div class='del'>-	    /* open the file and read until STR_LEN-1 bytes or end-of-file */</div><div class='del'>-	    f = fopen(fn, "r");</div><div class='del'>-	    if (f == NULL)</div><div class='del'>-		fatal(1, "%s -- open failed: %m", fn);</div><div class='del'>-	    while (n &lt; STR_LEN - 1) {</div><div class='del'>-		int nr = fread(&amp;file_data[n], 1, STR_LEN - 1 - n, f);</div><div class='del'>-		if (nr &lt; 0)</div><div class='del'>-		    fatal(1, "%s -- read error", fn);</div><div class='del'>-		if (nr == 0)</div><div class='del'>-		    break;</div><div class='del'>-		n += nr;</div><div class='del'>-	    }</div><div class='del'>-	    fclose(f);</div><div class='del'>-</div><div class='del'>-	    /* use the string we got as the string to send,</div><div class='del'>-	       but trim off the final newline if any. */</div><div class='del'>-	    if (n &gt; 0 &amp;&amp; file_data[n-1] == '\n')</div><div class='del'>-		--n;</div><div class='del'>-	    file_data[n] = 0;</div><div class='del'>-	    s = file_data;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strcmp(s, "EOT") == 0)</div><div class='del'>-	s = "^D\\c";</div><div class='del'>-    else if (strcmp(s, "BREAK") == 0)</div><div class='del'>-	s = "\\K\\c";</div><div class='del'>-</div><div class='del'>-    if (!put_string(s))</div><div class='del'>-	fatal(1, "Failed");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int get_char()</div><div class='del'>-{</div><div class='del'>-    int status;</div><div class='del'>-    char c;</div><div class='del'>-</div><div class='del'>-    status = read(0, &amp;c, 1);</div><div class='del'>-</div><div class='del'>-    switch (status) {</div><div class='del'>-    case 1:</div><div class='del'>-	return ((int)c &amp; 0x7F);</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	logf("warning: read() on stdin returned %d", status);</div><div class='del'>-</div><div class='del'>-    case -1:</div><div class='del'>-	if ((status = fcntl(0, F_GETFL, 0)) == -1)</div><div class='del'>-	    fatal(2, "Can't get file mode flags on stdin: %m");</div><div class='del'>-</div><div class='del'>-	if (fcntl(0, F_SETFL, status &amp; ~O_NONBLOCK) == -1)</div><div class='del'>-	    fatal(2, "Can't set file mode flags on stdin: %m");</div><div class='del'>-	</div><div class='del'>-	return (-1);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int put_char(c)</div><div class='del'>-int c;</div><div class='del'>-{</div><div class='del'>-    int status;</div><div class='del'>-    char ch = c;</div><div class='del'>-</div><div class='del'>-    usleep(10000);		/* inter-character typing delay (?) */</div><div class='del'>-</div><div class='del'>-    status = write(1, &amp;ch, 1);</div><div class='del'>-</div><div class='del'>-    switch (status) {</div><div class='del'>-    case 1:</div><div class='del'>-	return (0);</div><div class='del'>-	</div><div class='del'>-    default:</div><div class='del'>-	logf("warning: write() on stdout returned %d", status);</div><div class='del'>-	</div><div class='del'>-    case -1:</div><div class='del'>-	if ((status = fcntl(0, F_GETFL, 0)) == -1)</div><div class='del'>-	    fatal(2, "Can't get file mode flags on stdin, %m");</div><div class='del'>-</div><div class='del'>-	if (fcntl(0, F_SETFL, status &amp; ~O_NONBLOCK) == -1)</div><div class='del'>-	    fatal(2, "Can't set file mode flags on stdin: %m");</div><div class='del'>-	</div><div class='del'>-	return (-1);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int write_char (c)</div><div class='del'>-int c;</div><div class='del'>-{</div><div class='del'>-    if (alarmed || put_char(c) &lt; 0) {</div><div class='del'>-	alarm(0);</div><div class='del'>-	alarmed = 0;</div><div class='del'>-</div><div class='del'>-	if (verbose) {</div><div class='del'>-	    if (errno == EINTR || errno == EWOULDBLOCK)</div><div class='del'>-		logf(" -- write timed out");</div><div class='del'>-	    else</div><div class='del'>-		logf(" -- write failed: %m");</div><div class='del'>-	}</div><div class='del'>-	return (0);</div><div class='del'>-    }</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int put_string (s)</div><div class='del'>-register char *s;</div><div class='del'>-{</div><div class='del'>-    quiet = 0;</div><div class='del'>-    s = clean(s, 1);</div><div class='del'>-</div><div class='del'>-    if (verbose) {</div><div class='del'>-	if (quiet)</div><div class='del'>-	    logf("send (??????)");</div><div class='del'>-	else</div><div class='del'>-	    logf("send (%v)", s);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    alarm(timeout); alarmed = 0;</div><div class='del'>-</div><div class='del'>-    while (*s) {</div><div class='del'>-	register char c = *s++;</div><div class='del'>-</div><div class='del'>-	if (c != '\\') {</div><div class='del'>-	    if (!write_char (c))</div><div class='del'>-		return 0;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	c = *s++;</div><div class='del'>-	switch (c) {</div><div class='del'>-	case 'd':</div><div class='del'>-	    sleep(1);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'K':</div><div class='del'>-	    break_sequence();</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case 'p':</div><div class='del'>-	    usleep(10000); 	/* 1/100th of a second (arg is microseconds) */</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    if (!write_char (c))</div><div class='del'>-		return 0;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    alarm(0);</div><div class='del'>-    alarmed = 0;</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	Echo a character to stderr.</div><div class='del'>- *	When called with -1, a '\n' character is generated when</div><div class='del'>- *	the cursor is not at the beginning of a line.</div><div class='del'>- */</div><div class='del'>-void echo_stderr(n)</div><div class='del'>-int n;</div><div class='del'>-{</div><div class='del'>-    static int need_lf;</div><div class='del'>-    char *s;</div><div class='del'>-</div><div class='del'>-    switch (n) {</div><div class='del'>-    case '\r':		/* ignore '\r' */</div><div class='del'>-	break;</div><div class='del'>-    case -1:</div><div class='del'>-	if (need_lf == 0)</div><div class='del'>-	    break;</div><div class='del'>-	/* fall through */</div><div class='del'>-    case '\n':</div><div class='del'>-	write(2, "\n", 1);</div><div class='del'>-	need_lf = 0;</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-	s = character(n);</div><div class='del'>-	write(2, s, strlen(s));</div><div class='del'>-	need_lf = 1;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *	'Wait for' this string to appear on this file descriptor.</div><div class='del'>- */</div><div class='del'>-int get_string(string)</div><div class='del'>-register char *string;</div><div class='del'>-{</div><div class='del'>-    char temp[STR_LEN];</div><div class='del'>-    int c, printed = 0, len, minlen;</div><div class='del'>-    register char *s = temp, *end = s + STR_LEN;</div><div class='del'>-    char *logged = temp;</div><div class='del'>-</div><div class='del'>-    fail_reason = (char *)0;</div><div class='del'>-    string = clean(string, 0);</div><div class='del'>-    len = strlen(string);</div><div class='del'>-    minlen = (len &gt; sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;</div><div class='del'>-</div><div class='del'>-    if (verbose)</div><div class='del'>-	logf("expect (%v)", string);</div><div class='del'>-</div><div class='del'>-    if (len &gt; STR_LEN) {</div><div class='del'>-	logf("expect string is too long");</div><div class='del'>-	exit_code = 1;</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (len == 0) {</div><div class='del'>-	if (verbose)</div><div class='del'>-	    logf("got it");</div><div class='del'>-	return (1);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    alarm(timeout);</div><div class='del'>-    alarmed = 0;</div><div class='del'>-</div><div class='del'>-    while ( ! alarmed &amp;&amp; (c = get_char()) &gt;= 0) {</div><div class='del'>-	int n, abort_len, report_len;</div><div class='del'>-</div><div class='del'>-	if (echo)</div><div class='del'>-	    echo_stderr(c);</div><div class='del'>-	if (verbose &amp;&amp; c == '\n') {</div><div class='del'>-	    if (s == logged)</div><div class='del'>-		logf("");	/* blank line */</div><div class='del'>-	    else</div><div class='del'>-		logf("%0.*v", s - logged, logged);</div><div class='del'>-	    logged = s + 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	*s++ = c;</div><div class='del'>-</div><div class='del'>-	if (verbose &amp;&amp; s &gt;= logged + 80) {</div><div class='del'>-	    logf("%0.*v", s - logged, logged);</div><div class='del'>-	    logged = s;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (Verbose) {</div><div class='del'>-	   if (c == '\n')</div><div class='del'>-	       fputc( '\n', stderr );</div><div class='del'>-	   else if (c != '\r')</div><div class='del'>-	       fprintf( stderr, "%s", character(c) );</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!report_gathering) {</div><div class='del'>-	    for (n = 0; n &lt; n_reports; ++n) {</div><div class='del'>-		if ((report_string[n] != (char*) NULL) &amp;&amp;</div><div class='del'>-		    s - temp &gt;= (report_len = strlen(report_string[n])) &amp;&amp;</div><div class='del'>-		    strncmp(s - report_len, report_string[n], report_len) == 0) {</div><div class='del'>-		    time_t time_now   = time ((time_t*) NULL);</div><div class='del'>-		    struct tm* tm_now = localtime (&amp;time_now);</div><div class='del'>-</div><div class='del'>-		    strftime (report_buffer, 20, "%b %d %H:%M:%S ", tm_now);</div><div class='del'>-		    strcat (report_buffer, report_string[n]);</div><div class='del'>-</div><div class='del'>-		    report_string[n] = (char *) NULL;</div><div class='del'>-		    report_gathering = 1;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	else {</div><div class='del'>-	    if (!iscntrl (c)) {</div><div class='del'>-		int rep_len = strlen (report_buffer);</div><div class='del'>-		report_buffer[rep_len]     = c;</div><div class='del'>-		report_buffer[rep_len + 1] = '\0';</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		report_gathering = 0;</div><div class='del'>-		fprintf (report_fp, "chat:  %s\n", report_buffer);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (s - temp &gt;= len &amp;&amp;</div><div class='del'>-	    c == string[len - 1] &amp;&amp;</div><div class='del'>-	    strncmp(s - len, string, len) == 0) {</div><div class='del'>-	    if (verbose) {</div><div class='del'>-		if (s &gt; logged)</div><div class='del'>-		    logf("%0.*v", s - logged, logged);</div><div class='del'>-		logf(" -- got it\n");</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    alarm(0);</div><div class='del'>-	    alarmed = 0;</div><div class='del'>-	    return (1);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (n = 0; n &lt; n_aborts; ++n) {</div><div class='del'>-	    if (s - temp &gt;= (abort_len = strlen(abort_string[n])) &amp;&amp;</div><div class='del'>-		strncmp(s - abort_len, abort_string[n], abort_len) == 0) {</div><div class='del'>-		if (verbose) {</div><div class='del'>-		    if (s &gt; logged)</div><div class='del'>-			logf("%0.*v", s - logged, logged);</div><div class='del'>-		    logf(" -- failed");</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		alarm(0);</div><div class='del'>-		alarmed = 0;</div><div class='del'>-		exit_code = n + 4;</div><div class='del'>-		strcpy(fail_reason = fail_buffer, abort_string[n]);</div><div class='del'>-		return (0);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (s &gt;= end) {</div><div class='del'>-	    if (logged &lt; s - minlen) {</div><div class='del'>-		if (verbose)</div><div class='del'>-		    logf("%0.*v", s - logged, logged);</div><div class='del'>-		logged = s;</div><div class='del'>-	    }</div><div class='del'>-	    s -= minlen;</div><div class='del'>-	    memmove(temp, s, minlen);</div><div class='del'>-	    logged = temp + (logged - s);</div><div class='del'>-	    s = temp + minlen;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (alarmed &amp;&amp; verbose)</div><div class='del'>-	    logf("warning: alarm synchronization problem");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    alarm(0);</div><div class='del'>-    </div><div class='del'>-    if (verbose &amp;&amp; printed) {</div><div class='del'>-	if (alarmed)</div><div class='del'>-	    logf(" -- read timed out");</div><div class='del'>-	else</div><div class='del'>-	    logf(" -- read failed: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    exit_code = 3;</div><div class='del'>-    alarmed   = 0;</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Gross kludge to handle Solaris versions &gt;= 2.6 having usleep.</div><div class='del'>- */</div><div class='del'>-#ifdef SOL2</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#if MAXUID &gt; 65536		/* then this is Solaris 2.6 or later */</div><div class='del'>-#undef NO_USLEEP</div><div class='del'>-#endif</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-#ifdef NO_USLEEP</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-  usleep -- support routine for 4.2BSD system call emulations</div><div class='del'>-  last edit:  29-Oct-1984     D A Gwyn</div><div class='del'>-  */</div><div class='del'>-</div><div class='del'>-extern int	  select();</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-usleep( usec )				  /* returns 0 if ok, else -1 */</div><div class='del'>-    long		usec;		/* delay in microseconds */</div><div class='del'>-{</div><div class='del'>-    static struct {		/* `timeval' */</div><div class='del'>-	long	tv_sec;		/* seconds */</div><div class='del'>-	long	tv_usec;	/* microsecs */</div><div class='del'>-    } delay;	    		/* _select() timeout */</div><div class='del'>-</div><div class='del'>-    delay.tv_sec  = usec / 1000000L;</div><div class='del'>-    delay.tv_usec = usec % 1000000L;</div><div class='del'>-</div><div class='del'>-    return select(0, (long *)0, (long *)0, (long *)0, &amp;delay);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-pack_array (array, end)</div><div class='del'>-    char **array; /* The address of the array of string pointers */</div><div class='del'>-    int    end;   /* The index of the next free entry before CLR_ */</div><div class='del'>-{</div><div class='del'>-    int i, j;</div><div class='del'>-</div><div class='del'>-    for (i = 0; i &lt; end; i++) {</div><div class='del'>-	if (array[i] == NULL) {</div><div class='del'>-	    for (j = i+1; j &lt; end; ++j)</div><div class='del'>-		if (array[j] != NULL)</div><div class='del'>-		    array[i++] = array[j];</div><div class='del'>-	    for (; i &lt; end; ++i)</div><div class='del'>-		array[i] = NULL;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * vfmtmsg - format a message into a buffer.  Like vsprintf except we</div><div class='del'>- * also specify the length of the output buffer, and we handle the</div><div class='del'>- * %m (error message) format.</div><div class='del'>- * Doesn't do floating-point formats.</div><div class='del'>- * Returns the number of chars put into buf.</div><div class='del'>- */</div><div class='del'>-#define OUTCHAR(c)	(buflen &gt; 0? (--buflen, *buf++ = (c)): 0)</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-vfmtmsg(buf, buflen, fmt, args)</div><div class='del'>-    char *buf;</div><div class='del'>-    int buflen;</div><div class='del'>-    const char *fmt;</div><div class='del'>-    va_list args;</div><div class='del'>-{</div><div class='del'>-    int c, i, n;</div><div class='del'>-    int width, prec, fillch;</div><div class='del'>-    int base, len, neg, quoted;</div><div class='del'>-    unsigned long val = 0;</div><div class='del'>-    char *str, *buf0;</div><div class='del'>-    const char *f;</div><div class='del'>-    unsigned char *p;</div><div class='del'>-    char num[32];</div><div class='del'>-    static char hexchars[] = "0123456789abcdef";</div><div class='del'>-</div><div class='del'>-    buf0 = buf;</div><div class='del'>-    --buflen;</div><div class='del'>-    while (buflen &gt; 0) {</div><div class='del'>-	for (f = fmt; *f != '%' &amp;&amp; *f != 0; ++f)</div><div class='del'>-	    ;</div><div class='del'>-	if (f &gt; fmt) {</div><div class='del'>-	    len = f - fmt;</div><div class='del'>-	    if (len &gt; buflen)</div><div class='del'>-		len = buflen;</div><div class='del'>-	    memcpy(buf, fmt, len);</div><div class='del'>-	    buf += len;</div><div class='del'>-	    buflen -= len;</div><div class='del'>-	    fmt = f;</div><div class='del'>-	}</div><div class='del'>-	if (*fmt == 0)</div><div class='del'>-	    break;</div><div class='del'>-	c = *++fmt;</div><div class='del'>-	width = prec = 0;</div><div class='del'>-	fillch = ' ';</div><div class='del'>-	if (c == '0') {</div><div class='del'>-	    fillch = '0';</div><div class='del'>-	    c = *++fmt;</div><div class='del'>-	}</div><div class='del'>-	if (c == '*') {</div><div class='del'>-	    width = va_arg(args, int);</div><div class='del'>-	    c = *++fmt;</div><div class='del'>-	} else {</div><div class='del'>-	    while (isdigit(c)) {</div><div class='del'>-		width = width * 10 + c - '0';</div><div class='del'>-		c = *++fmt;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (c == '.') {</div><div class='del'>-	    c = *++fmt;</div><div class='del'>-	    if (c == '*') {</div><div class='del'>-		prec = va_arg(args, int);</div><div class='del'>-		c = *++fmt;</div><div class='del'>-	    } else {</div><div class='del'>-		while (isdigit(c)) {</div><div class='del'>-		    prec = prec * 10 + c - '0';</div><div class='del'>-		    c = *++fmt;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	str = 0;</div><div class='del'>-	base = 0;</div><div class='del'>-	neg = 0;</div><div class='del'>-	++fmt;</div><div class='del'>-	switch (c) {</div><div class='del'>-	case 'd':</div><div class='del'>-	    i = va_arg(args, int);</div><div class='del'>-	    if (i &lt; 0) {</div><div class='del'>-		neg = 1;</div><div class='del'>-		val = -i;</div><div class='del'>-	    } else</div><div class='del'>-		val = i;</div><div class='del'>-	    base = 10;</div><div class='del'>-	    break;</div><div class='del'>-	case 'o':</div><div class='del'>-	    val = va_arg(args, unsigned int);</div><div class='del'>-	    base = 8;</div><div class='del'>-	    break;</div><div class='del'>-	case 'x':</div><div class='del'>-	    val = va_arg(args, unsigned int);</div><div class='del'>-	    base = 16;</div><div class='del'>-	    break;</div><div class='del'>-	case 'p':</div><div class='del'>-	    val = (unsigned long) va_arg(args, void *);</div><div class='del'>-	    base = 16;</div><div class='del'>-	    neg = 2;</div><div class='del'>-	    break;</div><div class='del'>-	case 's':</div><div class='del'>-	    str = va_arg(args, char *);</div><div class='del'>-	    break;</div><div class='del'>-	case 'c':</div><div class='del'>-	    num[0] = va_arg(args, int);</div><div class='del'>-	    num[1] = 0;</div><div class='del'>-	    str = num;</div><div class='del'>-	    break;</div><div class='del'>-	case 'm':</div><div class='del'>-	    str = strerror(errno);</div><div class='del'>-	    break;</div><div class='del'>-	case 'v':		/* "visible" string */</div><div class='del'>-	case 'q':		/* quoted string */</div><div class='del'>-	    quoted = c == 'q';</div><div class='del'>-	    p = va_arg(args, unsigned char *);</div><div class='del'>-	    if (fillch == '0' &amp;&amp; prec &gt; 0) {</div><div class='del'>-		n = prec;</div><div class='del'>-	    } else {</div><div class='del'>-		n = strlen((char *)p);</div><div class='del'>-		if (prec &gt; 0 &amp;&amp; prec &lt; n)</div><div class='del'>-		    n = prec;</div><div class='del'>-	    }</div><div class='del'>-	    while (n &gt; 0 &amp;&amp; buflen &gt; 0) {</div><div class='del'>-		c = *p++;</div><div class='del'>-		--n;</div><div class='del'>-		if (!quoted &amp;&amp; c &gt;= 0x80) {</div><div class='del'>-		    OUTCHAR('M');</div><div class='del'>-		    OUTCHAR('-');</div><div class='del'>-		    c -= 0x80;</div><div class='del'>-		}</div><div class='del'>-		if (quoted &amp;&amp; (c == '"' || c == '\\'))</div><div class='del'>-		    OUTCHAR('\\');</div><div class='del'>-		if (c &lt; 0x20 || (0x7f &lt;= c &amp;&amp; c &lt; 0xa0)) {</div><div class='del'>-		    if (quoted) {</div><div class='del'>-			OUTCHAR('\\');</div><div class='del'>-			switch (c) {</div><div class='del'>-			case '\t':	OUTCHAR('t');	break;</div><div class='del'>-			case '\n':	OUTCHAR('n');	break;</div><div class='del'>-			case '\b':	OUTCHAR('b');	break;</div><div class='del'>-			case '\f':	OUTCHAR('f');	break;</div><div class='del'>-			default:</div><div class='del'>-			    OUTCHAR('x');</div><div class='del'>-			    OUTCHAR(hexchars[c &gt;&gt; 4]);</div><div class='del'>-			    OUTCHAR(hexchars[c &amp; 0xf]);</div><div class='del'>-			}</div><div class='del'>-		    } else {</div><div class='del'>-			if (c == '\t')</div><div class='del'>-			    OUTCHAR(c);</div><div class='del'>-			else {</div><div class='del'>-			    OUTCHAR('^');</div><div class='del'>-			    OUTCHAR(c ^ 0x40);</div><div class='del'>-			}</div><div class='del'>-		    }</div><div class='del'>-		} else</div><div class='del'>-		    OUTCHAR(c);</div><div class='del'>-	    }</div><div class='del'>-	    continue;</div><div class='del'>-	default:</div><div class='del'>-	    *buf++ = '%';</div><div class='del'>-	    if (c != '%')</div><div class='del'>-		--fmt;		/* so %z outputs %z etc. */</div><div class='del'>-	    --buflen;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	if (base != 0) {</div><div class='del'>-	    str = num + sizeof(num);</div><div class='del'>-	    *--str = 0;</div><div class='del'>-	    while (str &gt; num + neg) {</div><div class='del'>-		*--str = hexchars[val % base];</div><div class='del'>-		val = val / base;</div><div class='del'>-		if (--prec &lt;= 0 &amp;&amp; val == 0)</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    switch (neg) {</div><div class='del'>-	    case 1:</div><div class='del'>-		*--str = '-';</div><div class='del'>-		break;</div><div class='del'>-	    case 2:</div><div class='del'>-		*--str = 'x';</div><div class='del'>-		*--str = '0';</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    len = num + sizeof(num) - 1 - str;</div><div class='del'>-	} else {</div><div class='del'>-	    len = strlen(str);</div><div class='del'>-	    if (prec &gt; 0 &amp;&amp; len &gt; prec)</div><div class='del'>-		len = prec;</div><div class='del'>-	}</div><div class='del'>-	if (width &gt; 0) {</div><div class='del'>-	    if (width &gt; buflen)</div><div class='del'>-		width = buflen;</div><div class='del'>-	    if ((n = width - len) &gt; 0) {</div><div class='del'>-		buflen -= n;</div><div class='del'>-		for (; n &gt; 0; --n)</div><div class='del'>-		    *buf++ = fillch;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (len &gt; buflen)</div><div class='del'>-	    len = buflen;</div><div class='del'>-	memcpy(buf, str, len);</div><div class='del'>-	buf += len;</div><div class='del'>-	buflen -= len;</div><div class='del'>-    }</div><div class='del'>-    *buf = 0;</div><div class='del'>-    return buf - buf0;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/common/zlib.c b/mdk-stage1/ppp/common/zlib.c<br/>deleted file mode 100644<br/>index 503076886..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/common/zlib.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/common/zlib.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5376 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * This file is derived from various .h and .c files from the zlib-1.0.4</div><div class='del'>- * distribution by Jean-loup Gailly and Mark Adler, with some additions</div><div class='del'>- * by Paul Mackerras to aid in implementing Deflate compression and</div><div class='del'>- * decompression for PPP packets.  See zlib.h for conditions of</div><div class='del'>- * distribution and use.</div><div class='del'>- *</div><div class='del'>- * Changes that have been made include:</div><div class='del'>- * - added Z_PACKET_FLUSH (see zlib.h for details)</div><div class='del'>- * - added inflateIncomp and deflateOutputPending</div><div class='del'>- * - allow strm-&gt;next_out to be NULL, meaning discard the output</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- *  ==FILEVERSION 971210==</div><div class='del'>- *</div><div class='del'>- * This marker is used by the Linux installation script to determine</div><div class='del'>- * whether an up-to-date version of this file is already installed.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NO_DUMMY_DECL</div><div class='del'>-#define NO_ZCFUNCS</div><div class='del'>-#define MY_ZCALLOC</div><div class='del'>-</div><div class='del'>-#if defined(__FreeBSD__) &amp;&amp; (defined(KERNEL) || defined(_KERNEL))</div><div class='del'>-#define inflate	inflate_ppp	/* FreeBSD already has an inflate :-( */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* +++ zutil.h */</div><div class='del'>-/* zutil.h -- internal interface and configuration of the compression library</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly.</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: zutil.h,v 1.16 1996/07/24 13:41:13 me Exp $ */</div><div class='del'>-</div><div class='del'>-#ifndef _Z_UTIL_H</div><div class='del'>-#define _Z_UTIL_H</div><div class='del'>-</div><div class='del'>-#include "zlib.h"</div><div class='del'>-</div><div class='del'>-#if defined(KERNEL) || defined(_KERNEL)</div><div class='del'>-/* Assume this is a *BSD or SVR4 kernel */</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/systm.h&gt;</div><div class='del'>-#undef u</div><div class='del'>-#  define HAVE_MEMCPY</div><div class='del'>-#  define memcpy(d, s, n)	bcopy((s), (d), (n))</div><div class='del'>-#  define memset(d, v, n)	bzero((d), (n))</div><div class='del'>-#  define memcmp		bcmp</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-#if defined(__KERNEL__)</div><div class='del'>-/* Assume this is a Linux kernel */</div><div class='del'>-#include &lt;linux/string.h&gt;</div><div class='del'>-#define HAVE_MEMCPY</div><div class='del'>-</div><div class='del'>-#else /* not kernel */</div><div class='del'>-</div><div class='del'>-#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS)</div><div class='del'>-#   include &lt;stddef.h&gt;</div><div class='del'>-#   include &lt;errno.h&gt;</div><div class='del'>-#else</div><div class='del'>-    extern int errno;</div><div class='del'>-#endif</div><div class='del'>-#ifdef STDC</div><div class='del'>-#  include &lt;string.h&gt;</div><div class='del'>-#  include &lt;stdlib.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-#endif /* _KERNEL || KERNEL */</div><div class='del'>-</div><div class='del'>-#ifndef local</div><div class='del'>-#  define local static</div><div class='del'>-#endif</div><div class='del'>-/* compile with -Dlocal if your debugger can't find static symbols */</div><div class='del'>-</div><div class='del'>-typedef unsigned char  uch;</div><div class='del'>-typedef uch FAR uchf;</div><div class='del'>-typedef unsigned short ush;</div><div class='del'>-typedef ush FAR ushf;</div><div class='del'>-typedef unsigned long  ulg;</div><div class='del'>-</div><div class='del'>-extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */</div><div class='del'>-/* (size given to avoid silly warnings with Visual C++) */</div><div class='del'>-</div><div class='del'>-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]</div><div class='del'>-</div><div class='del'>-#define ERR_RETURN(strm,err) \</div><div class='del'>-  return (strm-&gt;msg = (char*)ERR_MSG(err), (err))</div><div class='del'>-/* To be used only when the state is known to be valid */</div><div class='del'>-</div><div class='del'>-        /* common constants */</div><div class='del'>-</div><div class='del'>-#ifndef DEF_WBITS</div><div class='del'>-#  define DEF_WBITS MAX_WBITS</div><div class='del'>-#endif</div><div class='del'>-/* default windowBits for decompression. MAX_WBITS is for compression only */</div><div class='del'>-</div><div class='del'>-#if MAX_MEM_LEVEL &gt;= 8</div><div class='del'>-#  define DEF_MEM_LEVEL 8</div><div class='del'>-#else</div><div class='del'>-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL</div><div class='del'>-#endif</div><div class='del'>-/* default memLevel */</div><div class='del'>-</div><div class='del'>-#define STORED_BLOCK 0</div><div class='del'>-#define STATIC_TREES 1</div><div class='del'>-#define DYN_TREES    2</div><div class='del'>-/* The three kinds of block type */</div><div class='del'>-</div><div class='del'>-#define MIN_MATCH  3</div><div class='del'>-#define MAX_MATCH  258</div><div class='del'>-/* The minimum and maximum match lengths */</div><div class='del'>-</div><div class='del'>-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */</div><div class='del'>-</div><div class='del'>-        /* target dependencies */</div><div class='del'>-</div><div class='del'>-#ifdef MSDOS</div><div class='del'>-#  define OS_CODE  0x00</div><div class='del'>-#  ifdef __TURBOC__</div><div class='del'>-#    include &lt;alloc.h&gt;</div><div class='del'>-#  else /* MSC or DJGPP */</div><div class='del'>-#    include &lt;malloc.h&gt;</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef OS2</div><div class='del'>-#  define OS_CODE  0x06</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef WIN32 /* Window 95 &amp; Windows NT */</div><div class='del'>-#  define OS_CODE  0x0b</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(VAXC) || defined(VMS)</div><div class='del'>-#  define OS_CODE  0x02</div><div class='del'>-#  define FOPEN(name, mode) \</div><div class='del'>-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef AMIGA</div><div class='del'>-#  define OS_CODE  0x01</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(ATARI) || defined(atarist)</div><div class='del'>-#  define OS_CODE  0x05</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef MACOS</div><div class='del'>-#  define OS_CODE  0x07</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __50SERIES /* Prime/PRIMOS */</div><div class='del'>-#  define OS_CODE  0x0F</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef TOPS20</div><div class='del'>-#  define OS_CODE  0x0a</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(_BEOS_) || defined(RISCOS)</div><div class='del'>-#  define fdopen(fd,mode) NULL /* No fdopen() */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-        /* Common defaults */</div><div class='del'>-</div><div class='del'>-#ifndef OS_CODE</div><div class='del'>-#  define OS_CODE  0x03  /* assume Unix */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef FOPEN</div><div class='del'>-#  define FOPEN(name, mode) fopen((name), (mode))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-         /* functions */</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_STRERROR</div><div class='del'>-   extern char *strerror OF((int));</div><div class='del'>-#  define zstrerror(errnum) strerror(errnum)</div><div class='del'>-#else</div><div class='del'>-#  define zstrerror(errnum) ""</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if defined(pyr)</div><div class='del'>-#  define NO_MEMCPY</div><div class='del'>-#endif</div><div class='del'>-#if (defined(M_I86SM) || defined(M_I86MM)) &amp;&amp; !defined(_MSC_VER)</div><div class='del'>- /* Use our own functions for small and medium model with MSC &lt;= 5.0.</div><div class='del'>-  * You may have to use the same strategy for Borland C (untested).</div><div class='del'>-  */</div><div class='del'>-#  define NO_MEMCPY</div><div class='del'>-#endif</div><div class='del'>-#if defined(STDC) &amp;&amp; !defined(HAVE_MEMCPY) &amp;&amp; !defined(NO_MEMCPY)</div><div class='del'>-#  define HAVE_MEMCPY</div><div class='del'>-#endif</div><div class='del'>-#ifdef HAVE_MEMCPY</div><div class='del'>-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */</div><div class='del'>-#    define zmemcpy _fmemcpy</div><div class='del'>-#    define zmemcmp _fmemcmp</div><div class='del'>-#    define zmemzero(dest, len) _fmemset(dest, 0, len)</div><div class='del'>-#  else</div><div class='del'>-#    define zmemcpy memcpy</div><div class='del'>-#    define zmemcmp memcmp</div><div class='del'>-#    define zmemzero(dest, len) memset(dest, 0, len)</div><div class='del'>-#  endif</div><div class='del'>-#else</div><div class='del'>-   extern void zmemcpy  OF((Bytef* dest, Bytef* source, uInt len));</div><div class='del'>-   extern int  zmemcmp  OF((Bytef* s1,   Bytef* s2, uInt len));</div><div class='del'>-   extern void zmemzero OF((Bytef* dest, uInt len));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Diagnostic functions */</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-#  include &lt;stdio.h&gt;</div><div class='del'>-#  ifndef verbose</div><div class='del'>-#    define verbose 0</div><div class='del'>-#  endif</div><div class='del'>-   extern void z_error    OF((char *m));</div><div class='del'>-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}</div><div class='del'>-#  define Trace(x) fprintf x</div><div class='del'>-#  define Tracev(x) {if (verbose) fprintf x ;}</div><div class='del'>-#  define Tracevv(x) {if (verbose&gt;1) fprintf x ;}</div><div class='del'>-#  define Tracec(c,x) {if (verbose &amp;&amp; (c)) fprintf x ;}</div><div class='del'>-#  define Tracecv(c,x) {if (verbose&gt;1 &amp;&amp; (c)) fprintf x ;}</div><div class='del'>-#else</div><div class='del'>-#  define Assert(cond,msg)</div><div class='del'>-#  define Trace(x)</div><div class='del'>-#  define Tracev(x)</div><div class='del'>-#  define Tracevv(x)</div><div class='del'>-#  define Tracec(c,x)</div><div class='del'>-#  define Tracecv(c,x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len));</div><div class='del'>-</div><div class='del'>-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));</div><div class='del'>-void   zcfree  OF((voidpf opaque, voidpf ptr));</div><div class='del'>-</div><div class='del'>-#define ZALLOC(strm, items, size) \</div><div class='del'>-           (*((strm)-&gt;zalloc))((strm)-&gt;opaque, (items), (size))</div><div class='del'>-#define ZFREE(strm, addr)  (*((strm)-&gt;zfree))((strm)-&gt;opaque, (voidpf)(addr))</div><div class='del'>-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}</div><div class='del'>-</div><div class='del'>-#endif /* _Z_UTIL_H */</div><div class='del'>-/* --- zutil.h */</div><div class='del'>-</div><div class='del'>-/* +++ deflate.h */</div><div class='del'>-/* deflate.h -- internal compression state</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: deflate.h,v 1.10 1996/07/02 12:41:00 me Exp $ */</div><div class='del'>-</div><div class='del'>-#ifndef _DEFLATE_H</div><div class='del'>-#define _DEFLATE_H</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Internal compression state.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define LENGTH_CODES 29</div><div class='del'>-/* number of length codes, not counting the special END_BLOCK code */</div><div class='del'>-</div><div class='del'>-#define LITERALS  256</div><div class='del'>-/* number of literal bytes 0..255 */</div><div class='del'>-</div><div class='del'>-#define L_CODES (LITERALS+1+LENGTH_CODES)</div><div class='del'>-/* number of Literal or Length codes, including the END_BLOCK code */</div><div class='del'>-</div><div class='del'>-#define D_CODES   30</div><div class='del'>-/* number of distance codes */</div><div class='del'>-</div><div class='del'>-#define BL_CODES  19</div><div class='del'>-/* number of codes used to transfer the bit lengths */</div><div class='del'>-</div><div class='del'>-#define HEAP_SIZE (2*L_CODES+1)</div><div class='del'>-/* maximum heap size */</div><div class='del'>-</div><div class='del'>-#define MAX_BITS 15</div><div class='del'>-/* All codes must not exceed MAX_BITS bits */</div><div class='del'>-</div><div class='del'>-#define INIT_STATE    42</div><div class='del'>-#define BUSY_STATE   113</div><div class='del'>-#define FINISH_STATE 666</div><div class='del'>-/* Stream status */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Data structure describing a single value and its code string. */</div><div class='del'>-typedef struct ct_data_s {</div><div class='del'>-    union {</div><div class='del'>-        ush  freq;       /* frequency count */</div><div class='del'>-        ush  code;       /* bit string */</div><div class='del'>-    } fc;</div><div class='del'>-    union {</div><div class='del'>-        ush  dad;        /* father node in Huffman tree */</div><div class='del'>-        ush  len;        /* length of bit string */</div><div class='del'>-    } dl;</div><div class='del'>-} FAR ct_data;</div><div class='del'>-</div><div class='del'>-#define Freq fc.freq</div><div class='del'>-#define Code fc.code</div><div class='del'>-#define Dad  dl.dad</div><div class='del'>-#define Len  dl.len</div><div class='del'>-</div><div class='del'>-typedef struct static_tree_desc_s  static_tree_desc;</div><div class='del'>-</div><div class='del'>-typedef struct tree_desc_s {</div><div class='del'>-    ct_data *dyn_tree;           /* the dynamic tree */</div><div class='del'>-    int     max_code;            /* largest code with non zero frequency */</div><div class='del'>-    static_tree_desc *stat_desc; /* the corresponding static tree */</div><div class='del'>-} FAR tree_desc;</div><div class='del'>-</div><div class='del'>-typedef ush Pos;</div><div class='del'>-typedef Pos FAR Posf;</div><div class='del'>-typedef unsigned IPos;</div><div class='del'>-</div><div class='del'>-/* A Pos is an index in the character window. We use short instead of int to</div><div class='del'>- * save space in the various tables. IPos is used only for parameter passing.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef struct deflate_state {</div><div class='del'>-    z_streamp strm;      /* pointer back to this zlib stream */</div><div class='del'>-    int   status;        /* as the name implies */</div><div class='del'>-    Bytef *pending_buf;  /* output still pending */</div><div class='del'>-    ulg   pending_buf_size; /* size of pending_buf */</div><div class='del'>-    Bytef *pending_out;  /* next pending byte to output to the stream */</div><div class='del'>-    int   pending;       /* nb of bytes in the pending buffer */</div><div class='del'>-    int   noheader;      /* suppress zlib header and adler32 */</div><div class='del'>-    Byte  data_type;     /* UNKNOWN, BINARY or ASCII */</div><div class='del'>-    Byte  method;        /* STORED (for zip only) or DEFLATED */</div><div class='del'>-    int   last_flush;    /* value of flush param for previous deflate call */</div><div class='del'>-</div><div class='del'>-                /* used by deflate.c: */</div><div class='del'>-</div><div class='del'>-    uInt  w_size;        /* LZ77 window size (32K by default) */</div><div class='del'>-    uInt  w_bits;        /* log2(w_size)  (8..16) */</div><div class='del'>-    uInt  w_mask;        /* w_size - 1 */</div><div class='del'>-</div><div class='del'>-    Bytef *window;</div><div class='del'>-    /* Sliding window. Input bytes are read into the second half of the window,</div><div class='del'>-     * and move to the first half later to keep a dictionary of at least wSize</div><div class='del'>-     * bytes. With this organization, matches are limited to a distance of</div><div class='del'>-     * wSize-MAX_MATCH bytes, but this ensures that IO is always</div><div class='del'>-     * performed with a length multiple of the block size. Also, it limits</div><div class='del'>-     * the window size to 64K, which is quite useful on MSDOS.</div><div class='del'>-     * To do: use the user input buffer as sliding window.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    ulg window_size;</div><div class='del'>-    /* Actual size of window: 2*wSize, except when the user input buffer</div><div class='del'>-     * is directly used as sliding window.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    Posf *prev;</div><div class='del'>-    /* Link to older string with same hash index. To limit the size of this</div><div class='del'>-     * array to 64K, this link is maintained only for the last 32K strings.</div><div class='del'>-     * An index in this array is thus a window index modulo 32K.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    Posf *head; /* Heads of the hash chains or NIL. */</div><div class='del'>-</div><div class='del'>-    uInt  ins_h;          /* hash index of string to be inserted */</div><div class='del'>-    uInt  hash_size;      /* number of elements in hash table */</div><div class='del'>-    uInt  hash_bits;      /* log2(hash_size) */</div><div class='del'>-    uInt  hash_mask;      /* hash_size-1 */</div><div class='del'>-</div><div class='del'>-    uInt  hash_shift;</div><div class='del'>-    /* Number of bits by which ins_h must be shifted at each input</div><div class='del'>-     * step. It must be such that after MIN_MATCH steps, the oldest</div><div class='del'>-     * byte no longer takes part in the hash key, that is:</div><div class='del'>-     *   hash_shift * MIN_MATCH &gt;= hash_bits</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    long block_start;</div><div class='del'>-    /* Window position at the beginning of the current output block. Gets</div><div class='del'>-     * negative when the window is moved backwards.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uInt match_length;           /* length of best match */</div><div class='del'>-    IPos prev_match;             /* previous match */</div><div class='del'>-    int match_available;         /* set if previous match exists */</div><div class='del'>-    uInt strstart;               /* start of string to insert */</div><div class='del'>-    uInt match_start;            /* start of matching string */</div><div class='del'>-    uInt lookahead;              /* number of valid bytes ahead in window */</div><div class='del'>-</div><div class='del'>-    uInt prev_length;</div><div class='del'>-    /* Length of the best match at previous step. Matches not greater than this</div><div class='del'>-     * are discarded. This is used in the lazy match evaluation.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uInt max_chain_length;</div><div class='del'>-    /* To speed up deflation, hash chains are never searched beyond this</div><div class='del'>-     * length.  A higher limit improves compression ratio but degrades the</div><div class='del'>-     * speed.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uInt max_lazy_match;</div><div class='del'>-    /* Attempt to find a better match only when the current match is strictly</div><div class='del'>-     * smaller than this value. This mechanism is used only for compression</div><div class='del'>-     * levels &gt;= 4.</div><div class='del'>-     */</div><div class='del'>-#   define max_insert_length  max_lazy_match</div><div class='del'>-    /* Insert new strings in the hash table only if the match length is not</div><div class='del'>-     * greater than this length. This saves time but degrades compression.</div><div class='del'>-     * max_insert_length is used only for compression levels &lt;= 3.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    int level;    /* compression level (1..9) */</div><div class='del'>-    int strategy; /* favor or force Huffman coding*/</div><div class='del'>-</div><div class='del'>-    uInt good_match;</div><div class='del'>-    /* Use a faster search when the previous match is longer than this */</div><div class='del'>-</div><div class='del'>-    int nice_match; /* Stop searching when current match exceeds this */</div><div class='del'>-</div><div class='del'>-                /* used by trees.c: */</div><div class='del'>-    /* Didn't use ct_data typedef below to supress compiler warning */</div><div class='del'>-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */</div><div class='del'>-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */</div><div class='del'>-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */</div><div class='del'>-</div><div class='del'>-    struct tree_desc_s l_desc;               /* desc. for literal tree */</div><div class='del'>-    struct tree_desc_s d_desc;               /* desc. for distance tree */</div><div class='del'>-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */</div><div class='del'>-</div><div class='del'>-    ush bl_count[MAX_BITS+1];</div><div class='del'>-    /* number of codes at each bit length for an optimal tree */</div><div class='del'>-</div><div class='del'>-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */</div><div class='del'>-    int heap_len;               /* number of elements in the heap */</div><div class='del'>-    int heap_max;               /* element of largest frequency */</div><div class='del'>-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.</div><div class='del'>-     * The same heap array is used to build all trees.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uch depth[2*L_CODES+1];</div><div class='del'>-    /* Depth of each subtree used as tie breaker for trees of equal frequency</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uchf *l_buf;          /* buffer for literals or lengths */</div><div class='del'>-</div><div class='del'>-    uInt  lit_bufsize;</div><div class='del'>-    /* Size of match buffer for literals/lengths.  There are 4 reasons for</div><div class='del'>-     * limiting lit_bufsize to 64K:</div><div class='del'>-     *   - frequencies can be kept in 16 bit counters</div><div class='del'>-     *   - if compression is not successful for the first block, all input</div><div class='del'>-     *     data is still in the window so we can still emit a stored block even</div><div class='del'>-     *     when input comes from standard input.  (This can also be done for</div><div class='del'>-     *     all blocks if lit_bufsize is not greater than 32K.)</div><div class='del'>-     *   - if compression is not successful for a file smaller than 64K, we can</div><div class='del'>-     *     even emit a stored file instead of a stored block (saving 5 bytes).</div><div class='del'>-     *     This is applicable only for zip (not gzip or zlib).</div><div class='del'>-     *   - creating new Huffman trees less frequently may not provide fast</div><div class='del'>-     *     adaptation to changes in the input data statistics. (Take for</div><div class='del'>-     *     example a binary file with poorly compressible code followed by</div><div class='del'>-     *     a highly compressible string table.) Smaller buffer sizes give</div><div class='del'>-     *     fast adaptation but have of course the overhead of transmitting</div><div class='del'>-     *     trees more frequently.</div><div class='del'>-     *   - I can't count above 4</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    uInt last_lit;      /* running index in l_buf */</div><div class='del'>-</div><div class='del'>-    ushf *d_buf;</div><div class='del'>-    /* Buffer for distances. To simplify the code, d_buf and l_buf have</div><div class='del'>-     * the same number of elements. To use different lengths, an extra flag</div><div class='del'>-     * array would be necessary.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    ulg opt_len;        /* bit length of current block with optimal trees */</div><div class='del'>-    ulg static_len;     /* bit length of current block with static trees */</div><div class='del'>-    ulg compressed_len; /* total bit length of compressed file */</div><div class='del'>-    uInt matches;       /* number of string matches in current block */</div><div class='del'>-    int last_eob_len;   /* bit length of EOB code for last block */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-    ulg bits_sent;      /* bit length of the compressed data */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    ush bi_buf;</div><div class='del'>-    /* Output buffer. bits are inserted starting at the bottom (least</div><div class='del'>-     * significant bits).</div><div class='del'>-     */</div><div class='del'>-    int bi_valid;</div><div class='del'>-    /* Number of valid bits in bi_buf.  All bits above the last valid bit</div><div class='del'>-     * are always zero.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-} FAR deflate_state;</div><div class='del'>-</div><div class='del'>-/* Output a byte on the stream.</div><div class='del'>- * IN assertion: there is enough room in pending_buf.</div><div class='del'>- */</div><div class='del'>-#define put_byte(s, c) {s-&gt;pending_buf[s-&gt;pending++] = (c);}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)</div><div class='del'>-/* Minimum amount of lookahead, except at the end of the input file.</div><div class='del'>- * See deflate.c for comments about the MIN_MATCH+1.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define MAX_DIST(s)  ((s)-&gt;w_size-MIN_LOOKAHEAD)</div><div class='del'>-/* In order to simplify the code, particularly on 16 bit machines, match</div><div class='del'>- * distances are limited to MAX_DIST instead of WSIZE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-        /* in trees.c */</div><div class='del'>-void _tr_init         OF((deflate_state *s));</div><div class='del'>-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));</div><div class='del'>-ulg  _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,</div><div class='del'>-			  int eof));</div><div class='del'>-void _tr_align        OF((deflate_state *s));</div><div class='del'>-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,</div><div class='del'>-                          int eof));</div><div class='del'>-void _tr_stored_type_only OF((deflate_state *));</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-/* --- deflate.h */</div><div class='del'>-</div><div class='del'>-/* +++ deflate.c */</div><div class='del'>-/* deflate.c -- compress data using the deflation algorithm</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly.</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ALGORITHM</div><div class='del'>- *</div><div class='del'>- *      The "deflation" process depends on being able to identify portions</div><div class='del'>- *      of the input text which are identical to earlier input (within a</div><div class='del'>- *      sliding window trailing behind the input currently being processed).</div><div class='del'>- *</div><div class='del'>- *      The most straightforward technique turns out to be the fastest for</div><div class='del'>- *      most input files: try all possible matches and select the longest.</div><div class='del'>- *      The key feature of this algorithm is that insertions into the string</div><div class='del'>- *      dictionary are very simple and thus fast, and deletions are avoided</div><div class='del'>- *      completely. Insertions are performed at each input character, whereas</div><div class='del'>- *      string matches are performed only when the previous match ends. So it</div><div class='del'>- *      is preferable to spend more time in matches to allow very fast string</div><div class='del'>- *      insertions and avoid deletions. The matching algorithm for small</div><div class='del'>- *      strings is inspired from that of Rabin &amp; Karp. A brute force approach</div><div class='del'>- *      is used to find longer strings when a small match has been found.</div><div class='del'>- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze</div><div class='del'>- *      (by Leonid Broukhis).</div><div class='del'>- *         A previous version of this file used a more sophisticated algorithm</div><div class='del'>- *      (by Fiala and Greene) which is guaranteed to run in linear amortized</div><div class='del'>- *      time, but has a larger average cost, uses more memory and is patented.</div><div class='del'>- *      However the F&amp;G algorithm may be faster for some highly redundant</div><div class='del'>- *      files if the parameter max_chain_length (described below) is too large.</div><div class='del'>- *</div><div class='del'>- *  ACKNOWLEDGEMENTS</div><div class='del'>- *</div><div class='del'>- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and</div><div class='del'>- *      I found it in 'freeze' written by Leonid Broukhis.</div><div class='del'>- *      Thanks to many people for bug reports and testing.</div><div class='del'>- *</div><div class='del'>- *  REFERENCES</div><div class='del'>- *</div><div class='del'>- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".</div><div class='del'>- *      Available in ftp://ds.internic.net/rfc/rfc1951.txt</div><div class='del'>- *</div><div class='del'>- *      A description of the Rabin and Karp algorithm is given in the book</div><div class='del'>- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.</div><div class='del'>- *</div><div class='del'>- *      Fiala,E.R., and Greene,D.H.</div><div class='del'>- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: deflate.c,v 1.15 1996/07/24 13:40:58 me Exp $ */</div><div class='del'>-</div><div class='del'>-/* #include "deflate.h" */</div><div class='del'>-</div><div class='del'>-char deflate_copyright[] = " deflate 1.0.4 Copyright 1995-1996 Jean-loup Gailly ";</div><div class='del'>-/*</div><div class='del'>-  If you use the zlib library in a product, an acknowledgment is welcome</div><div class='del'>-  in the documentation of your product. If for some reason you cannot</div><div class='del'>-  include such an acknowledgment, I would appreciate that you keep this</div><div class='del'>-  copyright string in the executable of your product.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- *  Function prototypes.</div><div class='del'>- */</div><div class='del'>-typedef enum {</div><div class='del'>-    need_more,      /* block not completed, need more input or more output */</div><div class='del'>-    block_done,     /* block flush performed */</div><div class='del'>-    finish_started, /* finish started, need only more output at next deflate */</div><div class='del'>-    finish_done     /* finish done, accept no more input or output */</div><div class='del'>-} block_state;</div><div class='del'>-</div><div class='del'>-typedef block_state (*compress_func) OF((deflate_state *s, int flush));</div><div class='del'>-/* Compression function. Returns the block state after the call. */</div><div class='del'>-</div><div class='del'>-local void fill_window    OF((deflate_state *s));</div><div class='del'>-local block_state deflate_stored OF((deflate_state *s, int flush));</div><div class='del'>-local block_state deflate_fast   OF((deflate_state *s, int flush));</div><div class='del'>-local block_state deflate_slow   OF((deflate_state *s, int flush));</div><div class='del'>-local void lm_init        OF((deflate_state *s));</div><div class='del'>-local void putShortMSB    OF((deflate_state *s, uInt b));</div><div class='del'>-local void flush_pending  OF((z_streamp strm));</div><div class='del'>-local int read_buf        OF((z_streamp strm, charf *buf, unsigned size));</div><div class='del'>-#ifdef ASMV</div><div class='del'>-      void match_init OF((void)); /* asm code initialization */</div><div class='del'>-      uInt longest_match  OF((deflate_state *s, IPos cur_match));</div><div class='del'>-#else</div><div class='del'>-local uInt longest_match  OF((deflate_state *s, IPos cur_match));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-local  void check_match OF((deflate_state *s, IPos start, IPos match,</div><div class='del'>-                            int length));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Local data</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NIL 0</div><div class='del'>-/* Tail of hash chains */</div><div class='del'>-</div><div class='del'>-#ifndef TOO_FAR</div><div class='del'>-#  define TOO_FAR 4096</div><div class='del'>-#endif</div><div class='del'>-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */</div><div class='del'>-</div><div class='del'>-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)</div><div class='del'>-/* Minimum amount of lookahead, except at the end of the input file.</div><div class='del'>- * See deflate.c for comments about the MIN_MATCH+1.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* Values for max_lazy_match, good_match and max_chain_length, depending on</div><div class='del'>- * the desired pack level (0..9). The values given below have been tuned to</div><div class='del'>- * exclude worst case performance for pathological files. Better values may be</div><div class='del'>- * found for specific files.</div><div class='del'>- */</div><div class='del'>-typedef struct config_s {</div><div class='del'>-   ush good_length; /* reduce lazy search above this match length */</div><div class='del'>-   ush max_lazy;    /* do not perform lazy search above this match length */</div><div class='del'>-   ush nice_length; /* quit search above this match length */</div><div class='del'>-   ush max_chain;</div><div class='del'>-   compress_func func;</div><div class='del'>-} config;</div><div class='del'>-</div><div class='del'>-local config configuration_table[10] = {</div><div class='del'>-/*      good lazy nice chain */</div><div class='del'>-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */</div><div class='del'>-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* maximum speed, no lazy matches */</div><div class='del'>-/* 2 */ {4,    5, 16,    8, deflate_fast},</div><div class='del'>-/* 3 */ {4,    6, 32,   32, deflate_fast},</div><div class='del'>-</div><div class='del'>-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */</div><div class='del'>-/* 5 */ {8,   16, 32,   32, deflate_slow},</div><div class='del'>-/* 6 */ {8,   16, 128, 128, deflate_slow},</div><div class='del'>-/* 7 */ {8,   32, 128, 256, deflate_slow},</div><div class='del'>-/* 8 */ {32, 128, 258, 1024, deflate_slow},</div><div class='del'>-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */</div><div class='del'>-</div><div class='del'>-/* Note: the deflate() code requires max_lazy &gt;= MIN_MATCH and max_chain &gt;= 4</div><div class='del'>- * For deflate_fast() (levels &lt;= 3) good is ignored and lazy has a different</div><div class='del'>- * meaning.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define EQUAL 0</div><div class='del'>-/* result of memcmp for equal strings */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Update a hash value with the given input byte</div><div class='del'>- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive</div><div class='del'>- *    input characters, so that a running hash key can be computed from the</div><div class='del'>- *    previous key instead of complete recalculation each time.</div><div class='del'>- */</div><div class='del'>-#define UPDATE_HASH(s,h,c) (h = (((h)&lt;&lt;s-&gt;hash_shift) ^ (c)) &amp; s-&gt;hash_mask)</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Insert string str in the dictionary and set match_head to the previous head</div><div class='del'>- * of the hash chain (the most recent string with same hash key). Return</div><div class='del'>- * the previous length of the hash chain.</div><div class='del'>- * IN  assertion: all calls to to INSERT_STRING are made with consecutive</div><div class='del'>- *    input characters and the first MIN_MATCH bytes of str are valid</div><div class='del'>- *    (except for the last MIN_MATCH-1 bytes of the input file).</div><div class='del'>- */</div><div class='del'>-#define INSERT_STRING(s, str, match_head) \</div><div class='del'>-   (UPDATE_HASH(s, s-&gt;ins_h, s-&gt;window[(str) + (MIN_MATCH-1)]), \</div><div class='del'>-    s-&gt;prev[(str) &amp; s-&gt;w_mask] = match_head = s-&gt;head[s-&gt;ins_h], \</div><div class='del'>-    s-&gt;head[s-&gt;ins_h] = (Pos)(str))</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).</div><div class='del'>- * prev[] will be initialized on the fly.</div><div class='del'>- */</div><div class='del'>-#define CLEAR_HASH(s) \</div><div class='del'>-    s-&gt;head[s-&gt;hash_size-1] = NIL; \</div><div class='del'>-    zmemzero((charf *)s-&gt;head, (unsigned)(s-&gt;hash_size-1)*sizeof(*s-&gt;head));</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateInit_(strm, level, version, stream_size)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    int level;</div><div class='del'>-    const char *version;</div><div class='del'>-    int stream_size;</div><div class='del'>-{</div><div class='del'>-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,</div><div class='del'>-			 Z_DEFAULT_STRATEGY, version, stream_size);</div><div class='del'>-    /* To do: ignore strm-&gt;next_in if we use it as window */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,</div><div class='del'>-		  version, stream_size)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    int  level;</div><div class='del'>-    int  method;</div><div class='del'>-    int  windowBits;</div><div class='del'>-    int  memLevel;</div><div class='del'>-    int  strategy;</div><div class='del'>-    const char *version;</div><div class='del'>-    int stream_size;</div><div class='del'>-{</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int noheader = 0;</div><div class='del'>-    static char* my_version = ZLIB_VERSION;</div><div class='del'>-</div><div class='del'>-    ushf *overlay;</div><div class='del'>-    /* We overlay pending_buf and d_buf+l_buf. This works since the average</div><div class='del'>-     * output size for (length,distance) codes is &lt;= 24 bits.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    if (version == Z_NULL || version[0] != my_version[0] ||</div><div class='del'>-        stream_size != sizeof(z_stream)) {</div><div class='del'>-	return Z_VERSION_ERROR;</div><div class='del'>-    }</div><div class='del'>-    if (strm == Z_NULL) return Z_STREAM_ERROR;</div><div class='del'>-</div><div class='del'>-    strm-&gt;msg = Z_NULL;</div><div class='del'>-#ifndef NO_ZCFUNCS</div><div class='del'>-    if (strm-&gt;zalloc == Z_NULL) {</div><div class='del'>-	strm-&gt;zalloc = zcalloc;</div><div class='del'>-	strm-&gt;opaque = (voidpf)0;</div><div class='del'>-    }</div><div class='del'>-    if (strm-&gt;zfree == Z_NULL) strm-&gt;zfree = zcfree;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (level == Z_DEFAULT_COMPRESSION) level = 6;</div><div class='del'>-</div><div class='del'>-    if (windowBits &lt; 0) { /* undocumented feature: suppress zlib header */</div><div class='del'>-        noheader = 1;</div><div class='del'>-        windowBits = -windowBits;</div><div class='del'>-    }</div><div class='del'>-    if (memLevel &lt; 1 || memLevel &gt; MAX_MEM_LEVEL || method != Z_DEFLATED ||</div><div class='del'>-        windowBits &lt; 8 || windowBits &gt; 15 || level &lt; 0 || level &gt; 9 ||</div><div class='del'>-	strategy &lt; 0 || strategy &gt; Z_HUFFMAN_ONLY) {</div><div class='del'>-        return Z_STREAM_ERROR;</div><div class='del'>-    }</div><div class='del'>-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));</div><div class='del'>-    if (s == Z_NULL) return Z_MEM_ERROR;</div><div class='del'>-    strm-&gt;state = (struct internal_state FAR *)s;</div><div class='del'>-    s-&gt;strm = strm;</div><div class='del'>-</div><div class='del'>-    s-&gt;noheader = noheader;</div><div class='del'>-    s-&gt;w_bits = windowBits;</div><div class='del'>-    s-&gt;w_size = 1 &lt;&lt; s-&gt;w_bits;</div><div class='del'>-    s-&gt;w_mask = s-&gt;w_size - 1;</div><div class='del'>-</div><div class='del'>-    s-&gt;hash_bits = memLevel + 7;</div><div class='del'>-    s-&gt;hash_size = 1 &lt;&lt; s-&gt;hash_bits;</div><div class='del'>-    s-&gt;hash_mask = s-&gt;hash_size - 1;</div><div class='del'>-    s-&gt;hash_shift =  ((s-&gt;hash_bits+MIN_MATCH-1)/MIN_MATCH);</div><div class='del'>-</div><div class='del'>-    s-&gt;window = (Bytef *) ZALLOC(strm, s-&gt;w_size, 2*sizeof(Byte));</div><div class='del'>-    s-&gt;prev   = (Posf *)  ZALLOC(strm, s-&gt;w_size, sizeof(Pos));</div><div class='del'>-    s-&gt;head   = (Posf *)  ZALLOC(strm, s-&gt;hash_size, sizeof(Pos));</div><div class='del'>-</div><div class='del'>-    s-&gt;lit_bufsize = 1 &lt;&lt; (memLevel + 6); /* 16K elements by default */</div><div class='del'>-</div><div class='del'>-    overlay = (ushf *) ZALLOC(strm, s-&gt;lit_bufsize, sizeof(ush)+2);</div><div class='del'>-    s-&gt;pending_buf = (uchf *) overlay;</div><div class='del'>-    s-&gt;pending_buf_size = (ulg)s-&gt;lit_bufsize * (sizeof(ush)+2L);</div><div class='del'>-</div><div class='del'>-    if (s-&gt;window == Z_NULL || s-&gt;prev == Z_NULL || s-&gt;head == Z_NULL ||</div><div class='del'>-        s-&gt;pending_buf == Z_NULL) {</div><div class='del'>-        strm-&gt;msg = (char*)ERR_MSG(Z_MEM_ERROR);</div><div class='del'>-        deflateEnd (strm);</div><div class='del'>-        return Z_MEM_ERROR;</div><div class='del'>-    }</div><div class='del'>-    s-&gt;d_buf = overlay + s-&gt;lit_bufsize/sizeof(ush);</div><div class='del'>-    s-&gt;l_buf = s-&gt;pending_buf + (1+sizeof(ush))*s-&gt;lit_bufsize;</div><div class='del'>-</div><div class='del'>-    s-&gt;level = level;</div><div class='del'>-    s-&gt;strategy = strategy;</div><div class='del'>-    s-&gt;method = (Byte)method;</div><div class='del'>-</div><div class='del'>-    return deflateReset(strm);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateSetDictionary (strm, dictionary, dictLength)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    const Bytef *dictionary;</div><div class='del'>-    uInt  dictLength;</div><div class='del'>-{</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    uInt length = dictLength;</div><div class='del'>-    uInt n;</div><div class='del'>-    IPos hash_head = 0;</div><div class='del'>-</div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL || dictionary == Z_NULL)</div><div class='del'>-	return Z_STREAM_ERROR;</div><div class='del'>-</div><div class='del'>-    s = (deflate_state *) strm-&gt;state;</div><div class='del'>-    if (s-&gt;status != INIT_STATE) return Z_STREAM_ERROR;</div><div class='del'>-</div><div class='del'>-    strm-&gt;adler = adler32(strm-&gt;adler, dictionary, dictLength);</div><div class='del'>-</div><div class='del'>-    if (length &lt; MIN_MATCH) return Z_OK;</div><div class='del'>-    if (length &gt; MAX_DIST(s)) {</div><div class='del'>-	length = MAX_DIST(s);</div><div class='del'>-#ifndef USE_DICT_HEAD</div><div class='del'>-	dictionary += dictLength - length; /* use the tail of the dictionary */</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-    zmemcpy((charf *)s-&gt;window, dictionary, length);</div><div class='del'>-    s-&gt;strstart = length;</div><div class='del'>-    s-&gt;block_start = (long)length;</div><div class='del'>-</div><div class='del'>-    /* Insert all strings in the hash table (except for the last two bytes).</div><div class='del'>-     * s-&gt;lookahead stays null, so s-&gt;ins_h will be recomputed at the next</div><div class='del'>-     * call of fill_window.</div><div class='del'>-     */</div><div class='del'>-    s-&gt;ins_h = s-&gt;window[0];</div><div class='del'>-    UPDATE_HASH(s, s-&gt;ins_h, s-&gt;window[1]);</div><div class='del'>-    for (n = 0; n &lt;= length - MIN_MATCH; n++) {</div><div class='del'>-	INSERT_STRING(s, n, hash_head);</div><div class='del'>-    }</div><div class='del'>-    if (hash_head) hash_head = 0;  /* to make compiler happy */</div><div class='del'>-    return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateReset (strm)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-{</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    </div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL ||</div><div class='del'>-        strm-&gt;zalloc == Z_NULL || strm-&gt;zfree == Z_NULL) return Z_STREAM_ERROR;</div><div class='del'>-</div><div class='del'>-    strm-&gt;total_in = strm-&gt;total_out = 0;</div><div class='del'>-    strm-&gt;msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */</div><div class='del'>-    strm-&gt;data_type = Z_UNKNOWN;</div><div class='del'>-</div><div class='del'>-    s = (deflate_state *)strm-&gt;state;</div><div class='del'>-    s-&gt;pending = 0;</div><div class='del'>-    s-&gt;pending_out = s-&gt;pending_buf;</div><div class='del'>-</div><div class='del'>-    if (s-&gt;noheader &lt; 0) {</div><div class='del'>-        s-&gt;noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */</div><div class='del'>-    }</div><div class='del'>-    s-&gt;status = s-&gt;noheader ? BUSY_STATE : INIT_STATE;</div><div class='del'>-    strm-&gt;adler = 1;</div><div class='del'>-    s-&gt;last_flush = Z_NO_FLUSH;</div><div class='del'>-</div><div class='del'>-    _tr_init(s);</div><div class='del'>-    lm_init(s);</div><div class='del'>-</div><div class='del'>-    return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateParams(strm, level, strategy)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    int level;</div><div class='del'>-    int strategy;</div><div class='del'>-{</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    compress_func func;</div><div class='del'>-    int err = Z_OK;</div><div class='del'>-</div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL) return Z_STREAM_ERROR;</div><div class='del'>-    s = (deflate_state *) strm-&gt;state;</div><div class='del'>-</div><div class='del'>-    if (level == Z_DEFAULT_COMPRESSION) {</div><div class='del'>-	level = 6;</div><div class='del'>-    }</div><div class='del'>-    if (level &lt; 0 || level &gt; 9 || strategy &lt; 0 || strategy &gt; Z_HUFFMAN_ONLY) {</div><div class='del'>-	return Z_STREAM_ERROR;</div><div class='del'>-    }</div><div class='del'>-    func = configuration_table[s-&gt;level].func;</div><div class='del'>-</div><div class='del'>-    if (func != configuration_table[level].func &amp;&amp; strm-&gt;total_in != 0) {</div><div class='del'>-	/* Flush the last buffer: */</div><div class='del'>-	err = deflate(strm, Z_PARTIAL_FLUSH);</div><div class='del'>-    }</div><div class='del'>-    if (s-&gt;level != level) {</div><div class='del'>-	s-&gt;level = level;</div><div class='del'>-	s-&gt;max_lazy_match   = configuration_table[level].max_lazy;</div><div class='del'>-	s-&gt;good_match       = configuration_table[level].good_length;</div><div class='del'>-	s-&gt;nice_match       = configuration_table[level].nice_length;</div><div class='del'>-	s-&gt;max_chain_length = configuration_table[level].max_chain;</div><div class='del'>-    }</div><div class='del'>-    s-&gt;strategy = strategy;</div><div class='del'>-    return err;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* =========================================================================</div><div class='del'>- * Put a short in the pending buffer. The 16-bit value is put in MSB order.</div><div class='del'>- * IN assertion: the stream state is correct and there is enough room in</div><div class='del'>- * pending_buf.</div><div class='del'>- */</div><div class='del'>-local void putShortMSB (s, b)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    uInt b;</div><div class='del'>-{</div><div class='del'>-    put_byte(s, (Byte)(b &gt;&gt; 8));</div><div class='del'>-    put_byte(s, (Byte)(b &amp; 0xff));</div><div class='del'>-}   </div><div class='del'>-</div><div class='del'>-/* =========================================================================</div><div class='del'>- * Flush as much pending output as possible. All deflate() output goes</div><div class='del'>- * through this function so some applications may wish to modify it</div><div class='del'>- * to avoid allocating a large strm-&gt;next_out buffer and copying into it.</div><div class='del'>- * (See also read_buf()).</div><div class='del'>- */</div><div class='del'>-local void flush_pending(strm)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-{</div><div class='del'>-    deflate_state *s = (deflate_state *) strm-&gt;state;</div><div class='del'>-    unsigned len = s-&gt;pending;</div><div class='del'>-</div><div class='del'>-    if (len &gt; strm-&gt;avail_out) len = strm-&gt;avail_out;</div><div class='del'>-    if (len == 0) return;</div><div class='del'>-</div><div class='del'>-    if (strm-&gt;next_out != Z_NULL) {</div><div class='del'>-	zmemcpy(strm-&gt;next_out, s-&gt;pending_out, len);</div><div class='del'>-	strm-&gt;next_out += len;</div><div class='del'>-    }</div><div class='del'>-    s-&gt;pending_out += len;</div><div class='del'>-    strm-&gt;total_out += len;</div><div class='del'>-    strm-&gt;avail_out  -= len;</div><div class='del'>-    s-&gt;pending -= len;</div><div class='del'>-    if (s-&gt;pending == 0) {</div><div class='del'>-        s-&gt;pending_out = s-&gt;pending_buf;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflate (strm, flush)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    int flush;</div><div class='del'>-{</div><div class='del'>-    int old_flush; /* value of flush param for previous deflate call */</div><div class='del'>-    deflate_state *s;</div><div class='del'>-</div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL ||</div><div class='del'>-	flush &gt; Z_FINISH || flush &lt; 0) {</div><div class='del'>-        return Z_STREAM_ERROR;</div><div class='del'>-    }</div><div class='del'>-    s = (deflate_state *) strm-&gt;state;</div><div class='del'>-</div><div class='del'>-    if ((strm-&gt;next_in == Z_NULL &amp;&amp; strm-&gt;avail_in != 0) ||</div><div class='del'>-	(s-&gt;status == FINISH_STATE &amp;&amp; flush != Z_FINISH)) {</div><div class='del'>-        ERR_RETURN(strm, Z_STREAM_ERROR);</div><div class='del'>-    }</div><div class='del'>-    if (strm-&gt;avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);</div><div class='del'>-</div><div class='del'>-    s-&gt;strm = strm; /* just in case */</div><div class='del'>-    old_flush = s-&gt;last_flush;</div><div class='del'>-    s-&gt;last_flush = flush;</div><div class='del'>-</div><div class='del'>-    /* Write the zlib header */</div><div class='del'>-    if (s-&gt;status == INIT_STATE) {</div><div class='del'>-</div><div class='del'>-        uInt header = (Z_DEFLATED + ((s-&gt;w_bits-8)&lt;&lt;4)) &lt;&lt; 8;</div><div class='del'>-        uInt level_flags = (s-&gt;level-1) &gt;&gt; 1;</div><div class='del'>-</div><div class='del'>-        if (level_flags &gt; 3) level_flags = 3;</div><div class='del'>-        header |= (level_flags &lt;&lt; 6);</div><div class='del'>-	if (s-&gt;strstart != 0) header |= PRESET_DICT;</div><div class='del'>-        header += 31 - (header % 31);</div><div class='del'>-</div><div class='del'>-        s-&gt;status = BUSY_STATE;</div><div class='del'>-        putShortMSB(s, header);</div><div class='del'>-</div><div class='del'>-	/* Save the adler32 of the preset dictionary: */</div><div class='del'>-	if (s-&gt;strstart != 0) {</div><div class='del'>-	    putShortMSB(s, (uInt)(strm-&gt;adler &gt;&gt; 16));</div><div class='del'>-	    putShortMSB(s, (uInt)(strm-&gt;adler &amp; 0xffff));</div><div class='del'>-	}</div><div class='del'>-	strm-&gt;adler = 1L;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Flush as much pending output as possible */</div><div class='del'>-    if (s-&gt;pending != 0) {</div><div class='del'>-        flush_pending(strm);</div><div class='del'>-        if (strm-&gt;avail_out == 0) {</div><div class='del'>-	    /* Since avail_out is 0, deflate will be called again with</div><div class='del'>-	     * more output space, but possibly with both pending and</div><div class='del'>-	     * avail_in equal to zero. There won't be anything to do,</div><div class='del'>-	     * but this is not an error situation so make sure we</div><div class='del'>-	     * return OK instead of BUF_ERROR at next call of deflate:</div><div class='del'>-             */</div><div class='del'>-	    s-&gt;last_flush = -1;</div><div class='del'>-	    return Z_OK;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    /* Make sure there is something to do and avoid duplicate consecutive</div><div class='del'>-     * flushes. For repeated and useless calls with Z_FINISH, we keep</div><div class='del'>-     * returning Z_STREAM_END instead of Z_BUFF_ERROR.</div><div class='del'>-     */</div><div class='del'>-    } else if (strm-&gt;avail_in == 0 &amp;&amp; flush &lt;= old_flush &amp;&amp;</div><div class='del'>-	       flush != Z_FINISH) {</div><div class='del'>-        ERR_RETURN(strm, Z_BUF_ERROR);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* User must not provide more input after the first FINISH: */</div><div class='del'>-    if (s-&gt;status == FINISH_STATE &amp;&amp; strm-&gt;avail_in != 0) {</div><div class='del'>-        ERR_RETURN(strm, Z_BUF_ERROR);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Start a new block or continue the current one.</div><div class='del'>-     */</div><div class='del'>-    if (strm-&gt;avail_in != 0 || s-&gt;lookahead != 0 ||</div><div class='del'>-        (flush != Z_NO_FLUSH &amp;&amp; s-&gt;status != FINISH_STATE)) {</div><div class='del'>-        block_state bstate;</div><div class='del'>-</div><div class='del'>-	bstate = (*(configuration_table[s-&gt;level].func))(s, flush);</div><div class='del'>-</div><div class='del'>-        if (bstate == finish_started || bstate == finish_done) {</div><div class='del'>-            s-&gt;status = FINISH_STATE;</div><div class='del'>-        }</div><div class='del'>-        if (bstate == need_more || bstate == finish_started) {</div><div class='del'>-	    if (strm-&gt;avail_out == 0) {</div><div class='del'>-	        s-&gt;last_flush = -1; /* avoid BUF_ERROR next call, see above */</div><div class='del'>-	    }</div><div class='del'>-	    return Z_OK;</div><div class='del'>-	    /* If flush != Z_NO_FLUSH &amp;&amp; avail_out == 0, the next call</div><div class='del'>-	     * of deflate should use the same flush parameter to make sure</div><div class='del'>-	     * that the flush is complete. So we don't have to output an</div><div class='del'>-	     * empty block here, this will be done at next call. This also</div><div class='del'>-	     * ensures that for a very small output buffer, we emit at most</div><div class='del'>-	     * one empty block.</div><div class='del'>-	     */</div><div class='del'>-	}</div><div class='del'>-        if (bstate == block_done) {</div><div class='del'>-            if (flush == Z_PARTIAL_FLUSH) {</div><div class='del'>-                _tr_align(s);</div><div class='del'>-	    } else if (flush == Z_PACKET_FLUSH) {</div><div class='del'>-		/* Output just the 3-bit `stored' block type value,</div><div class='del'>-		   but not a zero length. */</div><div class='del'>-		_tr_stored_type_only(s);</div><div class='del'>-            } else { /* FULL_FLUSH or SYNC_FLUSH */</div><div class='del'>-                _tr_stored_block(s, (char*)0, 0L, 0);</div><div class='del'>-                /* For a full flush, this empty block will be recognized</div><div class='del'>-                 * as a special marker by inflate_sync().</div><div class='del'>-                 */</div><div class='del'>-                if (flush == Z_FULL_FLUSH) {</div><div class='del'>-                    CLEAR_HASH(s);             /* forget history */</div><div class='del'>-                }</div><div class='del'>-            }</div><div class='del'>-            flush_pending(strm);</div><div class='del'>-	    if (strm-&gt;avail_out == 0) {</div><div class='del'>-	      s-&gt;last_flush = -1; /* avoid BUF_ERROR at next call, see above */</div><div class='del'>-	      return Z_OK;</div><div class='del'>-	    }</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    Assert(strm-&gt;avail_out &gt; 0, "bug2");</div><div class='del'>-</div><div class='del'>-    if (flush != Z_FINISH) return Z_OK;</div><div class='del'>-    if (s-&gt;noheader) return Z_STREAM_END;</div><div class='del'>-</div><div class='del'>-    /* Write the zlib trailer (adler32) */</div><div class='del'>-    putShortMSB(s, (uInt)(strm-&gt;adler &gt;&gt; 16));</div><div class='del'>-    putShortMSB(s, (uInt)(strm-&gt;adler &amp; 0xffff));</div><div class='del'>-    flush_pending(strm);</div><div class='del'>-    /* If avail_out is zero, the application will call deflate again</div><div class='del'>-     * to flush the rest.</div><div class='del'>-     */</div><div class='del'>-    s-&gt;noheader = -1; /* write the trailer only once! */</div><div class='del'>-    return s-&gt;pending != 0 ? Z_OK : Z_STREAM_END;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-int deflateEnd (strm)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-{</div><div class='del'>-    int status;</div><div class='del'>-    deflate_state *s;</div><div class='del'>-</div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL) return Z_STREAM_ERROR;</div><div class='del'>-    s = (deflate_state *) strm-&gt;state;</div><div class='del'>-</div><div class='del'>-    status = s-&gt;status;</div><div class='del'>-    if (status != INIT_STATE &amp;&amp; status != BUSY_STATE &amp;&amp;</div><div class='del'>-	status != FINISH_STATE) {</div><div class='del'>-      return Z_STREAM_ERROR;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Deallocate in reverse order of allocations: */</div><div class='del'>-    TRY_FREE(strm, s-&gt;pending_buf);</div><div class='del'>-    TRY_FREE(strm, s-&gt;head);</div><div class='del'>-    TRY_FREE(strm, s-&gt;prev);</div><div class='del'>-    TRY_FREE(strm, s-&gt;window);</div><div class='del'>-</div><div class='del'>-    ZFREE(strm, s);</div><div class='del'>-    strm-&gt;state = Z_NULL;</div><div class='del'>-</div><div class='del'>-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* =========================================================================</div><div class='del'>- * Copy the source state to the destination state.</div><div class='del'>- */</div><div class='del'>-int deflateCopy (dest, source)</div><div class='del'>-    z_streamp dest;</div><div class='del'>-    z_streamp source;</div><div class='del'>-{</div><div class='del'>-    deflate_state *ds;</div><div class='del'>-    deflate_state *ss;</div><div class='del'>-    ushf *overlay;</div><div class='del'>-</div><div class='del'>-    if (source == Z_NULL || dest == Z_NULL || source-&gt;state == Z_NULL)</div><div class='del'>-        return Z_STREAM_ERROR;</div><div class='del'>-    ss = (deflate_state *) source-&gt;state;</div><div class='del'>-</div><div class='del'>-    zmemcpy(dest, source, sizeof(*dest));</div><div class='del'>-</div><div class='del'>-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));</div><div class='del'>-    if (ds == Z_NULL) return Z_MEM_ERROR;</div><div class='del'>-    dest-&gt;state = (struct internal_state FAR *) ds;</div><div class='del'>-    zmemcpy(ds, ss, sizeof(*ds));</div><div class='del'>-    ds-&gt;strm = dest;</div><div class='del'>-</div><div class='del'>-    ds-&gt;window = (Bytef *) ZALLOC(dest, ds-&gt;w_size, 2*sizeof(Byte));</div><div class='del'>-    ds-&gt;prev   = (Posf *)  ZALLOC(dest, ds-&gt;w_size, sizeof(Pos));</div><div class='del'>-    ds-&gt;head   = (Posf *)  ZALLOC(dest, ds-&gt;hash_size, sizeof(Pos));</div><div class='del'>-    overlay = (ushf *) ZALLOC(dest, ds-&gt;lit_bufsize, sizeof(ush)+2);</div><div class='del'>-    ds-&gt;pending_buf = (uchf *) overlay;</div><div class='del'>-</div><div class='del'>-    if (ds-&gt;window == Z_NULL || ds-&gt;prev == Z_NULL || ds-&gt;head == Z_NULL ||</div><div class='del'>-        ds-&gt;pending_buf == Z_NULL) {</div><div class='del'>-        deflateEnd (dest);</div><div class='del'>-        return Z_MEM_ERROR;</div><div class='del'>-    }</div><div class='del'>-    /* ??? following zmemcpy doesn't work for 16-bit MSDOS */</div><div class='del'>-    zmemcpy(ds-&gt;window, ss-&gt;window, ds-&gt;w_size * 2 * sizeof(Byte));</div><div class='del'>-    zmemcpy(ds-&gt;prev, ss-&gt;prev, ds-&gt;w_size * sizeof(Pos));</div><div class='del'>-    zmemcpy(ds-&gt;head, ss-&gt;head, ds-&gt;hash_size * sizeof(Pos));</div><div class='del'>-    zmemcpy(ds-&gt;pending_buf, ss-&gt;pending_buf, (uInt)ds-&gt;pending_buf_size);</div><div class='del'>-</div><div class='del'>-    ds-&gt;pending_out = ds-&gt;pending_buf + (ss-&gt;pending_out - ss-&gt;pending_buf);</div><div class='del'>-    ds-&gt;d_buf = overlay + ds-&gt;lit_bufsize/sizeof(ush);</div><div class='del'>-    ds-&gt;l_buf = ds-&gt;pending_buf + (1+sizeof(ush))*ds-&gt;lit_bufsize;</div><div class='del'>-</div><div class='del'>-    ds-&gt;l_desc.dyn_tree = ds-&gt;dyn_ltree;</div><div class='del'>-    ds-&gt;d_desc.dyn_tree = ds-&gt;dyn_dtree;</div><div class='del'>-    ds-&gt;bl_desc.dyn_tree = ds-&gt;bl_tree;</div><div class='del'>-</div><div class='del'>-    return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Return the number of bytes of output which are immediately available</div><div class='del'>- * for output from the decompressor.</div><div class='del'>- */</div><div class='del'>-int deflateOutputPending (strm)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-{</div><div class='del'>-    if (strm == Z_NULL || strm-&gt;state == Z_NULL) return 0;</div><div class='del'>-    </div><div class='del'>-    return ((deflate_state *)(strm-&gt;state))-&gt;pending;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Read a new buffer from the current input stream, update the adler32</div><div class='del'>- * and total number of bytes read.  All deflate() input goes through</div><div class='del'>- * this function so some applications may wish to modify it to avoid</div><div class='del'>- * allocating a large strm-&gt;next_in buffer and copying from it.</div><div class='del'>- * (See also flush_pending()).</div><div class='del'>- */</div><div class='del'>-local int read_buf(strm, buf, size)</div><div class='del'>-    z_streamp strm;</div><div class='del'>-    charf *buf;</div><div class='del'>-    unsigned size;</div><div class='del'>-{</div><div class='del'>-    unsigned len = strm-&gt;avail_in;</div><div class='del'>-</div><div class='del'>-    if (len &gt; size) len = size;</div><div class='del'>-    if (len == 0) return 0;</div><div class='del'>-</div><div class='del'>-    strm-&gt;avail_in  -= len;</div><div class='del'>-</div><div class='del'>-    if (!((deflate_state *)(strm-&gt;state))-&gt;noheader) {</div><div class='del'>-        strm-&gt;adler = adler32(strm-&gt;adler, strm-&gt;next_in, len);</div><div class='del'>-    }</div><div class='del'>-    zmemcpy(buf, strm-&gt;next_in, len);</div><div class='del'>-    strm-&gt;next_in  += len;</div><div class='del'>-    strm-&gt;total_in += len;</div><div class='del'>-</div><div class='del'>-    return (int)len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Initialize the "longest match" routines for a new zlib stream</div><div class='del'>- */</div><div class='del'>-local void lm_init (s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    s-&gt;window_size = (ulg)2L*s-&gt;w_size;</div><div class='del'>-</div><div class='del'>-    CLEAR_HASH(s);</div><div class='del'>-</div><div class='del'>-    /* Set the default configuration parameters:</div><div class='del'>-     */</div><div class='del'>-    s-&gt;max_lazy_match   = configuration_table[s-&gt;level].max_lazy;</div><div class='del'>-    s-&gt;good_match       = configuration_table[s-&gt;level].good_length;</div><div class='del'>-    s-&gt;nice_match       = configuration_table[s-&gt;level].nice_length;</div><div class='del'>-    s-&gt;max_chain_length = configuration_table[s-&gt;level].max_chain;</div><div class='del'>-</div><div class='del'>-    s-&gt;strstart = 0;</div><div class='del'>-    s-&gt;block_start = 0L;</div><div class='del'>-    s-&gt;lookahead = 0;</div><div class='del'>-    s-&gt;match_length = s-&gt;prev_length = MIN_MATCH-1;</div><div class='del'>-    s-&gt;match_available = 0;</div><div class='del'>-    s-&gt;ins_h = 0;</div><div class='del'>-#ifdef ASMV</div><div class='del'>-    match_init(); /* initialize the asm code */</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Set match_start to the longest match starting at the given string and</div><div class='del'>- * return its length. Matches shorter or equal to prev_length are discarded,</div><div class='del'>- * in which case the result is equal to prev_length and match_start is</div><div class='del'>- * garbage.</div><div class='del'>- * IN assertions: cur_match is the head of the hash chain for the current</div><div class='del'>- *   string (strstart) and its distance is &lt;= MAX_DIST, and prev_length &gt;= 1</div><div class='del'>- * OUT assertion: the match length is not greater than s-&gt;lookahead.</div><div class='del'>- */</div><div class='del'>-#ifndef ASMV</div><div class='del'>-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or</div><div class='del'>- * match.S. The code will be functionally equivalent.</div><div class='del'>- */</div><div class='del'>-local uInt longest_match(s, cur_match)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    IPos cur_match;                             /* current match */</div><div class='del'>-{</div><div class='del'>-    unsigned chain_length = s-&gt;max_chain_length;/* max hash chain length */</div><div class='del'>-    register Bytef *scan = s-&gt;window + s-&gt;strstart; /* current string */</div><div class='del'>-    register Bytef *match;                       /* matched string */</div><div class='del'>-    register int len;                           /* length of current match */</div><div class='del'>-    int best_len = s-&gt;prev_length;              /* best match length so far */</div><div class='del'>-    int nice_match = s-&gt;nice_match;             /* stop if match long enough */</div><div class='del'>-    IPos limit = s-&gt;strstart &gt; (IPos)MAX_DIST(s) ?</div><div class='del'>-        s-&gt;strstart - (IPos)MAX_DIST(s) : NIL;</div><div class='del'>-    /* Stop when cur_match becomes &lt;= limit. To simplify the code,</div><div class='del'>-     * we prevent matches with the string of window index 0.</div><div class='del'>-     */</div><div class='del'>-    Posf *prev = s-&gt;prev;</div><div class='del'>-    uInt wmask = s-&gt;w_mask;</div><div class='del'>-</div><div class='del'>-#ifdef UNALIGNED_OK</div><div class='del'>-    /* Compare two bytes at a time. Note: this is not always beneficial.</div><div class='del'>-     * Try with and without -DUNALIGNED_OK to check.</div><div class='del'>-     */</div><div class='del'>-    register Bytef *strend = s-&gt;window + s-&gt;strstart + MAX_MATCH - 1;</div><div class='del'>-    register ush scan_start = *(ushf*)scan;</div><div class='del'>-    register ush scan_end   = *(ushf*)(scan+best_len-1);</div><div class='del'>-#else</div><div class='del'>-    register Bytef *strend = s-&gt;window + s-&gt;strstart + MAX_MATCH;</div><div class='del'>-    register Byte scan_end1  = scan[best_len-1];</div><div class='del'>-    register Byte scan_end   = scan[best_len];</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /* The code is optimized for HASH_BITS &gt;= 8 and MAX_MATCH-2 multiple of 16.</div><div class='del'>-     * It is easy to get rid of this optimization if necessary.</div><div class='del'>-     */</div><div class='del'>-    Assert(s-&gt;hash_bits &gt;= 8 &amp;&amp; MAX_MATCH == 258, "Code too clever");</div><div class='del'>-</div><div class='del'>-    /* Do not waste too much time if we already have a good match: */</div><div class='del'>-    if (s-&gt;prev_length &gt;= s-&gt;good_match) {</div><div class='del'>-        chain_length &gt;&gt;= 2;</div><div class='del'>-    }</div><div class='del'>-    /* Do not look for matches beyond the end of the input. This is necessary</div><div class='del'>-     * to make deflate deterministic.</div><div class='del'>-     */</div><div class='del'>-    if ((uInt)nice_match &gt; s-&gt;lookahead) nice_match = s-&gt;lookahead;</div><div class='del'>-</div><div class='del'>-    Assert((ulg)s-&gt;strstart &lt;= s-&gt;window_size-MIN_LOOKAHEAD, "need lookahead");</div><div class='del'>-</div><div class='del'>-    do {</div><div class='del'>-        Assert(cur_match &lt; s-&gt;strstart, "no future");</div><div class='del'>-        match = s-&gt;window + cur_match;</div><div class='del'>-</div><div class='del'>-        /* Skip to next match if the match length cannot increase</div><div class='del'>-         * or if the match length is less than 2:</div><div class='del'>-         */</div><div class='del'>-#if (defined(UNALIGNED_OK) &amp;&amp; MAX_MATCH == 258)</div><div class='del'>-        /* This code assumes sizeof(unsigned short) == 2. Do not use</div><div class='del'>-         * UNALIGNED_OK if your compiler uses a different size.</div><div class='del'>-         */</div><div class='del'>-        if (*(ushf*)(match+best_len-1) != scan_end ||</div><div class='del'>-            *(ushf*)match != scan_start) continue;</div><div class='del'>-</div><div class='del'>-        /* It is not necessary to compare scan[2] and match[2] since they are</div><div class='del'>-         * always equal when the other bytes match, given that the hash keys</div><div class='del'>-         * are equal and that HASH_BITS &gt;= 8. Compare 2 bytes at a time at</div><div class='del'>-         * strstart+3, +5, ... up to strstart+257. We check for insufficient</div><div class='del'>-         * lookahead only every 4th comparison; the 128th check will be made</div><div class='del'>-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is</div><div class='del'>-         * necessary to put more guard bytes at the end of the window, or</div><div class='del'>-         * to check more often for insufficient lookahead.</div><div class='del'>-         */</div><div class='del'>-        Assert(scan[2] == match[2], "scan[2]?");</div><div class='del'>-        scan++, match++;</div><div class='del'>-        do {</div><div class='del'>-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &amp;&amp;</div><div class='del'>-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &amp;&amp;</div><div class='del'>-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &amp;&amp;</div><div class='del'>-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &amp;&amp;</div><div class='del'>-                 scan &lt; strend);</div><div class='del'>-        /* The funny "do {}" generates better code on most compilers */</div><div class='del'>-</div><div class='del'>-        /* Here, scan &lt;= window+strstart+257 */</div><div class='del'>-        Assert(scan &lt;= s-&gt;window+(unsigned)(s-&gt;window_size-1), "wild scan");</div><div class='del'>-        if (*scan == *match) scan++;</div><div class='del'>-</div><div class='del'>-        len = (MAX_MATCH - 1) - (int)(strend-scan);</div><div class='del'>-        scan = strend - (MAX_MATCH-1);</div><div class='del'>-</div><div class='del'>-#else /* UNALIGNED_OK */</div><div class='del'>-</div><div class='del'>-        if (match[best_len]   != scan_end  ||</div><div class='del'>-            match[best_len-1] != scan_end1 ||</div><div class='del'>-            *match            != *scan     ||</div><div class='del'>-            *++match          != scan[1])      continue;</div><div class='del'>-</div><div class='del'>-        /* The check at best_len-1 can be removed because it will be made</div><div class='del'>-         * again later. (This heuristic is not always a win.)</div><div class='del'>-         * It is not necessary to compare scan[2] and match[2] since they</div><div class='del'>-         * are always equal when the other bytes match, given that</div><div class='del'>-         * the hash keys are equal and that HASH_BITS &gt;= 8.</div><div class='del'>-         */</div><div class='del'>-        scan += 2, match++;</div><div class='del'>-        Assert(*scan == *match, "match[2]?");</div><div class='del'>-</div><div class='del'>-        /* We check for insufficient lookahead only every 8th comparison;</div><div class='del'>-         * the 256th check will be made at strstart+258.</div><div class='del'>-         */</div><div class='del'>-        do {</div><div class='del'>-        } while (*++scan == *++match &amp;&amp; *++scan == *++match &amp;&amp;</div><div class='del'>-                 *++scan == *++match &amp;&amp; *++scan == *++match &amp;&amp;</div><div class='del'>-                 *++scan == *++match &amp;&amp; *++scan == *++match &amp;&amp;</div><div class='del'>-                 *++scan == *++match &amp;&amp; *++scan == *++match &amp;&amp;</div><div class='del'>-                 scan &lt; strend);</div><div class='del'>-</div><div class='del'>-        Assert(scan &lt;= s-&gt;window+(unsigned)(s-&gt;window_size-1), "wild scan");</div><div class='del'>-</div><div class='del'>-        len = MAX_MATCH - (int)(strend - scan);</div><div class='del'>-        scan = strend - MAX_MATCH;</div><div class='del'>-</div><div class='del'>-#endif /* UNALIGNED_OK */</div><div class='del'>-</div><div class='del'>-        if (len &gt; best_len) {</div><div class='del'>-            s-&gt;match_start = cur_match;</div><div class='del'>-            best_len = len;</div><div class='del'>-            if (len &gt;= nice_match) break;</div><div class='del'>-#ifdef UNALIGNED_OK</div><div class='del'>-            scan_end = *(ushf*)(scan+best_len-1);</div><div class='del'>-#else</div><div class='del'>-            scan_end1  = scan[best_len-1];</div><div class='del'>-            scan_end   = scan[best_len];</div><div class='del'>-#endif</div><div class='del'>-        }</div><div class='del'>-    } while ((cur_match = prev[cur_match &amp; wmask]) &gt; limit</div><div class='del'>-             &amp;&amp; --chain_length != 0);</div><div class='del'>-</div><div class='del'>-    if ((uInt)best_len &lt;= s-&gt;lookahead) return best_len;</div><div class='del'>-    return s-&gt;lookahead;</div><div class='del'>-}</div><div class='del'>-#endif /* ASMV */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Check that the match at match_start is indeed a match.</div><div class='del'>- */</div><div class='del'>-local void check_match(s, start, match, length)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    IPos start, match;</div><div class='del'>-    int length;</div><div class='del'>-{</div><div class='del'>-    /* check that the match is indeed a match */</div><div class='del'>-    if (zmemcmp((charf *)s-&gt;window + match,</div><div class='del'>-                (charf *)s-&gt;window + start, length) != EQUAL) {</div><div class='del'>-        fprintf(stderr, " start %u, match %u, length %d\n",</div><div class='del'>-		start, match, length);</div><div class='del'>-        do {</div><div class='del'>-	    fprintf(stderr, "%c%c", s-&gt;window[match++], s-&gt;window[start++]);</div><div class='del'>-	} while (--length != 0);</div><div class='del'>-        z_error("invalid match");</div><div class='del'>-    }</div><div class='del'>-    if (z_verbose &gt; 1) {</div><div class='del'>-        fprintf(stderr,"\\[%d,%d]", start-match, length);</div><div class='del'>-        do { putc(s-&gt;window[start++], stderr); } while (--length != 0);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-#  define check_match(s, start, match, length)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Fill the window when the lookahead becomes insufficient.</div><div class='del'>- * Updates strstart and lookahead.</div><div class='del'>- *</div><div class='del'>- * IN assertion: lookahead &lt; MIN_LOOKAHEAD</div><div class='del'>- * OUT assertions: strstart &lt;= window_size-MIN_LOOKAHEAD</div><div class='del'>- *    At least one byte has been read, or avail_in == 0; reads are</div><div class='del'>- *    performed for at least two bytes (required for the zip translate_eol</div><div class='del'>- *    option -- not supported here).</div><div class='del'>- */</div><div class='del'>-local void fill_window(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    register unsigned n, m;</div><div class='del'>-    register Posf *p;</div><div class='del'>-    unsigned more;    /* Amount of free space at the end of the window. */</div><div class='del'>-    uInt wsize = s-&gt;w_size;</div><div class='del'>-</div><div class='del'>-    do {</div><div class='del'>-        more = (unsigned)(s-&gt;window_size -(ulg)s-&gt;lookahead -(ulg)s-&gt;strstart);</div><div class='del'>-</div><div class='del'>-        /* Deal with !@#$% 64K limit: */</div><div class='del'>-        if (more == 0 &amp;&amp; s-&gt;strstart == 0 &amp;&amp; s-&gt;lookahead == 0) {</div><div class='del'>-            more = wsize;</div><div class='del'>-</div><div class='del'>-        } else if (more == (unsigned)(-1)) {</div><div class='del'>-            /* Very unlikely, but possible on 16 bit machine if strstart == 0</div><div class='del'>-             * and lookahead == 1 (input done one byte at time)</div><div class='del'>-             */</div><div class='del'>-            more--;</div><div class='del'>-</div><div class='del'>-        /* If the window is almost full and there is insufficient lookahead,</div><div class='del'>-         * move the upper half to the lower one to make room in the upper half.</div><div class='del'>-         */</div><div class='del'>-        } else if (s-&gt;strstart &gt;= wsize+MAX_DIST(s)) {</div><div class='del'>-</div><div class='del'>-            zmemcpy((charf *)s-&gt;window, (charf *)s-&gt;window+wsize,</div><div class='del'>-                   (unsigned)wsize);</div><div class='del'>-            s-&gt;match_start -= wsize;</div><div class='del'>-            s-&gt;strstart    -= wsize; /* we now have strstart &gt;= MAX_DIST */</div><div class='del'>-            s-&gt;block_start -= (long) wsize;</div><div class='del'>-</div><div class='del'>-            /* Slide the hash table (could be avoided with 32 bit values</div><div class='del'>-               at the expense of memory usage). We slide even when level == 0</div><div class='del'>-               to keep the hash table consistent if we switch back to level &gt; 0</div><div class='del'>-               later. (Using level 0 permanently is not an optimal usage of</div><div class='del'>-               zlib, so we don't care about this pathological case.)</div><div class='del'>-             */</div><div class='del'>-            n = s-&gt;hash_size;</div><div class='del'>-            p = &amp;s-&gt;head[n];</div><div class='del'>-            do {</div><div class='del'>-                m = *--p;</div><div class='del'>-                *p = (Pos)(m &gt;= wsize ? m-wsize : NIL);</div><div class='del'>-            } while (--n);</div><div class='del'>-</div><div class='del'>-            n = wsize;</div><div class='del'>-            p = &amp;s-&gt;prev[n];</div><div class='del'>-            do {</div><div class='del'>-                m = *--p;</div><div class='del'>-                *p = (Pos)(m &gt;= wsize ? m-wsize : NIL);</div><div class='del'>-                /* If n is not on any hash chain, prev[n] is garbage but</div><div class='del'>-                 * its value will never be used.</div><div class='del'>-                 */</div><div class='del'>-            } while (--n);</div><div class='del'>-            more += wsize;</div><div class='del'>-        }</div><div class='del'>-        if (s-&gt;strm-&gt;avail_in == 0) return;</div><div class='del'>-</div><div class='del'>-        /* If there was no sliding:</div><div class='del'>-         *    strstart &lt;= WSIZE+MAX_DIST-1 &amp;&amp; lookahead &lt;= MIN_LOOKAHEAD - 1 &amp;&amp;</div><div class='del'>-         *    more == window_size - lookahead - strstart</div><div class='del'>-         * =&gt; more &gt;= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)</div><div class='del'>-         * =&gt; more &gt;= window_size - 2*WSIZE + 2</div><div class='del'>-         * In the BIG_MEM or MMAP case (not yet supported),</div><div class='del'>-         *   window_size == input_size + MIN_LOOKAHEAD  &amp;&amp;</div><div class='del'>-         *   strstart + s-&gt;lookahead &lt;= input_size =&gt; more &gt;= MIN_LOOKAHEAD.</div><div class='del'>-         * Otherwise, window_size == 2*WSIZE so more &gt;= 2.</div><div class='del'>-         * If there was sliding, more &gt;= WSIZE. So in all cases, more &gt;= 2.</div><div class='del'>-         */</div><div class='del'>-        Assert(more &gt;= 2, "more &lt; 2");</div><div class='del'>-</div><div class='del'>-        n = read_buf(s-&gt;strm, (charf *)s-&gt;window + s-&gt;strstart + s-&gt;lookahead,</div><div class='del'>-                     more);</div><div class='del'>-        s-&gt;lookahead += n;</div><div class='del'>-</div><div class='del'>-        /* Initialize the hash value now that we have some input: */</div><div class='del'>-        if (s-&gt;lookahead &gt;= MIN_MATCH) {</div><div class='del'>-            s-&gt;ins_h = s-&gt;window[s-&gt;strstart];</div><div class='del'>-            UPDATE_HASH(s, s-&gt;ins_h, s-&gt;window[s-&gt;strstart+1]);</div><div class='del'>-#if MIN_MATCH != 3</div><div class='del'>-            Call UPDATE_HASH() MIN_MATCH-3 more times</div><div class='del'>-#endif</div><div class='del'>-        }</div><div class='del'>-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,</div><div class='del'>-         * but this is not important since only literal bytes will be emitted.</div><div class='del'>-         */</div><div class='del'>-</div><div class='del'>-    } while (s-&gt;lookahead &lt; MIN_LOOKAHEAD &amp;&amp; s-&gt;strm-&gt;avail_in != 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Flush the current block, with given end-of-file flag.</div><div class='del'>- * IN assertion: strstart is set to the end of the current match.</div><div class='del'>- */</div><div class='del'>-#define FLUSH_BLOCK_ONLY(s, eof) { \</div><div class='del'>-   _tr_flush_block(s, (s-&gt;block_start &gt;= 0L ? \</div><div class='del'>-                   (charf *)&amp;s-&gt;window[(unsigned)s-&gt;block_start] : \</div><div class='del'>-                   (charf *)Z_NULL), \</div><div class='del'>-		(ulg)((long)s-&gt;strstart - s-&gt;block_start), \</div><div class='del'>-		(eof)); \</div><div class='del'>-   s-&gt;block_start = s-&gt;strstart; \</div><div class='del'>-   flush_pending(s-&gt;strm); \</div><div class='del'>-   Tracev((stderr,"[FLUSH]")); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Same but force premature exit if necessary. */</div><div class='del'>-#define FLUSH_BLOCK(s, eof) { \</div><div class='del'>-   FLUSH_BLOCK_ONLY(s, eof); \</div><div class='del'>-   if (s-&gt;strm-&gt;avail_out == 0) return (eof) ? finish_started : need_more; \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Copy without compression as much as possible from the input stream, return</div><div class='del'>- * the current block state.</div><div class='del'>- * This function does not insert new strings in the dictionary since</div><div class='del'>- * uncompressible data is probably not useful. This function is used</div><div class='del'>- * only for the level=0 compression option.</div><div class='del'>- * NOTE: this function should be optimized to avoid extra copying from</div><div class='del'>- * window to pending_buf.</div><div class='del'>- */</div><div class='del'>-local block_state deflate_stored(s, flush)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int flush;</div><div class='del'>-{</div><div class='del'>-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited</div><div class='del'>-     * to pending_buf_size, and each stored block has a 5 byte header:</div><div class='del'>-     */</div><div class='del'>-    ulg max_block_size = 0xffff;</div><div class='del'>-    ulg max_start;</div><div class='del'>-</div><div class='del'>-    if (max_block_size &gt; s-&gt;pending_buf_size - 5) {</div><div class='del'>-        max_block_size = s-&gt;pending_buf_size - 5;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Copy as much as possible from input to output: */</div><div class='del'>-    for (;;) {</div><div class='del'>-        /* Fill the window as much as possible: */</div><div class='del'>-        if (s-&gt;lookahead &lt;= 1) {</div><div class='del'>-</div><div class='del'>-            Assert(s-&gt;strstart &lt; s-&gt;w_size+MAX_DIST(s) ||</div><div class='del'>-		   s-&gt;block_start &gt;= (long)s-&gt;w_size, "slide too late");</div><div class='del'>-</div><div class='del'>-            fill_window(s);</div><div class='del'>-            if (s-&gt;lookahead == 0 &amp;&amp; flush == Z_NO_FLUSH) return need_more;</div><div class='del'>-</div><div class='del'>-            if (s-&gt;lookahead == 0) break; /* flush the current block */</div><div class='del'>-        }</div><div class='del'>-	Assert(s-&gt;block_start &gt;= 0L, "block gone");</div><div class='del'>-</div><div class='del'>-	s-&gt;strstart += s-&gt;lookahead;</div><div class='del'>-	s-&gt;lookahead = 0;</div><div class='del'>-</div><div class='del'>-	/* Emit a stored block if pending_buf will be full: */</div><div class='del'>- 	max_start = s-&gt;block_start + max_block_size;</div><div class='del'>-        if (s-&gt;strstart == 0 || (ulg)s-&gt;strstart &gt;= max_start) {</div><div class='del'>-	    /* strstart == 0 is possible when wraparound on 16-bit machine */</div><div class='del'>-	    s-&gt;lookahead = (uInt)(s-&gt;strstart - max_start);</div><div class='del'>-	    s-&gt;strstart = (uInt)max_start;</div><div class='del'>-            FLUSH_BLOCK(s, 0);</div><div class='del'>-	}</div><div class='del'>-	/* Flush if we may have to slide, otherwise block_start may become</div><div class='del'>-         * negative and the data will be gone:</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;strstart - (uInt)s-&gt;block_start &gt;= MAX_DIST(s)) {</div><div class='del'>-            FLUSH_BLOCK(s, 0);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    FLUSH_BLOCK(s, flush == Z_FINISH);</div><div class='del'>-    return flush == Z_FINISH ? finish_done : block_done;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Compress as much as possible from the input stream, return the current</div><div class='del'>- * block state.</div><div class='del'>- * This function does not perform lazy evaluation of matches and inserts</div><div class='del'>- * new strings in the dictionary only for unmatched strings or for short</div><div class='del'>- * matches. It is used only for the fast compression options.</div><div class='del'>- */</div><div class='del'>-local block_state deflate_fast(s, flush)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int flush;</div><div class='del'>-{</div><div class='del'>-    IPos hash_head = NIL; /* head of the hash chain */</div><div class='del'>-    int bflush;           /* set if current block must be flushed */</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-        /* Make sure that we always have enough lookahead, except</div><div class='del'>-         * at the end of the input file. We need MAX_MATCH bytes</div><div class='del'>-         * for the next match, plus MIN_MATCH bytes to insert the</div><div class='del'>-         * string following the next match.</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;lookahead &lt; MIN_LOOKAHEAD) {</div><div class='del'>-            fill_window(s);</div><div class='del'>-            if (s-&gt;lookahead &lt; MIN_LOOKAHEAD &amp;&amp; flush == Z_NO_FLUSH) {</div><div class='del'>-	        return need_more;</div><div class='del'>-	    }</div><div class='del'>-            if (s-&gt;lookahead == 0) break; /* flush the current block */</div><div class='del'>-        }</div><div class='del'>-</div><div class='del'>-        /* Insert the string window[strstart .. strstart+2] in the</div><div class='del'>-         * dictionary, and set hash_head to the head of the hash chain:</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;lookahead &gt;= MIN_MATCH) {</div><div class='del'>-            INSERT_STRING(s, s-&gt;strstart, hash_head);</div><div class='del'>-        }</div><div class='del'>-</div><div class='del'>-        /* Find the longest match, discarding those &lt;= prev_length.</div><div class='del'>-         * At this point we have always match_length &lt; MIN_MATCH</div><div class='del'>-         */</div><div class='del'>-        if (hash_head != NIL &amp;&amp; s-&gt;strstart - hash_head &lt;= MAX_DIST(s)) {</div><div class='del'>-            /* To simplify the code, we prevent matches with the string</div><div class='del'>-             * of window index 0 (in particular we have to avoid a match</div><div class='del'>-             * of the string with itself at the start of the input file).</div><div class='del'>-             */</div><div class='del'>-            if (s-&gt;strategy != Z_HUFFMAN_ONLY) {</div><div class='del'>-                s-&gt;match_length = longest_match (s, hash_head);</div><div class='del'>-            }</div><div class='del'>-            /* longest_match() sets match_start */</div><div class='del'>-        }</div><div class='del'>-        if (s-&gt;match_length &gt;= MIN_MATCH) {</div><div class='del'>-            check_match(s, s-&gt;strstart, s-&gt;match_start, s-&gt;match_length);</div><div class='del'>-</div><div class='del'>-            bflush = _tr_tally(s, s-&gt;strstart - s-&gt;match_start,</div><div class='del'>-                               s-&gt;match_length - MIN_MATCH);</div><div class='del'>-</div><div class='del'>-            s-&gt;lookahead -= s-&gt;match_length;</div><div class='del'>-</div><div class='del'>-            /* Insert new strings in the hash table only if the match length</div><div class='del'>-             * is not too large. This saves time but degrades compression.</div><div class='del'>-             */</div><div class='del'>-            if (s-&gt;match_length &lt;= s-&gt;max_insert_length &amp;&amp;</div><div class='del'>-                s-&gt;lookahead &gt;= MIN_MATCH) {</div><div class='del'>-                s-&gt;match_length--; /* string at strstart already in hash table */</div><div class='del'>-                do {</div><div class='del'>-                    s-&gt;strstart++;</div><div class='del'>-                    INSERT_STRING(s, s-&gt;strstart, hash_head);</div><div class='del'>-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are</div><div class='del'>-                     * always MIN_MATCH bytes ahead.</div><div class='del'>-                     */</div><div class='del'>-                } while (--s-&gt;match_length != 0);</div><div class='del'>-                s-&gt;strstart++; </div><div class='del'>-            } else {</div><div class='del'>-                s-&gt;strstart += s-&gt;match_length;</div><div class='del'>-                s-&gt;match_length = 0;</div><div class='del'>-                s-&gt;ins_h = s-&gt;window[s-&gt;strstart];</div><div class='del'>-                UPDATE_HASH(s, s-&gt;ins_h, s-&gt;window[s-&gt;strstart+1]);</div><div class='del'>-#if MIN_MATCH != 3</div><div class='del'>-                Call UPDATE_HASH() MIN_MATCH-3 more times</div><div class='del'>-#endif</div><div class='del'>-                /* If lookahead &lt; MIN_MATCH, ins_h is garbage, but it does not</div><div class='del'>-                 * matter since it will be recomputed at next deflate call.</div><div class='del'>-                 */</div><div class='del'>-            }</div><div class='del'>-        } else {</div><div class='del'>-            /* No match, output a literal byte */</div><div class='del'>-            Tracevv((stderr,"%c", s-&gt;window[s-&gt;strstart]));</div><div class='del'>-            bflush = _tr_tally (s, 0, s-&gt;window[s-&gt;strstart]);</div><div class='del'>-            s-&gt;lookahead--;</div><div class='del'>-            s-&gt;strstart++; </div><div class='del'>-        }</div><div class='del'>-        if (bflush) FLUSH_BLOCK(s, 0);</div><div class='del'>-    }</div><div class='del'>-    FLUSH_BLOCK(s, flush == Z_FINISH);</div><div class='del'>-    return flush == Z_FINISH ? finish_done : block_done;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Same as above, but achieves better compression. We use a lazy</div><div class='del'>- * evaluation for matches: a match is finally adopted only if there is</div><div class='del'>- * no better match at the next window position.</div><div class='del'>- */</div><div class='del'>-local block_state deflate_slow(s, flush)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int flush;</div><div class='del'>-{</div><div class='del'>-    IPos hash_head = NIL;    /* head of hash chain */</div><div class='del'>-    int bflush;              /* set if current block must be flushed */</div><div class='del'>-</div><div class='del'>-    /* Process the input block. */</div><div class='del'>-    for (;;) {</div><div class='del'>-        /* Make sure that we always have enough lookahead, except</div><div class='del'>-         * at the end of the input file. We need MAX_MATCH bytes</div><div class='del'>-         * for the next match, plus MIN_MATCH bytes to insert the</div><div class='del'>-         * string following the next match.</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;lookahead &lt; MIN_LOOKAHEAD) {</div><div class='del'>-            fill_window(s);</div><div class='del'>-            if (s-&gt;lookahead &lt; MIN_LOOKAHEAD &amp;&amp; flush == Z_NO_FLUSH) {</div><div class='del'>-	        return need_more;</div><div class='del'>-	    }</div><div class='del'>-            if (s-&gt;lookahead == 0) break; /* flush the current block */</div><div class='del'>-        }</div><div class='del'>-</div><div class='del'>-        /* Insert the string window[strstart .. strstart+2] in the</div><div class='del'>-         * dictionary, and set hash_head to the head of the hash chain:</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;lookahead &gt;= MIN_MATCH) {</div><div class='del'>-            INSERT_STRING(s, s-&gt;strstart, hash_head);</div><div class='del'>-        }</div><div class='del'>-</div><div class='del'>-        /* Find the longest match, discarding those &lt;= prev_length.</div><div class='del'>-         */</div><div class='del'>-        s-&gt;prev_length = s-&gt;match_length, s-&gt;prev_match = s-&gt;match_start;</div><div class='del'>-        s-&gt;match_length = MIN_MATCH-1;</div><div class='del'>-</div><div class='del'>-        if (hash_head != NIL &amp;&amp; s-&gt;prev_length &lt; s-&gt;max_lazy_match &amp;&amp;</div><div class='del'>-            s-&gt;strstart - hash_head &lt;= MAX_DIST(s)) {</div><div class='del'>-            /* To simplify the code, we prevent matches with the string</div><div class='del'>-             * of window index 0 (in particular we have to avoid a match</div><div class='del'>-             * of the string with itself at the start of the input file).</div><div class='del'>-             */</div><div class='del'>-            if (s-&gt;strategy != Z_HUFFMAN_ONLY) {</div><div class='del'>-                s-&gt;match_length = longest_match (s, hash_head);</div><div class='del'>-            }</div><div class='del'>-            /* longest_match() sets match_start */</div><div class='del'>-</div><div class='del'>-            if (s-&gt;match_length &lt;= 5 &amp;&amp; (s-&gt;strategy == Z_FILTERED ||</div><div class='del'>-                 (s-&gt;match_length == MIN_MATCH &amp;&amp;</div><div class='del'>-                  s-&gt;strstart - s-&gt;match_start &gt; TOO_FAR))) {</div><div class='del'>-</div><div class='del'>-                /* If prev_match is also MIN_MATCH, match_start is garbage</div><div class='del'>-                 * but we will ignore the current match anyway.</div><div class='del'>-                 */</div><div class='del'>-                s-&gt;match_length = MIN_MATCH-1;</div><div class='del'>-            }</div><div class='del'>-        }</div><div class='del'>-        /* If there was a match at the previous step and the current</div><div class='del'>-         * match is not better, output the previous match:</div><div class='del'>-         */</div><div class='del'>-        if (s-&gt;prev_length &gt;= MIN_MATCH &amp;&amp; s-&gt;match_length &lt;= s-&gt;prev_length) {</div><div class='del'>-            uInt max_insert = s-&gt;strstart + s-&gt;lookahead - MIN_MATCH;</div><div class='del'>-            /* Do not insert strings in hash table beyond this. */</div><div class='del'>-</div><div class='del'>-            check_match(s, s-&gt;strstart-1, s-&gt;prev_match, s-&gt;prev_length);</div><div class='del'>-</div><div class='del'>-            bflush = _tr_tally(s, s-&gt;strstart -1 - s-&gt;prev_match,</div><div class='del'>-                               s-&gt;prev_length - MIN_MATCH);</div><div class='del'>-</div><div class='del'>-            /* Insert in hash table all strings up to the end of the match.</div><div class='del'>-             * strstart-1 and strstart are already inserted. If there is not</div><div class='del'>-             * enough lookahead, the last two strings are not inserted in</div><div class='del'>-             * the hash table.</div><div class='del'>-             */</div><div class='del'>-            s-&gt;lookahead -= s-&gt;prev_length-1;</div><div class='del'>-            s-&gt;prev_length -= 2;</div><div class='del'>-            do {</div><div class='del'>-                if (++s-&gt;strstart &lt;= max_insert) {</div><div class='del'>-                    INSERT_STRING(s, s-&gt;strstart, hash_head);</div><div class='del'>-                }</div><div class='del'>-            } while (--s-&gt;prev_length != 0);</div><div class='del'>-            s-&gt;match_available = 0;</div><div class='del'>-            s-&gt;match_length = MIN_MATCH-1;</div><div class='del'>-            s-&gt;strstart++;</div><div class='del'>-</div><div class='del'>-            if (bflush) FLUSH_BLOCK(s, 0);</div><div class='del'>-</div><div class='del'>-        } else if (s-&gt;match_available) {</div><div class='del'>-            /* If there was no match at the previous position, output a</div><div class='del'>-             * single literal. If there was a match but the current match</div><div class='del'>-             * is longer, truncate the previous match to a single literal.</div><div class='del'>-             */</div><div class='del'>-            Tracevv((stderr,"%c", s-&gt;window[s-&gt;strstart-1]));</div><div class='del'>-            if (_tr_tally (s, 0, s-&gt;window[s-&gt;strstart-1])) {</div><div class='del'>-                FLUSH_BLOCK_ONLY(s, 0);</div><div class='del'>-            }</div><div class='del'>-            s-&gt;strstart++;</div><div class='del'>-            s-&gt;lookahead--;</div><div class='del'>-            if (s-&gt;strm-&gt;avail_out == 0) return need_more;</div><div class='del'>-        } else {</div><div class='del'>-            /* There is no previous match to compare with, wait for</div><div class='del'>-             * the next step to decide.</div><div class='del'>-             */</div><div class='del'>-            s-&gt;match_available = 1;</div><div class='del'>-            s-&gt;strstart++;</div><div class='del'>-            s-&gt;lookahead--;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    Assert (flush != Z_NO_FLUSH, "no flush?");</div><div class='del'>-    if (s-&gt;match_available) {</div><div class='del'>-        Tracevv((stderr,"%c", s-&gt;window[s-&gt;strstart-1]));</div><div class='del'>-        _tr_tally (s, 0, s-&gt;window[s-&gt;strstart-1]);</div><div class='del'>-        s-&gt;match_available = 0;</div><div class='del'>-    }</div><div class='del'>-    FLUSH_BLOCK(s, flush == Z_FINISH);</div><div class='del'>-    return flush == Z_FINISH ? finish_done : block_done;</div><div class='del'>-}</div><div class='del'>-/* --- deflate.c */</div><div class='del'>-</div><div class='del'>-/* +++ trees.c */</div><div class='del'>-/* trees.c -- output deflated data using Huffman coding</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ALGORITHM</div><div class='del'>- *</div><div class='del'>- *      The "deflation" process uses several Huffman trees. The more</div><div class='del'>- *      common source values are represented by shorter bit sequences.</div><div class='del'>- *</div><div class='del'>- *      Each code tree is stored in a compressed form which is itself</div><div class='del'>- * a Huffman encoding of the lengths of all the code strings (in</div><div class='del'>- * ascending order by source values).  The actual code strings are</div><div class='del'>- * reconstructed from the lengths in the inflate process, as described</div><div class='del'>- * in the deflate specification.</div><div class='del'>- *</div><div class='del'>- *  REFERENCES</div><div class='del'>- *</div><div class='del'>- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".</div><div class='del'>- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc</div><div class='del'>- *</div><div class='del'>- *      Storer, James A.</div><div class='del'>- *          Data Compression:  Methods and Theory, pp. 49-50.</div><div class='del'>- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.</div><div class='del'>- *</div><div class='del'>- *      Sedgewick, R.</div><div class='del'>- *          Algorithms, p290.</div><div class='del'>- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: trees.c,v 1.11 1996/07/24 13:41:06 me Exp $ */</div><div class='del'>-</div><div class='del'>-/* #include "deflate.h" */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-#  include &lt;ctype.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Constants</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define MAX_BL_BITS 7</div><div class='del'>-/* Bit length codes must not exceed MAX_BL_BITS bits */</div><div class='del'>-</div><div class='del'>-#define END_BLOCK 256</div><div class='del'>-/* end of block literal code */</div><div class='del'>-</div><div class='del'>-#define REP_3_6      16</div><div class='del'>-/* repeat previous bit length 3-6 times (2 bits of repeat count) */</div><div class='del'>-</div><div class='del'>-#define REPZ_3_10    17</div><div class='del'>-/* repeat a zero length 3-10 times  (3 bits of repeat count) */</div><div class='del'>-</div><div class='del'>-#define REPZ_11_138  18</div><div class='del'>-/* repeat a zero length 11-138 times  (7 bits of repeat count) */</div><div class='del'>-</div><div class='del'>-local int extra_lbits[LENGTH_CODES] /* extra bits for each length code */</div><div class='del'>-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};</div><div class='del'>-</div><div class='del'>-local int extra_dbits[D_CODES] /* extra bits for each distance code */</div><div class='del'>-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};</div><div class='del'>-</div><div class='del'>-local int extra_blbits[BL_CODES]/* extra bits for each bit length code */</div><div class='del'>-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};</div><div class='del'>-</div><div class='del'>-local uch bl_order[BL_CODES]</div><div class='del'>-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};</div><div class='del'>-/* The lengths of the bit length codes are sent in order of decreasing</div><div class='del'>- * probability, to avoid transmitting the lengths for unused bit length codes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define Buf_size (8 * 2*sizeof(char))</div><div class='del'>-/* Number of bits used within bi_buf. (bi_buf might be implemented on</div><div class='del'>- * more than 16 bits on some systems.)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Local data. These are initialized only once.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-local ct_data static_ltree[L_CODES+2];</div><div class='del'>-/* The static literal tree. Since the bit lengths are imposed, there is no</div><div class='del'>- * need for the L_CODES extra codes used during heap construction. However</div><div class='del'>- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init</div><div class='del'>- * below).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-local ct_data static_dtree[D_CODES];</div><div class='del'>-/* The static distance tree. (Actually a trivial tree since all codes use</div><div class='del'>- * 5 bits.)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-local uch dist_code[512];</div><div class='del'>-/* distance codes. The first 256 values correspond to the distances</div><div class='del'>- * 3 .. 258, the last 256 values correspond to the top 8 bits of</div><div class='del'>- * the 15 bit distances.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-local uch length_code[MAX_MATCH-MIN_MATCH+1];</div><div class='del'>-/* length code for each normalized match length (0 == MIN_MATCH) */</div><div class='del'>-</div><div class='del'>-local int base_length[LENGTH_CODES];</div><div class='del'>-/* First normalized length for each code (0 = MIN_MATCH) */</div><div class='del'>-</div><div class='del'>-local int base_dist[D_CODES];</div><div class='del'>-/* First normalized distance for each code (0 = distance of 1) */</div><div class='del'>-</div><div class='del'>-struct static_tree_desc_s {</div><div class='del'>-    ct_data *static_tree;        /* static tree or NULL */</div><div class='del'>-    intf    *extra_bits;         /* extra bits for each code or NULL */</div><div class='del'>-    int     extra_base;          /* base index for extra_bits */</div><div class='del'>-    int     elems;               /* max number of elements in the tree */</div><div class='del'>-    int     max_length;          /* max bit length for the codes */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-local static_tree_desc  static_l_desc =</div><div class='del'>-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};</div><div class='del'>-</div><div class='del'>-local static_tree_desc  static_d_desc =</div><div class='del'>-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};</div><div class='del'>-</div><div class='del'>-local static_tree_desc  static_bl_desc =</div><div class='del'>-{(ct_data *)0, extra_blbits, 0,      BL_CODES, MAX_BL_BITS};</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Local (static) routines in this file.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-local void tr_static_init OF((void));</div><div class='del'>-local void init_block     OF((deflate_state *s));</div><div class='del'>-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));</div><div class='del'>-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));</div><div class='del'>-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));</div><div class='del'>-local void build_tree     OF((deflate_state *s, tree_desc *desc));</div><div class='del'>-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));</div><div class='del'>-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));</div><div class='del'>-local int  build_bl_tree  OF((deflate_state *s));</div><div class='del'>-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,</div><div class='del'>-                              int blcodes));</div><div class='del'>-local void compress_block OF((deflate_state *s, ct_data *ltree,</div><div class='del'>-                              ct_data *dtree));</div><div class='del'>-local void set_data_type  OF((deflate_state *s));</div><div class='del'>-local unsigned bi_reverse OF((unsigned value, int length));</div><div class='del'>-local void bi_windup      OF((deflate_state *s));</div><div class='del'>-local void bi_flush       OF((deflate_state *s));</div><div class='del'>-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,</div><div class='del'>-                              int header));</div><div class='del'>-</div><div class='del'>-#ifndef DEBUG_ZLIB</div><div class='del'>-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)</div><div class='del'>-   /* Send a code of the given tree. c and tree must not have side effects */</div><div class='del'>-</div><div class='del'>-#else /* DEBUG_ZLIB */</div><div class='del'>-#  define send_code(s, c, tree) \</div><div class='del'>-     { if (verbose&gt;2) fprintf(stderr,"\ncd %3d ",(c)); \</div><div class='del'>-       send_bits(s, tree[c].Code, tree[c].Len); }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define d_code(dist) \</div><div class='del'>-   ((dist) &lt; 256 ? dist_code[dist] : dist_code[256+((dist)&gt;&gt;7)])</div><div class='del'>-/* Mapping from a distance to a distance code. dist is the distance - 1 and</div><div class='del'>- * must not have side effects. dist_code[256] and dist_code[257] are never</div><div class='del'>- * used.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Output a short LSB first on the stream.</div><div class='del'>- * IN assertion: there is enough room in pendingBuf.</div><div class='del'>- */</div><div class='del'>-#define put_short(s, w) { \</div><div class='del'>-    put_byte(s, (uch)((w) &amp; 0xff)); \</div><div class='del'>-    put_byte(s, (uch)((ush)(w) &gt;&gt; 8)); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send a value on a given number of bits.</div><div class='del'>- * IN assertion: length &lt;= 16 and value fits in length bits.</div><div class='del'>- */</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-local void send_bits      OF((deflate_state *s, int value, int length));</div><div class='del'>-</div><div class='del'>-local void send_bits(s, value, length)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int value;  /* value to send */</div><div class='del'>-    int length; /* number of bits */</div><div class='del'>-{</div><div class='del'>-    Tracevv((stderr," l %2d v %4x ", length, value));</div><div class='del'>-    Assert(length &gt; 0 &amp;&amp; length &lt;= 15, "invalid length");</div><div class='del'>-    s-&gt;bits_sent += (ulg)length;</div><div class='del'>-</div><div class='del'>-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and</div><div class='del'>-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))</div><div class='del'>-     * unused bits in value.</div><div class='del'>-     */</div><div class='del'>-    if (s-&gt;bi_valid &gt; (int)Buf_size - length) {</div><div class='del'>-        s-&gt;bi_buf |= (value &lt;&lt; s-&gt;bi_valid);</div><div class='del'>-        put_short(s, s-&gt;bi_buf);</div><div class='del'>-        s-&gt;bi_buf = (ush)value &gt;&gt; (Buf_size - s-&gt;bi_valid);</div><div class='del'>-        s-&gt;bi_valid += length - Buf_size;</div><div class='del'>-    } else {</div><div class='del'>-        s-&gt;bi_buf |= value &lt;&lt; s-&gt;bi_valid;</div><div class='del'>-        s-&gt;bi_valid += length;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-#else /* !DEBUG_ZLIB */</div><div class='del'>-</div><div class='del'>-#define send_bits(s, value, length) \</div><div class='del'>-{ int len = length;\</div><div class='del'>-  if (s-&gt;bi_valid &gt; (int)Buf_size - len) {\</div><div class='del'>-    int val = value;\</div><div class='del'>-    s-&gt;bi_buf |= (val &lt;&lt; s-&gt;bi_valid);\</div><div class='del'>-    put_short(s, s-&gt;bi_buf);\</div><div class='del'>-    s-&gt;bi_buf = (ush)val &gt;&gt; (Buf_size - s-&gt;bi_valid);\</div><div class='del'>-    s-&gt;bi_valid += len - Buf_size;\</div><div class='del'>-  } else {\</div><div class='del'>-    s-&gt;bi_buf |= (value) &lt;&lt; s-&gt;bi_valid;\</div><div class='del'>-    s-&gt;bi_valid += len;\</div><div class='del'>-  }\</div><div class='del'>-}</div><div class='del'>-#endif /* DEBUG_ZLIB */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define MAX(a,b) (a &gt;= b ? a : b)</div><div class='del'>-/* the arguments must not have side effects */</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Initialize the various 'constant' tables. In a multi-threaded environment,</div><div class='del'>- * this function may be called by two threads concurrently, but this is</div><div class='del'>- * harmless since both invocations do exactly the same thing.</div><div class='del'>- */</div><div class='del'>-local void tr_static_init()</div><div class='del'>-{</div><div class='del'>-    static int static_init_done = 0;</div><div class='del'>-    int n;        /* iterates over tree elements */</div><div class='del'>-    int bits;     /* bit counter */</div><div class='del'>-    int length;   /* length value */</div><div class='del'>-    int code;     /* code value */</div><div class='del'>-    int dist;     /* distance index */</div><div class='del'>-    ush bl_count[MAX_BITS+1];</div><div class='del'>-    /* number of codes at each bit length for an optimal tree */</div><div class='del'>-</div><div class='del'>-    if (static_init_done) return;</div><div class='del'>-</div><div class='del'>-    /* Initialize the mapping length (0..255) -&gt; length code (0..28) */</div><div class='del'>-    length = 0;</div><div class='del'>-    for (code = 0; code &lt; LENGTH_CODES-1; code++) {</div><div class='del'>-        base_length[code] = length;</div><div class='del'>-        for (n = 0; n &lt; (1&lt;&lt;extra_lbits[code]); n++) {</div><div class='del'>-            length_code[length++] = (uch)code;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    Assert (length == 256, "tr_static_init: length != 256");</div><div class='del'>-    /* Note that the length 255 (match length 258) can be represented</div><div class='del'>-     * in two different ways: code 284 + 5 bits or code 285, so we</div><div class='del'>-     * overwrite length_code[255] to use the best encoding:</div><div class='del'>-     */</div><div class='del'>-    length_code[length-1] = (uch)code;</div><div class='del'>-</div><div class='del'>-    /* Initialize the mapping dist (0..32K) -&gt; dist code (0..29) */</div><div class='del'>-    dist = 0;</div><div class='del'>-    for (code = 0 ; code &lt; 16; code++) {</div><div class='del'>-        base_dist[code] = dist;</div><div class='del'>-        for (n = 0; n &lt; (1&lt;&lt;extra_dbits[code]); n++) {</div><div class='del'>-            dist_code[dist++] = (uch)code;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    Assert (dist == 256, "tr_static_init: dist != 256");</div><div class='del'>-    dist &gt;&gt;= 7; /* from now on, all distances are divided by 128 */</div><div class='del'>-    for ( ; code &lt; D_CODES; code++) {</div><div class='del'>-        base_dist[code] = dist &lt;&lt; 7;</div><div class='del'>-        for (n = 0; n &lt; (1&lt;&lt;(extra_dbits[code]-7)); n++) {</div><div class='del'>-            dist_code[256 + dist++] = (uch)code;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    Assert (dist == 256, "tr_static_init: 256+dist != 512");</div><div class='del'>-</div><div class='del'>-    /* Construct the codes of the static literal tree */</div><div class='del'>-    for (bits = 0; bits &lt;= MAX_BITS; bits++) bl_count[bits] = 0;</div><div class='del'>-    n = 0;</div><div class='del'>-    while (n &lt;= 143) static_ltree[n++].Len = 8, bl_count[8]++;</div><div class='del'>-    while (n &lt;= 255) static_ltree[n++].Len = 9, bl_count[9]++;</div><div class='del'>-    while (n &lt;= 279) static_ltree[n++].Len = 7, bl_count[7]++;</div><div class='del'>-    while (n &lt;= 287) static_ltree[n++].Len = 8, bl_count[8]++;</div><div class='del'>-    /* Codes 286 and 287 do not exist, but we must include them in the</div><div class='del'>-     * tree construction to get a canonical Huffman tree (longest code</div><div class='del'>-     * all ones)</div><div class='del'>-     */</div><div class='del'>-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);</div><div class='del'>-</div><div class='del'>-    /* The static distance tree is trivial: */</div><div class='del'>-    for (n = 0; n &lt; D_CODES; n++) {</div><div class='del'>-        static_dtree[n].Len = 5;</div><div class='del'>-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);</div><div class='del'>-    }</div><div class='del'>-    static_init_done = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Initialize the tree data structures for a new zlib stream.</div><div class='del'>- */</div><div class='del'>-void _tr_init(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    tr_static_init();</div><div class='del'>-</div><div class='del'>-    s-&gt;compressed_len = 0L;</div><div class='del'>-</div><div class='del'>-    s-&gt;l_desc.dyn_tree = s-&gt;dyn_ltree;</div><div class='del'>-    s-&gt;l_desc.stat_desc = &amp;static_l_desc;</div><div class='del'>-</div><div class='del'>-    s-&gt;d_desc.dyn_tree = s-&gt;dyn_dtree;</div><div class='del'>-    s-&gt;d_desc.stat_desc = &amp;static_d_desc;</div><div class='del'>-</div><div class='del'>-    s-&gt;bl_desc.dyn_tree = s-&gt;bl_tree;</div><div class='del'>-    s-&gt;bl_desc.stat_desc = &amp;static_bl_desc;</div><div class='del'>-</div><div class='del'>-    s-&gt;bi_buf = 0;</div><div class='del'>-    s-&gt;bi_valid = 0;</div><div class='del'>-    s-&gt;last_eob_len = 8; /* enough lookahead for inflate */</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-    s-&gt;bits_sent = 0L;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /* Initialize the first block of the first file: */</div><div class='del'>-    init_block(s);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Initialize a new block.</div><div class='del'>- */</div><div class='del'>-local void init_block(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    int n; /* iterates over tree elements */</div><div class='del'>-</div><div class='del'>-    /* Initialize the trees. */</div><div class='del'>-    for (n = 0; n &lt; L_CODES;  n++) s-&gt;dyn_ltree[n].Freq = 0;</div><div class='del'>-    for (n = 0; n &lt; D_CODES;  n++) s-&gt;dyn_dtree[n].Freq = 0;</div><div class='del'>-    for (n = 0; n &lt; BL_CODES; n++) s-&gt;bl_tree[n].Freq = 0;</div><div class='del'>-</div><div class='del'>-    s-&gt;dyn_ltree[END_BLOCK].Freq = 1;</div><div class='del'>-    s-&gt;opt_len = s-&gt;static_len = 0L;</div><div class='del'>-    s-&gt;last_lit = s-&gt;matches = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define SMALLEST 1</div><div class='del'>-/* Index within the heap array of least frequent node in the Huffman tree */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Remove the smallest element from the heap and recreate the heap with</div><div class='del'>- * one less element. Updates heap and heap_len.</div><div class='del'>- */</div><div class='del'>-#define pqremove(s, tree, top) \</div><div class='del'>-{\</div><div class='del'>-    top = s-&gt;heap[SMALLEST]; \</div><div class='del'>-    s-&gt;heap[SMALLEST] = s-&gt;heap[s-&gt;heap_len--]; \</div><div class='del'>-    pqdownheap(s, tree, SMALLEST); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Compares to subtrees, using the tree depth as tie breaker when</div><div class='del'>- * the subtrees have equal frequency. This minimizes the worst case length.</div><div class='del'>- */</div><div class='del'>-#define smaller(tree, n, m, depth) \</div><div class='del'>-   (tree[n].Freq &lt; tree[m].Freq || \</div><div class='del'>-   (tree[n].Freq == tree[m].Freq &amp;&amp; depth[n] &lt;= depth[m]))</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Restore the heap property by moving down the tree starting at node k,</div><div class='del'>- * exchanging a node with the smallest of its two sons if necessary, stopping</div><div class='del'>- * when the heap property is re-established (each father smaller than its</div><div class='del'>- * two sons).</div><div class='del'>- */</div><div class='del'>-local void pqdownheap(s, tree, k)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    ct_data *tree;  /* the tree to restore */</div><div class='del'>-    int k;               /* node to move down */</div><div class='del'>-{</div><div class='del'>-    int v = s-&gt;heap[k];</div><div class='del'>-    int j = k &lt;&lt; 1;  /* left son of k */</div><div class='del'>-    while (j &lt;= s-&gt;heap_len) {</div><div class='del'>-        /* Set j to the smallest of the two sons: */</div><div class='del'>-        if (j &lt; s-&gt;heap_len &amp;&amp;</div><div class='del'>-            smaller(tree, s-&gt;heap[j+1], s-&gt;heap[j], s-&gt;depth)) {</div><div class='del'>-            j++;</div><div class='del'>-        }</div><div class='del'>-        /* Exit if v is smaller than both sons */</div><div class='del'>-        if (smaller(tree, v, s-&gt;heap[j], s-&gt;depth)) break;</div><div class='del'>-</div><div class='del'>-        /* Exchange v with the smallest son */</div><div class='del'>-        s-&gt;heap[k] = s-&gt;heap[j];  k = j;</div><div class='del'>-</div><div class='del'>-        /* And continue down the tree, setting j to the left son of k */</div><div class='del'>-        j &lt;&lt;= 1;</div><div class='del'>-    }</div><div class='del'>-    s-&gt;heap[k] = v;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Compute the optimal bit lengths for a tree and update the total bit length</div><div class='del'>- * for the current block.</div><div class='del'>- * IN assertion: the fields freq and dad are set, heap[heap_max] and</div><div class='del'>- *    above are the tree nodes sorted by increasing frequency.</div><div class='del'>- * OUT assertions: the field len is set to the optimal bit length, the</div><div class='del'>- *     array bl_count contains the frequencies for each bit length.</div><div class='del'>- *     The length opt_len is updated; static_len is also updated if stree is</div><div class='del'>- *     not null.</div><div class='del'>- */</div><div class='del'>-local void gen_bitlen(s, desc)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    tree_desc *desc;    /* the tree descriptor */</div><div class='del'>-{</div><div class='del'>-    ct_data *tree  = desc-&gt;dyn_tree;</div><div class='del'>-    int max_code   = desc-&gt;max_code;</div><div class='del'>-    ct_data *stree = desc-&gt;stat_desc-&gt;static_tree;</div><div class='del'>-    intf *extra    = desc-&gt;stat_desc-&gt;extra_bits;</div><div class='del'>-    int base       = desc-&gt;stat_desc-&gt;extra_base;</div><div class='del'>-    int max_length = desc-&gt;stat_desc-&gt;max_length;</div><div class='del'>-    int h;              /* heap index */</div><div class='del'>-    int n, m;           /* iterate over the tree elements */</div><div class='del'>-    int bits;           /* bit length */</div><div class='del'>-    int xbits;          /* extra bits */</div><div class='del'>-    ush f;              /* frequency */</div><div class='del'>-    int overflow = 0;   /* number of elements with bit length too large */</div><div class='del'>-</div><div class='del'>-    for (bits = 0; bits &lt;= MAX_BITS; bits++) s-&gt;bl_count[bits] = 0;</div><div class='del'>-</div><div class='del'>-    /* In a first pass, compute the optimal bit lengths (which may</div><div class='del'>-     * overflow in the case of the bit length tree).</div><div class='del'>-     */</div><div class='del'>-    tree[s-&gt;heap[s-&gt;heap_max]].Len = 0; /* root of the heap */</div><div class='del'>-</div><div class='del'>-    for (h = s-&gt;heap_max+1; h &lt; HEAP_SIZE; h++) {</div><div class='del'>-        n = s-&gt;heap[h];</div><div class='del'>-        bits = tree[tree[n].Dad].Len + 1;</div><div class='del'>-        if (bits &gt; max_length) bits = max_length, overflow++;</div><div class='del'>-        tree[n].Len = (ush)bits;</div><div class='del'>-        /* We overwrite tree[n].Dad which is no longer needed */</div><div class='del'>-</div><div class='del'>-        if (n &gt; max_code) continue; /* not a leaf node */</div><div class='del'>-</div><div class='del'>-        s-&gt;bl_count[bits]++;</div><div class='del'>-        xbits = 0;</div><div class='del'>-        if (n &gt;= base) xbits = extra[n-base];</div><div class='del'>-        f = tree[n].Freq;</div><div class='del'>-        s-&gt;opt_len += (ulg)f * (bits + xbits);</div><div class='del'>-        if (stree) s-&gt;static_len += (ulg)f * (stree[n].Len + xbits);</div><div class='del'>-    }</div><div class='del'>-    if (overflow == 0) return;</div><div class='del'>-</div><div class='del'>-    Trace((stderr,"\nbit length overflow\n"));</div><div class='del'>-    /* This happens for example on obj2 and pic of the Calgary corpus */</div><div class='del'>-</div><div class='del'>-    /* Find the first bit length which could increase: */</div><div class='del'>-    do {</div><div class='del'>-        bits = max_length-1;</div><div class='del'>-        while (s-&gt;bl_count[bits] == 0) bits--;</div><div class='del'>-        s-&gt;bl_count[bits]--;      /* move one leaf down the tree */</div><div class='del'>-        s-&gt;bl_count[bits+1] += 2; /* move one overflow item as its brother */</div><div class='del'>-        s-&gt;bl_count[max_length]--;</div><div class='del'>-        /* The brother of the overflow item also moves one step up,</div><div class='del'>-         * but this does not affect bl_count[max_length]</div><div class='del'>-         */</div><div class='del'>-        overflow -= 2;</div><div class='del'>-    } while (overflow &gt; 0);</div><div class='del'>-</div><div class='del'>-    /* Now recompute all bit lengths, scanning in increasing frequency.</div><div class='del'>-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all</div><div class='del'>-     * lengths instead of fixing only the wrong ones. This idea is taken</div><div class='del'>-     * from 'ar' written by Haruhiko Okumura.)</div><div class='del'>-     */</div><div class='del'>-    for (bits = max_length; bits != 0; bits--) {</div><div class='del'>-        n = s-&gt;bl_count[bits];</div><div class='del'>-        while (n != 0) {</div><div class='del'>-            m = s-&gt;heap[--h];</div><div class='del'>-            if (m &gt; max_code) continue;</div><div class='del'>-            if (tree[m].Len != (unsigned) bits) {</div><div class='del'>-                Trace((stderr,"code %d bits %d-&gt;%d\n", m, tree[m].Len, bits));</div><div class='del'>-                s-&gt;opt_len += ((long)bits - (long)tree[m].Len)</div><div class='del'>-                              *(long)tree[m].Freq;</div><div class='del'>-                tree[m].Len = (ush)bits;</div><div class='del'>-            }</div><div class='del'>-            n--;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Generate the codes for a given tree and bit counts (which need not be</div><div class='del'>- * optimal).</div><div class='del'>- * IN assertion: the array bl_count contains the bit length statistics for</div><div class='del'>- * the given tree and the field len is set for all tree elements.</div><div class='del'>- * OUT assertion: the field code is set for all tree elements of non</div><div class='del'>- *     zero code length.</div><div class='del'>- */</div><div class='del'>-local void gen_codes (tree, max_code, bl_count)</div><div class='del'>-    ct_data *tree;             /* the tree to decorate */</div><div class='del'>-    int max_code;              /* largest code with non zero frequency */</div><div class='del'>-    ushf *bl_count;            /* number of codes at each bit length */</div><div class='del'>-{</div><div class='del'>-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */</div><div class='del'>-    ush code = 0;              /* running code value */</div><div class='del'>-    int bits;                  /* bit index */</div><div class='del'>-    int n;                     /* code index */</div><div class='del'>-</div><div class='del'>-    /* The distribution counts are first used to generate the code values</div><div class='del'>-     * without bit reversal.</div><div class='del'>-     */</div><div class='del'>-    for (bits = 1; bits &lt;= MAX_BITS; bits++) {</div><div class='del'>-        next_code[bits] = code = (code + bl_count[bits-1]) &lt;&lt; 1;</div><div class='del'>-    }</div><div class='del'>-    /* Check that the bit counts in bl_count are consistent. The last code</div><div class='del'>-     * must be all ones.</div><div class='del'>-     */</div><div class='del'>-    Assert (code + bl_count[MAX_BITS]-1 == (1&lt;&lt;MAX_BITS)-1,</div><div class='del'>-            "inconsistent bit counts");</div><div class='del'>-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));</div><div class='del'>-</div><div class='del'>-    for (n = 0;  n &lt;= max_code; n++) {</div><div class='del'>-        int len = tree[n].Len;</div><div class='del'>-        if (len == 0) continue;</div><div class='del'>-        /* Now reverse the bits */</div><div class='del'>-        tree[n].Code = bi_reverse(next_code[len]++, len);</div><div class='del'>-</div><div class='del'>-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",</div><div class='del'>-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Construct one Huffman tree and assigns the code bit strings and lengths.</div><div class='del'>- * Update the total bit length for the current block.</div><div class='del'>- * IN assertion: the field freq is set for all tree elements.</div><div class='del'>- * OUT assertions: the fields len and code are set to the optimal bit length</div><div class='del'>- *     and corresponding code. The length opt_len is updated; static_len is</div><div class='del'>- *     also updated if stree is not null. The field max_code is set.</div><div class='del'>- */</div><div class='del'>-local void build_tree(s, desc)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    tree_desc *desc; /* the tree descriptor */</div><div class='del'>-{</div><div class='del'>-    ct_data *tree   = desc-&gt;dyn_tree;</div><div class='del'>-    ct_data *stree  = desc-&gt;stat_desc-&gt;static_tree;</div><div class='del'>-    int elems       = desc-&gt;stat_desc-&gt;elems;</div><div class='del'>-    int n, m;          /* iterate over heap elements */</div><div class='del'>-    int max_code = -1; /* largest code with non zero frequency */</div><div class='del'>-    int node;          /* new node being created */</div><div class='del'>-</div><div class='del'>-    /* Construct the initial heap, with least frequent element in</div><div class='del'>-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].</div><div class='del'>-     * heap[0] is not used.</div><div class='del'>-     */</div><div class='del'>-    s-&gt;heap_len = 0, s-&gt;heap_max = HEAP_SIZE;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt; elems; n++) {</div><div class='del'>-        if (tree[n].Freq != 0) {</div><div class='del'>-            s-&gt;heap[++(s-&gt;heap_len)] = max_code = n;</div><div class='del'>-            s-&gt;depth[n] = 0;</div><div class='del'>-        } else {</div><div class='del'>-            tree[n].Len = 0;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* The pkzip format requires that at least one distance code exists,</div><div class='del'>-     * and that at least one bit should be sent even if there is only one</div><div class='del'>-     * possible code. So to avoid special checks later on we force at least</div><div class='del'>-     * two codes of non zero frequency.</div><div class='del'>-     */</div><div class='del'>-    while (s-&gt;heap_len &lt; 2) {</div><div class='del'>-        node = s-&gt;heap[++(s-&gt;heap_len)] = (max_code &lt; 2 ? ++max_code : 0);</div><div class='del'>-        tree[node].Freq = 1;</div><div class='del'>-        s-&gt;depth[node] = 0;</div><div class='del'>-        s-&gt;opt_len--; if (stree) s-&gt;static_len -= stree[node].Len;</div><div class='del'>-        /* node is 0 or 1 so it does not have extra bits */</div><div class='del'>-    }</div><div class='del'>-    desc-&gt;max_code = max_code;</div><div class='del'>-</div><div class='del'>-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,</div><div class='del'>-     * establish sub-heaps of increasing lengths:</div><div class='del'>-     */</div><div class='del'>-    for (n = s-&gt;heap_len/2; n &gt;= 1; n--) pqdownheap(s, tree, n);</div><div class='del'>-</div><div class='del'>-    /* Construct the Huffman tree by repeatedly combining the least two</div><div class='del'>-     * frequent nodes.</div><div class='del'>-     */</div><div class='del'>-    node = elems;              /* next internal node of the tree */</div><div class='del'>-    do {</div><div class='del'>-        pqremove(s, tree, n);  /* n = node of least frequency */</div><div class='del'>-        m = s-&gt;heap[SMALLEST]; /* m = node of next least frequency */</div><div class='del'>-</div><div class='del'>-        s-&gt;heap[--(s-&gt;heap_max)] = n; /* keep the nodes sorted by frequency */</div><div class='del'>-        s-&gt;heap[--(s-&gt;heap_max)] = m;</div><div class='del'>-</div><div class='del'>-        /* Create a new node father of n and m */</div><div class='del'>-        tree[node].Freq = tree[n].Freq + tree[m].Freq;</div><div class='del'>-        s-&gt;depth[node] = (uch) (MAX(s-&gt;depth[n], s-&gt;depth[m]) + 1);</div><div class='del'>-        tree[n].Dad = tree[m].Dad = (ush)node;</div><div class='del'>-#ifdef DUMP_BL_TREE</div><div class='del'>-        if (tree == s-&gt;bl_tree) {</div><div class='del'>-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",</div><div class='del'>-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);</div><div class='del'>-        }</div><div class='del'>-#endif</div><div class='del'>-        /* and insert the new node in the heap */</div><div class='del'>-        s-&gt;heap[SMALLEST] = node++;</div><div class='del'>-        pqdownheap(s, tree, SMALLEST);</div><div class='del'>-</div><div class='del'>-    } while (s-&gt;heap_len &gt;= 2);</div><div class='del'>-</div><div class='del'>-    s-&gt;heap[--(s-&gt;heap_max)] = s-&gt;heap[SMALLEST];</div><div class='del'>-</div><div class='del'>-    /* At this point, the fields freq and dad are set. We can now</div><div class='del'>-     * generate the bit lengths.</div><div class='del'>-     */</div><div class='del'>-    gen_bitlen(s, (tree_desc *)desc);</div><div class='del'>-</div><div class='del'>-    /* The field len is now set, we can generate the bit codes */</div><div class='del'>-    gen_codes ((ct_data *)tree, max_code, s-&gt;bl_count);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Scan a literal or distance tree to determine the frequencies of the codes</div><div class='del'>- * in the bit length tree.</div><div class='del'>- */</div><div class='del'>-local void scan_tree (s, tree, max_code)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    ct_data *tree;   /* the tree to be scanned */</div><div class='del'>-    int max_code;    /* and its largest code of non zero frequency */</div><div class='del'>-{</div><div class='del'>-    int n;                     /* iterates over all tree elements */</div><div class='del'>-    int prevlen = -1;          /* last emitted length */</div><div class='del'>-    int curlen;                /* length of current code */</div><div class='del'>-    int nextlen = tree[0].Len; /* length of next code */</div><div class='del'>-    int count = 0;             /* repeat count of the current code */</div><div class='del'>-    int max_count = 7;         /* max repeat count */</div><div class='del'>-    int min_count = 4;         /* min repeat count */</div><div class='del'>-</div><div class='del'>-    if (nextlen == 0) max_count = 138, min_count = 3;</div><div class='del'>-    tree[max_code+1].Len = (ush)0xffff; /* guard */</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt;= max_code; n++) {</div><div class='del'>-        curlen = nextlen; nextlen = tree[n+1].Len;</div><div class='del'>-        if (++count &lt; max_count &amp;&amp; curlen == nextlen) {</div><div class='del'>-            continue;</div><div class='del'>-        } else if (count &lt; min_count) {</div><div class='del'>-            s-&gt;bl_tree[curlen].Freq += count;</div><div class='del'>-        } else if (curlen != 0) {</div><div class='del'>-            if (curlen != prevlen) s-&gt;bl_tree[curlen].Freq++;</div><div class='del'>-            s-&gt;bl_tree[REP_3_6].Freq++;</div><div class='del'>-        } else if (count &lt;= 10) {</div><div class='del'>-            s-&gt;bl_tree[REPZ_3_10].Freq++;</div><div class='del'>-        } else {</div><div class='del'>-            s-&gt;bl_tree[REPZ_11_138].Freq++;</div><div class='del'>-        }</div><div class='del'>-        count = 0; prevlen = curlen;</div><div class='del'>-        if (nextlen == 0) {</div><div class='del'>-            max_count = 138, min_count = 3;</div><div class='del'>-        } else if (curlen == nextlen) {</div><div class='del'>-            max_count = 6, min_count = 3;</div><div class='del'>-        } else {</div><div class='del'>-            max_count = 7, min_count = 4;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send a literal or distance tree in compressed form, using the codes in</div><div class='del'>- * bl_tree.</div><div class='del'>- */</div><div class='del'>-local void send_tree (s, tree, max_code)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    ct_data *tree; /* the tree to be scanned */</div><div class='del'>-    int max_code;       /* and its largest code of non zero frequency */</div><div class='del'>-{</div><div class='del'>-    int n;                     /* iterates over all tree elements */</div><div class='del'>-    int prevlen = -1;          /* last emitted length */</div><div class='del'>-    int curlen;                /* length of current code */</div><div class='del'>-    int nextlen = tree[0].Len; /* length of next code */</div><div class='del'>-    int count = 0;             /* repeat count of the current code */</div><div class='del'>-    int max_count = 7;         /* max repeat count */</div><div class='del'>-    int min_count = 4;         /* min repeat count */</div><div class='del'>-</div><div class='del'>-    /* tree[max_code+1].Len = -1; */  /* guard already set */</div><div class='del'>-    if (nextlen == 0) max_count = 138, min_count = 3;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt;= max_code; n++) {</div><div class='del'>-        curlen = nextlen; nextlen = tree[n+1].Len;</div><div class='del'>-        if (++count &lt; max_count &amp;&amp; curlen == nextlen) {</div><div class='del'>-            continue;</div><div class='del'>-        } else if (count &lt; min_count) {</div><div class='del'>-            do { send_code(s, curlen, s-&gt;bl_tree); } while (--count != 0);</div><div class='del'>-</div><div class='del'>-        } else if (curlen != 0) {</div><div class='del'>-            if (curlen != prevlen) {</div><div class='del'>-                send_code(s, curlen, s-&gt;bl_tree); count--;</div><div class='del'>-            }</div><div class='del'>-            Assert(count &gt;= 3 &amp;&amp; count &lt;= 6, " 3_6?");</div><div class='del'>-            send_code(s, REP_3_6, s-&gt;bl_tree); send_bits(s, count-3, 2);</div><div class='del'>-</div><div class='del'>-        } else if (count &lt;= 10) {</div><div class='del'>-            send_code(s, REPZ_3_10, s-&gt;bl_tree); send_bits(s, count-3, 3);</div><div class='del'>-</div><div class='del'>-        } else {</div><div class='del'>-            send_code(s, REPZ_11_138, s-&gt;bl_tree); send_bits(s, count-11, 7);</div><div class='del'>-        }</div><div class='del'>-        count = 0; prevlen = curlen;</div><div class='del'>-        if (nextlen == 0) {</div><div class='del'>-            max_count = 138, min_count = 3;</div><div class='del'>-        } else if (curlen == nextlen) {</div><div class='del'>-            max_count = 6, min_count = 3;</div><div class='del'>-        } else {</div><div class='del'>-            max_count = 7, min_count = 4;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Construct the Huffman tree for the bit lengths and return the index in</div><div class='del'>- * bl_order of the last bit length code to send.</div><div class='del'>- */</div><div class='del'>-local int build_bl_tree(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    int max_blindex;  /* index of last bit length code of non zero freq */</div><div class='del'>-</div><div class='del'>-    /* Determine the bit length frequencies for literal and distance trees */</div><div class='del'>-    scan_tree(s, (ct_data *)s-&gt;dyn_ltree, s-&gt;l_desc.max_code);</div><div class='del'>-    scan_tree(s, (ct_data *)s-&gt;dyn_dtree, s-&gt;d_desc.max_code);</div><div class='del'>-</div><div class='del'>-    /* Build the bit length tree: */</div><div class='del'>-    build_tree(s, (tree_desc *)(&amp;(s-&gt;bl_desc)));</div><div class='del'>-    /* opt_len now includes the length of the tree representations, except</div><div class='del'>-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    /* Determine the number of bit length codes to send. The pkzip format</div><div class='del'>-     * requires that at least 4 bit length codes be sent. (appnote.txt says</div><div class='del'>-     * 3 but the actual value used is 4.)</div><div class='del'>-     */</div><div class='del'>-    for (max_blindex = BL_CODES-1; max_blindex &gt;= 3; max_blindex--) {</div><div class='del'>-        if (s-&gt;bl_tree[bl_order[max_blindex]].Len != 0) break;</div><div class='del'>-    }</div><div class='del'>-    /* Update opt_len to include the bit length tree and counts */</div><div class='del'>-    s-&gt;opt_len += 3*(max_blindex+1) + 5+5+4;</div><div class='del'>-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",</div><div class='del'>-            s-&gt;opt_len, s-&gt;static_len));</div><div class='del'>-</div><div class='del'>-    return max_blindex;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send the header for a block using dynamic Huffman trees: the counts, the</div><div class='del'>- * lengths of the bit length codes, the literal tree and the distance tree.</div><div class='del'>- * IN assertion: lcodes &gt;= 257, dcodes &gt;= 1, blcodes &gt;= 4.</div><div class='del'>- */</div><div class='del'>-local void send_all_trees(s, lcodes, dcodes, blcodes)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    int lcodes, dcodes, blcodes; /* number of codes for each tree */</div><div class='del'>-{</div><div class='del'>-    int rank;                    /* index in bl_order */</div><div class='del'>-</div><div class='del'>-    Assert (lcodes &gt;= 257 &amp;&amp; dcodes &gt;= 1 &amp;&amp; blcodes &gt;= 4, "not enough codes");</div><div class='del'>-    Assert (lcodes &lt;= L_CODES &amp;&amp; dcodes &lt;= D_CODES &amp;&amp; blcodes &lt;= BL_CODES,</div><div class='del'>-            "too many codes");</div><div class='del'>-    Tracev((stderr, "\nbl counts: "));</div><div class='del'>-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */</div><div class='del'>-    send_bits(s, dcodes-1,   5);</div><div class='del'>-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */</div><div class='del'>-    for (rank = 0; rank &lt; blcodes; rank++) {</div><div class='del'>-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));</div><div class='del'>-        send_bits(s, s-&gt;bl_tree[bl_order[rank]].Len, 3);</div><div class='del'>-    }</div><div class='del'>-    Tracev((stderr, "\nbl tree: sent %ld", s-&gt;bits_sent));</div><div class='del'>-</div><div class='del'>-    send_tree(s, (ct_data *)s-&gt;dyn_ltree, lcodes-1); /* literal tree */</div><div class='del'>-    Tracev((stderr, "\nlit tree: sent %ld", s-&gt;bits_sent));</div><div class='del'>-</div><div class='del'>-    send_tree(s, (ct_data *)s-&gt;dyn_dtree, dcodes-1); /* distance tree */</div><div class='del'>-    Tracev((stderr, "\ndist tree: sent %ld", s-&gt;bits_sent));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send a stored block</div><div class='del'>- */</div><div class='del'>-void _tr_stored_block(s, buf, stored_len, eof)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    charf *buf;       /* input block */</div><div class='del'>-    ulg stored_len;   /* length of input block */</div><div class='del'>-    int eof;          /* true if this is the last block for a file */</div><div class='del'>-{</div><div class='del'>-    send_bits(s, (STORED_BLOCK&lt;&lt;1)+eof, 3);  /* send block type */</div><div class='del'>-    s-&gt;compressed_len = (s-&gt;compressed_len + 3 + 7) &amp; (ulg)~7L;</div><div class='del'>-    s-&gt;compressed_len += (stored_len + 4) &lt;&lt; 3;</div><div class='del'>-</div><div class='del'>-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Send just the `stored block' type code without any length bytes or data.</div><div class='del'>- */</div><div class='del'>-void _tr_stored_type_only(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    send_bits(s, (STORED_BLOCK &lt;&lt; 1), 3);</div><div class='del'>-    bi_windup(s);</div><div class='del'>-    s-&gt;compressed_len = (s-&gt;compressed_len + 3) &amp; ~7L;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send one empty static block to give enough lookahead for inflate.</div><div class='del'>- * This takes 10 bits, of which 7 may remain in the bit buffer.</div><div class='del'>- * The current inflate code requires 9 bits of lookahead. If the</div><div class='del'>- * last two codes for the previous block (real code plus EOB) were coded</div><div class='del'>- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode</div><div class='del'>- * the last real code. In this case we send two empty static blocks instead</div><div class='del'>- * of one. (There are no problems if the previous block is stored or fixed.)</div><div class='del'>- * To simplify the code, we assume the worst case of last real code encoded</div><div class='del'>- * on one bit only.</div><div class='del'>- */</div><div class='del'>-void _tr_align(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    send_bits(s, STATIC_TREES&lt;&lt;1, 3);</div><div class='del'>-    send_code(s, END_BLOCK, static_ltree);</div><div class='del'>-    s-&gt;compressed_len += 10L; /* 3 for block type, 7 for EOB */</div><div class='del'>-    bi_flush(s);</div><div class='del'>-    /* Of the 10 bits for the empty block, we have already sent</div><div class='del'>-     * (10 - bi_valid) bits. The lookahead for the last real code (before</div><div class='del'>-     * the EOB of the previous block) was thus at least one plus the length</div><div class='del'>-     * of the EOB plus what we have just sent of the empty static block.</div><div class='del'>-     */</div><div class='del'>-    if (1 + s-&gt;last_eob_len + 10 - s-&gt;bi_valid &lt; 9) {</div><div class='del'>-        send_bits(s, STATIC_TREES&lt;&lt;1, 3);</div><div class='del'>-        send_code(s, END_BLOCK, static_ltree);</div><div class='del'>-        s-&gt;compressed_len += 10L;</div><div class='del'>-        bi_flush(s);</div><div class='del'>-    }</div><div class='del'>-    s-&gt;last_eob_len = 7;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Determine the best encoding for the current block: dynamic trees, static</div><div class='del'>- * trees or store, and output the encoded block to the zip file. This function</div><div class='del'>- * returns the total compressed length for the file so far.</div><div class='del'>- */</div><div class='del'>-ulg _tr_flush_block(s, buf, stored_len, eof)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    charf *buf;       /* input block, or NULL if too old */</div><div class='del'>-    ulg stored_len;   /* length of input block */</div><div class='del'>-    int eof;          /* true if this is the last block for a file */</div><div class='del'>-{</div><div class='del'>-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */</div><div class='del'>-    int max_blindex = 0;  /* index of last bit length code of non zero freq */</div><div class='del'>-</div><div class='del'>-    /* Build the Huffman trees unless a stored block is forced */</div><div class='del'>-    if (s-&gt;level &gt; 0) {</div><div class='del'>-</div><div class='del'>-	 /* Check if the file is ascii or binary */</div><div class='del'>-	if (s-&gt;data_type == Z_UNKNOWN) set_data_type(s);</div><div class='del'>-</div><div class='del'>-	/* Construct the literal and distance trees */</div><div class='del'>-	build_tree(s, (tree_desc *)(&amp;(s-&gt;l_desc)));</div><div class='del'>-	Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s-&gt;opt_len,</div><div class='del'>-		s-&gt;static_len));</div><div class='del'>-</div><div class='del'>-	build_tree(s, (tree_desc *)(&amp;(s-&gt;d_desc)));</div><div class='del'>-	Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s-&gt;opt_len,</div><div class='del'>-		s-&gt;static_len));</div><div class='del'>-	/* At this point, opt_len and static_len are the total bit lengths of</div><div class='del'>-	 * the compressed block data, excluding the tree representations.</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	/* Build the bit length tree for the above two trees, and get the index</div><div class='del'>-	 * in bl_order of the last bit length code to send.</div><div class='del'>-	 */</div><div class='del'>-	max_blindex = build_bl_tree(s);</div><div class='del'>-</div><div class='del'>-	/* Determine the best encoding. Compute first the block length in bytes*/</div><div class='del'>-	opt_lenb = (s-&gt;opt_len+3+7)&gt;&gt;3;</div><div class='del'>-	static_lenb = (s-&gt;static_len+3+7)&gt;&gt;3;</div><div class='del'>-</div><div class='del'>-	Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",</div><div class='del'>-		opt_lenb, s-&gt;opt_len, static_lenb, s-&gt;static_len, stored_len,</div><div class='del'>-		s-&gt;last_lit));</div><div class='del'>-</div><div class='del'>-	if (static_lenb &lt;= opt_lenb) opt_lenb = static_lenb;</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-        Assert(buf != (char*)0, "lost buf");</div><div class='del'>-	opt_lenb = static_lenb = stored_len + 5; /* force a stored block */</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* If compression failed and this is the first and last block,</div><div class='del'>-     * and if the .zip file can be seeked (to rewrite the local header),</div><div class='del'>-     * the whole file is transformed into a stored file:</div><div class='del'>-     */</div><div class='del'>-#ifdef STORED_FILE_OK</div><div class='del'>-#  ifdef FORCE_STORED_FILE</div><div class='del'>-    if (eof &amp;&amp; s-&gt;compressed_len == 0L) { /* force stored file */</div><div class='del'>-#  else</div><div class='del'>-    if (stored_len &lt;= opt_lenb &amp;&amp; eof &amp;&amp; s-&gt;compressed_len==0L &amp;&amp; seekable()) {</div><div class='del'>-#  endif</div><div class='del'>-        /* Since LIT_BUFSIZE &lt;= 2*WSIZE, the input data must be there: */</div><div class='del'>-        if (buf == (charf*)0) error ("block vanished");</div><div class='del'>-</div><div class='del'>-        copy_block(s, buf, (unsigned)stored_len, 0); /* without header */</div><div class='del'>-        s-&gt;compressed_len = stored_len &lt;&lt; 3;</div><div class='del'>-        s-&gt;method = STORED;</div><div class='del'>-    } else</div><div class='del'>-#endif /* STORED_FILE_OK */</div><div class='del'>-</div><div class='del'>-#ifdef FORCE_STORED</div><div class='del'>-    if (buf != (char*)0) { /* force stored block */</div><div class='del'>-#else</div><div class='del'>-    if (stored_len+4 &lt;= opt_lenb &amp;&amp; buf != (char*)0) {</div><div class='del'>-                       /* 4: two words for the lengths */</div><div class='del'>-#endif</div><div class='del'>-        /* The test buf != NULL is only necessary if LIT_BUFSIZE &gt; WSIZE.</div><div class='del'>-         * Otherwise we can't have processed more than WSIZE input bytes since</div><div class='del'>-         * the last block flush, because compression would have been</div><div class='del'>-         * successful. If LIT_BUFSIZE &lt;= WSIZE, it is never too late to</div><div class='del'>-         * transform a block into a stored block.</div><div class='del'>-         */</div><div class='del'>-        _tr_stored_block(s, buf, stored_len, eof);</div><div class='del'>-</div><div class='del'>-#ifdef FORCE_STATIC</div><div class='del'>-    } else if (static_lenb &gt;= 0) { /* force static trees */</div><div class='del'>-#else</div><div class='del'>-    } else if (static_lenb == opt_lenb) {</div><div class='del'>-#endif</div><div class='del'>-        send_bits(s, (STATIC_TREES&lt;&lt;1)+eof, 3);</div><div class='del'>-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);</div><div class='del'>-        s-&gt;compressed_len += 3 + s-&gt;static_len;</div><div class='del'>-    } else {</div><div class='del'>-        send_bits(s, (DYN_TREES&lt;&lt;1)+eof, 3);</div><div class='del'>-        send_all_trees(s, s-&gt;l_desc.max_code+1, s-&gt;d_desc.max_code+1,</div><div class='del'>-                       max_blindex+1);</div><div class='del'>-        compress_block(s, (ct_data *)s-&gt;dyn_ltree, (ct_data *)s-&gt;dyn_dtree);</div><div class='del'>-        s-&gt;compressed_len += 3 + s-&gt;opt_len;</div><div class='del'>-    }</div><div class='del'>-    Assert (s-&gt;compressed_len == s-&gt;bits_sent, "bad compressed size");</div><div class='del'>-    init_block(s);</div><div class='del'>-</div><div class='del'>-    if (eof) {</div><div class='del'>-        bi_windup(s);</div><div class='del'>-        s-&gt;compressed_len += 7;  /* align on byte boundary */</div><div class='del'>-    }</div><div class='del'>-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s-&gt;compressed_len&gt;&gt;3,</div><div class='del'>-           s-&gt;compressed_len-7*eof));</div><div class='del'>-</div><div class='del'>-    return s-&gt;compressed_len &gt;&gt; 3;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Save the match info and tally the frequency counts. Return true if</div><div class='del'>- * the current block must be flushed.</div><div class='del'>- */</div><div class='del'>-int _tr_tally (s, dist, lc)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    unsigned dist;  /* distance of matched string */</div><div class='del'>-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */</div><div class='del'>-{</div><div class='del'>-    s-&gt;d_buf[s-&gt;last_lit] = (ush)dist;</div><div class='del'>-    s-&gt;l_buf[s-&gt;last_lit++] = (uch)lc;</div><div class='del'>-    if (dist == 0) {</div><div class='del'>-        /* lc is the unmatched char */</div><div class='del'>-        s-&gt;dyn_ltree[lc].Freq++;</div><div class='del'>-    } else {</div><div class='del'>-        s-&gt;matches++;</div><div class='del'>-        /* Here, lc is the match length - MIN_MATCH */</div><div class='del'>-        dist--;             /* dist = match distance - 1 */</div><div class='del'>-        Assert((ush)dist &lt; (ush)MAX_DIST(s) &amp;&amp;</div><div class='del'>-               (ush)lc &lt;= (ush)(MAX_MATCH-MIN_MATCH) &amp;&amp;</div><div class='del'>-               (ush)d_code(dist) &lt; (ush)D_CODES,  "_tr_tally: bad match");</div><div class='del'>-</div><div class='del'>-        s-&gt;dyn_ltree[length_code[lc]+LITERALS+1].Freq++;</div><div class='del'>-        s-&gt;dyn_dtree[d_code(dist)].Freq++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Try to guess if it is profitable to stop the current block here */</div><div class='del'>-    if (s-&gt;level &gt; 2 &amp;&amp; (s-&gt;last_lit &amp; 0xfff) == 0) {</div><div class='del'>-        /* Compute an upper bound for the compressed length */</div><div class='del'>-        ulg out_length = (ulg)s-&gt;last_lit*8L;</div><div class='del'>-        ulg in_length = (ulg)((long)s-&gt;strstart - s-&gt;block_start);</div><div class='del'>-        int dcode;</div><div class='del'>-        for (dcode = 0; dcode &lt; D_CODES; dcode++) {</div><div class='del'>-            out_length += (ulg)s-&gt;dyn_dtree[dcode].Freq *</div><div class='del'>-                (5L+extra_dbits[dcode]);</div><div class='del'>-        }</div><div class='del'>-        out_length &gt;&gt;= 3;</div><div class='del'>-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",</div><div class='del'>-               s-&gt;last_lit, in_length, out_length,</div><div class='del'>-               100L - out_length*100L/in_length));</div><div class='del'>-        if (s-&gt;matches &lt; s-&gt;last_lit/2 &amp;&amp; out_length &lt; in_length/2) return 1;</div><div class='del'>-    }</div><div class='del'>-    return (s-&gt;last_lit == s-&gt;lit_bufsize-1);</div><div class='del'>-    /* We avoid equality with lit_bufsize because of wraparound at 64K</div><div class='del'>-     * on 16 bit machines and because stored blocks are restricted to</div><div class='del'>-     * 64K-1 bytes.</div><div class='del'>-     */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Send the block data compressed using the given Huffman trees</div><div class='del'>- */</div><div class='del'>-local void compress_block(s, ltree, dtree)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    ct_data *ltree; /* literal tree */</div><div class='del'>-    ct_data *dtree; /* distance tree */</div><div class='del'>-{</div><div class='del'>-    unsigned dist;      /* distance of matched string */</div><div class='del'>-    int lc;             /* match length or unmatched char (if dist == 0) */</div><div class='del'>-    unsigned lx = 0;    /* running index in l_buf */</div><div class='del'>-    unsigned code;      /* the code to send */</div><div class='del'>-    int extra;          /* number of extra bits to send */</div><div class='del'>-</div><div class='del'>-    if (s-&gt;last_lit != 0) do {</div><div class='del'>-        dist = s-&gt;d_buf[lx];</div><div class='del'>-        lc = s-&gt;l_buf[lx++];</div><div class='del'>-        if (dist == 0) {</div><div class='del'>-            send_code(s, lc, ltree); /* send a literal byte */</div><div class='del'>-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));</div><div class='del'>-        } else {</div><div class='del'>-            /* Here, lc is the match length - MIN_MATCH */</div><div class='del'>-            code = length_code[lc];</div><div class='del'>-            send_code(s, code+LITERALS+1, ltree); /* send the length code */</div><div class='del'>-            extra = extra_lbits[code];</div><div class='del'>-            if (extra != 0) {</div><div class='del'>-                lc -= base_length[code];</div><div class='del'>-                send_bits(s, lc, extra);       /* send the extra length bits */</div><div class='del'>-            }</div><div class='del'>-            dist--; /* dist is now the match distance - 1 */</div><div class='del'>-            code = d_code(dist);</div><div class='del'>-            Assert (code &lt; D_CODES, "bad d_code");</div><div class='del'>-</div><div class='del'>-            send_code(s, code, dtree);       /* send the distance code */</div><div class='del'>-            extra = extra_dbits[code];</div><div class='del'>-            if (extra != 0) {</div><div class='del'>-                dist -= base_dist[code];</div><div class='del'>-                send_bits(s, dist, extra);   /* send the extra distance bits */</div><div class='del'>-            }</div><div class='del'>-        } /* literal or match pair ? */</div><div class='del'>-</div><div class='del'>-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */</div><div class='del'>-        Assert(s-&gt;pending &lt; s-&gt;lit_bufsize + 2*lx, "pendingBuf overflow");</div><div class='del'>-</div><div class='del'>-    } while (lx &lt; s-&gt;last_lit);</div><div class='del'>-</div><div class='del'>-    send_code(s, END_BLOCK, ltree);</div><div class='del'>-    s-&gt;last_eob_len = ltree[END_BLOCK].Len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Set the data type to ASCII or BINARY, using a crude approximation:</div><div class='del'>- * binary if more than 20% of the bytes are &lt;= 6 or &gt;= 128, ascii otherwise.</div><div class='del'>- * IN assertion: the fields freq of dyn_ltree are set and the total of all</div><div class='del'>- * frequencies does not exceed 64K (to fit in an int on 16 bit machines).</div><div class='del'>- */</div><div class='del'>-local void set_data_type(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    int n = 0;</div><div class='del'>-    unsigned ascii_freq = 0;</div><div class='del'>-    unsigned bin_freq = 0;</div><div class='del'>-    while (n &lt; 7)        bin_freq += s-&gt;dyn_ltree[n++].Freq;</div><div class='del'>-    while (n &lt; 128)    ascii_freq += s-&gt;dyn_ltree[n++].Freq;</div><div class='del'>-    while (n &lt; LITERALS) bin_freq += s-&gt;dyn_ltree[n++].Freq;</div><div class='del'>-    s-&gt;data_type = (Byte)(bin_freq &gt; (ascii_freq &gt;&gt; 2) ? Z_BINARY : Z_ASCII);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Reverse the first len bits of a code, using straightforward code (a faster</div><div class='del'>- * method would use a table)</div><div class='del'>- * IN assertion: 1 &lt;= len &lt;= 15</div><div class='del'>- */</div><div class='del'>-local unsigned bi_reverse(code, len)</div><div class='del'>-    unsigned code; /* the value to invert */</div><div class='del'>-    int len;       /* its bit length */</div><div class='del'>-{</div><div class='del'>-    register unsigned res = 0;</div><div class='del'>-    do {</div><div class='del'>-        res |= code &amp; 1;</div><div class='del'>-        code &gt;&gt;= 1, res &lt;&lt;= 1;</div><div class='del'>-    } while (--len &gt; 0);</div><div class='del'>-    return res &gt;&gt; 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Flush the bit buffer, keeping at most 7 bits in it.</div><div class='del'>- */</div><div class='del'>-local void bi_flush(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    if (s-&gt;bi_valid == 16) {</div><div class='del'>-        put_short(s, s-&gt;bi_buf);</div><div class='del'>-        s-&gt;bi_buf = 0;</div><div class='del'>-        s-&gt;bi_valid = 0;</div><div class='del'>-    } else if (s-&gt;bi_valid &gt;= 8) {</div><div class='del'>-        put_byte(s, (Byte)s-&gt;bi_buf);</div><div class='del'>-        s-&gt;bi_buf &gt;&gt;= 8;</div><div class='del'>-        s-&gt;bi_valid -= 8;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Flush the bit buffer and align the output on a byte boundary</div><div class='del'>- */</div><div class='del'>-local void bi_windup(s)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-{</div><div class='del'>-    if (s-&gt;bi_valid &gt; 8) {</div><div class='del'>-        put_short(s, s-&gt;bi_buf);</div><div class='del'>-    } else if (s-&gt;bi_valid &gt; 0) {</div><div class='del'>-        put_byte(s, (Byte)s-&gt;bi_buf);</div><div class='del'>-    }</div><div class='del'>-    s-&gt;bi_buf = 0;</div><div class='del'>-    s-&gt;bi_valid = 0;</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-    s-&gt;bits_sent = (s-&gt;bits_sent+7) &amp; ~7;</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ===========================================================================</div><div class='del'>- * Copy a stored block, storing first the length and its</div><div class='del'>- * one's complement if requested.</div><div class='del'>- */</div><div class='del'>-local void copy_block(s, buf, len, header)</div><div class='del'>-    deflate_state *s;</div><div class='del'>-    charf    *buf;    /* the input data */</div><div class='del'>-    unsigned len;     /* its length */</div><div class='del'>-    int      header;  /* true if block header must be written */</div><div class='del'>-{</div><div class='del'>-    bi_windup(s);        /* align on byte boundary */</div><div class='del'>-    s-&gt;last_eob_len = 8; /* enough lookahead for inflate */</div><div class='del'>-</div><div class='del'>-    if (header) {</div><div class='del'>-        put_short(s, (ush)len);   </div><div class='del'>-        put_short(s, (ush)~len);</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-        s-&gt;bits_sent += 2*16;</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-    s-&gt;bits_sent += (ulg)len&lt;&lt;3;</div><div class='del'>-#endif</div><div class='del'>-    /* bundle up the put_byte(s, *buf++) calls */</div><div class='del'>-    zmemcpy(&amp;s-&gt;pending_buf[s-&gt;pending], buf, len);</div><div class='del'>-    s-&gt;pending += len;</div><div class='del'>-}</div><div class='del'>-/* --- trees.c */</div><div class='del'>-</div><div class='del'>-/* +++ inflate.c */</div><div class='del'>-/* inflate.c -- zlib interface to inflate modules</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-</div><div class='del'>-/* +++ infblock.h */</div><div class='del'>-/* infblock.h -- header to use infblock.c</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct inflate_blocks_state;</div><div class='del'>-typedef struct inflate_blocks_state FAR inflate_blocks_statef;</div><div class='del'>-</div><div class='del'>-extern inflate_blocks_statef * inflate_blocks_new OF((</div><div class='del'>-    z_streamp z,</div><div class='del'>-    check_func c,               /* check function */</div><div class='del'>-    uInt w));                   /* window size */</div><div class='del'>-</div><div class='del'>-extern int inflate_blocks OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ,</div><div class='del'>-    int));                      /* initial return code */</div><div class='del'>-</div><div class='del'>-extern void inflate_blocks_reset OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ,</div><div class='del'>-    uLongf *));                  /* check value on output */</div><div class='del'>-</div><div class='del'>-extern int inflate_blocks_free OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ,</div><div class='del'>-    uLongf *));                  /* check value on output */</div><div class='del'>-</div><div class='del'>-extern void inflate_set_dictionary OF((</div><div class='del'>-    inflate_blocks_statef *s,</div><div class='del'>-    const Bytef *d,  /* dictionary */</div><div class='del'>-    uInt  n));       /* dictionary length */</div><div class='del'>-</div><div class='del'>-extern int inflate_addhistory OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp));</div><div class='del'>-</div><div class='del'>-extern int inflate_packet_flush OF((</div><div class='del'>-    inflate_blocks_statef *));</div><div class='del'>-/* --- infblock.h */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct inflate_blocks_state {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* inflate private state */</div><div class='del'>-struct internal_state {</div><div class='del'>-</div><div class='del'>-  /* mode */</div><div class='del'>-  enum {</div><div class='del'>-      METHOD,   /* waiting for method byte */</div><div class='del'>-      FLAG,     /* waiting for flag byte */</div><div class='del'>-      DICT4,    /* four dictionary check bytes to go */</div><div class='del'>-      DICT3,    /* three dictionary check bytes to go */</div><div class='del'>-      DICT2,    /* two dictionary check bytes to go */</div><div class='del'>-      DICT1,    /* one dictionary check byte to go */</div><div class='del'>-      DICT0,    /* waiting for inflateSetDictionary */</div><div class='del'>-      BLOCKS,   /* decompressing blocks */</div><div class='del'>-      CHECK4,   /* four check bytes to go */</div><div class='del'>-      CHECK3,   /* three check bytes to go */</div><div class='del'>-      CHECK2,   /* two check bytes to go */</div><div class='del'>-      CHECK1,   /* one check byte to go */</div><div class='del'>-      DONE,     /* finished check, done */</div><div class='del'>-      BAD}      /* got an error--stay here */</div><div class='del'>-    mode;               /* current inflate mode */</div><div class='del'>-</div><div class='del'>-  /* mode dependent information */</div><div class='del'>-  union {</div><div class='del'>-    uInt method;        /* if FLAGS, method byte */</div><div class='del'>-    struct {</div><div class='del'>-      uLong was;                /* computed check value */</div><div class='del'>-      uLong need;               /* stream check value */</div><div class='del'>-    } check;            /* if CHECK, check values to compare */</div><div class='del'>-    uInt marker;        /* if BAD, inflateSync's marker bytes count */</div><div class='del'>-  } sub;        /* submode */</div><div class='del'>-</div><div class='del'>-  /* mode independent information */</div><div class='del'>-  int  nowrap;          /* flag for no wrapper */</div><div class='del'>-  uInt wbits;           /* log2(window size)  (8..15, defaults to 15) */</div><div class='del'>-  inflate_blocks_statef </div><div class='del'>-    *blocks;            /* current inflate_blocks state */</div><div class='del'>-</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateReset(z)</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  uLong c;</div><div class='del'>-</div><div class='del'>-  if (z == Z_NULL || z-&gt;state == Z_NULL)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  z-&gt;total_in = z-&gt;total_out = 0;</div><div class='del'>-  z-&gt;msg = Z_NULL;</div><div class='del'>-  z-&gt;state-&gt;mode = z-&gt;state-&gt;nowrap ? BLOCKS : METHOD;</div><div class='del'>-  inflate_blocks_reset(z-&gt;state-&gt;blocks, z, &amp;c);</div><div class='del'>-  Trace((stderr, "inflate: reset\n"));</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateEnd(z)</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  uLong c;</div><div class='del'>-</div><div class='del'>-  if (z == Z_NULL || z-&gt;state == Z_NULL || z-&gt;zfree == Z_NULL)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  if (z-&gt;state-&gt;blocks != Z_NULL)</div><div class='del'>-    inflate_blocks_free(z-&gt;state-&gt;blocks, z, &amp;c);</div><div class='del'>-  ZFREE(z, z-&gt;state);</div><div class='del'>-  z-&gt;state = Z_NULL;</div><div class='del'>-  Trace((stderr, "inflate: end\n"));</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateInit2_(z, w, version, stream_size)</div><div class='del'>-z_streamp z;</div><div class='del'>-int w;</div><div class='del'>-const char *version;</div><div class='del'>-int stream_size;</div><div class='del'>-{</div><div class='del'>-  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||</div><div class='del'>-      stream_size != sizeof(z_stream))</div><div class='del'>-      return Z_VERSION_ERROR;</div><div class='del'>-</div><div class='del'>-  /* initialize state */</div><div class='del'>-  if (z == Z_NULL)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  z-&gt;msg = Z_NULL;</div><div class='del'>-#ifndef NO_ZCFUNCS</div><div class='del'>-  if (z-&gt;zalloc == Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    z-&gt;zalloc = zcalloc;</div><div class='del'>-    z-&gt;opaque = (voidpf)0;</div><div class='del'>-  }</div><div class='del'>-  if (z-&gt;zfree == Z_NULL) z-&gt;zfree = zcfree;</div><div class='del'>-#endif</div><div class='del'>-  if ((z-&gt;state = (struct internal_state FAR *)</div><div class='del'>-       ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)</div><div class='del'>-    return Z_MEM_ERROR;</div><div class='del'>-  z-&gt;state-&gt;blocks = Z_NULL;</div><div class='del'>-</div><div class='del'>-  /* handle undocumented nowrap option (no zlib header or check) */</div><div class='del'>-  z-&gt;state-&gt;nowrap = 0;</div><div class='del'>-  if (w &lt; 0)</div><div class='del'>-  {</div><div class='del'>-    w = - w;</div><div class='del'>-    z-&gt;state-&gt;nowrap = 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* set window size */</div><div class='del'>-  if (w &lt; 8 || w &gt; 15)</div><div class='del'>-  {</div><div class='del'>-    inflateEnd(z);</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  }</div><div class='del'>-  z-&gt;state-&gt;wbits = (uInt)w;</div><div class='del'>-</div><div class='del'>-  /* create inflate_blocks state */</div><div class='del'>-  if ((z-&gt;state-&gt;blocks =</div><div class='del'>-      inflate_blocks_new(z, z-&gt;state-&gt;nowrap ? Z_NULL : adler32, (uInt)1 &lt;&lt; w))</div><div class='del'>-      == Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    inflateEnd(z);</div><div class='del'>-    return Z_MEM_ERROR;</div><div class='del'>-  }</div><div class='del'>-  Trace((stderr, "inflate: allocated\n"));</div><div class='del'>-</div><div class='del'>-  /* reset state */</div><div class='del'>-  inflateReset(z);</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateInit_(z, version, stream_size)</div><div class='del'>-z_streamp z;</div><div class='del'>-const char *version;</div><div class='del'>-int stream_size;</div><div class='del'>-{</div><div class='del'>-  return inflateInit2_(z, DEF_WBITS, version, stream_size);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define NEEDBYTE {if(z-&gt;avail_in==0)goto empty;r=Z_OK;}</div><div class='del'>-#define NEXTBYTE (z-&gt;avail_in--,z-&gt;total_in++,*z-&gt;next_in++)</div><div class='del'>-</div><div class='del'>-int inflate(z, f)</div><div class='del'>-z_streamp z;</div><div class='del'>-int f;</div><div class='del'>-{</div><div class='del'>-  int r;</div><div class='del'>-  uInt b;</div><div class='del'>-</div><div class='del'>-  if (z == Z_NULL || z-&gt;state == Z_NULL || z-&gt;next_in == Z_NULL || f &lt; 0)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  r = Z_BUF_ERROR;</div><div class='del'>-  while (1) switch (z-&gt;state-&gt;mode)</div><div class='del'>-  {</div><div class='del'>-    case METHOD:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      if (((z-&gt;state-&gt;sub.method = NEXTBYTE) &amp; 0xf) != Z_DEFLATED)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BAD;</div><div class='del'>-        z-&gt;msg = (char*)"unknown compression method";</div><div class='del'>-        z-&gt;state-&gt;sub.marker = 5;       /* can't try inflateSync */</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if ((z-&gt;state-&gt;sub.method &gt;&gt; 4) + 8 &gt; z-&gt;state-&gt;wbits)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BAD;</div><div class='del'>-        z-&gt;msg = (char*)"invalid window size";</div><div class='del'>-        z-&gt;state-&gt;sub.marker = 5;       /* can't try inflateSync */</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      z-&gt;state-&gt;mode = FLAG;</div><div class='del'>-    case FLAG:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      b = NEXTBYTE;</div><div class='del'>-      if (((z-&gt;state-&gt;sub.method &lt;&lt; 8) + b) % 31)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BAD;</div><div class='del'>-        z-&gt;msg = (char*)"incorrect header check";</div><div class='del'>-        z-&gt;state-&gt;sub.marker = 5;       /* can't try inflateSync */</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      Trace((stderr, "inflate: zlib header ok\n"));</div><div class='del'>-      if (!(b &amp; PRESET_DICT))</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BLOCKS;</div><div class='del'>-	break;</div><div class='del'>-      }</div><div class='del'>-      z-&gt;state-&gt;mode = DICT4;</div><div class='del'>-    case DICT4:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need = (uLong)NEXTBYTE &lt;&lt; 24;</div><div class='del'>-      z-&gt;state-&gt;mode = DICT3;</div><div class='del'>-    case DICT3:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE &lt;&lt; 16;</div><div class='del'>-      z-&gt;state-&gt;mode = DICT2;</div><div class='del'>-    case DICT2:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE &lt;&lt; 8;</div><div class='del'>-      z-&gt;state-&gt;mode = DICT1;</div><div class='del'>-    case DICT1:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE;</div><div class='del'>-      z-&gt;adler = z-&gt;state-&gt;sub.check.need;</div><div class='del'>-      z-&gt;state-&gt;mode = DICT0;</div><div class='del'>-      return Z_NEED_DICT;</div><div class='del'>-    case DICT0:</div><div class='del'>-      z-&gt;state-&gt;mode = BAD;</div><div class='del'>-      z-&gt;msg = (char*)"need dictionary";</div><div class='del'>-      z-&gt;state-&gt;sub.marker = 0;       /* can try inflateSync */</div><div class='del'>-      return Z_STREAM_ERROR;</div><div class='del'>-    case BLOCKS:</div><div class='del'>-      r = inflate_blocks(z-&gt;state-&gt;blocks, z, r);</div><div class='del'>-      if (f == Z_PACKET_FLUSH &amp;&amp; z-&gt;avail_in == 0 &amp;&amp; z-&gt;avail_out != 0)</div><div class='del'>-	  r = inflate_packet_flush(z-&gt;state-&gt;blocks);</div><div class='del'>-      if (r == Z_DATA_ERROR)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BAD;</div><div class='del'>-        z-&gt;state-&gt;sub.marker = 0;       /* can try inflateSync */</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if (r != Z_STREAM_END)</div><div class='del'>-        return r;</div><div class='del'>-      r = Z_OK;</div><div class='del'>-      inflate_blocks_reset(z-&gt;state-&gt;blocks, z, &amp;z-&gt;state-&gt;sub.check.was);</div><div class='del'>-      if (z-&gt;state-&gt;nowrap)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = DONE;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      z-&gt;state-&gt;mode = CHECK4;</div><div class='del'>-    case CHECK4:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need = (uLong)NEXTBYTE &lt;&lt; 24;</div><div class='del'>-      z-&gt;state-&gt;mode = CHECK3;</div><div class='del'>-    case CHECK3:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE &lt;&lt; 16;</div><div class='del'>-      z-&gt;state-&gt;mode = CHECK2;</div><div class='del'>-    case CHECK2:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE &lt;&lt; 8;</div><div class='del'>-      z-&gt;state-&gt;mode = CHECK1;</div><div class='del'>-    case CHECK1:</div><div class='del'>-      NEEDBYTE</div><div class='del'>-      z-&gt;state-&gt;sub.check.need += (uLong)NEXTBYTE;</div><div class='del'>-</div><div class='del'>-      if (z-&gt;state-&gt;sub.check.was != z-&gt;state-&gt;sub.check.need)</div><div class='del'>-      {</div><div class='del'>-        z-&gt;state-&gt;mode = BAD;</div><div class='del'>-        z-&gt;msg = (char*)"incorrect data check";</div><div class='del'>-        z-&gt;state-&gt;sub.marker = 5;       /* can't try inflateSync */</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      Trace((stderr, "inflate: zlib check ok\n"));</div><div class='del'>-      z-&gt;state-&gt;mode = DONE;</div><div class='del'>-    case DONE:</div><div class='del'>-      return Z_STREAM_END;</div><div class='del'>-    case BAD:</div><div class='del'>-      return Z_DATA_ERROR;</div><div class='del'>-    default:</div><div class='del'>-      return Z_STREAM_ERROR;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>- empty:</div><div class='del'>-  if (f != Z_PACKET_FLUSH)</div><div class='del'>-    return r;</div><div class='del'>-  z-&gt;state-&gt;mode = BAD;</div><div class='del'>-  z-&gt;msg = (char *)"need more for packet flush";</div><div class='del'>-  z-&gt;state-&gt;sub.marker = 0;       /* can try inflateSync */</div><div class='del'>-  return Z_DATA_ERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateSetDictionary(z, dictionary, dictLength)</div><div class='del'>-z_streamp z;</div><div class='del'>-const Bytef *dictionary;</div><div class='del'>-uInt  dictLength;</div><div class='del'>-{</div><div class='del'>-  uInt length = dictLength;</div><div class='del'>-</div><div class='del'>-  if (z == Z_NULL || z-&gt;state == Z_NULL || z-&gt;state-&gt;mode != DICT0)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-</div><div class='del'>-  if (adler32(1L, dictionary, dictLength) != z-&gt;adler) return Z_DATA_ERROR;</div><div class='del'>-  z-&gt;adler = 1L;</div><div class='del'>-</div><div class='del'>-  if (length &gt;= ((uInt)1&lt;&lt;z-&gt;state-&gt;wbits))</div><div class='del'>-  {</div><div class='del'>-    length = (1&lt;&lt;z-&gt;state-&gt;wbits)-1;</div><div class='del'>-    dictionary += dictLength - length;</div><div class='del'>-  }</div><div class='del'>-  inflate_set_dictionary(z-&gt;state-&gt;blocks, dictionary, length);</div><div class='del'>-  z-&gt;state-&gt;mode = BLOCKS;</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This subroutine adds the data at next_in/avail_in to the output history</div><div class='del'>- * without performing any output.  The output buffer must be "caught up";</div><div class='del'>- * i.e. no pending output (hence s-&gt;read equals s-&gt;write), and the state must</div><div class='del'>- * be BLOCKS (i.e. we should be willing to see the start of a series of</div><div class='del'>- * BLOCKS).  On exit, the output will also be caught up, and the checksum</div><div class='del'>- * will have been updated if need be.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int inflateIncomp(z)</div><div class='del'>-z_stream *z;</div><div class='del'>-{</div><div class='del'>-    if (z-&gt;state-&gt;mode != BLOCKS)</div><div class='del'>-	return Z_DATA_ERROR;</div><div class='del'>-    return inflate_addhistory(z-&gt;state-&gt;blocks, z);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflateSync(z)</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  uInt n;       /* number of bytes to look at */</div><div class='del'>-  Bytef *p;     /* pointer to bytes */</div><div class='del'>-  uInt m;       /* number of marker bytes found in a row */</div><div class='del'>-  uLong r, w;   /* temporaries to save total_in and total_out */</div><div class='del'>-</div><div class='del'>-  /* set up */</div><div class='del'>-  if (z == Z_NULL || z-&gt;state == Z_NULL)</div><div class='del'>-    return Z_STREAM_ERROR;</div><div class='del'>-  if (z-&gt;state-&gt;mode != BAD)</div><div class='del'>-  {</div><div class='del'>-    z-&gt;state-&gt;mode = BAD;</div><div class='del'>-    z-&gt;state-&gt;sub.marker = 0;</div><div class='del'>-  }</div><div class='del'>-  if ((n = z-&gt;avail_in) == 0)</div><div class='del'>-    return Z_BUF_ERROR;</div><div class='del'>-  p = z-&gt;next_in;</div><div class='del'>-  m = z-&gt;state-&gt;sub.marker;</div><div class='del'>-</div><div class='del'>-  /* search */</div><div class='del'>-  while (n &amp;&amp; m &lt; 4)</div><div class='del'>-  {</div><div class='del'>-    if (*p == (Byte)(m &lt; 2 ? 0 : 0xff))</div><div class='del'>-      m++;</div><div class='del'>-    else if (*p)</div><div class='del'>-      m = 0;</div><div class='del'>-    else</div><div class='del'>-      m = 4 - m;</div><div class='del'>-    p++, n--;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* restore */</div><div class='del'>-  z-&gt;total_in += p - z-&gt;next_in;</div><div class='del'>-  z-&gt;next_in = p;</div><div class='del'>-  z-&gt;avail_in = n;</div><div class='del'>-  z-&gt;state-&gt;sub.marker = m;</div><div class='del'>-</div><div class='del'>-  /* return no joy or set up to restart on a new block */</div><div class='del'>-  if (m != 4)</div><div class='del'>-    return Z_DATA_ERROR;</div><div class='del'>-  r = z-&gt;total_in;  w = z-&gt;total_out;</div><div class='del'>-  inflateReset(z);</div><div class='del'>-  z-&gt;total_in = r;  z-&gt;total_out = w;</div><div class='del'>-  z-&gt;state-&gt;mode = BLOCKS;</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#undef NEEDBYTE</div><div class='del'>-#undef NEXTBYTE</div><div class='del'>-/* --- inflate.c */</div><div class='del'>-</div><div class='del'>-/* +++ infblock.c */</div><div class='del'>-/* infblock.c -- interpret and process block types to last block</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-/* #include "infblock.h" */</div><div class='del'>-</div><div class='del'>-/* +++ inftrees.h */</div><div class='del'>-/* inftrees.h -- header to use inftrees.c</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* Huffman code lookup table entry--this entry is four bytes for machines</div><div class='del'>-   that have 16-bit pointers (e.g. PC's in the small or medium model). */</div><div class='del'>-</div><div class='del'>-typedef struct inflate_huft_s FAR inflate_huft;</div><div class='del'>-</div><div class='del'>-struct inflate_huft_s {</div><div class='del'>-  union {</div><div class='del'>-    struct {</div><div class='del'>-      Byte Exop;        /* number of extra bits or operation */</div><div class='del'>-      Byte Bits;        /* number of bits in this code or subcode */</div><div class='del'>-    } what;</div><div class='del'>-    Bytef *pad;         /* pad structure to a power of 2 (4 bytes for */</div><div class='del'>-  } word;               /*  16-bit, 8 bytes for 32-bit machines) */</div><div class='del'>-  union {</div><div class='del'>-    uInt Base;          /* literal, length base, or distance base */</div><div class='del'>-    inflate_huft *Next; /* pointer to next level of table */</div><div class='del'>-  } more;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-  extern uInt inflate_hufts;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern int inflate_trees_bits OF((</div><div class='del'>-    uIntf *,                    /* 19 code lengths */</div><div class='del'>-    uIntf *,                    /* bits tree desired/actual depth */</div><div class='del'>-    inflate_huft * FAR *,       /* bits tree result */</div><div class='del'>-    z_streamp ));               /* for zalloc, zfree functions */</div><div class='del'>-</div><div class='del'>-extern int inflate_trees_dynamic OF((</div><div class='del'>-    uInt,                       /* number of literal/length codes */</div><div class='del'>-    uInt,                       /* number of distance codes */</div><div class='del'>-    uIntf *,                    /* that many (total) code lengths */</div><div class='del'>-    uIntf *,                    /* literal desired/actual bit depth */</div><div class='del'>-    uIntf *,                    /* distance desired/actual bit depth */</div><div class='del'>-    inflate_huft * FAR *,       /* literal/length tree result */</div><div class='del'>-    inflate_huft * FAR *,       /* distance tree result */</div><div class='del'>-    z_streamp ));               /* for zalloc, zfree functions */</div><div class='del'>-</div><div class='del'>-extern int inflate_trees_fixed OF((</div><div class='del'>-    uIntf *,                    /* literal desired/actual bit depth */</div><div class='del'>-    uIntf *,                    /* distance desired/actual bit depth */</div><div class='del'>-    inflate_huft * FAR *,       /* literal/length tree result */</div><div class='del'>-    inflate_huft * FAR *));     /* distance tree result */</div><div class='del'>-</div><div class='del'>-extern int inflate_trees_free OF((</div><div class='del'>-    inflate_huft *,             /* tables to free */</div><div class='del'>-    z_streamp ));               /* for zfree function */</div><div class='del'>-</div><div class='del'>-/* --- inftrees.h */</div><div class='del'>-</div><div class='del'>-/* +++ infcodes.h */</div><div class='del'>-/* infcodes.h -- header to use infcodes.c</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct inflate_codes_state;</div><div class='del'>-typedef struct inflate_codes_state FAR inflate_codes_statef;</div><div class='del'>-</div><div class='del'>-extern inflate_codes_statef *inflate_codes_new OF((</div><div class='del'>-    uInt, uInt,</div><div class='del'>-    inflate_huft *, inflate_huft *,</div><div class='del'>-    z_streamp ));</div><div class='del'>-</div><div class='del'>-extern int inflate_codes OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ,</div><div class='del'>-    int));</div><div class='del'>-</div><div class='del'>-extern void inflate_codes_free OF((</div><div class='del'>-    inflate_codes_statef *,</div><div class='del'>-    z_streamp ));</div><div class='del'>-</div><div class='del'>-/* --- infcodes.h */</div><div class='del'>-</div><div class='del'>-/* +++ infutil.h */</div><div class='del'>-/* infutil.h -- types and macros common to blocks and codes</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _INFUTIL_H</div><div class='del'>-#define _INFUTIL_H</div><div class='del'>-</div><div class='del'>-typedef enum {</div><div class='del'>-      TYPE,     /* get type bits (3, including end bit) */</div><div class='del'>-      LENS,     /* get lengths for stored */</div><div class='del'>-      STORED,   /* processing stored block */</div><div class='del'>-      TABLE,    /* get table lengths */</div><div class='del'>-      BTREE,    /* get bit lengths tree for a dynamic block */</div><div class='del'>-      DTREE,    /* get length, distance trees for a dynamic block */</div><div class='del'>-      CODES,    /* processing fixed or dynamic block */</div><div class='del'>-      DRY,      /* output remaining window bytes */</div><div class='del'>-      DONEB,    /* finished last block, done */</div><div class='del'>-      BADB}     /* got a data error--stuck here */</div><div class='del'>-inflate_block_mode;</div><div class='del'>-</div><div class='del'>-/* inflate blocks semi-private state */</div><div class='del'>-struct inflate_blocks_state {</div><div class='del'>-</div><div class='del'>-  /* mode */</div><div class='del'>-  inflate_block_mode  mode;     /* current inflate_block mode */</div><div class='del'>-</div><div class='del'>-  /* mode dependent information */</div><div class='del'>-  union {</div><div class='del'>-    uInt left;          /* if STORED, bytes left to copy */</div><div class='del'>-    struct {</div><div class='del'>-      uInt table;               /* table lengths (14 bits) */</div><div class='del'>-      uInt index;               /* index into blens (or border) */</div><div class='del'>-      uIntf *blens;             /* bit lengths of codes */</div><div class='del'>-      uInt bb;                  /* bit length tree depth */</div><div class='del'>-      inflate_huft *tb;         /* bit length decoding tree */</div><div class='del'>-    } trees;            /* if DTREE, decoding info for trees */</div><div class='del'>-    struct {</div><div class='del'>-      inflate_huft *tl;</div><div class='del'>-      inflate_huft *td;         /* trees to free */</div><div class='del'>-      inflate_codes_statef </div><div class='del'>-         *codes;</div><div class='del'>-    } decode;           /* if CODES, current state */</div><div class='del'>-  } sub;                /* submode */</div><div class='del'>-  uInt last;            /* true if this block is the last block */</div><div class='del'>-</div><div class='del'>-  /* mode independent information */</div><div class='del'>-  uInt bitk;            /* bits in bit buffer */</div><div class='del'>-  uLong bitb;           /* bit buffer */</div><div class='del'>-  Bytef *window;        /* sliding window */</div><div class='del'>-  Bytef *end;           /* one byte after sliding window */</div><div class='del'>-  Bytef *read;          /* window read pointer */</div><div class='del'>-  Bytef *write;         /* window write pointer */</div><div class='del'>-  check_func checkfn;   /* check function */</div><div class='del'>-  uLong check;          /* check on output */</div><div class='del'>-</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* defines for inflate input/output */</div><div class='del'>-/*   update pointers and return */</div><div class='del'>-#define UPDBITS {s-&gt;bitb=b;s-&gt;bitk=k;}</div><div class='del'>-#define UPDIN {z-&gt;avail_in=n;z-&gt;total_in+=p-z-&gt;next_in;z-&gt;next_in=p;}</div><div class='del'>-#define UPDOUT {s-&gt;write=q;}</div><div class='del'>-#define UPDATE {UPDBITS UPDIN UPDOUT}</div><div class='del'>-#define LEAVE {UPDATE return inflate_flush(s,z,r);}</div><div class='del'>-/*   get bytes and bits */</div><div class='del'>-#define LOADIN {p=z-&gt;next_in;n=z-&gt;avail_in;b=s-&gt;bitb;k=s-&gt;bitk;}</div><div class='del'>-#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}</div><div class='del'>-#define NEXTBYTE (n--,*p++)</div><div class='del'>-#define NEEDBITS(j) {while(k&lt;(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)&lt;&lt;k;k+=8;}}</div><div class='del'>-#define DUMPBITS(j) {b&gt;&gt;=(j);k-=(j);}</div><div class='del'>-/*   output bytes */</div><div class='del'>-#define WAVAIL (uInt)(q&lt;s-&gt;read?s-&gt;read-q-1:s-&gt;end-q)</div><div class='del'>-#define LOADOUT {q=s-&gt;write;m=(uInt)WAVAIL;}</div><div class='del'>-#define WWRAP {if(q==s-&gt;end&amp;&amp;s-&gt;read!=s-&gt;window){q=s-&gt;window;m=(uInt)WAVAIL;}}</div><div class='del'>-#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}</div><div class='del'>-#define NEEDOUT {if(m==0){WWRAP if(m==0){FLUSH WWRAP if(m==0) LEAVE}}r=Z_OK;}</div><div class='del'>-#define OUTBYTE(a) {*q++=(Byte)(a);m--;}</div><div class='del'>-/*   load local pointers */</div><div class='del'>-#define LOAD {LOADIN LOADOUT}</div><div class='del'>-</div><div class='del'>-/* masks for lower bits (size given to avoid silly warnings with Visual C++) */</div><div class='del'>-extern uInt inflate_mask[17];</div><div class='del'>-</div><div class='del'>-/* copy as much as possible from the sliding window to the output area */</div><div class='del'>-extern int inflate_flush OF((</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ,</div><div class='del'>-    int));</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct internal_state      {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-/* --- infutil.h */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct inflate_codes_state {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Table for deflate from PKZIP's appnote.txt. */</div><div class='del'>-local const uInt border[] = { /* Order of the bit length code lengths */</div><div class='del'>-        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-   Notes beyond the 1.93a appnote.txt:</div><div class='del'>-</div><div class='del'>-   1. Distance pointers never point before the beginning of the output</div><div class='del'>-      stream.</div><div class='del'>-   2. Distance pointers can point back across blocks, up to 32k away.</div><div class='del'>-   3. There is an implied maximum of 7 bits for the bit length table and</div><div class='del'>-      15 bits for the actual data.</div><div class='del'>-   4. If only one code exists, then it is encoded using one bit.  (Zero</div><div class='del'>-      would be more efficient, but perhaps a little confusing.)  If two</div><div class='del'>-      codes exist, they are coded using one bit each (0 and 1).</div><div class='del'>-   5. There is no way of sending zero distance codes--a dummy must be</div><div class='del'>-      sent if there are none.  (History: a pre 2.0 version of PKZIP would</div><div class='del'>-      store blocks with no distance codes, but this was discovered to be</div><div class='del'>-      too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow</div><div class='del'>-      zero distance codes, which is sent as one code of zero bits in</div><div class='del'>-      length.</div><div class='del'>-   6. There are up to 286 literal/length codes.  Code 256 represents the</div><div class='del'>-      end-of-block.  Note however that the static length tree defines</div><div class='del'>-      288 codes just to fill out the Huffman codes.  Codes 286 and 287</div><div class='del'>-      cannot be used though, since there is no length base or extra bits</div><div class='del'>-      defined for them.  Similarily, there are up to 30 distance codes.</div><div class='del'>-      However, static trees define 32 codes (all 5 bits) to fill out the</div><div class='del'>-      Huffman codes, but the last two had better not show up in the data.</div><div class='del'>-   7. Unzip can check dynamic Huffman blocks for complete code sets.</div><div class='del'>-      The exception is that a single code would not be complete (see #4).</div><div class='del'>-   8. The five bits following the block type is really the number of</div><div class='del'>-      literal codes sent minus 257.</div><div class='del'>-   9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits</div><div class='del'>-      (1+6+6).  Therefore, to output three times the length, you output</div><div class='del'>-      three codes (1+1+1), whereas to output four times the same length,</div><div class='del'>-      you only need two codes (1+3).  Hmm.</div><div class='del'>-  10. In the tree reconstruction algorithm, Code = Code + Increment</div><div class='del'>-      only if BitLength(i) is not zero.  (Pretty obvious.)</div><div class='del'>-  11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)</div><div class='del'>-  12. Note: length code 284 can represent 227-258, but length code 285</div><div class='del'>-      really is 258.  The last length deserves its own, short code</div><div class='del'>-      since it gets used a lot in very redundant files.  The length</div><div class='del'>-      258 is special since 258 - 3 (the min match length) is 255.</div><div class='del'>-  13. The literal/length and distance code bit lengths are read as a</div><div class='del'>-      single stream of lengths.  It is possible (and advantageous) for</div><div class='del'>-      a repeat code (16, 17, or 18) to go across the boundary between</div><div class='del'>-      the two sets of lengths.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void inflate_blocks_reset(s, z, c)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-uLongf *c;</div><div class='del'>-{</div><div class='del'>-  if (s-&gt;checkfn != Z_NULL)</div><div class='del'>-    *c = s-&gt;check;</div><div class='del'>-  if (s-&gt;mode == BTREE || s-&gt;mode == DTREE)</div><div class='del'>-    ZFREE(z, s-&gt;sub.trees.blens);</div><div class='del'>-  if (s-&gt;mode == CODES)</div><div class='del'>-  {</div><div class='del'>-    inflate_codes_free(s-&gt;sub.decode.codes, z);</div><div class='del'>-    inflate_trees_free(s-&gt;sub.decode.td, z);</div><div class='del'>-    inflate_trees_free(s-&gt;sub.decode.tl, z);</div><div class='del'>-  }</div><div class='del'>-  s-&gt;mode = TYPE;</div><div class='del'>-  s-&gt;bitk = 0;</div><div class='del'>-  s-&gt;bitb = 0;</div><div class='del'>-  s-&gt;read = s-&gt;write = s-&gt;window;</div><div class='del'>-  if (s-&gt;checkfn != Z_NULL)</div><div class='del'>-    z-&gt;adler = s-&gt;check = (*s-&gt;checkfn)(0L, Z_NULL, 0);</div><div class='del'>-  Trace((stderr, "inflate:   blocks reset\n"));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-inflate_blocks_statef *inflate_blocks_new(z, c, w)</div><div class='del'>-z_streamp z;</div><div class='del'>-check_func c;</div><div class='del'>-uInt w;</div><div class='del'>-{</div><div class='del'>-  inflate_blocks_statef *s;</div><div class='del'>-</div><div class='del'>-  if ((s = (inflate_blocks_statef *)ZALLOC</div><div class='del'>-       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)</div><div class='del'>-    return s;</div><div class='del'>-  if ((s-&gt;window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    ZFREE(z, s);</div><div class='del'>-    return Z_NULL;</div><div class='del'>-  }</div><div class='del'>-  s-&gt;end = s-&gt;window + w;</div><div class='del'>-  s-&gt;checkfn = c;</div><div class='del'>-  s-&gt;mode = TYPE;</div><div class='del'>-  Trace((stderr, "inflate:   blocks allocated\n"));</div><div class='del'>-  inflate_blocks_reset(s, z, &amp;s-&gt;check);</div><div class='del'>-  return s;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-  extern uInt inflate_hufts;</div><div class='del'>-#endif</div><div class='del'>-int inflate_blocks(s, z, r)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-int r;</div><div class='del'>-{</div><div class='del'>-  uInt t;               /* temporary storage */</div><div class='del'>-  uLong b;              /* bit buffer */</div><div class='del'>-  uInt k;               /* bits in bit buffer */</div><div class='del'>-  Bytef *p;             /* input data pointer */</div><div class='del'>-  uInt n;               /* bytes available there */</div><div class='del'>-  Bytef *q;             /* output window write pointer */</div><div class='del'>-  uInt m;               /* bytes to end of window or read pointer */</div><div class='del'>-</div><div class='del'>-  /* copy input/output information to locals (UPDATE macro restores) */</div><div class='del'>-  LOAD</div><div class='del'>-</div><div class='del'>-  /* process input based on current state */</div><div class='del'>-  while (1) switch (s-&gt;mode)</div><div class='del'>-  {</div><div class='del'>-    case TYPE:</div><div class='del'>-      NEEDBITS(3)</div><div class='del'>-      t = (uInt)b &amp; 7;</div><div class='del'>-      s-&gt;last = t &amp; 1;</div><div class='del'>-      switch (t &gt;&gt; 1)</div><div class='del'>-      {</div><div class='del'>-        case 0:                         /* stored */</div><div class='del'>-          Trace((stderr, "inflate:     stored block%s\n",</div><div class='del'>-                 s-&gt;last ? " (last)" : ""));</div><div class='del'>-          DUMPBITS(3)</div><div class='del'>-          t = k &amp; 7;                    /* go to byte boundary */</div><div class='del'>-          DUMPBITS(t)</div><div class='del'>-          s-&gt;mode = LENS;               /* get length of stored block */</div><div class='del'>-          break;</div><div class='del'>-        case 1:                         /* fixed */</div><div class='del'>-          Trace((stderr, "inflate:     fixed codes block%s\n",</div><div class='del'>-                 s-&gt;last ? " (last)" : ""));</div><div class='del'>-          {</div><div class='del'>-            uInt bl, bd;</div><div class='del'>-            inflate_huft *tl, *td;</div><div class='del'>-</div><div class='del'>-            inflate_trees_fixed(&amp;bl, &amp;bd, &amp;tl, &amp;td);</div><div class='del'>-            s-&gt;sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);</div><div class='del'>-            if (s-&gt;sub.decode.codes == Z_NULL)</div><div class='del'>-            {</div><div class='del'>-              r = Z_MEM_ERROR;</div><div class='del'>-              LEAVE</div><div class='del'>-            }</div><div class='del'>-            s-&gt;sub.decode.tl = Z_NULL;  /* don't try to free these */</div><div class='del'>-            s-&gt;sub.decode.td = Z_NULL;</div><div class='del'>-          }</div><div class='del'>-          DUMPBITS(3)</div><div class='del'>-          s-&gt;mode = CODES;</div><div class='del'>-          break;</div><div class='del'>-        case 2:                         /* dynamic */</div><div class='del'>-          Trace((stderr, "inflate:     dynamic codes block%s\n",</div><div class='del'>-                 s-&gt;last ? " (last)" : ""));</div><div class='del'>-          DUMPBITS(3)</div><div class='del'>-          s-&gt;mode = TABLE;</div><div class='del'>-          break;</div><div class='del'>-        case 3:                         /* illegal */</div><div class='del'>-          DUMPBITS(3)</div><div class='del'>-          s-&gt;mode = BADB;</div><div class='del'>-          z-&gt;msg = (char*)"invalid block type";</div><div class='del'>-          r = Z_DATA_ERROR;</div><div class='del'>-          LEAVE</div><div class='del'>-      }</div><div class='del'>-      break;</div><div class='del'>-    case LENS:</div><div class='del'>-      NEEDBITS(32)</div><div class='del'>-      if ((((~b) &gt;&gt; 16) &amp; 0xffff) != (b &amp; 0xffff))</div><div class='del'>-      {</div><div class='del'>-        s-&gt;mode = BADB;</div><div class='del'>-        z-&gt;msg = (char*)"invalid stored block lengths";</div><div class='del'>-        r = Z_DATA_ERROR;</div><div class='del'>-        LEAVE</div><div class='del'>-      }</div><div class='del'>-      s-&gt;sub.left = (uInt)b &amp; 0xffff;</div><div class='del'>-      b = k = 0;                      /* dump bits */</div><div class='del'>-      Tracev((stderr, "inflate:       stored length %u\n", s-&gt;sub.left));</div><div class='del'>-      s-&gt;mode = s-&gt;sub.left ? STORED : (s-&gt;last ? DRY : TYPE);</div><div class='del'>-      break;</div><div class='del'>-    case STORED:</div><div class='del'>-      if (n == 0)</div><div class='del'>-        LEAVE</div><div class='del'>-      NEEDOUT</div><div class='del'>-      t = s-&gt;sub.left;</div><div class='del'>-      if (t &gt; n) t = n;</div><div class='del'>-      if (t &gt; m) t = m;</div><div class='del'>-      zmemcpy(q, p, t);</div><div class='del'>-      p += t;  n -= t;</div><div class='del'>-      q += t;  m -= t;</div><div class='del'>-      if ((s-&gt;sub.left -= t) != 0)</div><div class='del'>-        break;</div><div class='del'>-      Tracev((stderr, "inflate:       stored end, %lu total out\n",</div><div class='del'>-              z-&gt;total_out + (q &gt;= s-&gt;read ? q - s-&gt;read :</div><div class='del'>-              (s-&gt;end - s-&gt;read) + (q - s-&gt;window))));</div><div class='del'>-      s-&gt;mode = s-&gt;last ? DRY : TYPE;</div><div class='del'>-      break;</div><div class='del'>-    case TABLE:</div><div class='del'>-      NEEDBITS(14)</div><div class='del'>-      s-&gt;sub.trees.table = t = (uInt)b &amp; 0x3fff;</div><div class='del'>-#ifndef PKZIP_BUG_WORKAROUND</div><div class='del'>-      if ((t &amp; 0x1f) &gt; 29 || ((t &gt;&gt; 5) &amp; 0x1f) &gt; 29)</div><div class='del'>-      {</div><div class='del'>-        s-&gt;mode = BADB;</div><div class='del'>-        z-&gt;msg = (char*)"too many length or distance symbols";</div><div class='del'>-        r = Z_DATA_ERROR;</div><div class='del'>-        LEAVE</div><div class='del'>-      }</div><div class='del'>-#endif</div><div class='del'>-      t = 258 + (t &amp; 0x1f) + ((t &gt;&gt; 5) &amp; 0x1f);</div><div class='del'>-      if (t &lt; 19)</div><div class='del'>-        t = 19;</div><div class='del'>-      if ((s-&gt;sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)</div><div class='del'>-      {</div><div class='del'>-        r = Z_MEM_ERROR;</div><div class='del'>-        LEAVE</div><div class='del'>-      }</div><div class='del'>-      DUMPBITS(14)</div><div class='del'>-      s-&gt;sub.trees.index = 0;</div><div class='del'>-      Tracev((stderr, "inflate:       table sizes ok\n"));</div><div class='del'>-      s-&gt;mode = BTREE;</div><div class='del'>-    case BTREE:</div><div class='del'>-      while (s-&gt;sub.trees.index &lt; 4 + (s-&gt;sub.trees.table &gt;&gt; 10))</div><div class='del'>-      {</div><div class='del'>-        NEEDBITS(3)</div><div class='del'>-        s-&gt;sub.trees.blens[border[s-&gt;sub.trees.index++]] = (uInt)b &amp; 7;</div><div class='del'>-        DUMPBITS(3)</div><div class='del'>-      }</div><div class='del'>-      while (s-&gt;sub.trees.index &lt; 19)</div><div class='del'>-        s-&gt;sub.trees.blens[border[s-&gt;sub.trees.index++]] = 0;</div><div class='del'>-      s-&gt;sub.trees.bb = 7;</div><div class='del'>-      t = inflate_trees_bits(s-&gt;sub.trees.blens, &amp;s-&gt;sub.trees.bb,</div><div class='del'>-                             &amp;s-&gt;sub.trees.tb, z);</div><div class='del'>-      if (t != Z_OK)</div><div class='del'>-      {</div><div class='del'>-        ZFREE(z, s-&gt;sub.trees.blens);</div><div class='del'>-        r = t;</div><div class='del'>-        if (r == Z_DATA_ERROR)</div><div class='del'>-          s-&gt;mode = BADB;</div><div class='del'>-        LEAVE</div><div class='del'>-      }</div><div class='del'>-      s-&gt;sub.trees.index = 0;</div><div class='del'>-      Tracev((stderr, "inflate:       bits tree ok\n"));</div><div class='del'>-      s-&gt;mode = DTREE;</div><div class='del'>-    case DTREE:</div><div class='del'>-      while (t = s-&gt;sub.trees.table,</div><div class='del'>-             s-&gt;sub.trees.index &lt; 258 + (t &amp; 0x1f) + ((t &gt;&gt; 5) &amp; 0x1f))</div><div class='del'>-      {</div><div class='del'>-        inflate_huft *h;</div><div class='del'>-        uInt i, j, c;</div><div class='del'>-</div><div class='del'>-        t = s-&gt;sub.trees.bb;</div><div class='del'>-        NEEDBITS(t)</div><div class='del'>-        h = s-&gt;sub.trees.tb + ((uInt)b &amp; inflate_mask[t]);</div><div class='del'>-        t = h-&gt;word.what.Bits;</div><div class='del'>-        c = h-&gt;more.Base;</div><div class='del'>-        if (c &lt; 16)</div><div class='del'>-        {</div><div class='del'>-          DUMPBITS(t)</div><div class='del'>-          s-&gt;sub.trees.blens[s-&gt;sub.trees.index++] = c;</div><div class='del'>-        }</div><div class='del'>-        else /* c == 16..18 */</div><div class='del'>-        {</div><div class='del'>-          i = c == 18 ? 7 : c - 14;</div><div class='del'>-          j = c == 18 ? 11 : 3;</div><div class='del'>-          NEEDBITS(t + i)</div><div class='del'>-          DUMPBITS(t)</div><div class='del'>-          j += (uInt)b &amp; inflate_mask[i];</div><div class='del'>-          DUMPBITS(i)</div><div class='del'>-          i = s-&gt;sub.trees.index;</div><div class='del'>-          t = s-&gt;sub.trees.table;</div><div class='del'>-          if (i + j &gt; 258 + (t &amp; 0x1f) + ((t &gt;&gt; 5) &amp; 0x1f) ||</div><div class='del'>-              (c == 16 &amp;&amp; i &lt; 1))</div><div class='del'>-          {</div><div class='del'>-            inflate_trees_free(s-&gt;sub.trees.tb, z);</div><div class='del'>-            ZFREE(z, s-&gt;sub.trees.blens);</div><div class='del'>-            s-&gt;mode = BADB;</div><div class='del'>-            z-&gt;msg = (char*)"invalid bit length repeat";</div><div class='del'>-            r = Z_DATA_ERROR;</div><div class='del'>-            LEAVE</div><div class='del'>-          }</div><div class='del'>-          c = c == 16 ? s-&gt;sub.trees.blens[i - 1] : 0;</div><div class='del'>-          do {</div><div class='del'>-            s-&gt;sub.trees.blens[i++] = c;</div><div class='del'>-          } while (--j);</div><div class='del'>-          s-&gt;sub.trees.index = i;</div><div class='del'>-        }</div><div class='del'>-      }</div><div class='del'>-      inflate_trees_free(s-&gt;sub.trees.tb, z);</div><div class='del'>-      s-&gt;sub.trees.tb = Z_NULL;</div><div class='del'>-      {</div><div class='del'>-        uInt bl, bd;</div><div class='del'>-        inflate_huft *tl, *td;</div><div class='del'>-        inflate_codes_statef *c;</div><div class='del'>-</div><div class='del'>-        bl = 9;         /* must be &lt;= 9 for lookahead assumptions */</div><div class='del'>-        bd = 6;         /* must be &lt;= 9 for lookahead assumptions */</div><div class='del'>-        t = s-&gt;sub.trees.table;</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-      inflate_hufts = 0;</div><div class='del'>-#endif</div><div class='del'>-        t = inflate_trees_dynamic(257 + (t &amp; 0x1f), 1 + ((t &gt;&gt; 5) &amp; 0x1f),</div><div class='del'>-                                  s-&gt;sub.trees.blens, &amp;bl, &amp;bd, &amp;tl, &amp;td, z);</div><div class='del'>-        ZFREE(z, s-&gt;sub.trees.blens);</div><div class='del'>-        if (t != Z_OK)</div><div class='del'>-        {</div><div class='del'>-          if (t == (uInt)Z_DATA_ERROR)</div><div class='del'>-            s-&gt;mode = BADB;</div><div class='del'>-          r = t;</div><div class='del'>-          LEAVE</div><div class='del'>-        }</div><div class='del'>-        Tracev((stderr, "inflate:       trees ok, %d * %d bytes used\n",</div><div class='del'>-              inflate_hufts, sizeof(inflate_huft)));</div><div class='del'>-        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)</div><div class='del'>-        {</div><div class='del'>-          inflate_trees_free(td, z);</div><div class='del'>-          inflate_trees_free(tl, z);</div><div class='del'>-          r = Z_MEM_ERROR;</div><div class='del'>-          LEAVE</div><div class='del'>-        }</div><div class='del'>-        s-&gt;sub.decode.codes = c;</div><div class='del'>-        s-&gt;sub.decode.tl = tl;</div><div class='del'>-        s-&gt;sub.decode.td = td;</div><div class='del'>-      }</div><div class='del'>-      s-&gt;mode = CODES;</div><div class='del'>-    case CODES:</div><div class='del'>-      UPDATE</div><div class='del'>-      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)</div><div class='del'>-        return inflate_flush(s, z, r);</div><div class='del'>-      r = Z_OK;</div><div class='del'>-      inflate_codes_free(s-&gt;sub.decode.codes, z);</div><div class='del'>-      inflate_trees_free(s-&gt;sub.decode.td, z);</div><div class='del'>-      inflate_trees_free(s-&gt;sub.decode.tl, z);</div><div class='del'>-      LOAD</div><div class='del'>-      Tracev((stderr, "inflate:       codes end, %lu total out\n",</div><div class='del'>-              z-&gt;total_out + (q &gt;= s-&gt;read ? q - s-&gt;read :</div><div class='del'>-              (s-&gt;end - s-&gt;read) + (q - s-&gt;window))));</div><div class='del'>-      if (!s-&gt;last)</div><div class='del'>-      {</div><div class='del'>-        s-&gt;mode = TYPE;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if (k &gt; 7)              /* return unused byte, if any */</div><div class='del'>-      {</div><div class='del'>-        Assert(k &lt; 16, "inflate_codes grabbed too many bytes")</div><div class='del'>-        k -= 8;</div><div class='del'>-        n++;</div><div class='del'>-        p--;                    /* can always return one */</div><div class='del'>-      }</div><div class='del'>-      s-&gt;mode = DRY;</div><div class='del'>-    case DRY:</div><div class='del'>-      FLUSH</div><div class='del'>-      if (s-&gt;read != s-&gt;write)</div><div class='del'>-        LEAVE</div><div class='del'>-      s-&gt;mode = DONEB;</div><div class='del'>-    case DONEB:</div><div class='del'>-      r = Z_STREAM_END;</div><div class='del'>-      LEAVE</div><div class='del'>-    case BADB:</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-    default:</div><div class='del'>-      r = Z_STREAM_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_blocks_free(s, z, c)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-uLongf *c;</div><div class='del'>-{</div><div class='del'>-  inflate_blocks_reset(s, z, c);</div><div class='del'>-  ZFREE(z, s-&gt;window);</div><div class='del'>-  ZFREE(z, s);</div><div class='del'>-  Trace((stderr, "inflate:   blocks freed\n"));</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void inflate_set_dictionary(s, d, n)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-const Bytef *d;</div><div class='del'>-uInt  n;</div><div class='del'>-{</div><div class='del'>-  zmemcpy((charf *)s-&gt;window, d, n);</div><div class='del'>-  s-&gt;read = s-&gt;write = s-&gt;window + n;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This subroutine adds the data at next_in/avail_in to the output history</div><div class='del'>- * without performing any output.  The output buffer must be "caught up";</div><div class='del'>- * i.e. no pending output (hence s-&gt;read equals s-&gt;write), and the state must</div><div class='del'>- * be BLOCKS (i.e. we should be willing to see the start of a series of</div><div class='del'>- * BLOCKS).  On exit, the output will also be caught up, and the checksum</div><div class='del'>- * will have been updated if need be.</div><div class='del'>- */</div><div class='del'>-int inflate_addhistory(s, z)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_stream *z;</div><div class='del'>-{</div><div class='del'>-    uLong b;              /* bit buffer */  /* NOT USED HERE */</div><div class='del'>-    uInt k;               /* bits in bit buffer */ /* NOT USED HERE */</div><div class='del'>-    uInt t;               /* temporary storage */</div><div class='del'>-    Bytef *p;             /* input data pointer */</div><div class='del'>-    uInt n;               /* bytes available there */</div><div class='del'>-    Bytef *q;             /* output window write pointer */</div><div class='del'>-    uInt m;               /* bytes to end of window or read pointer */</div><div class='del'>-</div><div class='del'>-    if (s-&gt;read != s-&gt;write)</div><div class='del'>-	return Z_STREAM_ERROR;</div><div class='del'>-    if (s-&gt;mode != TYPE)</div><div class='del'>-	return Z_DATA_ERROR;</div><div class='del'>-</div><div class='del'>-    /* we're ready to rock */</div><div class='del'>-    LOAD</div><div class='del'>-    /* while there is input ready, copy to output buffer, moving</div><div class='del'>-     * pointers as needed.</div><div class='del'>-     */</div><div class='del'>-    while (n) {</div><div class='del'>-	t = n;  /* how many to do */</div><div class='del'>-	/* is there room until end of buffer? */</div><div class='del'>-	if (t &gt; m) t = m;</div><div class='del'>-	/* update check information */</div><div class='del'>-	if (s-&gt;checkfn != Z_NULL)</div><div class='del'>-	    s-&gt;check = (*s-&gt;checkfn)(s-&gt;check, q, t);</div><div class='del'>-	zmemcpy(q, p, t);</div><div class='del'>-	q += t;</div><div class='del'>-	p += t;</div><div class='del'>-	n -= t;</div><div class='del'>-	z-&gt;total_out += t;</div><div class='del'>-	s-&gt;read = q;    /* drag read pointer forward */</div><div class='del'>-/*      WWRAP  */ 	/* expand WWRAP macro by hand to handle s-&gt;read */</div><div class='del'>-	if (q == s-&gt;end) {</div><div class='del'>-	    s-&gt;read = q = s-&gt;window;</div><div class='del'>-	    m = WAVAIL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    UPDATE</div><div class='del'>-    return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * At the end of a Deflate-compressed PPP packet, we expect to have seen</div><div class='del'>- * a `stored' block type value but not the (zero) length bytes.</div><div class='del'>- */</div><div class='del'>-int inflate_packet_flush(s)</div><div class='del'>-    inflate_blocks_statef *s;</div><div class='del'>-{</div><div class='del'>-    if (s-&gt;mode != LENS)</div><div class='del'>-	return Z_DATA_ERROR;</div><div class='del'>-    s-&gt;mode = TYPE;</div><div class='del'>-    return Z_OK;</div><div class='del'>-}</div><div class='del'>-/* --- infblock.c */</div><div class='del'>-</div><div class='del'>-/* +++ inftrees.c */</div><div class='del'>-/* inftrees.c -- generate Huffman trees for efficient decoding</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-/* #include "inftrees.h" */</div><div class='del'>-</div><div class='del'>-char inflate_copyright[] = " inflate 1.0.4 Copyright 1995-1996 Mark Adler ";</div><div class='del'>-/*</div><div class='del'>-  If you use the zlib library in a product, an acknowledgment is welcome</div><div class='del'>-  in the documentation of your product. If for some reason you cannot</div><div class='del'>-  include such an acknowledgment, I would appreciate that you keep this</div><div class='del'>-  copyright string in the executable of your product.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct internal_state  {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* simplify the use of the inflate_huft type with some defines */</div><div class='del'>-#define base more.Base</div><div class='del'>-#define next more.Next</div><div class='del'>-#define exop word.what.Exop</div><div class='del'>-#define bits word.what.Bits</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-local int huft_build OF((</div><div class='del'>-    uIntf *,            /* code lengths in bits */</div><div class='del'>-    uInt,               /* number of codes */</div><div class='del'>-    uInt,               /* number of "simple" codes */</div><div class='del'>-    const uIntf *,      /* list of base values for non-simple codes */</div><div class='del'>-    const uIntf *,      /* list of extra bits for non-simple codes */</div><div class='del'>-    inflate_huft * FAR*,/* result: starting table */</div><div class='del'>-    uIntf *,            /* maximum lookup bits (returns actual) */</div><div class='del'>-    z_streamp ));       /* for zalloc function */</div><div class='del'>-</div><div class='del'>-local voidpf falloc OF((</div><div class='del'>-    voidpf,             /* opaque pointer (not used) */</div><div class='del'>-    uInt,               /* number of items */</div><div class='del'>-    uInt));             /* size of item */</div><div class='del'>-</div><div class='del'>-/* Tables for deflate from PKZIP's appnote.txt. */</div><div class='del'>-local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */</div><div class='del'>-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,</div><div class='del'>-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};</div><div class='del'>-        /* see note #13 above about 258 */</div><div class='del'>-local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */</div><div class='del'>-        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,</div><div class='del'>-        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */</div><div class='del'>-local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */</div><div class='del'>-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,</div><div class='del'>-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,</div><div class='del'>-        8193, 12289, 16385, 24577};</div><div class='del'>-local const uInt cpdext[30] = { /* Extra bits for distance codes */</div><div class='del'>-        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,</div><div class='del'>-        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,</div><div class='del'>-        12, 12, 13, 13};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-   Huffman code decoding is performed using a multi-level table lookup.</div><div class='del'>-   The fastest way to decode is to simply build a lookup table whose</div><div class='del'>-   size is determined by the longest code.  However, the time it takes</div><div class='del'>-   to build this table can also be a factor if the data being decoded</div><div class='del'>-   is not very long.  The most common codes are necessarily the</div><div class='del'>-   shortest codes, so those codes dominate the decoding time, and hence</div><div class='del'>-   the speed.  The idea is you can have a shorter table that decodes the</div><div class='del'>-   shorter, more probable codes, and then point to subsidiary tables for</div><div class='del'>-   the longer codes.  The time it costs to decode the longer codes is</div><div class='del'>-   then traded against the time it takes to make longer tables.</div><div class='del'>-</div><div class='del'>-   This results of this trade are in the variables lbits and dbits</div><div class='del'>-   below.  lbits is the number of bits the first level table for literal/</div><div class='del'>-   length codes can decode in one step, and dbits is the same thing for</div><div class='del'>-   the distance codes.  Subsequent tables are also less than or equal to</div><div class='del'>-   those sizes.  These values may be adjusted either when all of the</div><div class='del'>-   codes are shorter than that, in which case the longest code length in</div><div class='del'>-   bits is used, or when the shortest code is *longer* than the requested</div><div class='del'>-   table size, in which case the length of the shortest code in bits is</div><div class='del'>-   used.</div><div class='del'>-</div><div class='del'>-   There are two different values for the two tables, since they code a</div><div class='del'>-   different number of possibilities each.  The literal/length table</div><div class='del'>-   codes 286 possible values, or in a flat code, a little over eight</div><div class='del'>-   bits.  The distance table codes 30 possible values, or a little less</div><div class='del'>-   than five bits, flat.  The optimum values for speed end up being</div><div class='del'>-   about one bit more than those, so lbits is 8+1 and dbits is 5+1.</div><div class='del'>-   The optimum values may differ though from machine to machine, and</div><div class='del'>-   possibly even between compilers.  Your mileage may vary.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */</div><div class='del'>-#define BMAX 15         /* maximum bit length of any code */</div><div class='del'>-#define N_MAX 288       /* maximum number of codes in any set */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-  uInt inflate_hufts;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-local int huft_build(b, n, s, d, e, t, m, zs)</div><div class='del'>-uIntf *b;               /* code lengths in bits (all assumed &lt;= BMAX) */</div><div class='del'>-uInt n;                 /* number of codes (assumed &lt;= N_MAX) */</div><div class='del'>-uInt s;                 /* number of simple-valued codes (0..s-1) */</div><div class='del'>-const uIntf *d;         /* list of base values for non-simple codes */</div><div class='del'>-const uIntf *e;         /* list of extra bits for non-simple codes */</div><div class='del'>-inflate_huft * FAR *t;  /* result: starting table */</div><div class='del'>-uIntf *m;               /* maximum lookup bits, returns actual */</div><div class='del'>-z_streamp zs;           /* for zalloc function */</div><div class='del'>-/* Given a list of code lengths and a maximum table size, make a set of</div><div class='del'>-   tables to decode that set of codes.  Return Z_OK on success, Z_BUF_ERROR</div><div class='del'>-   if the given code set is incomplete (the tables are still built in this</div><div class='del'>-   case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of</div><div class='del'>-   lengths), or Z_MEM_ERROR if not enough memory. */</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-  uInt a;                       /* counter for codes of length k */</div><div class='del'>-  uInt c[BMAX+1];               /* bit length count table */</div><div class='del'>-  uInt f;                       /* i repeats in table every f entries */</div><div class='del'>-  int g;                        /* maximum code length */</div><div class='del'>-  int h;                        /* table level */</div><div class='del'>-  register uInt i;              /* counter, current code */</div><div class='del'>-  register uInt j;              /* counter */</div><div class='del'>-  register int k;               /* number of bits in current code */</div><div class='del'>-  int l;                        /* bits per table (returned in m) */</div><div class='del'>-  register uIntf *p;            /* pointer into c[], b[], or v[] */</div><div class='del'>-  inflate_huft *q;              /* points to current table */</div><div class='del'>-  struct inflate_huft_s r;      /* table entry for structure assignment */</div><div class='del'>-  inflate_huft *u[BMAX];        /* table stack */</div><div class='del'>-  uInt v[N_MAX];                /* values in order of bit length */</div><div class='del'>-  register int w;               /* bits before this table == (l * h) */</div><div class='del'>-  uInt x[BMAX+1];               /* bit offsets, then code stack */</div><div class='del'>-  uIntf *xp;                    /* pointer into x */</div><div class='del'>-  int y;                        /* number of dummy codes added */</div><div class='del'>-  uInt z;                       /* number of entries in current table */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Generate counts for each bit length */</div><div class='del'>-  p = c;</div><div class='del'>-#define C0 *p++ = 0;</div><div class='del'>-#define C2 C0 C0 C0 C0</div><div class='del'>-#define C4 C2 C2 C2 C2</div><div class='del'>-  C4                            /* clear c[]--assume BMAX+1 is 16 */</div><div class='del'>-  p = b;  i = n;</div><div class='del'>-  do {</div><div class='del'>-    c[*p++]++;                  /* assume all entries &lt;= BMAX */</div><div class='del'>-  } while (--i);</div><div class='del'>-  if (c[0] == n)                /* null input--all zero length codes */</div><div class='del'>-  {</div><div class='del'>-    *t = (inflate_huft *)Z_NULL;</div><div class='del'>-    *m = 0;</div><div class='del'>-    return Z_OK;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Find minimum and maximum length, bound *m by those */</div><div class='del'>-  l = *m;</div><div class='del'>-  for (j = 1; j &lt;= BMAX; j++)</div><div class='del'>-    if (c[j])</div><div class='del'>-      break;</div><div class='del'>-  k = j;                        /* minimum code length */</div><div class='del'>-  if ((uInt)l &lt; j)</div><div class='del'>-    l = j;</div><div class='del'>-  for (i = BMAX; i; i--)</div><div class='del'>-    if (c[i])</div><div class='del'>-      break;</div><div class='del'>-  g = i;                        /* maximum code length */</div><div class='del'>-  if ((uInt)l &gt; i)</div><div class='del'>-    l = i;</div><div class='del'>-  *m = l;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Adjust last length count to fill out codes, if needed */</div><div class='del'>-  for (y = 1 &lt;&lt; j; j &lt; i; j++, y &lt;&lt;= 1)</div><div class='del'>-    if ((y -= c[j]) &lt; 0)</div><div class='del'>-      return Z_DATA_ERROR;</div><div class='del'>-  if ((y -= c[i]) &lt; 0)</div><div class='del'>-    return Z_DATA_ERROR;</div><div class='del'>-  c[i] += y;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Generate starting offsets into the value table for each length */</div><div class='del'>-  x[1] = j = 0;</div><div class='del'>-  p = c + 1;  xp = x + 2;</div><div class='del'>-  while (--i) {                 /* note that i == g from above */</div><div class='del'>-    *xp++ = (j += *p++);</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Make a table of values in order of bit lengths */</div><div class='del'>-  p = b;  i = 0;</div><div class='del'>-  do {</div><div class='del'>-    if ((j = *p++) != 0)</div><div class='del'>-      v[x[j]++] = i;</div><div class='del'>-  } while (++i &lt; n);</div><div class='del'>-  n = x[g];                   /* set n to length of v */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Generate the Huffman codes and for each, make the table entries */</div><div class='del'>-  x[0] = i = 0;                 /* first Huffman code is zero */</div><div class='del'>-  p = v;                        /* grab values in bit order */</div><div class='del'>-  h = -1;                       /* no tables yet--level -1 */</div><div class='del'>-  w = -l;                       /* bits decoded == (l * h) */</div><div class='del'>-  u[0] = (inflate_huft *)Z_NULL;        /* just to keep compilers happy */</div><div class='del'>-  q = (inflate_huft *)Z_NULL;   /* ditto */</div><div class='del'>-  z = 0;                        /* ditto */</div><div class='del'>-</div><div class='del'>-  /* go through the bit lengths (k already is bits in shortest code) */</div><div class='del'>-  for (; k &lt;= g; k++)</div><div class='del'>-  {</div><div class='del'>-    a = c[k];</div><div class='del'>-    while (a--)</div><div class='del'>-    {</div><div class='del'>-      /* here i is the Huffman code of length k bits for value *p */</div><div class='del'>-      /* make tables up to required level */</div><div class='del'>-      while (k &gt; w + l)</div><div class='del'>-      {</div><div class='del'>-        h++;</div><div class='del'>-        w += l;                 /* previous table always l bits */</div><div class='del'>-</div><div class='del'>-        /* compute minimum size table less than or equal to l bits */</div><div class='del'>-        z = g - w;</div><div class='del'>-        z = z &gt; (uInt)l ? l : z;        /* table size upper limit */</div><div class='del'>-        if ((f = 1 &lt;&lt; (j = k - w)) &gt; a + 1)     /* try a k-w bit table */</div><div class='del'>-        {                       /* too few codes for k-w bit table */</div><div class='del'>-          f -= a + 1;           /* deduct codes from patterns left */</div><div class='del'>-          xp = c + k;</div><div class='del'>-          if (j &lt; z)</div><div class='del'>-            while (++j &lt; z)     /* try smaller tables up to z bits */</div><div class='del'>-            {</div><div class='del'>-              if ((f &lt;&lt;= 1) &lt;= *++xp)</div><div class='del'>-                break;          /* enough codes to use up j bits */</div><div class='del'>-              f -= *xp;         /* else deduct codes from patterns */</div><div class='del'>-            }</div><div class='del'>-        }</div><div class='del'>-        z = 1 &lt;&lt; j;             /* table entries for j-bit table */</div><div class='del'>-</div><div class='del'>-        /* allocate and link in new table */</div><div class='del'>-        if ((q = (inflate_huft *)ZALLOC</div><div class='del'>-             (zs,z + 1,sizeof(inflate_huft))) == Z_NULL)</div><div class='del'>-        {</div><div class='del'>-          if (h)</div><div class='del'>-            inflate_trees_free(u[0], zs);</div><div class='del'>-          return Z_MEM_ERROR;   /* not enough memory */</div><div class='del'>-        }</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-        inflate_hufts += z + 1;</div><div class='del'>-#endif</div><div class='del'>-        *t = q + 1;             /* link to list for huft_free() */</div><div class='del'>-        *(t = &amp;(q-&gt;next)) = Z_NULL;</div><div class='del'>-        u[h] = ++q;             /* table starts after link */</div><div class='del'>-</div><div class='del'>-        /* connect to last table, if there is one */</div><div class='del'>-        if (h)</div><div class='del'>-        {</div><div class='del'>-          x[h] = i;             /* save pattern for backing up */</div><div class='del'>-          r.bits = (Byte)l;     /* bits to dump before this table */</div><div class='del'>-          r.exop = (Byte)j;     /* bits in this table */</div><div class='del'>-          r.next = q;           /* pointer to this table */</div><div class='del'>-          j = i &gt;&gt; (w - l);     /* (get around Turbo C bug) */</div><div class='del'>-          u[h-1][j] = r;        /* connect to last table */</div><div class='del'>-        }</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /* set up table entry in r */</div><div class='del'>-      r.bits = (Byte)(k - w);</div><div class='del'>-      if (p &gt;= v + n)</div><div class='del'>-        r.exop = 128 + 64;      /* out of values--invalid code */</div><div class='del'>-      else if (*p &lt; s)</div><div class='del'>-      {</div><div class='del'>-        r.exop = (Byte)(*p &lt; 256 ? 0 : 32 + 64);     /* 256 is end-of-block */</div><div class='del'>-        r.base = *p++;          /* simple code is just the value */</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-      {</div><div class='del'>-        r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */</div><div class='del'>-        r.base = d[*p++ - s];</div><div class='del'>-      }</div><div class='del'>-</div><div class='del'>-      /* fill code-like entries with r */</div><div class='del'>-      f = 1 &lt;&lt; (k - w);</div><div class='del'>-      for (j = i &gt;&gt; w; j &lt; z; j += f)</div><div class='del'>-        q[j] = r;</div><div class='del'>-</div><div class='del'>-      /* backwards increment the k-bit code i */</div><div class='del'>-      for (j = 1 &lt;&lt; (k - 1); i &amp; j; j &gt;&gt;= 1)</div><div class='del'>-        i ^= j;</div><div class='del'>-      i ^= j;</div><div class='del'>-</div><div class='del'>-      /* backup over finished tables */</div><div class='del'>-      while ((i &amp; ((1 &lt;&lt; w) - 1)) != x[h])</div><div class='del'>-      {</div><div class='del'>-        h--;                    /* don't need to update q */</div><div class='del'>-        w -= l;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  /* Return Z_BUF_ERROR if we were given an incomplete table */</div><div class='del'>-  return y != 0 &amp;&amp; g != 1 ? Z_BUF_ERROR : Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_trees_bits(c, bb, tb, z)</div><div class='del'>-uIntf *c;               /* 19 code lengths */</div><div class='del'>-uIntf *bb;              /* bits tree desired/actual depth */</div><div class='del'>-inflate_huft * FAR *tb; /* bits tree result */</div><div class='del'>-z_streamp z;            /* for zfree function */</div><div class='del'>-{</div><div class='del'>-  int r;</div><div class='del'>-</div><div class='del'>-  r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z);</div><div class='del'>-  if (r == Z_DATA_ERROR)</div><div class='del'>-    z-&gt;msg = (char*)"oversubscribed dynamic bit lengths tree";</div><div class='del'>-  else if (r == Z_BUF_ERROR || *bb == 0)</div><div class='del'>-  {</div><div class='del'>-    inflate_trees_free(*tb, z);</div><div class='del'>-    z-&gt;msg = (char*)"incomplete dynamic bit lengths tree";</div><div class='del'>-    r = Z_DATA_ERROR;</div><div class='del'>-  }</div><div class='del'>-  return r;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z)</div><div class='del'>-uInt nl;                /* number of literal/length codes */</div><div class='del'>-uInt nd;                /* number of distance codes */</div><div class='del'>-uIntf *c;               /* that many (total) code lengths */</div><div class='del'>-uIntf *bl;              /* literal desired/actual bit depth */</div><div class='del'>-uIntf *bd;              /* distance desired/actual bit depth */</div><div class='del'>-inflate_huft * FAR *tl; /* literal/length tree result */</div><div class='del'>-inflate_huft * FAR *td; /* distance tree result */</div><div class='del'>-z_streamp z;            /* for zfree function */</div><div class='del'>-{</div><div class='del'>-  int r;</div><div class='del'>-</div><div class='del'>-  /* build literal/length tree */</div><div class='del'>-  r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z);</div><div class='del'>-  if (r != Z_OK || *bl == 0)</div><div class='del'>-  {</div><div class='del'>-    if (r == Z_DATA_ERROR)</div><div class='del'>-      z-&gt;msg = (char*)"oversubscribed literal/length tree";</div><div class='del'>-    else if (r != Z_MEM_ERROR)</div><div class='del'>-    {</div><div class='del'>-      inflate_trees_free(*tl, z);</div><div class='del'>-      z-&gt;msg = (char*)"incomplete literal/length tree";</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-    }</div><div class='del'>-    return r;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* build distance tree */</div><div class='del'>-  r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z);</div><div class='del'>-  if (r != Z_OK || (*bd == 0 &amp;&amp; nl &gt; 257))</div><div class='del'>-  {</div><div class='del'>-    if (r == Z_DATA_ERROR)</div><div class='del'>-      z-&gt;msg = (char*)"oversubscribed distance tree";</div><div class='del'>-    else if (r == Z_BUF_ERROR) {</div><div class='del'>-#ifdef PKZIP_BUG_WORKAROUND</div><div class='del'>-      r = Z_OK;</div><div class='del'>-    }</div><div class='del'>-#else</div><div class='del'>-      inflate_trees_free(*td, z);</div><div class='del'>-      z-&gt;msg = (char*)"incomplete distance tree";</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-    }</div><div class='del'>-    else if (r != Z_MEM_ERROR)</div><div class='del'>-    {</div><div class='del'>-      z-&gt;msg = (char*)"empty distance tree with lengths";</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-    }</div><div class='del'>-    inflate_trees_free(*tl, z);</div><div class='del'>-    return r;</div><div class='del'>-#endif</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* done */</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* build fixed tables only once--keep them here */</div><div class='del'>-local int fixed_built = 0;</div><div class='del'>-#define FIXEDH 530      /* number of hufts used by fixed tables */</div><div class='del'>-local inflate_huft fixed_mem[FIXEDH];</div><div class='del'>-local uInt fixed_bl;</div><div class='del'>-local uInt fixed_bd;</div><div class='del'>-local inflate_huft *fixed_tl;</div><div class='del'>-local inflate_huft *fixed_td;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-local voidpf falloc(q, n, s)</div><div class='del'>-voidpf q;       /* opaque pointer */</div><div class='del'>-uInt n;         /* number of items */</div><div class='del'>-uInt s;         /* size of item */</div><div class='del'>-{</div><div class='del'>-  Assert(s == sizeof(inflate_huft) &amp;&amp; n &lt;= *(intf *)q,</div><div class='del'>-         "inflate_trees falloc overflow");</div><div class='del'>-  *(intf *)q -= n+s-s; /* s-s to avoid warning */</div><div class='del'>-  return (voidpf)(fixed_mem + *(intf *)q);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_trees_fixed(bl, bd, tl, td)</div><div class='del'>-uIntf *bl;               /* literal desired/actual bit depth */</div><div class='del'>-uIntf *bd;               /* distance desired/actual bit depth */</div><div class='del'>-inflate_huft * FAR *tl;  /* literal/length tree result */</div><div class='del'>-inflate_huft * FAR *td;  /* distance tree result */</div><div class='del'>-{</div><div class='del'>-  /* build fixed tables if not already (multiple overlapped executions ok) */</div><div class='del'>-  if (!fixed_built)</div><div class='del'>-  {</div><div class='del'>-    int k;              /* temporary variable */</div><div class='del'>-    unsigned c[288];    /* length list for huft_build */</div><div class='del'>-    z_stream z;         /* for falloc function */</div><div class='del'>-    int f = FIXEDH;     /* number of hufts left in fixed_mem */</div><div class='del'>-</div><div class='del'>-    /* set up fake z_stream for memory routines */</div><div class='del'>-    z.zalloc = falloc;</div><div class='del'>-    z.zfree = Z_NULL;</div><div class='del'>-    z.opaque = (voidpf)&amp;f;</div><div class='del'>-</div><div class='del'>-    /* literal table */</div><div class='del'>-    for (k = 0; k &lt; 144; k++)</div><div class='del'>-      c[k] = 8;</div><div class='del'>-    for (; k &lt; 256; k++)</div><div class='del'>-      c[k] = 9;</div><div class='del'>-    for (; k &lt; 280; k++)</div><div class='del'>-      c[k] = 7;</div><div class='del'>-    for (; k &lt; 288; k++)</div><div class='del'>-      c[k] = 8;</div><div class='del'>-    fixed_bl = 7;</div><div class='del'>-    huft_build(c, 288, 257, cplens, cplext, &amp;fixed_tl, &amp;fixed_bl, &amp;z);</div><div class='del'>-</div><div class='del'>-    /* distance table */</div><div class='del'>-    for (k = 0; k &lt; 30; k++)</div><div class='del'>-      c[k] = 5;</div><div class='del'>-    fixed_bd = 5;</div><div class='del'>-    huft_build(c, 30, 0, cpdist, cpdext, &amp;fixed_td, &amp;fixed_bd, &amp;z);</div><div class='del'>-</div><div class='del'>-    /* done */</div><div class='del'>-    Assert(f == 0, "invalid build of fixed tables");</div><div class='del'>-    fixed_built = 1;</div><div class='del'>-  }</div><div class='del'>-  *bl = fixed_bl;</div><div class='del'>-  *bd = fixed_bd;</div><div class='del'>-  *tl = fixed_tl;</div><div class='del'>-  *td = fixed_td;</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_trees_free(t, z)</div><div class='del'>-inflate_huft *t;        /* table to free */</div><div class='del'>-z_streamp z;            /* for zfree function */</div><div class='del'>-/* Free the malloc'ed tables built by huft_build(), which makes a linked</div><div class='del'>-   list of the tables it made, with the links in a dummy first entry of</div><div class='del'>-   each table. */</div><div class='del'>-{</div><div class='del'>-  register inflate_huft *p, *q, *r;</div><div class='del'>-</div><div class='del'>-  /* Reverse linked list */</div><div class='del'>-  p = Z_NULL;</div><div class='del'>-  q = t;</div><div class='del'>-  while (q != Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    r = (q - 1)-&gt;next;</div><div class='del'>-    (q - 1)-&gt;next = p;</div><div class='del'>-    p = q;</div><div class='del'>-    q = r;</div><div class='del'>-  }</div><div class='del'>-  /* Go through linked list, freeing from the malloced (t[-1]) address. */</div><div class='del'>-  while (p != Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    q = (--p)-&gt;next;</div><div class='del'>-    ZFREE(z,p);</div><div class='del'>-    p = q;</div><div class='del'>-  } </div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-/* --- inftrees.c */</div><div class='del'>-</div><div class='del'>-/* +++ infcodes.c */</div><div class='del'>-/* infcodes.c -- process literals and length/distance pairs</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-/* #include "inftrees.h" */</div><div class='del'>-/* #include "infblock.h" */</div><div class='del'>-/* #include "infcodes.h" */</div><div class='del'>-/* #include "infutil.h" */</div><div class='del'>-</div><div class='del'>-/* +++ inffast.h */</div><div class='del'>-/* inffast.h -- header to use inffast.c</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* WARNING: this file should *not* be used by applications. It is</div><div class='del'>-   part of the implementation of the compression library and is</div><div class='del'>-   subject to change. Applications should only use zlib.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int inflate_fast OF((</div><div class='del'>-    uInt,</div><div class='del'>-    uInt,</div><div class='del'>-    inflate_huft *,</div><div class='del'>-    inflate_huft *,</div><div class='del'>-    inflate_blocks_statef *,</div><div class='del'>-    z_streamp ));</div><div class='del'>-/* --- inffast.h */</div><div class='del'>-</div><div class='del'>-/* simplify the use of the inflate_huft type with some defines */</div><div class='del'>-#define base more.Base</div><div class='del'>-#define next more.Next</div><div class='del'>-#define exop word.what.Exop</div><div class='del'>-#define bits word.what.Bits</div><div class='del'>-</div><div class='del'>-/* inflate codes private state */</div><div class='del'>-struct inflate_codes_state {</div><div class='del'>-</div><div class='del'>-  /* mode */</div><div class='del'>-  enum {        /* waiting for "i:"=input, "o:"=output, "x:"=nothing */</div><div class='del'>-      START,    /* x: set up for LEN */</div><div class='del'>-      LEN,      /* i: get length/literal/eob next */</div><div class='del'>-      LENEXT,   /* i: getting length extra (have base) */</div><div class='del'>-      DIST,     /* i: get distance next */</div><div class='del'>-      DISTEXT,  /* i: getting distance extra */</div><div class='del'>-      COPY,     /* o: copying bytes in window, waiting for space */</div><div class='del'>-      LIT,      /* o: got literal, waiting for output space */</div><div class='del'>-      WASH,     /* o: got eob, possibly still output waiting */</div><div class='del'>-      END,      /* x: got eob and all data flushed */</div><div class='del'>-      BADCODE}  /* x: got error */</div><div class='del'>-    mode;               /* current inflate_codes mode */</div><div class='del'>-</div><div class='del'>-  /* mode dependent information */</div><div class='del'>-  uInt len;</div><div class='del'>-  union {</div><div class='del'>-    struct {</div><div class='del'>-      inflate_huft *tree;       /* pointer into tree */</div><div class='del'>-      uInt need;                /* bits needed */</div><div class='del'>-    } code;             /* if LEN or DIST, where in tree */</div><div class='del'>-    uInt lit;           /* if LIT, literal */</div><div class='del'>-    struct {</div><div class='del'>-      uInt get;                 /* bits to get for extra */</div><div class='del'>-      uInt dist;                /* distance back to copy from */</div><div class='del'>-    } copy;             /* if EXT or COPY, where and how much */</div><div class='del'>-  } sub;                /* submode */</div><div class='del'>-</div><div class='del'>-  /* mode independent information */</div><div class='del'>-  Byte lbits;           /* ltree bits decoded per branch */</div><div class='del'>-  Byte dbits;           /* dtree bits decoder per branch */</div><div class='del'>-  inflate_huft *ltree;          /* literal/length/eob tree */</div><div class='del'>-  inflate_huft *dtree;          /* distance tree */</div><div class='del'>-</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)</div><div class='del'>-uInt bl, bd;</div><div class='del'>-inflate_huft *tl;</div><div class='del'>-inflate_huft *td; /* need separate declaration for Borland C++ */</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  inflate_codes_statef *c;</div><div class='del'>-</div><div class='del'>-  if ((c = (inflate_codes_statef *)</div><div class='del'>-       ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)</div><div class='del'>-  {</div><div class='del'>-    c-&gt;mode = START;</div><div class='del'>-    c-&gt;lbits = (Byte)bl;</div><div class='del'>-    c-&gt;dbits = (Byte)bd;</div><div class='del'>-    c-&gt;ltree = tl;</div><div class='del'>-    c-&gt;dtree = td;</div><div class='del'>-    Tracev((stderr, "inflate:       codes new\n"));</div><div class='del'>-  }</div><div class='del'>-  return c;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-int inflate_codes(s, z, r)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-int r;</div><div class='del'>-{</div><div class='del'>-  uInt j;               /* temporary storage */</div><div class='del'>-  inflate_huft *t;      /* temporary pointer */</div><div class='del'>-  uInt e;               /* extra bits or operation */</div><div class='del'>-  uLong b;              /* bit buffer */</div><div class='del'>-  uInt k;               /* bits in bit buffer */</div><div class='del'>-  Bytef *p;             /* input data pointer */</div><div class='del'>-  uInt n;               /* bytes available there */</div><div class='del'>-  Bytef *q;             /* output window write pointer */</div><div class='del'>-  uInt m;               /* bytes to end of window or read pointer */</div><div class='del'>-  Bytef *f;             /* pointer to copy strings from */</div><div class='del'>-  inflate_codes_statef *c = s-&gt;sub.decode.codes;  /* codes state */</div><div class='del'>-</div><div class='del'>-  /* copy input/output information to locals (UPDATE macro restores) */</div><div class='del'>-  LOAD</div><div class='del'>-</div><div class='del'>-  /* process input and output based on current state */</div><div class='del'>-  while (1) switch (c-&gt;mode)</div><div class='del'>-  {             /* waiting for "i:"=input, "o:"=output, "x:"=nothing */</div><div class='del'>-    case START:         /* x: set up for LEN */</div><div class='del'>-#ifndef SLOW</div><div class='del'>-      if (m &gt;= 258 &amp;&amp; n &gt;= 10)</div><div class='del'>-      {</div><div class='del'>-        UPDATE</div><div class='del'>-        r = inflate_fast(c-&gt;lbits, c-&gt;dbits, c-&gt;ltree, c-&gt;dtree, s, z);</div><div class='del'>-        LOAD</div><div class='del'>-        if (r != Z_OK)</div><div class='del'>-        {</div><div class='del'>-          c-&gt;mode = r == Z_STREAM_END ? WASH : BADCODE;</div><div class='del'>-          break;</div><div class='del'>-        }</div><div class='del'>-      }</div><div class='del'>-#endif /* !SLOW */</div><div class='del'>-      c-&gt;sub.code.need = c-&gt;lbits;</div><div class='del'>-      c-&gt;sub.code.tree = c-&gt;ltree;</div><div class='del'>-      c-&gt;mode = LEN;</div><div class='del'>-    case LEN:           /* i: get length/literal/eob next */</div><div class='del'>-      j = c-&gt;sub.code.need;</div><div class='del'>-      NEEDBITS(j)</div><div class='del'>-      t = c-&gt;sub.code.tree + ((uInt)b &amp; inflate_mask[j]);</div><div class='del'>-      DUMPBITS(t-&gt;bits)</div><div class='del'>-      e = (uInt)(t-&gt;exop);</div><div class='del'>-      if (e == 0)               /* literal */</div><div class='del'>-      {</div><div class='del'>-        c-&gt;sub.lit = t-&gt;base;</div><div class='del'>-        Tracevv((stderr, t-&gt;base &gt;= 0x20 &amp;&amp; t-&gt;base &lt; 0x7f ?</div><div class='del'>-                 "inflate:         literal '%c'\n" :</div><div class='del'>-                 "inflate:         literal 0x%02x\n", t-&gt;base));</div><div class='del'>-        c-&gt;mode = LIT;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if (e &amp; 16)               /* length */</div><div class='del'>-      {</div><div class='del'>-        c-&gt;sub.copy.get = e &amp; 15;</div><div class='del'>-        c-&gt;len = t-&gt;base;</div><div class='del'>-        c-&gt;mode = LENEXT;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if ((e &amp; 64) == 0)        /* next table */</div><div class='del'>-      {</div><div class='del'>-        c-&gt;sub.code.need = e;</div><div class='del'>-        c-&gt;sub.code.tree = t-&gt;next;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if (e &amp; 32)               /* end of block */</div><div class='del'>-      {</div><div class='del'>-        Tracevv((stderr, "inflate:         end of block\n"));</div><div class='del'>-        c-&gt;mode = WASH;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      c-&gt;mode = BADCODE;        /* invalid code */</div><div class='del'>-      z-&gt;msg = (char*)"invalid literal/length code";</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-    case LENEXT:        /* i: getting length extra (have base) */</div><div class='del'>-      j = c-&gt;sub.copy.get;</div><div class='del'>-      NEEDBITS(j)</div><div class='del'>-      c-&gt;len += (uInt)b &amp; inflate_mask[j];</div><div class='del'>-      DUMPBITS(j)</div><div class='del'>-      c-&gt;sub.code.need = c-&gt;dbits;</div><div class='del'>-      c-&gt;sub.code.tree = c-&gt;dtree;</div><div class='del'>-      Tracevv((stderr, "inflate:         length %u\n", c-&gt;len));</div><div class='del'>-      c-&gt;mode = DIST;</div><div class='del'>-    case DIST:          /* i: get distance next */</div><div class='del'>-      j = c-&gt;sub.code.need;</div><div class='del'>-      NEEDBITS(j)</div><div class='del'>-      t = c-&gt;sub.code.tree + ((uInt)b &amp; inflate_mask[j]);</div><div class='del'>-      DUMPBITS(t-&gt;bits)</div><div class='del'>-      e = (uInt)(t-&gt;exop);</div><div class='del'>-      if (e &amp; 16)               /* distance */</div><div class='del'>-      {</div><div class='del'>-        c-&gt;sub.copy.get = e &amp; 15;</div><div class='del'>-        c-&gt;sub.copy.dist = t-&gt;base;</div><div class='del'>-        c-&gt;mode = DISTEXT;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if ((e &amp; 64) == 0)        /* next table */</div><div class='del'>-      {</div><div class='del'>-        c-&gt;sub.code.need = e;</div><div class='del'>-        c-&gt;sub.code.tree = t-&gt;next;</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      c-&gt;mode = BADCODE;        /* invalid code */</div><div class='del'>-      z-&gt;msg = (char*)"invalid distance code";</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-    case DISTEXT:       /* i: getting distance extra */</div><div class='del'>-      j = c-&gt;sub.copy.get;</div><div class='del'>-      NEEDBITS(j)</div><div class='del'>-      c-&gt;sub.copy.dist += (uInt)b &amp; inflate_mask[j];</div><div class='del'>-      DUMPBITS(j)</div><div class='del'>-      Tracevv((stderr, "inflate:         distance %u\n", c-&gt;sub.copy.dist));</div><div class='del'>-      c-&gt;mode = COPY;</div><div class='del'>-    case COPY:          /* o: copying bytes in window, waiting for space */</div><div class='del'>-#ifndef __TURBOC__ /* Turbo C bug for following expression */</div><div class='del'>-      f = (uInt)(q - s-&gt;window) &lt; c-&gt;sub.copy.dist ?</div><div class='del'>-          s-&gt;end - (c-&gt;sub.copy.dist - (q - s-&gt;window)) :</div><div class='del'>-          q - c-&gt;sub.copy.dist;</div><div class='del'>-#else</div><div class='del'>-      f = q - c-&gt;sub.copy.dist;</div><div class='del'>-      if ((uInt)(q - s-&gt;window) &lt; c-&gt;sub.copy.dist)</div><div class='del'>-        f = s-&gt;end - (c-&gt;sub.copy.dist - (uInt)(q - s-&gt;window));</div><div class='del'>-#endif</div><div class='del'>-      while (c-&gt;len)</div><div class='del'>-      {</div><div class='del'>-        NEEDOUT</div><div class='del'>-        OUTBYTE(*f++)</div><div class='del'>-        if (f == s-&gt;end)</div><div class='del'>-          f = s-&gt;window;</div><div class='del'>-        c-&gt;len--;</div><div class='del'>-      }</div><div class='del'>-      c-&gt;mode = START;</div><div class='del'>-      break;</div><div class='del'>-    case LIT:           /* o: got literal, waiting for output space */</div><div class='del'>-      NEEDOUT</div><div class='del'>-      OUTBYTE(c-&gt;sub.lit)</div><div class='del'>-      c-&gt;mode = START;</div><div class='del'>-      break;</div><div class='del'>-    case WASH:          /* o: got eob, possibly more output */</div><div class='del'>-      FLUSH</div><div class='del'>-      if (s-&gt;read != s-&gt;write)</div><div class='del'>-        LEAVE</div><div class='del'>-      c-&gt;mode = END;</div><div class='del'>-    case END:</div><div class='del'>-      r = Z_STREAM_END;</div><div class='del'>-      LEAVE</div><div class='del'>-    case BADCODE:       /* x: got error */</div><div class='del'>-      r = Z_DATA_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-    default:</div><div class='del'>-      r = Z_STREAM_ERROR;</div><div class='del'>-      LEAVE</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-void inflate_codes_free(c, z)</div><div class='del'>-inflate_codes_statef *c;</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  ZFREE(z, c);</div><div class='del'>-  Tracev((stderr, "inflate:       codes free\n"));</div><div class='del'>-}</div><div class='del'>-/* --- infcodes.c */</div><div class='del'>-</div><div class='del'>-/* +++ infutil.c */</div><div class='del'>-/* inflate_util.c -- data and routines common to blocks and codes</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-/* #include "infblock.h" */</div><div class='del'>-/* #include "inftrees.h" */</div><div class='del'>-/* #include "infcodes.h" */</div><div class='del'>-/* #include "infutil.h" */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct inflate_codes_state {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* And'ing with mask[n] masks the lower n bits */</div><div class='del'>-uInt inflate_mask[17] = {</div><div class='del'>-    0x0000,</div><div class='del'>-    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,</div><div class='del'>-    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* copy as much as possible from the sliding window to the output area */</div><div class='del'>-int inflate_flush(s, z, r)</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-int r;</div><div class='del'>-{</div><div class='del'>-  uInt n;</div><div class='del'>-  Bytef *p;</div><div class='del'>-  Bytef *q;</div><div class='del'>-</div><div class='del'>-  /* local copies of source and destination pointers */</div><div class='del'>-  p = z-&gt;next_out;</div><div class='del'>-  q = s-&gt;read;</div><div class='del'>-</div><div class='del'>-  /* compute number of bytes to copy as far as end of window */</div><div class='del'>-  n = (uInt)((q &lt;= s-&gt;write ? s-&gt;write : s-&gt;end) - q);</div><div class='del'>-  if (n &gt; z-&gt;avail_out) n = z-&gt;avail_out;</div><div class='del'>-  if (n &amp;&amp; r == Z_BUF_ERROR) r = Z_OK;</div><div class='del'>-</div><div class='del'>-  /* update counters */</div><div class='del'>-  z-&gt;avail_out -= n;</div><div class='del'>-  z-&gt;total_out += n;</div><div class='del'>-</div><div class='del'>-  /* update check information */</div><div class='del'>-  if (s-&gt;checkfn != Z_NULL)</div><div class='del'>-    z-&gt;adler = s-&gt;check = (*s-&gt;checkfn)(s-&gt;check, q, n);</div><div class='del'>-</div><div class='del'>-  /* copy as far as end of window */</div><div class='del'>-  if (p != Z_NULL) {</div><div class='del'>-    zmemcpy(p, q, n);</div><div class='del'>-    p += n;</div><div class='del'>-  }</div><div class='del'>-  q += n;</div><div class='del'>-</div><div class='del'>-  /* see if more to copy at beginning of window */</div><div class='del'>-  if (q == s-&gt;end)</div><div class='del'>-  {</div><div class='del'>-    /* wrap pointers */</div><div class='del'>-    q = s-&gt;window;</div><div class='del'>-    if (s-&gt;write == s-&gt;end)</div><div class='del'>-      s-&gt;write = s-&gt;window;</div><div class='del'>-</div><div class='del'>-    /* compute bytes to copy */</div><div class='del'>-    n = (uInt)(s-&gt;write - q);</div><div class='del'>-    if (n &gt; z-&gt;avail_out) n = z-&gt;avail_out;</div><div class='del'>-    if (n &amp;&amp; r == Z_BUF_ERROR) r = Z_OK;</div><div class='del'>-</div><div class='del'>-    /* update counters */</div><div class='del'>-    z-&gt;avail_out -= n;</div><div class='del'>-    z-&gt;total_out += n;</div><div class='del'>-</div><div class='del'>-    /* update check information */</div><div class='del'>-    if (s-&gt;checkfn != Z_NULL)</div><div class='del'>-      z-&gt;adler = s-&gt;check = (*s-&gt;checkfn)(s-&gt;check, q, n);</div><div class='del'>-</div><div class='del'>-    /* copy */</div><div class='del'>-    if (p != Z_NULL) {</div><div class='del'>-      zmemcpy(p, q, n);</div><div class='del'>-      p += n;</div><div class='del'>-    }</div><div class='del'>-    q += n;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* update pointers */</div><div class='del'>-  z-&gt;next_out = p;</div><div class='del'>-  s-&gt;read = q;</div><div class='del'>-</div><div class='del'>-  /* done */</div><div class='del'>-  return r;</div><div class='del'>-}</div><div class='del'>-/* --- infutil.c */</div><div class='del'>-</div><div class='del'>-/* +++ inffast.c */</div><div class='del'>-/* inffast.c -- process literals and length/distance pairs fast</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-/* #include "inftrees.h" */</div><div class='del'>-/* #include "infblock.h" */</div><div class='del'>-/* #include "infcodes.h" */</div><div class='del'>-/* #include "infutil.h" */</div><div class='del'>-/* #include "inffast.h" */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct inflate_codes_state {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* simplify the use of the inflate_huft type with some defines */</div><div class='del'>-#define base more.Base</div><div class='del'>-#define next more.Next</div><div class='del'>-#define exop word.what.Exop</div><div class='del'>-#define bits word.what.Bits</div><div class='del'>-</div><div class='del'>-/* macros for bit input with no checking and for returning unused bytes */</div><div class='del'>-#define GRABBITS(j) {while(k&lt;(j)){b|=((uLong)NEXTBYTE)&lt;&lt;k;k+=8;}}</div><div class='del'>-#define UNGRAB {n+=(c=k&gt;&gt;3);p-=c;k&amp;=7;}</div><div class='del'>-</div><div class='del'>-/* Called with number of bytes left to write in window at least 258</div><div class='del'>-   (the maximum string length) and number of input bytes available</div><div class='del'>-   at least ten.  The ten bytes are six bytes for the longest length/</div><div class='del'>-   distance pair plus four bytes for overloading the bit buffer. */</div><div class='del'>-</div><div class='del'>-int inflate_fast(bl, bd, tl, td, s, z)</div><div class='del'>-uInt bl, bd;</div><div class='del'>-inflate_huft *tl;</div><div class='del'>-inflate_huft *td; /* need separate declaration for Borland C++ */</div><div class='del'>-inflate_blocks_statef *s;</div><div class='del'>-z_streamp z;</div><div class='del'>-{</div><div class='del'>-  inflate_huft *t;      /* temporary pointer */</div><div class='del'>-  uInt e;               /* extra bits or operation */</div><div class='del'>-  uLong b;              /* bit buffer */</div><div class='del'>-  uInt k;               /* bits in bit buffer */</div><div class='del'>-  Bytef *p;             /* input data pointer */</div><div class='del'>-  uInt n;               /* bytes available there */</div><div class='del'>-  Bytef *q;             /* output window write pointer */</div><div class='del'>-  uInt m;               /* bytes to end of window or read pointer */</div><div class='del'>-  uInt ml;              /* mask for literal/length tree */</div><div class='del'>-  uInt md;              /* mask for distance tree */</div><div class='del'>-  uInt c;               /* bytes to copy */</div><div class='del'>-  uInt d;               /* distance back to copy from */</div><div class='del'>-  Bytef *r;             /* copy source pointer */</div><div class='del'>-</div><div class='del'>-  /* load input, output, bit values */</div><div class='del'>-  LOAD</div><div class='del'>-</div><div class='del'>-  /* initialize masks */</div><div class='del'>-  ml = inflate_mask[bl];</div><div class='del'>-  md = inflate_mask[bd];</div><div class='del'>-</div><div class='del'>-  /* do until not enough input or output space for fast loop */</div><div class='del'>-  do {                          /* assume called with m &gt;= 258 &amp;&amp; n &gt;= 10 */</div><div class='del'>-    /* get literal/length code */</div><div class='del'>-    GRABBITS(20)                /* max bits for literal/length code */</div><div class='del'>-    if ((e = (t = tl + ((uInt)b &amp; ml))-&gt;exop) == 0)</div><div class='del'>-    {</div><div class='del'>-      DUMPBITS(t-&gt;bits)</div><div class='del'>-      Tracevv((stderr, t-&gt;base &gt;= 0x20 &amp;&amp; t-&gt;base &lt; 0x7f ?</div><div class='del'>-                "inflate:         * literal '%c'\n" :</div><div class='del'>-                "inflate:         * literal 0x%02x\n", t-&gt;base));</div><div class='del'>-      *q++ = (Byte)t-&gt;base;</div><div class='del'>-      m--;</div><div class='del'>-      continue;</div><div class='del'>-    }</div><div class='del'>-    do {</div><div class='del'>-      DUMPBITS(t-&gt;bits)</div><div class='del'>-      if (e &amp; 16)</div><div class='del'>-      {</div><div class='del'>-        /* get extra bits for length */</div><div class='del'>-        e &amp;= 15;</div><div class='del'>-        c = t-&gt;base + ((uInt)b &amp; inflate_mask[e]);</div><div class='del'>-        DUMPBITS(e)</div><div class='del'>-        Tracevv((stderr, "inflate:         * length %u\n", c));</div><div class='del'>-</div><div class='del'>-        /* decode distance base of block to copy */</div><div class='del'>-        GRABBITS(15);           /* max bits for distance code */</div><div class='del'>-        e = (t = td + ((uInt)b &amp; md))-&gt;exop;</div><div class='del'>-        do {</div><div class='del'>-          DUMPBITS(t-&gt;bits)</div><div class='del'>-          if (e &amp; 16)</div><div class='del'>-          {</div><div class='del'>-            /* get extra bits to add to distance base */</div><div class='del'>-            e &amp;= 15;</div><div class='del'>-            GRABBITS(e)         /* get extra bits (up to 13) */</div><div class='del'>-            d = t-&gt;base + ((uInt)b &amp; inflate_mask[e]);</div><div class='del'>-            DUMPBITS(e)</div><div class='del'>-            Tracevv((stderr, "inflate:         * distance %u\n", d));</div><div class='del'>-</div><div class='del'>-            /* do the copy */</div><div class='del'>-            m -= c;</div><div class='del'>-            if ((uInt)(q - s-&gt;window) &gt;= d)     /* offset before dest */</div><div class='del'>-            {                                   /*  just copy */</div><div class='del'>-              r = q - d;</div><div class='del'>-              *q++ = *r++;  c--;        /* minimum count is three, */</div><div class='del'>-              *q++ = *r++;  c--;        /*  so unroll loop a little */</div><div class='del'>-            }</div><div class='del'>-            else                        /* else offset after destination */</div><div class='del'>-            {</div><div class='del'>-              e = d - (uInt)(q - s-&gt;window); /* bytes from offset to end */</div><div class='del'>-              r = s-&gt;end - e;           /* pointer to offset */</div><div class='del'>-              if (c &gt; e)                /* if source crosses, */</div><div class='del'>-              {</div><div class='del'>-                c -= e;                 /* copy to end of window */</div><div class='del'>-                do {</div><div class='del'>-                  *q++ = *r++;</div><div class='del'>-                } while (--e);</div><div class='del'>-                r = s-&gt;window;          /* copy rest from start of window */</div><div class='del'>-              }</div><div class='del'>-            }</div><div class='del'>-            do {                        /* copy all or what's left */</div><div class='del'>-              *q++ = *r++;</div><div class='del'>-            } while (--c);</div><div class='del'>-            break;</div><div class='del'>-          }</div><div class='del'>-          else if ((e &amp; 64) == 0)</div><div class='del'>-            e = (t = t-&gt;next + ((uInt)b &amp; inflate_mask[e]))-&gt;exop;</div><div class='del'>-          else</div><div class='del'>-          {</div><div class='del'>-            z-&gt;msg = (char*)"invalid distance code";</div><div class='del'>-            UNGRAB</div><div class='del'>-            UPDATE</div><div class='del'>-            return Z_DATA_ERROR;</div><div class='del'>-          }</div><div class='del'>-        } while (1);</div><div class='del'>-        break;</div><div class='del'>-      }</div><div class='del'>-      if ((e &amp; 64) == 0)</div><div class='del'>-      {</div><div class='del'>-        if ((e = (t = t-&gt;next + ((uInt)b &amp; inflate_mask[e]))-&gt;exop) == 0)</div><div class='del'>-        {</div><div class='del'>-          DUMPBITS(t-&gt;bits)</div><div class='del'>-          Tracevv((stderr, t-&gt;base &gt;= 0x20 &amp;&amp; t-&gt;base &lt; 0x7f ?</div><div class='del'>-                    "inflate:         * literal '%c'\n" :</div><div class='del'>-                    "inflate:         * literal 0x%02x\n", t-&gt;base));</div><div class='del'>-          *q++ = (Byte)t-&gt;base;</div><div class='del'>-          m--;</div><div class='del'>-          break;</div><div class='del'>-        }</div><div class='del'>-      }</div><div class='del'>-      else if (e &amp; 32)</div><div class='del'>-      {</div><div class='del'>-        Tracevv((stderr, "inflate:         * end of block\n"));</div><div class='del'>-        UNGRAB</div><div class='del'>-        UPDATE</div><div class='del'>-        return Z_STREAM_END;</div><div class='del'>-      }</div><div class='del'>-      else</div><div class='del'>-      {</div><div class='del'>-        z-&gt;msg = (char*)"invalid literal/length code";</div><div class='del'>-        UNGRAB</div><div class='del'>-        UPDATE</div><div class='del'>-        return Z_DATA_ERROR;</div><div class='del'>-      }</div><div class='del'>-    } while (1);</div><div class='del'>-  } while (m &gt;= 258 &amp;&amp; n &gt;= 10);</div><div class='del'>-</div><div class='del'>-  /* not enough input or output--restore pointers and return */</div><div class='del'>-  UNGRAB</div><div class='del'>-  UPDATE</div><div class='del'>-  return Z_OK;</div><div class='del'>-}</div><div class='del'>-/* --- inffast.c */</div><div class='del'>-</div><div class='del'>-/* +++ zutil.c */</div><div class='del'>-/* zutil.c -- target dependent utility functions for the compression library</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly.</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: zutil.c,v 1.17 1996/07/24 13:41:12 me Exp $ */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* #include "zutil.h" */</div><div class='del'>-</div><div class='del'>-#ifndef NO_DUMMY_DECL</div><div class='del'>-struct internal_state      {int dummy;}; /* for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef STDC</div><div class='del'>-extern void exit OF((int));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-const char *z_errmsg[10] = {</div><div class='del'>-"need dictionary",     /* Z_NEED_DICT       2  */</div><div class='del'>-"stream end",          /* Z_STREAM_END      1  */</div><div class='del'>-"",                    /* Z_OK              0  */</div><div class='del'>-"file error",          /* Z_ERRNO         (-1) */</div><div class='del'>-"stream error",        /* Z_STREAM_ERROR  (-2) */</div><div class='del'>-"data error",          /* Z_DATA_ERROR    (-3) */</div><div class='del'>-"insufficient memory", /* Z_MEM_ERROR     (-4) */</div><div class='del'>-"buffer error",        /* Z_BUF_ERROR     (-5) */</div><div class='del'>-"incompatible version",/* Z_VERSION_ERROR (-6) */</div><div class='del'>-""};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-const char *zlibVersion()</div><div class='del'>-{</div><div class='del'>-    return ZLIB_VERSION;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG_ZLIB</div><div class='del'>-void z_error (m)</div><div class='del'>-    char *m;</div><div class='del'>-{</div><div class='del'>-    fprintf(stderr, "%s\n", m);</div><div class='del'>-    exit(1);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef HAVE_MEMCPY</div><div class='del'>-</div><div class='del'>-void zmemcpy(dest, source, len)</div><div class='del'>-    Bytef* dest;</div><div class='del'>-    Bytef* source;</div><div class='del'>-    uInt  len;</div><div class='del'>-{</div><div class='del'>-    if (len == 0) return;</div><div class='del'>-    do {</div><div class='del'>-        *dest++ = *source++; /* ??? to be unrolled */</div><div class='del'>-    } while (--len != 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int zmemcmp(s1, s2, len)</div><div class='del'>-    Bytef* s1;</div><div class='del'>-    Bytef* s2;</div><div class='del'>-    uInt  len;</div><div class='del'>-{</div><div class='del'>-    uInt j;</div><div class='del'>-</div><div class='del'>-    for (j = 0; j &lt; len; j++) {</div><div class='del'>-        if (s1[j] != s2[j]) return 2*(s1[j] &gt; s2[j])-1;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void zmemzero(dest, len)</div><div class='del'>-    Bytef* dest;</div><div class='del'>-    uInt  len;</div><div class='del'>-{</div><div class='del'>-    if (len == 0) return;</div><div class='del'>-    do {</div><div class='del'>-        *dest++ = 0;  /* ??? to be unrolled */</div><div class='del'>-    } while (--len != 0);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __TURBOC__</div><div class='del'>-#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) &amp;&amp; !defined(__32BIT__)</div><div class='del'>-/* Small and medium model in Turbo C are for now limited to near allocation</div><div class='del'>- * with reduced MAX_WBITS and MAX_MEM_LEVEL</div><div class='del'>- */</div><div class='del'>-#  define MY_ZCALLOC</div><div class='del'>-</div><div class='del'>-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes</div><div class='del'>- * and farmalloc(64K) returns a pointer with an offset of 8, so we</div><div class='del'>- * must fix the pointer. Warning: the pointer must be put back to its</div><div class='del'>- * original form in order to free it, use zcfree().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define MAX_PTR 10</div><div class='del'>-/* 10*64K = 640K */</div><div class='del'>-</div><div class='del'>-local int next_ptr = 0;</div><div class='del'>-</div><div class='del'>-typedef struct ptr_table_s {</div><div class='del'>-    voidpf org_ptr;</div><div class='del'>-    voidpf new_ptr;</div><div class='del'>-} ptr_table;</div><div class='del'>-</div><div class='del'>-local ptr_table table[MAX_PTR];</div><div class='del'>-/* This table is used to remember the original form of pointers</div><div class='del'>- * to large buffers (64K). Such pointers are normalized with a zero offset.</div><div class='del'>- * Since MSDOS is not a preemptive multitasking OS, this table is not</div><div class='del'>- * protected from concurrent access. This hack doesn't work anyway on</div><div class='del'>- * a protected system like OS/2. Use Microsoft C instead.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)</div><div class='del'>-{</div><div class='del'>-    voidpf buf = opaque; /* just to make some compilers happy */</div><div class='del'>-    ulg bsize = (ulg)items*size;</div><div class='del'>-</div><div class='del'>-    /* If we allocate less than 65520 bytes, we assume that farmalloc</div><div class='del'>-     * will return a usable pointer which doesn't have to be normalized.</div><div class='del'>-     */</div><div class='del'>-    if (bsize &lt; 65520L) {</div><div class='del'>-        buf = farmalloc(bsize);</div><div class='del'>-        if (*(ush*)&amp;buf != 0) return buf;</div><div class='del'>-    } else {</div><div class='del'>-        buf = farmalloc(bsize + 16L);</div><div class='del'>-    }</div><div class='del'>-    if (buf == NULL || next_ptr &gt;= MAX_PTR) return NULL;</div><div class='del'>-    table[next_ptr].org_ptr = buf;</div><div class='del'>-</div><div class='del'>-    /* Normalize the pointer to seg:0 */</div><div class='del'>-    *((ush*)&amp;buf+1) += ((ush)((uch*)buf-0) + 15) &gt;&gt; 4;</div><div class='del'>-    *(ush*)&amp;buf = 0;</div><div class='del'>-    table[next_ptr++].new_ptr = buf;</div><div class='del'>-    return buf;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void  zcfree (voidpf opaque, voidpf ptr)</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-    if (*(ush*)&amp;ptr != 0) { /* object &lt; 64K */</div><div class='del'>-        farfree(ptr);</div><div class='del'>-        return;</div><div class='del'>-    }</div><div class='del'>-    /* Find the original pointer */</div><div class='del'>-    for (n = 0; n &lt; next_ptr; n++) {</div><div class='del'>-        if (ptr != table[n].new_ptr) continue;</div><div class='del'>-</div><div class='del'>-        farfree(table[n].org_ptr);</div><div class='del'>-        while (++n &lt; next_ptr) {</div><div class='del'>-            table[n-1] = table[n];</div><div class='del'>-        }</div><div class='del'>-        next_ptr--;</div><div class='del'>-        return;</div><div class='del'>-    }</div><div class='del'>-    ptr = opaque; /* just to make some compilers happy */</div><div class='del'>-    Assert(0, "zcfree: ptr not found");</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-#endif /* __TURBOC__ */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined(M_I86) &amp;&amp; !defined(__32BIT__)</div><div class='del'>-/* Microsoft C in 16-bit mode */</div><div class='del'>-</div><div class='del'>-#  define MY_ZCALLOC</div><div class='del'>-</div><div class='del'>-#if (!defined(_MSC_VER) || (_MSC_VER &lt; 600))</div><div class='del'>-#  define _halloc  halloc</div><div class='del'>-#  define _hfree   hfree</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)</div><div class='del'>-{</div><div class='del'>-    if (opaque) opaque = 0; /* to make compiler happy */</div><div class='del'>-    return _halloc((long)items, size);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void  zcfree (voidpf opaque, voidpf ptr)</div><div class='del'>-{</div><div class='del'>-    if (opaque) opaque = 0; /* to make compiler happy */</div><div class='del'>-    _hfree(ptr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* MSC */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifndef MY_ZCALLOC /* Any system without a special alloc function */</div><div class='del'>-</div><div class='del'>-#ifndef STDC</div><div class='del'>-extern voidp  calloc OF((uInt items, uInt size));</div><div class='del'>-extern void   free   OF((voidpf ptr));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-voidpf zcalloc (opaque, items, size)</div><div class='del'>-    voidpf opaque;</div><div class='del'>-    unsigned items;</div><div class='del'>-    unsigned size;</div><div class='del'>-{</div><div class='del'>-    if (opaque) items += size - size; /* make compiler happy */</div><div class='del'>-    return (voidpf)calloc(items, size);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void  zcfree (opaque, ptr)</div><div class='del'>-    voidpf opaque;</div><div class='del'>-    voidpf ptr;</div><div class='del'>-{</div><div class='del'>-    free(ptr);</div><div class='del'>-    if (opaque) return; /* make compiler happy */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* MY_ZCALLOC */</div><div class='del'>-/* --- zutil.c */</div><div class='del'>-</div><div class='del'>-/* +++ adler32.c */</div><div class='del'>-/* adler32.c -- compute the Adler-32 checksum of a data stream</div><div class='del'>- * Copyright (C) 1995-1996 Mark Adler</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: adler32.c,v 1.10 1996/05/22 11:52:18 me Exp $ */</div><div class='del'>-</div><div class='del'>-/* #include "zlib.h" */</div><div class='del'>-</div><div class='del'>-#define BASE 65521L /* largest prime smaller than 65536 */</div><div class='del'>-#define NMAX 5552</div><div class='del'>-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) &lt;= 2^32-1 */</div><div class='del'>-</div><div class='del'>-#define DO1(buf,i)  {s1 += buf[i]; s2 += s1;}</div><div class='del'>-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);</div><div class='del'>-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);</div><div class='del'>-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);</div><div class='del'>-#define DO16(buf)   DO8(buf,0); DO8(buf,8);</div><div class='del'>-</div><div class='del'>-/* ========================================================================= */</div><div class='del'>-uLong adler32(adler, buf, len)</div><div class='del'>-    uLong adler;</div><div class='del'>-    const Bytef *buf;</div><div class='del'>-    uInt len;</div><div class='del'>-{</div><div class='del'>-    unsigned long s1 = adler &amp; 0xffff;</div><div class='del'>-    unsigned long s2 = (adler &gt;&gt; 16) &amp; 0xffff;</div><div class='del'>-    int k;</div><div class='del'>-</div><div class='del'>-    if (buf == Z_NULL) return 1L;</div><div class='del'>-</div><div class='del'>-    while (len &gt; 0) {</div><div class='del'>-        k = len &lt; NMAX ? len : NMAX;</div><div class='del'>-        len -= k;</div><div class='del'>-        while (k &gt;= 16) {</div><div class='del'>-            DO16(buf);</div><div class='del'>-	    buf += 16;</div><div class='del'>-            k -= 16;</div><div class='del'>-        }</div><div class='del'>-        if (k != 0) do {</div><div class='del'>-            s1 += *buf++;</div><div class='del'>-	    s2 += s1;</div><div class='del'>-        } while (--k);</div><div class='del'>-        s1 %= BASE;</div><div class='del'>-        s2 %= BASE;</div><div class='del'>-    }</div><div class='del'>-    return (s2 &lt;&lt; 16) | s1;</div><div class='del'>-}</div><div class='del'>-/* --- adler32.c */</div><div class='head'>diff --git a/mdk-stage1/ppp/common/zlib.h b/mdk-stage1/ppp/common/zlib.h<br/>deleted file mode 100644<br/>index 188ddaff9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/common/zlib.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/common/zlib.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1010 +0,0 @@</div><div class='del'>-/*	$Id$	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This file is derived from zlib.h and zconf.h from the zlib-1.0.4</div><div class='del'>- * distribution by Jean-loup Gailly and Mark Adler, with some additions</div><div class='del'>- * by Paul Mackerras to aid in implementing Deflate compression and</div><div class='del'>- * decompression for PPP packets.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ==FILEVERSION 971127==</div><div class='del'>- *</div><div class='del'>- * This marker is used by the Linux installation script to determine</div><div class='del'>- * whether an up-to-date version of this file is already installed.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* +++ zlib.h */</div><div class='del'>-/* zlib.h -- interface of the 'zlib' general purpose compression library</div><div class='del'>-  version 1.0.4, Jul 24th, 1996.</div><div class='del'>-</div><div class='del'>-  Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler</div><div class='del'>-</div><div class='del'>-  This software is provided 'as-is', without any express or implied</div><div class='del'>-  warranty.  In no event will the authors be held liable for any damages</div><div class='del'>-  arising from the use of this software.</div><div class='del'>-</div><div class='del'>-  Permission is granted to anyone to use this software for any purpose,</div><div class='del'>-  including commercial applications, and to alter it and redistribute it</div><div class='del'>-  freely, subject to the following restrictions:</div><div class='del'>-</div><div class='del'>-  1. The origin of this software must not be misrepresented; you must not</div><div class='del'>-     claim that you wrote the original software. If you use this software</div><div class='del'>-     in a product, an acknowledgment in the product documentation would be</div><div class='del'>-     appreciated but is not required.</div><div class='del'>-  2. Altered source versions must be plainly marked as such, and must not be</div><div class='del'>-     misrepresented as being the original software.</div><div class='del'>-  3. This notice may not be removed or altered from any source distribution.</div><div class='del'>-</div><div class='del'>-  Jean-loup Gailly        Mark Adler</div><div class='del'>-  gzip@prep.ai.mit.edu    madler@alumni.caltech.edu</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-  The data format used by the zlib library is described by RFCs (Request for</div><div class='del'>-  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt</div><div class='del'>-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#ifndef _ZLIB_H</div><div class='del'>-#define _ZLIB_H</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-extern "C" {</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* +++ zconf.h */</div><div class='del'>-/* zconf.h -- configuration of the zlib compression library</div><div class='del'>- * Copyright (C) 1995-1996 Jean-loup Gailly.</div><div class='del'>- * For conditions of distribution and use, see copyright notice in zlib.h </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* From: zconf.h,v 1.20 1996/07/02 15:09:28 me Exp $ */</div><div class='del'>-</div><div class='del'>-#ifndef _ZCONF_H</div><div class='del'>-#define _ZCONF_H</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If you *really* need a unique prefix for all types and library functions,</div><div class='del'>- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.</div><div class='del'>- */</div><div class='del'>-#ifdef Z_PREFIX</div><div class='del'>-#  define deflateInit_	z_deflateInit_</div><div class='del'>-#  define deflate	z_deflate</div><div class='del'>-#  define deflateEnd	z_deflateEnd</div><div class='del'>-#  define inflateInit_ 	z_inflateInit_</div><div class='del'>-#  define inflate	z_inflate</div><div class='del'>-#  define inflateEnd	z_inflateEnd</div><div class='del'>-#  define deflateInit2_	z_deflateInit2_</div><div class='del'>-#  define deflateSetDictionary z_deflateSetDictionary</div><div class='del'>-#  define deflateCopy	z_deflateCopy</div><div class='del'>-#  define deflateReset	z_deflateReset</div><div class='del'>-#  define deflateParams	z_deflateParams</div><div class='del'>-#  define inflateInit2_	z_inflateInit2_</div><div class='del'>-#  define inflateSetDictionary z_inflateSetDictionary</div><div class='del'>-#  define inflateSync	z_inflateSync</div><div class='del'>-#  define inflateReset	z_inflateReset</div><div class='del'>-#  define compress	z_compress</div><div class='del'>-#  define uncompress	z_uncompress</div><div class='del'>-#  define adler32	z_adler32</div><div class='del'>-#  define crc32		z_crc32</div><div class='del'>-#  define get_crc_table z_get_crc_table</div><div class='del'>-</div><div class='del'>-#  define Byte		z_Byte</div><div class='del'>-#  define uInt		z_uInt</div><div class='del'>-#  define uLong		z_uLong</div><div class='del'>-#  define Bytef	        z_Bytef</div><div class='del'>-#  define charf		z_charf</div><div class='del'>-#  define intf		z_intf</div><div class='del'>-#  define uIntf		z_uIntf</div><div class='del'>-#  define uLongf	z_uLongf</div><div class='del'>-#  define voidpf	z_voidpf</div><div class='del'>-#  define voidp		z_voidp</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if (defined(_WIN32) || defined(__WIN32__)) &amp;&amp; !defined(WIN32)</div><div class='del'>-#  define WIN32</div><div class='del'>-#endif</div><div class='del'>-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)</div><div class='del'>-#  ifndef __32BIT__</div><div class='del'>-#    define __32BIT__</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-#if defined(__MSDOS__) &amp;&amp; !defined(MSDOS)</div><div class='del'>-#  define MSDOS</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more</div><div class='del'>- * than 64k bytes at a time (needed on systems with 16-bit int).</div><div class='del'>- */</div><div class='del'>-#if defined(MSDOS) &amp;&amp; !defined(__32BIT__)</div><div class='del'>-#  define MAXSEG_64K</div><div class='del'>-#endif</div><div class='del'>-#ifdef MSDOS</div><div class='del'>-#  define UNALIGNED_OK</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  &amp;&amp; !defined(STDC)</div><div class='del'>-#  define STDC</div><div class='del'>-#endif</div><div class='del'>-#if (defined(__STDC__) || defined(__cplusplus)) &amp;&amp; !defined(STDC)</div><div class='del'>-#  define STDC</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef STDC</div><div class='del'>-#  ifndef const /* cannot use !defined(STDC) &amp;&amp; !defined(const) on Mac */</div><div class='del'>-#    define const</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Some Mac compilers merge all .h files incorrectly: */</div><div class='del'>-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)</div><div class='del'>-#  define NO_DUMMY_DECL</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Maximum value for memLevel in deflateInit2 */</div><div class='del'>-#ifndef MAX_MEM_LEVEL</div><div class='del'>-#  ifdef MAXSEG_64K</div><div class='del'>-#    define MAX_MEM_LEVEL 8</div><div class='del'>-#  else</div><div class='del'>-#    define MAX_MEM_LEVEL 9</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Maximum value for windowBits in deflateInit2 and inflateInit2 */</div><div class='del'>-#ifndef MAX_WBITS</div><div class='del'>-#  define MAX_WBITS   15 /* 32K LZ77 window */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* The memory requirements for deflate are (in bytes):</div><div class='del'>-            1 &lt;&lt; (windowBits+2)   +  1 &lt;&lt; (memLevel+9)</div><div class='del'>- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)</div><div class='del'>- plus a few kilobytes for small objects. For example, if you want to reduce</div><div class='del'>- the default memory requirements from 256K to 128K, compile with</div><div class='del'>-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"</div><div class='del'>- Of course this will generally degrade compression (there's no free lunch).</div><div class='del'>-</div><div class='del'>-   The memory requirements for inflate are (in bytes) 1 &lt;&lt; windowBits</div><div class='del'>- that is, 32K for windowBits=15 (default value) plus a few kilobytes</div><div class='del'>- for small objects.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-                        /* Type declarations */</div><div class='del'>-</div><div class='del'>-#ifndef OF /* function prototypes */</div><div class='del'>-#  ifdef STDC</div><div class='del'>-#    define OF(args)  args</div><div class='del'>-#  else</div><div class='del'>-#    define OF(args)  ()</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* The following definitions for FAR are needed only for MSDOS mixed</div><div class='del'>- * model programming (small or medium model with some far allocations).</div><div class='del'>- * This was tested only with MSC; for other MSDOS compilers you may have</div><div class='del'>- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,</div><div class='del'>- * just define FAR to be empty.</div><div class='del'>- */</div><div class='del'>-#if (defined(M_I86SM) || defined(M_I86MM)) &amp;&amp; !defined(__32BIT__)</div><div class='del'>-   /* MSC small or medium model */</div><div class='del'>-#  define SMALL_MEDIUM</div><div class='del'>-#  ifdef _MSC_VER</div><div class='del'>-#    define FAR __far</div><div class='del'>-#  else</div><div class='del'>-#    define FAR far</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-#if defined(__BORLANDC__) &amp;&amp; (defined(__SMALL__) || defined(__MEDIUM__))</div><div class='del'>-#  ifndef __32BIT__</div><div class='del'>-#    define SMALL_MEDIUM</div><div class='del'>-#    define FAR __far</div><div class='del'>-#  endif</div><div class='del'>-#endif</div><div class='del'>-#ifndef FAR</div><div class='del'>-#   define FAR</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-typedef unsigned char  Byte;  /* 8 bits */</div><div class='del'>-typedef unsigned int   uInt;  /* 16 bits or more */</div><div class='del'>-typedef unsigned long  uLong; /* 32 bits or more */</div><div class='del'>-</div><div class='del'>-#if defined(__BORLANDC__) &amp;&amp; defined(SMALL_MEDIUM)</div><div class='del'>-   /* Borland C/C++ ignores FAR inside typedef */</div><div class='del'>-#  define Bytef Byte FAR</div><div class='del'>-#else</div><div class='del'>-   typedef Byte  FAR Bytef;</div><div class='del'>-#endif</div><div class='del'>-typedef char  FAR charf;</div><div class='del'>-typedef int   FAR intf;</div><div class='del'>-typedef uInt  FAR uIntf;</div><div class='del'>-typedef uLong FAR uLongf;</div><div class='del'>-</div><div class='del'>-#ifdef STDC</div><div class='del'>-   typedef void FAR *voidpf;</div><div class='del'>-   typedef void     *voidp;</div><div class='del'>-#else</div><div class='del'>-   typedef Byte FAR *voidpf;</div><div class='del'>-   typedef Byte     *voidp;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* Compile with -DZLIB_DLL for Windows DLL support */</div><div class='del'>-#if (defined(_WINDOWS) || defined(WINDOWS)) &amp;&amp; defined(ZLIB_DLL)</div><div class='del'>-#  include &lt;windows.h&gt;</div><div class='del'>-#  define EXPORT  WINAPI</div><div class='del'>-#else</div><div class='del'>-#  define EXPORT</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _ZCONF_H */</div><div class='del'>-/* --- zconf.h */</div><div class='del'>-</div><div class='del'>-#define ZLIB_VERSION "1.0.4P"</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>-     The 'zlib' compression library provides in-memory compression and</div><div class='del'>-  decompression functions, including integrity checks of the uncompressed</div><div class='del'>-  data.  This version of the library supports only one compression method</div><div class='del'>-  (deflation) but other algorithms may be added later and will have the same</div><div class='del'>-  stream interface.</div><div class='del'>-</div><div class='del'>-     For compression the application must provide the output buffer and</div><div class='del'>-  may optionally provide the input buffer for optimization. For decompression,</div><div class='del'>-  the application must provide the input buffer and may optionally provide</div><div class='del'>-  the output buffer for optimization.</div><div class='del'>-</div><div class='del'>-     Compression can be done in a single step if the buffers are large</div><div class='del'>-  enough (for example if an input file is mmap'ed), or can be done by</div><div class='del'>-  repeated calls of the compression function.  In the latter case, the</div><div class='del'>-  application must provide more input and/or consume the output</div><div class='del'>-  (providing more output space) before each call.</div><div class='del'>-</div><div class='del'>-     The library does not install any signal handler. It is recommended to</div><div class='del'>-  add at least a handler for SIGSEGV when decompressing; the library checks</div><div class='del'>-  the consistency of the input data whenever possible but may go nuts</div><div class='del'>-  for some forms of corrupted input.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));</div><div class='del'>-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));</div><div class='del'>-</div><div class='del'>-struct internal_state;</div><div class='del'>-</div><div class='del'>-typedef struct z_stream_s {</div><div class='del'>-    Bytef    *next_in;  /* next input byte */</div><div class='del'>-    uInt     avail_in;  /* number of bytes available at next_in */</div><div class='del'>-    uLong    total_in;  /* total nb of input bytes read so far */</div><div class='del'>-</div><div class='del'>-    Bytef    *next_out; /* next output byte should be put there */</div><div class='del'>-    uInt     avail_out; /* remaining free space at next_out */</div><div class='del'>-    uLong    total_out; /* total nb of bytes output so far */</div><div class='del'>-</div><div class='del'>-    char     *msg;      /* last error message, NULL if no error */</div><div class='del'>-    struct internal_state FAR *state; /* not visible by applications */</div><div class='del'>-</div><div class='del'>-    alloc_func zalloc;  /* used to allocate the internal state */</div><div class='del'>-    free_func  zfree;   /* used to free the internal state */</div><div class='del'>-    voidpf     opaque;  /* private data object passed to zalloc and zfree */</div><div class='del'>-</div><div class='del'>-    int     data_type;  /* best guess about the data type: ascii or binary */</div><div class='del'>-    uLong   adler;      /* adler32 value of the uncompressed data */</div><div class='del'>-    uLong   reserved;   /* reserved for future use */</div><div class='del'>-} z_stream;</div><div class='del'>-</div><div class='del'>-typedef z_stream FAR *z_streamp;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-   The application must update next_in and avail_in when avail_in has</div><div class='del'>-   dropped to zero. It must update next_out and avail_out when avail_out</div><div class='del'>-   has dropped to zero. The application must initialize zalloc, zfree and</div><div class='del'>-   opaque before calling the init function. All other fields are set by the</div><div class='del'>-   compression library and must not be updated by the application.</div><div class='del'>-</div><div class='del'>-   The opaque value provided by the application will be passed as the first</div><div class='del'>-   parameter for calls of zalloc and zfree. This can be useful for custom</div><div class='del'>-   memory management. The compression library attaches no meaning to the</div><div class='del'>-   opaque value.</div><div class='del'>-</div><div class='del'>-   zalloc must return Z_NULL if there is not enough memory for the object.</div><div class='del'>-   On 16-bit systems, the functions zalloc and zfree must be able to allocate</div><div class='del'>-   exactly 65536 bytes, but will not be required to allocate more than this</div><div class='del'>-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,</div><div class='del'>-   pointers returned by zalloc for objects of exactly 65536 bytes *must*</div><div class='del'>-   have their offset normalized to zero. The default allocation function</div><div class='del'>-   provided by this library ensures this (see zutil.c). To reduce memory</div><div class='del'>-   requirements and avoid any allocation of 64K objects, at the expense of</div><div class='del'>-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).</div><div class='del'>-</div><div class='del'>-   The fields total_in and total_out can be used for statistics or</div><div class='del'>-   progress reports. After compression, total_in holds the total size of</div><div class='del'>-   the uncompressed data and may be saved for use in the decompressor</div><div class='del'>-   (particularly if the decompressor wants to decompress everything in</div><div class='del'>-   a single step).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-                        /* constants */</div><div class='del'>-</div><div class='del'>-#define Z_NO_FLUSH      0</div><div class='del'>-#define Z_PARTIAL_FLUSH 1</div><div class='del'>-#define Z_PACKET_FLUSH	2</div><div class='del'>-#define Z_SYNC_FLUSH    3</div><div class='del'>-#define Z_FULL_FLUSH    4</div><div class='del'>-#define Z_FINISH        5</div><div class='del'>-/* Allowed flush values; see deflate() below for details */</div><div class='del'>-</div><div class='del'>-#define Z_OK            0</div><div class='del'>-#define Z_STREAM_END    1</div><div class='del'>-#define Z_NEED_DICT     2</div><div class='del'>-#define Z_ERRNO        (-1)</div><div class='del'>-#define Z_STREAM_ERROR (-2)</div><div class='del'>-#define Z_DATA_ERROR   (-3)</div><div class='del'>-#define Z_MEM_ERROR    (-4)</div><div class='del'>-#define Z_BUF_ERROR    (-5)</div><div class='del'>-#define Z_VERSION_ERROR (-6)</div><div class='del'>-/* Return codes for the compression/decompression functions. Negative</div><div class='del'>- * values are errors, positive values are used for special but normal events.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define Z_NO_COMPRESSION         0</div><div class='del'>-#define Z_BEST_SPEED             1</div><div class='del'>-#define Z_BEST_COMPRESSION       9</div><div class='del'>-#define Z_DEFAULT_COMPRESSION  (-1)</div><div class='del'>-/* compression levels */</div><div class='del'>-</div><div class='del'>-#define Z_FILTERED            1</div><div class='del'>-#define Z_HUFFMAN_ONLY        2</div><div class='del'>-#define Z_DEFAULT_STRATEGY    0</div><div class='del'>-/* compression strategy; see deflateInit2() below for details */</div><div class='del'>-</div><div class='del'>-#define Z_BINARY   0</div><div class='del'>-#define Z_ASCII    1</div><div class='del'>-#define Z_UNKNOWN  2</div><div class='del'>-/* Possible values of the data_type field */</div><div class='del'>-</div><div class='del'>-#define Z_DEFLATED   8</div><div class='del'>-/* The deflate compression method (the only one supported in this version) */</div><div class='del'>-</div><div class='del'>-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */</div><div class='del'>-</div><div class='del'>-#define zlib_version zlibVersion()</div><div class='del'>-/* for compatibility with versions &lt; 1.0.2 */</div><div class='del'>-</div><div class='del'>-                        /* basic functions */</div><div class='del'>-</div><div class='del'>-extern const char * EXPORT zlibVersion OF((void));</div><div class='del'>-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.</div><div class='del'>-   If the first character differs, the library code actually used is</div><div class='del'>-   not compatible with the zlib.h header file used by the application.</div><div class='del'>-   This check is automatically made by deflateInit and inflateInit.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>-extern int EXPORT deflateInit OF((z_streamp strm, int level));</div><div class='del'>-</div><div class='del'>-     Initializes the internal stream state for compression. The fields</div><div class='del'>-   zalloc, zfree and opaque must be initialized before by the caller.</div><div class='del'>-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to</div><div class='del'>-   use default allocation functions.</div><div class='del'>-</div><div class='del'>-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:</div><div class='del'>-   1 gives best speed, 9 gives best compression, 0 gives no compression at</div><div class='del'>-   all (the input data is simply copied a block at a time).</div><div class='del'>-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and</div><div class='del'>-   compression (currently equivalent to level 6).</div><div class='del'>-</div><div class='del'>-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not</div><div class='del'>-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,</div><div class='del'>-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible</div><div class='del'>-   with the version assumed by the caller (ZLIB_VERSION).</div><div class='del'>-   msg is set to null if there is no error message.  deflateInit does not</div><div class='del'>-   perform any compression: this will be done by deflate().</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflate OF((z_streamp strm, int flush));</div><div class='del'>-/*</div><div class='del'>-  Performs one or both of the following actions:</div><div class='del'>-</div><div class='del'>-  - Compress more input starting at next_in and update next_in and avail_in</div><div class='del'>-    accordingly. If not all input can be processed (because there is not</div><div class='del'>-    enough room in the output buffer), next_in and avail_in are updated and</div><div class='del'>-    processing will resume at this point for the next call of deflate().</div><div class='del'>-</div><div class='del'>-  - Provide more output starting at next_out and update next_out and avail_out</div><div class='del'>-    accordingly. This action is forced if the parameter flush is non zero.</div><div class='del'>-    Forcing flush frequently degrades the compression ratio, so this parameter</div><div class='del'>-    should be set only when necessary (in interactive applications).</div><div class='del'>-    Some output may be provided even if flush is not set.</div><div class='del'>-</div><div class='del'>-  Before the call of deflate(), the application should ensure that at least</div><div class='del'>-  one of the actions is possible, by providing more input and/or consuming</div><div class='del'>-  more output, and updating avail_in or avail_out accordingly; avail_out</div><div class='del'>-  should never be zero before the call. The application can consume the</div><div class='del'>-  compressed output when it wants, for example when the output buffer is full</div><div class='del'>-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK</div><div class='del'>-  and with zero avail_out, it must be called again after making room in the</div><div class='del'>-  output buffer because there might be more output pending.</div><div class='del'>-</div><div class='del'>-    If the parameter flush is set to Z_PARTIAL_FLUSH, the current compression</div><div class='del'>-  block is terminated and flushed to the output buffer so that the</div><div class='del'>-  decompressor can get all input data available so far. For method 9, a future</div><div class='del'>-  variant on method 8, the current block will be flushed but not terminated.</div><div class='del'>-  Z_SYNC_FLUSH has the same effect as partial flush except that the compressed</div><div class='del'>-  output is byte aligned (the compressor can clear its internal bit buffer)</div><div class='del'>-  and the current block is always terminated; this can be useful if the</div><div class='del'>-  compressor has to be restarted from scratch after an interruption (in which</div><div class='del'>-  case the internal state of the compressor may be lost).</div><div class='del'>-    If flush is set to Z_FULL_FLUSH, the compression block is terminated, a</div><div class='del'>-  special marker is output and the compression dictionary is discarded; this</div><div class='del'>-  is useful to allow the decompressor to synchronize if one compressed block</div><div class='del'>-  has been damaged (see inflateSync below).  Flushing degrades compression and</div><div class='del'>-  so should be used only when necessary.  Using Z_FULL_FLUSH too often can</div><div class='del'>-  seriously degrade the compression. If deflate returns with avail_out == 0,</div><div class='del'>-  this function must be called again with the same value of the flush</div><div class='del'>-  parameter and more output space (updated avail_out), until the flush is</div><div class='del'>-  complete (deflate returns with non-zero avail_out).</div><div class='del'>-</div><div class='del'>-    If the parameter flush is set to Z_PACKET_FLUSH, the compression</div><div class='del'>-  block is terminated, and a zero-length stored block is output,</div><div class='del'>-  omitting the length bytes (the effect of this is that the 3-bit type</div><div class='del'>-  code 000 for a stored block is output, and the output is then</div><div class='del'>-  byte-aligned).  This is designed for use at the end of a PPP packet.</div><div class='del'>-</div><div class='del'>-    If the parameter flush is set to Z_FINISH, pending input is processed,</div><div class='del'>-  pending output is flushed and deflate returns with Z_STREAM_END if there</div><div class='del'>-  was enough output space; if deflate returns with Z_OK, this function must be</div><div class='del'>-  called again with Z_FINISH and more output space (updated avail_out) but no</div><div class='del'>-  more input data, until it returns with Z_STREAM_END or an error. After</div><div class='del'>-  deflate has returned Z_STREAM_END, the only possible operations on the</div><div class='del'>-  stream are deflateReset or deflateEnd.</div><div class='del'>-  </div><div class='del'>-    Z_FINISH can be used immediately after deflateInit if all the compression</div><div class='del'>-  is to be done in a single step. In this case, avail_out must be at least</div><div class='del'>-  0.1% larger than avail_in plus 12 bytes.  If deflate does not return</div><div class='del'>-  Z_STREAM_END, then it must be called again as described above.</div><div class='del'>-</div><div class='del'>-    deflate() may update data_type if it can make a good guess about</div><div class='del'>-  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered</div><div class='del'>-  binary. This field is only for information purposes and does not affect</div><div class='del'>-  the compression algorithm in any manner.</div><div class='del'>-</div><div class='del'>-    deflate() returns Z_OK if some progress has been made (more input</div><div class='del'>-  processed or more output produced), Z_STREAM_END if all input has been</div><div class='del'>-  consumed and all output has been produced (only when flush is set to</div><div class='del'>-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example</div><div class='del'>-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflateEnd OF((z_streamp strm));</div><div class='del'>-/*</div><div class='del'>-     All dynamically allocated data structures for this stream are freed.</div><div class='del'>-   This function discards any unprocessed input and does not flush any</div><div class='del'>-   pending output.</div><div class='del'>-</div><div class='del'>-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the</div><div class='del'>-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed</div><div class='del'>-   prematurely (some input or output was discarded). In the error case,</div><div class='del'>-   msg may be set but then points to a static string (which must not be</div><div class='del'>-   deallocated).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>-extern int EXPORT inflateInit OF((z_streamp strm));</div><div class='del'>-</div><div class='del'>-     Initializes the internal stream state for decompression. The fields</div><div class='del'>-   zalloc, zfree and opaque must be initialized before by the caller.  If</div><div class='del'>-   zalloc and zfree are set to Z_NULL, inflateInit updates them to use default</div><div class='del'>-   allocation functions.</div><div class='del'>-</div><div class='del'>-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not</div><div class='del'>-   enough memory, Z_VERSION_ERROR if the zlib library version is incompatible</div><div class='del'>-   with the version assumed by the caller.  msg is set to null if there is no</div><div class='del'>-   error message. inflateInit does not perform any decompression: this will be</div><div class='del'>-   done by inflate().</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int EXPORT inflate OF((z_streamp strm, int flush));</div><div class='del'>-/*</div><div class='del'>-  Performs one or both of the following actions:</div><div class='del'>-</div><div class='del'>-  - Decompress more input starting at next_in and update next_in and avail_in</div><div class='del'>-    accordingly. If not all input can be processed (because there is not</div><div class='del'>-    enough room in the output buffer), next_in is updated and processing</div><div class='del'>-    will resume at this point for the next call of inflate().</div><div class='del'>-</div><div class='del'>-  - Provide more output starting at next_out and update next_out and avail_out</div><div class='del'>-    accordingly.  inflate() provides as much output as possible, until there</div><div class='del'>-    is no more input data or no more space in the output buffer (see below</div><div class='del'>-    about the flush parameter).</div><div class='del'>-</div><div class='del'>-  Before the call of inflate(), the application should ensure that at least</div><div class='del'>-  one of the actions is possible, by providing more input and/or consuming</div><div class='del'>-  more output, and updating the next_* and avail_* values accordingly.</div><div class='del'>-  The application can consume the uncompressed output when it wants, for</div><div class='del'>-  example when the output buffer is full (avail_out == 0), or after each</div><div class='del'>-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it</div><div class='del'>-  must be called again after making room in the output buffer because there</div><div class='del'>-  might be more output pending.</div><div class='del'>-</div><div class='del'>-    If the parameter flush is set to Z_PARTIAL_FLUSH or Z_PACKET_FLUSH,</div><div class='del'>-  inflate flushes as much output as possible to the output buffer. The</div><div class='del'>-  flushing behavior of inflate is not specified for values of the flush</div><div class='del'>-  parameter other than Z_PARTIAL_FLUSH, Z_PACKET_FLUSH or Z_FINISH, but the</div><div class='del'>-  current implementation actually flushes as much output as possible</div><div class='del'>-  anyway.  For Z_PACKET_FLUSH, inflate checks that once all the input data</div><div class='del'>-  has been consumed, it is expecting to see the length field of a stored</div><div class='del'>-  block; if not, it returns Z_DATA_ERROR.</div><div class='del'>-</div><div class='del'>-    inflate() should normally be called until it returns Z_STREAM_END or an</div><div class='del'>-  error. However if all decompression is to be performed in a single step</div><div class='del'>-  (a single call of inflate), the parameter flush should be set to</div><div class='del'>-  Z_FINISH. In this case all pending input is processed and all pending</div><div class='del'>-  output is flushed; avail_out must be large enough to hold all the</div><div class='del'>-  uncompressed data. (The size of the uncompressed data may have been saved</div><div class='del'>-  by the compressor for this purpose.) The next operation on this stream must</div><div class='del'>-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH</div><div class='del'>-  is never required, but can be used to inform inflate that a faster routine</div><div class='del'>-  may be used for the single inflate() call.</div><div class='del'>-</div><div class='del'>-    inflate() returns Z_OK if some progress has been made (more input</div><div class='del'>-  processed or more output produced), Z_STREAM_END if the end of the</div><div class='del'>-  compressed data has been reached and all uncompressed output has been</div><div class='del'>-  produced, Z_NEED_DICT if a preset dictionary is needed at this point (see</div><div class='del'>-  inflateSetDictionary below), Z_DATA_ERROR if the input data was corrupted,</div><div class='del'>-  Z_STREAM_ERROR if the stream structure was inconsistent (for example if</div><div class='del'>-  next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,</div><div class='del'>-  Z_BUF_ERROR if no progress is possible or if there was not enough room in</div><div class='del'>-  the output buffer when Z_FINISH is used. In the Z_DATA_ERROR case, the</div><div class='del'>-  application may then call inflateSync to look for a good compression block.</div><div class='del'>-  In the Z_NEED_DICT case, strm-&gt;adler is set to the Adler32 value of the</div><div class='del'>-  dictionary chosen by the compressor.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-extern int EXPORT inflateEnd OF((z_streamp strm));</div><div class='del'>-/*</div><div class='del'>-     All dynamically allocated data structures for this stream are freed.</div><div class='del'>-   This function discards any unprocessed input and does not flush any</div><div class='del'>-   pending output.</div><div class='del'>-</div><div class='del'>-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state</div><div class='del'>-   was inconsistent. In the error case, msg may be set but then points to a</div><div class='del'>-   static string (which must not be deallocated).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-                        /* Advanced functions */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-    The following functions are needed only in some special applications.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*   </div><div class='del'>-extern int EXPORT deflateInit2 OF((z_streamp strm,</div><div class='del'>-                                   int  level,</div><div class='del'>-                                   int  method,</div><div class='del'>-                                   int  windowBits,</div><div class='del'>-                                   int  memLevel,</div><div class='del'>-                                   int  strategy));</div><div class='del'>-</div><div class='del'>-     This is another version of deflateInit with more compression options. The</div><div class='del'>-   fields next_in, zalloc, zfree and opaque must be initialized before by</div><div class='del'>-   the caller.</div><div class='del'>-</div><div class='del'>-     The method parameter is the compression method. It must be Z_DEFLATED in</div><div class='del'>-   this version of the library. (Method 9 will allow a 64K history buffer and</div><div class='del'>-   partial block flushes.)</div><div class='del'>-</div><div class='del'>-     The windowBits parameter is the base two logarithm of the window size</div><div class='del'>-   (the size of the history buffer).  It should be in the range 8..15 for this</div><div class='del'>-   version of the library (the value 16 will be allowed for method 9). Larger</div><div class='del'>-   values of this parameter result in better compression at the expense of</div><div class='del'>-   memory usage. The default value is 15 if deflateInit is used instead.</div><div class='del'>-</div><div class='del'>-     The memLevel parameter specifies how much memory should be allocated</div><div class='del'>-   for the internal compression state. memLevel=1 uses minimum memory but</div><div class='del'>-   is slow and reduces compression ratio; memLevel=9 uses maximum memory</div><div class='del'>-   for optimal speed. The default value is 8. See zconf.h for total memory</div><div class='del'>-   usage as a function of windowBits and memLevel.</div><div class='del'>-</div><div class='del'>-     The strategy parameter is used to tune the compression algorithm. Use the</div><div class='del'>-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a</div><div class='del'>-   filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no</div><div class='del'>-   string match).  Filtered data consists mostly of small values with a</div><div class='del'>-   somewhat random distribution. In this case, the compression algorithm is</div><div class='del'>-   tuned to compress them better. The effect of Z_FILTERED is to force more</div><div class='del'>-   Huffman coding and less string matching; it is somewhat intermediate</div><div class='del'>-   between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects</div><div class='del'>-   the compression ratio but not the correctness of the compressed output even</div><div class='del'>-   if it is not set appropriately.</div><div class='del'>-</div><div class='del'>-     If next_in is not null, the library will use this buffer to hold also</div><div class='del'>-   some history information; the buffer must either hold the entire input</div><div class='del'>-   data, or have at least 1&lt;&lt;(windowBits+1) bytes and be writable. If next_in</div><div class='del'>-   is null, the library will allocate its own history buffer (and leave next_in</div><div class='del'>-   null). next_out need not be provided here but must be provided by the</div><div class='del'>-   application for the next call of deflate().</div><div class='del'>-</div><div class='del'>-     If the history buffer is provided by the application, next_in must</div><div class='del'>-   must never be changed by the application since the compressor maintains</div><div class='del'>-   information inside this buffer from call to call; the application</div><div class='del'>-   must provide more input only by increasing avail_in. next_in is always</div><div class='del'>-   reset by the library in this case.</div><div class='del'>-</div><div class='del'>-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was</div><div class='del'>-   not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as</div><div class='del'>-   an invalid method). msg is set to null if there is no error message.</div><div class='del'>-   deflateInit2 does not perform any compression: this will be done by</div><div class='del'>-   deflate(). </div><div class='del'>-*/</div><div class='del'>-                            </div><div class='del'>-extern int EXPORT deflateSetDictionary OF((z_streamp strm,</div><div class='del'>-                                           const Bytef *dictionary,</div><div class='del'>-				           uInt  dictLength));</div><div class='del'>-/*</div><div class='del'>-     Initializes the compression dictionary (history buffer) from the given</div><div class='del'>-   byte sequence without producing any compressed output. This function must</div><div class='del'>-   be called immediately after deflateInit or deflateInit2, before any call</div><div class='del'>-   of deflate. The compressor and decompressor must use exactly the same</div><div class='del'>-   dictionary (see inflateSetDictionary).</div><div class='del'>-     The dictionary should consist of strings (byte sequences) that are likely</div><div class='del'>-   to be encountered later in the data to be compressed, with the most commonly</div><div class='del'>-   used strings preferably put towards the end of the dictionary. Using a</div><div class='del'>-   dictionary is most useful when the data to be compressed is short and</div><div class='del'>-   can be predicted with good accuracy; the data can then be compressed better</div><div class='del'>-   than with the default empty dictionary. In this version of the library,</div><div class='del'>-   only the last 32K bytes of the dictionary are used.</div><div class='del'>-     Upon return of this function, strm-&gt;adler is set to the Adler32 value</div><div class='del'>-   of the dictionary; the decompressor may later use this value to determine</div><div class='del'>-   which dictionary has been used by the compressor. (The Adler32 value</div><div class='del'>-   applies to the whole dictionary even if only a subset of the dictionary is</div><div class='del'>-   actually used by the compressor.)</div><div class='del'>-</div><div class='del'>-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a</div><div class='del'>-   parameter is invalid (such as NULL dictionary) or the stream state</div><div class='del'>-   is inconsistent (for example if deflate has already been called for this</div><div class='del'>-   stream). deflateSetDictionary does not perform any compression: this will</div><div class='del'>-   be done by deflate(). </div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflateCopy OF((z_streamp dest,</div><div class='del'>-                                  z_streamp source));</div><div class='del'>-/*</div><div class='del'>-     Sets the destination stream as a complete copy of the source stream.  If</div><div class='del'>-   the source stream is using an application-supplied history buffer, a new</div><div class='del'>-   buffer is allocated for the destination stream.  The compressed output</div><div class='del'>-   buffer is always application-supplied. It's the responsibility of the</div><div class='del'>-   application to provide the correct values of next_out and avail_out for the</div><div class='del'>-   next call of deflate.</div><div class='del'>-</div><div class='del'>-     This function can be useful when several compression strategies will be</div><div class='del'>-   tried, for example when there are several ways of pre-processing the input</div><div class='del'>-   data with a filter. The streams that will be discarded should then be freed</div><div class='del'>-   by calling deflateEnd.  Note that deflateCopy duplicates the internal</div><div class='del'>-   compression state which can be quite large, so this strategy is slow and</div><div class='del'>-   can consume lots of memory.</div><div class='del'>-</div><div class='del'>-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not</div><div class='del'>-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent</div><div class='del'>-   (such as zalloc being NULL). msg is left unchanged in both source and</div><div class='del'>-   destination.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflateReset OF((z_streamp strm));</div><div class='del'>-/*</div><div class='del'>-     This function is equivalent to deflateEnd followed by deflateInit,</div><div class='del'>-   but does not free and reallocate all the internal compression state.</div><div class='del'>-   The stream will keep the same compression level and any other attributes</div><div class='del'>-   that may have been set by deflateInit2.</div><div class='del'>-</div><div class='del'>-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source</div><div class='del'>-   stream state was inconsistent (such as zalloc or state being NULL).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy));</div><div class='del'>-/*</div><div class='del'>-     Dynamically update the compression level and compression strategy.</div><div class='del'>-   This can be used to switch between compression and straight copy of</div><div class='del'>-   the input data, or to switch to a different kind of input data requiring</div><div class='del'>-   a different strategy. If the compression level is changed, the input</div><div class='del'>-   available so far is compressed with the old level (and may be flushed);</div><div class='del'>-   the new level will take effect only at the next call of deflate().</div><div class='del'>-</div><div class='del'>-     Before the call of deflateParams, the stream state must be set as for</div><div class='del'>-   a call of deflate(), since the currently available input may have to</div><div class='del'>-   be compressed and flushed. In particular, strm-&gt;avail_out must be non-zero.</div><div class='del'>-</div><div class='del'>-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source</div><div class='del'>-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR</div><div class='del'>-   if strm-&gt;avail_out was zero.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT deflateOutputPending OF((z_streamp strm));</div><div class='del'>-/*</div><div class='del'>-     Returns the number of bytes of output which are immediately</div><div class='del'>-   available from the compressor (i.e. without any further input</div><div class='del'>-   or flush).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*   </div><div class='del'>-extern int EXPORT inflateInit2 OF((z_streamp strm,</div><div class='del'>-                                   int  windowBits));</div><div class='del'>-</div><div class='del'>-     This is another version of inflateInit with more compression options. The</div><div class='del'>-   fields next_out, zalloc, zfree and opaque must be initialized before by</div><div class='del'>-   the caller.</div><div class='del'>-</div><div class='del'>-     The windowBits parameter is the base two logarithm of the maximum window</div><div class='del'>-   size (the size of the history buffer).  It should be in the range 8..15 for</div><div class='del'>-   this version of the library (the value 16 will be allowed soon). The</div><div class='del'>-   default value is 15 if inflateInit is used instead. If a compressed stream</div><div class='del'>-   with a larger window size is given as input, inflate() will return with</div><div class='del'>-   the error code Z_DATA_ERROR instead of trying to allocate a larger window.</div><div class='del'>-</div><div class='del'>-     If next_out is not null, the library will use this buffer for the history</div><div class='del'>-   buffer; the buffer must either be large enough to hold the entire output</div><div class='del'>-   data, or have at least 1&lt;&lt;windowBits bytes.  If next_out is null, the</div><div class='del'>-   library will allocate its own buffer (and leave next_out null). next_in</div><div class='del'>-   need not be provided here but must be provided by the application for the</div><div class='del'>-   next call of inflate().</div><div class='del'>-</div><div class='del'>-     If the history buffer is provided by the application, next_out must</div><div class='del'>-   never be changed by the application since the decompressor maintains</div><div class='del'>-   history information inside this buffer from call to call; the application</div><div class='del'>-   can only reset next_out to the beginning of the history buffer when</div><div class='del'>-   avail_out is zero and all output has been consumed.</div><div class='del'>-</div><div class='del'>-      inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was</div><div class='del'>-   not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as</div><div class='del'>-   windowBits &lt; 8). msg is set to null if there is no error message.</div><div class='del'>-   inflateInit2 does not perform any decompression: this will be done by</div><div class='del'>-   inflate().</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT inflateSetDictionary OF((z_streamp strm,</div><div class='del'>-				           const Bytef *dictionary,</div><div class='del'>-					   uInt  dictLength));</div><div class='del'>-/*</div><div class='del'>-     Initializes the decompression dictionary (history buffer) from the given</div><div class='del'>-   uncompressed byte sequence. This function must be called immediately after</div><div class='del'>-   a call of inflate if this call returned Z_NEED_DICT. The dictionary chosen</div><div class='del'>-   by the compressor can be determined from the Adler32 value returned by this</div><div class='del'>-   call of inflate. The compressor and decompressor must use exactly the same</div><div class='del'>-   dictionary (see deflateSetDictionary).</div><div class='del'>-</div><div class='del'>-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a</div><div class='del'>-   parameter is invalid (such as NULL dictionary) or the stream state is</div><div class='del'>-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the</div><div class='del'>-   expected one (incorrect Adler32 value). inflateSetDictionary does not</div><div class='del'>-   perform any decompression: this will be done by subsequent calls of</div><div class='del'>-   inflate().</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT inflateSync OF((z_streamp strm));</div><div class='del'>-/* </div><div class='del'>-    Skips invalid compressed data until the special marker (see deflate()</div><div class='del'>-  above) can be found, or until all available input is skipped. No output</div><div class='del'>-  is provided.</div><div class='del'>-</div><div class='del'>-    inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR</div><div class='del'>-  if no more input was provided, Z_DATA_ERROR if no marker has been found,</div><div class='del'>-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success</div><div class='del'>-  case, the application may save the current current value of total_in which</div><div class='del'>-  indicates where valid compressed data was found. In the error case, the</div><div class='del'>-  application may repeatedly call inflateSync, providing more input each time,</div><div class='del'>-  until success or end of the input data.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT inflateReset OF((z_streamp strm));</div><div class='del'>-/*</div><div class='del'>-     This function is equivalent to inflateEnd followed by inflateInit,</div><div class='del'>-   but does not free and reallocate all the internal decompression state.</div><div class='del'>-   The stream will keep attributes that may have been set by inflateInit2.</div><div class='del'>-</div><div class='del'>-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source</div><div class='del'>-   stream state was inconsistent (such as zalloc or state being NULL).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int inflateIncomp OF((z_stream *strm));</div><div class='del'>-/*</div><div class='del'>-     This function adds the data at next_in (avail_in bytes) to the output</div><div class='del'>-   history without performing any output.  There must be no pending output,</div><div class='del'>-   and the decompressor must be expecting to see the start of a block.</div><div class='del'>-   Calling this function is equivalent to decompressing a stored block</div><div class='del'>-   containing the data at next_in (except that the data is not output).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-                        /* utility functions */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-     The following utility functions are implemented on top of the</div><div class='del'>-   basic stream-oriented functions. To simplify the interface, some</div><div class='del'>-   default options are assumed (compression level, window size,</div><div class='del'>-   standard memory allocation functions). The source code of these</div><div class='del'>-   utility functions can easily be modified if you need special options.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT compress OF((Bytef *dest,   uLongf *destLen,</div><div class='del'>-			       const Bytef *source, uLong sourceLen));</div><div class='del'>-/*</div><div class='del'>-     Compresses the source buffer into the destination buffer.  sourceLen is</div><div class='del'>-   the byte length of the source buffer. Upon entry, destLen is the total</div><div class='del'>-   size of the destination buffer, which must be at least 0.1% larger than</div><div class='del'>-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the</div><div class='del'>-   compressed buffer.</div><div class='del'>-     This function can be used to compress a whole file at once if the</div><div class='del'>-   input file is mmap'ed.</div><div class='del'>-     compress returns Z_OK if success, Z_MEM_ERROR if there was not</div><div class='del'>-   enough memory, Z_BUF_ERROR if there was not enough room in the output</div><div class='del'>-   buffer.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT uncompress OF((Bytef *dest,   uLongf *destLen,</div><div class='del'>-				 const Bytef *source, uLong sourceLen));</div><div class='del'>-/*</div><div class='del'>-     Decompresses the source buffer into the destination buffer.  sourceLen is</div><div class='del'>-   the byte length of the source buffer. Upon entry, destLen is the total</div><div class='del'>-   size of the destination buffer, which must be large enough to hold the</div><div class='del'>-   entire uncompressed data. (The size of the uncompressed data must have</div><div class='del'>-   been saved previously by the compressor and transmitted to the decompressor</div><div class='del'>-   by some mechanism outside the scope of this compression library.)</div><div class='del'>-   Upon exit, destLen is the actual size of the compressed buffer.</div><div class='del'>-     This function can be used to decompress a whole file at once if the</div><div class='del'>-   input file is mmap'ed.</div><div class='del'>-</div><div class='del'>-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not</div><div class='del'>-   enough memory, Z_BUF_ERROR if there was not enough room in the output</div><div class='del'>-   buffer, or Z_DATA_ERROR if the input data was corrupted.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef voidp gzFile;</div><div class='del'>-</div><div class='del'>-extern gzFile EXPORT gzopen  OF((const char *path, const char *mode));</div><div class='del'>-/*</div><div class='del'>-     Opens a gzip (.gz) file for reading or writing. The mode parameter</div><div class='del'>-   is as in fopen ("rb" or "wb") but can also include a compression level</div><div class='del'>-   ("wb9").  gzopen can be used to read a file which is not in gzip format;</div><div class='del'>-   in this case gzread will directly read from the file without decompression.</div><div class='del'>-     gzopen returns NULL if the file could not be opened or if there was</div><div class='del'>-   insufficient memory to allocate the (de)compression state; errno</div><div class='del'>-   can be checked to distinguish the two cases (if errno is zero, the</div><div class='del'>-   zlib error is Z_MEM_ERROR).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern gzFile EXPORT gzdopen  OF((int fd, const char *mode));</div><div class='del'>-/*</div><div class='del'>-     gzdopen() associates a gzFile with the file descriptor fd.  File</div><div class='del'>-   descriptors are obtained from calls like open, dup, creat, pipe or</div><div class='del'>-   fileno (in the file has been previously opened with fopen).</div><div class='del'>-   The mode parameter is as in gzopen.</div><div class='del'>-     The next call of gzclose on the returned gzFile will also close the</div><div class='del'>-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file</div><div class='del'>-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).</div><div class='del'>-     gzdopen returns NULL if there was insufficient memory to allocate</div><div class='del'>-   the (de)compression state.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));</div><div class='del'>-/*</div><div class='del'>-     Reads the given number of uncompressed bytes from the compressed file.</div><div class='del'>-   If the input file was not in gzip format, gzread copies the given number</div><div class='del'>-   of bytes into the buffer.</div><div class='del'>-     gzread returns the number of uncompressed bytes actually read (0 for</div><div class='del'>-   end of file, -1 for error). */</div><div class='del'>-</div><div class='del'>-extern int EXPORT    gzwrite OF((gzFile file, const voidp buf, unsigned len));</div><div class='del'>-/*</div><div class='del'>-     Writes the given number of uncompressed bytes into the compressed file.</div><div class='del'>-   gzwrite returns the number of uncompressed bytes actually written</div><div class='del'>-   (0 in case of error).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT    gzflush OF((gzFile file, int flush));</div><div class='del'>-/*</div><div class='del'>-     Flushes all pending output into the compressed file. The parameter</div><div class='del'>-   flush is as in the deflate() function. The return value is the zlib</div><div class='del'>-   error number (see function gzerror below). gzflush returns Z_OK if</div><div class='del'>-   the flush parameter is Z_FINISH and all output could be flushed.</div><div class='del'>-     gzflush should be called only when strictly necessary because it can</div><div class='del'>-   degrade compression.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern int EXPORT    gzclose OF((gzFile file));</div><div class='del'>-/*</div><div class='del'>-     Flushes all pending output if necessary, closes the compressed file</div><div class='del'>-   and deallocates all the (de)compression state. The return value is the zlib</div><div class='del'>-   error number (see function gzerror below).</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern const char * EXPORT gzerror OF((gzFile file, int *errnum));</div><div class='del'>-/*</div><div class='del'>-     Returns the error message for the last error which occurred on the</div><div class='del'>-   given compressed file. errnum is set to zlib error number. If an</div><div class='del'>-   error occurred in the file system and not in the compression library,</div><div class='del'>-   errnum is set to Z_ERRNO and the application may consult errno</div><div class='del'>-   to get the exact error code.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-                        /* checksum functions */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-     These functions are not related to compression but are exported</div><div class='del'>-   anyway because they might be useful in applications using the</div><div class='del'>-   compression library.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and</div><div class='del'>-   return the updated checksum. If buf is NULL, this function returns</div><div class='del'>-   the required initial value for the checksum.</div><div class='del'>-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed</div><div class='del'>-   much faster. Usage example:</div><div class='del'>-</div><div class='del'>-     uLong adler = adler32(0L, Z_NULL, 0);</div><div class='del'>-</div><div class='del'>-     while (read_buffer(buffer, length) != EOF) {</div><div class='del'>-       adler = adler32(adler, buffer, length);</div><div class='del'>-     }</div><div class='del'>-     if (adler != original_adler) error();</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-extern uLong EXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));</div><div class='del'>-/*</div><div class='del'>-     Update a running crc with the bytes buf[0..len-1] and return the updated</div><div class='del'>-   crc. If buf is NULL, this function returns the required initial value</div><div class='del'>-   for the crc. Pre- and post-conditioning (one's complement) is performed</div><div class='del'>-   within this function so it shouldn't be done by the application.</div><div class='del'>-   Usage example:</div><div class='del'>-</div><div class='del'>-     uLong crc = crc32(0L, Z_NULL, 0);</div><div class='del'>-</div><div class='del'>-     while (read_buffer(buffer, length) != EOF) {</div><div class='del'>-       crc = crc32(crc, buffer, length);</div><div class='del'>-     }</div><div class='del'>-     if (crc != original_crc) error();</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-                        /* various hacks, don't look :) */</div><div class='del'>-</div><div class='del'>-/* deflateInit and inflateInit are macros to allow checking the zlib version</div><div class='del'>- * and the compiler's view of z_stream:</div><div class='del'>- */</div><div class='del'>-extern int EXPORT deflateInit_ OF((z_streamp strm, int level,</div><div class='del'>-			           const char *version, int stream_size));</div><div class='del'>-extern int EXPORT inflateInit_ OF((z_streamp strm,</div><div class='del'>-				   const char *version, int stream_size));</div><div class='del'>-extern int EXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,</div><div class='del'>-				    int windowBits, int memLevel, int strategy,</div><div class='del'>-				    const char *version, int stream_size));</div><div class='del'>-extern int EXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,</div><div class='del'>-				    const char *version, int stream_size));</div><div class='del'>-#define deflateInit(strm, level) \</div><div class='del'>-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))</div><div class='del'>-#define inflateInit(strm) \</div><div class='del'>-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))</div><div class='del'>-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \</div><div class='del'>-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\</div><div class='del'>-		      (strategy),           ZLIB_VERSION, sizeof(z_stream))</div><div class='del'>-#define inflateInit2(strm, windowBits) \</div><div class='del'>-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))</div><div class='del'>-</div><div class='del'>-#if !defined(_Z_UTIL_H) &amp;&amp; !defined(NO_DUMMY_DECL)</div><div class='del'>-    struct internal_state {int dummy;}; /* hack for buggy compilers */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */</div><div class='del'>-</div><div class='del'>-#ifdef __cplusplus</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _ZLIB_H */</div><div class='del'>-/* --- zlib.h */</div><div class='head'>diff --git a/mdk-stage1/ppp/configure b/mdk-stage1/ppp/configure<br/>deleted file mode 100755<br/>index 544fb0d71..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/configure?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/configure</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,141 +0,0 @@</div><div class='del'>-#!/bin/sh</div><div class='del'>-# $Id$</div><div class='del'>-</div><div class='del'>-#  if [ -d /NextApps ]; then</div><div class='del'>-#    system="NeXTStep"</div><div class='del'>-#  else</div><div class='del'>-  system=`uname -s`</div><div class='del'>-  release=`uname -r`</div><div class='del'>-  machine=`uname -p`</div><div class='del'>-  arch=`uname -m`</div><div class='del'>-#  fi</div><div class='del'>-state="unknown"</div><div class='del'>-</div><div class='del'>-case $system in</div><div class='del'>-  Linux)</div><div class='del'>-    makext="linux";</div><div class='del'>-    ksrc="linux";</div><div class='del'>-    state="known";;</div><div class='del'>-  SunOS)</div><div class='del'>-    case $release in</div><div class='del'>-#      [0-3]*)	state="ancient";;</div><div class='del'>-#      4*)	state="known"; ksrc="sunos4"; makext="sunos4";;</div><div class='del'>-      5.[1-6]*)	state="known"; ksrc="solaris"; makext="sol2";;</div><div class='del'>-      5.[7-9]*)	state="known"; ksrc="solaris"; makext="sol2";</div><div class='del'>-              case $arch in</div><div class='del'>-		sun4u)	lp64='y';;</div><div class='del'>-		*)	;;</div><div class='del'>-	      esac;;</div><div class='del'>-    esac;;</div><div class='del'>-    NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V)</div><div class='del'>-      state="notincluded";;</div><div class='del'>-#    NetBSD)</div><div class='del'>-#      makext="bsd";</div><div class='del'>-#      case $release in</div><div class='del'>-#        0.*)	state="ancient";;</div><div class='del'>-#        1.0*)	state="ancient";;</div><div class='del'>-#        1.1*)	state="known"; ksrc="netbsd-1.1";;</div><div class='del'>-#        1.2*)	state="known"; ksrc="netbsd-1.2"; makext="netbsd-1.2";;</div><div class='del'>-#        1.[3-9]*|[2-9]*)</div><div class='del'>-#  		state="late"; ksrc="netbsd-1.2";;</div><div class='del'>-#      esac;;</div><div class='del'>-#    ULTRIX)</div><div class='del'>-#      makext="ultrix";</div><div class='del'>-#      case $release in</div><div class='del'>-#        [0-3]*)	state="ancient";;</div><div class='del'>-#        4.[01]*)	state="early"; ksrc="ultrix";;</div><div class='del'>-#        4.[234])	state="known"; ksrc="ultrix";;</div><div class='del'>-#      esac;;</div><div class='del'>-#    OSF1)</div><div class='del'>-#      makext="osf";</div><div class='del'>-#      case $release in</div><div class='del'>-#        V1.*)   state="neolithic"; ksrc="osf1";;</div><div class='del'>-#        V[23].*)	state="neolithic"; ksrc="osf1";;</div><div class='del'>-#        V4.*)	state="known"; ksrc="osf1";;</div><div class='del'>-#        V[5-9]*) state="late"; ksrc="osf1";;</div><div class='del'>-#      esac;;</div><div class='del'>-#    FreeBSD)</div><div class='del'>-#      makext="bsd";</div><div class='del'>-#      case $release in</div><div class='del'>-#        1.*)	state="known"; ksrc="freebsd-old";;</div><div class='del'>-#        2.[01]*)	state="known"; ksrc="freebsd-2.0";;</div><div class='del'>-#        2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";;</div><div class='del'>-#        2.2.8*)   state="known"; ksrc="freebsd-2.2.8";;</div><div class='del'>-#        3.[0-1]*)	state="known"; ksrc="freebsd-3.0";;</div><div class='del'>-#      esac;;</div><div class='del'>-#    NeXTStep)</div><div class='del'>-#      makext="NeXT";</div><div class='del'>-#      ksrc="NeXT";</div><div class='del'>-#      state="known";;</div><div class='del'>-#    SINIX-?)</div><div class='del'>-#      case $release in</div><div class='del'>-#        5.4[01]) state=known; ksrc=svr4; makext=svr4;;</div><div class='del'>-#        5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;</div><div class='del'>-#      esac;;</div><div class='del'>-#    # Intel SVR4 systems come with a bug in the uname program.  Unless</div><div class='del'>-#    # your provider fixed the bug, or you get a fix for it, uname -S will</div><div class='del'>-#    # overwrite the system name with the node name!</div><div class='del'>-#    UNIX_SV|UNIX_System_V|`uname -n`)</div><div class='del'>-#      case $release in</div><div class='del'>-#        4.0) state=known; ksrc=svr4; makext=svr4;;</div><div class='del'>-#        4.2) state=late; ksrc=svr4; makext=svr4;;</div><div class='del'>-#      esac;;</div><div class='del'>-esac</div><div class='del'>-</div><div class='del'>-if [ -d "$ksrc" ]; then :; else</div><div class='del'>-  state="notincluded"</div><div class='del'>-  unset ksrc</div><div class='del'>-fi</div><div class='del'>-</div><div class='del'>-case $state in</div><div class='del'>-  neolithic) </div><div class='del'>-    echo "This is a newer release on an outdated OS ($system)."</div><div class='del'>-    echo " This software may or may not work on this OS."</div><div class='del'>-    echo " You may want to download an older version of PPP for this OS.";;</div><div class='del'>-  ancient)</div><div class='del'>-    echo "This is an old release of a supported OS ($system)."</div><div class='del'>-    echo "This software cannot be used as-is on this system,"</div><div class='del'>-    echo "but you may be able to port it.  Good luck!"</div><div class='del'>-    exit;;</div><div class='del'>-  early)</div><div class='del'>-    echo "This is an old release of a supported OS ($system)."</div><div class='del'>-    echo "This software should install and run on this system,"</div><div class='del'>-    echo "but it hasn't been tested.";;</div><div class='del'>-  late)</div><div class='del'>-    echo "This is a newer release of $system than is supported by"</div><div class='del'>-    echo "this software.  It may or may not work.";;</div><div class='del'>-  unknown)</div><div class='del'>-    echo "This software has not been ported to this system.  Sorry.";;</div><div class='del'>-  notincluded)</div><div class='del'>-    echo "Support for this system has not been included"</div><div class='del'>-    echo "in this distribution.  Sorry.";;</div><div class='del'>-esac</div><div class='del'>-</div><div class='del'>-orig_makext=$makext</div><div class='del'>-</div><div class='del'>-if [ -d "$ksrc" ]; then</div><div class='del'>-  echo "Creating links to Makefiles."</div><div class='del'>-  rm -f Makefile</div><div class='del'>-  ln -s $ksrc/Makefile.top Makefile</div><div class='del'>-  echo "  Makefile -&gt; $ksrc/Makefile.top"</div><div class='del'>-  if [ "$ksrc" = solaris ]; then</div><div class='del'>-    # Point to 64-bit Makefile extension</div><div class='del'>-    if [ "$lp64" = y ]; then </div><div class='del'>-      makext=$makext-64 </div><div class='del'>-    fi</div><div class='del'>-    rm -f $ksrc/Makefile</div><div class='del'>-    ln -s Makefile.$makext $ksrc/Makefile</div><div class='del'>-    echo "  $ksrc/Makefile -&gt; Makefile.$makext"</div><div class='del'>-    # Restore extension</div><div class='del'>-    if [ "$lp64" = y ]; then </div><div class='del'>-      makext=$orig_makext </div><div class='del'>-    fi</div><div class='del'>-  fi</div><div class='del'>-  for dir in pppd pppstats chat pppdump; do</div><div class='del'>-    rm -f $dir/Makefile</div><div class='del'>-    if [ -f $dir/Makefile.$makext ]; then</div><div class='del'>-      ln -s Makefile.$makext $dir/Makefile</div><div class='del'>-      echo "  $dir/Makefile -&gt; Makefile.$makext"</div><div class='del'>-    fi</div><div class='del'>-  done</div><div class='del'>-fi</div><div class='head'>diff --git a/mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux b/mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux<br/>deleted file mode 100644<br/>index 7eb217dac..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/contrib/pppgetpass/Makefile.linux</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,16 +0,0 @@</div><div class='del'>-all: pppgetpass.vt pppgetpass.gtk</div><div class='del'>-</div><div class='del'>-pppgetpass.vt: pppgetpass.vt.o</div><div class='del'>-</div><div class='del'>-pppgetpass.gtk: pppgetpass.gtk.o</div><div class='del'>-	$(CC) $(LDFLAGS) pppgetpass.gtk.o `gtk-config --libs` -o pppgetpass.gtk</div><div class='del'>-pppgetpass.gtk.o: pppgetpass.gtk.c</div><div class='del'>-	$(CC) $(CFLAGS) -c pppgetpass.gtk.c `gtk-config --cflags`</div><div class='del'>-</div><div class='del'>-install: all</div><div class='del'>-	install -m 755 pppgetpass.sh /usr/bin/pppgetpass</div><div class='del'>-	install -m 4755 -o root -g root pppgetpass.vt /usr/bin/</div><div class='del'>-	install -m 755 -o root -g root pppgetpass.gtk /usr/X11/bin/</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o pppgetpass.gtk pppgetpass.vt core</div><div class='head'>diff --git a/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8 b/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8<br/>deleted file mode 100644<br/>index ade576970..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.8</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,18 +0,0 @@</div><div class='del'>-.TH PPPGETPASS 8 "26 Sep 1999"</div><div class='del'>-.SH NAME</div><div class='del'>-pppgetpass \- prompt for PAP password</div><div class='del'>-.SH SYNOPSIS</div><div class='del'>-.B pppgetpass</div><div class='del'>-.I client server fd</div><div class='del'>-.SH DESCRIPTION</div><div class='del'>-.B pppgetpass</div><div class='del'>-the outer half of a plugin for PAP password prompting in pppd.</div><div class='del'>-If the peer requires PAP, and the</div><div class='del'>-.B passprompt.so</div><div class='del'>-plugin is loaded into pppd, it will run</div><div class='del'>-.B /usr/sbin/pppgetpass</div><div class='del'>-(or another program specified by the</div><div class='del'>-.B promptprog</div><div class='del'>-option) to prompt the user for the password.</div><div class='del'>-.SH SEE ALSO</div><div class='del'>-pppd(8)</div><div class='head'>diff --git a/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c b/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c<br/>deleted file mode 100644<br/>index 48ca04202..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.gtk.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,92 +0,0 @@</div><div class='del'>-#include &lt;glib.h&gt;</div><div class='del'>-#include &lt;gdk/gdk.h&gt;</div><div class='del'>-#include &lt;gtk/gtkwindow.h&gt;</div><div class='del'>-#include &lt;gtk/gtkmain.h&gt;</div><div class='del'>-#include &lt;gtk/gtkbutton.h&gt;</div><div class='del'>-#include &lt;gtk/gtkvbox.h&gt;</div><div class='del'>-#include &lt;gtk/gtklabel.h&gt;</div><div class='del'>-#include &lt;gtk/gtkentry.h&gt;</div><div class='del'>-#include &lt;gtk/gtksignal.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-</div><div class='del'>-int outfd;</div><div class='del'>-int err;</div><div class='del'>-</div><div class='del'>-static void okpressed(void *widget, void *clientdata)</div><div class='del'>-{</div><div class='del'>-  GtkWidget *answer=clientdata;</div><div class='del'>-  gchar *pass;</div><div class='del'>-  int passlen;</div><div class='del'>-  ssize_t wrote;</div><div class='del'>-  (void)widget;</div><div class='del'>-</div><div class='del'>-  pass=gtk_entry_get_text(GTK_ENTRY(answer));</div><div class='del'>-</div><div class='del'>-  passlen=strlen(pass);</div><div class='del'>-  if(!passlen)</div><div class='del'>-    return;</div><div class='del'>-</div><div class='del'>-  if((wrote=write(outfd, pass, passlen))!=passlen) {</div><div class='del'>-    if(wrote&lt;0)</div><div class='del'>-      syslog(LOG_ERR, "write error on outpipe: %m");</div><div class='del'>-    else</div><div class='del'>-      syslog(LOG_ERR, "short write on outpipe");</div><div class='del'>-    err=1;</div><div class='del'>-  }</div><div class='del'>-  gtk_main_quit();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int main(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-  GtkWidget *mainwindow, *vbox, *question, *answer, *ok;</div><div class='del'>-  char buf[1024];</div><div class='del'>-  gtk_init(&amp;argc, &amp;argv);</div><div class='del'>-</div><div class='del'>-  openlog(argv[0], LOG_PID, LOG_DAEMON);</div><div class='del'>-  if(argc!=4) {</div><div class='del'>-    syslog(LOG_WARNING, "Usage error");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  outfd=atoi(argv[3]);</div><div class='del'>-  mainwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);</div><div class='del'>-  gtk_window_set_title(GTK_WINDOW(mainwindow), "pppgetpass");</div><div class='del'>-  gtk_signal_connect(GTK_OBJECT(mainwindow), "destroy",</div><div class='del'>-                     GTK_SIGNAL_FUNC(gtk_main_quit), 0);</div><div class='del'>-</div><div class='del'>-  vbox=gtk_vbox_new(FALSE, 5);</div><div class='del'>-  gtk_container_add(GTK_CONTAINER(mainwindow), vbox);</div><div class='del'>-  gtk_widget_show(vbox);</div><div class='del'>-</div><div class='del'>-  if(argv[1][0] &amp;&amp; argv[2][0])</div><div class='del'>-    snprintf(buf, sizeof buf, "Password for PPP client %s on server %s: ", argv[1], argv[2]);</div><div class='del'>-  else if(argv[1][0] &amp;&amp; !argv[2][0])</div><div class='del'>-    snprintf(buf, sizeof buf, "Password for PPP client %s: ", argv[1]);</div><div class='del'>-  else if(!argv[1][0] &amp;&amp; argv[2][0])</div><div class='del'>-    snprintf(buf, sizeof buf, "Password for PPP on server %s: ", argv[2]);</div><div class='del'>-  else</div><div class='del'>-    snprintf(buf, sizeof buf, "Enter PPP password: ");</div><div class='del'>-  question=gtk_label_new(buf);</div><div class='del'>-  gtk_box_pack_start(GTK_BOX(vbox), question, FALSE, TRUE, 0);</div><div class='del'>-  gtk_widget_show(question);</div><div class='del'>-</div><div class='del'>-  answer=gtk_entry_new();</div><div class='del'>-  gtk_entry_set_visibility(GTK_ENTRY(answer), 0);</div><div class='del'>-  gtk_box_pack_start(GTK_BOX(vbox), answer, FALSE, TRUE, 0);</div><div class='del'>-  gtk_widget_show(answer);</div><div class='del'>-</div><div class='del'>-  ok=gtk_button_new_with_label("OK");</div><div class='del'>-  gtk_box_pack_start(GTK_BOX(vbox), ok, FALSE, TRUE, 0);</div><div class='del'>-  gtk_signal_connect(GTK_OBJECT(ok), "clicked",</div><div class='del'>-                     GTK_SIGNAL_FUNC(okpressed), answer);</div><div class='del'>-  gtk_widget_show(ok);</div><div class='del'>-</div><div class='del'>-  gtk_widget_show(mainwindow);</div><div class='del'>-  gtk_main();</div><div class='del'>-</div><div class='del'>-  return err;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh b/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh<br/>deleted file mode 100644<br/>index 09c480519..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.sh</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,7 +0,0 @@</div><div class='del'>-#!/bin/sh</div><div class='del'>-</div><div class='del'>-if [ -z "$DISPLAY" ]; then</div><div class='del'>-  exec pppgetpass.vt "$@"</div><div class='del'>-else</div><div class='del'>-  exec pppgetpass.gtk "$@"</div><div class='del'>-fi</div><div class='head'>diff --git a/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c b/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c<br/>deleted file mode 100644<br/>index a1520883c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/contrib/pppgetpass/pppgetpass.vt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,218 +0,0 @@</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;sys/vt.h&gt;</div><div class='del'>-</div><div class='del'>-static int console_owner(uid_t, int);</div><div class='del'>-</div><div class='del'>-int main(int argc, char **argv)</div><div class='del'>-{</div><div class='del'>-  int console;</div><div class='del'>-  uid_t uid;</div><div class='del'>-  struct vt_stat origstate;</div><div class='del'>-  int openvtnum;</div><div class='del'>-  char openvtname[256];</div><div class='del'>-  int openvt;</div><div class='del'>-  gid_t gid;</div><div class='del'>-  int chowned;</div><div class='del'>-  FILE *fp;</div><div class='del'>-  struct termios t;</div><div class='del'>-  char pass[256], *nl;</div><div class='del'>-  int outfd, passlen;</div><div class='del'>-  ssize_t wrote;</div><div class='del'>-  console=open("/dev/console", O_RDWR);</div><div class='del'>-</div><div class='del'>-  uid=getuid();</div><div class='del'>-  gid=getgid();</div><div class='del'>-  seteuid(uid);</div><div class='del'>-</div><div class='del'>-  openlog(argv[0], LOG_PID, LOG_DAEMON);</div><div class='del'>-</div><div class='del'>-  if(argc!=4) {</div><div class='del'>-    syslog(LOG_WARNING, "Usage error");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(console&lt;0) {</div><div class='del'>-    syslog(LOG_ERR, "open(/dev/console): %m");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(ioctl(console, VT_GETSTATE, &amp;origstate)&lt;0) {</div><div class='del'>-    syslog(LOG_ERR, "VT_GETSTATE: %m");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(uid) {</div><div class='del'>-    if(!console_owner(uid, origstate.v_active)) {</div><div class='del'>-      int i;</div><div class='del'>-      for(i=0;i&lt;64;++i) {</div><div class='del'>-        if(i!=origstate.v_active &amp;&amp; console_owner(uid, i))</div><div class='del'>-          break;</div><div class='del'>-      }</div><div class='del'>-      if(i==64) {</div><div class='del'>-        syslog(LOG_WARNING, "run by uid %lu not at console", (unsigned long)uid);</div><div class='del'>-        return 1;</div><div class='del'>-      }</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(ioctl(console, VT_OPENQRY, &amp;openvtnum)&lt;0) {</div><div class='del'>-    syslog(LOG_ERR, "VT_OPENQRY: %m");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  if(openvtnum==-1) {</div><div class='del'>-    syslog(LOG_ERR, "No free VTs");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  snprintf(openvtname, sizeof openvtname, "/dev/tty%d", openvtnum);</div><div class='del'>-  seteuid(0);</div><div class='del'>-  openvt=open(openvtname, O_RDWR);</div><div class='del'>-  if(openvt&lt;0) {</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "open(%s): %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  chowned=fchown(openvt, uid, gid);</div><div class='del'>-  if(chowned&lt;0) {</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "fchown(%s): %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  close(console);</div><div class='del'>-</div><div class='del'>-  if(ioctl(openvt, VT_ACTIVATE, openvtnum)&lt;0) {</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "VT_ACTIVATE(%d): %m", openvtnum);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  while(ioctl(openvt, VT_WAITACTIVE, openvtnum)&lt;0) {</div><div class='del'>-    if(errno!=EINTR) {</div><div class='del'>-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-      seteuid(uid);</div><div class='del'>-      syslog(LOG_ERR, "VT_WAITACTIVE(%d): %m", openvtnum);</div><div class='del'>-      return 1;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  seteuid(uid);</div><div class='del'>-  fp=fdopen(openvt, "r+");</div><div class='del'>-  if(!fp) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "fdopen(%s): %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(tcgetattr(openvt, &amp;t)&lt;0) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "tcgetattr(%s): %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  t.c_lflag &amp;= ~ECHO;</div><div class='del'>-  if(tcsetattr(openvt, TCSANOW, &amp;t)&lt;0) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "tcsetattr(%s): %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(fprintf(fp, "\033[2J\033[H")&lt;0) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    syslog(LOG_ERR, "write error on %s: %m", openvtname);</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  if(argv[1][0] &amp;&amp; argv[2][0]) {</div><div class='del'>-    if(fprintf(fp, "Password for PPP client %s on server %s: ", argv[1], argv[2])&lt;0) {</div><div class='del'>-      seteuid(0);</div><div class='del'>-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-      seteuid(uid);</div><div class='del'>-      syslog(LOG_ERR, "write error on %s: %m", openvtname);</div><div class='del'>-      return 1;</div><div class='del'>-    }</div><div class='del'>-  } else if(argv[1][0] &amp;&amp; !argv[2][0]) {</div><div class='del'>-    if(fprintf(fp, "Password for PPP client %s: ", argv[1])&lt;0) {</div><div class='del'>-      syslog(LOG_ERR, "write error on %s: %m", openvtname);</div><div class='del'>-      seteuid(0);</div><div class='del'>-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-      seteuid(uid);</div><div class='del'>-      return 1;</div><div class='del'>-    }</div><div class='del'>-  } else if(!argv[1][0] &amp;&amp; argv[2][0]) {</div><div class='del'>-    if(fprintf(fp, "Password for PPP on server %s: ", argv[2])&lt;0) {</div><div class='del'>-      seteuid(0);</div><div class='del'>-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-      seteuid(uid);</div><div class='del'>-      syslog(LOG_ERR, "write error on %s: %m", openvtname);</div><div class='del'>-      return 1;</div><div class='del'>-    }</div><div class='del'>-  } else {</div><div class='del'>-    if(fprintf(fp, "Enter PPP password: ")&lt;0) {</div><div class='del'>-      seteuid(0);</div><div class='del'>-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-      seteuid(uid);</div><div class='del'>-      syslog(LOG_ERR, "write error on %s: %m", openvtname);</div><div class='del'>-      return 1;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  if(!fgets(pass, sizeof pass, fp)) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    if(ferror(fp)) {</div><div class='del'>-      syslog(LOG_ERR, "read error on %s: %m", openvtname);</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-  if((nl=strchr(pass, '\n'))) </div><div class='del'>-    *nl=0;</div><div class='del'>-  passlen=strlen(pass);</div><div class='del'>-  </div><div class='del'>-  outfd=atoi(argv[3]);</div><div class='del'>-  if((wrote=write(outfd, pass, passlen))!=passlen) {</div><div class='del'>-    seteuid(0);</div><div class='del'>-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-    seteuid(uid);</div><div class='del'>-    if(wrote&lt;0)</div><div class='del'>-      syslog(LOG_ERR, "write error on outpipe: %m");</div><div class='del'>-    else</div><div class='del'>-      syslog(LOG_ERR, "short write on outpipe");</div><div class='del'>-    return 1;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  seteuid(0);</div><div class='del'>-  ioctl(openvt, VT_ACTIVATE, origstate.v_active);</div><div class='del'>-  seteuid(uid);</div><div class='del'>-  return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int console_owner(uid_t uid, int cons)</div><div class='del'>-{</div><div class='del'>-  char name[256];</div><div class='del'>-  struct stat st;</div><div class='del'>-  snprintf(name, sizeof name, "/dev/tty%d", cons);</div><div class='del'>-  if(stat(name, &amp;st)&lt;0) {</div><div class='del'>-    if(errno!=ENOENT)</div><div class='del'>-      syslog(LOG_ERR, "stat(%s): %m", name);</div><div class='del'>-    return 0;</div><div class='del'>-  }</div><div class='del'>-  return uid==st.st_uid;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/etc.ppp/chap-secrets b/mdk-stage1/ppp/etc.ppp/chap-secrets<br/>deleted file mode 100644<br/>index 7d1c3cd7c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/etc.ppp/chap-secrets?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/etc.ppp/chap-secrets</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2 +0,0 @@</div><div class='del'>-# Secrets for authentication using CHAP</div><div class='del'>-# client	server	secret			IP addresses</div><div class='head'>diff --git a/mdk-stage1/ppp/etc.ppp/options b/mdk-stage1/ppp/etc.ppp/options<br/>deleted file mode 100644<br/>index 0f77a9aa0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/etc.ppp/options?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/etc.ppp/options</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,5 +0,0 @@</div><div class='del'>-lock</div><div class='del'>-noauth</div><div class='del'>-noipdefault</div><div class='del'>-usepeerdns</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/etc.ppp/options.options b/mdk-stage1/ppp/etc.ppp/options.options<br/>deleted file mode 100644<br/>index 4b67b6a0d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/etc.ppp/options.options?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/etc.ppp/options.options</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1 +0,0 @@</div><div class='del'>-lock</div><div class='head'>diff --git a/mdk-stage1/ppp/etc.ppp/pap-secrets b/mdk-stage1/ppp/etc.ppp/pap-secrets<br/>deleted file mode 100644<br/>index f8b7dce3c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/etc.ppp/pap-secrets?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/etc.ppp/pap-secrets</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2 +0,0 @@</div><div class='del'>-# Secrets for authentication using PAP</div><div class='del'>-# client	server	secret			IP addresses</div><div class='head'>diff --git a/mdk-stage1/ppp/include/linux/if_ppp.h b/mdk-stage1/ppp/include/linux/if_ppp.h<br/>deleted file mode 100644<br/>index 1febf0931..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/linux/if_ppp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/linux/if_ppp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,155 +0,0 @@</div><div class='del'>-/*	$Id$	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * if_ppp.h - Point-to-Point Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ==FILEVERSION 20000724==</div><div class='del'>- *</div><div class='del'>- *  NOTE TO MAINTAINERS:</div><div class='del'>- *     If you modify this file at all, please set the above date.</div><div class='del'>- *     if_ppp.h is shipped with a PPP distribution as well as with the kernel;</div><div class='del'>- *     if everyone increases the FILEVERSION number above, then scripts</div><div class='del'>- *     can do the right thing when deciding whether to install a new if_ppp.h</div><div class='del'>- *     file.  Don't change the format of that line otherwise, so the</div><div class='del'>- *     installation script can recognize it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _IF_PPP_H_</div><div class='del'>-#define _IF_PPP_H_</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Packet sizes</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define	PPP_MTU		1500	/* Default MTU (size of Info field) */</div><div class='del'>-#define PPP_MAXMRU	65000	/* Largest MRU we allow */</div><div class='del'>-#define PROTO_IPX	0x002b	/* protocol numbers */</div><div class='del'>-#define PROTO_DNA_RT    0x0027  /* DNA Routing */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Bit definitions for flags.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define SC_COMP_PROT	0x00000001	/* protocol compression (output) */</div><div class='del'>-#define SC_COMP_AC	0x00000002	/* header compression (output) */</div><div class='del'>-#define	SC_COMP_TCP	0x00000004	/* TCP (VJ) compression (output) */</div><div class='del'>-#define SC_NO_TCP_CCID	0x00000008	/* disable VJ connection-id comp. */</div><div class='del'>-#define SC_REJ_COMP_AC	0x00000010	/* reject adrs/ctrl comp. on input */</div><div class='del'>-#define SC_REJ_COMP_TCP	0x00000020	/* reject TCP (VJ) comp. on input */</div><div class='del'>-#define SC_CCP_OPEN	0x00000040	/* Look at CCP packets */</div><div class='del'>-#define SC_CCP_UP	0x00000080	/* May send/recv compressed packets */</div><div class='del'>-#define SC_ENABLE_IP	0x00000100	/* IP packets may be exchanged */</div><div class='del'>-#define SC_LOOP_TRAFFIC	0x00000200	/* send traffic to pppd */</div><div class='del'>-#define SC_MULTILINK	0x00000400	/* do multilink encapsulation */</div><div class='del'>-#define SC_MP_SHORTSEQ	0x00000800	/* use short MP sequence numbers */</div><div class='del'>-#define SC_COMP_RUN	0x00001000	/* compressor has been inited */</div><div class='del'>-#define SC_DECOMP_RUN	0x00002000	/* decompressor has been inited */</div><div class='del'>-#define SC_MP_XSHORTSEQ	0x00004000	/* transmit short MP seq numbers */</div><div class='del'>-#define SC_DEBUG	0x00010000	/* enable debug messages */</div><div class='del'>-#define SC_LOG_INPKT	0x00020000	/* log contents of good pkts recvd */</div><div class='del'>-#define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */</div><div class='del'>-#define SC_LOG_RAWIN	0x00080000	/* log all chars received */</div><div class='del'>-#define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */</div><div class='del'>-#define	SC_SYNC		0x00200000	/* synchronous serial mode */</div><div class='del'>-#define	SC_MASK		0x0f200fff	/* bits that user can change */</div><div class='del'>-</div><div class='del'>-/* state bits */</div><div class='del'>-#define SC_XMIT_BUSY	0x10000000	/* (used by isdn_ppp?) */</div><div class='del'>-#define SC_RCV_ODDP	0x08000000	/* have rcvd char with odd parity */</div><div class='del'>-#define SC_RCV_EVNP	0x04000000	/* have rcvd char with even parity */</div><div class='del'>-#define SC_RCV_B7_1	0x02000000	/* have rcvd char with bit 7 = 1 */</div><div class='del'>-#define SC_RCV_B7_0	0x01000000	/* have rcvd char with bit 7 = 0 */</div><div class='del'>-#define SC_DC_FERROR	0x00800000	/* fatal decomp error detected */</div><div class='del'>-#define SC_DC_ERROR	0x00400000	/* non-fatal decomp error detected */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ioctl definitions.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct npioctl {</div><div class='del'>-	int		protocol;	/* PPP protocol, e.g. PPP_IP */</div><div class='del'>-	enum NPmode	mode;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */</div><div class='del'>-struct ppp_option_data {</div><div class='del'>-	__u8	*ptr;</div><div class='del'>-	__u32	length;</div><div class='del'>-	int	transmit;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ifpppstatsreq {</div><div class='del'>-	struct ifreq	 b;</div><div class='del'>-	struct ppp_stats stats;			/* statistic information */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ifpppcstatsreq {</div><div class='del'>-	struct ifreq	      b;</div><div class='del'>-	struct ppp_comp_stats stats;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define ifr__name       b.ifr_ifrn.ifrn_name</div><div class='del'>-#define stats_ptr       b.ifr_ifru.ifru_data</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ioctl definitions.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define	PPPIOCGFLAGS	_IOR('t', 90, int)	/* get configuration flags */</div><div class='del'>-#define	PPPIOCSFLAGS	_IOW('t', 89, int)	/* set configuration flags */</div><div class='del'>-#define	PPPIOCGASYNCMAP	_IOR('t', 88, int)	/* get async map */</div><div class='del'>-#define	PPPIOCSASYNCMAP	_IOW('t', 87, int)	/* set async map */</div><div class='del'>-#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */</div><div class='del'>-#define	PPPIOCGRASYNCMAP _IOR('t', 85, int)	/* get receive async map */</div><div class='del'>-#define	PPPIOCSRASYNCMAP _IOW('t', 84, int)	/* set receive async map */</div><div class='del'>-#define	PPPIOCGMRU	_IOR('t', 83, int)	/* get max receive unit */</div><div class='del'>-#define	PPPIOCSMRU	_IOW('t', 82, int)	/* set max receive unit */</div><div class='del'>-#define	PPPIOCSMAXCID	_IOW('t', 81, int)	/* set VJ max slot ID */</div><div class='del'>-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */</div><div class='del'>-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */</div><div class='del'>-#define PPPIOCXFERUNIT	_IO('t', 78)		/* transfer PPP unit */</div><div class='del'>-#define PPPIOCSCOMPRESS	_IOW('t', 77, struct ppp_option_data)</div><div class='del'>-#define PPPIOCGNPMODE	_IOWR('t', 76, struct npioctl) /* get NP mode */</div><div class='del'>-#define PPPIOCSNPMODE	_IOW('t', 75, struct npioctl)  /* set NP mode */</div><div class='del'>-#define PPPIOCSPASS	_IOW('t', 71, struct sock_fprog) /* set pass filter */</div><div class='del'>-#define PPPIOCSACTIVE	_IOW('t', 70, struct sock_fprog) /* set active filt */</div><div class='del'>-#define PPPIOCGDEBUG	_IOR('t', 65, int)	/* Read debug level */</div><div class='del'>-#define PPPIOCSDEBUG	_IOW('t', 64, int)	/* Set debug level */</div><div class='del'>-#define PPPIOCGIDLE	_IOR('t', 63, struct ppp_idle) /* get idle time */</div><div class='del'>-#define PPPIOCNEWUNIT	_IOWR('t', 62, int)	/* create new ppp unit */</div><div class='del'>-#define PPPIOCATTACH	_IOW('t', 61, int)	/* attach to ppp unit */</div><div class='del'>-#define PPPIOCDETACH	_IOW('t', 60, int)	/* detach from ppp unit/chan */</div><div class='del'>-#define PPPIOCSMRRU	_IOW('t', 59, int)	/* set multilink MRU */</div><div class='del'>-#define PPPIOCCONNECT	_IOW('t', 58, int)	/* connect channel to unit */</div><div class='del'>-#define PPPIOCDISCONN	_IO('t', 57)		/* disconnect channel */</div><div class='del'>-#define PPPIOCATTCHAN	_IOW('t', 56, int)	/* attach to ppp channel */</div><div class='del'>-#define PPPIOCGCHAN	_IOR('t', 55, int)	/* get ppp channel number */</div><div class='del'>-</div><div class='del'>-#define SIOCGPPPSTATS   (SIOCDEVPRIVATE + 0)</div><div class='del'>-#define SIOCGPPPVER     (SIOCDEVPRIVATE + 1)	/* NEVER change this!! */</div><div class='del'>-#define SIOCGPPPCSTATS  (SIOCDEVPRIVATE + 2)</div><div class='del'>-</div><div class='del'>-#if !defined(ifr_mtu)</div><div class='del'>-#define ifr_mtu	ifr_ifru.ifru_metric</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _IF_PPP_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/linux/if_pppvar.h b/mdk-stage1/ppp/include/linux/if_pppvar.h<br/>deleted file mode 100644<br/>index b2485cd9d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/linux/if_pppvar.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/linux/if_pppvar.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,138 +0,0 @@</div><div class='del'>-/*	From: if_pppvar.h,v 1.2 1995/06/12 11:36:51 paulus Exp */</div><div class='del'>-/*</div><div class='del'>- * if_pppvar.h - private structures and declarations for PPP.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ==FILEVERSION 990911==</div><div class='del'>- *</div><div class='del'>- *  NOTE TO MAINTAINERS:</div><div class='del'>- *   If you modify this file at all, please set the above date.</div><div class='del'>- *   if_pppvar.h is shipped with a PPP distribution as well as with the kernel;</div><div class='del'>- *   if everyone increases the FILEVERSION number above, then scripts</div><div class='del'>- *   can do the right thing when deciding whether to install a new if_pppvar.h</div><div class='del'>- *   file.  Don't change the format of that line otherwise, so the</div><div class='del'>- *   installation script can recognize it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Supported network protocols.  These values are used for</div><div class='del'>- * indexing sc_npmode.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NP_IP	0		/* Internet Protocol */</div><div class='del'>-#define NP_IPX	1		/* IPX protocol */</div><div class='del'>-#define NP_AT	2		/* Appletalk protocol */</div><div class='del'>-#define NP_IPV6	3		/* Internet Protocol */</div><div class='del'>-#define NUM_NP	4		/* Number of NPs. */</div><div class='del'>-</div><div class='del'>-#define OBUFSIZE	256	/* # chars of output buffering */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Structure describing each ppp unit.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct ppp {</div><div class='del'>-	int		magic;		/* magic value for structure	*/</div><div class='del'>-	struct ppp	*next;		/* unit with next index		*/</div><div class='del'>-	unsigned long	inuse;		/* are we allocated?		*/</div><div class='del'>-	int		line;		/* network interface unit #	*/</div><div class='del'>-	__u32		flags;		/* miscellaneous control flags	*/</div><div class='del'>-	int		mtu;		/* maximum xmit frame size	*/</div><div class='del'>-	int		mru;		/* maximum receive frame size	*/</div><div class='del'>-	struct slcompress *slcomp;	/* for TCP header compression	*/</div><div class='del'>-	struct sk_buff_head xmt_q;	/* frames to send from pppd	*/</div><div class='del'>-	struct sk_buff_head rcv_q;	/* frames for pppd to read	*/</div><div class='del'>-	unsigned long	xmit_busy;	/* bit 0 set when xmitter busy  */</div><div class='del'>-</div><div class='del'>-	/* Information specific to using ppp on async serial lines. */</div><div class='del'>-	struct tty_struct *tty;		/* ptr to TTY structure	*/</div><div class='del'>-	struct tty_struct *backup_tty;	/* TTY to use if tty gets closed */</div><div class='del'>-	__u8		escape;		/* 0x20 if prev char was PPP_ESC */</div><div class='del'>-	__u8		toss;		/* toss this frame		*/</div><div class='del'>-	volatile __u8	tty_pushing;	/* internal state flag		*/</div><div class='del'>-	volatile __u8	woke_up;	/* internal state flag		*/</div><div class='del'>-	__u32		xmit_async_map[8]; /* 1 bit means that given control </div><div class='del'>-					   character is quoted on output*/</div><div class='del'>-	__u32		recv_async_map; /* 1 bit means that given control </div><div class='del'>-					   character is ignored on input*/</div><div class='del'>-	__u32		bytes_sent;	/* Bytes sent on frame	*/</div><div class='del'>-	__u32		bytes_rcvd;	/* Bytes recvd on frame	*/</div><div class='del'>-</div><div class='del'>-	/* Async transmission information */</div><div class='del'>-	struct sk_buff	*tpkt;		/* frame currently being sent	*/</div><div class='del'>-	int		tpkt_pos;	/* how much of it we've done	*/</div><div class='del'>-	__u16		tfcs;		/* FCS so far for it		*/</div><div class='del'>-	unsigned char	*optr;		/* where we're up to in sending */</div><div class='del'>-	unsigned char	*olim;		/* points past last valid char	*/</div><div class='del'>-</div><div class='del'>-	/* Async reception information */</div><div class='del'>-	struct sk_buff	*rpkt;		/* frame currently being rcvd	*/</div><div class='del'>-	__u16		rfcs;		/* FCS so far of rpkt		*/</div><div class='del'>-</div><div class='del'>-	/* Queues for select() functionality */</div><div class='del'>-	struct wait_queue *read_wait;	/* queue for reading processes	*/</div><div class='del'>-</div><div class='del'>-	/* info for detecting idle channels */</div><div class='del'>-	unsigned long	last_xmit;	/* time of last transmission	*/</div><div class='del'>-	unsigned long	last_recv;	/* time last packet received    */</div><div class='del'>-</div><div class='del'>-	/* Statistic information */</div><div class='del'>-	struct pppstat	stats;		/* statistic information	*/</div><div class='del'>-</div><div class='del'>-	/* PPP compression protocol information */</div><div class='del'>-	struct	compressor *sc_xcomp;	/* transmit compressor */</div><div class='del'>-	void	*sc_xc_state;		/* transmit compressor state */</div><div class='del'>-	struct	compressor *sc_rcomp;	/* receive decompressor */</div><div class='del'>-	void	*sc_rc_state;		/* receive decompressor state */</div><div class='del'>-</div><div class='del'>-	enum	NPmode sc_npmode[NUM_NP]; /* what to do with each NP */</div><div class='del'>-	int	 sc_xfer;		/* PID of reserved PPP table */</div><div class='del'>-	char	name[8];		/* space for unit name */</div><div class='del'>-	struct device	dev;		/* net device structure */</div><div class='del'>-	struct enet_statistics estats;	/* more detailed stats */</div><div class='del'>-</div><div class='del'>-	/* tty output buffer */</div><div class='del'>-	unsigned char	obuf[OBUFSIZE];	/* buffer for characters to send */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define PPP_MAGIC	0x5002</div><div class='del'>-#define PPP_VERSION	"2.3.11"</div><div class='head'>diff --git a/mdk-stage1/ppp/include/linux/ppp-comp.h b/mdk-stage1/ppp/include/linux/ppp-comp.h<br/>deleted file mode 100644<br/>index 3184d0731..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/linux/ppp-comp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/linux/ppp-comp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,203 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp-comp.h - Definitions for doing PPP packet compression.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ==FILEVERSION 980319==</div><div class='del'>- *</div><div class='del'>- *  NOTE TO MAINTAINERS:</div><div class='del'>- *     If you modify this file at all, please set the above date.</div><div class='del'>- *     ppp-comp.h is shipped with a PPP distribution as well as with the kernel;</div><div class='del'>- *     if everyone increases the FILEVERSION number above, then scripts</div><div class='del'>- *     can do the right thing when deciding whether to install a new ppp-comp.h</div><div class='del'>- *     file.  Don't change the format of that line otherwise, so the</div><div class='del'>- *     installation script can recognize it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _NET_PPP_COMP_H</div><div class='del'>-#define _NET_PPP_COMP_H</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following symbols control whether we include code for</div><div class='del'>- * various compression methods.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef DO_BSD_COMPRESS</div><div class='del'>-#define DO_BSD_COMPRESS	1	/* by default, include BSD-Compress */</div><div class='del'>-#endif</div><div class='del'>-#ifndef DO_DEFLATE</div><div class='del'>-#define DO_DEFLATE	1	/* by default, include Deflate */</div><div class='del'>-#endif</div><div class='del'>-#define DO_PREDICTOR_1	0</div><div class='del'>-#define DO_PREDICTOR_2	0</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Structure giving methods for compression/decompression.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct compressor {</div><div class='del'>-	int	compress_proto;	/* CCP compression protocol number */</div><div class='del'>-</div><div class='del'>-	/* Allocate space for a compressor (transmit side) */</div><div class='del'>-	void	*(*comp_alloc) (unsigned char *options, int opt_len);</div><div class='del'>-</div><div class='del'>-	/* Free space used by a compressor */</div><div class='del'>-	void	(*comp_free) (void *state);</div><div class='del'>-</div><div class='del'>-	/* Initialize a compressor */</div><div class='del'>-	int	(*comp_init) (void *state, unsigned char *options,</div><div class='del'>-			      int opt_len, int unit, int opthdr, int debug);</div><div class='del'>-</div><div class='del'>-	/* Reset a compressor */</div><div class='del'>-	void	(*comp_reset) (void *state);</div><div class='del'>-</div><div class='del'>-	/* Compress a packet */</div><div class='del'>-	int     (*compress) (void *state, unsigned char *rptr,</div><div class='del'>-			      unsigned char *obuf, int isize, int osize);</div><div class='del'>-</div><div class='del'>-	/* Return compression statistics */</div><div class='del'>-	void	(*comp_stat) (void *state, struct compstat *stats);</div><div class='del'>-</div><div class='del'>-	/* Allocate space for a decompressor (receive side) */</div><div class='del'>-	void	*(*decomp_alloc) (unsigned char *options, int opt_len);</div><div class='del'>-</div><div class='del'>-	/* Free space used by a decompressor */</div><div class='del'>-	void	(*decomp_free) (void *state);</div><div class='del'>-</div><div class='del'>-	/* Initialize a decompressor */</div><div class='del'>-	int	(*decomp_init) (void *state, unsigned char *options,</div><div class='del'>-				int opt_len, int unit, int opthdr, int mru,</div><div class='del'>-				int debug);</div><div class='del'>-</div><div class='del'>-	/* Reset a decompressor */</div><div class='del'>-	void	(*decomp_reset) (void *state);</div><div class='del'>-</div><div class='del'>-	/* Decompress a packet. */</div><div class='del'>-	int	(*decompress) (void *state, unsigned char *ibuf, int isize,</div><div class='del'>-				unsigned char *obuf, int osize);</div><div class='del'>-</div><div class='del'>-	/* Update state for an incompressible packet received */</div><div class='del'>-	void	(*incomp) (void *state, unsigned char *ibuf, int icnt);</div><div class='del'>-</div><div class='del'>-	/* Return decompression statistics */</div><div class='del'>-	void	(*decomp_stat) (void *state, struct compstat *stats);</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The return value from decompress routine is the length of the</div><div class='del'>- * decompressed packet if successful, otherwise DECOMP_ERROR</div><div class='del'>- * or DECOMP_FATALERROR if an error occurred.</div><div class='del'>- * </div><div class='del'>- * We need to make this distinction so that we can disable certain</div><div class='del'>- * useful functionality, namely sending a CCP reset-request as a result</div><div class='del'>- * of an error detected after decompression.  This is to avoid infringing</div><div class='del'>- * a patent held by Motorola.</div><div class='del'>- * Don't you just lurve software patents.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define DECOMP_ERROR		-1	/* error detected before decomp. */</div><div class='del'>-#define DECOMP_FATALERROR	-2	/* error detected after decomp. */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * CCP codes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CCP_CONFREQ	1</div><div class='del'>-#define CCP_CONFACK	2</div><div class='del'>-#define CCP_TERMREQ	5</div><div class='del'>-#define CCP_TERMACK	6</div><div class='del'>-#define CCP_RESETREQ	14</div><div class='del'>-#define CCP_RESETACK	15</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Max # bytes for a CCP option</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CCP_MAX_OPTION_LENGTH	32</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Parts of a CCP packet.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CCP_CODE(dp)		((dp)[0])</div><div class='del'>-#define CCP_ID(dp)		((dp)[1])</div><div class='del'>-#define CCP_LENGTH(dp)		(((dp)[2] &lt;&lt; 8) + (dp)[3])</div><div class='del'>-#define CCP_HDRLEN		4</div><div class='del'>-</div><div class='del'>-#define CCP_OPT_CODE(dp)	((dp)[0])</div><div class='del'>-#define CCP_OPT_LENGTH(dp)	((dp)[1])</div><div class='del'>-#define CCP_OPT_MINLEN		2</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for BSD-Compress.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CI_BSD_COMPRESS		21	/* config. option for BSD-Compress */</div><div class='del'>-#define CILEN_BSD_COMPRESS	3	/* length of config. option */</div><div class='del'>-</div><div class='del'>-/* Macros for handling the 3rd byte of the BSD-Compress config option. */</div><div class='del'>-#define BSD_NBITS(x)		((x) &amp; 0x1F)	/* number of bits requested */</div><div class='del'>-#define BSD_VERSION(x)		((x) &gt;&gt; 5)	/* version of option format */</div><div class='del'>-#define BSD_CURRENT_VERSION	1		/* current version number */</div><div class='del'>-#define BSD_MAKE_OPT(v, n)	(((v) &lt;&lt; 5) | (n))</div><div class='del'>-</div><div class='del'>-#define BSD_MIN_BITS		9	/* smallest code size supported */</div><div class='del'>-#define BSD_MAX_BITS		15	/* largest code size supported */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for Deflate.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CI_DEFLATE		26	/* config option for Deflate */</div><div class='del'>-#define CI_DEFLATE_DRAFT	24	/* value used in original draft RFC */</div><div class='del'>-#define CILEN_DEFLATE		4	/* length of its config option */</div><div class='del'>-</div><div class='del'>-#define DEFLATE_MIN_SIZE	8</div><div class='del'>-#define DEFLATE_MAX_SIZE	15</div><div class='del'>-#define DEFLATE_METHOD_VAL	8</div><div class='del'>-#define DEFLATE_SIZE(x)		(((x) &gt;&gt; 4) + DEFLATE_MIN_SIZE)</div><div class='del'>-#define DEFLATE_METHOD(x)	((x) &amp; 0x0F)</div><div class='del'>-#define DEFLATE_MAKE_OPT(w)	((((w) - DEFLATE_MIN_SIZE) &lt;&lt; 4) \</div><div class='del'>-				 + DEFLATE_METHOD_VAL)</div><div class='del'>-#define DEFLATE_CHK_SEQUENCE	0</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for other, as yet unsupported, compression methods.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CI_PREDICTOR_1		1	/* config option for Predictor-1 */</div><div class='del'>-#define CILEN_PREDICTOR_1	2	/* length of its config option */</div><div class='del'>-#define CI_PREDICTOR_2		2	/* config option for Predictor-2 */</div><div class='del'>-#define CILEN_PREDICTOR_2	2	/* length of its config option */</div><div class='del'>-</div><div class='del'>-#ifdef __KERNEL__</div><div class='del'>-extern int ppp_register_compressor(struct compressor *);</div><div class='del'>-extern void ppp_unregister_compressor(struct compressor *);</div><div class='del'>-#endif /* __KERNEL__ */</div><div class='del'>-</div><div class='del'>-#endif /* _NET_PPP_COMP_H */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/linux/ppp_defs.h b/mdk-stage1/ppp/include/linux/ppp_defs.h<br/>deleted file mode 100644<br/>index 46946fbdc..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/linux/ppp_defs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/linux/ppp_defs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,185 +0,0 @@</div><div class='del'>-/*	$Id$	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_defs.h - PPP definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  ==FILEVERSION 20000114==</div><div class='del'>- *</div><div class='del'>- *  NOTE TO MAINTAINERS:</div><div class='del'>- *     If you modify this file at all, please set the above date.</div><div class='del'>- *     ppp_defs.h is shipped with a PPP distribution as well as with the kernel;</div><div class='del'>- *     if everyone increases the FILEVERSION number above, then scripts</div><div class='del'>- *     can do the right thing when deciding whether to install a new ppp_defs.h</div><div class='del'>- *     file.  Don't change the format of that line otherwise, so the</div><div class='del'>- *     installation script can recognize it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _PPP_DEFS_H_</div><div class='del'>-#define _PPP_DEFS_H_</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The basic PPP frame.</div><div class='del'>- */</div><div class='del'>-#define PPP_HDRLEN	4	/* octets for standard ppp header */</div><div class='del'>-#define PPP_FCSLEN	2	/* octets for FCS */</div><div class='del'>-#define PPP_MRU		1500	/* default MRU = max length of info field */</div><div class='del'>-</div><div class='del'>-#define PPP_ADDRESS(p)	(((__u8 *)(p))[0])</div><div class='del'>-#define PPP_CONTROL(p)	(((__u8 *)(p))[1])</div><div class='del'>-#define PPP_PROTOCOL(p)	((((__u8 *)(p))[2] &lt;&lt; 8) + ((__u8 *)(p))[3])</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Significant octet values.</div><div class='del'>- */</div><div class='del'>-#define	PPP_ALLSTATIONS	0xff	/* All-Stations broadcast address */</div><div class='del'>-#define	PPP_UI		0x03	/* Unnumbered Information */</div><div class='del'>-#define	PPP_FLAG	0x7e	/* Flag Sequence */</div><div class='del'>-#define	PPP_ESCAPE	0x7d	/* Asynchronous Control Escape */</div><div class='del'>-#define	PPP_TRANS	0x20	/* Asynchronous transparency modifier */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol field values.</div><div class='del'>- */</div><div class='del'>-#define PPP_IP		0x21	/* Internet Protocol */</div><div class='del'>-#define PPP_AT		0x29	/* AppleTalk Protocol */</div><div class='del'>-#define PPP_IPX		0x2b	/* IPX protocol */</div><div class='del'>-#define	PPP_VJC_COMP	0x2d	/* VJ compressed TCP */</div><div class='del'>-#define	PPP_VJC_UNCOMP	0x2f	/* VJ uncompressed TCP */</div><div class='del'>-#define PPP_MP		0x3d	/* Multilink protocol */</div><div class='del'>-#define PPP_IPV6	0x57	/* Internet Protocol Version 6 */</div><div class='del'>-#define PPP_COMPFRAG	0xfb	/* fragment compressed below bundle */</div><div class='del'>-#define PPP_COMP	0xfd	/* compressed packet */</div><div class='del'>-#define PPP_IPCP	0x8021	/* IP Control Protocol */</div><div class='del'>-#define PPP_ATCP	0x8029	/* AppleTalk Control Protocol */</div><div class='del'>-#define PPP_IPXCP	0x802b	/* IPX Control Protocol */</div><div class='del'>-#define PPP_IPV6CP	0x8057	/* IPv6 Control Protocol */</div><div class='del'>-#define PPP_CCPFRAG	0x80fb	/* CCP at link level (below MP bundle) */</div><div class='del'>-#define PPP_CCP		0x80fd	/* Compression Control Protocol */</div><div class='del'>-#define PPP_LCP		0xc021	/* Link Control Protocol */</div><div class='del'>-#define PPP_PAP		0xc023	/* Password Authentication Protocol */</div><div class='del'>-#define PPP_LQR		0xc025	/* Link Quality Report protocol */</div><div class='del'>-#define PPP_CHAP	0xc223	/* Cryptographic Handshake Auth. Protocol */</div><div class='del'>-#define PPP_CBCP	0xc029	/* Callback Control Protocol */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for FCS calculations.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define PPP_INITFCS	0xffff	/* Initial FCS value */</div><div class='del'>-#define PPP_GOODFCS	0xf0b8	/* Good final FCS value */</div><div class='del'>-#define PPP_FCS(fcs, c)	(((fcs) &gt;&gt; 8) ^ fcstab[((fcs) ^ (c)) &amp; 0xff])</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Extended asyncmap - allows any character to be escaped.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef __u32		ext_accm[8];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * What to do with network protocol (NP) packets.</div><div class='del'>- */</div><div class='del'>-enum NPmode {</div><div class='del'>-    NPMODE_PASS,		/* pass the packet through */</div><div class='del'>-    NPMODE_DROP,		/* silently drop the packet */</div><div class='del'>-    NPMODE_ERROR,		/* return an error */</div><div class='del'>-    NPMODE_QUEUE		/* save it up for later. */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Statistics for LQRP and pppstats</div><div class='del'>- */</div><div class='del'>-struct pppstat	{</div><div class='del'>-    __u32	ppp_discards;	/* # frames discarded */</div><div class='del'>-</div><div class='del'>-    __u32	ppp_ibytes;	/* bytes received */</div><div class='del'>-    __u32	ppp_ioctects;	/* bytes received not in error */</div><div class='del'>-    __u32	ppp_ipackets;	/* packets received */</div><div class='del'>-    __u32	ppp_ierrors;	/* receive errors */</div><div class='del'>-    __u32	ppp_ilqrs;	/* # LQR frames received */</div><div class='del'>-</div><div class='del'>-    __u32	ppp_obytes;	/* raw bytes sent */</div><div class='del'>-    __u32	ppp_ooctects;	/* frame bytes sent */</div><div class='del'>-    __u32	ppp_opackets;	/* packets sent */</div><div class='del'>-    __u32	ppp_oerrors;	/* transmit errors */ </div><div class='del'>-    __u32	ppp_olqrs;	/* # LQR frames sent */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct vjstat {</div><div class='del'>-    __u32	vjs_packets;	/* outbound packets */</div><div class='del'>-    __u32	vjs_compressed;	/* outbound compressed packets */</div><div class='del'>-    __u32	vjs_searches;	/* searches for connection state */</div><div class='del'>-    __u32	vjs_misses;	/* times couldn't find conn. state */</div><div class='del'>-    __u32	vjs_uncompressedin; /* inbound uncompressed packets */</div><div class='del'>-    __u32	vjs_compressedin;   /* inbound compressed packets */</div><div class='del'>-    __u32	vjs_errorin;	/* inbound unknown type packets */</div><div class='del'>-    __u32	vjs_tossed;	/* inbound packets tossed because of error */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct compstat {</div><div class='del'>-    __u32	unc_bytes;	/* total uncompressed bytes */</div><div class='del'>-    __u32	unc_packets;	/* total uncompressed packets */</div><div class='del'>-    __u32	comp_bytes;	/* compressed bytes */</div><div class='del'>-    __u32	comp_packets;	/* compressed packets */</div><div class='del'>-    __u32	inc_bytes;	/* incompressible bytes */</div><div class='del'>-    __u32	inc_packets;	/* incompressible packets */</div><div class='del'>-</div><div class='del'>-    /* the compression ratio is defined as in_count / bytes_out */</div><div class='del'>-    __u32       in_count;	/* Bytes received */</div><div class='del'>-    __u32       bytes_out;	/* Bytes transmitted */</div><div class='del'>-</div><div class='del'>-    double	ratio;		/* not computed in kernel. */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppp_stats {</div><div class='del'>-    struct pppstat	p;	/* basic PPP statistics */</div><div class='del'>-    struct vjstat	vj;	/* VJ header compression statistics */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppp_comp_stats {</div><div class='del'>-    struct compstat	c;	/* packet compression statistics */</div><div class='del'>-    struct compstat	d;	/* packet decompression statistics */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following structure records the time in seconds since</div><div class='del'>- * the last NP packet was sent or received.</div><div class='del'>- */</div><div class='del'>-struct ppp_idle {</div><div class='del'>-    time_t xmit_idle;		/* time since last NP packet sent */</div><div class='del'>-    time_t recv_idle;		/* time since last NP packet received */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifndef __P</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-#define __P(x)	x</div><div class='del'>-#else</div><div class='del'>-#define __P(x)	()</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _PPP_DEFS_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/if_ppp.h b/mdk-stage1/ppp/include/net/if_ppp.h<br/>deleted file mode 100644<br/>index 1527ecf3f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/if_ppp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/if_ppp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,133 +0,0 @@</div><div class='del'>-/*	$Id$	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * if_ppp.h - Point-to-Point Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _IF_PPP_H_</div><div class='del'>-#define _IF_PPP_H_</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Bit definitions for flags.</div><div class='del'>- */</div><div class='del'>-#define SC_COMP_PROT	0x00000001	/* protocol compression (output) */</div><div class='del'>-#define SC_COMP_AC	0x00000002	/* header compression (output) */</div><div class='del'>-#define	SC_COMP_TCP	0x00000004	/* TCP (VJ) compression (output) */</div><div class='del'>-#define SC_NO_TCP_CCID	0x00000008	/* disable VJ connection-id comp. */</div><div class='del'>-#define SC_REJ_COMP_AC	0x00000010	/* reject adrs/ctrl comp. on input */</div><div class='del'>-#define SC_REJ_COMP_TCP	0x00000020	/* reject TCP (VJ) comp. on input */</div><div class='del'>-#define SC_CCP_OPEN	0x00000040	/* Look at CCP packets */</div><div class='del'>-#define SC_CCP_UP	0x00000080	/* May send/recv compressed packets */</div><div class='del'>-#define SC_DEBUG	0x00010000	/* enable debug messages */</div><div class='del'>-#define SC_LOG_INPKT	0x00020000	/* log contents of good pkts recvd */</div><div class='del'>-#define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */</div><div class='del'>-#define SC_LOG_RAWIN	0x00080000	/* log all chars received */</div><div class='del'>-#define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */</div><div class='del'>-#define SC_RCV_B7_0	0x01000000	/* have rcvd char with bit 7 = 0 */</div><div class='del'>-#define SC_RCV_B7_1	0x02000000	/* have rcvd char with bit 7 = 1 */</div><div class='del'>-#define SC_RCV_EVNP	0x04000000	/* have rcvd char with even parity */</div><div class='del'>-#define SC_RCV_ODDP	0x08000000	/* have rcvd char with odd parity */</div><div class='del'>-#define SC_SYNC		0x00200000	/* use synchronous HDLC framing */</div><div class='del'>-#define	SC_MASK		0x0fff00ff	/* bits that user can change */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * State bits in sc_flags, not changeable by user.</div><div class='del'>- */</div><div class='del'>-#define SC_TIMEOUT	0x00000400	/* timeout is currently pending */</div><div class='del'>-#define SC_VJ_RESET	0x00000800	/* need to reset VJ decomp */</div><div class='del'>-#define SC_COMP_RUN	0x00001000	/* compressor has been inited */</div><div class='del'>-#define SC_DECOMP_RUN	0x00002000	/* decompressor has been inited */</div><div class='del'>-#define SC_DC_ERROR	0x00004000	/* non-fatal decomp error detected */</div><div class='del'>-#define SC_DC_FERROR	0x00008000	/* fatal decomp error detected */</div><div class='del'>-#define SC_TBUSY	0x10000000	/* xmitter doesn't need a packet yet */</div><div class='del'>-#define SC_PKTLOST	0x20000000	/* have lost or dropped a packet */</div><div class='del'>-#define	SC_FLUSH	0x40000000	/* flush input until next PPP_FLAG */</div><div class='del'>-#define	SC_ESCAPED	0x80000000	/* saw a PPP_ESCAPE */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ioctl definitions.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct npioctl {</div><div class='del'>-    int		protocol;	/* PPP procotol, e.g. PPP_IP */</div><div class='del'>-    enum NPmode	mode;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */</div><div class='del'>-struct ppp_option_data {</div><div class='del'>-	u_char	*ptr;</div><div class='del'>-	u_int	length;</div><div class='del'>-	int	transmit;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ifpppstatsreq {</div><div class='del'>-    char ifr_name[IFNAMSIZ];</div><div class='del'>-    struct ppp_stats stats;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ifpppcstatsreq {</div><div class='del'>-    char ifr_name[IFNAMSIZ];</div><div class='del'>-    struct ppp_comp_stats stats;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ioctl definitions.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define	PPPIOCGFLAGS	_IOR('t', 90, int)	/* get configuration flags */</div><div class='del'>-#define	PPPIOCSFLAGS	_IOW('t', 89, int)	/* set configuration flags */</div><div class='del'>-#define	PPPIOCGASYNCMAP	_IOR('t', 88, int)	/* get async map */</div><div class='del'>-#define	PPPIOCSASYNCMAP	_IOW('t', 87, int)	/* set async map */</div><div class='del'>-#define	PPPIOCGUNIT	_IOR('t', 86, int)	/* get ppp unit number */</div><div class='del'>-#define	PPPIOCGRASYNCMAP _IOR('t', 85, int)	/* get receive async map */</div><div class='del'>-#define	PPPIOCSRASYNCMAP _IOW('t', 84, int)	/* set receive async map */</div><div class='del'>-#define	PPPIOCGMRU	_IOR('t', 83, int)	/* get max receive unit */</div><div class='del'>-#define	PPPIOCSMRU	_IOW('t', 82, int)	/* set max receive unit */</div><div class='del'>-#define	PPPIOCSMAXCID	_IOW('t', 81, int)	/* set VJ max slot ID */</div><div class='del'>-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */</div><div class='del'>-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */</div><div class='del'>-#define PPPIOCXFERUNIT	_IO('t', 78)		/* transfer PPP unit */</div><div class='del'>-#define PPPIOCSCOMPRESS	_IOW('t', 77, struct ppp_option_data)</div><div class='del'>-#define PPPIOCGNPMODE	_IOWR('t', 76, struct npioctl) /* get NP mode */</div><div class='del'>-#define PPPIOCSNPMODE	_IOW('t', 75, struct npioctl)  /* set NP mode */</div><div class='del'>-#define PPPIOCGIDLE	_IOR('t', 74, struct ppp_idle) /* get idle time */</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-#define PPPIOCSPASS	_IOW('t', 71, struct bpf_program) /* set pass filter */</div><div class='del'>-#define PPPIOCSACTIVE	_IOW('t', 70, struct bpf_program) /* set active filt */</div><div class='del'>-#endif /* PPP_FILTER */</div><div class='del'>-</div><div class='del'>-/* PPPIOC[GS]MTU are alternatives to SIOC[GS]IFMTU, used under Ultrix */</div><div class='del'>-#define PPPIOCGMTU	_IOR('t', 73, int)	/* get interface MTU */</div><div class='del'>-#define PPPIOCSMTU	_IOW('t', 72, int)	/* set interface MTU */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * These two are interface ioctls so that pppstats can do them on</div><div class='del'>- * a socket without having to open the serial device.</div><div class='del'>- */</div><div class='del'>-#define SIOCGPPPSTATS	_IOWR('i', 123, struct ifpppstatsreq)</div><div class='del'>-#define SIOCGPPPCSTATS	_IOWR('i', 122, struct ifpppcstatsreq)</div><div class='del'>-</div><div class='del'>-#if !defined(ifr_mtu)</div><div class='del'>-#define ifr_mtu	ifr_ifru.ifru_metric</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if (defined(_KERNEL) || defined(KERNEL)) &amp;&amp; !defined(NeXT)</div><div class='del'>-void pppattach __P((void));</div><div class='del'>-void pppintr __P((void));</div><div class='del'>-#endif</div><div class='del'>-#endif /* _IF_PPP_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/ppp-comp.h b/mdk-stage1/ppp/include/net/ppp-comp.h<br/>deleted file mode 100644<br/>index 0e6a9c672..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/ppp-comp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/ppp-comp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,165 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp-comp.h - Definitions for doing PPP packet compression.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _NET_PPP_COMP_H</div><div class='del'>-#define _NET_PPP_COMP_H</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following symbols control whether we include code for</div><div class='del'>- * various compression methods.</div><div class='del'>- */</div><div class='del'>-#ifndef DO_BSD_COMPRESS</div><div class='del'>-#define DO_BSD_COMPRESS	1	/* by default, include BSD-Compress */</div><div class='del'>-#endif</div><div class='del'>-#ifndef DO_DEFLATE</div><div class='del'>-#define DO_DEFLATE	1	/* by default, include Deflate */</div><div class='del'>-#endif</div><div class='del'>-#define DO_PREDICTOR_1	0</div><div class='del'>-#define DO_PREDICTOR_2	0</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Structure giving methods for compression/decompression.</div><div class='del'>- */</div><div class='del'>-#ifdef PACKETPTR</div><div class='del'>-struct compressor {</div><div class='del'>-	int	compress_proto;	/* CCP compression protocol number */</div><div class='del'>-</div><div class='del'>-	/* Allocate space for a compressor (transmit side) */</div><div class='del'>-	void	*(*comp_alloc) __P((u_char *options, int opt_len));</div><div class='del'>-	/* Free space used by a compressor */</div><div class='del'>-	void	(*comp_free) __P((void *state));</div><div class='del'>-	/* Initialize a compressor */</div><div class='del'>-	int	(*comp_init) __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				  int unit, int hdrlen, int debug));</div><div class='del'>-	/* Reset a compressor */</div><div class='del'>-	void	(*comp_reset) __P((void *state));</div><div class='del'>-	/* Compress a packet */</div><div class='del'>-	int	(*compress) __P((void *state, PACKETPTR *mret,</div><div class='del'>-				 PACKETPTR mp, int orig_len, int max_len));</div><div class='del'>-	/* Return compression statistics */</div><div class='del'>-	void	(*comp_stat) __P((void *state, struct compstat *stats));</div><div class='del'>-</div><div class='del'>-	/* Allocate space for a decompressor (receive side) */</div><div class='del'>-	void	*(*decomp_alloc) __P((u_char *options, int opt_len));</div><div class='del'>-	/* Free space used by a decompressor */</div><div class='del'>-	void	(*decomp_free) __P((void *state));</div><div class='del'>-	/* Initialize a decompressor */</div><div class='del'>-	int	(*decomp_init) __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				    int unit, int hdrlen, int mru, int debug));</div><div class='del'>-	/* Reset a decompressor */</div><div class='del'>-	void	(*decomp_reset) __P((void *state));</div><div class='del'>-	/* Decompress a packet. */</div><div class='del'>-	int	(*decompress) __P((void *state, PACKETPTR mp,</div><div class='del'>-				   PACKETPTR *dmpp));</div><div class='del'>-	/* Update state for an incompressible packet received */</div><div class='del'>-	void	(*incomp) __P((void *state, PACKETPTR mp));</div><div class='del'>-	/* Return decompression statistics */</div><div class='del'>-	void	(*decomp_stat) __P((void *state, struct compstat *stats));</div><div class='del'>-};</div><div class='del'>-#endif /* PACKETPTR */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return values for decompress routine.</div><div class='del'>- * We need to make these distinctions so that we can disable certain</div><div class='del'>- * useful functionality, namely sending a CCP reset-request as a result</div><div class='del'>- * of an error detected after decompression.  This is to avoid infringing</div><div class='del'>- * a patent held by Motorola.</div><div class='del'>- * Don't you just lurve software patents.</div><div class='del'>- */</div><div class='del'>-#define DECOMP_OK		0	/* everything went OK */</div><div class='del'>-#define DECOMP_ERROR		1	/* error detected before decomp. */</div><div class='del'>-#define DECOMP_FATALERROR	2	/* error detected after decomp. */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * CCP codes.</div><div class='del'>- */</div><div class='del'>-#define CCP_CONFREQ	1</div><div class='del'>-#define CCP_CONFACK	2</div><div class='del'>-#define CCP_TERMREQ	5</div><div class='del'>-#define CCP_TERMACK	6</div><div class='del'>-#define CCP_RESETREQ	14</div><div class='del'>-#define CCP_RESETACK	15</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Max # bytes for a CCP option</div><div class='del'>- */</div><div class='del'>-#define CCP_MAX_OPTION_LENGTH	32</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Parts of a CCP packet.</div><div class='del'>- */</div><div class='del'>-#define CCP_CODE(dp)		((dp)[0])</div><div class='del'>-#define CCP_ID(dp)		((dp)[1])</div><div class='del'>-#define CCP_LENGTH(dp)		(((dp)[2] &lt;&lt; 8) + (dp)[3])</div><div class='del'>-#define CCP_HDRLEN		4</div><div class='del'>-</div><div class='del'>-#define CCP_OPT_CODE(dp)	((dp)[0])</div><div class='del'>-#define CCP_OPT_LENGTH(dp)	((dp)[1])</div><div class='del'>-#define CCP_OPT_MINLEN		2</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for BSD-Compress.</div><div class='del'>- */</div><div class='del'>-#define CI_BSD_COMPRESS		21	/* config. option for BSD-Compress */</div><div class='del'>-#define CILEN_BSD_COMPRESS	3	/* length of config. option */</div><div class='del'>-</div><div class='del'>-/* Macros for handling the 3rd byte of the BSD-Compress config option. */</div><div class='del'>-#define BSD_NBITS(x)		((x) &amp; 0x1F)	/* number of bits requested */</div><div class='del'>-#define BSD_VERSION(x)		((x) &gt;&gt; 5)	/* version of option format */</div><div class='del'>-#define BSD_CURRENT_VERSION	1		/* current version number */</div><div class='del'>-#define BSD_MAKE_OPT(v, n)	(((v) &lt;&lt; 5) | (n))</div><div class='del'>-</div><div class='del'>-#define BSD_MIN_BITS		9	/* smallest code size supported */</div><div class='del'>-#define BSD_MAX_BITS		15	/* largest code size supported */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for Deflate.</div><div class='del'>- */</div><div class='del'>-#define CI_DEFLATE		26	/* config option for Deflate */</div><div class='del'>-#define CI_DEFLATE_DRAFT	24	/* value used in original draft RFC */</div><div class='del'>-#define CILEN_DEFLATE		4	/* length of its config option */</div><div class='del'>-</div><div class='del'>-#define DEFLATE_MIN_SIZE	8</div><div class='del'>-#define DEFLATE_MAX_SIZE	15</div><div class='del'>-#define DEFLATE_METHOD_VAL	8</div><div class='del'>-#define DEFLATE_SIZE(x)		(((x) &gt;&gt; 4) + DEFLATE_MIN_SIZE)</div><div class='del'>-#define DEFLATE_METHOD(x)	((x) &amp; 0x0F)</div><div class='del'>-#define DEFLATE_MAKE_OPT(w)	((((w) - DEFLATE_MIN_SIZE) &lt;&lt; 4) \</div><div class='del'>-				 + DEFLATE_METHOD_VAL)</div><div class='del'>-#define DEFLATE_CHK_SEQUENCE	0</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Definitions for other, as yet unsupported, compression methods.</div><div class='del'>- */</div><div class='del'>-#define CI_PREDICTOR_1		1	/* config option for Predictor-1 */</div><div class='del'>-#define CILEN_PREDICTOR_1	2	/* length of its config option */</div><div class='del'>-#define CI_PREDICTOR_2		2	/* config option for Predictor-2 */</div><div class='del'>-#define CILEN_PREDICTOR_2	2	/* length of its config option */</div><div class='del'>-</div><div class='del'>-#endif /* _NET_PPP_COMP_H */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/ppp_defs.h b/mdk-stage1/ppp/include/net/ppp_defs.h<br/>deleted file mode 100644<br/>index c35020eab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/ppp_defs.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/ppp_defs.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,184 +0,0 @@</div><div class='del'>-/*	$Id$	*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_defs.h - PPP definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _PPP_DEFS_H_</div><div class='del'>-#define _PPP_DEFS_H_</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The basic PPP frame.</div><div class='del'>- */</div><div class='del'>-#define PPP_HDRLEN	4	/* octets for standard ppp header */</div><div class='del'>-#define PPP_FCSLEN	2	/* octets for FCS */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Packet sizes</div><div class='del'>- *</div><div class='del'>- * Note - lcp shouldn't be allowed to negotiate stuff outside these</div><div class='del'>- *	  limits.  See lcp.h in the pppd directory.</div><div class='del'>- * (XXX - these constants should simply be shared by lcp.c instead</div><div class='del'>- *	  of living in lcp.h)</div><div class='del'>- */</div><div class='del'>-#define	PPP_MTU		1500	/* Default MTU (size of Info field) */</div><div class='del'>-#define PPP_MAXMTU	65535 - (PPP_HDRLEN + PPP_FCSLEN)</div><div class='del'>-#define PPP_MINMTU	64</div><div class='del'>-#define PPP_MRU		1500	/* default MRU = max length of info field */</div><div class='del'>-#define PPP_MAXMRU	65000	/* Largest MRU we allow */</div><div class='del'>-#define PPP_MINMRU	128</div><div class='del'>-</div><div class='del'>-#define PPP_ADDRESS(p)	(((u_char *)(p))[0])</div><div class='del'>-#define PPP_CONTROL(p)	(((u_char *)(p))[1])</div><div class='del'>-#define PPP_PROTOCOL(p)	((((u_char *)(p))[2] &lt;&lt; 8) + ((u_char *)(p))[3])</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Significant octet values.</div><div class='del'>- */</div><div class='del'>-#define	PPP_ALLSTATIONS	0xff	/* All-Stations broadcast address */</div><div class='del'>-#define	PPP_UI		0x03	/* Unnumbered Information */</div><div class='del'>-#define	PPP_FLAG	0x7e	/* Flag Sequence */</div><div class='del'>-#define	PPP_ESCAPE	0x7d	/* Asynchronous Control Escape */</div><div class='del'>-#define	PPP_TRANS	0x20	/* Asynchronous transparency modifier */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol field values.</div><div class='del'>- */</div><div class='del'>-#define PPP_IP		0x21	/* Internet Protocol */</div><div class='del'>-#define PPP_AT		0x29	/* AppleTalk Protocol */</div><div class='del'>-#define PPP_IPX		0x2b	/* IPX protocol */</div><div class='del'>-#define	PPP_VJC_COMP	0x2d	/* VJ compressed TCP */</div><div class='del'>-#define	PPP_VJC_UNCOMP	0x2f	/* VJ uncompressed TCP */</div><div class='del'>-#define PPP_IPV6	0x57	/* Internet Protocol Version 6 */</div><div class='del'>-#define PPP_COMP	0xfd	/* compressed packet */</div><div class='del'>-#define PPP_IPCP	0x8021	/* IP Control Protocol */</div><div class='del'>-#define PPP_ATCP	0x8029	/* AppleTalk Control Protocol */</div><div class='del'>-#define PPP_IPXCP	0x802b	/* IPX Control Protocol */</div><div class='del'>-#define PPP_IPV6CP	0x8057	/* IPv6 Control Protocol */</div><div class='del'>-#define PPP_CCP		0x80fd	/* Compression Control Protocol */</div><div class='del'>-#define PPP_LCP		0xc021	/* Link Control Protocol */</div><div class='del'>-#define PPP_PAP		0xc023	/* Password Authentication Protocol */</div><div class='del'>-#define PPP_LQR		0xc025	/* Link Quality Report protocol */</div><div class='del'>-#define PPP_CHAP	0xc223	/* Cryptographic Handshake Auth. Protocol */</div><div class='del'>-#define PPP_CBCP	0xc029	/* Callback Control Protocol */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for FCS calculations.</div><div class='del'>- */</div><div class='del'>-#define PPP_INITFCS	0xffff	/* Initial FCS value */</div><div class='del'>-#define PPP_GOODFCS	0xf0b8	/* Good final FCS value */</div><div class='del'>-#define PPP_FCS(fcs, c)	(((fcs) &gt;&gt; 8) ^ fcstab[((fcs) ^ (c)) &amp; 0xff])</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A 32-bit unsigned integral type.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#if !defined(__BIT_TYPES_DEFINED__) &amp;&amp; !defined(_BITYPES) \</div><div class='del'>- &amp;&amp; !defined(__FreeBSD__) &amp;&amp; (NS_TARGET &lt; 40)</div><div class='del'>-#ifdef	UINT32_T</div><div class='del'>-typedef UINT32_T	u_int32_t;</div><div class='del'>-#else</div><div class='del'>-typedef unsigned int	u_int32_t;</div><div class='del'>-typedef unsigned short  u_int16_t;</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Extended asyncmap - allows any character to be escaped.</div><div class='del'>- */</div><div class='del'>-typedef u_int32_t	ext_accm[8];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * What to do with network protocol (NP) packets.</div><div class='del'>- */</div><div class='del'>-enum NPmode {</div><div class='del'>-    NPMODE_PASS,		/* pass the packet through */</div><div class='del'>-    NPMODE_DROP,		/* silently drop the packet */</div><div class='del'>-    NPMODE_ERROR,		/* return an error */</div><div class='del'>-    NPMODE_QUEUE		/* save it up for later. */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Statistics.</div><div class='del'>- */</div><div class='del'>-struct pppstat	{</div><div class='del'>-    unsigned int ppp_ibytes;	/* bytes received */</div><div class='del'>-    unsigned int ppp_ipackets;	/* packets received */</div><div class='del'>-    unsigned int ppp_ierrors;	/* receive errors */</div><div class='del'>-    unsigned int ppp_obytes;	/* bytes sent */</div><div class='del'>-    unsigned int ppp_opackets;	/* packets sent */</div><div class='del'>-    unsigned int ppp_oerrors;	/* transmit errors */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct vjstat {</div><div class='del'>-    unsigned int vjs_packets;	/* outbound packets */</div><div class='del'>-    unsigned int vjs_compressed; /* outbound compressed packets */</div><div class='del'>-    unsigned int vjs_searches;	/* searches for connection state */</div><div class='del'>-    unsigned int vjs_misses;	/* times couldn't find conn. state */</div><div class='del'>-    unsigned int vjs_uncompressedin; /* inbound uncompressed packets */</div><div class='del'>-    unsigned int vjs_compressedin; /* inbound compressed packets */</div><div class='del'>-    unsigned int vjs_errorin;	/* inbound unknown type packets */</div><div class='del'>-    unsigned int vjs_tossed;	/* inbound packets tossed because of error */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppp_stats {</div><div class='del'>-    struct pppstat p;		/* basic PPP statistics */</div><div class='del'>-    struct vjstat vj;		/* VJ header compression statistics */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct compstat {</div><div class='del'>-    unsigned int unc_bytes;	/* total uncompressed bytes */</div><div class='del'>-    unsigned int unc_packets;	/* total uncompressed packets */</div><div class='del'>-    unsigned int comp_bytes;	/* compressed bytes */</div><div class='del'>-    unsigned int comp_packets;	/* compressed packets */</div><div class='del'>-    unsigned int inc_bytes;	/* incompressible bytes */</div><div class='del'>-    unsigned int inc_packets;	/* incompressible packets */</div><div class='del'>-    unsigned int ratio;		/* recent compression ratio &lt;&lt; 8 */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct ppp_comp_stats {</div><div class='del'>-    struct compstat c;		/* packet compression statistics */</div><div class='del'>-    struct compstat d;		/* packet decompression statistics */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following structure records the time in seconds since</div><div class='del'>- * the last NP packet was sent or received.</div><div class='del'>- */</div><div class='del'>-struct ppp_idle {</div><div class='del'>-    time_t xmit_idle;		/* time since last NP packet sent */</div><div class='del'>-    time_t recv_idle;		/* time since last NP packet received */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifndef __P</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-#define __P(x)	x</div><div class='del'>-#else</div><div class='del'>-#define __P(x)	()</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* _PPP_DEFS_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/pppio.h b/mdk-stage1/ppp/include/net/pppio.h<br/>deleted file mode 100644<br/>index 9db1ca9ab..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/pppio.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/pppio.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,99 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * pppio.h - ioctl and other misc. definitions for STREAMS modules.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define _PPPIO(n)	(('p' &lt;&lt; 8) + (n))</div><div class='del'>-</div><div class='del'>-#define PPPIO_NEWPPA	_PPPIO(130)	/* allocate a new PPP unit */</div><div class='del'>-#define PPPIO_GETSTAT	_PPPIO(131)	/* get PPP statistics */</div><div class='del'>-#define PPPIO_GETCSTAT	_PPPIO(132)	/* get PPP compression stats */</div><div class='del'>-#define PPPIO_MTU	_PPPIO(133)	/* set max transmission unit */</div><div class='del'>-#define PPPIO_MRU	_PPPIO(134)	/* set max receive unit */</div><div class='del'>-#define PPPIO_CFLAGS	_PPPIO(135)	/* set/clear/get compression flags */</div><div class='del'>-#define PPPIO_XCOMP	_PPPIO(136)	/* alloc transmit compressor */</div><div class='del'>-#define PPPIO_RCOMP	_PPPIO(137)	/* alloc receive decompressor */</div><div class='del'>-#define PPPIO_XACCM	_PPPIO(138)	/* set transmit asyncmap */</div><div class='del'>-#define PPPIO_RACCM	_PPPIO(139)	/* set receive asyncmap */</div><div class='del'>-#define PPPIO_VJINIT	_PPPIO(140)	/* initialize VJ comp/decomp */</div><div class='del'>-#define PPPIO_ATTACH	_PPPIO(141)	/* attach to a ppa (without putmsg) */</div><div class='del'>-#define PPPIO_LASTMOD	_PPPIO(142)	/* mark last ppp module */</div><div class='del'>-#define PPPIO_GCLEAN	_PPPIO(143)	/* get 8-bit-clean flags */</div><div class='del'>-#define PPPIO_DEBUG	_PPPIO(144)	/* request debug information */</div><div class='del'>-#define PPPIO_BIND	_PPPIO(145)	/* bind to SAP */</div><div class='del'>-#define PPPIO_NPMODE	_PPPIO(146)	/* set mode for handling data pkts */</div><div class='del'>-#define PPPIO_GIDLE	_PPPIO(147)	/* get time since last data pkt */</div><div class='del'>-#define PPPIO_PASSFILT	_PPPIO(148)	/* set filter for packets to pass */</div><div class='del'>-#define PPPIO_ACTIVEFILT _PPPIO(149)	/* set filter for "link active" pkts */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for PPPIO_CFLAGS</div><div class='del'>- */</div><div class='del'>-#define COMP_AC		0x1		/* compress address/control */</div><div class='del'>-#define DECOMP_AC	0x2		/* decompress address/control */</div><div class='del'>-#define COMP_PROT	0x4		/* compress PPP protocol */</div><div class='del'>-#define DECOMP_PROT	0x8		/* decompress PPP protocol */</div><div class='del'>-</div><div class='del'>-#define COMP_VJC	0x10		/* compress TCP/IP headers */</div><div class='del'>-#define COMP_VJCCID	0x20		/* compress connection ID as well */</div><div class='del'>-#define DECOMP_VJC	0x40		/* decompress TCP/IP headers */</div><div class='del'>-#define DECOMP_VJCCID	0x80		/* accept compressed connection ID */</div><div class='del'>-</div><div class='del'>-#define CCP_ISOPEN	0x100		/* look at CCP packets */</div><div class='del'>-#define CCP_ISUP	0x200		/* do packet comp/decomp */</div><div class='del'>-#define CCP_ERROR	0x400		/* (status) error in packet decomp */</div><div class='del'>-#define CCP_FATALERROR	0x800		/* (status) fatal error ditto */</div><div class='del'>-#define CCP_COMP_RUN	0x1000		/* (status) seen CCP ack sent */</div><div class='del'>-#define CCP_DECOMP_RUN	0x2000		/* (status) seen CCP ack rcvd */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for 8-bit-clean flags.</div><div class='del'>- */</div><div class='del'>-#define RCV_B7_0	1		/* have rcvd char with bit 7 = 0 */</div><div class='del'>-#define RCV_B7_1	2		/* have rcvd char with bit 7 = 1 */</div><div class='del'>-#define RCV_EVNP	4		/* have rcvd char with even parity */</div><div class='del'>-#define RCV_ODDP	8		/* have rcvd char with odd parity */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for the first byte of M_CTL messages passed between</div><div class='del'>- * PPP modules.</div><div class='del'>- */</div><div class='del'>-#define PPPCTL_OERROR	0xe0		/* output error [up] */</div><div class='del'>-#define PPPCTL_IERROR	0xe1		/* input error (e.g. FCS) [up] */</div><div class='del'>-#define PPPCTL_MTU	0xe2		/* set MTU [down] */</div><div class='del'>-#define PPPCTL_MRU	0xe3		/* set MRU [down] */</div><div class='del'>-#define PPPCTL_UNIT	0xe4		/* note PPP unit number [down] */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for the integer argument to PPPIO_DEBUG.</div><div class='del'>- */</div><div class='del'>-#define PPPDBG_DUMP	0x10000		/* print out debug info now */</div><div class='del'>-#define PPPDBG_LOG	0x100		/* log various things */</div><div class='del'>-#define PPPDBG_DRIVER	0		/* identifies ppp driver as target */</div><div class='del'>-#define PPPDBG_IF	1		/* identifies ppp network i/f target */</div><div class='del'>-#define PPPDBG_COMP	2		/* identifies ppp compression target */</div><div class='del'>-#define PPPDBG_AHDLC	3		/* identifies ppp async hdlc target */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/slcompress.h b/mdk-stage1/ppp/include/net/slcompress.h<br/>deleted file mode 100644<br/>index 9e19bc0ed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/slcompress.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/slcompress.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,148 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Definitions for tcp compression routines.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Regents of the University of California.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the University of California, Berkeley.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- *	Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:</div><div class='del'>- *	- Initial distribution.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _SLCOMPRESS_H_</div><div class='del'>-#define _SLCOMPRESS_H_</div><div class='del'>-</div><div class='del'>-#define MAX_STATES 16		/* must be &gt; 2 and &lt; 256 */</div><div class='del'>-#define MAX_HDR MLEN		/* XXX 4bsd-ism: should really be 128 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Compressed packet format:</div><div class='del'>- *</div><div class='del'>- * The first octet contains the packet type (top 3 bits), TCP</div><div class='del'>- * 'push' bit, and flags that indicate which of the 4 TCP sequence</div><div class='del'>- * numbers have changed (bottom 5 bits).  The next octet is a</div><div class='del'>- * conversation number that associates a saved IP/TCP header with</div><div class='del'>- * the compressed packet.  The next two octets are the TCP checksum</div><div class='del'>- * from the original datagram.  The next 0 to 15 octets are</div><div class='del'>- * sequence number changes, one change per bit set in the header</div><div class='del'>- * (there may be no changes and there are two special cases where</div><div class='del'>- * the receiver implicitly knows what changed -- see below).</div><div class='del'>- * </div><div class='del'>- * There are 5 numbers which can change (they are always inserted</div><div class='del'>- * in the following order): TCP urgent pointer, window,</div><div class='del'>- * acknowlegement, sequence number and IP ID.  (The urgent pointer</div><div class='del'>- * is different from the others in that its value is sent, not the</div><div class='del'>- * change in value.)  Since typical use of SLIP links is biased</div><div class='del'>- * toward small packets (see comments on MTU/MSS below), changes</div><div class='del'>- * use a variable length coding with one octet for numbers in the</div><div class='del'>- * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the</div><div class='del'>- * range 256 - 65535 or 0.  (If the change in sequence number or</div><div class='del'>- * ack is more than 65535, an uncompressed packet is sent.)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Packet types (must not conflict with IP protocol version)</div><div class='del'>- *</div><div class='del'>- * The top nibble of the first octet is the packet type.  There are</div><div class='del'>- * three possible types: IP (not proto TCP or tcp with one of the</div><div class='del'>- * control flags set); uncompressed TCP (a normal IP/TCP packet but</div><div class='del'>- * with the 8-bit protocol field replaced by an 8-bit connection id --</div><div class='del'>- * this type of packet syncs the sender &amp; receiver); and compressed</div><div class='del'>- * TCP (described above).</div><div class='del'>- *</div><div class='del'>- * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and</div><div class='del'>- * is logically part of the 4-bit "changes" field that follows.  Top</div><div class='del'>- * three bits are actual packet type.  For backward compatibility</div><div class='del'>- * and in the interest of conserving bits, numbers are chosen so the</div><div class='del'>- * IP protocol version number (4) which normally appears in this nibble</div><div class='del'>- * means "IP packet".</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* packet types */</div><div class='del'>-#define TYPE_IP 0x40</div><div class='del'>-#define TYPE_UNCOMPRESSED_TCP 0x70</div><div class='del'>-#define TYPE_COMPRESSED_TCP 0x80</div><div class='del'>-#define TYPE_ERROR 0x00</div><div class='del'>-</div><div class='del'>-/* Bits in first octet of compressed packet */</div><div class='del'>-#define NEW_C	0x40	/* flag bits for what changed in a packet */</div><div class='del'>-#define NEW_I	0x20</div><div class='del'>-#define NEW_S	0x08</div><div class='del'>-#define NEW_A	0x04</div><div class='del'>-#define NEW_W	0x02</div><div class='del'>-#define NEW_U	0x01</div><div class='del'>-</div><div class='del'>-/* reserved, special-case values of above */</div><div class='del'>-#define SPECIAL_I (NEW_S|NEW_W|NEW_U)		/* echoed interactive traffic */</div><div class='del'>-#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U)	/* unidirectional data */</div><div class='del'>-#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U)</div><div class='del'>-</div><div class='del'>-#define TCP_PUSH_BIT 0x10</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * "state" data for each active tcp conversation on the wire.  This is</div><div class='del'>- * basically a copy of the entire IP/TCP header from the last packet</div><div class='del'>- * we saw from the conversation together with a small identifier</div><div class='del'>- * the transmit &amp; receive ends of the line use to locate saved header.</div><div class='del'>- */</div><div class='del'>-struct cstate {</div><div class='del'>-	struct cstate *cs_next;	/* next most recently used cstate (xmit only) */</div><div class='del'>-	u_short cs_hlen;	/* size of hdr (receive only) */</div><div class='del'>-	u_char cs_id;		/* connection # associated with this state */</div><div class='del'>-	u_char cs_filler;</div><div class='del'>-	union {</div><div class='del'>-		char csu_hdr[MAX_HDR];</div><div class='del'>-		struct ip csu_ip;	/* ip/tcp hdr from most recent packet */</div><div class='del'>-	} slcs_u;</div><div class='del'>-};</div><div class='del'>-#define cs_ip slcs_u.csu_ip</div><div class='del'>-#define cs_hdr slcs_u.csu_hdr</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * all the state data for one serial line (we need one of these</div><div class='del'>- * per line).</div><div class='del'>- */</div><div class='del'>-struct slcompress {</div><div class='del'>-	struct cstate *last_cs;	/* most recently used tstate */</div><div class='del'>-	u_char last_recv;	/* last rcvd conn. id */</div><div class='del'>-	u_char last_xmit;	/* last sent conn. id */</div><div class='del'>-	u_short flags;</div><div class='del'>-#ifndef SL_NO_STATS</div><div class='del'>-	int sls_packets;	/* outbound packets */</div><div class='del'>-	int sls_compressed;	/* outbound compressed packets */</div><div class='del'>-	int sls_searches;	/* searches for connection state */</div><div class='del'>-	int sls_misses;		/* times couldn't find conn. state */</div><div class='del'>-	int sls_uncompressedin;	/* inbound uncompressed packets */</div><div class='del'>-	int sls_compressedin;	/* inbound compressed packets */</div><div class='del'>-	int sls_errorin;	/* inbound unknown type packets */</div><div class='del'>-	int sls_tossed;		/* inbound packets tossed because of error */</div><div class='del'>-#endif</div><div class='del'>-	struct cstate tstate[MAX_STATES];	/* xmit connection states */</div><div class='del'>-	struct cstate rstate[MAX_STATES];	/* receive connection states */</div><div class='del'>-};</div><div class='del'>-/* flag values */</div><div class='del'>-#define SLF_TOSS 1		/* tossing rcvd frames because of input err */</div><div class='del'>-</div><div class='del'>-void	sl_compress_init __P((struct slcompress *));</div><div class='del'>-void	sl_compress_setup __P((struct slcompress *, int));</div><div class='del'>-u_int	sl_compress_tcp __P((struct mbuf *,</div><div class='del'>-	    struct ip *, struct slcompress *, int));</div><div class='del'>-int	sl_uncompress_tcp __P((u_char **, int, u_int, struct slcompress *));</div><div class='del'>-int	sl_uncompress_tcp_core __P((u_char *, int, int, u_int,</div><div class='del'>-	    struct slcompress *, u_char **, u_int *));</div><div class='del'>-</div><div class='del'>-#endif /* _SLCOMPRESS_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/net/vjcompress.h b/mdk-stage1/ppp/include/net/vjcompress.h<br/>deleted file mode 100644<br/>index c64596926..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/net/vjcompress.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/net/vjcompress.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,144 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Definitions for tcp compression routines.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Regents of the University of California.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the University of California, Berkeley.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- *	Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:</div><div class='del'>- *	- Initial distribution.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef _VJCOMPRESS_H_</div><div class='del'>-#define _VJCOMPRESS_H_</div><div class='del'>-</div><div class='del'>-#define MAX_STATES 16		/* must be &gt; 2 and &lt; 256 */</div><div class='del'>-#define MAX_HDR	   128</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Compressed packet format:</div><div class='del'>- *</div><div class='del'>- * The first octet contains the packet type (top 3 bits), TCP</div><div class='del'>- * 'push' bit, and flags that indicate which of the 4 TCP sequence</div><div class='del'>- * numbers have changed (bottom 5 bits).  The next octet is a</div><div class='del'>- * conversation number that associates a saved IP/TCP header with</div><div class='del'>- * the compressed packet.  The next two octets are the TCP checksum</div><div class='del'>- * from the original datagram.  The next 0 to 15 octets are</div><div class='del'>- * sequence number changes, one change per bit set in the header</div><div class='del'>- * (there may be no changes and there are two special cases where</div><div class='del'>- * the receiver implicitly knows what changed -- see below).</div><div class='del'>- * </div><div class='del'>- * There are 5 numbers which can change (they are always inserted</div><div class='del'>- * in the following order): TCP urgent pointer, window,</div><div class='del'>- * acknowlegement, sequence number and IP ID.  (The urgent pointer</div><div class='del'>- * is different from the others in that its value is sent, not the</div><div class='del'>- * change in value.)  Since typical use of SLIP links is biased</div><div class='del'>- * toward small packets (see comments on MTU/MSS below), changes</div><div class='del'>- * use a variable length coding with one octet for numbers in the</div><div class='del'>- * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the</div><div class='del'>- * range 256 - 65535 or 0.  (If the change in sequence number or</div><div class='del'>- * ack is more than 65535, an uncompressed packet is sent.)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Packet types (must not conflict with IP protocol version)</div><div class='del'>- *</div><div class='del'>- * The top nibble of the first octet is the packet type.  There are</div><div class='del'>- * three possible types: IP (not proto TCP or tcp with one of the</div><div class='del'>- * control flags set); uncompressed TCP (a normal IP/TCP packet but</div><div class='del'>- * with the 8-bit protocol field replaced by an 8-bit connection id --</div><div class='del'>- * this type of packet syncs the sender &amp; receiver); and compressed</div><div class='del'>- * TCP (described above).</div><div class='del'>- *</div><div class='del'>- * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and</div><div class='del'>- * is logically part of the 4-bit "changes" field that follows.  Top</div><div class='del'>- * three bits are actual packet type.  For backward compatibility</div><div class='del'>- * and in the interest of conserving bits, numbers are chosen so the</div><div class='del'>- * IP protocol version number (4) which normally appears in this nibble</div><div class='del'>- * means "IP packet".</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* packet types */</div><div class='del'>-#define TYPE_IP 0x40</div><div class='del'>-#define TYPE_UNCOMPRESSED_TCP 0x70</div><div class='del'>-#define TYPE_COMPRESSED_TCP 0x80</div><div class='del'>-#define TYPE_ERROR 0x00</div><div class='del'>-</div><div class='del'>-/* Bits in first octet of compressed packet */</div><div class='del'>-#define NEW_C	0x40	/* flag bits for what changed in a packet */</div><div class='del'>-#define NEW_I	0x20</div><div class='del'>-#define NEW_S	0x08</div><div class='del'>-#define NEW_A	0x04</div><div class='del'>-#define NEW_W	0x02</div><div class='del'>-#define NEW_U	0x01</div><div class='del'>-</div><div class='del'>-/* reserved, special-case values of above */</div><div class='del'>-#define SPECIAL_I (NEW_S|NEW_W|NEW_U)		/* echoed interactive traffic */</div><div class='del'>-#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U)	/* unidirectional data */</div><div class='del'>-#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U)</div><div class='del'>-</div><div class='del'>-#define TCP_PUSH_BIT 0x10</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * "state" data for each active tcp conversation on the wire.  This is</div><div class='del'>- * basically a copy of the entire IP/TCP header from the last packet</div><div class='del'>- * we saw from the conversation together with a small identifier</div><div class='del'>- * the transmit &amp; receive ends of the line use to locate saved header.</div><div class='del'>- */</div><div class='del'>-struct cstate {</div><div class='del'>-    struct cstate *cs_next;	/* next most recently used state (xmit only) */</div><div class='del'>-    u_short cs_hlen;		/* size of hdr (receive only) */</div><div class='del'>-    u_char cs_id;		/* connection # associated with this state */</div><div class='del'>-    u_char cs_filler;</div><div class='del'>-    union {</div><div class='del'>-	char csu_hdr[MAX_HDR];</div><div class='del'>-	struct ip csu_ip;	/* ip/tcp hdr from most recent packet */</div><div class='del'>-    } vjcs_u;</div><div class='del'>-};</div><div class='del'>-#define cs_ip vjcs_u.csu_ip</div><div class='del'>-#define cs_hdr vjcs_u.csu_hdr</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * all the state data for one serial line (we need one of these per line).</div><div class='del'>- */</div><div class='del'>-struct vjcompress {</div><div class='del'>-    struct cstate *last_cs;	/* most recently used tstate */</div><div class='del'>-    u_char last_recv;		/* last rcvd conn. id */</div><div class='del'>-    u_char last_xmit;		/* last sent conn. id */</div><div class='del'>-    u_short flags;</div><div class='del'>-#ifndef VJ_NO_STATS</div><div class='del'>-    struct vjstat stats;</div><div class='del'>-#endif</div><div class='del'>-    struct cstate tstate[MAX_STATES];	/* xmit connection states */</div><div class='del'>-    struct cstate rstate[MAX_STATES];	/* receive connection states */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* flag values */</div><div class='del'>-#define VJF_TOSS 1		/* tossing rcvd frames because of input err */</div><div class='del'>-</div><div class='del'>-extern void  vj_compress_init __P((struct vjcompress *comp, int max_state));</div><div class='del'>-extern u_int vj_compress_tcp __P((struct ip *ip, u_int mlen,</div><div class='del'>-				struct vjcompress *comp, int compress_cid_flag,</div><div class='del'>-				u_char **vjhdrp));</div><div class='del'>-extern void  vj_uncompress_err __P((struct vjcompress *comp));</div><div class='del'>-extern int   vj_uncompress_uncomp __P((u_char *buf, int buflen,</div><div class='del'>-				struct vjcompress *comp));</div><div class='del'>-extern int   vj_uncompress_tcp __P((u_char *buf, int buflen, int total_len,</div><div class='del'>-				struct vjcompress *comp, u_char **hdrp,</div><div class='del'>-				u_int *hlenp));</div><div class='del'>-</div><div class='del'>-#endif /* _VJCOMPRESS_H_ */</div><div class='head'>diff --git a/mdk-stage1/ppp/include/pcap-int.h b/mdk-stage1/ppp/include/pcap-int.h<br/>deleted file mode 100644<br/>index 323994929..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/include/pcap-int.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/include/pcap-int.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,117 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Copyright (c) 1994, 1995, 1996</div><div class='del'>- *	The Regents of the University of California.  All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms, with or without</div><div class='del'>- * modification, are permitted provided that the following conditions</div><div class='del'>- * are met:</div><div class='del'>- * 1. Redistributions of source code must retain the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer.</div><div class='del'>- * 2. Redistributions in binary form must reproduce the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer in the</div><div class='del'>- *    documentation and/or other materials provided with the distribution.</div><div class='del'>- * 3. All advertising materials mentioning features or use of this software</div><div class='del'>- *    must display the following acknowledgement:</div><div class='del'>- *	This product includes software developed by the Computer Systems</div><div class='del'>- *	Engineering Group at Lawrence Berkeley Laboratory.</div><div class='del'>- * 4. Neither the name of the University nor of the Laboratory may be used</div><div class='del'>- *    to endorse or promote products derived from this software without</div><div class='del'>- *    specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND</div><div class='del'>- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</div><div class='del'>- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE</div><div class='del'>- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</div><div class='del'>- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</div><div class='del'>- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</div><div class='del'>- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</div><div class='del'>- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</div><div class='del'>- * SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * @(#) $Header$ (LBL)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef pcap_int_h</div><div class='del'>-#define pcap_int_h</div><div class='del'>-</div><div class='del'>-#include &lt;pcap.h&gt;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Savefile</div><div class='del'>- */</div><div class='del'>-struct pcap_sf {</div><div class='del'>-	FILE *rfile;</div><div class='del'>-	int swapped;</div><div class='del'>-	int version_major;</div><div class='del'>-	int version_minor;</div><div class='del'>-	u_char *base;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct pcap_md {</div><div class='del'>-	struct pcap_stat stat;</div><div class='del'>-	/*XXX*/</div><div class='del'>-	int use_bpf;</div><div class='del'>-	u_long	TotPkts;	/* can't oflow for 79 hrs on ether */</div><div class='del'>-	u_long	TotAccepted;	/* count accepted by filter */</div><div class='del'>-	u_long	TotDrops;	/* count of dropped packets */</div><div class='del'>-	long	TotMissed;	/* missed by i/f during this run */</div><div class='del'>-	long	OrigMissed;	/* missed by i/f before this run */</div><div class='del'>-#ifdef linux</div><div class='del'>-	int pad;</div><div class='del'>-	int skip;</div><div class='del'>-	char *device;</div><div class='del'>-#endif</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct pcap {</div><div class='del'>-	int fd;</div><div class='del'>-	int snapshot;</div><div class='del'>-	int linktype;</div><div class='del'>-	int tzoff;		/* timezone offset */</div><div class='del'>-	int offset;		/* offset for proper alignment */</div><div class='del'>-</div><div class='del'>-	struct pcap_sf sf;</div><div class='del'>-	struct pcap_md md;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Read buffer.</div><div class='del'>-	 */</div><div class='del'>-	int bufsize;</div><div class='del'>-	u_char *buffer;</div><div class='del'>-	u_char *bp;</div><div class='del'>-	int cc;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Place holder for pcap_next().</div><div class='del'>-	 */</div><div class='del'>-	u_char *pkt;</div><div class='del'>-</div><div class='del'>-	</div><div class='del'>-	/*</div><div class='del'>-	 * Placeholder for filter code if bpf not in kernel.</div><div class='del'>-	 */</div><div class='del'>-	struct bpf_program fcode;</div><div class='del'>-</div><div class='del'>-	char errbuf[PCAP_ERRBUF_SIZE];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int	yylex(void);</div><div class='del'>-</div><div class='del'>-#ifndef min</div><div class='del'>-#define min(a, b) ((a) &gt; (b) ? (b) : (a))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* XXX should these be in pcap.h? */</div><div class='del'>-int	pcap_offline_read(pcap_t *, int, pcap_handler, u_char *);</div><div class='del'>-int	pcap_read(pcap_t *, int cnt, pcap_handler, u_char *);</div><div class='del'>-</div><div class='del'>-/* Ultrix pads to make everything line up on a nice boundary */</div><div class='del'>-#if defined(ultrix) || defined(__alpha)</div><div class='del'>-#define       PCAP_FDDIPAD 3</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* XXX */</div><div class='del'>-extern	int pcap_fddipad;</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/ppp/linux/Makefile.top b/mdk-stage1/ppp/linux/Makefile.top<br/>deleted file mode 100644<br/>index fa34ce59f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/linux/Makefile.top?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/linux/Makefile.top</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,55 +0,0 @@</div><div class='del'>-# PPP top-level Makefile for Linux.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-BINDIR = $(DESTDIR)/usr/sbin</div><div class='del'>-MANDIR = $(DESTDIR)/usr/man</div><div class='del'>-ETCDIR = $(DESTDIR)/etc/ppp</div><div class='del'>-</div><div class='del'>-# uid 0 = root</div><div class='del'>-INSTALL= install</div><div class='del'>-</div><div class='del'>-all:</div><div class='del'>-	cd chat; $(MAKE) $(MFLAGS) all</div><div class='del'>-	cd pppd; $(MAKE) $(MFLAGS) all</div><div class='del'>-	cd pppstats; $(MAKE) $(MFLAGS) all</div><div class='del'>-	cd pppdump; $(MAKE) $(MFLAGS) all</div><div class='del'>-</div><div class='del'>-install: $(BINDIR) $(MANDIR)/man8 install-progs install-etcppp</div><div class='del'>-</div><div class='del'>-install-progs:</div><div class='del'>-	cd chat; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) $(MFLAGS) install</div><div class='del'>-	cd pppd; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) $(MFLAGS) install</div><div class='del'>-	cd pppstats; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) $(MFLAGS) install</div><div class='del'>-	cd pppdump; $(MAKE) BINDIR=$(BINDIR) MANDIR=$(MANDIR) $(MFLAGS) install</div><div class='del'>-</div><div class='del'>-install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \</div><div class='del'>-	$(ETCDIR)/chap-secrets</div><div class='del'>-</div><div class='del'>-$(ETCDIR)/options:</div><div class='del'>-	$(INSTALL) -c -m 644 etc.ppp/options $@</div><div class='del'>-$(ETCDIR)/pap-secrets:</div><div class='del'>-	$(INSTALL) -c -m 600 etc.ppp/pap-secrets $@</div><div class='del'>-$(ETCDIR)/chap-secrets:</div><div class='del'>-	$(INSTALL) -c -m 600 etc.ppp/chap-secrets $@</div><div class='del'>-</div><div class='del'>-$(BINDIR):</div><div class='del'>-	$(INSTALL) -d -m 755 $@</div><div class='del'>-$(MANDIR)/man8:</div><div class='del'>-	$(INSTALL) -d -m 755 $@</div><div class='del'>-$(ETCDIR):</div><div class='del'>-	$(INSTALL) -d -m 755 $@</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f `find . -name '*.[oas]' -print`</div><div class='del'>-	rm -f `find . -name 'core' -print`</div><div class='del'>-	rm -f `find . -name '*~' -print`</div><div class='del'>-	cd chat; $(MAKE) clean</div><div class='del'>-	cd pppd; $(MAKE) clean</div><div class='del'>-	cd pppstats; $(MAKE) clean</div><div class='del'>-	cd pppdump; $(MAKE) clean</div><div class='del'>-</div><div class='del'>-dist-clean:	clean</div><div class='del'>-	rm -f Makefile `find . -name Makefile -print`</div><div class='del'>-</div><div class='del'>-#kernel:</div><div class='del'>-#	cd linux; ./kinstall.sh</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/bsd-comp.c b/mdk-stage1/ppp/modules/bsd-comp.c<br/>deleted file mode 100644<br/>index b1b9325c7..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/bsd-comp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/bsd-comp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1116 +0,0 @@</div><div class='del'>-/* Because this code is derived from the 4.3BSD compress source:</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1985, 1986 The Regents of the University of California.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * This code is derived from software contributed to Berkeley by</div><div class='del'>- * James A. Woods, derived from original work by Spencer Thomas</div><div class='del'>- * and Joseph Orost.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms, with or without</div><div class='del'>- * modification, are permitted provided that the following conditions</div><div class='del'>- * are met:</div><div class='del'>- * 1. Redistributions of source code must retain the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer.</div><div class='del'>- * 2. Redistributions in binary form must reproduce the above copyright</div><div class='del'>- *    notice, this list of conditions and the following disclaimer in the</div><div class='del'>- *    documentation and/or other materials provided with the distribution.</div><div class='del'>- * 3. All advertising materials mentioning features or use of this software</div><div class='del'>- *    must display the following acknowledgement:</div><div class='del'>- *	This product includes software developed by the University of</div><div class='del'>- *	California, Berkeley and its contributors.</div><div class='del'>- * 4. Neither the name of the University nor the names of its contributors</div><div class='del'>- *    may be used to endorse or promote products derived from this software</div><div class='del'>- *    without specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND</div><div class='del'>- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</div><div class='del'>- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div class='del'>- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE</div><div class='del'>- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</div><div class='del'>- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</div><div class='del'>- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</div><div class='del'>- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</div><div class='del'>- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</div><div class='del'>- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</div><div class='del'>- * SUCH DAMAGE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This version is for use with STREAMS under SunOS 4.x,</div><div class='del'>- * Digital UNIX, AIX 4.x, and SVR4 systems including Solaris 2.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef AIX4</div><div class='del'>-#include &lt;net/net_globals.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#include &lt;sys/byteorder.h&gt;</div><div class='del'>-#ifndef _BIG_ENDIAN</div><div class='del'>-#define BSD_LITTLE_ENDIAN</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#undef FIRST</div><div class='del'>-#undef LAST</div><div class='del'>-#define BSD_LITTLE_ENDIAN</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define PACKETPTR	mblk_t *</div><div class='del'>-#include &lt;net/ppp-comp.h&gt;</div><div class='del'>-</div><div class='del'>-#if DO_BSD_COMPRESS</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * PPP "BSD compress" compression</div><div class='del'>- *  The differences between this compression and the classic BSD LZW</div><div class='del'>- *  source are obvious from the requirement that the classic code worked</div><div class='del'>- *  with files while this handles arbitrarily long streams that</div><div class='del'>- *  are broken into packets.  They are:</div><div class='del'>- *</div><div class='del'>- *	When the code size expands, a block of junk is not emitted by</div><div class='del'>- *	    the compressor and not expected by the decompressor.</div><div class='del'>- *</div><div class='del'>- *	New codes are not necessarily assigned every time an old</div><div class='del'>- *	    code is output by the compressor.  This is because a packet</div><div class='del'>- *	    end forces a code to be emitted, but does not imply that a</div><div class='del'>- *	    new sequence has been seen.</div><div class='del'>- *</div><div class='del'>- *	The compression ratio is checked at the first end of a packet</div><div class='del'>- *	    after the appropriate gap.	Besides simplifying and speeding</div><div class='del'>- *	    things up, this makes it more likely that the transmitter</div><div class='del'>- *	    and receiver will agree when the dictionary is cleared when</div><div class='del'>- *	    compression is not going well.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A dictionary for doing BSD compress.</div><div class='del'>- */</div><div class='del'>-struct bsd_db {</div><div class='del'>-    int	    totlen;			/* length of this structure */</div><div class='del'>-    u_int   hsize;			/* size of the hash table */</div><div class='del'>-    u_char  hshift;			/* used in hash function */</div><div class='del'>-    u_char  n_bits;			/* current bits/code */</div><div class='del'>-    u_char  maxbits;</div><div class='del'>-    u_char  debug;</div><div class='del'>-    u_char  unit;</div><div class='del'>-    u_short seqno;			/* sequence number of next packet */</div><div class='del'>-    u_int   hdrlen;			/* header length to preallocate */</div><div class='del'>-    u_int   mru;</div><div class='del'>-    u_int   maxmaxcode;			/* largest valid code */</div><div class='del'>-    u_int   max_ent;			/* largest code in use */</div><div class='del'>-    u_int   in_count;			/* uncompressed bytes, aged */</div><div class='del'>-    u_int   bytes_out;			/* compressed bytes, aged */</div><div class='del'>-    u_int   ratio;			/* recent compression ratio */</div><div class='del'>-    u_int   checkpoint;			/* when to next check the ratio */</div><div class='del'>-    u_int   clear_count;		/* times dictionary cleared */</div><div class='del'>-    u_int   incomp_count;		/* incompressible packets */</div><div class='del'>-    u_int   incomp_bytes;		/* incompressible bytes */</div><div class='del'>-    u_int   uncomp_count;		/* uncompressed packets */</div><div class='del'>-    u_int   uncomp_bytes;		/* uncompressed bytes */</div><div class='del'>-    u_int   comp_count;			/* compressed packets */</div><div class='del'>-    u_int   comp_bytes;			/* compressed bytes */</div><div class='del'>-    u_short *lens;			/* array of lengths of codes */</div><div class='del'>-    struct bsd_dict {</div><div class='del'>-	union {				/* hash value */</div><div class='del'>-	    u_int32_t	fcode;</div><div class='del'>-	    struct {</div><div class='del'>-#ifdef BSD_LITTLE_ENDIAN</div><div class='del'>-		u_short prefix;		/* preceding code */</div><div class='del'>-		u_char	suffix;		/* last character of new code */</div><div class='del'>-		u_char	pad;</div><div class='del'>-#else</div><div class='del'>-		u_char	pad;</div><div class='del'>-		u_char	suffix;		/* last character of new code */</div><div class='del'>-		u_short prefix;		/* preceding code */</div><div class='del'>-#endif</div><div class='del'>-	    } hs;</div><div class='del'>-	} f;</div><div class='del'>-	u_short codem1;			/* output of hash table -1 */</div><div class='del'>-	u_short cptr;			/* map code to hash table entry */</div><div class='del'>-    } dict[1];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define BSD_OVHD	2		/* BSD compress overhead/packet */</div><div class='del'>-#define BSD_INIT_BITS	BSD_MIN_BITS</div><div class='del'>-</div><div class='del'>-static void	*bsd_comp_alloc __P((u_char *options, int opt_len));</div><div class='del'>-static void	*bsd_decomp_alloc __P((u_char *options, int opt_len));</div><div class='del'>-static void	bsd_free __P((void *state));</div><div class='del'>-static int	bsd_comp_init __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				   int unit, int hdrlen, int debug));</div><div class='del'>-static int	bsd_decomp_init __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				     int unit, int hdrlen, int mru, int debug));</div><div class='del'>-static int	bsd_compress __P((void *state, mblk_t **mret,</div><div class='del'>-				  mblk_t *mp, int slen, int maxolen));</div><div class='del'>-static void	bsd_incomp __P((void *state, mblk_t *dmsg));</div><div class='del'>-static int	bsd_decompress __P((void *state, mblk_t *cmp, mblk_t **dmpp));</div><div class='del'>-static void	bsd_reset __P((void *state));</div><div class='del'>-static void	bsd_comp_stats __P((void *state, struct compstat *stats));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Procedures exported to ppp_comp.c.</div><div class='del'>- */</div><div class='del'>-struct compressor ppp_bsd_compress = {</div><div class='del'>-    CI_BSD_COMPRESS,		/* compress_proto */</div><div class='del'>-    bsd_comp_alloc,		/* comp_alloc */</div><div class='del'>-    bsd_free,			/* comp_free */</div><div class='del'>-    bsd_comp_init,		/* comp_init */</div><div class='del'>-    bsd_reset,			/* comp_reset */</div><div class='del'>-    bsd_compress,		/* compress */</div><div class='del'>-    bsd_comp_stats,		/* comp_stat */</div><div class='del'>-    bsd_decomp_alloc,		/* decomp_alloc */</div><div class='del'>-    bsd_free,			/* decomp_free */</div><div class='del'>-    bsd_decomp_init,		/* decomp_init */</div><div class='del'>-    bsd_reset,			/* decomp_reset */</div><div class='del'>-    bsd_decompress,		/* decompress */</div><div class='del'>-    bsd_incomp,			/* incomp */</div><div class='del'>-    bsd_comp_stats,		/* decomp_stat */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * the next two codes should not be changed lightly, as they must not</div><div class='del'>- * lie within the contiguous general code space.</div><div class='del'>- */</div><div class='del'>-#define CLEAR	256			/* table clear output code */</div><div class='del'>-#define FIRST	257			/* first free entry */</div><div class='del'>-#define LAST	255</div><div class='del'>-</div><div class='del'>-#define MAXCODE(b)	((1 &lt;&lt; (b)) - 1)</div><div class='del'>-#define BADCODEM1	MAXCODE(BSD_MAX_BITS)</div><div class='del'>-</div><div class='del'>-#define BSD_HASH(prefix,suffix,hshift)	((((u_int32_t)(suffix)) &lt;&lt; (hshift)) \</div><div class='del'>-					 ^ (u_int32_t)(prefix))</div><div class='del'>-#define BSD_KEY(prefix,suffix)		((((u_int32_t)(suffix)) &lt;&lt; 16) \</div><div class='del'>-					 + (u_int32_t)(prefix))</div><div class='del'>-</div><div class='del'>-#define CHECK_GAP	10000		/* Ratio check interval */</div><div class='del'>-</div><div class='del'>-#define RATIO_SCALE_LOG	8</div><div class='del'>-#define RATIO_SCALE	(1&lt;&lt;RATIO_SCALE_LOG)</div><div class='del'>-#define RATIO_MAX	(0x7fffffff&gt;&gt;RATIO_SCALE_LOG)</div><div class='del'>-</div><div class='del'>-#define DECOMP_CHUNK	256</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * clear the dictionary</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-bsd_clear(db)</div><div class='del'>-    struct bsd_db *db;</div><div class='del'>-{</div><div class='del'>-    db-&gt;clear_count++;</div><div class='del'>-    db-&gt;max_ent = FIRST-1;</div><div class='del'>-    db-&gt;n_bits = BSD_INIT_BITS;</div><div class='del'>-    db-&gt;ratio = 0;</div><div class='del'>-    db-&gt;bytes_out = 0;</div><div class='del'>-    db-&gt;in_count = 0;</div><div class='del'>-    db-&gt;checkpoint = CHECK_GAP;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If the dictionary is full, then see if it is time to reset it.</div><div class='del'>- *</div><div class='del'>- * Compute the compression ratio using fixed-point arithmetic</div><div class='del'>- * with 8 fractional bits.</div><div class='del'>- *</div><div class='del'>- * Since we have an infinite stream instead of a single file,</div><div class='del'>- * watch only the local compression ratio.</div><div class='del'>- *</div><div class='del'>- * Since both peers must reset the dictionary at the same time even in</div><div class='del'>- * the absence of CLEAR codes (while packets are incompressible), they</div><div class='del'>- * must compute the same ratio.</div><div class='del'>- */</div><div class='del'>-static int				/* 1=output CLEAR */</div><div class='del'>-bsd_check(db)</div><div class='del'>-    struct bsd_db *db;</div><div class='del'>-{</div><div class='del'>-    u_int new_ratio;</div><div class='del'>-</div><div class='del'>-    if (db-&gt;in_count &gt;= db-&gt;checkpoint) {</div><div class='del'>-	/* age the ratio by limiting the size of the counts */</div><div class='del'>-	if (db-&gt;in_count &gt;= RATIO_MAX</div><div class='del'>-	    || db-&gt;bytes_out &gt;= RATIO_MAX) {</div><div class='del'>-	    db-&gt;in_count -= db-&gt;in_count/4;</div><div class='del'>-	    db-&gt;bytes_out -= db-&gt;bytes_out/4;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	db-&gt;checkpoint = db-&gt;in_count + CHECK_GAP;</div><div class='del'>-</div><div class='del'>-	if (db-&gt;max_ent &gt;= db-&gt;maxmaxcode) {</div><div class='del'>-	    /* Reset the dictionary only if the ratio is worse,</div><div class='del'>-	     * or if it looks as if it has been poisoned</div><div class='del'>-	     * by incompressible data.</div><div class='del'>-	     *</div><div class='del'>-	     * This does not overflow, because</div><div class='del'>-	     *	db-&gt;in_count &lt;= RATIO_MAX.</div><div class='del'>-	     */</div><div class='del'>-	    new_ratio = db-&gt;in_count &lt;&lt; RATIO_SCALE_LOG;</div><div class='del'>-	    if (db-&gt;bytes_out != 0)</div><div class='del'>-		new_ratio /= db-&gt;bytes_out;</div><div class='del'>-</div><div class='del'>-	    if (new_ratio &lt; db-&gt;ratio || new_ratio &lt; 1 * RATIO_SCALE) {</div><div class='del'>-		bsd_clear(db);</div><div class='del'>-		return 1;</div><div class='del'>-	    }</div><div class='del'>-	    db-&gt;ratio = new_ratio;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return statistics.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-bsd_comp_stats(state, stats)</div><div class='del'>-    void *state;</div><div class='del'>-    struct compstat *stats;</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-    u_int out;</div><div class='del'>-</div><div class='del'>-    stats-&gt;unc_bytes = db-&gt;uncomp_bytes;</div><div class='del'>-    stats-&gt;unc_packets = db-&gt;uncomp_count;</div><div class='del'>-    stats-&gt;comp_bytes = db-&gt;comp_bytes;</div><div class='del'>-    stats-&gt;comp_packets = db-&gt;comp_count;</div><div class='del'>-    stats-&gt;inc_bytes = db-&gt;incomp_bytes;</div><div class='del'>-    stats-&gt;inc_packets = db-&gt;incomp_count;</div><div class='del'>-    stats-&gt;ratio = db-&gt;in_count;</div><div class='del'>-    out = db-&gt;bytes_out;</div><div class='del'>-    if (stats-&gt;ratio &lt;= 0x7fffff)</div><div class='del'>-	stats-&gt;ratio &lt;&lt;= 8;</div><div class='del'>-    else</div><div class='del'>-	out &gt;&gt;= 8;</div><div class='del'>-    if (out != 0)</div><div class='del'>-	stats-&gt;ratio /= out;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Reset state, as on a CCP ResetReq.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-bsd_reset(state)</div><div class='del'>-    void *state;</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-</div><div class='del'>-    db-&gt;seqno = 0;</div><div class='del'>-    bsd_clear(db);</div><div class='del'>-    db-&gt;clear_count = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Allocate space for a (de) compressor.</div><div class='del'>- */</div><div class='del'>-static void *</div><div class='del'>-bsd_alloc(options, opt_len, decomp)</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, decomp;</div><div class='del'>-{</div><div class='del'>-    int bits;</div><div class='del'>-    u_int newlen, hsize, hshift, maxmaxcode;</div><div class='del'>-    struct bsd_db *db;</div><div class='del'>-</div><div class='del'>-    if (opt_len != 3 || options[0] != CI_BSD_COMPRESS || options[1] != 3</div><div class='del'>-	|| BSD_VERSION(options[2]) != BSD_CURRENT_VERSION)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-    bits = BSD_NBITS(options[2]);</div><div class='del'>-    switch (bits) {</div><div class='del'>-    case 9:			/* needs 82152 for both directions */</div><div class='del'>-    case 10:			/* needs 84144 */</div><div class='del'>-    case 11:			/* needs 88240 */</div><div class='del'>-    case 12:			/* needs 96432 */</div><div class='del'>-	hsize = 5003;</div><div class='del'>-	hshift = 4;</div><div class='del'>-	break;</div><div class='del'>-    case 13:			/* needs 176784 */</div><div class='del'>-	hsize = 9001;</div><div class='del'>-	hshift = 5;</div><div class='del'>-	break;</div><div class='del'>-    case 14:			/* needs 353744 */</div><div class='del'>-	hsize = 18013;</div><div class='del'>-	hshift = 6;</div><div class='del'>-	break;</div><div class='del'>-    case 15:			/* needs 691440 */</div><div class='del'>-	hsize = 35023;</div><div class='del'>-	hshift = 7;</div><div class='del'>-	break;</div><div class='del'>-    case 16:			/* needs 1366160--far too much, */</div><div class='del'>-	/* hsize = 69001; */	/* and 69001 is too big for cptr */</div><div class='del'>-	/* hshift = 8; */	/* in struct bsd_db */</div><div class='del'>-	/* break; */</div><div class='del'>-    default:</div><div class='del'>-	return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    maxmaxcode = MAXCODE(bits);</div><div class='del'>-    newlen = sizeof(*db) + (hsize-1) * (sizeof(db-&gt;dict[0]));</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    db = (struct bsd_db *) ALLOC_SLEEP(newlen);</div><div class='del'>-#else</div><div class='del'>-    db = (struct bsd_db *) ALLOC_NOSLEEP(newlen);</div><div class='del'>-#endif</div><div class='del'>-    if (!db)</div><div class='del'>-	return NULL;</div><div class='del'>-    bzero(db, sizeof(*db) - sizeof(db-&gt;dict));</div><div class='del'>-</div><div class='del'>-    if (!decomp) {</div><div class='del'>-	db-&gt;lens = NULL;</div><div class='del'>-    } else {</div><div class='del'>-#ifdef __osf__</div><div class='del'>-	db-&gt;lens = (u_short *) ALLOC_SLEEP((maxmaxcode+1) * sizeof(db-&gt;lens[0]));</div><div class='del'>-#else</div><div class='del'>-	db-&gt;lens = (u_short *) ALLOC_NOSLEEP((maxmaxcode+1) * sizeof(db-&gt;lens[0]));</div><div class='del'>-#endif</div><div class='del'>-	if (!db-&gt;lens) {</div><div class='del'>-	    FREE(db, newlen);</div><div class='del'>-	    return NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    db-&gt;totlen = newlen;</div><div class='del'>-    db-&gt;hsize = hsize;</div><div class='del'>-    db-&gt;hshift = hshift;</div><div class='del'>-    db-&gt;maxmaxcode = maxmaxcode;</div><div class='del'>-    db-&gt;maxbits = bits;</div><div class='del'>-</div><div class='del'>-    return (void *) db;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-bsd_free(state)</div><div class='del'>-    void *state;</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-</div><div class='del'>-    if (db-&gt;lens)</div><div class='del'>-	FREE(db-&gt;lens, (db-&gt;maxmaxcode+1) * sizeof(db-&gt;lens[0]));</div><div class='del'>-    FREE(db, db-&gt;totlen);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void *</div><div class='del'>-bsd_comp_alloc(options, opt_len)</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len;</div><div class='del'>-{</div><div class='del'>-    return bsd_alloc(options, opt_len, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void *</div><div class='del'>-bsd_decomp_alloc(options, opt_len)</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len;</div><div class='del'>-{</div><div class='del'>-    return bsd_alloc(options, opt_len, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Initialize the database.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp)</div><div class='del'>-    struct bsd_db *db;</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, unit, hdrlen, mru, debug, decomp;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (opt_len &lt; CILEN_BSD_COMPRESS</div><div class='del'>-	|| options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS</div><div class='del'>-	|| BSD_VERSION(options[2]) != BSD_CURRENT_VERSION</div><div class='del'>-	|| BSD_NBITS(options[2]) != db-&gt;maxbits</div><div class='del'>-	|| decomp &amp;&amp; db-&gt;lens == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (decomp) {</div><div class='del'>-	i = LAST+1;</div><div class='del'>-	while (i != 0)</div><div class='del'>-	    db-&gt;lens[--i] = 1;</div><div class='del'>-    }</div><div class='del'>-    i = db-&gt;hsize;</div><div class='del'>-    while (i != 0) {</div><div class='del'>-	db-&gt;dict[--i].codem1 = BADCODEM1;</div><div class='del'>-	db-&gt;dict[i].cptr = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    db-&gt;unit = unit;</div><div class='del'>-    db-&gt;hdrlen = hdrlen;</div><div class='del'>-    db-&gt;mru = mru;</div><div class='del'>-    if (debug)</div><div class='del'>-	db-&gt;debug = 1;</div><div class='del'>-</div><div class='del'>-    bsd_reset(db);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-bsd_comp_init(state, options, opt_len, unit, hdrlen, debug)</div><div class='del'>-    void *state;</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, unit, hdrlen, debug;</div><div class='del'>-{</div><div class='del'>-    return bsd_init((struct bsd_db *) state, options, opt_len,</div><div class='del'>-		    unit, hdrlen, 0, debug, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-bsd_decomp_init(state, options, opt_len, unit, hdrlen, mru, debug)</div><div class='del'>-    void *state;</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, unit, hdrlen, mru, debug;</div><div class='del'>-{</div><div class='del'>-    return bsd_init((struct bsd_db *) state, options, opt_len,</div><div class='del'>-		    unit, hdrlen, mru, debug, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * compress a packet</div><div class='del'>- *	One change from the BSD compress command is that when the</div><div class='del'>- *	code size expands, we do not output a bunch of padding.</div><div class='del'>- *</div><div class='del'>- * N.B. at present, we ignore the hdrlen specified in the comp_init call.</div><div class='del'>- */</div><div class='del'>-static int			/* new slen */</div><div class='del'>-bsd_compress(state, mretp, mp, slen, maxolen)</div><div class='del'>-    void *state;</div><div class='del'>-    mblk_t **mretp;		/* return compressed mbuf chain here */</div><div class='del'>-    mblk_t *mp;			/* from here */</div><div class='del'>-    int slen;			/* uncompressed length */</div><div class='del'>-    int maxolen;		/* max compressed length */</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-    int hshift = db-&gt;hshift;</div><div class='del'>-    u_int max_ent = db-&gt;max_ent;</div><div class='del'>-    u_int n_bits = db-&gt;n_bits;</div><div class='del'>-    u_int bitno = 32;</div><div class='del'>-    u_int32_t accm = 0, fcode;</div><div class='del'>-    struct bsd_dict *dictp;</div><div class='del'>-    u_char c;</div><div class='del'>-    int hval, disp, ent, ilen;</div><div class='del'>-    mblk_t *np, *mret;</div><div class='del'>-    u_char *rptr, *wptr;</div><div class='del'>-    u_char *cp_end;</div><div class='del'>-    int olen;</div><div class='del'>-    mblk_t *m, **mnp;</div><div class='del'>-</div><div class='del'>-#define PUTBYTE(v) {					\</div><div class='del'>-    if (wptr) {						\</div><div class='del'>-	*wptr++ = (v);					\</div><div class='del'>-	if (wptr &gt;= cp_end) {				\</div><div class='del'>-	    m-&gt;b_wptr = wptr;				\</div><div class='del'>-	    m = m-&gt;b_cont;				\</div><div class='del'>-	    if (m) {					\</div><div class='del'>-		wptr = m-&gt;b_wptr;			\</div><div class='del'>-		cp_end = m-&gt;b_datap-&gt;db_lim;		\</div><div class='del'>-	    } else					\</div><div class='del'>-		wptr = NULL;				\</div><div class='del'>-	}						\</div><div class='del'>-    }							\</div><div class='del'>-    ++olen;						\</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define OUTPUT(ent) {					\</div><div class='del'>-    bitno -= n_bits;					\</div><div class='del'>-    accm |= ((ent) &lt;&lt; bitno);				\</div><div class='del'>-    do {						\</div><div class='del'>-	PUTBYTE(accm &gt;&gt; 24);				\</div><div class='del'>-	accm &lt;&lt;= 8;					\</div><div class='del'>-	bitno += 8;					\</div><div class='del'>-    } while (bitno &lt;= 24);				\</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * First get the protocol and check that we're</div><div class='del'>-     * interested in this packet.</div><div class='del'>-     */</div><div class='del'>-    *mretp = NULL;</div><div class='del'>-    rptr = mp-&gt;b_rptr;</div><div class='del'>-    if (rptr + PPP_HDRLEN &gt; mp-&gt;b_wptr) {</div><div class='del'>-	if (!pullupmsg(mp, PPP_HDRLEN))</div><div class='del'>-	    return 0;</div><div class='del'>-	rptr = mp-&gt;b_rptr;</div><div class='del'>-    }</div><div class='del'>-    ent = PPP_PROTOCOL(rptr);		/* get the protocol */</div><div class='del'>-    if (ent &lt; 0x21 || ent &gt; 0xf9)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    /* Don't generate compressed packets which are larger than</div><div class='del'>-       the uncompressed packet. */</div><div class='del'>-    if (maxolen &gt; slen)</div><div class='del'>-	maxolen = slen;</div><div class='del'>-</div><div class='del'>-    /* Allocate enough message blocks to give maxolen total space. */</div><div class='del'>-    mnp = &amp;mret;</div><div class='del'>-    for (olen = maxolen; olen &gt; 0; ) {</div><div class='del'>-	m = allocb((olen &lt; 4096? olen: 4096), BPRI_MED);</div><div class='del'>-	*mnp = m;</div><div class='del'>-	if (m == NULL) {</div><div class='del'>-	    if (mret != NULL) {</div><div class='del'>-		freemsg(mret);</div><div class='del'>-		mnp = &amp;mret;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	mnp = &amp;m-&gt;b_cont;</div><div class='del'>-	olen -= m-&gt;b_datap-&gt;db_lim - m-&gt;b_wptr;</div><div class='del'>-    }</div><div class='del'>-    *mnp = NULL;</div><div class='del'>-</div><div class='del'>-    if ((m = mret) != NULL) {</div><div class='del'>-	wptr = m-&gt;b_wptr;</div><div class='del'>-	cp_end = m-&gt;b_datap-&gt;db_lim;</div><div class='del'>-    } else</div><div class='del'>-	wptr = cp_end = NULL;</div><div class='del'>-    olen = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Copy the PPP header over, changing the protocol,</div><div class='del'>-     * and install the 2-byte sequence number.</div><div class='del'>-     */</div><div class='del'>-    if (wptr) {</div><div class='del'>-	wptr[0] = PPP_ADDRESS(rptr);</div><div class='del'>-	wptr[1] = PPP_CONTROL(rptr);</div><div class='del'>-	wptr[2] = 0;		/* change the protocol */</div><div class='del'>-	wptr[3] = PPP_COMP;</div><div class='del'>-	wptr[4] = db-&gt;seqno &gt;&gt; 8;</div><div class='del'>-	wptr[5] = db-&gt;seqno;</div><div class='del'>-	wptr += PPP_HDRLEN + BSD_OVHD;</div><div class='del'>-    }</div><div class='del'>-    ++db-&gt;seqno;</div><div class='del'>-    rptr += PPP_HDRLEN;</div><div class='del'>-</div><div class='del'>-    slen = mp-&gt;b_wptr - rptr;</div><div class='del'>-    ilen = slen + 1;</div><div class='del'>-    np = mp-&gt;b_cont;</div><div class='del'>-    for (;;) {</div><div class='del'>-	if (slen &lt;= 0) {</div><div class='del'>-	    if (!np)</div><div class='del'>-		break;</div><div class='del'>-	    rptr = np-&gt;b_rptr;</div><div class='del'>-	    slen = np-&gt;b_wptr - rptr;</div><div class='del'>-	    np = np-&gt;b_cont;</div><div class='del'>-	    if (!slen)</div><div class='del'>-		continue;   /* handle 0-length buffers */</div><div class='del'>-	    ilen += slen;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	slen--;</div><div class='del'>-	c = *rptr++;</div><div class='del'>-	fcode = BSD_KEY(ent, c);</div><div class='del'>-	hval = BSD_HASH(ent, c, hshift);</div><div class='del'>-	dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-</div><div class='del'>-	/* Validate and then check the entry. */</div><div class='del'>-	if (dictp-&gt;codem1 &gt;= max_ent)</div><div class='del'>-	    goto nomatch;</div><div class='del'>-	if (dictp-&gt;f.fcode == fcode) {</div><div class='del'>-	    ent = dictp-&gt;codem1+1;</div><div class='del'>-	    continue;	/* found (prefix,suffix) */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* continue probing until a match or invalid entry */</div><div class='del'>-	disp = (hval == 0) ? 1 : hval;</div><div class='del'>-	do {</div><div class='del'>-	    hval += disp;</div><div class='del'>-	    if (hval &gt;= db-&gt;hsize)</div><div class='del'>-		hval -= db-&gt;hsize;</div><div class='del'>-	    dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-	    if (dictp-&gt;codem1 &gt;= max_ent)</div><div class='del'>-		goto nomatch;</div><div class='del'>-	} while (dictp-&gt;f.fcode != fcode);</div><div class='del'>-	ent = dictp-&gt;codem1 + 1;	/* finally found (prefix,suffix) */</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-    nomatch:</div><div class='del'>-	OUTPUT(ent);		/* output the prefix */</div><div class='del'>-</div><div class='del'>-	/* code -&gt; hashtable */</div><div class='del'>-	if (max_ent &lt; db-&gt;maxmaxcode) {</div><div class='del'>-	    struct bsd_dict *dictp2;</div><div class='del'>-	    /* expand code size if needed */</div><div class='del'>-	    if (max_ent &gt;= MAXCODE(n_bits))</div><div class='del'>-		db-&gt;n_bits = ++n_bits;</div><div class='del'>-</div><div class='del'>-	    /* Invalidate old hash table entry using</div><div class='del'>-	     * this code, and then take it over.</div><div class='del'>-	     */</div><div class='del'>-	    dictp2 = &amp;db-&gt;dict[max_ent+1];</div><div class='del'>-	    if (db-&gt;dict[dictp2-&gt;cptr].codem1 == max_ent)</div><div class='del'>-		db-&gt;dict[dictp2-&gt;cptr].codem1 = BADCODEM1;</div><div class='del'>-	    dictp2-&gt;cptr = hval;</div><div class='del'>-	    dictp-&gt;codem1 = max_ent;</div><div class='del'>-	    dictp-&gt;f.fcode = fcode;</div><div class='del'>-</div><div class='del'>-	    db-&gt;max_ent = ++max_ent;</div><div class='del'>-	}</div><div class='del'>-	ent = c;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    OUTPUT(ent);		/* output the last code */</div><div class='del'>-    db-&gt;bytes_out += olen;</div><div class='del'>-    db-&gt;in_count += ilen;</div><div class='del'>-    if (bitno &lt; 32)</div><div class='del'>-	++db-&gt;bytes_out;	/* count complete bytes */</div><div class='del'>-</div><div class='del'>-    if (bsd_check(db))</div><div class='del'>-	OUTPUT(CLEAR);		/* do not count the CLEAR */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Pad dribble bits of last code with ones.</div><div class='del'>-     * Do not emit a completely useless byte of ones.</div><div class='del'>-     */</div><div class='del'>-    if (bitno != 32)</div><div class='del'>-	PUTBYTE((accm | (0xff &lt;&lt; (bitno-8))) &gt;&gt; 24);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Increase code size if we would have without the packet</div><div class='del'>-     * boundary and as the decompressor will.</div><div class='del'>-     */</div><div class='del'>-    if (max_ent &gt;= MAXCODE(n_bits) &amp;&amp; max_ent &lt; db-&gt;maxmaxcode)</div><div class='del'>-	db-&gt;n_bits++;</div><div class='del'>-</div><div class='del'>-    db-&gt;uncomp_bytes += ilen;</div><div class='del'>-    ++db-&gt;uncomp_count;</div><div class='del'>-    if (olen + PPP_HDRLEN + BSD_OVHD &gt; maxolen &amp;&amp; mret != NULL) {</div><div class='del'>-	/* throw away the compressed stuff if it is longer than uncompressed */</div><div class='del'>-	freemsg(mret);</div><div class='del'>-	mret = NULL;</div><div class='del'>-	++db-&gt;incomp_count;</div><div class='del'>-	db-&gt;incomp_bytes += ilen;</div><div class='del'>-    } else if (wptr != NULL) {</div><div class='del'>-	m-&gt;b_wptr = wptr;</div><div class='del'>-	if (m-&gt;b_cont) {</div><div class='del'>-	    freemsg(m-&gt;b_cont);</div><div class='del'>-	    m-&gt;b_cont = NULL;</div><div class='del'>-	}</div><div class='del'>-	++db-&gt;comp_count;</div><div class='del'>-	db-&gt;comp_bytes += olen + BSD_OVHD;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *mretp = mret;</div><div class='del'>-    return olen + PPP_HDRLEN + BSD_OVHD;</div><div class='del'>-#undef OUTPUT</div><div class='del'>-#undef PUTBYTE</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Update the "BSD Compress" dictionary on the receiver for</div><div class='del'>- * incompressible data by pretending to compress the incoming data.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-bsd_incomp(state, dmsg)</div><div class='del'>-    void *state;</div><div class='del'>-    mblk_t *dmsg;</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-    u_int hshift = db-&gt;hshift;</div><div class='del'>-    u_int max_ent = db-&gt;max_ent;</div><div class='del'>-    u_int n_bits = db-&gt;n_bits;</div><div class='del'>-    struct bsd_dict *dictp;</div><div class='del'>-    u_int32_t fcode;</div><div class='del'>-    u_char c;</div><div class='del'>-    long hval, disp;</div><div class='del'>-    int slen, ilen;</div><div class='del'>-    u_int bitno = 7;</div><div class='del'>-    u_char *rptr;</div><div class='del'>-    u_int ent;</div><div class='del'>-</div><div class='del'>-    rptr = dmsg-&gt;b_rptr;</div><div class='del'>-    if (rptr + PPP_HDRLEN &gt; dmsg-&gt;b_wptr) {</div><div class='del'>-	if (!pullupmsg(dmsg, PPP_HDRLEN))</div><div class='del'>-	    return;</div><div class='del'>-	rptr = dmsg-&gt;b_rptr;</div><div class='del'>-    }</div><div class='del'>-    ent = PPP_PROTOCOL(rptr);		/* get the protocol */</div><div class='del'>-    if (ent &lt; 0x21 || ent &gt; 0xf9)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    db-&gt;seqno++;</div><div class='del'>-    ilen = 1;		/* count the protocol as 1 byte */</div><div class='del'>-    rptr += PPP_HDRLEN;</div><div class='del'>-    for (;;) {</div><div class='del'>-	slen = dmsg-&gt;b_wptr - rptr;</div><div class='del'>-	if (slen &lt;= 0) {</div><div class='del'>-	    dmsg = dmsg-&gt;b_cont;</div><div class='del'>-	    if (!dmsg)</div><div class='del'>-		break;</div><div class='del'>-	    rptr = dmsg-&gt;b_rptr;</div><div class='del'>-	    continue;		/* skip zero-length buffers */</div><div class='del'>-	}</div><div class='del'>-	ilen += slen;</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-	    c = *rptr++;</div><div class='del'>-	    fcode = BSD_KEY(ent, c);</div><div class='del'>-	    hval = BSD_HASH(ent, c, hshift);</div><div class='del'>-	    dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-</div><div class='del'>-	    /* validate and then check the entry */</div><div class='del'>-	    if (dictp-&gt;codem1 &gt;= max_ent)</div><div class='del'>-		goto nomatch;</div><div class='del'>-	    if (dictp-&gt;f.fcode == fcode) {</div><div class='del'>-		ent = dictp-&gt;codem1+1;</div><div class='del'>-		continue;   /* found (prefix,suffix) */</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /* continue probing until a match or invalid entry */</div><div class='del'>-	    disp = (hval == 0) ? 1 : hval;</div><div class='del'>-	    do {</div><div class='del'>-		hval += disp;</div><div class='del'>-		if (hval &gt;= db-&gt;hsize)</div><div class='del'>-		    hval -= db-&gt;hsize;</div><div class='del'>-		dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-		if (dictp-&gt;codem1 &gt;= max_ent)</div><div class='del'>-		    goto nomatch;</div><div class='del'>-	    } while (dictp-&gt;f.fcode != fcode);</div><div class='del'>-	    ent = dictp-&gt;codem1+1;</div><div class='del'>-	    continue;	/* finally found (prefix,suffix) */</div><div class='del'>-</div><div class='del'>-	nomatch:		/* output (count) the prefix */</div><div class='del'>-	    bitno += n_bits;</div><div class='del'>-</div><div class='del'>-	    /* code -&gt; hashtable */</div><div class='del'>-	    if (max_ent &lt; db-&gt;maxmaxcode) {</div><div class='del'>-		struct bsd_dict *dictp2;</div><div class='del'>-		/* expand code size if needed */</div><div class='del'>-		if (max_ent &gt;= MAXCODE(n_bits))</div><div class='del'>-		    db-&gt;n_bits = ++n_bits;</div><div class='del'>-</div><div class='del'>-		/* Invalidate previous hash table entry</div><div class='del'>-		 * assigned this code, and then take it over.</div><div class='del'>-		 */</div><div class='del'>-		dictp2 = &amp;db-&gt;dict[max_ent+1];</div><div class='del'>-		if (db-&gt;dict[dictp2-&gt;cptr].codem1 == max_ent)</div><div class='del'>-		    db-&gt;dict[dictp2-&gt;cptr].codem1 = BADCODEM1;</div><div class='del'>-		dictp2-&gt;cptr = hval;</div><div class='del'>-		dictp-&gt;codem1 = max_ent;</div><div class='del'>-		dictp-&gt;f.fcode = fcode;</div><div class='del'>-</div><div class='del'>-		db-&gt;max_ent = ++max_ent;</div><div class='del'>-		db-&gt;lens[max_ent] = db-&gt;lens[ent]+1;</div><div class='del'>-	    }</div><div class='del'>-	    ent = c;</div><div class='del'>-	} while (--slen != 0);</div><div class='del'>-    }</div><div class='del'>-    bitno += n_bits;		/* output (count) the last code */</div><div class='del'>-    db-&gt;bytes_out += bitno/8;</div><div class='del'>-    db-&gt;in_count += ilen;</div><div class='del'>-    (void)bsd_check(db);</div><div class='del'>-</div><div class='del'>-    ++db-&gt;incomp_count;</div><div class='del'>-    db-&gt;incomp_bytes += ilen;</div><div class='del'>-    ++db-&gt;uncomp_count;</div><div class='del'>-    db-&gt;uncomp_bytes += ilen;</div><div class='del'>-</div><div class='del'>-    /* Increase code size if we would have without the packet</div><div class='del'>-     * boundary and as the decompressor will.</div><div class='del'>-     */</div><div class='del'>-    if (max_ent &gt;= MAXCODE(n_bits) &amp;&amp; max_ent &lt; db-&gt;maxmaxcode)</div><div class='del'>-	db-&gt;n_bits++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Decompress "BSD Compress"</div><div class='del'>- *</div><div class='del'>- * Because of patent problems, we return DECOMP_ERROR for errors</div><div class='del'>- * found by inspecting the input data and for system problems, but</div><div class='del'>- * DECOMP_FATALERROR for any errors which could possibly be said to</div><div class='del'>- * be being detected "after" decompression.  For DECOMP_ERROR,</div><div class='del'>- * we can issue a CCP reset-request; for DECOMP_FATALERROR, we may be</div><div class='del'>- * infringing a patent of Motorola's if we do, so we take CCP down</div><div class='del'>- * instead.</div><div class='del'>- *</div><div class='del'>- * Given that the frame has the correct sequence number and a good FCS,</div><div class='del'>- * errors such as invalid codes in the input most likely indicate a</div><div class='del'>- * bug, so we return DECOMP_FATALERROR for them in order to turn off</div><div class='del'>- * compression, even though they are detected by inspecting the input.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-bsd_decompress(state, cmsg, dmpp)</div><div class='del'>-    void *state;</div><div class='del'>-    mblk_t *cmsg, **dmpp;</div><div class='del'>-{</div><div class='del'>-    struct bsd_db *db = (struct bsd_db *) state;</div><div class='del'>-    u_int max_ent = db-&gt;max_ent;</div><div class='del'>-    u_int32_t accm = 0;</div><div class='del'>-    u_int bitno = 32;		/* 1st valid bit in accm */</div><div class='del'>-    u_int n_bits = db-&gt;n_bits;</div><div class='del'>-    u_int tgtbitno = 32-n_bits;	/* bitno when we have a code */</div><div class='del'>-    struct bsd_dict *dictp;</div><div class='del'>-    int explen, i, seq, len;</div><div class='del'>-    u_int incode, oldcode, finchar;</div><div class='del'>-    u_char *p, *rptr, *wptr;</div><div class='del'>-    mblk_t *dmsg, *mret;</div><div class='del'>-    int adrs, ctrl, ilen;</div><div class='del'>-    int dlen, space, codelen, extra;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Get at least the BSD Compress header in the first buffer</div><div class='del'>-     */</div><div class='del'>-    rptr = cmsg-&gt;b_rptr;</div><div class='del'>-    if (rptr + PPP_HDRLEN + BSD_OVHD &gt;= cmsg-&gt;b_wptr) {</div><div class='del'>-	if (!pullupmsg(cmsg, PPP_HDRLEN + BSD_OVHD + 1)) {</div><div class='del'>-	    if (db-&gt;debug)</div><div class='del'>-		printf("bsd_decomp%d: failed to pullup\n", db-&gt;unit);</div><div class='del'>-	    return DECOMP_ERROR;</div><div class='del'>-	}</div><div class='del'>-	rptr = cmsg-&gt;b_rptr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Save the address/control from the PPP header</div><div class='del'>-     * and then get the sequence number.</div><div class='del'>-     */</div><div class='del'>-    adrs = PPP_ADDRESS(rptr);</div><div class='del'>-    ctrl = PPP_CONTROL(rptr);</div><div class='del'>-    rptr += PPP_HDRLEN;</div><div class='del'>-    seq = (rptr[0] &lt;&lt; 8) + rptr[1];</div><div class='del'>-    rptr += BSD_OVHD;</div><div class='del'>-    ilen = len = cmsg-&gt;b_wptr - rptr;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check the sequence number and give up if it is not what we expect.</div><div class='del'>-     */</div><div class='del'>-    if (seq != db-&gt;seqno++) {</div><div class='del'>-	if (db-&gt;debug)</div><div class='del'>-	    printf("bsd_decomp%d: bad sequence # %d, expected %d\n",</div><div class='del'>-		   db-&gt;unit, seq, db-&gt;seqno - 1);</div><div class='del'>-	return DECOMP_ERROR;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Allocate one message block to start with.</div><div class='del'>-     */</div><div class='del'>-    if ((dmsg = allocb(DECOMP_CHUNK + db-&gt;hdrlen, BPRI_MED)) == NULL)</div><div class='del'>-	return DECOMP_ERROR;</div><div class='del'>-    mret = dmsg;</div><div class='del'>-    dmsg-&gt;b_wptr += db-&gt;hdrlen;</div><div class='del'>-    dmsg-&gt;b_rptr = wptr = dmsg-&gt;b_wptr;</div><div class='del'>-</div><div class='del'>-    /* Fill in the ppp header, but not the last byte of the protocol</div><div class='del'>-       (that comes from the decompressed data). */</div><div class='del'>-    wptr[0] = adrs;</div><div class='del'>-    wptr[1] = ctrl;</div><div class='del'>-    wptr[2] = 0;</div><div class='del'>-    wptr += PPP_HDRLEN - 1;</div><div class='del'>-    space = dmsg-&gt;b_datap-&gt;db_lim - wptr;</div><div class='del'>-</div><div class='del'>-    oldcode = CLEAR;</div><div class='del'>-    explen = 0;</div><div class='del'>-    for (;;) {</div><div class='del'>-	if (len == 0) {</div><div class='del'>-	    cmsg = cmsg-&gt;b_cont;</div><div class='del'>-	    if (!cmsg)		/* quit at end of message */</div><div class='del'>-		break;</div><div class='del'>-	    rptr = cmsg-&gt;b_rptr;</div><div class='del'>-	    len = cmsg-&gt;b_wptr - rptr;</div><div class='del'>-	    ilen += len;</div><div class='del'>-	    continue;		/* handle 0-length buffers */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Accumulate bytes until we have a complete code.</div><div class='del'>-	 * Then get the next code, relying on the 32-bit,</div><div class='del'>-	 * unsigned accm to mask the result.</div><div class='del'>-	 */</div><div class='del'>-	bitno -= 8;</div><div class='del'>-	accm |= *rptr++ &lt;&lt; bitno;</div><div class='del'>-	--len;</div><div class='del'>-	if (tgtbitno &lt; bitno)</div><div class='del'>-	    continue;</div><div class='del'>-	incode = accm &gt;&gt; tgtbitno;</div><div class='del'>-	accm &lt;&lt;= n_bits;</div><div class='del'>-	bitno += n_bits;</div><div class='del'>-</div><div class='del'>-	if (incode == CLEAR) {</div><div class='del'>-	    /*</div><div class='del'>-	     * The dictionary must only be cleared at</div><div class='del'>-	     * the end of a packet.  But there could be an</div><div class='del'>-	     * empty message block at the end.</div><div class='del'>-	     */</div><div class='del'>-	    if (len &gt; 0 || cmsg-&gt;b_cont != 0) {</div><div class='del'>-		if (cmsg-&gt;b_cont)</div><div class='del'>-		    len += msgdsize(cmsg-&gt;b_cont);</div><div class='del'>-		if (len &gt; 0) {</div><div class='del'>-		    freemsg(dmsg);</div><div class='del'>-		    if (db-&gt;debug)</div><div class='del'>-			printf("bsd_decomp%d: bad CLEAR\n", db-&gt;unit);</div><div class='del'>-		    return DECOMP_FATALERROR;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    bsd_clear(db);</div><div class='del'>-	    explen = ilen = 0;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (incode &gt; max_ent + 2 || incode &gt; db-&gt;maxmaxcode</div><div class='del'>-	    || incode &gt; max_ent &amp;&amp; oldcode == CLEAR) {</div><div class='del'>-	    freemsg(dmsg);</div><div class='del'>-	    if (db-&gt;debug) {</div><div class='del'>-		printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ",</div><div class='del'>-		       db-&gt;unit, incode, oldcode);</div><div class='del'>-		printf("max_ent=0x%x dlen=%d seqno=%d\n",</div><div class='del'>-		       max_ent, dlen, db-&gt;seqno);</div><div class='del'>-	    }</div><div class='del'>-	    return DECOMP_FATALERROR;	/* probably a bug */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Special case for KwKwK string. */</div><div class='del'>-	if (incode &gt; max_ent) {</div><div class='del'>-	    finchar = oldcode;</div><div class='del'>-	    extra = 1;</div><div class='del'>-	} else {</div><div class='del'>-	    finchar = incode;</div><div class='del'>-	    extra = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	codelen = db-&gt;lens[finchar];</div><div class='del'>-	explen += codelen + extra;</div><div class='del'>-	if (explen &gt; db-&gt;mru + 1) {</div><div class='del'>-	    freemsg(dmsg);</div><div class='del'>-	    if (db-&gt;debug)</div><div class='del'>-		printf("bsd_decomp%d: ran out of mru\n", db-&gt;unit);</div><div class='del'>-	    return DECOMP_FATALERROR;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Decode this code and install it in the decompressed buffer.</div><div class='del'>-	 */</div><div class='del'>-	space -= codelen + extra;</div><div class='del'>-	if (space &lt; 0) {</div><div class='del'>-	    /* Allocate another message block. */</div><div class='del'>-	    dmsg-&gt;b_wptr = wptr;</div><div class='del'>-	    dlen = codelen + extra;</div><div class='del'>-	    if (dlen &lt; DECOMP_CHUNK)</div><div class='del'>-		dlen = DECOMP_CHUNK;</div><div class='del'>-	    if ((dmsg-&gt;b_cont = allocb(dlen, BPRI_MED)) == NULL) {</div><div class='del'>-		freemsg(dmsg);</div><div class='del'>-		return DECOMP_ERROR;</div><div class='del'>-	    }</div><div class='del'>-	    dmsg = dmsg-&gt;b_cont;</div><div class='del'>-	    wptr = dmsg-&gt;b_wptr;</div><div class='del'>-	    space = dmsg-&gt;b_datap-&gt;db_lim - wptr - codelen - extra;</div><div class='del'>-	}</div><div class='del'>-	p = (wptr += codelen);</div><div class='del'>-	while (finchar &gt; LAST) {</div><div class='del'>-	    dictp = &amp;db-&gt;dict[db-&gt;dict[finchar].cptr];</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	    --codelen;</div><div class='del'>-	    if (codelen &lt;= 0) {</div><div class='del'>-		freemsg(dmsg);</div><div class='del'>-		printf("bsd_decomp%d: fell off end of chain ", db-&gt;unit);</div><div class='del'>-		printf("0x%x at 0x%x by 0x%x, max_ent=0x%x\n",</div><div class='del'>-		       incode, finchar, db-&gt;dict[finchar].cptr, max_ent);</div><div class='del'>-		return DECOMP_FATALERROR;</div><div class='del'>-	    }</div><div class='del'>-	    if (dictp-&gt;codem1 != finchar-1) {</div><div class='del'>-		freemsg(dmsg);</div><div class='del'>-		printf("bsd_decomp%d: bad code chain 0x%x finchar=0x%x ",</div><div class='del'>-		       db-&gt;unit, incode, finchar);</div><div class='del'>-		printf("oldcode=0x%x cptr=0x%x codem1=0x%x\n", oldcode,</div><div class='del'>-		       db-&gt;dict[finchar].cptr, dictp-&gt;codem1);</div><div class='del'>-		return DECOMP_FATALERROR;</div><div class='del'>-	    }</div><div class='del'>-#endif</div><div class='del'>-	    *--p = dictp-&gt;f.hs.suffix;</div><div class='del'>-	    finchar = dictp-&gt;f.hs.prefix;</div><div class='del'>-	}</div><div class='del'>-	*--p = finchar;</div><div class='del'>-</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	if (--codelen != 0)</div><div class='del'>-	    printf("bsd_decomp%d: short by %d after code 0x%x, max_ent=0x%x\n",</div><div class='del'>-		   db-&gt;unit, codelen, incode, max_ent);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	if (extra)		/* the KwKwK case again */</div><div class='del'>-	    *wptr++ = finchar;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If not first code in a packet, and</div><div class='del'>-	 * if not out of code space, then allocate a new code.</div><div class='del'>-	 *</div><div class='del'>-	 * Keep the hash table correct so it can be used</div><div class='del'>-	 * with uncompressed packets.</div><div class='del'>-	 */</div><div class='del'>-	if (oldcode != CLEAR &amp;&amp; max_ent &lt; db-&gt;maxmaxcode) {</div><div class='del'>-	    struct bsd_dict *dictp2;</div><div class='del'>-	    u_int32_t fcode;</div><div class='del'>-	    int hval, disp;</div><div class='del'>-</div><div class='del'>-	    fcode = BSD_KEY(oldcode,finchar);</div><div class='del'>-	    hval = BSD_HASH(oldcode,finchar,db-&gt;hshift);</div><div class='del'>-	    dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-</div><div class='del'>-	    /* look for a free hash table entry */</div><div class='del'>-	    if (dictp-&gt;codem1 &lt; max_ent) {</div><div class='del'>-		disp = (hval == 0) ? 1 : hval;</div><div class='del'>-		do {</div><div class='del'>-		    hval += disp;</div><div class='del'>-		    if (hval &gt;= db-&gt;hsize)</div><div class='del'>-			hval -= db-&gt;hsize;</div><div class='del'>-		    dictp = &amp;db-&gt;dict[hval];</div><div class='del'>-		} while (dictp-&gt;codem1 &lt; max_ent);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Invalidate previous hash table entry</div><div class='del'>-	     * assigned this code, and then take it over</div><div class='del'>-	     */</div><div class='del'>-	    dictp2 = &amp;db-&gt;dict[max_ent+1];</div><div class='del'>-	    if (db-&gt;dict[dictp2-&gt;cptr].codem1 == max_ent) {</div><div class='del'>-		db-&gt;dict[dictp2-&gt;cptr].codem1 = BADCODEM1;</div><div class='del'>-	    }</div><div class='del'>-	    dictp2-&gt;cptr = hval;</div><div class='del'>-	    dictp-&gt;codem1 = max_ent;</div><div class='del'>-	    dictp-&gt;f.fcode = fcode;</div><div class='del'>-</div><div class='del'>-	    db-&gt;max_ent = ++max_ent;</div><div class='del'>-	    db-&gt;lens[max_ent] = db-&gt;lens[oldcode]+1;</div><div class='del'>-</div><div class='del'>-	    /* Expand code size if needed. */</div><div class='del'>-	    if (max_ent &gt;= MAXCODE(n_bits) &amp;&amp; max_ent &lt; db-&gt;maxmaxcode) {</div><div class='del'>-		db-&gt;n_bits = ++n_bits;</div><div class='del'>-		tgtbitno = 32-n_bits;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	oldcode = incode;</div><div class='del'>-    }</div><div class='del'>-    dmsg-&gt;b_wptr = wptr;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Keep the checkpoint right so that incompressible packets</div><div class='del'>-     * clear the dictionary at the right times.</div><div class='del'>-     */</div><div class='del'>-    db-&gt;bytes_out += ilen;</div><div class='del'>-    db-&gt;in_count += explen;</div><div class='del'>-    if (bsd_check(db) &amp;&amp; db-&gt;debug) {</div><div class='del'>-	printf("bsd_decomp%d: peer should have cleared dictionary\n",</div><div class='del'>-	       db-&gt;unit);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ++db-&gt;comp_count;</div><div class='del'>-    db-&gt;comp_bytes += ilen + BSD_OVHD;</div><div class='del'>-    ++db-&gt;uncomp_count;</div><div class='del'>-    db-&gt;uncomp_bytes += explen;</div><div class='del'>-</div><div class='del'>-    *dmpp = mret;</div><div class='del'>-    return DECOMP_OK;</div><div class='del'>-}</div><div class='del'>-#endif /* DO_BSD_COMPRESS */</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/deflate.c b/mdk-stage1/ppp/modules/deflate.c<br/>deleted file mode 100644<br/>index 1b9054412..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/deflate.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/deflate.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,760 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp_deflate.c - interface the zlib procedures for Deflate compression</div><div class='del'>- * and decompression (as used by gzip) to the PPP code.</div><div class='del'>- * This version is for use with STREAMS under SunOS 4.x, Solaris 2,</div><div class='del'>- * SVR4, OSF/1 and AIX 4.x.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef AIX4</div><div class='del'>-#include &lt;net/net_globals.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-#define PACKETPTR	mblk_t *</div><div class='del'>-#include &lt;net/ppp-comp.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include "zlib.h"</div><div class='del'>-#else</div><div class='del'>-#include "../common/zlib.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if DO_DEFLATE</div><div class='del'>-</div><div class='del'>-#define DEFLATE_DEBUG	1</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * State for a Deflate (de)compressor.</div><div class='del'>- */</div><div class='del'>-struct deflate_state {</div><div class='del'>-    int		seqno;</div><div class='del'>-    int		w_size;</div><div class='del'>-    int		unit;</div><div class='del'>-    int		hdrlen;</div><div class='del'>-    int		mru;</div><div class='del'>-    int		debug;</div><div class='del'>-    z_stream	strm;</div><div class='del'>-    struct compstat stats;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define DEFLATE_OVHD	2		/* Deflate overhead/packet */</div><div class='del'>-</div><div class='del'>-static void	*z_alloc __P((void *, u_int items, u_int size));</div><div class='del'>-static void	*z_alloc_init __P((void *, u_int items, u_int size));</div><div class='del'>-static void	z_free __P((void *, void *ptr));</div><div class='del'>-static void	*z_comp_alloc __P((u_char *options, int opt_len));</div><div class='del'>-static void	*z_decomp_alloc __P((u_char *options, int opt_len));</div><div class='del'>-static void	z_comp_free __P((void *state));</div><div class='del'>-static void	z_decomp_free __P((void *state));</div><div class='del'>-static int	z_comp_init __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				 int unit, int hdrlen, int debug));</div><div class='del'>-static int	z_decomp_init __P((void *state, u_char *options, int opt_len,</div><div class='del'>-				     int unit, int hdrlen, int mru, int debug));</div><div class='del'>-static int	z_compress __P((void *state, mblk_t **mret,</div><div class='del'>-				  mblk_t *mp, int slen, int maxolen));</div><div class='del'>-static void	z_incomp __P((void *state, mblk_t *dmsg));</div><div class='del'>-static int	z_decompress __P((void *state, mblk_t *cmp,</div><div class='del'>-				    mblk_t **dmpp));</div><div class='del'>-static void	z_comp_reset __P((void *state));</div><div class='del'>-static void	z_decomp_reset __P((void *state));</div><div class='del'>-static void	z_comp_stats __P((void *state, struct compstat *stats));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Procedures exported to ppp_comp.c.</div><div class='del'>- */</div><div class='del'>-struct compressor ppp_deflate = {</div><div class='del'>-    CI_DEFLATE,			/* compress_proto */</div><div class='del'>-    z_comp_alloc,		/* comp_alloc */</div><div class='del'>-    z_comp_free,		/* comp_free */</div><div class='del'>-    z_comp_init,		/* comp_init */</div><div class='del'>-    z_comp_reset,		/* comp_reset */</div><div class='del'>-    z_compress,			/* compress */</div><div class='del'>-    z_comp_stats,		/* comp_stat */</div><div class='del'>-    z_decomp_alloc,		/* decomp_alloc */</div><div class='del'>-    z_decomp_free,		/* decomp_free */</div><div class='del'>-    z_decomp_init,		/* decomp_init */</div><div class='del'>-    z_decomp_reset,		/* decomp_reset */</div><div class='del'>-    z_decompress,		/* decompress */</div><div class='del'>-    z_incomp,			/* incomp */</div><div class='del'>-    z_comp_stats,		/* decomp_stat */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct compressor ppp_deflate_draft = {</div><div class='del'>-    CI_DEFLATE_DRAFT,		/* compress_proto */</div><div class='del'>-    z_comp_alloc,		/* comp_alloc */</div><div class='del'>-    z_comp_free,		/* comp_free */</div><div class='del'>-    z_comp_init,		/* comp_init */</div><div class='del'>-    z_comp_reset,		/* comp_reset */</div><div class='del'>-    z_compress,			/* compress */</div><div class='del'>-    z_comp_stats,		/* comp_stat */</div><div class='del'>-    z_decomp_alloc,		/* decomp_alloc */</div><div class='del'>-    z_decomp_free,		/* decomp_free */</div><div class='del'>-    z_decomp_init,		/* decomp_init */</div><div class='del'>-    z_decomp_reset,		/* decomp_reset */</div><div class='del'>-    z_decompress,		/* decompress */</div><div class='del'>-    z_incomp,			/* incomp */</div><div class='del'>-    z_comp_stats,		/* decomp_stat */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define DECOMP_CHUNK	512</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Space allocation and freeing routines for use by zlib routines.</div><div class='del'>- */</div><div class='del'>-struct zchunk {</div><div class='del'>-    u_int	size;</div><div class='del'>-    u_int	guard;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#define GUARD_MAGIC	0x77a6011a</div><div class='del'>-</div><div class='del'>-static void *</div><div class='del'>-z_alloc_init(notused, items, size)</div><div class='del'>-    void *notused;</div><div class='del'>-    u_int items, size;</div><div class='del'>-{</div><div class='del'>-    struct zchunk *z;</div><div class='del'>-</div><div class='del'>-    size = items * size + sizeof(struct zchunk);</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    z = (struct zchunk *) ALLOC_SLEEP(size);</div><div class='del'>-#else</div><div class='del'>-    z = (struct zchunk *) ALLOC_NOSLEEP(size);</div><div class='del'>-#endif</div><div class='del'>-    z-&gt;size = size;</div><div class='del'>-    z-&gt;guard = GUARD_MAGIC;</div><div class='del'>-    return (void *) (z + 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void *</div><div class='del'>-z_alloc(notused, items, size)</div><div class='del'>-    void *notused;</div><div class='del'>-    u_int items, size;</div><div class='del'>-{</div><div class='del'>-    struct zchunk *z;</div><div class='del'>-</div><div class='del'>-    size = items * size + sizeof(struct zchunk);</div><div class='del'>-    z = (struct zchunk *) ALLOC_NOSLEEP(size);</div><div class='del'>-    z-&gt;size = size;</div><div class='del'>-    z-&gt;guard = GUARD_MAGIC;</div><div class='del'>-    return (void *) (z + 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_free(notused, ptr)</div><div class='del'>-    void *notused;</div><div class='del'>-    void *ptr;</div><div class='del'>-{</div><div class='del'>-    struct zchunk *z = ((struct zchunk *) ptr) - 1;</div><div class='del'>-</div><div class='del'>-    if (z-&gt;guard != GUARD_MAGIC) {</div><div class='del'>-	printf("ppp: z_free of corrupted chunk at %x (%x, %x)\n",</div><div class='del'>-	       z, z-&gt;size, z-&gt;guard);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    FREE(z, z-&gt;size);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Allocate space for a compressor.</div><div class='del'>- */</div><div class='del'>-static void *</div><div class='del'>-z_comp_alloc(options, opt_len)</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state;</div><div class='del'>-    int w_size;</div><div class='del'>-</div><div class='del'>-    if (opt_len != CILEN_DEFLATE</div><div class='del'>-	|| (options[0] != CI_DEFLATE &amp;&amp; options[0] != CI_DEFLATE_DRAFT)</div><div class='del'>-	|| options[1] != CILEN_DEFLATE</div><div class='del'>-	|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-	|| options[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	return NULL;</div><div class='del'>-    w_size = DEFLATE_SIZE(options[2]);</div><div class='del'>-    /*</div><div class='del'>-     * N.B. the 9 below should be DEFLATE_MIN_SIZE (8), but using</div><div class='del'>-     * 8 will cause kernel crashes because of a bug in zlib.</div><div class='del'>-     */</div><div class='del'>-    if (w_size &lt; 9 || w_size &gt; DEFLATE_MAX_SIZE)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    state = (struct deflate_state *) ALLOC_SLEEP(sizeof(*state));</div><div class='del'>-#else</div><div class='del'>-    state = (struct deflate_state *) ALLOC_NOSLEEP(sizeof(*state));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (state == NULL)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-    state-&gt;strm.next_in = NULL;</div><div class='del'>-    state-&gt;strm.zalloc = (alloc_func) z_alloc_init;</div><div class='del'>-    state-&gt;strm.zfree = (free_func) z_free;</div><div class='del'>-    if (deflateInit2(&amp;state-&gt;strm, Z_DEFAULT_COMPRESSION, DEFLATE_METHOD_VAL,</div><div class='del'>-		     -w_size, 8, Z_DEFAULT_STRATEGY) != Z_OK) {</div><div class='del'>-	FREE(state, sizeof(*state));</div><div class='del'>-	return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    state-&gt;strm.zalloc = (alloc_func) z_alloc;</div><div class='del'>-    state-&gt;w_size = w_size;</div><div class='del'>-    bzero(&amp;state-&gt;stats, sizeof(state-&gt;stats));</div><div class='del'>-    return (void *) state;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_comp_free(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    deflateEnd(&amp;state-&gt;strm);</div><div class='del'>-    FREE(state, sizeof(*state));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-z_comp_init(arg, options, opt_len, unit, hdrlen, debug)</div><div class='del'>-    void *arg;</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, unit, hdrlen, debug;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    if (opt_len &lt; CILEN_DEFLATE</div><div class='del'>-	|| (options[0] != CI_DEFLATE &amp;&amp; options[0] != CI_DEFLATE_DRAFT)</div><div class='del'>-	|| options[1] != CILEN_DEFLATE</div><div class='del'>-	|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-	|| DEFLATE_SIZE(options[2]) != state-&gt;w_size</div><div class='del'>-	|| options[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    state-&gt;seqno = 0;</div><div class='del'>-    state-&gt;unit = unit;</div><div class='del'>-    state-&gt;hdrlen = hdrlen;</div><div class='del'>-    state-&gt;debug = debug;</div><div class='del'>-</div><div class='del'>-    deflateReset(&amp;state-&gt;strm);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_comp_reset(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    state-&gt;seqno = 0;</div><div class='del'>-    deflateReset(&amp;state-&gt;strm);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-z_compress(arg, mret, mp, orig_len, maxolen)</div><div class='del'>-    void *arg;</div><div class='del'>-    mblk_t **mret;		/* compressed packet (out) */</div><div class='del'>-    mblk_t *mp;		/* uncompressed packet (in) */</div><div class='del'>-    int orig_len, maxolen;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-    u_char *rptr, *wptr;</div><div class='del'>-    int proto, olen, wspace, r, flush;</div><div class='del'>-    mblk_t *m;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that the protocol is in the range we handle.</div><div class='del'>-     */</div><div class='del'>-    *mret = NULL;</div><div class='del'>-    rptr = mp-&gt;b_rptr;</div><div class='del'>-    if (rptr + PPP_HDRLEN &gt; mp-&gt;b_wptr) {</div><div class='del'>-	if (!pullupmsg(mp, PPP_HDRLEN))</div><div class='del'>-	    return 0;</div><div class='del'>-	rptr = mp-&gt;b_rptr;</div><div class='del'>-    }</div><div class='del'>-    proto = PPP_PROTOCOL(rptr);</div><div class='del'>-    if (proto &gt; 0x3fff || proto == 0xfd || proto == 0xfb)</div><div class='del'>-	return orig_len;</div><div class='del'>-</div><div class='del'>-    /* Allocate one mblk initially. */</div><div class='del'>-    if (maxolen &gt; orig_len)</div><div class='del'>-	maxolen = orig_len;</div><div class='del'>-    if (maxolen &lt;= PPP_HDRLEN + 2) {</div><div class='del'>-	wspace = 0;</div><div class='del'>-	m = NULL;</div><div class='del'>-    } else {</div><div class='del'>-	wspace = maxolen + state-&gt;hdrlen;</div><div class='del'>-	if (wspace &gt; 4096)</div><div class='del'>-	    wspace = 4096;</div><div class='del'>-	m = allocb(wspace, BPRI_MED);</div><div class='del'>-    }</div><div class='del'>-    if (m != NULL) {</div><div class='del'>-	*mret = m;</div><div class='del'>-	if (state-&gt;hdrlen + PPP_HDRLEN + 2 &lt; wspace) {</div><div class='del'>-	    m-&gt;b_rptr += state-&gt;hdrlen;</div><div class='del'>-	    m-&gt;b_wptr = m-&gt;b_rptr;</div><div class='del'>-	    wspace -= state-&gt;hdrlen;</div><div class='del'>-	}</div><div class='del'>-	wptr = m-&gt;b_wptr;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Copy over the PPP header and store the 2-byte sequence number.</div><div class='del'>-	 */</div><div class='del'>-	wptr[0] = PPP_ADDRESS(rptr);</div><div class='del'>-	wptr[1] = PPP_CONTROL(rptr);</div><div class='del'>-	wptr[2] = PPP_COMP &gt;&gt; 8;</div><div class='del'>-	wptr[3] = PPP_COMP;</div><div class='del'>-	wptr += PPP_HDRLEN;</div><div class='del'>-	wptr[0] = state-&gt;seqno &gt;&gt; 8;</div><div class='del'>-	wptr[1] = state-&gt;seqno;</div><div class='del'>-	wptr += 2;</div><div class='del'>-	state-&gt;strm.next_out = wptr;</div><div class='del'>-	state-&gt;strm.avail_out = wspace - (PPP_HDRLEN + 2);</div><div class='del'>-    } else {</div><div class='del'>-	state-&gt;strm.next_out = NULL;</div><div class='del'>-	state-&gt;strm.avail_out = 1000000;</div><div class='del'>-    }</div><div class='del'>-    ++state-&gt;seqno;</div><div class='del'>-</div><div class='del'>-    rptr += (proto &gt; 0xff)? 2: 3;	/* skip 1st proto byte if 0 */</div><div class='del'>-    state-&gt;strm.next_in = rptr;</div><div class='del'>-    state-&gt;strm.avail_in = mp-&gt;b_wptr - rptr;</div><div class='del'>-    mp = mp-&gt;b_cont;</div><div class='del'>-    flush = (mp == NULL)? Z_PACKET_FLUSH: Z_NO_FLUSH;</div><div class='del'>-    olen = 0;</div><div class='del'>-    for (;;) {</div><div class='del'>-	r = deflate(&amp;state-&gt;strm, flush);</div><div class='del'>-	if (r != Z_OK) {</div><div class='del'>-	    printf("z_compress: deflate returned %d (%s)\n",</div><div class='del'>-		   r, (state-&gt;strm.msg? state-&gt;strm.msg: ""));</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	if (flush != Z_NO_FLUSH &amp;&amp; state-&gt;strm.avail_out != 0)</div><div class='del'>-	    break;		/* all done */</div><div class='del'>-	if (state-&gt;strm.avail_in == 0 &amp;&amp; mp != NULL) {</div><div class='del'>-	    state-&gt;strm.next_in = mp-&gt;b_rptr;</div><div class='del'>-	    state-&gt;strm.avail_in = mp-&gt;b_wptr - mp-&gt;b_rptr;</div><div class='del'>-	    mp = mp-&gt;b_cont;</div><div class='del'>-	    if (mp == NULL)</div><div class='del'>-		flush = Z_PACKET_FLUSH;</div><div class='del'>-	}</div><div class='del'>-	if (state-&gt;strm.avail_out == 0) {</div><div class='del'>-	    if (m != NULL) {</div><div class='del'>-		m-&gt;b_wptr += wspace;</div><div class='del'>-		olen += wspace;</div><div class='del'>-		wspace = maxolen - olen;</div><div class='del'>-		if (wspace &lt;= 0) {</div><div class='del'>-		    wspace = 0;</div><div class='del'>-		    m-&gt;b_cont = NULL;</div><div class='del'>-		} else {</div><div class='del'>-		    if (wspace &lt; 32)</div><div class='del'>-			wspace = 32;</div><div class='del'>-		    else if (wspace &gt; 4096)</div><div class='del'>-			wspace = 4096;</div><div class='del'>-		    m-&gt;b_cont = allocb(wspace, BPRI_MED);</div><div class='del'>-		}</div><div class='del'>-		m = m-&gt;b_cont;</div><div class='del'>-		if (m != NULL) {</div><div class='del'>-		    state-&gt;strm.next_out = m-&gt;b_wptr;</div><div class='del'>-		    state-&gt;strm.avail_out = wspace;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    if (m == NULL) {</div><div class='del'>-		state-&gt;strm.next_out = NULL;</div><div class='del'>-		state-&gt;strm.avail_out = 1000000;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (m != NULL) {</div><div class='del'>-	m-&gt;b_wptr += wspace - state-&gt;strm.avail_out;</div><div class='del'>-	olen += wspace - state-&gt;strm.avail_out;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * See if we managed to reduce the size of the packet.</div><div class='del'>-     */</div><div class='del'>-    if (olen &lt; orig_len &amp;&amp; m != NULL) {</div><div class='del'>-	state-&gt;stats.comp_bytes += olen;</div><div class='del'>-	state-&gt;stats.comp_packets++;</div><div class='del'>-    } else {</div><div class='del'>-	if (*mret != NULL) {</div><div class='del'>-	    freemsg(*mret);</div><div class='del'>-	    *mret = NULL;</div><div class='del'>-	}</div><div class='del'>-	state-&gt;stats.inc_bytes += orig_len;</div><div class='del'>-	state-&gt;stats.inc_packets++;</div><div class='del'>-	olen = orig_len;</div><div class='del'>-    }</div><div class='del'>-    state-&gt;stats.unc_bytes += orig_len;</div><div class='del'>-    state-&gt;stats.unc_packets++;</div><div class='del'>-</div><div class='del'>-    return olen;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_comp_stats(arg, stats)</div><div class='del'>-    void *arg;</div><div class='del'>-    struct compstat *stats;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-    u_int out;</div><div class='del'>-</div><div class='del'>-    *stats = state-&gt;stats;</div><div class='del'>-    stats-&gt;ratio = stats-&gt;unc_bytes;</div><div class='del'>-    out = stats-&gt;comp_bytes + stats-&gt;unc_bytes;</div><div class='del'>-    if (stats-&gt;ratio &lt;= 0x7ffffff)</div><div class='del'>-	stats-&gt;ratio &lt;&lt;= 8;</div><div class='del'>-    else</div><div class='del'>-	out &gt;&gt;= 8;</div><div class='del'>-    if (out != 0)</div><div class='del'>-	stats-&gt;ratio /= out;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Allocate space for a decompressor.</div><div class='del'>- */</div><div class='del'>-static void *</div><div class='del'>-z_decomp_alloc(options, opt_len)</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state;</div><div class='del'>-    int w_size;</div><div class='del'>-</div><div class='del'>-    if (opt_len != CILEN_DEFLATE</div><div class='del'>-	|| (options[0] != CI_DEFLATE &amp;&amp; options[0] != CI_DEFLATE_DRAFT)</div><div class='del'>-	|| options[1] != CILEN_DEFLATE</div><div class='del'>-	|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-	|| options[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	return NULL;</div><div class='del'>-    w_size = DEFLATE_SIZE(options[2]);</div><div class='del'>-    /*</div><div class='del'>-     * N.B. the 9 below should be DEFLATE_MIN_SIZE (8), but using</div><div class='del'>-     * 8 will cause kernel crashes because of a bug in zlib.</div><div class='del'>-     */</div><div class='del'>-    if (w_size &lt; 9 || w_size &gt; DEFLATE_MAX_SIZE)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    state = (struct deflate_state *) ALLOC_SLEEP(sizeof(*state));</div><div class='del'>-#else</div><div class='del'>-    state = (struct deflate_state *) ALLOC_NOSLEEP(sizeof(*state));</div><div class='del'>-#endif</div><div class='del'>-    if (state == NULL)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-    state-&gt;strm.next_out = NULL;</div><div class='del'>-    state-&gt;strm.zalloc = (alloc_func) z_alloc_init;</div><div class='del'>-    state-&gt;strm.zfree = (free_func) z_free;</div><div class='del'>-    if (inflateInit2(&amp;state-&gt;strm, -w_size) != Z_OK) {</div><div class='del'>-	FREE(state, sizeof(*state));</div><div class='del'>-	return NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    state-&gt;strm.zalloc = (alloc_func) z_alloc;</div><div class='del'>-    state-&gt;w_size = w_size;</div><div class='del'>-    bzero(&amp;state-&gt;stats, sizeof(state-&gt;stats));</div><div class='del'>-    return (void *) state;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_decomp_free(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    inflateEnd(&amp;state-&gt;strm);</div><div class='del'>-    FREE(state, sizeof(*state));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-z_decomp_init(arg, options, opt_len, unit, hdrlen, mru, debug)</div><div class='del'>-    void *arg;</div><div class='del'>-    u_char *options;</div><div class='del'>-    int opt_len, unit, hdrlen, mru, debug;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    if (opt_len &lt; CILEN_DEFLATE</div><div class='del'>-	|| (options[0] != CI_DEFLATE &amp;&amp; options[0] != CI_DEFLATE_DRAFT)</div><div class='del'>-	|| options[1] != CILEN_DEFLATE</div><div class='del'>-	|| DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-	|| DEFLATE_SIZE(options[2]) != state-&gt;w_size</div><div class='del'>-	|| options[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    state-&gt;seqno = 0;</div><div class='del'>-    state-&gt;unit = unit;</div><div class='del'>-    state-&gt;hdrlen = hdrlen;</div><div class='del'>-    state-&gt;debug = debug;</div><div class='del'>-    state-&gt;mru = mru;</div><div class='del'>-</div><div class='del'>-    inflateReset(&amp;state-&gt;strm);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-z_decomp_reset(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-</div><div class='del'>-    state-&gt;seqno = 0;</div><div class='del'>-    inflateReset(&amp;state-&gt;strm);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Decompress a Deflate-compressed packet.</div><div class='del'>- *</div><div class='del'>- * Because of patent problems, we return DECOMP_ERROR for errors</div><div class='del'>- * found by inspecting the input data and for system problems, but</div><div class='del'>- * DECOMP_FATALERROR for any errors which could possibly be said to</div><div class='del'>- * be being detected "after" decompression.  For DECOMP_ERROR,</div><div class='del'>- * we can issue a CCP reset-request; for DECOMP_FATALERROR, we may be</div><div class='del'>- * infringing a patent of Motorola's if we do, so we take CCP down</div><div class='del'>- * instead.</div><div class='del'>- *</div><div class='del'>- * Given that the frame has the correct sequence number and a good FCS,</div><div class='del'>- * errors such as invalid codes in the input most likely indicate a</div><div class='del'>- * bug, so we return DECOMP_FATALERROR for them in order to turn off</div><div class='del'>- * compression, even though they are detected by inspecting the input.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-z_decompress(arg, mi, mop)</div><div class='del'>-    void *arg;</div><div class='del'>-    mblk_t *mi, **mop;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-    mblk_t *mo, *mo_head;</div><div class='del'>-    u_char *rptr, *wptr;</div><div class='del'>-    int rlen, olen, ospace;</div><div class='del'>-    int seq, i, flush, r, decode_proto;</div><div class='del'>-    u_char hdr[PPP_HDRLEN + DEFLATE_OVHD];</div><div class='del'>-</div><div class='del'>-    *mop = NULL;</div><div class='del'>-    rptr = mi-&gt;b_rptr;</div><div class='del'>-    for (i = 0; i &lt; PPP_HDRLEN + DEFLATE_OVHD; ++i) {</div><div class='del'>-	while (rptr &gt;= mi-&gt;b_wptr) {</div><div class='del'>-	    mi = mi-&gt;b_cont;</div><div class='del'>-	    if (mi == NULL)</div><div class='del'>-		return DECOMP_ERROR;</div><div class='del'>-	    rptr = mi-&gt;b_rptr;</div><div class='del'>-	}</div><div class='del'>-	hdr[i] = *rptr++;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Check the sequence number. */</div><div class='del'>-    seq = (hdr[PPP_HDRLEN] &lt;&lt; 8) + hdr[PPP_HDRLEN+1];</div><div class='del'>-    if (seq != state-&gt;seqno) {</div><div class='del'>-#if !DEFLATE_DEBUG</div><div class='del'>-	if (state-&gt;debug)</div><div class='del'>-#endif</div><div class='del'>-	    printf("z_decompress%d: bad seq # %d, expected %d\n",</div><div class='del'>-		   state-&gt;unit, seq, state-&gt;seqno);</div><div class='del'>-	return DECOMP_ERROR;</div><div class='del'>-    }</div><div class='del'>-    ++state-&gt;seqno;</div><div class='del'>-</div><div class='del'>-    /* Allocate an output message block. */</div><div class='del'>-    mo = allocb(DECOMP_CHUNK + state-&gt;hdrlen, BPRI_MED);</div><div class='del'>-    if (mo == NULL)</div><div class='del'>-	return DECOMP_ERROR;</div><div class='del'>-    mo_head = mo;</div><div class='del'>-    mo-&gt;b_cont = NULL;</div><div class='del'>-    mo-&gt;b_rptr += state-&gt;hdrlen;</div><div class='del'>-    mo-&gt;b_wptr = wptr = mo-&gt;b_rptr;</div><div class='del'>-    ospace = DECOMP_CHUNK;</div><div class='del'>-    olen = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Fill in the first part of the PPP header.  The protocol field</div><div class='del'>-     * comes from the decompressed data.</div><div class='del'>-     */</div><div class='del'>-    wptr[0] = PPP_ADDRESS(hdr);</div><div class='del'>-    wptr[1] = PPP_CONTROL(hdr);</div><div class='del'>-    wptr[2] = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Set up to call inflate.  We set avail_out to 1 initially so we can</div><div class='del'>-     * look at the first byte of the output and decide whether we have</div><div class='del'>-     * a 1-byte or 2-byte protocol field.</div><div class='del'>-     */</div><div class='del'>-    state-&gt;strm.next_in = rptr;</div><div class='del'>-    state-&gt;strm.avail_in = mi-&gt;b_wptr - rptr;</div><div class='del'>-    mi = mi-&gt;b_cont;</div><div class='del'>-    flush = (mi == NULL)? Z_PACKET_FLUSH: Z_NO_FLUSH;</div><div class='del'>-    rlen = state-&gt;strm.avail_in + PPP_HDRLEN + DEFLATE_OVHD;</div><div class='del'>-    state-&gt;strm.next_out = wptr + 3;</div><div class='del'>-    state-&gt;strm.avail_out = 1;</div><div class='del'>-    decode_proto = 1;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Call inflate, supplying more input or output as needed.</div><div class='del'>-     */</div><div class='del'>-    for (;;) {</div><div class='del'>-	r = inflate(&amp;state-&gt;strm, flush);</div><div class='del'>-	if (r != Z_OK) {</div><div class='del'>-#if !DEFLATE_DEBUG</div><div class='del'>-	    if (state-&gt;debug)</div><div class='del'>-#endif</div><div class='del'>-		printf("z_decompress%d: inflate returned %d (%s)\n",</div><div class='del'>-		       state-&gt;unit, r, (state-&gt;strm.msg? state-&gt;strm.msg: ""));</div><div class='del'>-	    freemsg(mo_head);</div><div class='del'>-	    return DECOMP_FATALERROR;</div><div class='del'>-	}</div><div class='del'>-	if (flush != Z_NO_FLUSH &amp;&amp; state-&gt;strm.avail_out != 0)</div><div class='del'>-	    break;		/* all done */</div><div class='del'>-	if (state-&gt;strm.avail_in == 0 &amp;&amp; mi != NULL) {</div><div class='del'>-	    state-&gt;strm.next_in = mi-&gt;b_rptr;</div><div class='del'>-	    state-&gt;strm.avail_in = mi-&gt;b_wptr - mi-&gt;b_rptr;</div><div class='del'>-	    rlen += state-&gt;strm.avail_in;</div><div class='del'>-	    mi = mi-&gt;b_cont;</div><div class='del'>-	    if (mi == NULL)</div><div class='del'>-		flush = Z_PACKET_FLUSH;</div><div class='del'>-	}</div><div class='del'>-	if (state-&gt;strm.avail_out == 0) {</div><div class='del'>-	    if (decode_proto) {</div><div class='del'>-		state-&gt;strm.avail_out = ospace - PPP_HDRLEN;</div><div class='del'>-		if ((wptr[3] &amp; 1) == 0) {</div><div class='del'>-		    /* 2-byte protocol field */</div><div class='del'>-		    wptr[2] = wptr[3];</div><div class='del'>-		    --state-&gt;strm.next_out;</div><div class='del'>-		    ++state-&gt;strm.avail_out;</div><div class='del'>-		}</div><div class='del'>-		decode_proto = 0;</div><div class='del'>-	    } else {</div><div class='del'>-		mo-&gt;b_wptr += ospace;</div><div class='del'>-		olen += ospace;</div><div class='del'>-		mo-&gt;b_cont = allocb(DECOMP_CHUNK, BPRI_MED);</div><div class='del'>-		mo = mo-&gt;b_cont;</div><div class='del'>-		if (mo == NULL) {</div><div class='del'>-		    freemsg(mo_head);</div><div class='del'>-		    return DECOMP_ERROR;</div><div class='del'>-		}</div><div class='del'>-		state-&gt;strm.next_out = mo-&gt;b_rptr;</div><div class='del'>-		state-&gt;strm.avail_out = ospace = DECOMP_CHUNK;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (decode_proto) {</div><div class='del'>-	freemsg(mo_head);</div><div class='del'>-	return DECOMP_ERROR;</div><div class='del'>-    }</div><div class='del'>-    mo-&gt;b_wptr += ospace - state-&gt;strm.avail_out;</div><div class='del'>-    olen += ospace - state-&gt;strm.avail_out;</div><div class='del'>-</div><div class='del'>-#if DEFLATE_DEBUG</div><div class='del'>-    if (olen &gt; state-&gt;mru + PPP_HDRLEN)</div><div class='del'>-	printf("ppp_deflate%d: exceeded mru (%d &gt; %d)\n",</div><div class='del'>-	       state-&gt;unit, olen, state-&gt;mru + PPP_HDRLEN);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    state-&gt;stats.unc_bytes += olen;</div><div class='del'>-    state-&gt;stats.unc_packets++;</div><div class='del'>-    state-&gt;stats.comp_bytes += rlen;</div><div class='del'>-    state-&gt;stats.comp_packets++;</div><div class='del'>-</div><div class='del'>-    *mop = mo_head;</div><div class='del'>-    return DECOMP_OK;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Incompressible data has arrived - add it to the history.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-z_incomp(arg, mi)</div><div class='del'>-    void *arg;</div><div class='del'>-    mblk_t *mi;</div><div class='del'>-{</div><div class='del'>-    struct deflate_state *state = (struct deflate_state *) arg;</div><div class='del'>-    u_char *rptr;</div><div class='del'>-    int rlen, proto, r;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that the protocol is one we handle.</div><div class='del'>-     */</div><div class='del'>-    rptr = mi-&gt;b_rptr;</div><div class='del'>-    if (rptr + PPP_HDRLEN &gt; mi-&gt;b_wptr) {</div><div class='del'>-	if (!pullupmsg(mi, PPP_HDRLEN))</div><div class='del'>-	    return;</div><div class='del'>-	rptr = mi-&gt;b_rptr;</div><div class='del'>-    }</div><div class='del'>-    proto = PPP_PROTOCOL(rptr);</div><div class='del'>-    if (proto &gt; 0x3fff || proto == 0xfd || proto == 0xfb)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    ++state-&gt;seqno;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Iterate through the message blocks, adding the characters in them</div><div class='del'>-     * to the decompressor's history.  For the first block, we start</div><div class='del'>-     * at the either the 1st or 2nd byte of the protocol field,</div><div class='del'>-     * depending on whether the protocol value is compressible.</div><div class='del'>-     */</div><div class='del'>-    rlen = mi-&gt;b_wptr - mi-&gt;b_rptr;</div><div class='del'>-    state-&gt;strm.next_in = rptr + 3;</div><div class='del'>-    state-&gt;strm.avail_in = rlen - 3;</div><div class='del'>-    if (proto &gt; 0xff) {</div><div class='del'>-	--state-&gt;strm.next_in;</div><div class='del'>-	++state-&gt;strm.avail_in;</div><div class='del'>-    }</div><div class='del'>-    for (;;) {</div><div class='del'>-	r = inflateIncomp(&amp;state-&gt;strm);</div><div class='del'>-	if (r != Z_OK) {</div><div class='del'>-	    /* gak! */</div><div class='del'>-#if !DEFLATE_DEBUG</div><div class='del'>-	    if (state-&gt;debug)</div><div class='del'>-#endif</div><div class='del'>-		printf("z_incomp%d: inflateIncomp returned %d (%s)\n",</div><div class='del'>-		       state-&gt;unit, r, (state-&gt;strm.msg? state-&gt;strm.msg: ""));</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-	mi = mi-&gt;b_cont;</div><div class='del'>-	if (mi == NULL)</div><div class='del'>-	    break;</div><div class='del'>-	state-&gt;strm.next_in = mi-&gt;b_rptr;</div><div class='del'>-	state-&gt;strm.avail_in = mi-&gt;b_wptr - mi-&gt;b_rptr;</div><div class='del'>-	rlen += state-&gt;strm.avail_in;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Update stats.</div><div class='del'>-     */</div><div class='del'>-    state-&gt;stats.inc_bytes += rlen;</div><div class='del'>-    state-&gt;stats.inc_packets++;</div><div class='del'>-    state-&gt;stats.unc_bytes += rlen;</div><div class='del'>-    state-&gt;stats.unc_packets++;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* DO_DEFLATE */</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/if_ppp.c b/mdk-stage1/ppp/modules/if_ppp.c<br/>deleted file mode 100644<br/>index 14e89eb4a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/if_ppp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/if_ppp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,865 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * if_ppp.c - a network interface connected to a STREAMS module.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This file is used under SunOS 4 and Digital UNIX.</div><div class='del'>- *</div><div class='del'>- * This file provides the glue between PPP and IP.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define INET	1</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-#include &lt;sys/mbuf.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/netisr.h&gt;</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netinet/in_var.h&gt;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;net/if_types.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/sockio.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef SNIT_SUPPORT</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;net/nit_if.h&gt;</div><div class='del'>-#include &lt;netinet/if_ether.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#define SIOCSIFMTU SIOCSIPMTU</div><div class='del'>-#define SIOCGIFMTU SIOCRIPMTU</div><div class='del'>-#define IFA_ADDR(ifa)   (*(ifa)-&gt;ifa_addr)</div><div class='del'>-#else</div><div class='del'>-#define IFA_ADDR(ifa)   ((ifa)-&gt;ifa_addr)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define ifr_mtu		ifr_metric</div><div class='del'>-</div><div class='del'>-static int if_ppp_open __P((queue_t *, int, int, int));</div><div class='del'>-static int if_ppp_close __P((queue_t *, int));</div><div class='del'>-static int if_ppp_wput __P((queue_t *, mblk_t *));</div><div class='del'>-static int if_ppp_rput __P((queue_t *, mblk_t *));</div><div class='del'>-</div><div class='del'>-#define PPP_IF_ID 0x8021</div><div class='del'>-static struct module_info minfo = {</div><div class='del'>-    PPP_IF_ID, "if_ppp", 0, INFPSZ, 4096, 128</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit rinit = {</div><div class='del'>-    if_ppp_rput, NULL, if_ppp_open, if_ppp_close, NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit winit = {</div><div class='del'>-    if_ppp_wput, NULL, NULL, NULL, NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct streamtab if_pppinfo = {</div><div class='del'>-    &amp;rinit, &amp;winit, NULL, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-typedef struct if_ppp_state {</div><div class='del'>-    int unit;</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int flags;</div><div class='del'>-} if_ppp_t;</div><div class='del'>-</div><div class='del'>-/* Values for flags */</div><div class='del'>-#define DBGLOG		1</div><div class='del'>-</div><div class='del'>-static int if_ppp_count;	/* Number of currently-active streams */</div><div class='del'>-</div><div class='del'>-static int ppp_nalloc;		/* Number of elements of ifs and states */</div><div class='del'>-static struct ifnet **ifs;	/* Array of pointers to interface structs */</div><div class='del'>-static if_ppp_t **states;	/* Array of pointers to state structs */</div><div class='del'>-</div><div class='del'>-static int if_ppp_output __P((struct ifnet *, struct mbuf *,</div><div class='del'>-			      struct sockaddr *));</div><div class='del'>-static int if_ppp_ioctl __P((struct ifnet *, u_int, caddr_t));</div><div class='del'>-static struct mbuf *make_mbufs __P((mblk_t *, int));</div><div class='del'>-static mblk_t *make_message __P((struct mbuf *, int));</div><div class='del'>-</div><div class='del'>-#ifdef SNIT_SUPPORT</div><div class='del'>-/* Fake ether header for SNIT */</div><div class='del'>-static struct ether_header snit_ehdr = {{0}, {0}, ETHERTYPE_IP};</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef __osf__</div><div class='del'>-static void ppp_if_detach __P((struct ifnet *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Detach all the interfaces before unloading.</div><div class='del'>- * Not sure this works.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-if_ppp_unload()</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (if_ppp_count &gt; 0)</div><div class='del'>-	return EBUSY;</div><div class='del'>-    for (i = 0; i &lt; ppp_nalloc; ++i)</div><div class='del'>-	if (ifs[i] != 0)</div><div class='del'>-	    ppp_if_detach(ifs[i]);</div><div class='del'>-    if (ifs) {</div><div class='del'>-	FREE(ifs, ppp_nalloc * sizeof (struct ifnet *));</div><div class='del'>-	FREE(states, ppp_nalloc * sizeof (struct if_ppp_t *));</div><div class='del'>-    }</div><div class='del'>-    ppp_nalloc = 0;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-#endif /* __osf__ */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * STREAMS module entry points.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-if_ppp_open(q, dev, flag, sflag)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int dev;</div><div class='del'>-    int flag, sflag;</div><div class='del'>-{</div><div class='del'>-    if_ppp_t *sp;</div><div class='del'>-</div><div class='del'>-    if (q-&gt;q_ptr == 0) {</div><div class='del'>-	sp = (if_ppp_t *) ALLOC_SLEEP(sizeof (if_ppp_t));</div><div class='del'>-	if (sp == 0)</div><div class='del'>-	    return OPENFAIL;</div><div class='del'>-	bzero(sp, sizeof (if_ppp_t));</div><div class='del'>-	q-&gt;q_ptr = (caddr_t) sp;</div><div class='del'>-	WR(q)-&gt;q_ptr = (caddr_t) sp;</div><div class='del'>-	sp-&gt;unit = -1;		/* no interface unit attached at present */</div><div class='del'>-	sp-&gt;q = WR(q);</div><div class='del'>-	sp-&gt;flags = 0;</div><div class='del'>-	++if_ppp_count;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-if_ppp_close(q, flag)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int flag;</div><div class='del'>-{</div><div class='del'>-    if_ppp_t *sp;</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-</div><div class='del'>-    sp = (if_ppp_t *) q-&gt;q_ptr;</div><div class='del'>-    if (sp != 0) {</div><div class='del'>-	if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	    printf("if_ppp closed, q=%x sp=%x\n", q, sp);</div><div class='del'>-	if (sp-&gt;unit &gt;= 0) {</div><div class='del'>-	    if (sp-&gt;unit &lt; ppp_nalloc) {</div><div class='del'>-		states[sp-&gt;unit] = 0;</div><div class='del'>-		ifp = ifs[sp-&gt;unit];</div><div class='del'>-		if (ifp != 0)</div><div class='del'>-		    ifp-&gt;if_flags &amp;= ~(IFF_UP | IFF_RUNNING);</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	    } else {</div><div class='del'>-		printf("if_ppp: unit %d nonexistent!\n", sp-&gt;unit);</div><div class='del'>-#endif</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	FREE(sp, sizeof (if_ppp_t));</div><div class='del'>-	--if_ppp_count;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-if_ppp_wput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    if_ppp_t *sp;</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-    int error, unit;</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-</div><div class='del'>-    sp = (if_ppp_t *) q-&gt;q_ptr;</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_DATA:</div><div class='del'>-	/*</div><div class='del'>-	 * Now why would we be getting data coming in here??</div><div class='del'>-	 */</div><div class='del'>-	if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	    printf("if_ppp: got M_DATA len=%d\n", msgdsize(mp));</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCTL:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	error = EINVAL;</div><div class='del'>-</div><div class='del'>-	if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	    printf("if_ppp: got ioctl cmd=%x count=%d\n",</div><div class='del'>-		   iop-&gt;ioc_cmd, iop-&gt;ioc_count);</div><div class='del'>-</div><div class='del'>-	switch (iop-&gt;ioc_cmd) {</div><div class='del'>-	case PPPIO_NEWPPA:		/* well almost */</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int) || sp-&gt;unit &gt;= 0)</div><div class='del'>-		break;</div><div class='del'>-	    if ((error = NOTSUSER()) != 0)</div><div class='del'>-		break;</div><div class='del'>-	    unit = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-</div><div class='del'>-	    /* Check that this unit isn't already in use */</div><div class='del'>-	    if (unit &lt; ppp_nalloc &amp;&amp; states[unit] != 0) {</div><div class='del'>-		error = EADDRINUSE;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /* Extend ifs and states arrays if necessary. */</div><div class='del'>-	    error = ENOSR;</div><div class='del'>-	    if (unit &gt;= ppp_nalloc) {</div><div class='del'>-		int newn;</div><div class='del'>-		struct ifnet **newifs;</div><div class='del'>-		if_ppp_t **newstates;</div><div class='del'>-</div><div class='del'>-		newn = unit + 4;</div><div class='del'>-		if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		    printf("if_ppp: extending ifs to %d\n", newn);</div><div class='del'>-		newifs = (struct ifnet **)</div><div class='del'>-		    ALLOC_NOSLEEP(newn * sizeof (struct ifnet *));</div><div class='del'>-		if (newifs == 0)</div><div class='del'>-		    break;</div><div class='del'>-		bzero(newifs, newn * sizeof (struct ifnet *));</div><div class='del'>-		newstates = (if_ppp_t **)</div><div class='del'>-		    ALLOC_NOSLEEP(newn * sizeof (struct if_ppp_t *));</div><div class='del'>-		if (newstates == 0) {</div><div class='del'>-		    FREE(newifs, newn * sizeof (struct ifnet *));</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		bzero(newstates, newn * sizeof (struct if_ppp_t *));</div><div class='del'>-		bcopy(ifs, newifs, ppp_nalloc * sizeof(struct ifnet *));</div><div class='del'>-		bcopy(states, newstates, ppp_nalloc * sizeof(if_ppp_t *));</div><div class='del'>-		if (ifs) {</div><div class='del'>-		    FREE(ifs, ppp_nalloc * sizeof(struct ifnet *));</div><div class='del'>-		    FREE(states, ppp_nalloc * sizeof(if_ppp_t *));</div><div class='del'>-		}</div><div class='del'>-		ifs = newifs;</div><div class='del'>-		states = newstates;</div><div class='del'>-		ppp_nalloc = newn;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /* Allocate a new ifnet struct if necessary. */</div><div class='del'>-	    ifp = ifs[unit];</div><div class='del'>-	    if (ifp == 0) {</div><div class='del'>-		ifp = (struct ifnet *) ALLOC_NOSLEEP(sizeof (struct ifnet));</div><div class='del'>-		if (ifp == 0)</div><div class='del'>-		    break;</div><div class='del'>-		bzero(ifp, sizeof (struct ifnet));</div><div class='del'>-		ifs[unit] = ifp;</div><div class='del'>-		ifp-&gt;if_name = "ppp";</div><div class='del'>-		ifp-&gt;if_unit = unit;</div><div class='del'>-		ifp-&gt;if_mtu = PPP_MTU;</div><div class='del'>-		ifp-&gt;if_flags = IFF_POINTOPOINT | IFF_RUNNING;</div><div class='del'>-#ifndef __osf__</div><div class='del'>-#ifdef IFF_MULTICAST</div><div class='del'>-		ifp-&gt;if_flags |= IFF_MULTICAST;</div><div class='del'>-#endif</div><div class='del'>-#endif /* __osf__ */</div><div class='del'>-		ifp-&gt;if_output = if_ppp_output;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-		ifp-&gt;if_version = "Point-to-Point Protocol, version 2.3.11";</div><div class='del'>-		ifp-&gt;if_mediamtu = PPP_MTU;</div><div class='del'>-		ifp-&gt;if_type = IFT_PPP;</div><div class='del'>-		ifp-&gt;if_hdrlen = PPP_HDRLEN;</div><div class='del'>-		ifp-&gt;if_addrlen = 0;</div><div class='del'>-		ifp-&gt;if_flags |= IFF_NOARP | IFF_SIMPLEX | IFF_NOTRAILERS;</div><div class='del'>-#ifdef IFF_VAR_MTU</div><div class='del'>-		ifp-&gt;if_flags |= IFF_VAR_MTU;</div><div class='del'>-#endif</div><div class='del'>-#ifdef NETMASTERCPU</div><div class='del'>-		ifp-&gt;if_affinity = NETMASTERCPU;</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-		ifp-&gt;if_ioctl = if_ppp_ioctl;</div><div class='del'>-		ifp-&gt;if_snd.ifq_maxlen = IFQ_MAXLEN;</div><div class='del'>-		if_attach(ifp);</div><div class='del'>-		if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		    printf("if_ppp: created unit %d\n", unit);</div><div class='del'>-	    } else {</div><div class='del'>-		ifp-&gt;if_mtu = PPP_MTU;</div><div class='del'>-		ifp-&gt;if_flags |= IFF_RUNNING;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    states[unit] = sp;</div><div class='del'>-	    sp-&gt;unit = unit;</div><div class='del'>-</div><div class='del'>-	    error = 0;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		printf("if_ppp: attached unit %d, sp=%x q=%x\n", unit,</div><div class='del'>-		       sp, sp-&gt;q);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_DEBUG:</div><div class='del'>-	    error = -1;</div><div class='del'>-	    if (iop-&gt;ioc_count == sizeof(int)) {</div><div class='del'>-		if (*(int *)mp-&gt;b_cont-&gt;b_rptr == PPPDBG_LOG + PPPDBG_IF) {</div><div class='del'>-		    printf("if_ppp: debug log enabled, q=%x sp=%x\n", q, sp);</div><div class='del'>-		    sp-&gt;flags |= DBGLOG;</div><div class='del'>-		    error = 0;</div><div class='del'>-		    iop-&gt;ioc_count = 0;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	    printf("if_ppp: ioctl result %d\n", error);</div><div class='del'>-	if (error &lt; 0)</div><div class='del'>-	    putnext(q, mp);</div><div class='del'>-	else if (error == 0) {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCNAK;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    iop-&gt;ioc_error = error;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-if_ppp_rput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    if_ppp_t *sp;</div><div class='del'>-    int proto, s;</div><div class='del'>-    struct mbuf *mb;</div><div class='del'>-    struct ifqueue *inq;</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-    int len;</div><div class='del'>-</div><div class='del'>-    sp = (if_ppp_t *) q-&gt;q_ptr;</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_DATA:</div><div class='del'>-	/*</div><div class='del'>-	 * Convert the message into an mbuf chain</div><div class='del'>-	 * and inject it into the network code.</div><div class='del'>-	 */</div><div class='del'>-	if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	    printf("if_ppp: rput pkt len %d data %x %x %x %x %x %x %x %x\n",</div><div class='del'>-		   msgdsize(mp), mp-&gt;b_rptr[0], mp-&gt;b_rptr[1], mp-&gt;b_rptr[2],</div><div class='del'>-		   mp-&gt;b_rptr[3], mp-&gt;b_rptr[4], mp-&gt;b_rptr[5], mp-&gt;b_rptr[6],</div><div class='del'>-		   mp-&gt;b_rptr[7]);</div><div class='del'>-</div><div class='del'>-	if (sp-&gt;unit &lt; 0) {</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	if (sp-&gt;unit &gt;= ppp_nalloc || (ifp = ifs[sp-&gt;unit]) == 0) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	    printf("if_ppp: no unit %d!\n", sp-&gt;unit);</div><div class='del'>-#endif</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if ((ifp-&gt;if_flags &amp; IFF_UP) == 0) {</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	++ifp-&gt;if_ipackets;</div><div class='del'>-</div><div class='del'>-	proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-	adjmsg(mp, PPP_HDRLEN);</div><div class='del'>-	len = msgdsize(mp);</div><div class='del'>-	mb = make_mbufs(mp, sizeof(struct ifnet *));</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	if (mb == NULL) {</div><div class='del'>-	    if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		printf("if_ppp%d: make_mbufs failed\n", ifp-&gt;if_unit);</div><div class='del'>-	    ++ifp-&gt;if_ierrors;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef SNIT_SUPPORT</div><div class='del'>-	if (proto == PPP_IP &amp;&amp; (ifp-&gt;if_flags &amp; IFF_PROMISC)) {</div><div class='del'>-	    struct nit_if nif;</div><div class='del'>-</div><div class='del'>-	    nif.nif_header = (caddr_t) &amp;snit_ehdr;</div><div class='del'>-	    nif.nif_hdrlen = sizeof(snit_ehdr);</div><div class='del'>-	    nif.nif_bodylen = len;</div><div class='del'>-	    nif.nif_promisc = 0;</div><div class='del'>-	    snit_intr(ifp, mb, &amp;nif);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * For Digital UNIX, there's space set aside in the header mbuf</div><div class='del'>- * for the interface info.</div><div class='del'>- *</div><div class='del'>- * For Sun it's smuggled around via a pointer at the front of the mbuf.</div><div class='del'>- */</div><div class='del'>-#ifdef __osf__</div><div class='del'>-        mb-&gt;m_pkthdr.rcvif = ifp;</div><div class='del'>-        mb-&gt;m_pkthdr.len = len;</div><div class='del'>-#else</div><div class='del'>-	mb-&gt;m_off -= sizeof(struct ifnet *);</div><div class='del'>-	mb-&gt;m_len += sizeof(struct ifnet *);</div><div class='del'>-	*mtod(mb, struct ifnet **) = ifp;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	inq = 0;</div><div class='del'>-	switch (proto) {</div><div class='del'>-	case PPP_IP:</div><div class='del'>-	    inq = &amp;ipintrq;</div><div class='del'>-	    schednetisr(NETISR_IP);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (inq != 0) {</div><div class='del'>-	    s = splhigh();</div><div class='del'>-	    if (IF_QFULL(inq)) {</div><div class='del'>-		IF_DROP(inq);</div><div class='del'>-		++ifp-&gt;if_ierrors;</div><div class='del'>-		if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		    printf("if_ppp: inq full, proto=%x\n", proto);</div><div class='del'>-		m_freem(mb);</div><div class='del'>-	    } else {</div><div class='del'>-		IF_ENQUEUE(inq, mb);</div><div class='del'>-	    }</div><div class='del'>-	    splx(s);</div><div class='del'>-	} else {</div><div class='del'>-	    if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-		printf("if_ppp%d: proto=%x?\n", ifp-&gt;if_unit, proto);</div><div class='del'>-	    ++ifp-&gt;if_ierrors;</div><div class='del'>-	    m_freem(mb);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Network code wants to output a packet.</div><div class='del'>- * Turn it into a STREAMS message and send it down.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-if_ppp_output(ifp, m0, dst)</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-    struct mbuf *m0;</div><div class='del'>-    struct sockaddr *dst;</div><div class='del'>-{</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int proto, s;</div><div class='del'>-    if_ppp_t *sp;</div><div class='del'>-    u_char *p;</div><div class='del'>-</div><div class='del'>-    if ((ifp-&gt;if_flags &amp; IFF_UP) == 0) {</div><div class='del'>-	m_freem(m0);</div><div class='del'>-	return ENETDOWN;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((unsigned)ifp-&gt;if_unit &gt;= ppp_nalloc) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	printf("if_ppp_output: unit %d?\n", ifp-&gt;if_unit);</div><div class='del'>-#endif</div><div class='del'>-	m_freem(m0);</div><div class='del'>-	return EINVAL;</div><div class='del'>-    }</div><div class='del'>-    sp = states[ifp-&gt;if_unit];</div><div class='del'>-    if (sp == 0) {</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-	printf("if_ppp_output: no queue?\n");</div><div class='del'>-#endif</div><div class='del'>-	m_freem(m0);</div><div class='del'>-	return ENETDOWN;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (sp-&gt;flags &amp; DBGLOG) {</div><div class='del'>-	p = mtod(m0, u_char *);</div><div class='del'>-	printf("if_ppp_output%d: af=%d data=%x %x %x %x %x %x %x %x q=%x\n",</div><div class='del'>-	       ifp-&gt;if_unit, dst-&gt;sa_family, p[0], p[1], p[2], p[3], p[4],</div><div class='del'>-	       p[5], p[6], p[7], sp-&gt;q);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (dst-&gt;sa_family) {</div><div class='del'>-    case AF_INET:</div><div class='del'>-	proto = PPP_IP;</div><div class='del'>-#ifdef SNIT_SUPPORT</div><div class='del'>-	if (ifp-&gt;if_flags &amp; IFF_PROMISC) {</div><div class='del'>-	    struct nit_if nif;</div><div class='del'>-	    struct mbuf *m;</div><div class='del'>-	    int len;</div><div class='del'>-</div><div class='del'>-	    for (len = 0, m = m0; m != NULL; m = m-&gt;m_next)</div><div class='del'>-		len += m-&gt;m_len;</div><div class='del'>-	    nif.nif_header = (caddr_t) &amp;snit_ehdr;</div><div class='del'>-	    nif.nif_hdrlen = sizeof(snit_ehdr);</div><div class='del'>-	    nif.nif_bodylen = len;</div><div class='del'>-	    nif.nif_promisc = 0;</div><div class='del'>-	    snit_intr(ifp, m0, &amp;nif);</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	m_freem(m0);</div><div class='del'>-	return EAFNOSUPPORT;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ++ifp-&gt;if_opackets;</div><div class='del'>-    mp = make_message(m0, PPP_HDRLEN);</div><div class='del'>-    m_freem(m0);</div><div class='del'>-    if (mp == 0) {</div><div class='del'>-	++ifp-&gt;if_oerrors;</div><div class='del'>-	return ENOBUFS;</div><div class='del'>-    }</div><div class='del'>-    mp-&gt;b_rptr -= PPP_HDRLEN;</div><div class='del'>-    mp-&gt;b_rptr[0] = PPP_ALLSTATIONS;</div><div class='del'>-    mp-&gt;b_rptr[1] = PPP_UI;</div><div class='del'>-    mp-&gt;b_rptr[2] = proto &gt;&gt; 8;</div><div class='del'>-    mp-&gt;b_rptr[3] = proto;</div><div class='del'>-</div><div class='del'>-    s = splstr();</div><div class='del'>-    if (sp-&gt;flags &amp; DBGLOG)</div><div class='del'>-	printf("if_ppp: putnext(%x, %x), r=%x w=%x p=%x\n",</div><div class='del'>-	       sp-&gt;q, mp, mp-&gt;b_rptr, mp-&gt;b_wptr, proto);</div><div class='del'>-    putnext(sp-&gt;q, mp);</div><div class='del'>-    splx(s);</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Socket ioctl routine for ppp interfaces.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-if_ppp_ioctl(ifp, cmd, data)</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-    u_int cmd;</div><div class='del'>-    caddr_t data;</div><div class='del'>-{</div><div class='del'>-    int s, error;</div><div class='del'>-    struct ifreq *ifr = (struct ifreq *) data;</div><div class='del'>-    struct ifaddr *ifa = (struct ifaddr *) data;</div><div class='del'>-    u_short mtu;</div><div class='del'>-</div><div class='del'>-    error = 0;</div><div class='del'>-    s = splimp();</div><div class='del'>-    switch (cmd) {</div><div class='del'>-    case SIOCSIFFLAGS:</div><div class='del'>-	if ((ifp-&gt;if_flags &amp; IFF_RUNNING) == 0)</div><div class='del'>-	    ifp-&gt;if_flags &amp;= ~IFF_UP;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SIOCSIFADDR:</div><div class='del'>-	if (IFA_ADDR(ifa).sa_family != AF_INET)</div><div class='del'>-	    error = EAFNOSUPPORT;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SIOCSIFDSTADDR:</div><div class='del'>-	if (IFA_ADDR(ifa).sa_family != AF_INET)</div><div class='del'>-	    error = EAFNOSUPPORT;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SIOCSIFMTU:</div><div class='del'>-	if ((error = NOTSUSER()) != 0)</div><div class='del'>-	    break;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-	/* this hack is necessary because ifioctl checks ifr_data</div><div class='del'>-	 * in 4.0 and 5.0, but ifr_data and ifr_metric overlay each </div><div class='del'>-	 * other in the definition of struct ifreq so pppd can't set both.</div><div class='del'>-	 */</div><div class='del'>-        bcopy(ifr-&gt;ifr_data, &amp;mtu, sizeof (u_short));</div><div class='del'>-        ifr-&gt;ifr_mtu = mtu;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	if (ifr-&gt;ifr_mtu &lt; PPP_MINMTU || ifr-&gt;ifr_mtu &gt; PPP_MAXMTU) {</div><div class='del'>-	    error = EINVAL;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	ifp-&gt;if_mtu = ifr-&gt;ifr_mtu;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SIOCGIFMTU:</div><div class='del'>-	ifr-&gt;ifr_mtu = ifp-&gt;if_mtu;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SIOCADDMULTI:</div><div class='del'>-    case SIOCDELMULTI:</div><div class='del'>-	switch(ifr-&gt;ifr_addr.sa_family) {</div><div class='del'>-	case AF_INET:</div><div class='del'>-	    break;</div><div class='del'>-	default:</div><div class='del'>-	    error = EAFNOSUPPORT;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	error = EINVAL;</div><div class='del'>-    }</div><div class='del'>-    splx(s);</div><div class='del'>-    return (error);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Turn a STREAMS message into an mbuf chain.</div><div class='del'>- */</div><div class='del'>-static struct mbuf *</div><div class='del'>-make_mbufs(mp, off)</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int off;</div><div class='del'>-{</div><div class='del'>-    struct mbuf *head, **prevp, *m;</div><div class='del'>-    int len, space, n;</div><div class='del'>-    unsigned char *cp, *dp;</div><div class='del'>-</div><div class='del'>-    len = msgdsize(mp);</div><div class='del'>-    if (len == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    prevp = &amp;head;</div><div class='del'>-    space = 0;</div><div class='del'>-    cp = mp-&gt;b_rptr;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    MGETHDR(m, M_DONTWAIT, MT_DATA);</div><div class='del'>-    m-&gt;m_len = 0;</div><div class='del'>-    space = MHLEN;</div><div class='del'>-    *prevp = m;</div><div class='del'>-    prevp = &amp;m-&gt;m_next;</div><div class='del'>-    dp = mtod(m, unsigned char *);</div><div class='del'>-    len -= space;</div><div class='del'>-    off = 0;</div><div class='del'>-#endif</div><div class='del'>-    for (;;) {</div><div class='del'>-	while (cp &gt;= mp-&gt;b_wptr) {</div><div class='del'>-	    mp = mp-&gt;b_cont;</div><div class='del'>-	    if (mp == 0) {</div><div class='del'>-		*prevp = 0;</div><div class='del'>-		return head;</div><div class='del'>-	    }</div><div class='del'>-	    cp = mp-&gt;b_rptr;</div><div class='del'>-	}</div><div class='del'>-	n = mp-&gt;b_wptr - cp;</div><div class='del'>-	if (space == 0) {</div><div class='del'>-	    MGET(m, M_DONTWAIT, MT_DATA);</div><div class='del'>-	    *prevp = m;</div><div class='del'>-	    if (m == 0) {</div><div class='del'>-		if (head != 0)</div><div class='del'>-		    m_freem(head);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	    if (len + off &gt; 2 * MLEN) {</div><div class='del'>-#ifdef __osf__</div><div class='del'>-		MCLGET(m, M_DONTWAIT);</div><div class='del'>-#else</div><div class='del'>-		MCLGET(m);</div><div class='del'>-#endif</div><div class='del'>-	    }</div><div class='del'>-#ifdef __osf__</div><div class='del'>-	    space = ((m-&gt;m_flags &amp; M_EXT) ? MCLBYTES : MLEN);</div><div class='del'>-#else</div><div class='del'>-	    space = (m-&gt;m_off &gt; MMAXOFF? MCLBYTES: MLEN) - off;</div><div class='del'>-	    m-&gt;m_off += off;</div><div class='del'>-#endif</div><div class='del'>-	    m-&gt;m_len = 0;</div><div class='del'>-	    len -= space;</div><div class='del'>-	    dp = mtod(m, unsigned char *);</div><div class='del'>-	    off = 0;</div><div class='del'>-	    prevp = &amp;m-&gt;m_next;</div><div class='del'>-	}</div><div class='del'>-	if (n &gt; space)</div><div class='del'>-	    n = space;</div><div class='del'>-	bcopy(cp, dp, n);</div><div class='del'>-	cp += n;</div><div class='del'>-	dp += n;</div><div class='del'>-	space -= n;</div><div class='del'>-	m-&gt;m_len += n;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Turn an mbuf chain into a STREAMS message.</div><div class='del'>- */</div><div class='del'>-#define ALLOCB_MAX	4096</div><div class='del'>-</div><div class='del'>-static mblk_t *</div><div class='del'>-make_message(m, off)</div><div class='del'>-    struct mbuf *m;</div><div class='del'>-    int off;</div><div class='del'>-{</div><div class='del'>-    mblk_t *head, **prevp, *mp;</div><div class='del'>-    int len, space, n, nb;</div><div class='del'>-    unsigned char *cp, *dp;</div><div class='del'>-    struct mbuf *nm;</div><div class='del'>-</div><div class='del'>-    len = 0;</div><div class='del'>-    for (nm = m; nm != 0; nm = nm-&gt;m_next)</div><div class='del'>-	len += nm-&gt;m_len;</div><div class='del'>-    prevp = &amp;head;</div><div class='del'>-    space = 0;</div><div class='del'>-    cp = mtod(m, unsigned char *);</div><div class='del'>-    nb = m-&gt;m_len;</div><div class='del'>-    for (;;) {</div><div class='del'>-	while (nb &lt;= 0) {</div><div class='del'>-	    m = m-&gt;m_next;</div><div class='del'>-	    if (m == 0) {</div><div class='del'>-		*prevp = 0;</div><div class='del'>-		return head;</div><div class='del'>-	    }</div><div class='del'>-	    cp = mtod(m, unsigned char *);</div><div class='del'>-	    nb = m-&gt;m_len;</div><div class='del'>-	}</div><div class='del'>-	if (space == 0) {</div><div class='del'>-	    space = len + off;</div><div class='del'>-	    if (space &gt; ALLOCB_MAX)</div><div class='del'>-		space = ALLOCB_MAX;</div><div class='del'>-	    mp = allocb(space, BPRI_LO);</div><div class='del'>-	    *prevp = mp;</div><div class='del'>-	    if (mp == 0) {</div><div class='del'>-		if (head != 0)</div><div class='del'>-		    freemsg(head);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	    dp = mp-&gt;b_rptr += off;</div><div class='del'>-	    space -= off;</div><div class='del'>-	    len -= space;</div><div class='del'>-	    off = 0;</div><div class='del'>-	    prevp = &amp;mp-&gt;b_cont;</div><div class='del'>-	}</div><div class='del'>-	n = nb &lt; space? nb: space;</div><div class='del'>-	bcopy(cp, dp, n);</div><div class='del'>-	cp += n;</div><div class='del'>-	dp += n;</div><div class='del'>-	nb -= n;</div><div class='del'>-	space -= n;</div><div class='del'>-	mp-&gt;b_wptr = dp;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Digital UNIX doesn't allow for removing ifnet structures</div><div class='del'>- * from the list.  But then we're not using this as a loadable</div><div class='del'>- * module anyway, so that's OK.</div><div class='del'>- *</div><div class='del'>- * Under SunOS, this should allow the module to be unloaded.</div><div class='del'>- * Unfortunately, it doesn't seem to detach all the references,</div><div class='del'>- * so your system may well crash after you unload this module :-(</div><div class='del'>- */</div><div class='del'>-#ifndef __osf__</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Remove an interface from the system.</div><div class='del'>- * This routine contains magic.</div><div class='del'>- */</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;netinet/in_pcb.h&gt;</div><div class='del'>-#include &lt;netinet/ip_var.h&gt;</div><div class='del'>-#include &lt;netinet/tcp.h&gt;</div><div class='del'>-#include &lt;netinet/tcp_timer.h&gt;</div><div class='del'>-#include &lt;netinet/tcp_var.h&gt;</div><div class='del'>-#include &lt;netinet/udp.h&gt;</div><div class='del'>-#include &lt;netinet/udp_var.h&gt;</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ppp_if_detach(ifp)</div><div class='del'>-    struct ifnet *ifp;</div><div class='del'>-{</div><div class='del'>-    int s;</div><div class='del'>-    struct inpcb *pcb;</div><div class='del'>-    struct ifaddr *ifa;</div><div class='del'>-    struct in_ifaddr **inap;</div><div class='del'>-    struct ifnet **ifpp;</div><div class='del'>-</div><div class='del'>-    s = splhigh();</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Clear the interface from any routes currently cached in</div><div class='del'>-     * TCP or UDP protocol control blocks.</div><div class='del'>-     */</div><div class='del'>-    for (pcb = tcb.inp_next; pcb != &amp;tcb; pcb = pcb-&gt;inp_next)</div><div class='del'>-	if (pcb-&gt;inp_route.ro_rt &amp;&amp; pcb-&gt;inp_route.ro_rt-&gt;rt_ifp == ifp)</div><div class='del'>-	    in_losing(pcb);</div><div class='del'>-    for (pcb = udb.inp_next; pcb != &amp;udb; pcb = pcb-&gt;inp_next)</div><div class='del'>-	if (pcb-&gt;inp_route.ro_rt &amp;&amp; pcb-&gt;inp_route.ro_rt-&gt;rt_ifp == ifp)</div><div class='del'>-	    in_losing(pcb);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Delete routes through all addresses of the interface.</div><div class='del'>-     */</div><div class='del'>-    for (ifa = ifp-&gt;if_addrlist; ifa != 0; ifa = ifa-&gt;ifa_next) {</div><div class='del'>-	rtinit(ifa, ifa, SIOCDELRT, RTF_HOST);</div><div class='del'>-	rtinit(ifa, ifa, SIOCDELRT, 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Unlink the interface's address(es) from the in_ifaddr list.</div><div class='del'>-     */</div><div class='del'>-    for (inap = &amp;in_ifaddr; *inap != 0; ) {</div><div class='del'>-	if ((*inap)-&gt;ia_ifa.ifa_ifp == ifp)</div><div class='del'>-	    *inap = (*inap)-&gt;ia_next;</div><div class='del'>-	else</div><div class='del'>-	    inap = &amp;(*inap)-&gt;ia_next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Delete the interface from the ifnet list.</div><div class='del'>-     */</div><div class='del'>-    for (ifpp = &amp;ifnet; (*ifpp) != 0; ) {</div><div class='del'>-	if (*ifpp == ifp)</div><div class='del'>-	    break;</div><div class='del'>-	ifpp = &amp;(*ifpp)-&gt;if_next;</div><div class='del'>-    }</div><div class='del'>-    if (*ifpp == 0)</div><div class='del'>-	printf("couldn't find interface ppp%d in ifnet list\n", ifp-&gt;if_unit);</div><div class='del'>-    else</div><div class='del'>-	*ifpp = ifp-&gt;if_next;</div><div class='del'>-</div><div class='del'>-    splx(s);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* __osf__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/ppp.c b/mdk-stage1/ppp/modules/ppp.c<br/>deleted file mode 100644<br/>index 44bf08dff..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/ppp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/ppp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2486 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp.c - STREAMS multiplexing pseudo-device driver for PPP.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This file is used under Solaris 2, SVR4, SunOS 4, and Digital UNIX.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;sys/stropts.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#define queclass(mp)	((mp)-&gt;b_band &amp; QPCTL)</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/ioccom.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#include &lt;sys/conf.h&gt;</div><div class='del'>-#include &lt;sys/dlpi.h&gt;</div><div class='del'>-#include &lt;sys/ddi.h&gt;</div><div class='del'>-#ifdef SOL2</div><div class='del'>-#include &lt;sys/ksynch.h&gt;</div><div class='del'>-#include &lt;sys/kstat.h&gt;</div><div class='del'>-#include &lt;sys/sunddi.h&gt;</div><div class='del'>-#include &lt;sys/ethernet.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/sockio.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-#else /* not SVR4 */</div><div class='del'>-#include &lt;sys/user.h&gt;</div><div class='del'>-#endif /* SVR4 */</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Modifications marked with #ifdef PRIOQ are for priority queueing of</div><div class='del'>- * interactive traffic, and are due to Marko Zec &lt;zec@japa.tel.fer.hr&gt;.</div><div class='del'>- */</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-</div><div class='del'>-#include &lt;netinet/in.h&gt;	/* leave this outside of PRIOQ for htons */</div><div class='del'>-</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-#define __P(x)	x</div><div class='del'>-#else</div><div class='del'>-#define __P(x)	()</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The IP module may use this SAP value for IP packets.</div><div class='del'>- */</div><div class='del'>-#ifndef ETHERTYPE_IP</div><div class='del'>-#define ETHERTYPE_IP	0x800</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if !defined(ETHERTYPE_IPV6) </div><div class='del'>-#define ETHERTYPE_IPV6	0x86dd</div><div class='del'>-#endif /* !defined(ETHERTYPE_IPV6) */</div><div class='del'>-</div><div class='del'>-#if !defined(ETHERTYPE_ALLSAP) &amp;&amp; defined(SOL2)</div><div class='del'>-#define ETHERTYPE_ALLSAP   0</div><div class='del'>-#endif /* !defined(ETHERTYPE_ALLSAP) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if !defined(PPP_ALLSAP) &amp;&amp; defined(SOL2)</div><div class='del'>-#define PPP_ALLSAP  PPP_ALLSTATIONS</div><div class='del'>-#endif /* !defined(PPP_ALLSAP) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-extern time_t time;</div><div class='del'>-</div><div class='del'>-#ifdef SOL2</div><div class='del'>-/*</div><div class='del'>- * We use this reader-writer lock to ensure that the lower streams</div><div class='del'>- * stay connected to the upper streams while the lower-side put and</div><div class='del'>- * service procedures are running.  Essentially it is an existence</div><div class='del'>- * lock for the upper stream associated with each lower stream.</div><div class='del'>- */</div><div class='del'>-krwlock_t ppp_lower_lock;</div><div class='del'>-#define LOCK_LOWER_W	rw_enter(&amp;ppp_lower_lock, RW_WRITER)</div><div class='del'>-#define LOCK_LOWER_R	rw_enter(&amp;ppp_lower_lock, RW_READER)</div><div class='del'>-#define TRYLOCK_LOWER_R	rw_tryenter(&amp;ppp_lower_lock, RW_READER)</div><div class='del'>-#define UNLOCK_LOWER	rw_exit(&amp;ppp_lower_lock)</div><div class='del'>-</div><div class='del'>-#define MT_ENTER(x)	mutex_enter(x)</div><div class='del'>-#define MT_EXIT(x)	mutex_exit(x)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Notes on multithreaded implementation for Solaris 2:</div><div class='del'>- *</div><div class='del'>- * We use an inner perimeter around each queue pair and an outer</div><div class='del'>- * perimeter around the whole driver.  The inner perimeter is</div><div class='del'>- * entered exclusively for all entry points (open, close, put,</div><div class='del'>- * service).  The outer perimeter is entered exclusively for open</div><div class='del'>- * and close and shared for put and service.  This is all done for</div><div class='del'>- * us by the streams framework.</div><div class='del'>- *</div><div class='del'>- * I used to think that the perimeters were entered for the lower</div><div class='del'>- * streams' put and service routines as well as for the upper streams'.</div><div class='del'>- * Because of problems experienced by people, and after reading the</div><div class='del'>- * documentation more closely, I now don't think that is true.  So we</div><div class='del'>- * now use ppp_lower_lock to give us an existence guarantee on the</div><div class='del'>- * upper stream controlling each lower stream.</div><div class='del'>- *</div><div class='del'>- * Shared entry to the outer perimeter protects the existence of all</div><div class='del'>- * the upper streams and their upperstr_t structures, and guarantees</div><div class='del'>- * that the following fields of any upperstr_t won't change:</div><div class='del'>- * nextmn, next, nextppa.  It guarantees that the lowerq field of an</div><div class='del'>- * upperstr_t won't go from non-zero to zero, that the global `ppas'</div><div class='del'>- * won't change and that the no lower stream will get unlinked.</div><div class='del'>- *</div><div class='del'>- * Shared (reader) access to ppa_lower_lock guarantees that no lower</div><div class='del'>- * stream will be unlinked and that the lowerq field of all upperstr_t</div><div class='del'>- * structures won't change.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#else /* SOL2 */</div><div class='del'>-#define LOCK_LOWER_W	0</div><div class='del'>-#define LOCK_LOWER_R	0</div><div class='del'>-#define TRYLOCK_LOWER_R	1</div><div class='del'>-#define UNLOCK_LOWER	0</div><div class='del'>-#define MT_ENTER(x)	0</div><div class='del'>-#define MT_EXIT(x)	0</div><div class='del'>-</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Private information; one per upper stream.</div><div class='del'>- */</div><div class='del'>-typedef struct upperstr {</div><div class='del'>-    minor_t mn;			/* minor device number */</div><div class='del'>-    struct upperstr *nextmn;	/* next minor device */</div><div class='del'>-    queue_t *q;			/* read q associated with this upper stream */</div><div class='del'>-    int flags;			/* flag bits, see below */</div><div class='del'>-    int state;			/* current DLPI state */</div><div class='del'>-    int sap;			/* service access point */</div><div class='del'>-    int req_sap;		/* which SAP the DLPI client requested */</div><div class='del'>-    struct upperstr *ppa;	/* control stream for our ppa */</div><div class='del'>-    struct upperstr *next;	/* next stream for this ppa */</div><div class='del'>-    uint ioc_id;		/* last ioctl ID for this stream */</div><div class='del'>-    enum NPmode npmode;		/* what to do with packets on this SAP */</div><div class='del'>-    unsigned char rblocked;	/* flow control has blocked upper read strm */</div><div class='del'>-	/* N.B. rblocked is only changed by control stream's put/srv procs */</div><div class='del'>-    /*</div><div class='del'>-     * There is exactly one control stream for each PPA.</div><div class='del'>-     * The following fields are only used for control streams.</div><div class='del'>-     */</div><div class='del'>-    int ppa_id;</div><div class='del'>-    queue_t *lowerq;		/* write queue attached below this PPA */</div><div class='del'>-    struct upperstr *nextppa;	/* next control stream */</div><div class='del'>-    int mru;</div><div class='del'>-    int mtu;</div><div class='del'>-    struct pppstat stats;	/* statistics */</div><div class='del'>-    time_t last_sent;		/* time last NP packet sent */</div><div class='del'>-    time_t last_recv;		/* time last NP packet rcvd */</div><div class='del'>-#ifdef SOL2</div><div class='del'>-    kmutex_t stats_lock;	/* lock for stats updates */</div><div class='del'>-    kstat_t *kstats;		/* stats for netstat */</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-    int ifflags;</div><div class='del'>-    char ifname[IFNAMSIZ];</div><div class='del'>-    struct ifstats ifstats;</div><div class='del'>-#endif /* LACHTCP */</div><div class='del'>-} upperstr_t;</div><div class='del'>-</div><div class='del'>-/* Values for flags */</div><div class='del'>-#define US_PRIV		1	/* stream was opened by superuser */</div><div class='del'>-#define US_CONTROL	2	/* stream is a control stream */</div><div class='del'>-#define US_BLOCKED	4	/* flow ctrl has blocked lower write stream */</div><div class='del'>-#define US_LASTMOD	8	/* no PPP modules below us */</div><div class='del'>-#define US_DBGLOG	0x10	/* log various occurrences */</div><div class='del'>-#define US_RBLOCKED	0x20	/* flow ctrl has blocked upper read stream */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-#define US_PROMISC	0x40	/* stream is promiscuous */</div><div class='del'>-#endif /* DL_CURRENT_VERSION &gt;= 2 */</div><div class='del'>-#define US_RAWDATA	0x80	/* raw M_DATA, no DLPI header */</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-static u_char max_band=0;</div><div class='del'>-static u_char def_band=0;</div><div class='del'>-</div><div class='del'>-#define IPPORT_DEFAULT		65535</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Port priority table</div><div class='del'>- * Highest priority ports are listed first, lowest are listed last.</div><div class='del'>- * ICMP &amp; packets using unlisted ports will be treated as "default".</div><div class='del'>- * If IPPORT_DEFAULT is not listed here, "default" packets will be </div><div class='del'>- * assigned lowest priority.</div><div class='del'>- * Each line should be terminated with "0".</div><div class='del'>- * Line containing only "0" marks the end of the list.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static u_short prioq_table[]= {</div><div class='del'>-    113, 53, 0,</div><div class='del'>-    22, 23, 513, 517, 518, 0,</div><div class='del'>-    514, 21, 79, 111, 0,</div><div class='del'>-    25, 109, 110, 0,</div><div class='del'>-    IPPORT_DEFAULT, 0,</div><div class='del'>-    20, 70, 80, 8001, 8008, 8080, 0, /* 8001,8008,8080 - common proxy ports */</div><div class='del'>-0 };</div><div class='del'>-</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static upperstr_t *minor_devs = NULL;</div><div class='del'>-static upperstr_t *ppas = NULL;</div><div class='del'>-</div><div class='del'>-#ifdef SVR4</div><div class='del'>-static int pppopen __P((queue_t *, dev_t *, int, int, cred_t *));</div><div class='del'>-static int pppclose __P((queue_t *, int, cred_t *));</div><div class='del'>-#else</div><div class='del'>-static int pppopen __P((queue_t *, int, int, int));</div><div class='del'>-static int pppclose __P((queue_t *, int));</div><div class='del'>-#endif /* SVR4 */</div><div class='del'>-static int pppurput __P((queue_t *, mblk_t *));</div><div class='del'>-static int pppuwput __P((queue_t *, mblk_t *));</div><div class='del'>-static int pppursrv __P((queue_t *));</div><div class='del'>-static int pppuwsrv __P((queue_t *));</div><div class='del'>-static int ppplrput __P((queue_t *, mblk_t *));</div><div class='del'>-static int ppplwput __P((queue_t *, mblk_t *));</div><div class='del'>-static int ppplrsrv __P((queue_t *));</div><div class='del'>-static int ppplwsrv __P((queue_t *));</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-static void dlpi_request __P((queue_t *, mblk_t *, upperstr_t *));</div><div class='del'>-static void dlpi_error __P((queue_t *, upperstr_t *, int, int, int));</div><div class='del'>-static void dlpi_ok __P((queue_t *, int));</div><div class='del'>-#endif</div><div class='del'>-static int send_data __P((mblk_t *, upperstr_t *));</div><div class='del'>-static void new_ppa __P((queue_t *, mblk_t *));</div><div class='del'>-static void attach_ppa __P((queue_t *, mblk_t *));</div><div class='del'>-static void detach_ppa __P((queue_t *, mblk_t *));</div><div class='del'>-static void detach_lower __P((queue_t *, mblk_t *));</div><div class='del'>-static void debug_dump __P((queue_t *, mblk_t *));</div><div class='del'>-static upperstr_t *find_dest __P((upperstr_t *, int));</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-static upperstr_t *find_promisc __P((upperstr_t *, int));</div><div class='del'>-static mblk_t *prepend_ether __P((upperstr_t *, mblk_t *, int));</div><div class='del'>-static mblk_t *prepend_udind __P((upperstr_t *, mblk_t *, int));</div><div class='del'>-static void promisc_sendup __P((upperstr_t *, mblk_t *, int, int));</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-static int putctl2 __P((queue_t *, int, int, int));</div><div class='del'>-static int putctl4 __P((queue_t *, int, int, int));</div><div class='del'>-static int pass_packet __P((upperstr_t *ppa, mblk_t *mp, int outbound));</div><div class='del'>-#ifdef FILTER_PACKETS</div><div class='del'>-static int ip_hard_filter __P((upperstr_t *ppa, mblk_t *mp, int outbound));</div><div class='del'>-#endif /* FILTER_PACKETS */</div><div class='del'>-</div><div class='del'>-#define PPP_ID 0xb1a6</div><div class='del'>-static struct module_info ppp_info = {</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-    PPP_ID, "ppp", 0, 512, 512, 384</div><div class='del'>-#else</div><div class='del'>-    PPP_ID, "ppp", 0, 512, 512, 128</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit pppurint = {</div><div class='del'>-    pppurput, pppursrv, pppopen, pppclose, NULL, &amp;ppp_info, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit pppuwint = {</div><div class='del'>-    pppuwput, pppuwsrv, NULL, NULL, NULL, &amp;ppp_info, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit ppplrint = {</div><div class='del'>-    ppplrput, ppplrsrv, NULL, NULL, NULL, &amp;ppp_info, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit ppplwint = {</div><div class='del'>-    ppplwput, ppplwsrv, NULL, NULL, NULL, &amp;ppp_info, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-extern struct ifstats *ifstats;</div><div class='del'>-int pppdevflag = 0;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct streamtab pppinfo = {</div><div class='del'>-    &amp;pppurint, &amp;pppuwint,</div><div class='del'>-    &amp;ppplrint, &amp;ppplwint</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int ppp_count;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * How we maintain statistics.</div><div class='del'>- */</div><div class='del'>-#ifdef SOL2</div><div class='del'>-#define INCR_IPACKETS(ppa)				\</div><div class='del'>-	if (ppa-&gt;kstats != 0) {				\</div><div class='del'>-	    KSTAT_NAMED_PTR(ppa-&gt;kstats)[0].value.ul++;	\</div><div class='del'>-	}</div><div class='del'>-#define INCR_IERRORS(ppa)				\</div><div class='del'>-	if (ppa-&gt;kstats != 0) {				\</div><div class='del'>-	    KSTAT_NAMED_PTR(ppa-&gt;kstats)[1].value.ul++;	\</div><div class='del'>-	}</div><div class='del'>-#define INCR_OPACKETS(ppa)				\</div><div class='del'>-	if (ppa-&gt;kstats != 0) {				\</div><div class='del'>-	    KSTAT_NAMED_PTR(ppa-&gt;kstats)[2].value.ul++;	\</div><div class='del'>-	}</div><div class='del'>-#define INCR_OERRORS(ppa)				\</div><div class='del'>-	if (ppa-&gt;kstats != 0) {				\</div><div class='del'>-	    KSTAT_NAMED_PTR(ppa-&gt;kstats)[3].value.ul++;	\</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-#define INCR_IPACKETS(ppa)	ppa-&gt;ifstats.ifs_ipackets++;</div><div class='del'>-#define INCR_IERRORS(ppa)	ppa-&gt;ifstats.ifs_ierrors++;</div><div class='del'>-#define INCR_OPACKETS(ppa)	ppa-&gt;ifstats.ifs_opackets++;</div><div class='del'>-#define INCR_OERRORS(ppa)	ppa-&gt;ifstats.ifs_oerrors++;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * STREAMS driver entry points.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-#ifdef SVR4</div><div class='del'>-pppopen(q, devp, oflag, sflag, credp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    dev_t *devp;</div><div class='del'>-    int oflag, sflag;</div><div class='del'>-    cred_t *credp;</div><div class='del'>-#else</div><div class='del'>-pppopen(q, dev, oflag, sflag)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int dev;			/* really dev_t */</div><div class='del'>-    int oflag, sflag;</div><div class='del'>-#endif</div><div class='del'>-{</div><div class='del'>-    upperstr_t *up;</div><div class='del'>-    upperstr_t **prevp;</div><div class='del'>-    minor_t mn;</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-    u_short *ptr;</div><div class='del'>-    u_char new_band;</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-</div><div class='del'>-    if (q-&gt;q_ptr)</div><div class='del'>-	DRV_OPEN_OK(dev);	/* device is already open */</div><div class='del'>-</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-    /* Calculate max_bband &amp; def_band from definitions in prioq.h</div><div class='del'>-       This colud be done at some more approtiate time (less often)</div><div class='del'>-       but this way it works well so I'll just leave it here */</div><div class='del'>-</div><div class='del'>-    max_band = 1;</div><div class='del'>-    def_band = 0;</div><div class='del'>-    ptr = prioq_table;</div><div class='del'>-    while (*ptr) {</div><div class='del'>-        new_band = 1;</div><div class='del'>-        while (*ptr)</div><div class='del'>-	    if (*ptr++ == IPPORT_DEFAULT) {</div><div class='del'>-		new_band = 0;</div><div class='del'>-		def_band = max_band;</div><div class='del'>-	    }</div><div class='del'>-        max_band += new_band;</div><div class='del'>-        ptr++;</div><div class='del'>-    }</div><div class='del'>-    if (def_band)</div><div class='del'>-        def_band = max_band - def_band;</div><div class='del'>-    --max_band;</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-</div><div class='del'>-    if (sflag == CLONEOPEN) {</div><div class='del'>-	mn = 0;</div><div class='del'>-	for (prevp = &amp;minor_devs; (up = *prevp) != 0; prevp = &amp;up-&gt;nextmn) {</div><div class='del'>-	    if (up-&gt;mn != mn)</div><div class='del'>-		break;</div><div class='del'>-	    ++mn;</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-#ifdef SVR4</div><div class='del'>-	mn = getminor(*devp);</div><div class='del'>-#else</div><div class='del'>-	mn = minor(dev);</div><div class='del'>-#endif</div><div class='del'>-	for (prevp = &amp;minor_devs; (up = *prevp) != 0; prevp = &amp;up-&gt;nextmn) {</div><div class='del'>-	    if (up-&gt;mn &gt;= mn)</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	if (up-&gt;mn == mn) {</div><div class='del'>-	    /* this can't happen */</div><div class='del'>-	    q-&gt;q_ptr = WR(q)-&gt;q_ptr = (caddr_t) up;</div><div class='del'>-	    DRV_OPEN_OK(dev);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Construct a new minor node.</div><div class='del'>-     */</div><div class='del'>-    up = (upperstr_t *) ALLOC_SLEEP(sizeof(upperstr_t));</div><div class='del'>-    bzero((caddr_t) up, sizeof(upperstr_t));</div><div class='del'>-    if (up == 0) {</div><div class='del'>-	DPRINT("pppopen: out of kernel memory\n");</div><div class='del'>-	OPEN_ERROR(ENXIO);</div><div class='del'>-    }</div><div class='del'>-    up-&gt;nextmn = *prevp;</div><div class='del'>-    *prevp = up;</div><div class='del'>-    up-&gt;mn = mn;</div><div class='del'>-#ifdef SVR4</div><div class='del'>-    *devp = makedevice(getmajor(*devp), mn);</div><div class='del'>-#endif</div><div class='del'>-    up-&gt;q = q;</div><div class='del'>-    if (NOTSUSER() == 0)</div><div class='del'>-	up-&gt;flags |= US_PRIV;</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-    up-&gt;state = DL_UNATTACHED;</div><div class='del'>-#endif</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-    up-&gt;ifflags = IFF_UP | IFF_POINTOPOINT;</div><div class='del'>-#endif</div><div class='del'>-    up-&gt;sap = -1;</div><div class='del'>-    up-&gt;last_sent = up-&gt;last_recv = time;</div><div class='del'>-    up-&gt;npmode = NPMODE_DROP;</div><div class='del'>-    q-&gt;q_ptr = (caddr_t) up;</div><div class='del'>-    WR(q)-&gt;q_ptr = (caddr_t) up;</div><div class='del'>-    noenable(WR(q));</div><div class='del'>-#ifdef SOL2</div><div class='del'>-    mutex_init(&amp;up-&gt;stats_lock, NULL, MUTEX_DRIVER, NULL);</div><div class='del'>-#endif</div><div class='del'>-    ++ppp_count;</div><div class='del'>-</div><div class='del'>-    qprocson(q);</div><div class='del'>-    DRV_OPEN_OK(makedev(major(dev), mn));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-#ifdef SVR4</div><div class='del'>-pppclose(q, flag, credp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int flag;</div><div class='del'>-    cred_t *credp;</div><div class='del'>-#else</div><div class='del'>-pppclose(q, flag)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int flag;</div><div class='del'>-#endif</div><div class='del'>-{</div><div class='del'>-    upperstr_t *up, **upp;</div><div class='del'>-    upperstr_t *as, *asnext;</div><div class='del'>-    upperstr_t **prevp;</div><div class='del'>-</div><div class='del'>-    qprocsoff(q);</div><div class='del'>-</div><div class='del'>-    up = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (up == 0) {</div><div class='del'>-	DPRINT("pppclose: q_ptr = 0\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (up-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	DPRINT2("ppp/%d: close, flags=%x\n", up-&gt;mn, up-&gt;flags);</div><div class='del'>-    if (up-&gt;flags &amp; US_CONTROL) {</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-	struct ifstats *ifp, *pifp;</div><div class='del'>-#endif</div><div class='del'>-	if (up-&gt;lowerq != 0) {</div><div class='del'>-	    /* Gack! the lower stream should have be unlinked earlier! */</div><div class='del'>-	    DPRINT1("ppp%d: lower stream still connected on close?\n",</div><div class='del'>-		    up-&gt;mn);</div><div class='del'>-	    LOCK_LOWER_W;</div><div class='del'>-	    up-&gt;lowerq-&gt;q_ptr = 0;</div><div class='del'>-	    RD(up-&gt;lowerq)-&gt;q_ptr = 0;</div><div class='del'>-	    up-&gt;lowerq = 0;</div><div class='del'>-	    UNLOCK_LOWER;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * This stream represents a PPA:</div><div class='del'>-	 * For all streams attached to the PPA, clear their</div><div class='del'>-	 * references to this PPA.</div><div class='del'>-	 * Then remove this PPA from the list of PPAs.</div><div class='del'>-	 */</div><div class='del'>-	for (as = up-&gt;next; as != 0; as = asnext) {</div><div class='del'>-	    asnext = as-&gt;next;</div><div class='del'>-	    as-&gt;next = 0;</div><div class='del'>-	    as-&gt;ppa = 0;</div><div class='del'>-	    if (as-&gt;flags &amp; US_BLOCKED) {</div><div class='del'>-		as-&gt;flags &amp;= ~US_BLOCKED;</div><div class='del'>-		flushq(WR(as-&gt;q), FLUSHDATA);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	for (upp = &amp;ppas; *upp != 0; upp = &amp;(*upp)-&gt;nextppa)</div><div class='del'>-	    if (*upp == up) {</div><div class='del'>-		*upp = up-&gt;nextppa;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-	/* Remove the statistics from the active list.  */</div><div class='del'>-	for (ifp = ifstats, pifp = 0; ifp; ifp = ifp-&gt;ifs_next) {</div><div class='del'>-	    if (ifp == &amp;up-&gt;ifstats) {</div><div class='del'>-		if (pifp)</div><div class='del'>-		    pifp-&gt;ifs_next = ifp-&gt;ifs_next;</div><div class='del'>-		else</div><div class='del'>-		    ifstats = ifp-&gt;ifs_next;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    pifp = ifp;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * If this stream is attached to a PPA,</div><div class='del'>-	 * remove it from the PPA's list.</div><div class='del'>-	 */</div><div class='del'>-	if ((as = up-&gt;ppa) != 0) {</div><div class='del'>-	    for (; as-&gt;next != 0; as = as-&gt;next)</div><div class='del'>-		if (as-&gt;next == up) {</div><div class='del'>-		    as-&gt;next = up-&gt;next;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#ifdef SOL2</div><div class='del'>-    if (up-&gt;kstats)</div><div class='del'>-	kstat_delete(up-&gt;kstats);</div><div class='del'>-    mutex_destroy(&amp;up-&gt;stats_lock);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    q-&gt;q_ptr = NULL;</div><div class='del'>-    WR(q)-&gt;q_ptr = NULL;</div><div class='del'>-</div><div class='del'>-    for (prevp = &amp;minor_devs; *prevp != 0; prevp = &amp;(*prevp)-&gt;nextmn) {</div><div class='del'>-	if (*prevp == up) {</div><div class='del'>-	    *prevp = up-&gt;nextmn;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    FREE(up, sizeof(upperstr_t));</div><div class='del'>-    --ppp_count;</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * A message from on high.  We do one of three things:</div><div class='del'>- *	- qreply()</div><div class='del'>- *	- put the message on the lower write stream</div><div class='del'>- *	- queue it for our service routine</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-pppuwput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *ppa, *nps;</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-    struct linkblk *lb;</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-    struct ifreq *ifr;</div><div class='del'>-    int i;</div><div class='del'>-#endif</div><div class='del'>-    queue_t *lq;</div><div class='del'>-    int error, n, sap;</div><div class='del'>-    mblk_t *mq;</div><div class='del'>-    struct ppp_idle *pip;</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-    queue_t *tlq;</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-#ifdef NO_DLPI</div><div class='del'>-    upperstr_t *os;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("pppuwput: q_ptr = 0!\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (mp == 0) {</div><div class='del'>-	DPRINT1("pppuwput/%d: mp = 0!\n", us-&gt;mn);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (mp-&gt;b_datap == 0) {</div><div class='del'>-	DPRINT1("pppuwput/%d: mp-&gt;b_datap = 0!\n", us-&gt;mn);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-    case M_PCPROTO:</div><div class='del'>-    case M_PROTO:</div><div class='del'>-	dlpi_request(q, mp, us);</div><div class='del'>-	break;</div><div class='del'>-#endif /* NO_DLPI */</div><div class='del'>-</div><div class='del'>-    case M_DATA:</div><div class='del'>-	if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	    DPRINT3("ppp/%d: uwput M_DATA len=%d flags=%x\n",</div><div class='del'>-		    us-&gt;mn, msgdsize(mp), us-&gt;flags);</div><div class='del'>-	if (us-&gt;ppa == 0 || msgdsize(mp) &gt; us-&gt;ppa-&gt;mtu + PPP_HDRLEN</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-	    || (us-&gt;flags &amp; US_CONTROL) == 0</div><div class='del'>-#endif /* NO_DLPI */</div><div class='del'>-	    ) {</div><div class='del'>-	    DPRINT1("pppuwput: junk data len=%d\n", msgdsize(mp));</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-#ifdef NO_DLPI</div><div class='del'>-	if ((us-&gt;flags &amp; US_CONTROL) == 0 &amp;&amp; !pass_packet(us, mp, 1))</div><div class='del'>-	    break;</div><div class='del'>-#endif</div><div class='del'>-	if (!send_data(mp, us))</div><div class='del'>-	    putq(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCTL:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	error = EINVAL;</div><div class='del'>-	if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	    DPRINT3("ppp/%d: ioctl %x count=%d\n",</div><div class='del'>-		    us-&gt;mn, iop-&gt;ioc_cmd, iop-&gt;ioc_count);</div><div class='del'>-	switch (iop-&gt;ioc_cmd) {</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	case DLIOCRAW:	    /* raw M_DATA mode */</div><div class='del'>-	    us-&gt;flags |= US_RAWDATA;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-	case I_LINK:</div><div class='del'>-	    if ((us-&gt;flags &amp; US_CONTROL) == 0 || us-&gt;lowerq != 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl I_LINK b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    lb = (struct linkblk *) mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    lq = lb-&gt;l_qbot;</div><div class='del'>-	    if (lq == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl I_LINK l_qbot = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    LOCK_LOWER_W;</div><div class='del'>-	    us-&gt;lowerq = lq;</div><div class='del'>-	    lq-&gt;q_ptr = (caddr_t) q;</div><div class='del'>-	    RD(lq)-&gt;q_ptr = (caddr_t) us-&gt;q;</div><div class='del'>-	    UNLOCK_LOWER;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    us-&gt;flags &amp;= ~US_LASTMOD;</div><div class='del'>-	    /* Unblock upper streams which now feed this lower stream. */</div><div class='del'>-	    qenable(q);</div><div class='del'>-	    /* Send useful information down to the modules which</div><div class='del'>-	       are now linked below us. */</div><div class='del'>-	    putctl2(lq, M_CTL, PPPCTL_UNIT, us-&gt;ppa_id);</div><div class='del'>-	    putctl4(lq, M_CTL, PPPCTL_MRU, us-&gt;mru);</div><div class='del'>-	    putctl4(lq, M_CTL, PPPCTL_MTU, us-&gt;mtu);</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-            /* Lower tty driver's queue hiwat/lowat from default 4096/128</div><div class='del'>-               to 256/128 since we don't want queueing of data on</div><div class='del'>-               output to physical device */</div><div class='del'>-</div><div class='del'>-            freezestr(lq);</div><div class='del'>-            for (tlq = lq; tlq-&gt;q_next != NULL; tlq = tlq-&gt;q_next)</div><div class='del'>-		;</div><div class='del'>-            strqset(tlq, QHIWAT, 0, 256);</div><div class='del'>-            strqset(tlq, QLOWAT, 0, 128);</div><div class='del'>-            unfreezestr(lq);</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case I_UNLINK:</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl I_UNLINK b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    lb = (struct linkblk *) mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-#if DEBUG</div><div class='del'>-	    if (us-&gt;lowerq != lb-&gt;l_qbot) {</div><div class='del'>-		DPRINT2("ppp unlink: lowerq=%x qbot=%x\n",</div><div class='del'>-			us-&gt;lowerq, lb-&gt;l_qbot);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-#endif</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    qwriter(q, mp, detach_lower, PERIM_OUTER);</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_NEWPPA:</div><div class='del'>-	    if (us-&gt;flags &amp; US_CONTROL)</div><div class='del'>-		break;</div><div class='del'>-	    if ((us-&gt;flags &amp; US_PRIV) == 0) {</div><div class='del'>-		error = EPERM;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    /* Arrange to return an int */</div><div class='del'>-	    if ((mq = mp-&gt;b_cont) == 0</div><div class='del'>-		|| mq-&gt;b_datap-&gt;db_lim - mq-&gt;b_rptr &lt; sizeof(int)) {</div><div class='del'>-		mq = allocb(sizeof(int), BPRI_HI);</div><div class='del'>-		if (mq == 0) {</div><div class='del'>-		    error = ENOSR;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		if (mp-&gt;b_cont != 0)</div><div class='del'>-		    freemsg(mp-&gt;b_cont);</div><div class='del'>-		mp-&gt;b_cont = mq;</div><div class='del'>-		mq-&gt;b_cont = 0;</div><div class='del'>-	    }</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(int);</div><div class='del'>-	    mq-&gt;b_wptr = mq-&gt;b_rptr + sizeof(int);</div><div class='del'>-	    qwriter(q, mp, new_ppa, PERIM_OUTER);</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_ATTACH:</div><div class='del'>-	    /* like dlpi_attach, for programs which can't write to</div><div class='del'>-	       the stream (like pppstats) */</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int) || us-&gt;ppa != 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_ATTACH b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    for (ppa = ppas; ppa != 0; ppa = ppa-&gt;nextppa)</div><div class='del'>-		if (ppa-&gt;ppa_id == n)</div><div class='del'>-		    break;</div><div class='del'>-	    if (ppa == 0)</div><div class='del'>-		break;</div><div class='del'>-	    us-&gt;ppa = ppa;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    qwriter(q, mp, attach_ppa, PERIM_OUTER);</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-#ifdef NO_DLPI</div><div class='del'>-	case PPPIO_BIND:</div><div class='del'>-	    /* Attach to a given SAP. */</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int) || us-&gt;ppa == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_BIND b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    /* n must be a valid PPP network protocol number. */</div><div class='del'>-	    if (n &lt; 0x21 || n &gt; 0x3fff || (n &amp; 0x101) != 1)</div><div class='del'>-		break;</div><div class='del'>-	    /* check that no other stream is bound to this sap already. */</div><div class='del'>-	    for (os = us-&gt;ppa; os != 0; os = os-&gt;next)</div><div class='del'>-		if (os-&gt;sap == n)</div><div class='del'>-		    break;</div><div class='del'>-	    if (os != 0)</div><div class='del'>-		break;</div><div class='del'>-	    us-&gt;sap = n;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-#endif /* NO_DLPI */</div><div class='del'>-</div><div class='del'>-	case PPPIO_MRU:</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int) || (us-&gt;flags &amp; US_CONTROL) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_MRU b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    if (n &lt;= 0 || n &gt; PPP_MAXMRU)</div><div class='del'>-		break;</div><div class='del'>-	    if (n &lt; PPP_MRU)</div><div class='del'>-		n = PPP_MRU;</div><div class='del'>-	    us-&gt;mru = n;</div><div class='del'>-	    if (us-&gt;lowerq)</div><div class='del'>-		putctl4(us-&gt;lowerq, M_CTL, PPPCTL_MRU, n);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_MTU:</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int) || (us-&gt;flags &amp; US_CONTROL) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_MTU b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    if (n &lt;= 0 || n &gt; PPP_MAXMTU)</div><div class='del'>-		break;</div><div class='del'>-	    us-&gt;mtu = n;</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-	    /* The MTU reported in netstat, not used as IP max packet size! */</div><div class='del'>-	    us-&gt;ifstats.ifs_mtu = n;</div><div class='del'>-#endif</div><div class='del'>-	    if (us-&gt;lowerq)</div><div class='del'>-		putctl4(us-&gt;lowerq, M_CTL, PPPCTL_MTU, n);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_LASTMOD:</div><div class='del'>-	    us-&gt;flags |= US_LASTMOD;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_DEBUG:</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int))</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_DEBUG b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    if (n == PPPDBG_DUMP + PPPDBG_DRIVER) {</div><div class='del'>-		qwriter(q, NULL, debug_dump, PERIM_OUTER);</div><div class='del'>-		iop-&gt;ioc_count = 0;</div><div class='del'>-		error = -1;</div><div class='del'>-	    } else if (n == PPPDBG_LOG + PPPDBG_DRIVER) {</div><div class='del'>-		DPRINT1("ppp/%d: debug log enabled\n", us-&gt;mn);</div><div class='del'>-		us-&gt;flags |= US_DBGLOG;</div><div class='del'>-		iop-&gt;ioc_count = 0;</div><div class='del'>-		error = 0;</div><div class='del'>-	    } else {</div><div class='del'>-		if (us-&gt;ppa == 0 || us-&gt;ppa-&gt;lowerq == 0)</div><div class='del'>-		    break;</div><div class='del'>-		putnext(us-&gt;ppa-&gt;lowerq, mp);</div><div class='del'>-		error = -1;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_NPMODE:</div><div class='del'>-	    if (iop-&gt;ioc_count != 2 * sizeof(int))</div><div class='del'>-		break;</div><div class='del'>-	    if ((us-&gt;flags &amp; US_CONTROL) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("pppuwput/%d: ioctl PPPIO_NPMODE b_cont = 0!\n", us-&gt;mn);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    sap = ((int *)mp-&gt;b_cont-&gt;b_rptr)[0];</div><div class='del'>-	    for (nps = us-&gt;next; nps != 0; nps = nps-&gt;next) {</div><div class='del'>-		if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-		    DPRINT2("us = 0x%x, us-&gt;next-&gt;sap = 0x%x\n", nps, nps-&gt;sap);</div><div class='del'>-		if (nps-&gt;sap == sap)</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    if (nps == 0) {</div><div class='del'>-		if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-		    DPRINT2("ppp/%d: no stream for sap %x\n", us-&gt;mn, sap);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    /* XXX possibly should use qwriter here */</div><div class='del'>-	    nps-&gt;npmode = (enum NPmode) ((int *)mp-&gt;b_cont-&gt;b_rptr)[1];</div><div class='del'>-	    if (nps-&gt;npmode != NPMODE_QUEUE &amp;&amp; (nps-&gt;flags &amp; US_BLOCKED) != 0)</div><div class='del'>-		qenable(WR(nps-&gt;q));</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_GIDLE:</div><div class='del'>-	    if ((ppa = us-&gt;ppa) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    mq = allocb(sizeof(struct ppp_idle), BPRI_HI);</div><div class='del'>-	    if (mq == 0) {</div><div class='del'>-		error = ENOSR;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont != 0)</div><div class='del'>-		freemsg(mp-&gt;b_cont);</div><div class='del'>-	    mp-&gt;b_cont = mq;</div><div class='del'>-	    mq-&gt;b_cont = 0;</div><div class='del'>-	    pip = (struct ppp_idle *) mq-&gt;b_wptr;</div><div class='del'>-	    pip-&gt;xmit_idle = time - ppa-&gt;last_sent;</div><div class='del'>-	    pip-&gt;recv_idle = time - ppa-&gt;last_recv;</div><div class='del'>-	    mq-&gt;b_wptr += sizeof(struct ppp_idle);</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(struct ppp_idle);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-	case SIOCSIFNAME:</div><div class='del'>-	    /* Sent from IP down to us.  Attach the ifstats structure.  */</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(struct ifreq) || us-&gt;ppa == 0)</div><div class='del'>-	        break;</div><div class='del'>-	    ifr = (struct ifreq *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    /* Find the unit number in the interface name.  */</div><div class='del'>-	    for (i = 0; i &lt; IFNAMSIZ; i++) {</div><div class='del'>-		if (ifr-&gt;ifr_name[i] == 0 ||</div><div class='del'>-		    (ifr-&gt;ifr_name[i] &gt;= '0' &amp;&amp;</div><div class='del'>-		     ifr-&gt;ifr_name[i] &lt;= '9'))</div><div class='del'>-		    break;</div><div class='del'>-		else</div><div class='del'>-		    us-&gt;ifname[i] = ifr-&gt;ifr_name[i];</div><div class='del'>-	    }</div><div class='del'>-	    us-&gt;ifname[i] = 0;</div><div class='del'>-</div><div class='del'>-	    /* Convert the unit number to binary.  */</div><div class='del'>-	    for (n = 0; i &lt; IFNAMSIZ; i++) {</div><div class='del'>-		if (ifr-&gt;ifr_name[i] == 0) {</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	        else {</div><div class='del'>-		    n = n * 10 + ifr-&gt;ifr_name[i] - '0';</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /* Verify the ppa.  */</div><div class='del'>-	    if (us-&gt;ppa-&gt;ppa_id != n)</div><div class='del'>-		break;</div><div class='del'>-	    ppa = us-&gt;ppa;</div><div class='del'>-</div><div class='del'>-	    /* Set up the netstat block.  */</div><div class='del'>-	    strncpy (ppa-&gt;ifname, us-&gt;ifname, IFNAMSIZ);</div><div class='del'>-</div><div class='del'>-	    ppa-&gt;ifstats.ifs_name = ppa-&gt;ifname;</div><div class='del'>-	    ppa-&gt;ifstats.ifs_unit = n;</div><div class='del'>-	    ppa-&gt;ifstats.ifs_active = us-&gt;state != DL_UNBOUND;</div><div class='del'>-	    ppa-&gt;ifstats.ifs_mtu = ppa-&gt;mtu;</div><div class='del'>-</div><div class='del'>-	    /* Link in statistics used by netstat.  */</div><div class='del'>-	    ppa-&gt;ifstats.ifs_next = ifstats;</div><div class='del'>-	    ifstats = &amp;ppa-&gt;ifstats;</div><div class='del'>-</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case SIOCGIFFLAGS:</div><div class='del'>-	    if (!(us-&gt;flags &amp; US_CONTROL)) {</div><div class='del'>-		if (us-&gt;ppa)</div><div class='del'>-		    us = us-&gt;ppa;</div><div class='del'>-	        else</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    ((struct iocblk_in *)iop)-&gt;ioc_ifflags = us-&gt;ifflags;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case SIOCSIFFLAGS:</div><div class='del'>-	    if (!(us-&gt;flags &amp; US_CONTROL)) {</div><div class='del'>-		if (us-&gt;ppa)</div><div class='del'>-		    us = us-&gt;ppa;</div><div class='del'>-		else</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    us-&gt;ifflags = ((struct iocblk_in *)iop)-&gt;ioc_ifflags;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case SIOCSIFADDR:</div><div class='del'>-	    if (!(us-&gt;flags &amp; US_CONTROL)) {</div><div class='del'>-		if (us-&gt;ppa)</div><div class='del'>-		    us = us-&gt;ppa;</div><div class='del'>-		else</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    us-&gt;ifflags |= IFF_RUNNING;</div><div class='del'>-	    ((struct iocblk_in *)iop)-&gt;ioc_ifflags |= IFF_RUNNING;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case SIOCSIFMTU:</div><div class='del'>-	    /*</div><div class='del'>-	     * Vanilla SVR4 systems don't handle SIOCSIFMTU, rather</div><div class='del'>-	     * they take the MTU from the DL_INFO_ACK we sent in response</div><div class='del'>-	     * to their DL_INFO_REQ.  Fortunately, they will update the</div><div class='del'>-	     * MTU if we send an unsolicited DL_INFO_ACK up.</div><div class='del'>-	     */</div><div class='del'>-	    if ((mq = allocb(sizeof(dl_info_req_t), BPRI_HI)) == 0)</div><div class='del'>-		break;		/* should do bufcall */</div><div class='del'>-	    ((union DL_primitives *)mq-&gt;b_rptr)-&gt;dl_primitive = DL_INFO_REQ;</div><div class='del'>-	    mq-&gt;b_wptr = mq-&gt;b_rptr + sizeof(dl_info_req_t);</div><div class='del'>-	    dlpi_request(q, mq, us);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case SIOCGIFNETMASK:</div><div class='del'>-	case SIOCSIFNETMASK:</div><div class='del'>-	case SIOCGIFADDR:</div><div class='del'>-	case SIOCGIFDSTADDR:</div><div class='del'>-	case SIOCSIFDSTADDR:</div><div class='del'>-	case SIOCGIFMETRIC:</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-#endif /* LACHTCP */</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    if (us-&gt;ppa == 0 || us-&gt;ppa-&gt;lowerq == 0)</div><div class='del'>-		break;</div><div class='del'>-	    us-&gt;ioc_id = iop-&gt;ioc_id;</div><div class='del'>-	    error = -1;</div><div class='del'>-	    switch (iop-&gt;ioc_cmd) {</div><div class='del'>-	    case PPPIO_GETSTAT:</div><div class='del'>-	    case PPPIO_GETCSTAT:</div><div class='del'>-		if (us-&gt;flags &amp; US_LASTMOD) {</div><div class='del'>-		    error = EINVAL;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		putnext(us-&gt;ppa-&gt;lowerq, mp);</div><div class='del'>-		break;</div><div class='del'>-	    default:</div><div class='del'>-		if (us-&gt;flags &amp; US_PRIV)</div><div class='del'>-		    putnext(us-&gt;ppa-&gt;lowerq, mp);</div><div class='del'>-		else {</div><div class='del'>-		    DPRINT1("ppp ioctl %x rejected\n", iop-&gt;ioc_cmd);</div><div class='del'>-		    error = EPERM;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (error &gt; 0) {</div><div class='del'>-	    iop-&gt;ioc_error = error;</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCNAK;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else if (error == 0) {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_FLUSH:</div><div class='del'>-	if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	    DPRINT2("ppp/%d: flush %x\n", us-&gt;mn, *mp-&gt;b_rptr);</div><div class='del'>-	if (*mp-&gt;b_rptr &amp; FLUSHW)</div><div class='del'>-	    flushq(q, FLUSHDATA);</div><div class='del'>-	if (*mp-&gt;b_rptr &amp; FLUSHR) {</div><div class='del'>-	    *mp-&gt;b_rptr &amp;= ~FLUSHW;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-static void</div><div class='del'>-dlpi_request(q, mp, us)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-{</div><div class='del'>-    union DL_primitives *d = (union DL_primitives *) mp-&gt;b_rptr;</div><div class='del'>-    int size = mp-&gt;b_wptr - mp-&gt;b_rptr;</div><div class='del'>-    mblk_t *reply, *np;</div><div class='del'>-    upperstr_t *ppa, *os;</div><div class='del'>-    int sap, len;</div><div class='del'>-    dl_info_ack_t *info;</div><div class='del'>-    dl_bind_ack_t *ackp;</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-    dl_phys_addr_ack_t	*paddrack;</div><div class='del'>-    static struct ether_addr eaddr = {0};</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	DPRINT3("ppp/%d: dlpi prim %x len=%d\n", us-&gt;mn,</div><div class='del'>-		d-&gt;dl_primitive, size);</div><div class='del'>-    switch (d-&gt;dl_primitive) {</div><div class='del'>-    case DL_INFO_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_info_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if ((reply = allocb(sizeof(dl_info_ack_t), BPRI_HI)) == 0)</div><div class='del'>-	    break;		/* should do bufcall */</div><div class='del'>-	reply-&gt;b_datap-&gt;db_type = M_PCPROTO;</div><div class='del'>-	info = (dl_info_ack_t *) reply-&gt;b_wptr;</div><div class='del'>-	reply-&gt;b_wptr += sizeof(dl_info_ack_t);</div><div class='del'>-	bzero((caddr_t) info, sizeof(dl_info_ack_t));</div><div class='del'>-	info-&gt;dl_primitive = DL_INFO_ACK;</div><div class='del'>-	info-&gt;dl_max_sdu = us-&gt;ppa? us-&gt;ppa-&gt;mtu: PPP_MAXMTU;</div><div class='del'>-	info-&gt;dl_min_sdu = 1;</div><div class='del'>-	info-&gt;dl_addr_length = sizeof(uint);</div><div class='del'>-	info-&gt;dl_mac_type = DL_ETHER;	/* a bigger lie */</div><div class='del'>-	info-&gt;dl_current_state = us-&gt;state;</div><div class='del'>-	info-&gt;dl_service_mode = DL_CLDLS;</div><div class='del'>-	info-&gt;dl_provider_style = DL_STYLE2;</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-	info-&gt;dl_sap_length = sizeof(uint);</div><div class='del'>-	info-&gt;dl_version = DL_CURRENT_VERSION;</div><div class='del'>-#endif</div><div class='del'>-	qreply(q, reply);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_ATTACH_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_attach_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if (us-&gt;state != DL_UNATTACHED || us-&gt;ppa != 0) {</div><div class='del'>-	    dlpi_error(q, us, DL_ATTACH_REQ, DL_OUTSTATE, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	for (ppa = ppas; ppa != 0; ppa = ppa-&gt;nextppa)</div><div class='del'>-	    if (ppa-&gt;ppa_id == d-&gt;attach_req.dl_ppa)</div><div class='del'>-		break;</div><div class='del'>-	if (ppa == 0) {</div><div class='del'>-	    dlpi_error(q, us, DL_ATTACH_REQ, DL_BADPPA, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	us-&gt;ppa = ppa;</div><div class='del'>-	qwriter(q, mp, attach_ppa, PERIM_OUTER);</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    case DL_DETACH_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_detach_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if (us-&gt;state != DL_UNBOUND || us-&gt;ppa == 0) {</div><div class='del'>-	    dlpi_error(q, us, DL_DETACH_REQ, DL_OUTSTATE, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	qwriter(q, mp, detach_ppa, PERIM_OUTER);</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    case DL_BIND_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_bind_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if (us-&gt;state != DL_UNBOUND || us-&gt;ppa == 0) {</div><div class='del'>-	    dlpi_error(q, us, DL_BIND_REQ, DL_OUTSTATE, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-#if 0</div><div class='del'>-	/* apparently this test fails (unnecessarily?) on some systems */</div><div class='del'>-	if (d-&gt;bind_req.dl_service_mode != DL_CLDLS) {</div><div class='del'>-	    dlpi_error(q, us, DL_BIND_REQ, DL_UNSUPPORTED, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	/* saps must be valid PPP network protocol numbers,</div><div class='del'>-	   except that we accept ETHERTYPE_IP in place of PPP_IP. */</div><div class='del'>-	sap = d-&gt;bind_req.dl_sap;</div><div class='del'>-	us-&gt;req_sap = sap;</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	    DPRINT2("DL_BIND_REQ: ip gives sap = 0x%x, us = 0x%x", sap, us);</div><div class='del'>-</div><div class='del'>-	if (sap == ETHERTYPE_IP)	    /* normal IFF_IPV4 */</div><div class='del'>-	    sap = PPP_IP;</div><div class='del'>-	else if (sap == ETHERTYPE_IPV6)	    /* when IFF_IPV6 is set */</div><div class='del'>-	    sap = PPP_IPV6;</div><div class='del'>-	else if (sap == ETHERTYPE_ALLSAP)   /* snoop gives sap of 0 */</div><div class='del'>-	    sap = PPP_ALLSAP;</div><div class='del'>-	else {</div><div class='del'>-	    DPRINT2("DL_BIND_REQ: unrecognized sap = 0x%x, us = 0x%x", sap, us);</div><div class='del'>-	    dlpi_error(q, us, DL_BIND_REQ, DL_BADADDR, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-#else</div><div class='del'>-	if (sap == ETHERTYPE_IP)</div><div class='del'>-	    sap = PPP_IP;</div><div class='del'>-	if (sap &lt; 0x21 || sap &gt; 0x3fff || (sap &amp; 0x101) != 1) {</div><div class='del'>-	    dlpi_error(q, us, DL_BIND_REQ, DL_BADADDR, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-	/* check that no other stream is bound to this sap already. */</div><div class='del'>-	for (os = us-&gt;ppa; os != 0; os = os-&gt;next)</div><div class='del'>-	    if (os-&gt;sap == sap)</div><div class='del'>-		break;</div><div class='del'>-	if (os != 0) {</div><div class='del'>-	    dlpi_error(q, us, DL_BIND_REQ, DL_NOADDR, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	us-&gt;sap = sap;</div><div class='del'>-	us-&gt;state = DL_IDLE;</div><div class='del'>-</div><div class='del'>-	if ((reply = allocb(sizeof(dl_bind_ack_t) + sizeof(uint),</div><div class='del'>-			    BPRI_HI)) == 0)</div><div class='del'>-	    break;		/* should do bufcall */</div><div class='del'>-	ackp = (dl_bind_ack_t *) reply-&gt;b_wptr;</div><div class='del'>-	reply-&gt;b_wptr += sizeof(dl_bind_ack_t) + sizeof(uint);</div><div class='del'>-	reply-&gt;b_datap-&gt;db_type = M_PCPROTO;</div><div class='del'>-	bzero((caddr_t) ackp, sizeof(dl_bind_ack_t));</div><div class='del'>-	ackp-&gt;dl_primitive = DL_BIND_ACK;</div><div class='del'>-	ackp-&gt;dl_sap = sap;</div><div class='del'>-	ackp-&gt;dl_addr_length = sizeof(uint);</div><div class='del'>-	ackp-&gt;dl_addr_offset = sizeof(dl_bind_ack_t);</div><div class='del'>-	*(uint *)(ackp+1) = sap;</div><div class='del'>-	qreply(q, reply);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_UNBIND_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_unbind_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if (us-&gt;state != DL_IDLE) {</div><div class='del'>-	    dlpi_error(q, us, DL_UNBIND_REQ, DL_OUTSTATE, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	us-&gt;sap = -1;</div><div class='del'>-	us-&gt;state = DL_UNBOUND;</div><div class='del'>-#ifdef LACHTCP</div><div class='del'>-	us-&gt;ppa-&gt;ifstats.ifs_active = 0;</div><div class='del'>-#endif</div><div class='del'>-	dlpi_ok(q, DL_UNBIND_REQ);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_UNITDATA_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_unitdata_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	if (us-&gt;state != DL_IDLE) {</div><div class='del'>-	    dlpi_error(q, us, DL_UNITDATA_REQ, DL_OUTSTATE, 0);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	if ((ppa = us-&gt;ppa) == 0) {</div><div class='del'>-	    cmn_err(CE_CONT, "ppp: in state dl_idle but ppa == 0?\n");</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	len = mp-&gt;b_cont == 0? 0: msgdsize(mp-&gt;b_cont);</div><div class='del'>-	if (len &gt; ppa-&gt;mtu) {</div><div class='del'>-	    DPRINT2("dlpi data too large (%d &gt; %d)\n", len, ppa-&gt;mtu);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	/*</div><div class='del'>-	 * Should there be any promiscuous stream(s), send the data</div><div class='del'>-	 * up for each promiscuous stream that we recognize.</div><div class='del'>-	 */</div><div class='del'>-	if (mp-&gt;b_cont)</div><div class='del'>-	    promisc_sendup(ppa, mp-&gt;b_cont, us-&gt;sap, 0);</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-	mp-&gt;b_band = 0;</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-        /* Extract s_port &amp; d_port from IP-packet, the code is a bit</div><div class='del'>-           dirty here, but so am I, too... */</div><div class='del'>-        if (mp-&gt;b_datap-&gt;db_type == M_PROTO &amp;&amp; us-&gt;sap == PPP_IP</div><div class='del'>-	    &amp;&amp; mp-&gt;b_cont != 0) {</div><div class='del'>-	    u_char *bb, *tlh;</div><div class='del'>-	    int iphlen, len;</div><div class='del'>-	    u_short *ptr;</div><div class='del'>-	    u_char band_unset, cur_band, syn;</div><div class='del'>-	    u_short s_port, d_port;</div><div class='del'>-</div><div class='del'>-            bb = mp-&gt;b_cont-&gt;b_rptr; /* bb points to IP-header*/</div><div class='del'>-	    len = mp-&gt;b_cont-&gt;b_wptr - mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-            syn = 0;</div><div class='del'>-	    s_port = IPPORT_DEFAULT;</div><div class='del'>-	    d_port = IPPORT_DEFAULT;</div><div class='del'>-	    if (len &gt;= 20) {	/* 20 = minimum length of IP header */</div><div class='del'>-		iphlen = (bb[0] &amp; 0x0f) * 4;</div><div class='del'>-		tlh = bb + iphlen;</div><div class='del'>-		len -= iphlen;</div><div class='del'>-		switch (bb[9]) {</div><div class='del'>-		case IPPROTO_TCP:</div><div class='del'>-		    if (len &gt;= 20) {	      /* min length of TCP header */</div><div class='del'>-			s_port = (tlh[0] &lt;&lt; 8) + tlh[1];</div><div class='del'>-			d_port = (tlh[2] &lt;&lt; 8) + tlh[3];</div><div class='del'>-			syn = tlh[13] &amp; 0x02;</div><div class='del'>-		    }</div><div class='del'>-		    break;</div><div class='del'>-		case IPPROTO_UDP:</div><div class='del'>-		    if (len &gt;= 8) {	      /* min length of UDP header */</div><div class='del'>-			s_port = (tlh[0] &lt;&lt; 8) + tlh[1];</div><div class='del'>-			d_port = (tlh[2] &lt;&lt; 8) + tlh[3];</div><div class='del'>-		    }</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-            /*</div><div class='del'>-	     * Now calculate b_band for this packet from the</div><div class='del'>-	     * port-priority table.</div><div class='del'>-	     */</div><div class='del'>-            ptr = prioq_table;</div><div class='del'>-            cur_band = max_band;</div><div class='del'>-            band_unset = 1;</div><div class='del'>-            while (*ptr) {</div><div class='del'>-                while (*ptr &amp;&amp; band_unset)</div><div class='del'>-                    if (s_port == *ptr || d_port == *ptr++) {</div><div class='del'>-                        mp-&gt;b_band = cur_band;</div><div class='del'>-                        band_unset = 0;</div><div class='del'>-                        break;</div><div class='del'>-		    }</div><div class='del'>-                ptr++;</div><div class='del'>-                cur_band--;</div><div class='del'>-	    }</div><div class='del'>-            if (band_unset)</div><div class='del'>-		mp-&gt;b_band = def_band;</div><div class='del'>-            /* It may be usable to urge SYN packets a bit */</div><div class='del'>-            if (syn)</div><div class='del'>-		mp-&gt;b_band++;</div><div class='del'>-	}</div><div class='del'>-#endif	/* PRIOQ */</div><div class='del'>-	/* this assumes PPP_HDRLEN &lt;= sizeof(dl_unitdata_req_t) */</div><div class='del'>-	if (mp-&gt;b_datap-&gt;db_ref &gt; 1) {</div><div class='del'>-	    np = allocb(PPP_HDRLEN, BPRI_HI);</div><div class='del'>-	    if (np == 0)</div><div class='del'>-		break;		/* gak! */</div><div class='del'>-	    np-&gt;b_cont = mp-&gt;b_cont;</div><div class='del'>-	    mp-&gt;b_cont = 0;</div><div class='del'>-	    freeb(mp);</div><div class='del'>-	    mp = np;</div><div class='del'>-	} else</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_DATA;</div><div class='del'>-	/* XXX should use dl_dest_addr_offset/length here,</div><div class='del'>-	   but we would have to translate ETHERTYPE_IP -&gt; PPP_IP */</div><div class='del'>-	mp-&gt;b_wptr = mp-&gt;b_rptr + PPP_HDRLEN;</div><div class='del'>-	mp-&gt;b_rptr[0] = PPP_ALLSTATIONS;</div><div class='del'>-	mp-&gt;b_rptr[1] = PPP_UI;</div><div class='del'>-	mp-&gt;b_rptr[2] = us-&gt;sap &gt;&gt; 8;</div><div class='del'>-	mp-&gt;b_rptr[3] = us-&gt;sap;</div><div class='del'>-	if (pass_packet(us, mp, 1)) {</div><div class='del'>-	    if (!send_data(mp, us))</div><div class='del'>-		putq(q, mp);</div><div class='del'>-	}</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-    case DL_PHYS_ADDR_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_phys_addr_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Don't check state because ifconfig sends this one down too</div><div class='del'>-	 */</div><div class='del'>-</div><div class='del'>-	if ((reply = allocb(sizeof(dl_phys_addr_ack_t)+ETHERADDRL, </div><div class='del'>-			BPRI_HI)) == 0)</div><div class='del'>-	    break;		/* should do bufcall */</div><div class='del'>-	reply-&gt;b_datap-&gt;db_type = M_PCPROTO;</div><div class='del'>-	paddrack = (dl_phys_addr_ack_t *) reply-&gt;b_wptr;</div><div class='del'>-	reply-&gt;b_wptr += sizeof(dl_phys_addr_ack_t);</div><div class='del'>-	bzero((caddr_t) paddrack, sizeof(dl_phys_addr_ack_t)+ETHERADDRL);</div><div class='del'>-	paddrack-&gt;dl_primitive = DL_PHYS_ADDR_ACK;</div><div class='del'>-	paddrack-&gt;dl_addr_length = ETHERADDRL;</div><div class='del'>-	paddrack-&gt;dl_addr_offset = sizeof(dl_phys_addr_ack_t);</div><div class='del'>-	bcopy(&amp;eaddr, reply-&gt;b_wptr, ETHERADDRL);</div><div class='del'>-	reply-&gt;b_wptr += ETHERADDRL;</div><div class='del'>-	qreply(q, reply);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    case DL_PROMISCON_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_promiscon_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	us-&gt;flags |= US_PROMISC;</div><div class='del'>-	dlpi_ok(q, DL_PROMISCON_REQ);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_PROMISCOFF_REQ:</div><div class='del'>-	if (size &lt; sizeof(dl_promiscoff_req_t))</div><div class='del'>-	    goto badprim;</div><div class='del'>-	us-&gt;flags &amp;= ~US_PROMISC;</div><div class='del'>-	dlpi_ok(q, DL_PROMISCOFF_REQ);</div><div class='del'>-	break;</div><div class='del'>-#else</div><div class='del'>-    case DL_PROMISCON_REQ:	    /* fall thru */</div><div class='del'>-    case DL_PROMISCOFF_REQ:	    /* fall thru */</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-#endif /* DL_CURRENT_VERSION &gt;= 2 */</div><div class='del'>-</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-    case DL_SET_PHYS_ADDR_REQ:</div><div class='del'>-    case DL_SUBS_BIND_REQ:</div><div class='del'>-    case DL_SUBS_UNBIND_REQ:</div><div class='del'>-    case DL_ENABMULTI_REQ:</div><div class='del'>-    case DL_DISABMULTI_REQ:</div><div class='del'>-    case DL_XID_REQ:</div><div class='del'>-    case DL_TEST_REQ:</div><div class='del'>-    case DL_REPLY_UPDATE_REQ:</div><div class='del'>-    case DL_REPLY_REQ:</div><div class='del'>-    case DL_DATA_ACK_REQ:</div><div class='del'>-#endif</div><div class='del'>-    case DL_CONNECT_REQ:</div><div class='del'>-    case DL_TOKEN_REQ:</div><div class='del'>-	dlpi_error(q, us, d-&gt;dl_primitive, DL_NOTSUPPORTED, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_CONNECT_RES:</div><div class='del'>-    case DL_DISCONNECT_REQ:</div><div class='del'>-    case DL_RESET_REQ:</div><div class='del'>-    case DL_RESET_RES:</div><div class='del'>-	dlpi_error(q, us, d-&gt;dl_primitive, DL_OUTSTATE, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DL_UDQOS_REQ:</div><div class='del'>-	dlpi_error(q, us, d-&gt;dl_primitive, DL_BADQOSTYPE, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-    case DL_TEST_RES:</div><div class='del'>-    case DL_XID_RES:</div><div class='del'>-	break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	cmn_err(CE_CONT, "ppp: unknown dlpi prim 0x%x\n", d-&gt;dl_primitive);</div><div class='del'>-	/* fall through */</div><div class='del'>-    badprim:</div><div class='del'>-	dlpi_error(q, us, d-&gt;dl_primitive, DL_BADPRIM, 0);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    freemsg(mp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-dlpi_error(q, us, prim, err, uerr)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    int prim, err, uerr;</div><div class='del'>-{</div><div class='del'>-    mblk_t *reply;</div><div class='del'>-    dl_error_ack_t *errp;</div><div class='del'>-</div><div class='del'>-    if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-        DPRINT3("ppp/%d: dlpi error, prim=%x, err=%x\n", us-&gt;mn, prim, err);</div><div class='del'>-    reply = allocb(sizeof(dl_error_ack_t), BPRI_HI);</div><div class='del'>-    if (reply == 0)</div><div class='del'>-	return;			/* XXX should do bufcall */</div><div class='del'>-    reply-&gt;b_datap-&gt;db_type = M_PCPROTO;</div><div class='del'>-    errp = (dl_error_ack_t *) reply-&gt;b_wptr;</div><div class='del'>-    reply-&gt;b_wptr += sizeof(dl_error_ack_t);</div><div class='del'>-    errp-&gt;dl_primitive = DL_ERROR_ACK;</div><div class='del'>-    errp-&gt;dl_error_primitive = prim;</div><div class='del'>-    errp-&gt;dl_errno = err;</div><div class='del'>-    errp-&gt;dl_unix_errno = uerr;</div><div class='del'>-    qreply(q, reply);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-dlpi_ok(q, prim)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int prim;</div><div class='del'>-{</div><div class='del'>-    mblk_t *reply;</div><div class='del'>-    dl_ok_ack_t *okp;</div><div class='del'>-</div><div class='del'>-    reply = allocb(sizeof(dl_ok_ack_t), BPRI_HI);</div><div class='del'>-    if (reply == 0)</div><div class='del'>-	return;			/* XXX should do bufcall */</div><div class='del'>-    reply-&gt;b_datap-&gt;db_type = M_PCPROTO;</div><div class='del'>-    okp = (dl_ok_ack_t *) reply-&gt;b_wptr;</div><div class='del'>-    reply-&gt;b_wptr += sizeof(dl_ok_ack_t);</div><div class='del'>-    okp-&gt;dl_primitive = DL_OK_ACK;</div><div class='del'>-    okp-&gt;dl_correct_primitive = prim;</div><div class='del'>-    qreply(q, reply);</div><div class='del'>-}</div><div class='del'>-#endif /* NO_DLPI */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-pass_packet(us, mp, outbound)</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int outbound;</div><div class='del'>-{</div><div class='del'>-    int pass;</div><div class='del'>-    upperstr_t *ppa;</div><div class='del'>-</div><div class='del'>-    if ((ppa = us-&gt;ppa) == 0) {</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#ifdef FILTER_PACKETS</div><div class='del'>-    pass = ip_hard_filter(us, mp, outbound);</div><div class='del'>-#else</div><div class='del'>-    /*</div><div class='del'>-     * Here is where we might, in future, decide whether to pass</div><div class='del'>-     * or drop the packet, and whether it counts as link activity.</div><div class='del'>-     */</div><div class='del'>-    pass = 1;</div><div class='del'>-#endif /* FILTER_PACKETS */</div><div class='del'>-</div><div class='del'>-    if (pass &lt; 0) {</div><div class='del'>-	/* pass only if link already up, and don't update time */</div><div class='del'>-	if (ppa-&gt;lowerq == 0) {</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	pass = 1;</div><div class='del'>-    } else if (pass) {</div><div class='del'>-	if (outbound)</div><div class='del'>-	    ppa-&gt;last_sent = time;</div><div class='del'>-	else</div><div class='del'>-	    ppa-&gt;last_recv = time;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return pass;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We have some data to send down to the lower stream (or up the</div><div class='del'>- * control stream, if we don't have a lower stream attached).</div><div class='del'>- * Returns 1 if the message was dealt with, 0 if it wasn't able</div><div class='del'>- * to be sent on and should therefore be queued up.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-send_data(mp, us)</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *ppa;</div><div class='del'>-</div><div class='del'>-    if ((us-&gt;flags &amp; US_BLOCKED) || us-&gt;npmode == NPMODE_QUEUE)</div><div class='del'>-	return 0;</div><div class='del'>-    ppa = us-&gt;ppa;</div><div class='del'>-    if (ppa == 0 || us-&gt;npmode == NPMODE_DROP || us-&gt;npmode == NPMODE_ERROR) {</div><div class='del'>-	if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-	    DPRINT2("ppp/%d: dropping pkt (npmode=%d)\n", us-&gt;mn, us-&gt;npmode);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 1;</div><div class='del'>-    }</div><div class='del'>-    if (ppa-&gt;lowerq == 0) {</div><div class='del'>-	/* try to send it up the control stream */</div><div class='del'>-        if (bcanputnext(ppa-&gt;q, mp-&gt;b_band)) {</div><div class='del'>-	    /*</div><div class='del'>-	     * The message seems to get corrupted for some reason if</div><div class='del'>-	     * we just send the message up as it is, so we send a copy.</div><div class='del'>-	     */</div><div class='del'>-	    mblk_t *np = copymsg(mp);</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    if (np != 0)</div><div class='del'>-		putnext(ppa-&gt;q, np);</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-        if (bcanputnext(ppa-&gt;lowerq, mp-&gt;b_band)) {</div><div class='del'>-	    MT_ENTER(&amp;ppa-&gt;stats_lock);</div><div class='del'>-	    ppa-&gt;stats.ppp_opackets++;</div><div class='del'>-	    ppa-&gt;stats.ppp_obytes += msgdsize(mp);</div><div class='del'>-#ifdef INCR_OPACKETS</div><div class='del'>-	    INCR_OPACKETS(ppa);</div><div class='del'>-#endif</div><div class='del'>-	    MT_EXIT(&amp;ppa-&gt;stats_lock);</div><div class='del'>-	    /*</div><div class='del'>-	     * The lower queue is only ever detached while holding an</div><div class='del'>-	     * exclusive lock on the whole driver.  So we can be confident</div><div class='del'>-	     * that the lower queue is still there.</div><div class='del'>-	     */</div><div class='del'>-	    putnext(ppa-&gt;lowerq, mp);</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    us-&gt;flags |= US_BLOCKED;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Allocate a new PPA id and link this stream into the list of PPAs.</div><div class='del'>- * This procedure is called with an exclusive lock on all queues in</div><div class='del'>- * this driver.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-new_ppa(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *up, **usp;</div><div class='del'>-    int ppa_id;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("new_ppa: q_ptr = 0!\n");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    usp = &amp;ppas;</div><div class='del'>-    ppa_id = 0;</div><div class='del'>-    while ((up = *usp) != 0 &amp;&amp; ppa_id == up-&gt;ppa_id) {</div><div class='del'>-	++ppa_id;</div><div class='del'>-	usp = &amp;up-&gt;nextppa;</div><div class='del'>-    }</div><div class='del'>-    us-&gt;ppa_id = ppa_id;</div><div class='del'>-    us-&gt;ppa = us;</div><div class='del'>-    us-&gt;next = 0;</div><div class='del'>-    us-&gt;nextppa = *usp;</div><div class='del'>-    *usp = us;</div><div class='del'>-    us-&gt;flags |= US_CONTROL;</div><div class='del'>-    us-&gt;npmode = NPMODE_PASS;</div><div class='del'>-</div><div class='del'>-    us-&gt;mtu = PPP_MTU;</div><div class='del'>-    us-&gt;mru = PPP_MRU;</div><div class='del'>-</div><div class='del'>-#ifdef SOL2</div><div class='del'>-    /*</div><div class='del'>-     * Create a kstats record for our statistics, so netstat -i works.</div><div class='del'>-     */</div><div class='del'>-    if (us-&gt;kstats == 0) {</div><div class='del'>-	char unit[32];</div><div class='del'>-</div><div class='del'>-	sprintf(unit, "ppp%d", us-&gt;ppa-&gt;ppa_id);</div><div class='del'>-	us-&gt;kstats = kstat_create("ppp", us-&gt;ppa-&gt;ppa_id, unit,</div><div class='del'>-				  "net", KSTAT_TYPE_NAMED, 4, 0);</div><div class='del'>-	if (us-&gt;kstats != 0) {</div><div class='del'>-	    kstat_named_t *kn = KSTAT_NAMED_PTR(us-&gt;kstats);</div><div class='del'>-</div><div class='del'>-	    strcpy(kn[0].name, "ipackets");</div><div class='del'>-	    kn[0].data_type = KSTAT_DATA_ULONG;</div><div class='del'>-	    strcpy(kn[1].name, "ierrors");</div><div class='del'>-	    kn[1].data_type = KSTAT_DATA_ULONG;</div><div class='del'>-	    strcpy(kn[2].name, "opackets");</div><div class='del'>-	    kn[2].data_type = KSTAT_DATA_ULONG;</div><div class='del'>-	    strcpy(kn[3].name, "oerrors");</div><div class='del'>-	    kn[3].data_type = KSTAT_DATA_ULONG;</div><div class='del'>-	    kstat_install(us-&gt;kstats);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-    *(int *)mp-&gt;b_cont-&gt;b_rptr = ppa_id;</div><div class='del'>-    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-    qreply(q, mp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-attach_ppa(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *t;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("attach_ppa: q_ptr = 0!\n");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-    us-&gt;state = DL_UNBOUND;</div><div class='del'>-#endif</div><div class='del'>-    for (t = us-&gt;ppa; t-&gt;next != 0; t = t-&gt;next)</div><div class='del'>-	;</div><div class='del'>-    t-&gt;next = us;</div><div class='del'>-    us-&gt;next = 0;</div><div class='del'>-    if (mp-&gt;b_datap-&gt;db_type == M_IOCTL) {</div><div class='del'>-	mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-	qreply(q, mp);</div><div class='del'>-    } else {</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-	dlpi_ok(q, DL_ATTACH_REQ);</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-detach_ppa(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *t;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("detach_ppa: q_ptr = 0!\n");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    for (t = us-&gt;ppa; t-&gt;next != 0; t = t-&gt;next)</div><div class='del'>-	if (t-&gt;next == us) {</div><div class='del'>-	    t-&gt;next = us-&gt;next;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    us-&gt;next = 0;</div><div class='del'>-    us-&gt;ppa = 0;</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-    us-&gt;state = DL_UNATTACHED;</div><div class='del'>-    dlpi_ok(q, DL_DETACH_REQ);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We call this with qwriter in order to give the upper queue procedures</div><div class='del'>- * the guarantee that the lower queue is not going to go away while</div><div class='del'>- * they are executing.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-detach_lower(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("detach_lower: q_ptr = 0!\n");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    LOCK_LOWER_W;</div><div class='del'>-    us-&gt;lowerq-&gt;q_ptr = 0;</div><div class='del'>-    RD(us-&gt;lowerq)-&gt;q_ptr = 0;</div><div class='del'>-    us-&gt;lowerq = 0;</div><div class='del'>-    UNLOCK_LOWER;</div><div class='del'>-</div><div class='del'>-    /* Unblock streams which now feed back up the control stream. */</div><div class='del'>-    qenable(us-&gt;q);</div><div class='del'>-</div><div class='del'>-    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-    qreply(q, mp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-pppuwsrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *as;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("pppuwsrv: q_ptr = 0!\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If this is a control stream, then this service procedure</div><div class='del'>-     * probably got enabled because of flow control in the lower</div><div class='del'>-     * stream being enabled (or because of the lower stream going</div><div class='del'>-     * away).  Therefore we enable the service procedure of all</div><div class='del'>-     * attached upper streams.</div><div class='del'>-     */</div><div class='del'>-    if (us-&gt;flags &amp; US_CONTROL) {</div><div class='del'>-	for (as = us-&gt;next; as != 0; as = as-&gt;next)</div><div class='del'>-	    qenable(WR(as-&gt;q));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Try to send on any data queued here. */</div><div class='del'>-    us-&gt;flags &amp;= ~US_BLOCKED;</div><div class='del'>-    while ((mp = getq(q)) != 0) {</div><div class='del'>-	if (!send_data(mp, us)) {</div><div class='del'>-	    putbq(q, mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* should never get called... */</div><div class='del'>-static int</div><div class='del'>-ppplwput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    putnext(q, mp);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppplwsrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    queue_t *uq;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Flow control has back-enabled this stream:</div><div class='del'>-     * enable the upper write service procedure for</div><div class='del'>-     * the upper control stream for this lower stream.</div><div class='del'>-     */</div><div class='del'>-    LOCK_LOWER_R;</div><div class='del'>-    uq = (queue_t *) q-&gt;q_ptr;</div><div class='del'>-    if (uq != 0)</div><div class='del'>-	qenable(uq);</div><div class='del'>-    UNLOCK_LOWER;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This should only get called for control streams.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-pppurput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *ppa, *us;</div><div class='del'>-    int proto, len;</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-</div><div class='del'>-    ppa = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (ppa == 0) {</div><div class='del'>-	DPRINT("pppurput: q_ptr = 0!\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_CTL:</div><div class='del'>-	MT_ENTER(&amp;ppa-&gt;stats_lock);</div><div class='del'>-	switch (*mp-&gt;b_rptr) {</div><div class='del'>-	case PPPCTL_IERROR:</div><div class='del'>-#ifdef INCR_IERRORS</div><div class='del'>-	    INCR_IERRORS(ppa);</div><div class='del'>-#endif</div><div class='del'>-	    ppa-&gt;stats.ppp_ierrors++;</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_OERROR:</div><div class='del'>-#ifdef INCR_OERRORS</div><div class='del'>-	    INCR_OERRORS(ppa);</div><div class='del'>-#endif</div><div class='del'>-	    ppa-&gt;stats.ppp_oerrors++;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	MT_EXIT(&amp;ppa-&gt;stats_lock);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCACK:</div><div class='del'>-    case M_IOCNAK:</div><div class='del'>-	/*</div><div class='del'>-	 * Attempt to match up the response with the stream</div><div class='del'>-	 * that the request came from.</div><div class='del'>-	 */</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	for (us = ppa; us != 0; us = us-&gt;next)</div><div class='del'>-	    if (us-&gt;ioc_id == iop-&gt;ioc_id)</div><div class='del'>-		break;</div><div class='del'>-	if (us == 0)</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	else</div><div class='del'>-	    putnext(us-&gt;q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_HANGUP:</div><div class='del'>-	/*</div><div class='del'>-	 * The serial device has hung up.  We don't want to send</div><div class='del'>-	 * the M_HANGUP message up to pppd because that will stop</div><div class='del'>-	 * us from using the control stream any more.  Instead we</div><div class='del'>-	 * send a zero-length message as an end-of-file indication.</div><div class='del'>-	 */</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	mp = allocb(1, BPRI_HI);</div><div class='del'>-	if (mp == 0) {</div><div class='del'>-	    DPRINT1("ppp/%d: couldn't allocate eof message!\n", ppa-&gt;mn);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	putnext(ppa-&gt;q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	if (mp-&gt;b_datap-&gt;db_type == M_DATA) {</div><div class='del'>-	    len = msgdsize(mp);</div><div class='del'>-	    if (mp-&gt;b_wptr - mp-&gt;b_rptr &lt; PPP_HDRLEN) {</div><div class='del'>-		PULLUP(mp, PPP_HDRLEN);</div><div class='del'>-		if (mp == 0) {</div><div class='del'>-		    DPRINT1("ppp_urput: msgpullup failed (len=%d)\n", len);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    MT_ENTER(&amp;ppa-&gt;stats_lock);</div><div class='del'>-	    ppa-&gt;stats.ppp_ipackets++;</div><div class='del'>-	    ppa-&gt;stats.ppp_ibytes += len;</div><div class='del'>-#ifdef INCR_IPACKETS</div><div class='del'>-	    INCR_IPACKETS(ppa);</div><div class='del'>-#endif</div><div class='del'>-	    MT_EXIT(&amp;ppa-&gt;stats_lock);</div><div class='del'>-</div><div class='del'>-	    proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	    /*</div><div class='del'>-	     * Should there be any promiscuous stream(s), send the data</div><div class='del'>-	     * up for each promiscuous stream that we recognize.</div><div class='del'>-	     */</div><div class='del'>-	    promisc_sendup(ppa, mp, proto, 1);</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-	    if (proto &lt; 0x8000 &amp;&amp; (us = find_dest(ppa, proto)) != 0) {</div><div class='del'>-		/*</div><div class='del'>-		 * A data packet for some network protocol.</div><div class='del'>-		 * Queue it on the upper stream for that protocol.</div><div class='del'>-		 * XXX could we just putnext it?  (would require thought)</div><div class='del'>-		 * The rblocked flag is there to ensure that we keep</div><div class='del'>-		 * messages in order for each network protocol.</div><div class='del'>-		 */</div><div class='del'>-		if (!pass_packet(us, mp, 0))</div><div class='del'>-		    break;</div><div class='del'>-		if (!us-&gt;rblocked &amp;&amp; !canput(us-&gt;q))</div><div class='del'>-		    us-&gt;rblocked = 1;</div><div class='del'>-		if (!us-&gt;rblocked)</div><div class='del'>-		    putq(us-&gt;q, mp);</div><div class='del'>-		else</div><div class='del'>-		    putq(q, mp);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * A control frame, a frame for an unknown protocol,</div><div class='del'>-	 * or some other message type.</div><div class='del'>-	 * Send it up to pppd via the control stream.</div><div class='del'>-	 */</div><div class='del'>-	if (queclass(mp) == QPCTL || canputnext(ppa-&gt;q))</div><div class='del'>-	    putnext(ppa-&gt;q, mp);</div><div class='del'>-	else</div><div class='del'>-	    putq(q, mp);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-pppursrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us, *as;</div><div class='del'>-    mblk_t *mp, *hdr;</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-    dl_unitdata_ind_t *ud;</div><div class='del'>-#endif</div><div class='del'>-    int proto;</div><div class='del'>-</div><div class='del'>-    us = (upperstr_t *) q-&gt;q_ptr;</div><div class='del'>-    if (us == 0) {</div><div class='del'>-	DPRINT("pppursrv: q_ptr = 0!\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (us-&gt;flags &amp; US_CONTROL) {</div><div class='del'>-	/*</div><div class='del'>-	 * A control stream.</div><div class='del'>-	 * If there is no lower queue attached, run the write service</div><div class='del'>-	 * routines of other upper streams attached to this PPA.</div><div class='del'>-	 */</div><div class='del'>-	if (us-&gt;lowerq == 0) {</div><div class='del'>-	    as = us;</div><div class='del'>-	    do {</div><div class='del'>-		if (as-&gt;flags &amp; US_BLOCKED)</div><div class='del'>-		    qenable(WR(as-&gt;q));</div><div class='del'>-		as = as-&gt;next;</div><div class='del'>-	    } while (as != 0);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Messages get queued on this stream's read queue if they</div><div class='del'>-	 * can't be queued on the read queue of the attached stream</div><div class='del'>-	 * that they are destined for.  This is for flow control -</div><div class='del'>-	 * when this queue fills up, the lower read put procedure will</div><div class='del'>-	 * queue messages there and the flow control will propagate</div><div class='del'>-	 * down from there.</div><div class='del'>-	 */</div><div class='del'>-	while ((mp = getq(q)) != 0) {</div><div class='del'>-	    proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-	    if (proto &lt; 0x8000 &amp;&amp; (as = find_dest(us, proto)) != 0) {</div><div class='del'>-		if (!canput(as-&gt;q))</div><div class='del'>-		    break;</div><div class='del'>-		putq(as-&gt;q, mp);</div><div class='del'>-	    } else {</div><div class='del'>-		if (!canputnext(q))</div><div class='del'>-		    break;</div><div class='del'>-		putnext(q, mp);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (mp) {</div><div class='del'>-	    putbq(q, mp);</div><div class='del'>-	} else {</div><div class='del'>-	    /* can now put stuff directly on network protocol streams again */</div><div class='del'>-	    for (as = us-&gt;next; as != 0; as = as-&gt;next)</div><div class='del'>-		as-&gt;rblocked = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If this stream has a lower stream attached,</div><div class='del'>-	 * enable the read queue's service routine.</div><div class='del'>-	 * XXX we should really only do this if the queue length</div><div class='del'>-	 * has dropped below the low-water mark.</div><div class='del'>-	 */</div><div class='del'>-	if (us-&gt;lowerq != 0)</div><div class='del'>-	    qenable(RD(us-&gt;lowerq));</div><div class='del'>-		</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * A network protocol stream.  Put a DLPI header on each</div><div class='del'>-	 * packet and send it on.</div><div class='del'>-	 * (Actually, it seems that the IP module will happily</div><div class='del'>-	 * accept M_DATA messages without the DL_UNITDATA_IND header.)</div><div class='del'>-	 */</div><div class='del'>-	while ((mp = getq(q)) != 0) {</div><div class='del'>-	    if (!canputnext(q)) {</div><div class='del'>-		putbq(q, mp);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-#ifndef NO_DLPI</div><div class='del'>-	    proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-	    mp-&gt;b_rptr += PPP_HDRLEN;</div><div class='del'>-	    hdr = allocb(sizeof(dl_unitdata_ind_t) + 2 * sizeof(uint),</div><div class='del'>-			 BPRI_MED);</div><div class='del'>-	    if (hdr == 0) {</div><div class='del'>-		/* XXX should put it back and use bufcall */</div><div class='del'>-		freemsg(mp);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	    hdr-&gt;b_datap-&gt;db_type = M_PROTO;</div><div class='del'>-	    ud = (dl_unitdata_ind_t *) hdr-&gt;b_wptr;</div><div class='del'>-	    hdr-&gt;b_wptr += sizeof(dl_unitdata_ind_t) + 2 * sizeof(uint);</div><div class='del'>-	    hdr-&gt;b_cont = mp;</div><div class='del'>-	    ud-&gt;dl_primitive = DL_UNITDATA_IND;</div><div class='del'>-	    ud-&gt;dl_dest_addr_length = sizeof(uint);</div><div class='del'>-	    ud-&gt;dl_dest_addr_offset = sizeof(dl_unitdata_ind_t);</div><div class='del'>-	    ud-&gt;dl_src_addr_length = sizeof(uint);</div><div class='del'>-	    ud-&gt;dl_src_addr_offset = ud-&gt;dl_dest_addr_offset + sizeof(uint);</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-	    ud-&gt;dl_group_address = 0;</div><div class='del'>-#endif</div><div class='del'>-	    /* Send the DLPI client the data with the SAP they requested,</div><div class='del'>-	       (e.g. ETHERTYPE_IP) rather than the PPP protocol number</div><div class='del'>-	       (e.g. PPP_IP) */</div><div class='del'>-	    ((uint *)(ud + 1))[0] = us-&gt;req_sap;	/* dest SAP */</div><div class='del'>-	    ((uint *)(ud + 1))[1] = us-&gt;req_sap;	/* src SAP */</div><div class='del'>-	    putnext(q, hdr);</div><div class='del'>-#else /* NO_DLPI */</div><div class='del'>-	    putnext(q, mp);</div><div class='del'>-#endif /* NO_DLPI */</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * Now that we have consumed some packets from this queue,</div><div class='del'>-	 * enable the control stream's read service routine so that we</div><div class='del'>-	 * can process any packets for us that might have got queued</div><div class='del'>-	 * there for flow control reasons.</div><div class='del'>-	 */</div><div class='del'>-	if (us-&gt;ppa)</div><div class='del'>-	    qenable(us-&gt;ppa-&gt;q);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static upperstr_t *</div><div class='del'>-find_dest(ppa, proto)</div><div class='del'>-    upperstr_t *ppa;</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-</div><div class='del'>-    for (us = ppa-&gt;next; us != 0; us = us-&gt;next)</div><div class='del'>-	if (proto == us-&gt;sap)</div><div class='del'>-	    break;</div><div class='del'>-    return us;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if defined (SOL2)</div><div class='del'>-/*</div><div class='del'>- * Test upstream promiscuous conditions. As of now, only pass IPv4 and</div><div class='del'>- * Ipv6 packets upstream (let PPP packets be decoded elsewhere).</div><div class='del'>- */</div><div class='del'>-static upperstr_t *</div><div class='del'>-find_promisc(us, proto)</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-    if ((proto != PPP_IP) &amp;&amp; (proto != PPP_IPV6))</div><div class='del'>-	return (upperstr_t *)0;</div><div class='del'>-</div><div class='del'>-    for ( ; us; us = us-&gt;next) {</div><div class='del'>-	if ((us-&gt;flags &amp; US_PROMISC) &amp;&amp; (us-&gt;state == DL_IDLE))</div><div class='del'>-	    return us;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return (upperstr_t *)0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prepend an empty Ethernet header to msg for snoop, et al.</div><div class='del'>- */</div><div class='del'>-static mblk_t *</div><div class='del'>-prepend_ether(us, mp, proto)</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-    mblk_t *eh;</div><div class='del'>-    int type;</div><div class='del'>-</div><div class='del'>-    if ((eh = allocb(sizeof(struct ether_header), BPRI_HI)) == 0) {</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return (mblk_t *)0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (proto == PPP_IP)</div><div class='del'>-	type = ETHERTYPE_IP;</div><div class='del'>-    else if (proto == PPP_IPV6)</div><div class='del'>-	type = ETHERTYPE_IPV6;</div><div class='del'>-    else </div><div class='del'>-	type = proto;	    /* What else? Let decoder decide */</div><div class='del'>-</div><div class='del'>-    eh-&gt;b_wptr += sizeof(struct ether_header);</div><div class='del'>-    bzero((caddr_t)eh-&gt;b_rptr, sizeof(struct ether_header));</div><div class='del'>-    ((struct ether_header *)eh-&gt;b_rptr)-&gt;ether_type = htons((short)type);</div><div class='del'>-    eh-&gt;b_cont = mp;</div><div class='del'>-    return (eh);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prepend DL_UNITDATA_IND mblk to msg</div><div class='del'>- */</div><div class='del'>-static mblk_t *</div><div class='del'>-prepend_udind(us, mp, proto)</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-    dl_unitdata_ind_t *dlu;</div><div class='del'>-    mblk_t *dh;</div><div class='del'>-    size_t size;</div><div class='del'>-</div><div class='del'>-    size = sizeof(dl_unitdata_ind_t);</div><div class='del'>-    if ((dh = allocb(size, BPRI_MED)) == 0) {</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return (mblk_t *)0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    dh-&gt;b_datap-&gt;db_type = M_PROTO;</div><div class='del'>-    dh-&gt;b_wptr = dh-&gt;b_datap-&gt;db_lim;</div><div class='del'>-    dh-&gt;b_rptr = dh-&gt;b_wptr - size;</div><div class='del'>-</div><div class='del'>-    dlu = (dl_unitdata_ind_t *)dh-&gt;b_rptr;</div><div class='del'>-    dlu-&gt;dl_primitive = DL_UNITDATA_IND;</div><div class='del'>-    dlu-&gt;dl_dest_addr_length = 0;</div><div class='del'>-    dlu-&gt;dl_dest_addr_offset = sizeof(dl_unitdata_ind_t);</div><div class='del'>-    dlu-&gt;dl_src_addr_length = 0;</div><div class='del'>-    dlu-&gt;dl_src_addr_offset = sizeof(dl_unitdata_ind_t);</div><div class='del'>-    dlu-&gt;dl_group_address = 0;</div><div class='del'>-</div><div class='del'>-    dh-&gt;b_cont = mp;</div><div class='del'>-    return (dh);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * For any recognized promiscuous streams, send data upstream</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-promisc_sendup(ppa, mp, proto, skip)</div><div class='del'>-    upperstr_t *ppa;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int proto, skip;</div><div class='del'>-{</div><div class='del'>-    mblk_t *dup_mp, *dup_dup_mp;</div><div class='del'>-    upperstr_t *prus, *nprus;</div><div class='del'>-</div><div class='del'>-    if ((prus = find_promisc(ppa, proto)) != 0) {</div><div class='del'>-	if (dup_mp = dupmsg(mp)) {</div><div class='del'>-</div><div class='del'>-	    if (skip)</div><div class='del'>-		dup_mp-&gt;b_rptr += PPP_HDRLEN;</div><div class='del'>-</div><div class='del'>-	    for ( ; nprus = find_promisc(prus-&gt;next, proto); </div><div class='del'>-		    prus = nprus) {</div><div class='del'>-</div><div class='del'>-		if (dup_dup_mp = dupmsg(dup_mp)) {</div><div class='del'>-		    if (canputnext(prus-&gt;q)) {</div><div class='del'>-			if (prus-&gt;flags &amp; US_RAWDATA) {</div><div class='del'>-			    dup_dup_mp = prepend_ether(prus, dup_dup_mp, proto);</div><div class='del'>-			    putnext(prus-&gt;q, dup_dup_mp);</div><div class='del'>-			} else {</div><div class='del'>-			    dup_dup_mp = prepend_udind(prus, dup_dup_mp, proto);</div><div class='del'>-			    putnext(prus-&gt;q, dup_dup_mp);</div><div class='del'>-			}</div><div class='del'>-		    } else {</div><div class='del'>-			DPRINT("ppp_urput: data to promisc q dropped\n");</div><div class='del'>-			freemsg(dup_dup_mp);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (canputnext(prus-&gt;q)) {</div><div class='del'>-		if (prus-&gt;flags &amp; US_RAWDATA) {</div><div class='del'>-		    dup_mp = prepend_ether(prus, dup_mp, proto);</div><div class='del'>-		    putnext(prus-&gt;q, dup_mp);</div><div class='del'>-		} else {</div><div class='del'>-		    dup_mp = prepend_udind(prus, dup_mp, proto);</div><div class='del'>-		    putnext(prus-&gt;q, dup_mp);</div><div class='del'>-		}</div><div class='del'>-	    } else {</div><div class='del'>-		DPRINT("ppp_urput: data to promisc q dropped\n");</div><div class='del'>-		freemsg(dup_mp);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We simply put the message on to the associated upper control stream</div><div class='del'>- * (either here or in ppplrsrv).  That way we enter the perimeters</div><div class='del'>- * before looking through the list of attached streams to decide which</div><div class='del'>- * stream it should go up.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ppplrput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    queue_t *uq;</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_IOCTL:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	iop-&gt;ioc_error = EINVAL;</div><div class='del'>-	mp-&gt;b_datap-&gt;db_type = M_IOCNAK;</div><div class='del'>-	qreply(q, mp);</div><div class='del'>-	return 0;</div><div class='del'>-    case M_FLUSH:</div><div class='del'>-	if (*mp-&gt;b_rptr &amp; FLUSHR)</div><div class='del'>-	    flushq(q, FLUSHDATA);</div><div class='del'>-	if (*mp-&gt;b_rptr &amp; FLUSHW) {</div><div class='del'>-	    *mp-&gt;b_rptr &amp;= ~FLUSHR;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we can't get the lower lock straight away, queue this one</div><div class='del'>-     * rather than blocking, to avoid the possibility of deadlock.</div><div class='del'>-     */</div><div class='del'>-    if (!TRYLOCK_LOWER_R) {</div><div class='del'>-	putq(q, mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that we're still connected to the driver.</div><div class='del'>-     */</div><div class='del'>-    uq = (queue_t *) q-&gt;q_ptr;</div><div class='del'>-    if (uq == 0) {</div><div class='del'>-	UNLOCK_LOWER;</div><div class='del'>-	DPRINT1("ppplrput: q = %x, uq = 0??\n", q);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Try to forward the message to the put routine for the upper</div><div class='del'>-     * control stream for this lower stream.</div><div class='del'>-     * If there are already messages queued here, queue this one so</div><div class='del'>-     * they don't get out of order.</div><div class='del'>-     */</div><div class='del'>-    if (queclass(mp) == QPCTL || (qsize(q) == 0 &amp;&amp; canput(uq)))</div><div class='del'>-	put(uq, mp);</div><div class='del'>-    else</div><div class='del'>-	putq(q, mp);</div><div class='del'>-</div><div class='del'>-    UNLOCK_LOWER;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppplrsrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    queue_t *uq;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Packets get queued here for flow control reasons</div><div class='del'>-     * or if the lrput routine couldn't get the lower lock</div><div class='del'>-     * without blocking.</div><div class='del'>-     */</div><div class='del'>-    LOCK_LOWER_R;</div><div class='del'>-    uq = (queue_t *) q-&gt;q_ptr;</div><div class='del'>-    if (uq == 0) {</div><div class='del'>-	UNLOCK_LOWER;</div><div class='del'>-	flushq(q, FLUSHALL);</div><div class='del'>-	DPRINT1("ppplrsrv: q = %x, uq = 0??\n", q);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    while ((mp = getq(q)) != 0) {</div><div class='del'>-	if (queclass(mp) == QPCTL || canput(uq))</div><div class='del'>-	    put(uq, mp);</div><div class='del'>-	else {</div><div class='del'>-	    putbq(q, mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    UNLOCK_LOWER;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-putctl2(q, type, code, val)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int type, code, val;</div><div class='del'>-{</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-</div><div class='del'>-    mp = allocb(2, BPRI_HI);</div><div class='del'>-    if (mp == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    mp-&gt;b_datap-&gt;db_type = type;</div><div class='del'>-    mp-&gt;b_wptr[0] = code;</div><div class='del'>-    mp-&gt;b_wptr[1] = val;</div><div class='del'>-    mp-&gt;b_wptr += 2;</div><div class='del'>-    putnext(q, mp);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-putctl4(q, type, code, val)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    int type, code, val;</div><div class='del'>-{</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-</div><div class='del'>-    mp = allocb(4, BPRI_HI);</div><div class='del'>-    if (mp == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    mp-&gt;b_datap-&gt;db_type = type;</div><div class='del'>-    mp-&gt;b_wptr[0] = code;</div><div class='del'>-    ((short *)mp-&gt;b_wptr)[1] = val;</div><div class='del'>-    mp-&gt;b_wptr += 4;</div><div class='del'>-    putnext(q, mp);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-debug_dump(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    queue_t *uq, *lq;</div><div class='del'>-</div><div class='del'>-    DPRINT("ppp upper streams:\n");</div><div class='del'>-    for (us = minor_devs; us != 0; us = us-&gt;nextmn) {</div><div class='del'>-	uq = us-&gt;q;</div><div class='del'>-	DPRINT3(" %d: q=%x rlev=%d",</div><div class='del'>-		us-&gt;mn, uq, (uq? qsize(uq): 0));</div><div class='del'>-	DPRINT3(" wlev=%d flags=0x%b", (uq? qsize(WR(uq)): 0),</div><div class='del'>-		us-&gt;flags, "\020\1priv\2control\3blocked\4last");</div><div class='del'>-	DPRINT3(" state=%x sap=%x req_sap=%x", us-&gt;state, us-&gt;sap,</div><div class='del'>-		us-&gt;req_sap);</div><div class='del'>-	if (us-&gt;ppa == 0)</div><div class='del'>-	    DPRINT(" ppa=?\n");</div><div class='del'>-	else</div><div class='del'>-	    DPRINT1(" ppa=%d\n", us-&gt;ppa-&gt;ppa_id);</div><div class='del'>-	if (us-&gt;flags &amp; US_CONTROL) {</div><div class='del'>-	    lq = us-&gt;lowerq;</div><div class='del'>-	    DPRINT3("    control for %d lq=%x rlev=%d",</div><div class='del'>-		    us-&gt;ppa_id, lq, (lq? qsize(RD(lq)): 0));</div><div class='del'>-	    DPRINT3(" wlev=%d mru=%d mtu=%d\n",</div><div class='del'>-		    (lq? qsize(lq): 0), us-&gt;mru, us-&gt;mtu);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-    qreply(q, mp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef FILTER_PACKETS</div><div class='del'>-#include &lt;netinet/in_systm.h&gt;</div><div class='del'>-#include &lt;netinet/ip.h&gt;</div><div class='del'>-#include &lt;netinet/udp.h&gt;</div><div class='del'>-#include &lt;netinet/tcp.h&gt;</div><div class='del'>-</div><div class='del'>-#define MAX_IPHDR    128     /* max TCP/IP header size */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* The following table contains a hard-coded list of protocol/port pairs.</div><div class='del'>- * Any matching packets are either discarded unconditionally, or, </div><div class='del'>- * if ok_if_link_up is non-zero when a connection does not currently exist</div><div class='del'>- * (i.e., they go through if the connection is present, but never initiate</div><div class='del'>- * a dial-out).</div><div class='del'>- * This idea came from a post by dm@garage.uun.org (David Mazieres)</div><div class='del'>- */</div><div class='del'>-static struct pktfilt_tab { </div><div class='del'>-	int proto; </div><div class='del'>-	u_short port; </div><div class='del'>-	u_short ok_if_link_up; </div><div class='del'>-} pktfilt_tab[] = {</div><div class='del'>-	{ IPPROTO_UDP,	520,	1 },	/* RIP, ok to pass if link is up */</div><div class='del'>-	{ IPPROTO_UDP,	123,	1 },	/* NTP, don't keep up the link for it */</div><div class='del'>-	{ -1, 		0,	0 }	/* terminator entry has port == -1 */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ip_hard_filter(us, mp, outbound)</div><div class='del'>-    upperstr_t *us;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int outbound;</div><div class='del'>-{</div><div class='del'>-    struct ip *ip;</div><div class='del'>-    struct pktfilt_tab *pft;</div><div class='del'>-    mblk_t *temp_mp;</div><div class='del'>-    int proto;</div><div class='del'>-    int len, hlen;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    /* Note, the PPP header has already been pulled up in all cases */</div><div class='del'>-    proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-    if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-        DPRINT3("ppp/%d: filter, proto=0x%x, out=%d\n", us-&gt;mn, proto, outbound);</div><div class='del'>-</div><div class='del'>-    switch (proto)</div><div class='del'>-    {</div><div class='del'>-    case PPP_IP:</div><div class='del'>-	if ((mp-&gt;b_wptr - mp-&gt;b_rptr) == PPP_HDRLEN &amp;&amp; mp-&gt;b_cont != 0) {</div><div class='del'>-	    temp_mp = mp-&gt;b_cont;</div><div class='del'>-    	    len = msgdsize(temp_mp);</div><div class='del'>-	    hlen = (len &lt; MAX_IPHDR) ? len : MAX_IPHDR;</div><div class='del'>-	    PULLUP(temp_mp, hlen);</div><div class='del'>-	    if (temp_mp == 0) {</div><div class='del'>-		DPRINT2("ppp/%d: filter, pullup next failed, len=%d\n", </div><div class='del'>-			us-&gt;mn, hlen);</div><div class='del'>-		mp-&gt;b_cont = 0;		/* PULLUP() freed the rest */</div><div class='del'>-	        freemsg(mp);</div><div class='del'>-	        return 0;</div><div class='del'>-	    }</div><div class='del'>-	    ip = (struct ip *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	}</div><div class='del'>-	else {</div><div class='del'>-	    len = msgdsize(mp);</div><div class='del'>-	    hlen = (len &lt; (PPP_HDRLEN+MAX_IPHDR)) ? len : (PPP_HDRLEN+MAX_IPHDR);</div><div class='del'>-	    PULLUP(mp, hlen);</div><div class='del'>-	    if (mp == 0) {</div><div class='del'>-		DPRINT2("ppp/%d: filter, pullup failed, len=%d\n", </div><div class='del'>-			us-&gt;mn, hlen);</div><div class='del'>-	        return 0;</div><div class='del'>-	    }</div><div class='del'>-	    ip = (struct ip *)(mp-&gt;b_rptr + PPP_HDRLEN);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* For IP traffic, certain packets (e.g., RIP) may be either</div><div class='del'>-	 *   1.  ignored - dropped completely</div><div class='del'>-	 *   2.  will not initiate a connection, but</div><div class='del'>-	 *       will be passed if a connection is currently up.</div><div class='del'>-	 */</div><div class='del'>-	for (pft=pktfilt_tab; pft-&gt;proto != -1; pft++) {</div><div class='del'>-	    if (ip-&gt;ip_p == pft-&gt;proto) {</div><div class='del'>-		switch(pft-&gt;proto) {</div><div class='del'>-		case IPPROTO_UDP:</div><div class='del'>-		    if (((struct udphdr *) &amp;((int *)ip)[ip-&gt;ip_hl])-&gt;uh_dport</div><div class='del'>-				== htons(pft-&gt;port)) goto endfor;</div><div class='del'>-		    break;</div><div class='del'>-		case IPPROTO_TCP:</div><div class='del'>-		    if (((struct tcphdr *) &amp;((int *)ip)[ip-&gt;ip_hl])-&gt;th_dport</div><div class='del'>-				== htons(pft-&gt;port)) goto endfor;</div><div class='del'>-		    break;</div><div class='del'>-		}	</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	endfor:</div><div class='del'>-	if (pft-&gt;proto != -1) {</div><div class='del'>-	    if (us-&gt;flags &amp; US_DBGLOG)</div><div class='del'>-		DPRINT3("ppp/%d: found IP pkt, proto=0x%x (%d)\n", </div><div class='del'>-				us-&gt;mn, pft-&gt;proto, pft-&gt;port);</div><div class='del'>-	    /* Discard if not connected, or if not pass_with_link_up */</div><div class='del'>-	    /* else, if link is up let go by, but don't update time */</div><div class='del'>-	    return pft-&gt;ok_if_link_up? -1: 0;</div><div class='del'>-	}</div><div class='del'>-        break;</div><div class='del'>-    } /* end switch (proto) */</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* FILTER_PACKETS */</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/ppp_ahdlc.c b/mdk-stage1/ppp/modules/ppp_ahdlc.c<br/>deleted file mode 100644<br/>index d0b961258..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/ppp_ahdlc.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/ppp_ahdlc.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,878 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp_ahdlc.c - STREAMS module for doing PPP asynchronous HDLC.</div><div class='del'>- *</div><div class='del'>- * Re-written by Adi Masputra &lt;adi.masputra@sun.com&gt;, based on </div><div class='del'>- * the original ppp_ahdlc.c</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 2000 by Sun Microsystems, Inc.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  </div><div class='del'>- *</div><div class='del'>- * SUN MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY OF</div><div class='del'>- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED</div><div class='del'>- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A</div><div class='del'>- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  SUN SHALL NOT BE LIABLE FOR</div><div class='del'>- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR</div><div class='del'>- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This file is used under Solaris 2, SVR4, SunOS 4, and Digital UNIX.</div><div class='del'>- */</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#include &lt;sys/conf.h&gt;</div><div class='del'>-#include &lt;sys/kmem.h&gt;</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#include &lt;sys/ddi.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/user.h&gt;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif /* SVR4 */</div><div class='del'>-</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Right now, mutex is only enabled for Solaris 2.x</div><div class='del'>- */</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-#define USE_MUTEX</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * intpointer_t and uintpointer_t are signed and unsigned integer types </div><div class='del'>- * large enough to hold any data pointer; that is, data pointers can be </div><div class='del'>- * assigned into or from these integer types without losing precision.</div><div class='del'>- * On recent Solaris releases, these types are defined in sys/int_types.h,</div><div class='del'>- * but not on SunOS 4.x or the earlier Solaris versions.</div><div class='del'>- */</div><div class='del'>-#if defined(_LP64) || defined(_I32LPx)</div><div class='del'>-typedef long                    intpointer_t;</div><div class='del'>-typedef unsigned long           uintpointer_t;</div><div class='del'>-#else</div><div class='del'>-typedef int                     intpointer_t;</div><div class='del'>-typedef unsigned int            uintpointer_t;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-MOD_OPEN_DECL(ahdlc_open);</div><div class='del'>-MOD_CLOSE_DECL(ahdlc_close);</div><div class='del'>-static int ahdlc_wput __P((queue_t *, mblk_t *));</div><div class='del'>-static int ahdlc_rput __P((queue_t *, mblk_t *));</div><div class='del'>-static void ahdlc_encode __P((queue_t *, mblk_t *));</div><div class='del'>-static void ahdlc_decode __P((queue_t *, mblk_t *));</div><div class='del'>-static int msg_byte __P((mblk_t *, unsigned int));</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-/*</div><div class='del'>- * Don't send HDLC start flag is last transmit is within 1.5 seconds -</div><div class='del'>- * FLAG_TIME is defined is microseconds</div><div class='del'>- */</div><div class='del'>-#define FLAG_TIME   1500</div><div class='del'>-#define ABS(x)	    (x &gt;= 0 ? x : (-x))</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Extract byte i of message mp </div><div class='del'>- */</div><div class='del'>-#define MSG_BYTE(mp, i)	((i) &lt; (mp)-&gt;b_wptr - (mp)-&gt;b_rptr? (mp)-&gt;b_rptr[i]: \</div><div class='del'>-			 msg_byte((mp), (i)))</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * Is this LCP packet one we have to transmit using LCP defaults? </div><div class='del'>- */</div><div class='del'>-#define LCP_USE_DFLT(mp)	(1 &lt;= (code = MSG_BYTE((mp), 4)) &amp;&amp; code &lt;= 7)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Standard STREAMS declarations</div><div class='del'>- */</div><div class='del'>-static struct module_info minfo = {</div><div class='del'>-    0x7d23, "ppp_ahdl", 0, INFPSZ, 32768, 512</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit rinit = {</div><div class='del'>-    ahdlc_rput, NULL, ahdlc_open, ahdlc_close, NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit winit = {</div><div class='del'>-    ahdlc_wput, NULL, NULL, NULL, NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#if defined(SVR4) &amp;&amp; !defined(SOL2)</div><div class='del'>-int phdldevflag = 0;</div><div class='del'>-#define ppp_ahdlcinfo phdlinfo</div><div class='del'>-#endif /* defined(SVR4) &amp;&amp; !defined(SOL2) */</div><div class='del'>-</div><div class='del'>-struct streamtab ppp_ahdlcinfo = {</div><div class='del'>-    &amp;rinit,			    /* ptr to st_rdinit */</div><div class='del'>-    &amp;winit,			    /* ptr to st_wrinit */</div><div class='del'>-    NULL,			    /* ptr to st_muxrinit */</div><div class='del'>-    NULL,			    /* ptr to st_muxwinit */</div><div class='del'>-#if defined(SUNOS4)</div><div class='del'>-    NULL			    /* ptr to ptr to st_modlist */</div><div class='del'>-#endif /* SUNOS4 */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#if defined(SUNOS4)</div><div class='del'>-int ppp_ahdlc_count = 0;	    /* open counter */</div><div class='del'>-#endif /* SUNOS4 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Per-stream state structure</div><div class='del'>- */</div><div class='del'>-typedef struct ahdlc_state {</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    kmutex_t	    lock;		    /* lock for this structure */</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-    int		    flags;		    /* link flags */</div><div class='del'>-    mblk_t	    *rx_buf;		    /* ptr to receive buffer */</div><div class='del'>-    int		    rx_buf_size;	    /* receive buffer size */</div><div class='del'>-    ushort_t	    infcs;		    /* calculated rx HDLC FCS */</div><div class='del'>-    u_int32_t	    xaccm[8];		    /* 256-bit xmit ACCM */</div><div class='del'>-    u_int32_t	    raccm;		    /* 32-bit rcv ACCM */</div><div class='del'>-    int		    mtu;		    /* interface MTU */</div><div class='del'>-    int		    mru;		    /* link MRU */</div><div class='del'>-    int		    unit;		    /* current PPP unit number */</div><div class='del'>-    struct pppstat  stats;		    /* statistic structure */</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    clock_t	    flag_time;		    /* time in usec between flags */</div><div class='del'>-    clock_t	    lbolt;		    /* last updated lbolt */</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-} ahdlc_state_t;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for flags </div><div class='del'>- */</div><div class='del'>-#define ESCAPED		0x100	/* last saw escape char on input */</div><div class='del'>-#define IFLUSH		0x200	/* flushing input due to error */</div><div class='del'>-</div><div class='del'>-/* </div><div class='del'>- * RCV_B7_1, etc., defined in net/pppio.h, are stored in flags also. </div><div class='del'>- */</div><div class='del'>-#define RCV_FLAGS	(RCV_B7_1|RCV_B7_0|RCV_ODDP|RCV_EVNP)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * FCS lookup table as calculated by genfcstab.</div><div class='del'>- */</div><div class='del'>-static u_short fcstab[256] = {</div><div class='del'>-	0x0000,	0x1189,	0x2312,	0x329b,	0x4624,	0x57ad,	0x6536,	0x74bf,</div><div class='del'>-	0x8c48,	0x9dc1,	0xaf5a,	0xbed3,	0xca6c,	0xdbe5,	0xe97e,	0xf8f7,</div><div class='del'>-	0x1081,	0x0108,	0x3393,	0x221a,	0x56a5,	0x472c,	0x75b7,	0x643e,</div><div class='del'>-	0x9cc9,	0x8d40,	0xbfdb,	0xae52,	0xdaed,	0xcb64,	0xf9ff,	0xe876,</div><div class='del'>-	0x2102,	0x308b,	0x0210,	0x1399,	0x6726,	0x76af,	0x4434,	0x55bd,</div><div class='del'>-	0xad4a,	0xbcc3,	0x8e58,	0x9fd1,	0xeb6e,	0xfae7,	0xc87c,	0xd9f5,</div><div class='del'>-	0x3183,	0x200a,	0x1291,	0x0318,	0x77a7,	0x662e,	0x54b5,	0x453c,</div><div class='del'>-	0xbdcb,	0xac42,	0x9ed9,	0x8f50,	0xfbef,	0xea66,	0xd8fd,	0xc974,</div><div class='del'>-	0x4204,	0x538d,	0x6116,	0x709f,	0x0420,	0x15a9,	0x2732,	0x36bb,</div><div class='del'>-	0xce4c,	0xdfc5,	0xed5e,	0xfcd7,	0x8868,	0x99e1,	0xab7a,	0xbaf3,</div><div class='del'>-	0x5285,	0x430c,	0x7197,	0x601e,	0x14a1,	0x0528,	0x37b3,	0x263a,</div><div class='del'>-	0xdecd,	0xcf44,	0xfddf,	0xec56,	0x98e9,	0x8960,	0xbbfb,	0xaa72,</div><div class='del'>-	0x6306,	0x728f,	0x4014,	0x519d,	0x2522,	0x34ab,	0x0630,	0x17b9,</div><div class='del'>-	0xef4e,	0xfec7,	0xcc5c,	0xddd5,	0xa96a,	0xb8e3,	0x8a78,	0x9bf1,</div><div class='del'>-	0x7387,	0x620e,	0x5095,	0x411c,	0x35a3,	0x242a,	0x16b1,	0x0738,</div><div class='del'>-	0xffcf,	0xee46,	0xdcdd,	0xcd54,	0xb9eb,	0xa862,	0x9af9,	0x8b70,</div><div class='del'>-	0x8408,	0x9581,	0xa71a,	0xb693,	0xc22c,	0xd3a5,	0xe13e,	0xf0b7,</div><div class='del'>-	0x0840,	0x19c9,	0x2b52,	0x3adb,	0x4e64,	0x5fed,	0x6d76,	0x7cff,</div><div class='del'>-	0x9489,	0x8500,	0xb79b,	0xa612,	0xd2ad,	0xc324,	0xf1bf,	0xe036,</div><div class='del'>-	0x18c1,	0x0948,	0x3bd3,	0x2a5a,	0x5ee5,	0x4f6c,	0x7df7,	0x6c7e,</div><div class='del'>-	0xa50a,	0xb483,	0x8618,	0x9791,	0xe32e,	0xf2a7,	0xc03c,	0xd1b5,</div><div class='del'>-	0x2942,	0x38cb,	0x0a50,	0x1bd9,	0x6f66,	0x7eef,	0x4c74,	0x5dfd,</div><div class='del'>-	0xb58b,	0xa402,	0x9699,	0x8710,	0xf3af,	0xe226,	0xd0bd,	0xc134,</div><div class='del'>-	0x39c3,	0x284a,	0x1ad1,	0x0b58,	0x7fe7,	0x6e6e,	0x5cf5,	0x4d7c,</div><div class='del'>-	0xc60c,	0xd785,	0xe51e,	0xf497,	0x8028,	0x91a1,	0xa33a,	0xb2b3,</div><div class='del'>-	0x4a44,	0x5bcd,	0x6956,	0x78df,	0x0c60,	0x1de9,	0x2f72,	0x3efb,</div><div class='del'>-	0xd68d,	0xc704,	0xf59f,	0xe416,	0x90a9,	0x8120,	0xb3bb,	0xa232,</div><div class='del'>-	0x5ac5,	0x4b4c,	0x79d7,	0x685e,	0x1ce1,	0x0d68,	0x3ff3,	0x2e7a,</div><div class='del'>-	0xe70e,	0xf687,	0xc41c,	0xd595,	0xa12a,	0xb0a3,	0x8238,	0x93b1,</div><div class='del'>-	0x6b46,	0x7acf,	0x4854,	0x59dd,	0x2d62,	0x3ceb,	0x0e70,	0x1ff9,</div><div class='del'>-	0xf78f,	0xe606,	0xd49d,	0xc514,	0xb1ab,	0xa022,	0x92b9,	0x8330,</div><div class='del'>-	0x7bc7,	0x6a4e,	0x58d5,	0x495c,	0x3de3,	0x2c6a,	0x1ef1,	0x0f78</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static u_int32_t paritytab[8] =</div><div class='del'>-{</div><div class='del'>-	0x96696996, 0x69969669, 0x69969669, 0x96696996,</div><div class='del'>-	0x69969669, 0x96696996, 0x96696996, 0x69969669</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * STREAMS module open (entry) point</div><div class='del'>- */</div><div class='del'>-MOD_OPEN(ahdlc_open)</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t   *state;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Return if it's already opened</div><div class='del'>-     */</div><div class='del'>-    if (q-&gt;q_ptr) {</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * This can only be opened as a module</div><div class='del'>-     */</div><div class='del'>-    if (sflag != MODOPEN) {</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *) ALLOC_NOSLEEP(sizeof(ahdlc_state_t));</div><div class='del'>-    if (state == 0)</div><div class='del'>-	OPEN_ERROR(ENOSR);</div><div class='del'>-    bzero((caddr_t) state, sizeof(ahdlc_state_t));</div><div class='del'>-</div><div class='del'>-    q-&gt;q_ptr	 = (caddr_t) state;</div><div class='del'>-    WR(q)-&gt;q_ptr = (caddr_t) state;</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_init(&amp;state-&gt;lock, NULL, MUTEX_DEFAULT, NULL);</div><div class='del'>-    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    state-&gt;xaccm[0] = ~0;	    /* escape 0x00 through 0x1f */</div><div class='del'>-    state-&gt;xaccm[3] = 0x60000000;   /* escape 0x7d and 0x7e */</div><div class='del'>-    state-&gt;mru	    = PPP_MRU;	    /* default of 1500 bytes */</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    state-&gt;flag_time = drv_usectohz(FLAG_TIME);</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */	</div><div class='del'>-</div><div class='del'>-#if defined(SUNOS4)</div><div class='del'>-    ppp_ahdlc_count++;</div><div class='del'>-#endif /* SUNOS4 */</div><div class='del'>-</div><div class='del'>-    qprocson(q);</div><div class='del'>-    </div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * STREAMS module close (exit) point</div><div class='del'>- */</div><div class='del'>-MOD_CLOSE(ahdlc_close)</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t   *state;</div><div class='del'>-</div><div class='del'>-    qprocsoff(q);</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *) q-&gt;q_ptr;</div><div class='del'>-</div><div class='del'>-    if (state == 0) {</div><div class='del'>-	DPRINT("state == 0 in ahdlc_close\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    if (state-&gt;rx_buf != 0) {</div><div class='del'>-	freemsg(state-&gt;rx_buf);</div><div class='del'>-	state-&gt;rx_buf = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-    mutex_destroy(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    FREE(q-&gt;q_ptr, sizeof(ahdlc_state_t));</div><div class='del'>-    q-&gt;q_ptr	     = NULL;</div><div class='del'>-    OTHERQ(q)-&gt;q_ptr = NULL;</div><div class='del'>-</div><div class='del'>-#if defined(SUNOS4)</div><div class='del'>-    if (ppp_ahdlc_count)</div><div class='del'>-	ppp_ahdlc_count--;</div><div class='del'>-#endif /* SUNOS4 */</div><div class='del'>-    </div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Write side put routine</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ahdlc_wput(q, mp)</div><div class='del'>-    queue_t	*q;</div><div class='del'>-    mblk_t	*mp;</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t  	*state;</div><div class='del'>-    struct iocblk  	*iop;</div><div class='del'>-    int		   	error;</div><div class='del'>-    mblk_t	   	*np;</div><div class='del'>-    struct ppp_stats	*psp;</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (state == 0) {</div><div class='del'>-	DPRINT("state == 0 in ahdlc_wput\n");</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_DATA:</div><div class='del'>-	/*</div><div class='del'>-	 * A data packet - do character-stuffing and FCS, and</div><div class='del'>-	 * send it onwards.</div><div class='del'>-	 */</div><div class='del'>-	ahdlc_encode(q, mp);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCTL:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	error = EINVAL;</div><div class='del'>-	switch (iop-&gt;ioc_cmd) {</div><div class='del'>-	case PPPIO_XACCM:</div><div class='del'>-	    if ((iop-&gt;ioc_count &lt; sizeof(u_int32_t)) || </div><div class='del'>-		(iop-&gt;ioc_count &gt; sizeof(ext_accm))) {</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ahdlc_wput/%d: PPPIO_XACCM b_cont = 0!\n", state-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    bcopy((caddr_t)mp-&gt;b_cont-&gt;b_rptr, (caddr_t)state-&gt;xaccm,</div><div class='del'>-		  iop-&gt;ioc_count);</div><div class='del'>-	    state-&gt;xaccm[2] &amp;= ~0x40000000;	/* don't escape 0x5e */</div><div class='del'>-	    state-&gt;xaccm[3] |= 0x60000000;	/* do escape 0x7d, 0x7e */</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_RACCM:</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(u_int32_t))</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ahdlc_wput/%d: PPPIO_RACCM b_cont = 0!\n", state-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    bcopy((caddr_t)mp-&gt;b_cont-&gt;b_rptr, (caddr_t)&amp;state-&gt;raccm,</div><div class='del'>-		  sizeof(u_int32_t));</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_GCLEAN:</div><div class='del'>-	    np = allocb(sizeof(int), BPRI_HI);</div><div class='del'>-	    if (np == 0) {</div><div class='del'>-		error = ENOSR;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont != 0)</div><div class='del'>-		freemsg(mp-&gt;b_cont);</div><div class='del'>-	    mp-&gt;b_cont = np;</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    *(int *)np-&gt;b_wptr = state-&gt;flags &amp; RCV_FLAGS;</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    np-&gt;b_wptr += sizeof(int);</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(int);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_GETSTAT:</div><div class='del'>-	    np = allocb(sizeof(struct ppp_stats), BPRI_HI);</div><div class='del'>-	    if (np == 0) {</div><div class='del'>-		error = ENOSR;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont != 0)</div><div class='del'>-		freemsg(mp-&gt;b_cont);</div><div class='del'>-	    mp-&gt;b_cont = np;</div><div class='del'>-	    psp = (struct ppp_stats *) np-&gt;b_wptr;</div><div class='del'>-	    np-&gt;b_wptr += sizeof(struct ppp_stats);</div><div class='del'>-	    bzero((caddr_t)psp, sizeof(struct ppp_stats));</div><div class='del'>-	    psp-&gt;p = state-&gt;stats;</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(struct ppp_stats);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_LASTMOD:</div><div class='del'>-	    /* we knew this anyway */</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (error &lt; 0)</div><div class='del'>-	    putnext(q, mp);</div><div class='del'>-	else if (error == 0) {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCNAK;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    iop-&gt;ioc_error = error;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_CTL:</div><div class='del'>-	switch (*mp-&gt;b_rptr) {</div><div class='del'>-	case PPPCTL_MTU:</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    state-&gt;mtu = ((unsigned short *)mp-&gt;b_rptr)[1];</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_MRU:</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    state-&gt;mru = ((unsigned short *)mp-&gt;b_rptr)[1];</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_UNIT:</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    state-&gt;unit = mp-&gt;b_rptr[1];</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	    break;</div><div class='del'>-	default:</div><div class='del'>-	    putnext(q, mp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Read side put routine</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ahdlc_rput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t  *mp;</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t *state;</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (state == 0) {</div><div class='del'>-	DPRINT("state == 0 in ahdlc_rput\n");</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-    case M_DATA:</div><div class='del'>-	ahdlc_decode(q, mp);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_HANGUP:</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	if (state-&gt;rx_buf != 0) {</div><div class='del'>-	    /* XXX would like to send this up for debugging */</div><div class='del'>-	    freemsg(state-&gt;rx_buf);</div><div class='del'>-	    state-&gt;rx_buf = 0;</div><div class='del'>-	}</div><div class='del'>-	state-&gt;flags = IFLUSH;</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Extract bit c from map m, to determine if c needs to be escaped</div><div class='del'>- */</div><div class='del'>-#define IN_TX_MAP(c, m)	((m)[(c) &gt;&gt; 5] &amp; (1 &lt;&lt; ((c) &amp; 0x1f)))</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ahdlc_encode(q, mp)</div><div class='del'>-    queue_t	*q;</div><div class='del'>-    mblk_t	*mp;</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t	*state;</div><div class='del'>-    u_int32_t		*xaccm, loc_xaccm[8];</div><div class='del'>-    ushort_t		fcs;</div><div class='del'>-    size_t		outmp_len;</div><div class='del'>-    mblk_t		*outmp, *tmp;</div><div class='del'>-    uchar_t		*dp, fcs_val;</div><div class='del'>-    int			is_lcp, code;</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    clock_t		lbolt;</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-    if (msgdsize(mp) &lt; 4) {</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *)q-&gt;q_ptr;</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Allocate an output buffer large enough to handle a case where all</div><div class='del'>-     * characters need to be escaped</div><div class='del'>-     */</div><div class='del'>-    outmp_len = (msgdsize(mp)	 &lt;&lt; 1) +		/* input block x 2 */</div><div class='del'>-		(sizeof(fcs)	 &lt;&lt; 2) +		/* HDLC FCS x 4 */</div><div class='del'>-		(sizeof(uchar_t) &lt;&lt; 1);			/* HDLC flags x 2 */</div><div class='del'>-</div><div class='del'>-    outmp = allocb(outmp_len, BPRI_MED);</div><div class='del'>-    if (outmp == NULL) {</div><div class='del'>-	state-&gt;stats.ppp_oerrors++;</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-	mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-	putctl1(RD(q)-&gt;q_next, M_CTL, PPPCTL_OERROR);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    /*</div><div class='del'>-     * Check if our last transmit happenned within flag_time, using</div><div class='del'>-     * the system's LBOLT value in clock ticks</div><div class='del'>-     */</div><div class='del'>-    if (drv_getparm(LBOLT, &amp;lbolt) != -1) {</div><div class='del'>-	if (ABS((clock_t)lbolt - state-&gt;lbolt) &gt; state-&gt;flag_time) {</div><div class='del'>-	    *outmp-&gt;b_wptr++ = PPP_FLAG;</div><div class='del'>-	} </div><div class='del'>-	state-&gt;lbolt = lbolt;</div><div class='del'>-    } else {</div><div class='del'>-	*outmp-&gt;b_wptr++ = PPP_FLAG;</div><div class='del'>-    }</div><div class='del'>-#else</div><div class='del'>-    /*</div><div class='del'>-     * If the driver below still has a message to process, skip the</div><div class='del'>-     * HDLC flag, otherwise, put one in the beginning</div><div class='del'>-     */</div><div class='del'>-    if (qsize(q-&gt;q_next) == 0) {</div><div class='del'>-	*outmp-&gt;b_wptr++ = PPP_FLAG;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * All control characters must be escaped for LCP packets with code</div><div class='del'>-     * values between 1 (Conf-Req) and 7 (Code-Rej).</div><div class='del'>-     */</div><div class='del'>-    is_lcp = ((MSG_BYTE(mp, 0) == PPP_ALLSTATIONS) &amp;&amp; </div><div class='del'>-	      (MSG_BYTE(mp, 1) == PPP_UI) &amp;&amp; </div><div class='del'>-	      (MSG_BYTE(mp, 2) == (PPP_LCP &gt;&gt; 8)) &amp;&amp;</div><div class='del'>-	      (MSG_BYTE(mp, 3) == (PPP_LCP &amp; 0xff)) &amp;&amp;</div><div class='del'>-	      LCP_USE_DFLT(mp));</div><div class='del'>-</div><div class='del'>-    xaccm = state-&gt;xaccm;</div><div class='del'>-    if (is_lcp) {</div><div class='del'>-	bcopy((caddr_t)state-&gt;xaccm, (caddr_t)loc_xaccm, sizeof(loc_xaccm));</div><div class='del'>-	loc_xaccm[0] = ~0;	/* force escape on 0x00 through 0x1f */</div><div class='del'>-	xaccm = loc_xaccm;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    fcs = PPP_INITFCS;		/* Initial FCS is 0xffff */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Process this block and the rest (if any) attached to the this one</div><div class='del'>-     */</div><div class='del'>-    for (tmp = mp; tmp; tmp = tmp-&gt;b_cont) {</div><div class='del'>-	if (tmp-&gt;b_datap-&gt;db_type == M_DATA) {</div><div class='del'>-	    for (dp = tmp-&gt;b_rptr; dp &lt; tmp-&gt;b_wptr; dp++) {</div><div class='del'>-		fcs = PPP_FCS(fcs, *dp);</div><div class='del'>-		if (IN_TX_MAP(*dp, xaccm)) {</div><div class='del'>-		    *outmp-&gt;b_wptr++ = PPP_ESCAPE;</div><div class='del'>-		    *outmp-&gt;b_wptr++ = *dp ^ PPP_TRANS;</div><div class='del'>-		} else {</div><div class='del'>-		    *outmp-&gt;b_wptr++ = *dp;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	} else {</div><div class='del'>-	    continue;	/* skip if db_type is something other than M_DATA */</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Append the HDLC FCS, making sure that escaping is done on any</div><div class='del'>-     * necessary bytes</div><div class='del'>-     */</div><div class='del'>-    fcs_val = (fcs ^ 0xffff) &amp; 0xff;</div><div class='del'>-    if (IN_TX_MAP(fcs_val, xaccm)) {</div><div class='del'>-	*outmp-&gt;b_wptr++ = PPP_ESCAPE;</div><div class='del'>-	*outmp-&gt;b_wptr++ = fcs_val ^ PPP_TRANS;</div><div class='del'>-    } else {</div><div class='del'>-	*outmp-&gt;b_wptr++ = fcs_val;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    fcs_val = ((fcs ^ 0xffff) &gt;&gt; 8) &amp; 0xff;</div><div class='del'>-    if (IN_TX_MAP(fcs_val, xaccm)) {</div><div class='del'>-	*outmp-&gt;b_wptr++ = PPP_ESCAPE;</div><div class='del'>-	*outmp-&gt;b_wptr++ = fcs_val ^ PPP_TRANS;</div><div class='del'>-    } else {</div><div class='del'>-	*outmp-&gt;b_wptr++ = fcs_val;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * And finally, append the HDLC flag, and send it away</div><div class='del'>-     */</div><div class='del'>-    *outmp-&gt;b_wptr++ = PPP_FLAG;</div><div class='del'>-</div><div class='del'>-    state-&gt;stats.ppp_obytes += msgdsize(outmp);</div><div class='del'>-    state-&gt;stats.ppp_opackets++;</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    putnext(q, outmp);</div><div class='del'>-    return;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Checks the 32-bit receive ACCM to see if the byte needs un-escaping</div><div class='del'>- */</div><div class='del'>-#define IN_RX_MAP(c, m)	((((unsigned int) (uchar_t) (c)) &lt; 0x20) &amp;&amp; \</div><div class='del'>-			(m) &amp; (1 &lt;&lt; (c)))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Process received characters.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ahdlc_decode(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t  *mp;</div><div class='del'>-{</div><div class='del'>-    ahdlc_state_t   *state;</div><div class='del'>-    mblk_t	    *om;</div><div class='del'>-    uchar_t	    *dp;</div><div class='del'>-    ushort_t	    fcs;</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    mblk_t	    *zmp;</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    /*</div><div class='del'>-     * In case the driver (or something below) doesn't send</div><div class='del'>-     * data upstream in one message block, concatenate everything</div><div class='del'>-     */</div><div class='del'>-    if (!((mp-&gt;b_wptr - mp-&gt;b_rptr == msgdsize(mp)) &amp;&amp; </div><div class='del'>-         ((intpointer_t)mp-&gt;b_rptr % sizeof(intpointer_t) == 0))) {</div><div class='del'>-</div><div class='del'>-	zmp = msgpullup(mp, -1);</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	mp = zmp;</div><div class='del'>-	if (mp == 0)</div><div class='del'>-	    return; </div><div class='del'>-    }</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-    state = (ahdlc_state_t *) q-&gt;q_ptr;</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_enter(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-</div><div class='del'>-    state-&gt;stats.ppp_ibytes += msgdsize(mp);</div><div class='del'>-</div><div class='del'>-    for (dp = mp-&gt;b_rptr; dp &lt; mp-&gt;b_wptr; dp++) {</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * This should detect the lack of 8-bit communication channel</div><div class='del'>-	 * which is necessary for PPP to work. In addition, it also</div><div class='del'>-	 * checks on the parity.</div><div class='del'>-	 */</div><div class='del'>-	if (*dp &amp; 0x80)</div><div class='del'>-	    state-&gt;flags |= RCV_B7_1;</div><div class='del'>-	else</div><div class='del'>-	    state-&gt;flags |= RCV_B7_0;</div><div class='del'>-</div><div class='del'>-	if (paritytab[*dp &gt;&gt; 5] &amp; (1 &lt;&lt; (*dp &amp; 0x1f)))</div><div class='del'>-	    state-&gt;flags |= RCV_ODDP;</div><div class='del'>-	else</div><div class='del'>-	    state-&gt;flags |= RCV_EVNP;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * So we have a HDLC flag ...</div><div class='del'>-	 */</div><div class='del'>-	if (*dp == PPP_FLAG) {</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If we think that it marks the beginning of the frame,</div><div class='del'>-	     * then continue to process the next octects</div><div class='del'>-	     */</div><div class='del'>-	    if ((state-&gt;flags &amp; IFLUSH) ||</div><div class='del'>-		(state-&gt;rx_buf == 0) ||</div><div class='del'>-		(msgdsize(state-&gt;rx_buf) == 0)) {</div><div class='del'>-</div><div class='del'>-		state-&gt;flags &amp;= ~IFLUSH;</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * We get here because the above condition isn't true,</div><div class='del'>-	     * in which case the HDLC flag was there to mark the end</div><div class='del'>-	     * of the frame (or so we think)</div><div class='del'>-	     */</div><div class='del'>-	    om = state-&gt;rx_buf;</div><div class='del'>-</div><div class='del'>-	    if (state-&gt;infcs == PPP_GOODFCS) {</div><div class='del'>-		state-&gt;stats.ppp_ipackets++;</div><div class='del'>-		adjmsg(om, -PPP_FCSLEN);</div><div class='del'>-		putnext(q, om);</div><div class='del'>-	    } else {</div><div class='del'>-		DPRINT2("ppp%d: bad fcs (len=%d)\n",</div><div class='del'>-                    state-&gt;unit, msgdsize(state-&gt;rx_buf));</div><div class='del'>-		freemsg(state-&gt;rx_buf);</div><div class='del'>-		state-&gt;flags &amp;= ~(IFLUSH | ESCAPED);</div><div class='del'>-		state-&gt;stats.ppp_ierrors++;</div><div class='del'>-		putctl1(q-&gt;q_next, M_CTL, PPPCTL_IERROR);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    state-&gt;rx_buf = 0;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (state-&gt;flags &amp; IFLUSH) {</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Allocate a receive buffer, large enough to store a frame (after</div><div class='del'>-	 * un-escaping) of at least 1500 octets. If MRU is negotiated to</div><div class='del'>-	 * be more than the default, then allocate that much. In addition,</div><div class='del'>-	 * we add an extra 32-bytes for a fudge factor</div><div class='del'>-	 */ </div><div class='del'>-	if (state-&gt;rx_buf == 0) {</div><div class='del'>-	    state-&gt;rx_buf_size  = (state-&gt;mru &lt; PPP_MRU ? PPP_MRU : state-&gt;mru);</div><div class='del'>-	    state-&gt;rx_buf_size += (sizeof(u_int32_t) &lt;&lt; 3);</div><div class='del'>-	    state-&gt;rx_buf = allocb(state-&gt;rx_buf_size, BPRI_MED);</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If allocation fails, try again on the next frame</div><div class='del'>-	     */</div><div class='del'>-	    if (state-&gt;rx_buf == 0) {</div><div class='del'>-		state-&gt;flags |= IFLUSH;</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	    state-&gt;flags &amp;= ~(IFLUSH | ESCAPED);</div><div class='del'>-	    state-&gt;infcs  = PPP_INITFCS;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (*dp == PPP_ESCAPE) {</div><div class='del'>-	    state-&gt;flags |= ESCAPED;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Make sure we un-escape the necessary characters, as well as the</div><div class='del'>-	 * ones in our receive async control character map</div><div class='del'>-	 */</div><div class='del'>-	if (state-&gt;flags &amp; ESCAPED) {</div><div class='del'>-	    *dp ^= PPP_TRANS;</div><div class='del'>-	    state-&gt;flags &amp;= ~ESCAPED;</div><div class='del'>-	} else if (IN_RX_MAP(*dp, state-&gt;raccm)) </div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Unless the peer lied to us about the negotiated MRU, we should</div><div class='del'>-	 * never get a frame which is too long. If it happens, toss it away</div><div class='del'>-	 * and grab the next incoming one</div><div class='del'>-	 */</div><div class='del'>-	if (msgdsize(state-&gt;rx_buf) &lt; state-&gt;rx_buf_size) {</div><div class='del'>-	    state-&gt;infcs = PPP_FCS(state-&gt;infcs, *dp);</div><div class='del'>-	    *state-&gt;rx_buf-&gt;b_wptr++ = *dp;</div><div class='del'>-	} else {</div><div class='del'>-	    DPRINT2("ppp%d: frame too long (%d)\n",</div><div class='del'>-		state-&gt;unit, msgdsize(state-&gt;rx_buf));</div><div class='del'>-	    freemsg(state-&gt;rx_buf);</div><div class='del'>-	    state-&gt;rx_buf     = 0;</div><div class='del'>-	    state-&gt;flags     |= IFLUSH;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(USE_MUTEX)</div><div class='del'>-    mutex_exit(&amp;state-&gt;lock);</div><div class='del'>-#endif /* USE_MUTEX */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-msg_byte(mp, i)</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    unsigned int i;</div><div class='del'>-{</div><div class='del'>-    while (mp != 0 &amp;&amp; i &gt;= mp-&gt;b_wptr - mp-&gt;b_rptr)</div><div class='del'>-	mp = mp-&gt;b_cont;</div><div class='del'>-    if (mp == 0)</div><div class='del'>-	return -1;</div><div class='del'>-    return mp-&gt;b_rptr[i];</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/ppp_comp.c b/mdk-stage1/ppp/modules/ppp_comp.c<br/>deleted file mode 100644<br/>index f6eef5ab1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/ppp_comp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/ppp_comp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1126 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ppp_comp.c - STREAMS module for kernel-level compression and CCP support.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This file is used under SVR4, Solaris 2, SunOS 4, and Digital UNIX.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#include &lt;sys/conf.h&gt;</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#include &lt;sys/ddi.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;sys/user.h&gt;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/cmn_err.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif /* SVR4 */</div><div class='del'>-</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include "ppp_mod.h"</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/mbuf.h&gt;</div><div class='del'>-#include &lt;sys/protosw.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;netinet/in_systm.h&gt;</div><div class='del'>-#include &lt;netinet/ip.h&gt;</div><div class='del'>-#include &lt;net/vjcompress.h&gt;</div><div class='del'>-</div><div class='del'>-#define PACKETPTR	mblk_t *</div><div class='del'>-#include &lt;net/ppp-comp.h&gt;</div><div class='del'>-</div><div class='del'>-MOD_OPEN_DECL(ppp_comp_open);</div><div class='del'>-MOD_CLOSE_DECL(ppp_comp_close);</div><div class='del'>-static int ppp_comp_rput __P((queue_t *, mblk_t *));</div><div class='del'>-static int ppp_comp_rsrv __P((queue_t *));</div><div class='del'>-static int ppp_comp_wput __P((queue_t *, mblk_t *));</div><div class='del'>-static int ppp_comp_wsrv __P((queue_t *));</div><div class='del'>-static void ppp_comp_ccp __P((queue_t *, mblk_t *, int));</div><div class='del'>-static int msg_byte __P((mblk_t *, unsigned int));</div><div class='del'>-</div><div class='del'>-/* Extract byte i of message mp. */</div><div class='del'>-#define MSG_BYTE(mp, i)	((i) &lt; (mp)-&gt;b_wptr - (mp)-&gt;b_rptr? (mp)-&gt;b_rptr[i]: \</div><div class='del'>-			 msg_byte((mp), (i)))</div><div class='del'>-</div><div class='del'>-/* Is this LCP packet one we have to transmit using LCP defaults? */</div><div class='del'>-#define LCP_USE_DFLT(mp)	(1 &lt;= (code = MSG_BYTE((mp), 4)) &amp;&amp; code &lt;= 7)</div><div class='del'>-</div><div class='del'>-#define PPP_COMP_ID 0xbadf</div><div class='del'>-static struct module_info minfo = {</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-    PPP_COMP_ID, "ppp_comp", 0, INFPSZ, 16512, 16384,</div><div class='del'>-#else</div><div class='del'>-    PPP_COMP_ID, "ppp_comp", 0, INFPSZ, 16384, 4096,</div><div class='del'>-#endif</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit r_init = {</div><div class='del'>-    ppp_comp_rput, ppp_comp_rsrv, ppp_comp_open, ppp_comp_close,</div><div class='del'>-    NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct qinit w_init = {</div><div class='del'>-    ppp_comp_wput, ppp_comp_wsrv, NULL, NULL, NULL, &amp;minfo, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#if defined(SVR4) &amp;&amp; !defined(SOL2)</div><div class='del'>-int pcmpdevflag = 0;</div><div class='del'>-#define ppp_compinfo pcmpinfo</div><div class='del'>-#endif</div><div class='del'>-struct streamtab ppp_compinfo = {</div><div class='del'>-    &amp;r_init, &amp;w_init, NULL, NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int ppp_comp_count;		/* number of module instances in use */</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-</div><div class='del'>-static void ppp_comp_alloc __P((comp_state_t *));</div><div class='del'>-typedef struct memreq {</div><div class='del'>-    unsigned char comp_opts[20];</div><div class='del'>-    int cmd;</div><div class='del'>-    int thread_status;</div><div class='del'>-    char *returned_mem;</div><div class='del'>-} memreq_t;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-typedef struct comp_state {</div><div class='del'>-    int		flags;</div><div class='del'>-    int		mru;</div><div class='del'>-    int		mtu;</div><div class='del'>-    int		unit;</div><div class='del'>-    struct compressor *xcomp;</div><div class='del'>-    void	*xstate;</div><div class='del'>-    struct compressor *rcomp;</div><div class='del'>-    void	*rstate;</div><div class='del'>-    struct vjcompress vj_comp;</div><div class='del'>-    int		vj_last_ierrors;</div><div class='del'>-    struct pppstat stats;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    memreq_t	memreq;</div><div class='del'>-    thread_t	thread;</div><div class='del'>-#endif</div><div class='del'>-} comp_state_t;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-extern task_t first_task;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Bits in flags are as defined in pppio.h. */</div><div class='del'>-#define CCP_ERR		(CCP_ERROR | CCP_FATALERROR)</div><div class='del'>-#define LAST_MOD	0x1000000	/* no ppp modules below us */</div><div class='del'>-#define DBGLOG		0x2000000	/* log debugging stuff */</div><div class='del'>-</div><div class='del'>-#define MAX_IPHDR	128	/* max TCP/IP header size */</div><div class='del'>-#define MAX_VJHDR	20	/* max VJ compressed header size (?) */</div><div class='del'>-</div><div class='del'>-#undef MIN		/* just in case */</div><div class='del'>-#define MIN(a, b)	((a) &lt; (b)? (a): (b))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * List of compressors we know about.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#if DO_BSD_COMPRESS</div><div class='del'>-extern struct compressor ppp_bsd_compress;</div><div class='del'>-#endif</div><div class='del'>-#if DO_DEFLATE</div><div class='del'>-extern struct compressor ppp_deflate, ppp_deflate_draft;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-struct compressor *ppp_compressors[] = {</div><div class='del'>-#if DO_BSD_COMPRESS</div><div class='del'>-    &amp;ppp_bsd_compress,</div><div class='del'>-#endif</div><div class='del'>-#if DO_DEFLATE</div><div class='del'>-    &amp;ppp_deflate,</div><div class='del'>-    &amp;ppp_deflate_draft,</div><div class='del'>-#endif</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * STREAMS module entry points.</div><div class='del'>- */</div><div class='del'>-MOD_OPEN(ppp_comp_open)</div><div class='del'>-{</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-#ifdef __osf__</div><div class='del'>-    thread_t thread;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (q-&gt;q_ptr == NULL) {</div><div class='del'>-	cp = (comp_state_t *) ALLOC_SLEEP(sizeof(comp_state_t));</div><div class='del'>-	if (cp == NULL)</div><div class='del'>-	    OPEN_ERROR(ENOSR);</div><div class='del'>-	bzero((caddr_t)cp, sizeof(comp_state_t));</div><div class='del'>-	WR(q)-&gt;q_ptr = q-&gt;q_ptr = (caddr_t) cp;</div><div class='del'>-	cp-&gt;mru = PPP_MRU;</div><div class='del'>-	cp-&gt;mtu = PPP_MTU;</div><div class='del'>-	cp-&gt;xstate = NULL;</div><div class='del'>-	cp-&gt;rstate = NULL;</div><div class='del'>-	vj_compress_init(&amp;cp-&gt;vj_comp, -1);</div><div class='del'>-#ifdef __osf__</div><div class='del'>-	if (!(thread = kernel_thread_w_arg(first_task, ppp_comp_alloc, (void *)cp)))</div><div class='del'>-		OPEN_ERROR(ENOSR);</div><div class='del'>-	cp-&gt;thread = thread;</div><div class='del'>-#endif</div><div class='del'>-	++ppp_comp_count;</div><div class='del'>-	qprocson(q);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-MOD_CLOSE(ppp_comp_close)</div><div class='del'>-{</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-</div><div class='del'>-    qprocsoff(q);</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (cp != NULL) {</div><div class='del'>-	if (cp-&gt;xstate != NULL)</div><div class='del'>-	    (*cp-&gt;xcomp-&gt;comp_free)(cp-&gt;xstate);</div><div class='del'>-	if (cp-&gt;rstate != NULL)</div><div class='del'>-	    (*cp-&gt;rcomp-&gt;decomp_free)(cp-&gt;rstate);</div><div class='del'>-#ifdef __osf__</div><div class='del'>-	if (!cp-&gt;thread)</div><div class='del'>-	    printf("ppp_comp_close: NULL thread!\n");</div><div class='del'>-	else</div><div class='del'>-	    thread_terminate(cp-&gt;thread);</div><div class='del'>-#endif</div><div class='del'>-	FREE(cp, sizeof(comp_state_t));</div><div class='del'>-	q-&gt;q_ptr = NULL;</div><div class='del'>-	OTHERQ(q)-&gt;q_ptr = NULL;</div><div class='del'>-	--ppp_comp_count;</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-</div><div class='del'>-/* thread for calling back to a compressor's memory allocator</div><div class='del'>- * Needed for Digital UNIX since it's VM can't handle requests</div><div class='del'>- * for large amounts of memory without blocking.  The thread</div><div class='del'>- * provides a context in which we can call a memory allocator</div><div class='del'>- * that may block.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ppp_comp_alloc(comp_state_t *cp)</div><div class='del'>-{</div><div class='del'>-    int len, cmd;</div><div class='del'>-    unsigned char *compressor_options;</div><div class='del'>-    thread_t thread;</div><div class='del'>-    void *(*comp_allocator)();</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#if defined(MAJOR_VERSION) &amp;&amp; (MAJOR_VERSION &lt;= 2)</div><div class='del'>-</div><div class='del'>-    /* In 2.x and earlier the argument gets passed</div><div class='del'>-     * in the thread structure itself.  Yuck.</div><div class='del'>-     */</div><div class='del'>-    thread = current_thread();</div><div class='del'>-    cp = thread-&gt;reply_port;</div><div class='del'>-    thread-&gt;reply_port = PORT_NULL;</div><div class='del'>-</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-	assert_wait((vm_offset_t)&amp;cp-&gt;memreq.thread_status, TRUE);</div><div class='del'>-	thread_block();</div><div class='del'>-</div><div class='del'>-	if (thread_should_halt(current_thread()))</div><div class='del'>-	    thread_halt_self();</div><div class='del'>-	cmd = cp-&gt;memreq.cmd;</div><div class='del'>-	compressor_options = &amp;cp-&gt;memreq.comp_opts[0];</div><div class='del'>-	len = compressor_options[1];</div><div class='del'>-	if (cmd == PPPIO_XCOMP) {</div><div class='del'>-	    cp-&gt;memreq.returned_mem = cp-&gt;xcomp-&gt;comp_alloc(compressor_options, len);</div><div class='del'>-	    if (!cp-&gt;memreq.returned_mem) {</div><div class='del'>-		cp-&gt;memreq.thread_status = ENOSR;</div><div class='del'>-	    } else {</div><div class='del'>-		cp-&gt;memreq.thread_status = 0;</div><div class='del'>-	    }</div><div class='del'>-	} else {</div><div class='del'>-	    cp-&gt;memreq.returned_mem = cp-&gt;rcomp-&gt;decomp_alloc(compressor_options, len);</div><div class='del'>-	    if (!cp-&gt;memreq.returned_mem) {</div><div class='del'>-	        cp-&gt;memreq.thread_status = ENOSR;</div><div class='del'>-	    } else {</div><div class='del'>-		cp-&gt;memreq.thread_status = 0;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* __osf__ */</div><div class='del'>-</div><div class='del'>-/* here's the deal with memory allocation under Digital UNIX.</div><div class='del'>- * Some other may also benefit from this...</div><div class='del'>- * We can't ask for huge chunks of memory in a context where</div><div class='del'>- * the caller can't be put to sleep (like, here.)  The alloc</div><div class='del'>- * is likely to fail.  Instead we do this: the first time we</div><div class='del'>- * get called, kick off a thread to do the allocation.  Return</div><div class='del'>- * immediately to the caller with EAGAIN, as an indication that</div><div class='del'>- * they should send down the ioctl again.  By the time the</div><div class='del'>- * second call comes in it's likely that the memory allocation</div><div class='del'>- * thread will have returned with the requested memory.  We will</div><div class='del'>- * continue to return EAGAIN however until the thread has completed.</div><div class='del'>- * When it has, we return zero (and the memory) if the allocator</div><div class='del'>- * was successful and ENOSR otherwise.</div><div class='del'>- *</div><div class='del'>- * Callers of the RCOMP and XCOMP ioctls are encouraged (but not</div><div class='del'>- * required) to loop for some number of iterations with a small</div><div class='del'>- * delay in the loop body (for instance a 1/10-th second "sleep"</div><div class='del'>- * via select.)</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ppp_comp_wput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-    int error, len, n;</div><div class='del'>-    int flags, mask;</div><div class='del'>-    mblk_t *np;</div><div class='del'>-    struct compressor **comp;</div><div class='del'>-    struct ppp_stats *psp;</div><div class='del'>-    struct ppp_comp_stats *csp;</div><div class='del'>-    unsigned char *opt_data;</div><div class='del'>-    int nxslots, nrslots;</div><div class='del'>-</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (cp == 0) {</div><div class='del'>-	DPRINT("cp == 0 in ppp_comp_wput\n");</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-</div><div class='del'>-    case M_DATA:</div><div class='del'>-	putq(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCTL:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	error = EINVAL;</div><div class='del'>-	switch (iop-&gt;ioc_cmd) {</div><div class='del'>-</div><div class='del'>-	case PPPIO_CFLAGS:</div><div class='del'>-	    /* set/get CCP state */</div><div class='del'>-	    if (iop-&gt;ioc_count != 2 * sizeof(int))</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ppp_comp_wput/%d: PPPIO_CFLAGS b_cont = 0!\n", cp-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    flags = ((int *) mp-&gt;b_cont-&gt;b_rptr)[0];</div><div class='del'>-	    mask = ((int *) mp-&gt;b_cont-&gt;b_rptr)[1];</div><div class='del'>-	    cp-&gt;flags = (cp-&gt;flags &amp; ~mask) | (flags &amp; mask);</div><div class='del'>-	    if ((mask &amp; CCP_ISOPEN) &amp;&amp; (flags &amp; CCP_ISOPEN) == 0) {</div><div class='del'>-		if (cp-&gt;xstate != NULL) {</div><div class='del'>-		    (*cp-&gt;xcomp-&gt;comp_free)(cp-&gt;xstate);</div><div class='del'>-		    cp-&gt;xstate = NULL;</div><div class='del'>-		}</div><div class='del'>-		if (cp-&gt;rstate != NULL) {</div><div class='del'>-		    (*cp-&gt;rcomp-&gt;decomp_free)(cp-&gt;rstate);</div><div class='del'>-		    cp-&gt;rstate = NULL;</div><div class='del'>-		}</div><div class='del'>-		cp-&gt;flags &amp;= ~CCP_ISUP;</div><div class='del'>-	    }</div><div class='del'>-	    error = 0;</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(int);</div><div class='del'>-	    ((int *) mp-&gt;b_cont-&gt;b_rptr)[0] = cp-&gt;flags;</div><div class='del'>-	    mp-&gt;b_cont-&gt;b_wptr = mp-&gt;b_cont-&gt;b_rptr + sizeof(int);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_VJINIT:</div><div class='del'>-	    /*</div><div class='del'>-	     * Initialize VJ compressor/decompressor</div><div class='del'>-	     */</div><div class='del'>-	    if (iop-&gt;ioc_count != 2)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ppp_comp_wput/%d: PPPIO_VJINIT b_cont = 0!\n", cp-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    nxslots = mp-&gt;b_cont-&gt;b_rptr[0] + 1;</div><div class='del'>-	    nrslots = mp-&gt;b_cont-&gt;b_rptr[1] + 1;</div><div class='del'>-	    if (nxslots &gt; MAX_STATES || nrslots &gt; MAX_STATES)</div><div class='del'>-		break;</div><div class='del'>-	    vj_compress_init(&amp;cp-&gt;vj_comp, nxslots);</div><div class='del'>-	    cp-&gt;vj_last_ierrors = cp-&gt;stats.ppp_ierrors;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_XCOMP:</div><div class='del'>-	case PPPIO_RCOMP:</div><div class='del'>-	    if (iop-&gt;ioc_count &lt;= 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ppp_comp_wput/%d: PPPIO_[XR]COMP b_cont = 0!\n", cp-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    opt_data = mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    len = mp-&gt;b_cont-&gt;b_wptr - opt_data;</div><div class='del'>-	    if (len &gt; iop-&gt;ioc_count)</div><div class='del'>-		len = iop-&gt;ioc_count;</div><div class='del'>-	    if (opt_data[1] &lt; 2 || opt_data[1] &gt; len)</div><div class='del'>-		break;</div><div class='del'>-	    for (comp = ppp_compressors; *comp != NULL; ++comp)</div><div class='del'>-		if ((*comp)-&gt;compress_proto == opt_data[0]) {</div><div class='del'>-		    /* here's the handler! */</div><div class='del'>-		    error = 0;</div><div class='del'>-#ifndef __osf__</div><div class='del'>-		    if (iop-&gt;ioc_cmd == PPPIO_XCOMP) {</div><div class='del'>-			/* A previous call may have fetched memory for a compressor</div><div class='del'>-			 * that's now being retired or reset.  Free it using it's</div><div class='del'>-			 * mechanism for freeing stuff.</div><div class='del'>-			 */</div><div class='del'>-			if (cp-&gt;xstate != NULL) {</div><div class='del'>-			    (*cp-&gt;xcomp-&gt;comp_free)(cp-&gt;xstate);</div><div class='del'>-			    cp-&gt;xstate = NULL;</div><div class='del'>-			}</div><div class='del'>-			cp-&gt;xcomp = *comp;</div><div class='del'>-			cp-&gt;xstate = (*comp)-&gt;comp_alloc(opt_data, len);</div><div class='del'>-			if (cp-&gt;xstate == NULL)</div><div class='del'>-			    error = ENOSR;</div><div class='del'>-		    } else {</div><div class='del'>-			if (cp-&gt;rstate != NULL) {</div><div class='del'>-			    (*cp-&gt;rcomp-&gt;decomp_free)(cp-&gt;rstate);</div><div class='del'>-			    cp-&gt;rstate = NULL;</div><div class='del'>-			}</div><div class='del'>-			cp-&gt;rcomp = *comp;</div><div class='del'>-			cp-&gt;rstate = (*comp)-&gt;decomp_alloc(opt_data, len);</div><div class='del'>-			if (cp-&gt;rstate == NULL)</div><div class='del'>-			    error = ENOSR;</div><div class='del'>-		    }</div><div class='del'>-#else</div><div class='del'>-		    if ((error = cp-&gt;memreq.thread_status) != EAGAIN)</div><div class='del'>-		    if (iop-&gt;ioc_cmd == PPPIO_XCOMP) {</div><div class='del'>-			if (cp-&gt;xstate) {</div><div class='del'>-			    (*cp-&gt;xcomp-&gt;comp_free)(cp-&gt;xstate);</div><div class='del'>-			    cp-&gt;xstate = 0;</div><div class='del'>-			}</div><div class='del'>-			/* sanity check for compressor options</div><div class='del'>-			 */</div><div class='del'>-			if (sizeof (cp-&gt;memreq.comp_opts) &lt; len) {</div><div class='del'>-			    printf("can't handle options for compressor %d (%d)\n", opt_data[0],</div><div class='del'>-				opt_data[1]);</div><div class='del'>-			    cp-&gt;memreq.thread_status = ENOSR;</div><div class='del'>-			    cp-&gt;memreq.returned_mem = 0;</div><div class='del'>-			}</div><div class='del'>-			/* fill in request for the thread and kick it off</div><div class='del'>-			 */</div><div class='del'>-			if (cp-&gt;memreq.thread_status == 0 &amp;&amp; !cp-&gt;memreq.returned_mem) {</div><div class='del'>-			    bcopy(opt_data, cp-&gt;memreq.comp_opts, len);</div><div class='del'>-			    cp-&gt;memreq.cmd = PPPIO_XCOMP;</div><div class='del'>-			    cp-&gt;xcomp = *comp;</div><div class='del'>-			    error = cp-&gt;memreq.thread_status = EAGAIN;</div><div class='del'>-			    thread_wakeup((vm_offset_t)&amp;cp-&gt;memreq.thread_status);</div><div class='del'>-			} else {</div><div class='del'>-			    cp-&gt;xstate = cp-&gt;memreq.returned_mem;</div><div class='del'>-			    cp-&gt;memreq.returned_mem = 0;</div><div class='del'>-			    cp-&gt;memreq.thread_status = 0;</div><div class='del'>-			}</div><div class='del'>-		    } else {</div><div class='del'>-			if (cp-&gt;rstate) {</div><div class='del'>-			    (*cp-&gt;rcomp-&gt;decomp_free)(cp-&gt;rstate);</div><div class='del'>-			    cp-&gt;rstate = NULL;</div><div class='del'>-			}</div><div class='del'>-			if (sizeof (cp-&gt;memreq.comp_opts) &lt; len) {</div><div class='del'>-			    printf("can't handle options for compressor %d (%d)\n", opt_data[0],</div><div class='del'>-				opt_data[1]);</div><div class='del'>-			    cp-&gt;memreq.thread_status = ENOSR;</div><div class='del'>-			    cp-&gt;memreq.returned_mem = 0;</div><div class='del'>-			}</div><div class='del'>-			if (cp-&gt;memreq.thread_status == 0 &amp;&amp; !cp-&gt;memreq.returned_mem) {</div><div class='del'>-			    bcopy(opt_data, cp-&gt;memreq.comp_opts, len);</div><div class='del'>-			    cp-&gt;memreq.cmd = PPPIO_RCOMP;</div><div class='del'>-			    cp-&gt;rcomp = *comp;</div><div class='del'>-			    error = cp-&gt;memreq.thread_status = EAGAIN;</div><div class='del'>-			    thread_wakeup((vm_offset_t)&amp;cp-&gt;memreq.thread_status);</div><div class='del'>-			} else {</div><div class='del'>-			    cp-&gt;rstate = cp-&gt;memreq.returned_mem;</div><div class='del'>-			    cp-&gt;memreq.returned_mem = 0;</div><div class='del'>-			    cp-&gt;memreq.thread_status = 0;</div><div class='del'>-			}</div><div class='del'>-		    }</div><div class='del'>-#endif</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_GETSTAT:</div><div class='del'>-	    if ((cp-&gt;flags &amp; LAST_MOD) == 0) {</div><div class='del'>-		error = -1;	/* let the ppp_ahdl module handle it */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    np = allocb(sizeof(struct ppp_stats), BPRI_HI);</div><div class='del'>-	    if (np == 0) {</div><div class='del'>-		error = ENOSR;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont != 0)</div><div class='del'>-		freemsg(mp-&gt;b_cont);</div><div class='del'>-	    mp-&gt;b_cont = np;</div><div class='del'>-	    psp = (struct ppp_stats *) np-&gt;b_wptr;</div><div class='del'>-	    np-&gt;b_wptr += sizeof(struct ppp_stats);</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(struct ppp_stats);</div><div class='del'>-	    psp-&gt;p = cp-&gt;stats;</div><div class='del'>-	    psp-&gt;vj = cp-&gt;vj_comp.stats;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_GETCSTAT:</div><div class='del'>-	    np = allocb(sizeof(struct ppp_comp_stats), BPRI_HI);</div><div class='del'>-	    if (np == 0) {</div><div class='del'>-		error = ENOSR;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (mp-&gt;b_cont != 0)</div><div class='del'>-		freemsg(mp-&gt;b_cont);</div><div class='del'>-	    mp-&gt;b_cont = np;</div><div class='del'>-	    csp = (struct ppp_comp_stats *) np-&gt;b_wptr;</div><div class='del'>-	    np-&gt;b_wptr += sizeof(struct ppp_comp_stats);</div><div class='del'>-	    iop-&gt;ioc_count = sizeof(struct ppp_comp_stats);</div><div class='del'>-	    bzero((caddr_t)csp, sizeof(struct ppp_comp_stats));</div><div class='del'>-	    if (cp-&gt;xstate != 0)</div><div class='del'>-		(*cp-&gt;xcomp-&gt;comp_stat)(cp-&gt;xstate, &amp;csp-&gt;c);</div><div class='del'>-	    if (cp-&gt;rstate != 0)</div><div class='del'>-		(*cp-&gt;rcomp-&gt;decomp_stat)(cp-&gt;rstate, &amp;csp-&gt;d);</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_DEBUG:</div><div class='del'>-	    if (iop-&gt;ioc_count != sizeof(int))</div><div class='del'>-		break;</div><div class='del'>-	    if (mp-&gt;b_cont == 0) {</div><div class='del'>-		DPRINT1("ppp_comp_wput/%d: PPPIO_DEBUG b_cont = 0!\n", cp-&gt;unit);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    n = *(int *)mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    if (n == PPPDBG_LOG + PPPDBG_COMP) {</div><div class='del'>-		DPRINT1("ppp_comp%d: debug log enabled\n", cp-&gt;unit);</div><div class='del'>-		cp-&gt;flags |= DBGLOG;</div><div class='del'>-		error = 0;</div><div class='del'>-		iop-&gt;ioc_count = 0;</div><div class='del'>-	    } else {</div><div class='del'>-		error = -1;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case PPPIO_LASTMOD:</div><div class='del'>-	    cp-&gt;flags |= LAST_MOD;</div><div class='del'>-	    error = 0;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    error = -1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (error &lt; 0)</div><div class='del'>-	    putnext(q, mp);</div><div class='del'>-	else if (error == 0) {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCACK;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	} else {</div><div class='del'>-	    mp-&gt;b_datap-&gt;db_type = M_IOCNAK;</div><div class='del'>-	    iop-&gt;ioc_error = error;</div><div class='del'>-	    iop-&gt;ioc_count = 0;</div><div class='del'>-	    qreply(q, mp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_CTL:</div><div class='del'>-	switch (*mp-&gt;b_rptr) {</div><div class='del'>-	case PPPCTL_MTU:</div><div class='del'>-	    cp-&gt;mtu = ((unsigned short *)mp-&gt;b_rptr)[1];</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_MRU:</div><div class='del'>-	    cp-&gt;mru = ((unsigned short *)mp-&gt;b_rptr)[1];</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_UNIT:</div><div class='del'>-	    cp-&gt;unit = mp-&gt;b_rptr[1];</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppp_comp_wsrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    mblk_t *mp, *cmp = NULL;</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-    int len, proto, type, hlen, code;</div><div class='del'>-    struct ip *ip;</div><div class='del'>-    unsigned char *vjhdr, *dp;</div><div class='del'>-</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (cp == 0) {</div><div class='del'>-	DPRINT("cp == 0 in ppp_comp_wsrv\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    while ((mp = getq(q)) != 0) {</div><div class='del'>-	/* assert(mp-&gt;b_datap-&gt;db_type == M_DATA) */</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-        if (!bcanputnext(q,mp-&gt;b_band))</div><div class='del'>-#else</div><div class='del'>-        if (!canputnext(q))</div><div class='del'>-#endif PRIOQ</div><div class='del'>-	{</div><div class='del'>-	    putbq(q, mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * First check the packet length and work out what the protocol is.</div><div class='del'>-	 */</div><div class='del'>-	len = msgdsize(mp);</div><div class='del'>-	if (len &lt; PPP_HDRLEN) {</div><div class='del'>-	    DPRINT1("ppp_comp_wsrv: bogus short packet (%d)\n", len);</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	    cp-&gt;stats.ppp_oerrors++;</div><div class='del'>-	    putctl1(RD(q)-&gt;q_next, M_CTL, PPPCTL_OERROR);</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	proto = (MSG_BYTE(mp, 2) &lt;&lt; 8) + MSG_BYTE(mp, 3);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Make sure we've got enough data in the first mblk</div><div class='del'>-	 * and that we are its only user.</div><div class='del'>-	 */</div><div class='del'>-	if (proto == PPP_CCP)</div><div class='del'>-	    hlen = len;</div><div class='del'>-	else if (proto == PPP_IP)</div><div class='del'>-	    hlen = PPP_HDRLEN + MAX_IPHDR;</div><div class='del'>-	else</div><div class='del'>-	    hlen = PPP_HDRLEN;</div><div class='del'>-	if (hlen &gt; len)</div><div class='del'>-	    hlen = len;</div><div class='del'>-	if (mp-&gt;b_wptr &lt; mp-&gt;b_rptr + hlen || mp-&gt;b_datap-&gt;db_ref &gt; 1) {</div><div class='del'>-	    PULLUP(mp, hlen);</div><div class='del'>-	    if (mp == 0) {</div><div class='del'>-		DPRINT1("ppp_comp_wsrv: pullup failed (%d)\n", hlen);</div><div class='del'>-		cp-&gt;stats.ppp_oerrors++;</div><div class='del'>-		putctl1(RD(q)-&gt;q_next, M_CTL, PPPCTL_OERROR);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Do VJ compression if requested.</div><div class='del'>-	 */</div><div class='del'>-	if (proto == PPP_IP &amp;&amp; (cp-&gt;flags &amp; COMP_VJC)) {</div><div class='del'>-	    ip = (struct ip *) (mp-&gt;b_rptr + PPP_HDRLEN);</div><div class='del'>-	    if (ip-&gt;ip_p == IPPROTO_TCP) {</div><div class='del'>-		type = vj_compress_tcp(ip, len - PPP_HDRLEN, &amp;cp-&gt;vj_comp,</div><div class='del'>-				       (cp-&gt;flags &amp; COMP_VJCCID), &amp;vjhdr);</div><div class='del'>-		switch (type) {</div><div class='del'>-		case TYPE_UNCOMPRESSED_TCP:</div><div class='del'>-		    mp-&gt;b_rptr[3] = proto = PPP_VJC_UNCOMP;</div><div class='del'>-		    break;</div><div class='del'>-		case TYPE_COMPRESSED_TCP:</div><div class='del'>-		    dp = vjhdr - PPP_HDRLEN;</div><div class='del'>-		    dp[1] = mp-&gt;b_rptr[1]; /* copy control field */</div><div class='del'>-		    dp[0] = mp-&gt;b_rptr[0]; /* copy address field */</div><div class='del'>-		    dp[2] = 0;		   /* set protocol field */</div><div class='del'>-		    dp[3] = proto = PPP_VJC_COMP;</div><div class='del'>-		    mp-&gt;b_rptr = dp;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Do packet compression if enabled.</div><div class='del'>-	 */</div><div class='del'>-	if (proto == PPP_CCP)</div><div class='del'>-	    ppp_comp_ccp(q, mp, 0);</div><div class='del'>-	else if (proto != PPP_LCP &amp;&amp; (cp-&gt;flags &amp; CCP_COMP_RUN)</div><div class='del'>-		 &amp;&amp; cp-&gt;xstate != NULL) {</div><div class='del'>-	    len = msgdsize(mp);</div><div class='del'>-	    (*cp-&gt;xcomp-&gt;compress)(cp-&gt;xstate, &amp;cmp, mp, len,</div><div class='del'>-			(cp-&gt;flags &amp; CCP_ISUP? cp-&gt;mtu + PPP_HDRLEN: 0));</div><div class='del'>-	    if (cmp != NULL) {</div><div class='del'>-#ifdef PRIOQ</div><div class='del'>-		cmp-&gt;b_band=mp-&gt;b_band;</div><div class='del'>-#endif PRIOQ</div><div class='del'>-		freemsg(mp);</div><div class='del'>-		mp = cmp;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Do address/control and protocol compression if enabled.</div><div class='del'>-	 */</div><div class='del'>-	if ((cp-&gt;flags &amp; COMP_AC)</div><div class='del'>-	    &amp;&amp; !(proto == PPP_LCP &amp;&amp; LCP_USE_DFLT(mp))) {</div><div class='del'>-	    mp-&gt;b_rptr += 2;	/* drop the address &amp; ctrl fields */</div><div class='del'>-	    if (proto &lt; 0x100 &amp;&amp; (cp-&gt;flags &amp; COMP_PROT))</div><div class='del'>-		++mp-&gt;b_rptr;	/* drop the high protocol byte */</div><div class='del'>-	} else if (proto &lt; 0x100 &amp;&amp; (cp-&gt;flags &amp; COMP_PROT)) {</div><div class='del'>-	    /* shuffle up the address &amp; ctrl fields */</div><div class='del'>-	    mp-&gt;b_rptr[2] = mp-&gt;b_rptr[1];</div><div class='del'>-	    mp-&gt;b_rptr[1] = mp-&gt;b_rptr[0];</div><div class='del'>-	    ++mp-&gt;b_rptr;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	cp-&gt;stats.ppp_opackets++;</div><div class='del'>-	cp-&gt;stats.ppp_obytes += msgdsize(mp);</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppp_comp_rput(q, mp)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-    struct iocblk *iop;</div><div class='del'>-    struct ppp_stats *psp;</div><div class='del'>-</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (cp == 0) {</div><div class='del'>-	DPRINT("cp == 0 in ppp_comp_rput\n");</div><div class='del'>-	freemsg(mp);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (mp-&gt;b_datap-&gt;db_type) {</div><div class='del'>-</div><div class='del'>-    case M_DATA:</div><div class='del'>-	putq(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_IOCACK:</div><div class='del'>-	iop = (struct iocblk *) mp-&gt;b_rptr;</div><div class='del'>-	switch (iop-&gt;ioc_cmd) {</div><div class='del'>-	case PPPIO_GETSTAT:</div><div class='del'>-	    /*</div><div class='del'>-	     * Catch this on the way back from the ppp_ahdl module</div><div class='del'>-	     * so we can fill in the VJ stats.</div><div class='del'>-	     */</div><div class='del'>-	    if (mp-&gt;b_cont == 0 || iop-&gt;ioc_count != sizeof(struct ppp_stats))</div><div class='del'>-		break;</div><div class='del'>-	    psp = (struct ppp_stats *) mp-&gt;b_cont-&gt;b_rptr;</div><div class='del'>-	    psp-&gt;vj = cp-&gt;vj_comp.stats;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case M_CTL:</div><div class='del'>-	switch (mp-&gt;b_rptr[0]) {</div><div class='del'>-	case PPPCTL_IERROR:</div><div class='del'>-	    ++cp-&gt;stats.ppp_ierrors;</div><div class='del'>-	    break;</div><div class='del'>-	case PPPCTL_OERROR:</div><div class='del'>-	    ++cp-&gt;stats.ppp_oerrors;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppp_comp_rsrv(q)</div><div class='del'>-    queue_t *q;</div><div class='del'>-{</div><div class='del'>-    int proto, rv, i;</div><div class='del'>-    mblk_t *mp, *dmp = NULL, *np;</div><div class='del'>-    uchar_t *dp, *iphdr;</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-    int len, hlen, vjlen;</div><div class='del'>-    u_int iphlen;</div><div class='del'>-</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    if (cp == 0) {</div><div class='del'>-	DPRINT("cp == 0 in ppp_comp_rsrv\n");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    while ((mp = getq(q)) != 0) {</div><div class='del'>-	/* assert(mp-&gt;b_datap-&gt;db_type == M_DATA) */</div><div class='del'>-	if (!canputnext(q)) {</div><div class='del'>-	    putbq(q, mp);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	len = msgdsize(mp);</div><div class='del'>-	cp-&gt;stats.ppp_ibytes += len;</div><div class='del'>-	cp-&gt;stats.ppp_ipackets++;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * First work out the protocol and where the PPP header ends.</div><div class='del'>-	 */</div><div class='del'>-	i = 0;</div><div class='del'>-	proto = MSG_BYTE(mp, 0);</div><div class='del'>-	if (proto == PPP_ALLSTATIONS) {</div><div class='del'>-	    i = 2;</div><div class='del'>-	    proto = MSG_BYTE(mp, 2);</div><div class='del'>-	}</div><div class='del'>-	if ((proto &amp; 1) == 0) {</div><div class='del'>-	    ++i;</div><div class='del'>-	    proto = (proto &lt;&lt; 8) + MSG_BYTE(mp, i);</div><div class='del'>-	}</div><div class='del'>-	hlen = i + 1;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Now reconstruct a complete, contiguous PPP header at the</div><div class='del'>-	 * start of the packet.</div><div class='del'>-	 */</div><div class='del'>-	if (hlen &lt; ((cp-&gt;flags &amp; DECOMP_AC)? 0: 2)</div><div class='del'>-	           + ((cp-&gt;flags &amp; DECOMP_PROT)? 1: 2)) {</div><div class='del'>-	    /* count these? */</div><div class='del'>-	    goto bad;</div><div class='del'>-	}</div><div class='del'>-	if (mp-&gt;b_rptr + hlen &gt; mp-&gt;b_wptr) {</div><div class='del'>-	    adjmsg(mp, hlen);	/* XXX check this call */</div><div class='del'>-	    hlen = 0;</div><div class='del'>-	}</div><div class='del'>-	if (hlen != PPP_HDRLEN) {</div><div class='del'>-	    /*</div><div class='del'>-	     * We need to put some bytes on the front of the packet</div><div class='del'>-	     * to make a full-length PPP header.</div><div class='del'>-	     * If we can put them in *mp, we do, otherwise we</div><div class='del'>-	     * tack another mblk on the front.</div><div class='del'>-	     * XXX we really shouldn't need to carry around</div><div class='del'>-	     * the address and control at this stage.</div><div class='del'>-	     */</div><div class='del'>-	    dp = mp-&gt;b_rptr + hlen - PPP_HDRLEN;</div><div class='del'>-	    if (dp &lt; mp-&gt;b_datap-&gt;db_base || mp-&gt;b_datap-&gt;db_ref &gt; 1) {</div><div class='del'>-		np = allocb(PPP_HDRLEN, BPRI_MED);</div><div class='del'>-		if (np == 0)</div><div class='del'>-		    goto bad;</div><div class='del'>-		np-&gt;b_cont = mp;</div><div class='del'>-		mp-&gt;b_rptr += hlen;</div><div class='del'>-		mp = np;</div><div class='del'>-		dp = mp-&gt;b_wptr;</div><div class='del'>-		mp-&gt;b_wptr += PPP_HDRLEN;</div><div class='del'>-	    } else</div><div class='del'>-		mp-&gt;b_rptr = dp;</div><div class='del'>-</div><div class='del'>-	    dp[0] = PPP_ALLSTATIONS;</div><div class='del'>-	    dp[1] = PPP_UI;</div><div class='del'>-	    dp[2] = proto &gt;&gt; 8;</div><div class='del'>-	    dp[3] = proto;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Now see if we have a compressed packet to decompress,</div><div class='del'>-	 * or a CCP packet to take notice of.</div><div class='del'>-	 */</div><div class='del'>-	proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-	if (proto == PPP_CCP) {</div><div class='del'>-	    len = msgdsize(mp);</div><div class='del'>-	    if (mp-&gt;b_wptr &lt; mp-&gt;b_rptr + len) {</div><div class='del'>-		PULLUP(mp, len);</div><div class='del'>-		if (mp == 0)</div><div class='del'>-		    goto bad;</div><div class='del'>-	    }</div><div class='del'>-	    ppp_comp_ccp(q, mp, 1);</div><div class='del'>-	} else if (proto == PPP_COMP) {</div><div class='del'>-	    if ((cp-&gt;flags &amp; CCP_ISUP)</div><div class='del'>-		&amp;&amp; (cp-&gt;flags &amp; CCP_DECOMP_RUN) &amp;&amp; cp-&gt;rstate</div><div class='del'>-		&amp;&amp; (cp-&gt;flags &amp; CCP_ERR) == 0) {</div><div class='del'>-		rv = (*cp-&gt;rcomp-&gt;decompress)(cp-&gt;rstate, mp, &amp;dmp);</div><div class='del'>-		switch (rv) {</div><div class='del'>-		case DECOMP_OK:</div><div class='del'>-		    freemsg(mp);</div><div class='del'>-		    mp = dmp;</div><div class='del'>-		    if (mp == NULL) {</div><div class='del'>-			/* no error, but no packet returned either. */</div><div class='del'>-			continue;</div><div class='del'>-		    }</div><div class='del'>-		    break;</div><div class='del'>-		case DECOMP_ERROR:</div><div class='del'>-		    cp-&gt;flags |= CCP_ERROR;</div><div class='del'>-		    ++cp-&gt;stats.ppp_ierrors;</div><div class='del'>-		    putctl1(q-&gt;q_next, M_CTL, PPPCTL_IERROR);</div><div class='del'>-		    break;</div><div class='del'>-		case DECOMP_FATALERROR:</div><div class='del'>-		    cp-&gt;flags |= CCP_FATALERROR;</div><div class='del'>-		    ++cp-&gt;stats.ppp_ierrors;</div><div class='del'>-		    putctl1(q-&gt;q_next, M_CTL, PPPCTL_IERROR);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	} else if (cp-&gt;rstate &amp;&amp; (cp-&gt;flags &amp; CCP_DECOMP_RUN)) {</div><div class='del'>-	    (*cp-&gt;rcomp-&gt;incomp)(cp-&gt;rstate, mp);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Now do VJ decompression.</div><div class='del'>-	 */</div><div class='del'>-	proto = PPP_PROTOCOL(mp-&gt;b_rptr);</div><div class='del'>-	if (proto == PPP_VJC_COMP || proto == PPP_VJC_UNCOMP) {</div><div class='del'>-	    len = msgdsize(mp) - PPP_HDRLEN;</div><div class='del'>-	    if ((cp-&gt;flags &amp; DECOMP_VJC) == 0 || len &lt;= 0)</div><div class='del'>-		goto bad;</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Advance past the ppp header.</div><div class='del'>-	     * Here we assume that the whole PPP header is in the first mblk.</div><div class='del'>-	     */</div><div class='del'>-	    np = mp;</div><div class='del'>-	    dp = np-&gt;b_rptr + PPP_HDRLEN;</div><div class='del'>-	    if (dp &gt;= mp-&gt;b_wptr) {</div><div class='del'>-		np = np-&gt;b_cont;</div><div class='del'>-		dp = np-&gt;b_rptr;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Make sure we have sufficient contiguous data at this point.</div><div class='del'>-	     */</div><div class='del'>-	    hlen = (proto == PPP_VJC_COMP)? MAX_VJHDR: MAX_IPHDR;</div><div class='del'>-	    if (hlen &gt; len)</div><div class='del'>-		hlen = len;</div><div class='del'>-	    if (np-&gt;b_wptr &lt; dp + hlen || np-&gt;b_datap-&gt;db_ref &gt; 1) {</div><div class='del'>-		PULLUP(mp, hlen + PPP_HDRLEN);</div><div class='del'>-		if (mp == 0)</div><div class='del'>-		    goto bad;</div><div class='del'>-		np = mp;</div><div class='del'>-		dp = np-&gt;b_rptr + PPP_HDRLEN;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (proto == PPP_VJC_COMP) {</div><div class='del'>-		/*</div><div class='del'>-		 * Decompress VJ-compressed packet.</div><div class='del'>-		 * First reset compressor if an input error has occurred.</div><div class='del'>-		 */</div><div class='del'>-		if (cp-&gt;stats.ppp_ierrors != cp-&gt;vj_last_ierrors) {</div><div class='del'>-		    if (cp-&gt;flags &amp; DBGLOG)</div><div class='del'>-			DPRINT1("ppp%d: resetting VJ\n", cp-&gt;unit);</div><div class='del'>-		    vj_uncompress_err(&amp;cp-&gt;vj_comp);</div><div class='del'>-		    cp-&gt;vj_last_ierrors = cp-&gt;stats.ppp_ierrors;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		vjlen = vj_uncompress_tcp(dp, np-&gt;b_wptr - dp, len,</div><div class='del'>-					  &amp;cp-&gt;vj_comp, &amp;iphdr, &amp;iphlen);</div><div class='del'>-		if (vjlen &lt; 0) {</div><div class='del'>-		    if (cp-&gt;flags &amp; DBGLOG)</div><div class='del'>-			DPRINT2("ppp%d: vj_uncomp_tcp failed, pkt len %d\n",</div><div class='del'>-				cp-&gt;unit, len);</div><div class='del'>-		    ++cp-&gt;vj_last_ierrors;  /* so we don't reset next time */</div><div class='del'>-		    goto bad;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/* drop ppp and vj headers off */</div><div class='del'>-		if (mp != np) {</div><div class='del'>-		    freeb(mp);</div><div class='del'>-		    mp = np;</div><div class='del'>-		}</div><div class='del'>-		mp-&gt;b_rptr = dp + vjlen;</div><div class='del'>-</div><div class='del'>-		/* allocate a new mblk for the ppp and ip headers */</div><div class='del'>-		if ((np = allocb(iphlen + PPP_HDRLEN + 4, BPRI_MED)) == 0)</div><div class='del'>-		    goto bad;</div><div class='del'>-		dp = np-&gt;b_rptr;	/* prepend mblk with TCP/IP hdr */</div><div class='del'>-		dp[0] = PPP_ALLSTATIONS; /* reconstruct PPP header */</div><div class='del'>-		dp[1] = PPP_UI;</div><div class='del'>-		dp[2] = PPP_IP &gt;&gt; 8;</div><div class='del'>-		dp[3] = PPP_IP;</div><div class='del'>-		bcopy((caddr_t)iphdr, (caddr_t)dp + PPP_HDRLEN, iphlen);</div><div class='del'>-		np-&gt;b_wptr = dp + iphlen + PPP_HDRLEN;</div><div class='del'>-		np-&gt;b_cont = mp;</div><div class='del'>-</div><div class='del'>-		/* XXX there seems to be a bug which causes panics in strread</div><div class='del'>-		   if we make an mbuf with only the IP header in it :-( */</div><div class='del'>-		if (mp-&gt;b_wptr - mp-&gt;b_rptr &gt; 4) {</div><div class='del'>-		    bcopy((caddr_t)mp-&gt;b_rptr, (caddr_t)np-&gt;b_wptr, 4);</div><div class='del'>-		    mp-&gt;b_rptr += 4;</div><div class='del'>-		    np-&gt;b_wptr += 4;</div><div class='del'>-		} else {</div><div class='del'>-		    bcopy((caddr_t)mp-&gt;b_rptr, (caddr_t)np-&gt;b_wptr,</div><div class='del'>-			  mp-&gt;b_wptr - mp-&gt;b_rptr);</div><div class='del'>-		    np-&gt;b_wptr += mp-&gt;b_wptr - mp-&gt;b_rptr;</div><div class='del'>-		    np-&gt;b_cont = mp-&gt;b_cont;</div><div class='del'>-		    freeb(mp);</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		mp = np;</div><div class='del'>-</div><div class='del'>-	    } else {</div><div class='del'>-		/*</div><div class='del'>-		 * "Decompress" a VJ-uncompressed packet.</div><div class='del'>-		 */</div><div class='del'>-		cp-&gt;vj_last_ierrors = cp-&gt;stats.ppp_ierrors;</div><div class='del'>-		if (!vj_uncompress_uncomp(dp, hlen, &amp;cp-&gt;vj_comp)) {</div><div class='del'>-		    if (cp-&gt;flags &amp; DBGLOG)</div><div class='del'>-			DPRINT2("ppp%d: vj_uncomp_uncomp failed, pkt len %d\n",</div><div class='del'>-				cp-&gt;unit, len);</div><div class='del'>-		    ++cp-&gt;vj_last_ierrors;  /* don't need to reset next time */</div><div class='del'>-		    goto bad;</div><div class='del'>-		}</div><div class='del'>-		mp-&gt;b_rptr[3] = PPP_IP;	/* fix up the PPP protocol field */</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	putnext(q, mp);</div><div class='del'>-	continue;</div><div class='del'>-</div><div class='del'>-    bad:</div><div class='del'>-	if (mp != 0)</div><div class='del'>-	    freemsg(mp);</div><div class='del'>-	cp-&gt;stats.ppp_ierrors++;</div><div class='del'>-	putctl1(q-&gt;q_next, M_CTL, PPPCTL_IERROR);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Handle a CCP packet being sent or received.</div><div class='del'>- * Here all the data in the packet is in a single mbuf.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ppp_comp_ccp(q, mp, rcvd)</div><div class='del'>-    queue_t *q;</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    int rcvd;</div><div class='del'>-{</div><div class='del'>-    int len, clen;</div><div class='del'>-    comp_state_t *cp;</div><div class='del'>-    unsigned char *dp;</div><div class='del'>-</div><div class='del'>-    len = msgdsize(mp);</div><div class='del'>-    if (len &lt; PPP_HDRLEN + CCP_HDRLEN)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    cp = (comp_state_t *) q-&gt;q_ptr;</div><div class='del'>-    dp = mp-&gt;b_rptr + PPP_HDRLEN;</div><div class='del'>-    len -= PPP_HDRLEN;</div><div class='del'>-    clen = CCP_LENGTH(dp);</div><div class='del'>-    if (clen &gt; len)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    switch (CCP_CODE(dp)) {</div><div class='del'>-    case CCP_CONFREQ:</div><div class='del'>-    case CCP_TERMREQ:</div><div class='del'>-    case CCP_TERMACK:</div><div class='del'>-	cp-&gt;flags &amp;= ~CCP_ISUP;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CCP_CONFACK:</div><div class='del'>-	if ((cp-&gt;flags &amp; (CCP_ISOPEN | CCP_ISUP)) == CCP_ISOPEN</div><div class='del'>-	    &amp;&amp; clen &gt;= CCP_HDRLEN + CCP_OPT_MINLEN</div><div class='del'>-	    &amp;&amp; clen &gt;= CCP_HDRLEN + CCP_OPT_LENGTH(dp + CCP_HDRLEN)) {</div><div class='del'>-	    if (!rcvd) {</div><div class='del'>-		if (cp-&gt;xstate != NULL</div><div class='del'>-		    &amp;&amp; (*cp-&gt;xcomp-&gt;comp_init)</div><div class='del'>-		        (cp-&gt;xstate, dp + CCP_HDRLEN, clen - CCP_HDRLEN,</div><div class='del'>-			 cp-&gt;unit, 0, ((cp-&gt;flags &amp; DBGLOG) != 0)))</div><div class='del'>-		    cp-&gt;flags |= CCP_COMP_RUN;</div><div class='del'>-	    } else {</div><div class='del'>-		if (cp-&gt;rstate != NULL</div><div class='del'>-		    &amp;&amp; (*cp-&gt;rcomp-&gt;decomp_init)</div><div class='del'>-		        (cp-&gt;rstate, dp + CCP_HDRLEN, clen - CCP_HDRLEN,</div><div class='del'>-			 cp-&gt;unit, 0, cp-&gt;mru, ((cp-&gt;flags &amp; DBGLOG) != 0)))</div><div class='del'>-		    cp-&gt;flags = (cp-&gt;flags &amp; ~CCP_ERR) | CCP_DECOMP_RUN;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CCP_RESETACK:</div><div class='del'>-	if (cp-&gt;flags &amp; CCP_ISUP) {</div><div class='del'>-	    if (!rcvd) {</div><div class='del'>-		if (cp-&gt;xstate &amp;&amp; (cp-&gt;flags &amp; CCP_COMP_RUN))</div><div class='del'>-		    (*cp-&gt;xcomp-&gt;comp_reset)(cp-&gt;xstate);</div><div class='del'>-	    } else {</div><div class='del'>-		if (cp-&gt;rstate &amp;&amp; (cp-&gt;flags &amp; CCP_DECOMP_RUN)) {</div><div class='del'>-		    (*cp-&gt;rcomp-&gt;decomp_reset)(cp-&gt;rstate);</div><div class='del'>-		    cp-&gt;flags &amp;= ~CCP_ERROR;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-dump_msg(mp)</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-{</div><div class='del'>-    dblk_t *db;</div><div class='del'>-</div><div class='del'>-    while (mp != 0) {</div><div class='del'>-	db = mp-&gt;b_datap;</div><div class='del'>-	DPRINT2("mp=%x cont=%x ", mp, mp-&gt;b_cont);</div><div class='del'>-	DPRINT3("rptr=%x wptr=%x datap=%x\n", mp-&gt;b_rptr, mp-&gt;b_wptr, db);</div><div class='del'>-	DPRINT2("  base=%x lim=%x", db-&gt;db_base, db-&gt;db_lim);</div><div class='del'>-	DPRINT2(" ref=%d type=%d\n", db-&gt;db_ref, db-&gt;db_type);</div><div class='del'>-	mp = mp-&gt;b_cont;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-msg_byte(mp, i)</div><div class='del'>-    mblk_t *mp;</div><div class='del'>-    unsigned int i;</div><div class='del'>-{</div><div class='del'>-    while (mp != 0 &amp;&amp; i &gt;= mp-&gt;b_wptr - mp-&gt;b_rptr)</div><div class='del'>-	mp = mp-&gt;b_cont;</div><div class='del'>-    if (mp == 0)</div><div class='del'>-	return -1;</div><div class='del'>-    return mp-&gt;b_rptr[i];</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/ppp_mod.h b/mdk-stage1/ppp/modules/ppp_mod.h<br/>deleted file mode 100644<br/>index f0af00886..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/ppp_mod.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/ppp_mod.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,190 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Miscellaneous definitions for PPP STREAMS modules.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Macros for allocating and freeing kernel memory.</div><div class='del'>- */</div><div class='del'>-#ifdef SVR4			/* SVR4, including Solaris 2 */</div><div class='del'>-#include &lt;sys/kmem.h&gt;</div><div class='del'>-#define ALLOC_SLEEP(n)		kmem_alloc((n), KM_SLEEP)</div><div class='del'>-#define ALLOC_NOSLEEP(n)	kmem_alloc((n), KM_NOSLEEP)</div><div class='del'>-#define FREE(p, n)		kmem_free((p), (n))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef SUNOS4</div><div class='del'>-#include &lt;sys/kmem_alloc.h&gt;	/* SunOS 4.x */</div><div class='del'>-#define ALLOC_SLEEP(n)		kmem_alloc((n), KMEM_SLEEP)</div><div class='del'>-#define ALLOC_NOSLEEP(n)	kmem_alloc((n), KMEM_NOSLEEP)</div><div class='del'>-#define FREE(p, n)		kmem_free((p), (n))</div><div class='del'>-#define NOTSUSER()		(suser()? 0: EPERM)</div><div class='del'>-#define bcanputnext(q, band)	canputnext((q))</div><div class='del'>-#endif /* SunOS 4 */</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;sys/malloc.h&gt;</div><div class='del'>-</div><div class='del'>-/* caution: this mirrors macros in sys/malloc.h, and uses interfaces</div><div class='del'>- * which are subject to change.</div><div class='del'>- * The problems are that:</div><div class='del'>- *     - the official MALLOC macro wants the lhs of the assignment as an argument,</div><div class='del'>- *	 and it takes care of the assignment itself (yuck.)</div><div class='del'>- *     - PPP insists on using "FREE" which conflicts with a macro of the same name.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-#ifdef BUCKETINDX /* V2.0 */</div><div class='del'>-#define ALLOC_SLEEP(n)		(void *)malloc((u_long)(n), BUCKETP(n), M_DEVBUF, M_WAITOK)</div><div class='del'>-#define ALLOC_NOSLEEP(n)	(void *)malloc((u_long)(n), BUCKETP(n), M_DEVBUF, M_NOWAIT)</div><div class='del'>-#else</div><div class='del'>-#define ALLOC_SLEEP(n)		(void *)malloc((u_long)(n), BUCKETINDEX(n), M_DEVBUF, M_WAITOK)</div><div class='del'>-#define ALLOC_NOSLEEP(n)	(void *)malloc((u_long)(n), BUCKETINDEX(n), M_DEVBUF, M_NOWAIT)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define bcanputnext(q, band)	canputnext((q))</div><div class='del'>-</div><div class='del'>-#ifdef FREE</div><div class='del'>-#undef FREE</div><div class='del'>-#endif</div><div class='del'>-#define FREE(p, n)		free((void *)(p), M_DEVBUF)</div><div class='del'>-</div><div class='del'>-#define NO_DLPI 1</div><div class='del'>-</div><div class='del'>-#ifndef IFT_PPP</div><div class='del'>-#define IFT_PPP 0x17</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;sys/proc.h&gt;</div><div class='del'>-#define NOTSUSER()		(suser(u.u_procp-&gt;p_rcred, &amp;u.u_acflag) ? EPERM : 0)</div><div class='del'>-</div><div class='del'>-/* #include "ppp_osf.h" */</div><div class='del'>-</div><div class='del'>-#endif /* __osf__ */</div><div class='del'>-</div><div class='del'>-#ifdef AIX4</div><div class='del'>-#define ALLOC_SLEEP(n)		xmalloc((n), 0, pinned_heap)	/* AIX V4.x */</div><div class='del'>-#define ALLOC_NOSLEEP(n)	xmalloc((n), 0, pinned_heap)	/* AIX V4.x */</div><div class='del'>-#define FREE(p, n)		xmfree((p), pinned_heap)</div><div class='del'>-#define NOTSUSER()		(suser()? 0: EPERM)</div><div class='del'>-#endif /* AIX */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Macros for printing debugging stuff.</div><div class='del'>- */</div><div class='del'>-#ifdef DEBUG</div><div class='del'>-#if defined(SVR4) || defined(__osf__)</div><div class='del'>-#if defined(SNI)</div><div class='del'>-#include &lt;sys/strlog.h&gt;</div><div class='del'>-#define STRLOG_ID		4712</div><div class='del'>-#define DPRINT(f)		strlog(STRLOG_ID, 0, 0, SL_TRACE, f)</div><div class='del'>-#define DPRINT1(f, a1)		strlog(STRLOG_ID, 0, 0, SL_TRACE, f, a1)</div><div class='del'>-#define DPRINT2(f, a1, a2)	strlog(STRLOG_ID, 0, 0, SL_TRACE, f, a1, a2)</div><div class='del'>-#define DPRINT3(f, a1, a2, a3)	strlog(STRLOG_ID, 0, 0, SL_TRACE, f, a1, a2, a3)</div><div class='del'>-#else</div><div class='del'>-#define DPRINT(f)		cmn_err(CE_CONT, f)</div><div class='del'>-#define DPRINT1(f, a1)		cmn_err(CE_CONT, f, a1)</div><div class='del'>-#define DPRINT2(f, a1, a2)	cmn_err(CE_CONT, f, a1, a2)</div><div class='del'>-#define DPRINT3(f, a1, a2, a3)	cmn_err(CE_CONT, f, a1, a2, a3)</div><div class='del'>-#endif /* SNI */</div><div class='del'>-#else</div><div class='del'>-#define DPRINT(f)		printf(f)</div><div class='del'>-#define DPRINT1(f, a1)		printf(f, a1)</div><div class='del'>-#define DPRINT2(f, a1, a2)	printf(f, a1, a2)</div><div class='del'>-#define DPRINT3(f, a1, a2, a3)	printf(f, a1, a2, a3)</div><div class='del'>-#endif /* SVR4 or OSF */</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-#define DPRINT(f)		0</div><div class='del'>-#define DPRINT1(f, a1)		0</div><div class='del'>-#define DPRINT2(f, a1, a2)	0</div><div class='del'>-#define DPRINT3(f, a1, a2, a3)	0</div><div class='del'>-#endif /* DEBUG */</div><div class='del'>-</div><div class='del'>-#ifndef SVR4</div><div class='del'>-typedef unsigned char uchar_t;</div><div class='del'>-typedef unsigned short ushort_t;</div><div class='del'>-#ifndef __osf__</div><div class='del'>-typedef int minor_t;</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If we don't have multithreading support, define substitutes.</div><div class='del'>- */</div><div class='del'>-#ifndef D_MP</div><div class='del'>-# define qprocson(q)</div><div class='del'>-# define qprocsoff(q)</div><div class='del'>-# define put(q, mp)	((*(q)-&gt;q_qinfo-&gt;qi_putp)((q), (mp)))</div><div class='del'>-# define canputnext(q)	canput((q)-&gt;q_next)</div><div class='del'>-# define qwriter(q, mp, func, scope)	(func)((q), (mp))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef D_MP</div><div class='del'>-/* Use msgpullup if we have other multithreading support. */</div><div class='del'>-#define PULLUP(mp, len)				\</div><div class='del'>-    do {					\</div><div class='del'>-	mblk_t *np = msgpullup((mp), (len));	\</div><div class='del'>-	freemsg((mp));				\</div><div class='del'>-	mp = np;				\</div><div class='del'>-    } while (0)</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-/* Use pullupmsg if we don't have any multithreading support. */</div><div class='del'>-#define PULLUP(mp, len)			\</div><div class='del'>-    do {				\</div><div class='del'>-	if (!pullupmsg((mp), (len))) {	\</div><div class='del'>-	    freemsg((mp));		\</div><div class='del'>-	    mp = 0;			\</div><div class='del'>-	}				\</div><div class='del'>-    } while (0)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * How to declare the open and close procedures for a module.</div><div class='del'>- */</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#define MOD_OPEN_DECL(name)	\</div><div class='del'>-static int name __P((queue_t *, dev_t *, int, int, cred_t *))</div><div class='del'>-</div><div class='del'>-#define MOD_CLOSE_DECL(name)	\</div><div class='del'>-static int name __P((queue_t *, int, cred_t *))</div><div class='del'>-</div><div class='del'>-#define MOD_OPEN(name)				\</div><div class='del'>-static int name(q, devp, flag, sflag, credp)	\</div><div class='del'>-    queue_t *q;					\</div><div class='del'>-    dev_t *devp;				\</div><div class='del'>-    int flag, sflag;				\</div><div class='del'>-    cred_t *credp;</div><div class='del'>-</div><div class='del'>-#define MOD_CLOSE(name)		\</div><div class='del'>-static int name(q, flag, credp)	\</div><div class='del'>-    queue_t *q;			\</div><div class='del'>-    int flag;			\</div><div class='del'>-    cred_t *credp;</div><div class='del'>-</div><div class='del'>-#define OPEN_ERROR(x)		return (x)</div><div class='del'>-#define DRV_OPEN_OK(dev)	return 0</div><div class='del'>-</div><div class='del'>-#define NOTSUSER()		(drv_priv(credp))</div><div class='del'>-</div><div class='del'>-#else	/* not SVR4 */</div><div class='del'>-#define MOD_OPEN_DECL(name)	\</div><div class='del'>-static int name __P((queue_t *, int, int, int))</div><div class='del'>-</div><div class='del'>-#define MOD_CLOSE_DECL(name)	\</div><div class='del'>-static int name __P((queue_t *, int))</div><div class='del'>-</div><div class='del'>-#define MOD_OPEN(name)		\</div><div class='del'>-static int name(q, dev, flag, sflag)	\</div><div class='del'>-    queue_t *q;				\</div><div class='del'>-    int dev;				\</div><div class='del'>-    int flag, sflag;</div><div class='del'>-</div><div class='del'>-#define MOD_CLOSE(name)		\</div><div class='del'>-static int name(q, flag)	\</div><div class='del'>-    queue_t *q;			\</div><div class='del'>-    int flag;</div><div class='del'>-</div><div class='del'>-#define OPEN_ERROR(x)		{ u.u_error = (x); return OPENFAIL; }</div><div class='del'>-#define DRV_OPEN_OK(dev)	return (dev)</div><div class='del'>-</div><div class='del'>-#endif	/* SVR4 */</div><div class='head'>diff --git a/mdk-stage1/ppp/modules/vjcompress.c b/mdk-stage1/ppp/modules/vjcompress.c<br/>deleted file mode 100644<br/>index 809b87231..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/modules/vjcompress.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/modules/vjcompress.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,587 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * Routines to compress and uncompess tcp packets (for transmission</div><div class='del'>- * over low speed serial lines.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Regents of the University of California.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the University of California, Berkeley.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- *	Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:</div><div class='del'>- *	- Initial distribution.</div><div class='del'>- *</div><div class='del'>- * Modified June 1993 by Paul Mackerras, paulus@cs.anu.edu.au,</div><div class='del'>- * so that the entire packet being decompressed doesn't have</div><div class='del'>- * to be in contiguous memory (just the compressed header).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x,</div><div class='del'>- * and SVR4 systems including Solaris 2.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef SVR4</div><div class='del'>-#ifndef __GNUC__</div><div class='del'>-#include &lt;sys/byteorder.h&gt;	/* for ntohl, etc. */</div><div class='del'>-#else</div><div class='del'>-/* make sure we don't get the gnu "fixed" one! */</div><div class='del'>-#include "/usr/include/sys/byteorder.h"</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#include &lt;net/net_globals.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef AIX4</div><div class='del'>-#define _NETINET_IN_SYSTM_H_</div><div class='del'>-typedef u_long  n_long;</div><div class='del'>-#else</div><div class='del'>-#include &lt;netinet/in_systm.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;netinet/ip.h&gt;</div><div class='del'>-#include &lt;netinet/tcp.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/vjcompress.h&gt;</div><div class='del'>-</div><div class='del'>-#ifndef VJ_NO_STATS</div><div class='del'>-#define INCR(counter) ++comp-&gt;stats.counter</div><div class='del'>-#else</div><div class='del'>-#define INCR(counter)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define BCMP(p1, p2, n) bcmp((char *)(p1), (char *)(p2), (int)(n))</div><div class='del'>-#undef  BCOPY</div><div class='del'>-#define BCOPY(p1, p2, n) bcopy((char *)(p1), (char *)(p2), (int)(n))</div><div class='del'>-#ifndef KERNEL</div><div class='del'>-#define ovbcopy bcopy</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef __osf__</div><div class='del'>-#define getip_hl(base)	(((base).ip_vhl)&amp;0xf)</div><div class='del'>-#define getth_off(base)	((((base).th_xoff)&amp;0xf0)&gt;&gt;4)</div><div class='del'>-</div><div class='del'>-#else</div><div class='del'>-#define getip_hl(base)	((base).ip_hl)</div><div class='del'>-#define getth_off(base)	((base).th_off)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-vj_compress_init(comp, max_state)</div><div class='del'>-    struct vjcompress *comp;</div><div class='del'>-    int max_state;</div><div class='del'>-{</div><div class='del'>-    register u_int i;</div><div class='del'>-    register struct cstate *tstate = comp-&gt;tstate;</div><div class='del'>-</div><div class='del'>-    if (max_state == -1)</div><div class='del'>-	max_state = MAX_STATES - 1;</div><div class='del'>-    bzero((char *)comp, sizeof(*comp));</div><div class='del'>-    for (i = max_state; i &gt; 0; --i) {</div><div class='del'>-	tstate[i].cs_id = i;</div><div class='del'>-	tstate[i].cs_next = &amp;tstate[i - 1];</div><div class='del'>-    }</div><div class='del'>-    tstate[0].cs_next = &amp;tstate[max_state];</div><div class='del'>-    tstate[0].cs_id = 0;</div><div class='del'>-    comp-&gt;last_cs = &amp;tstate[0];</div><div class='del'>-    comp-&gt;last_recv = 255;</div><div class='del'>-    comp-&gt;last_xmit = 255;</div><div class='del'>-    comp-&gt;flags = VJF_TOSS;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* ENCODE encodes a number that is known to be non-zero.  ENCODEZ</div><div class='del'>- * checks for zero (since zero has to be encoded in the long, 3 byte</div><div class='del'>- * form).</div><div class='del'>- */</div><div class='del'>-#define ENCODE(n) { \</div><div class='del'>-	if ((u_short)(n) &gt;= 256) { \</div><div class='del'>-		*cp++ = 0; \</div><div class='del'>-		cp[1] = (n); \</div><div class='del'>-		cp[0] = (n) &gt;&gt; 8; \</div><div class='del'>-		cp += 2; \</div><div class='del'>-	} else { \</div><div class='del'>-		*cp++ = (n); \</div><div class='del'>-	} \</div><div class='del'>-}</div><div class='del'>-#define ENCODEZ(n) { \</div><div class='del'>-	if ((u_short)(n) &gt;= 256 || (u_short)(n) == 0) { \</div><div class='del'>-		*cp++ = 0; \</div><div class='del'>-		cp[1] = (n); \</div><div class='del'>-		cp[0] = (n) &gt;&gt; 8; \</div><div class='del'>-		cp += 2; \</div><div class='del'>-	} else { \</div><div class='del'>-		*cp++ = (n); \</div><div class='del'>-	} \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define DECODEL(f) { \</div><div class='del'>-	if (*cp == 0) {\</div><div class='del'>-		u_int32_t tmp = ntohl(f) + ((cp[1] &lt;&lt; 8) | cp[2]); \</div><div class='del'>-		(f) = htonl(tmp); \</div><div class='del'>-		cp += 3; \</div><div class='del'>-	} else { \</div><div class='del'>-		u_int32_t tmp = ntohl(f) + (u_int32_t)*cp++; \</div><div class='del'>-		(f) = htonl(tmp); \</div><div class='del'>-	} \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define DECODES(f) { \</div><div class='del'>-	if (*cp == 0) {\</div><div class='del'>-		u_short tmp = ntohs(f) + ((cp[1] &lt;&lt; 8) | cp[2]); \</div><div class='del'>-		(f) = htons(tmp); \</div><div class='del'>-		cp += 3; \</div><div class='del'>-	} else { \</div><div class='del'>-		u_short tmp = ntohs(f) + (u_int32_t)*cp++; \</div><div class='del'>-		(f) = htons(tmp); \</div><div class='del'>-	} \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define DECODEU(f) { \</div><div class='del'>-	if (*cp == 0) {\</div><div class='del'>-		(f) = htons((cp[1] &lt;&lt; 8) | cp[2]); \</div><div class='del'>-		cp += 3; \</div><div class='del'>-	} else { \</div><div class='del'>-		(f) = htons((u_int32_t)*cp++); \</div><div class='del'>-	} \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-u_int</div><div class='del'>-vj_compress_tcp(ip, mlen, comp, compress_cid, vjhdrp)</div><div class='del'>-    register struct ip *ip;</div><div class='del'>-    u_int mlen;</div><div class='del'>-    struct vjcompress *comp;</div><div class='del'>-    int compress_cid;</div><div class='del'>-    u_char **vjhdrp;</div><div class='del'>-{</div><div class='del'>-    register struct cstate *cs = comp-&gt;last_cs-&gt;cs_next;</div><div class='del'>-    register u_int hlen = getip_hl(*ip);</div><div class='del'>-    register struct tcphdr *oth;</div><div class='del'>-    register struct tcphdr *th;</div><div class='del'>-    register u_int deltaS, deltaA;</div><div class='del'>-    register u_int changes = 0;</div><div class='del'>-    u_char new_seq[16];</div><div class='del'>-    register u_char *cp = new_seq;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Bail if this is an IP fragment or if the TCP packet isn't</div><div class='del'>-     * `compressible' (i.e., ACK isn't set or some other control bit is</div><div class='del'>-     * set).  (We assume that the caller has already made sure the</div><div class='del'>-     * packet is IP proto TCP).</div><div class='del'>-     */</div><div class='del'>-    if ((ip-&gt;ip_off &amp; htons(0x3fff)) || mlen &lt; 40)</div><div class='del'>-	return (TYPE_IP);</div><div class='del'>-</div><div class='del'>-    th = (struct tcphdr *)&amp;((int *)ip)[hlen];</div><div class='del'>-    if ((th-&gt;th_flags &amp; (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK)</div><div class='del'>-	return (TYPE_IP);</div><div class='del'>-    /*</div><div class='del'>-     * Packet is compressible -- we're going to send either a</div><div class='del'>-     * COMPRESSED_TCP or UNCOMPRESSED_TCP packet.  Either way we need</div><div class='del'>-     * to locate (or create) the connection state.  Special case the</div><div class='del'>-     * most recently used connection since it's most likely to be used</div><div class='del'>-     * again &amp; we don't have to do any reordering if it's used.</div><div class='del'>-     */</div><div class='del'>-    INCR(vjs_packets);</div><div class='del'>-    if (ip-&gt;ip_src.s_addr != cs-&gt;cs_ip.ip_src.s_addr ||</div><div class='del'>-	ip-&gt;ip_dst.s_addr != cs-&gt;cs_ip.ip_dst.s_addr ||</div><div class='del'>-	*(int *)th != ((int *)&amp;cs-&gt;cs_ip)[getip_hl(cs-&gt;cs_ip)]) {</div><div class='del'>-	/*</div><div class='del'>-	 * Wasn't the first -- search for it.</div><div class='del'>-	 *</div><div class='del'>-	 * States are kept in a circularly linked list with</div><div class='del'>-	 * last_cs pointing to the end of the list.  The</div><div class='del'>-	 * list is kept in lru order by moving a state to the</div><div class='del'>-	 * head of the list whenever it is referenced.  Since</div><div class='del'>-	 * the list is short and, empirically, the connection</div><div class='del'>-	 * we want is almost always near the front, we locate</div><div class='del'>-	 * states via linear search.  If we don't find a state</div><div class='del'>-	 * for the datagram, the oldest state is (re-)used.</div><div class='del'>-	 */</div><div class='del'>-	register struct cstate *lcs;</div><div class='del'>-	register struct cstate *lastcs = comp-&gt;last_cs;</div><div class='del'>-</div><div class='del'>-	do {</div><div class='del'>-	    lcs = cs; cs = cs-&gt;cs_next;</div><div class='del'>-	    INCR(vjs_searches);</div><div class='del'>-	    if (ip-&gt;ip_src.s_addr == cs-&gt;cs_ip.ip_src.s_addr</div><div class='del'>-		&amp;&amp; ip-&gt;ip_dst.s_addr == cs-&gt;cs_ip.ip_dst.s_addr</div><div class='del'>-		&amp;&amp; *(int *)th == ((int *)&amp;cs-&gt;cs_ip)[getip_hl(cs-&gt;cs_ip)])</div><div class='del'>-		goto found;</div><div class='del'>-	} while (cs != lastcs);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Didn't find it -- re-use oldest cstate.  Send an</div><div class='del'>-	 * uncompressed packet that tells the other side what</div><div class='del'>-	 * connection number we're using for this conversation.</div><div class='del'>-	 * Note that since the state list is circular, the oldest</div><div class='del'>-	 * state points to the newest and we only need to set</div><div class='del'>-	 * last_cs to update the lru linkage.</div><div class='del'>-	 */</div><div class='del'>-	INCR(vjs_misses);</div><div class='del'>-	comp-&gt;last_cs = lcs;</div><div class='del'>-	hlen += getth_off(*th);</div><div class='del'>-	hlen &lt;&lt;= 2;</div><div class='del'>-	if (hlen &gt; mlen)</div><div class='del'>-	    return (TYPE_IP);</div><div class='del'>-	goto uncompressed;</div><div class='del'>-</div><div class='del'>-    found:</div><div class='del'>-	/*</div><div class='del'>-	 * Found it -- move to the front on the connection list.</div><div class='del'>-	 */</div><div class='del'>-	if (cs == lastcs)</div><div class='del'>-	    comp-&gt;last_cs = lcs;</div><div class='del'>-	else {</div><div class='del'>-	    lcs-&gt;cs_next = cs-&gt;cs_next;</div><div class='del'>-	    cs-&gt;cs_next = lastcs-&gt;cs_next;</div><div class='del'>-	    lastcs-&gt;cs_next = cs;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Make sure that only what we expect to change changed. The first</div><div class='del'>-     * line of the `if' checks the IP protocol version, header length &amp;</div><div class='del'>-     * type of service.  The 2nd line checks the "Don't fragment" bit.</div><div class='del'>-     * The 3rd line checks the time-to-live and protocol (the protocol</div><div class='del'>-     * check is unnecessary but costless).  The 4th line checks the TCP</div><div class='del'>-     * header length.  The 5th line checks IP options, if any.  The 6th</div><div class='del'>-     * line checks TCP options, if any.  If any of these things are</div><div class='del'>-     * different between the previous &amp; current datagram, we send the</div><div class='del'>-     * current datagram `uncompressed'.</div><div class='del'>-     */</div><div class='del'>-    oth = (struct tcphdr *)&amp;((int *)&amp;cs-&gt;cs_ip)[hlen];</div><div class='del'>-    deltaS = hlen;</div><div class='del'>-    hlen += getth_off(*th);</div><div class='del'>-    hlen &lt;&lt;= 2;</div><div class='del'>-    if (hlen &gt; mlen)</div><div class='del'>-	return (TYPE_IP);</div><div class='del'>-</div><div class='del'>-    if (((u_short *)ip)[0] != ((u_short *)&amp;cs-&gt;cs_ip)[0] ||</div><div class='del'>-	((u_short *)ip)[3] != ((u_short *)&amp;cs-&gt;cs_ip)[3] ||</div><div class='del'>-	((u_short *)ip)[4] != ((u_short *)&amp;cs-&gt;cs_ip)[4] ||</div><div class='del'>-	getth_off(*th) != getth_off(*oth) ||</div><div class='del'>-	(deltaS &gt; 5 &amp;&amp; BCMP(ip + 1, &amp;cs-&gt;cs_ip + 1, (deltaS - 5) &lt;&lt; 2)) ||</div><div class='del'>-	(getth_off(*th) &gt; 5 &amp;&amp; BCMP(th + 1, oth + 1, (getth_off(*th) - 5) &lt;&lt; 2)))</div><div class='del'>-	goto uncompressed;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Figure out which of the changing fields changed.  The</div><div class='del'>-     * receiver expects changes in the order: urgent, window,</div><div class='del'>-     * ack, seq (the order minimizes the number of temporaries</div><div class='del'>-     * needed in this section of code).</div><div class='del'>-     */</div><div class='del'>-    if (th-&gt;th_flags &amp; TH_URG) {</div><div class='del'>-	deltaS = ntohs(th-&gt;th_urp);</div><div class='del'>-	ENCODEZ(deltaS);</div><div class='del'>-	changes |= NEW_U;</div><div class='del'>-    } else if (th-&gt;th_urp != oth-&gt;th_urp)</div><div class='del'>-	/* argh! URG not set but urp changed -- a sensible</div><div class='del'>-	 * implementation should never do this but RFC793</div><div class='del'>-	 * doesn't prohibit the change so we have to deal</div><div class='del'>-	 * with it. */</div><div class='del'>-	goto uncompressed;</div><div class='del'>-</div><div class='del'>-    if ((deltaS = (u_short)(ntohs(th-&gt;th_win) - ntohs(oth-&gt;th_win))) &gt; 0) {</div><div class='del'>-	ENCODE(deltaS);</div><div class='del'>-	changes |= NEW_W;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((deltaA = ntohl(th-&gt;th_ack) - ntohl(oth-&gt;th_ack)) &gt; 0) {</div><div class='del'>-	if (deltaA &gt; 0xffff)</div><div class='del'>-	    goto uncompressed;</div><div class='del'>-	ENCODE(deltaA);</div><div class='del'>-	changes |= NEW_A;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((deltaS = ntohl(th-&gt;th_seq) - ntohl(oth-&gt;th_seq)) &gt; 0) {</div><div class='del'>-	if (deltaS &gt; 0xffff)</div><div class='del'>-	    goto uncompressed;</div><div class='del'>-	ENCODE(deltaS);</div><div class='del'>-	changes |= NEW_S;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch(changes) {</div><div class='del'>-</div><div class='del'>-    case 0:</div><div class='del'>-	/*</div><div class='del'>-	 * Nothing changed. If this packet contains data and the</div><div class='del'>-	 * last one didn't, this is probably a data packet following</div><div class='del'>-	 * an ack (normal on an interactive connection) and we send</div><div class='del'>-	 * it compressed.  Otherwise it's probably a retransmit,</div><div class='del'>-	 * retransmitted ack or window probe.  Send it uncompressed</div><div class='del'>-	 * in case the other side missed the compressed version.</div><div class='del'>-	 */</div><div class='del'>-	if (ip-&gt;ip_len != cs-&gt;cs_ip.ip_len &amp;&amp;</div><div class='del'>-	    ntohs(cs-&gt;cs_ip.ip_len) == hlen)</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	/* (fall through) */</div><div class='del'>-</div><div class='del'>-    case SPECIAL_I:</div><div class='del'>-    case SPECIAL_D:</div><div class='del'>-	/*</div><div class='del'>-	 * actual changes match one of our special case encodings --</div><div class='del'>-	 * send packet uncompressed.</div><div class='del'>-	 */</div><div class='del'>-	goto uncompressed;</div><div class='del'>-</div><div class='del'>-    case NEW_S|NEW_A:</div><div class='del'>-	if (deltaS == deltaA &amp;&amp; deltaS == ntohs(cs-&gt;cs_ip.ip_len) - hlen) {</div><div class='del'>-	    /* special case for echoed terminal traffic */</div><div class='del'>-	    changes = SPECIAL_I;</div><div class='del'>-	    cp = new_seq;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case NEW_S:</div><div class='del'>-	if (deltaS == ntohs(cs-&gt;cs_ip.ip_len) - hlen) {</div><div class='del'>-	    /* special case for data xfer */</div><div class='del'>-	    changes = SPECIAL_D;</div><div class='del'>-	    cp = new_seq;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    deltaS = ntohs(ip-&gt;ip_id) - ntohs(cs-&gt;cs_ip.ip_id);</div><div class='del'>-    if (deltaS != 1) {</div><div class='del'>-	ENCODEZ(deltaS);</div><div class='del'>-	changes |= NEW_I;</div><div class='del'>-    }</div><div class='del'>-    if (th-&gt;th_flags &amp; TH_PUSH)</div><div class='del'>-	changes |= TCP_PUSH_BIT;</div><div class='del'>-    /*</div><div class='del'>-     * Grab the cksum before we overwrite it below.  Then update our</div><div class='del'>-     * state with this packet's header.</div><div class='del'>-     */</div><div class='del'>-    deltaA = ntohs(th-&gt;th_sum);</div><div class='del'>-    BCOPY(ip, &amp;cs-&gt;cs_ip, hlen);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We want to use the original packet as our compressed packet.</div><div class='del'>-     * (cp - new_seq) is the number of bytes we need for compressed</div><div class='del'>-     * sequence numbers.  In addition we need one byte for the change</div><div class='del'>-     * mask, one for the connection id and two for the tcp checksum.</div><div class='del'>-     * So, (cp - new_seq) + 4 bytes of header are needed.  hlen is how</div><div class='del'>-     * many bytes of the original packet to toss so subtract the two to</div><div class='del'>-     * get the new packet size.</div><div class='del'>-     */</div><div class='del'>-    deltaS = cp - new_seq;</div><div class='del'>-    cp = (u_char *)ip;</div><div class='del'>-    if (compress_cid == 0 || comp-&gt;last_xmit != cs-&gt;cs_id) {</div><div class='del'>-	comp-&gt;last_xmit = cs-&gt;cs_id;</div><div class='del'>-	hlen -= deltaS + 4;</div><div class='del'>-	*vjhdrp = (cp += hlen);</div><div class='del'>-	*cp++ = changes | NEW_C;</div><div class='del'>-	*cp++ = cs-&gt;cs_id;</div><div class='del'>-    } else {</div><div class='del'>-	hlen -= deltaS + 3;</div><div class='del'>-	*vjhdrp = (cp += hlen);</div><div class='del'>-	*cp++ = changes;</div><div class='del'>-    }</div><div class='del'>-    *cp++ = deltaA &gt;&gt; 8;</div><div class='del'>-    *cp++ = deltaA;</div><div class='del'>-    BCOPY(new_seq, cp, deltaS);</div><div class='del'>-    INCR(vjs_compressed);</div><div class='del'>-    return (TYPE_COMPRESSED_TCP);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Update connection state cs &amp; send uncompressed packet (that is,</div><div class='del'>-     * a regular ip/tcp packet but with the 'conversation id' we hope</div><div class='del'>-     * to use on future compressed packets in the protocol field).</div><div class='del'>-     */</div><div class='del'>- uncompressed:</div><div class='del'>-    BCOPY(ip, &amp;cs-&gt;cs_ip, hlen);</div><div class='del'>-    ip-&gt;ip_p = cs-&gt;cs_id;</div><div class='del'>-    comp-&gt;last_xmit = cs-&gt;cs_id;</div><div class='del'>-    return (TYPE_UNCOMPRESSED_TCP);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Called when we may have missed a packet.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-vj_uncompress_err(comp)</div><div class='del'>-    struct vjcompress *comp;</div><div class='del'>-{</div><div class='del'>-    comp-&gt;flags |= VJF_TOSS;</div><div class='del'>-    INCR(vjs_errorin);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * "Uncompress" a packet of type TYPE_UNCOMPRESSED_TCP.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-vj_uncompress_uncomp(buf, buflen, comp)</div><div class='del'>-    u_char *buf;</div><div class='del'>-    int buflen;</div><div class='del'>-    struct vjcompress *comp;</div><div class='del'>-{</div><div class='del'>-    register u_int hlen;</div><div class='del'>-    register struct cstate *cs;</div><div class='del'>-    register struct ip *ip;</div><div class='del'>-</div><div class='del'>-    ip = (struct ip *) buf;</div><div class='del'>-    hlen = getip_hl(*ip) &lt;&lt; 2;</div><div class='del'>-    if (ip-&gt;ip_p &gt;= MAX_STATES</div><div class='del'>-	|| hlen + sizeof(struct tcphdr) &gt; buflen</div><div class='del'>-	|| (hlen += getth_off(*((struct tcphdr *)&amp;((char *)ip)[hlen])) &lt;&lt; 2)</div><div class='del'>-	    &gt; buflen</div><div class='del'>-	|| hlen &gt; MAX_HDR) {</div><div class='del'>-	comp-&gt;flags |= VJF_TOSS;</div><div class='del'>-	INCR(vjs_errorin);</div><div class='del'>-	return (0);</div><div class='del'>-    }</div><div class='del'>-    cs = &amp;comp-&gt;rstate[comp-&gt;last_recv = ip-&gt;ip_p];</div><div class='del'>-    comp-&gt;flags &amp;=~ VJF_TOSS;</div><div class='del'>-    ip-&gt;ip_p = IPPROTO_TCP;</div><div class='del'>-    BCOPY(ip, &amp;cs-&gt;cs_ip, hlen);</div><div class='del'>-    cs-&gt;cs_hlen = hlen;</div><div class='del'>-    INCR(vjs_uncompressedin);</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Uncompress a packet of type TYPE_COMPRESSED_TCP.</div><div class='del'>- * The packet starts at buf and is of total length total_len.</div><div class='del'>- * The first buflen bytes are at buf; this must include the entire</div><div class='del'>- * compressed TCP/IP header.  This procedure returns the length</div><div class='del'>- * of the VJ header, with a pointer to the uncompressed IP header</div><div class='del'>- * in *hdrp and its length in *hlenp.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-vj_uncompress_tcp(buf, buflen, total_len, comp, hdrp, hlenp)</div><div class='del'>-    u_char *buf;</div><div class='del'>-    int buflen, total_len;</div><div class='del'>-    struct vjcompress *comp;</div><div class='del'>-    u_char **hdrp;</div><div class='del'>-    u_int *hlenp;</div><div class='del'>-{</div><div class='del'>-    register u_char *cp;</div><div class='del'>-    register u_int hlen, changes;</div><div class='del'>-    register struct tcphdr *th;</div><div class='del'>-    register struct cstate *cs;</div><div class='del'>-    register u_short *bp;</div><div class='del'>-    register u_int vjlen;</div><div class='del'>-    register u_int32_t tmp;</div><div class='del'>-</div><div class='del'>-    INCR(vjs_compressedin);</div><div class='del'>-    cp = buf;</div><div class='del'>-    changes = *cp++;</div><div class='del'>-    if (changes &amp; NEW_C) {</div><div class='del'>-	/* Make sure the state index is in range, then grab the state.</div><div class='del'>-	 * If we have a good state index, clear the 'discard' flag. */</div><div class='del'>-	if (*cp &gt;= MAX_STATES)</div><div class='del'>-	    goto bad;</div><div class='del'>-</div><div class='del'>-	comp-&gt;flags &amp;=~ VJF_TOSS;</div><div class='del'>-	comp-&gt;last_recv = *cp++;</div><div class='del'>-    } else {</div><div class='del'>-	/* this packet has an implicit state index.  If we've</div><div class='del'>-	 * had a line error since the last time we got an</div><div class='del'>-	 * explicit state index, we have to toss the packet. */</div><div class='del'>-	if (comp-&gt;flags &amp; VJF_TOSS) {</div><div class='del'>-	    INCR(vjs_tossed);</div><div class='del'>-	    return (-1);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    cs = &amp;comp-&gt;rstate[comp-&gt;last_recv];</div><div class='del'>-    hlen = getip_hl(cs-&gt;cs_ip) &lt;&lt; 2;</div><div class='del'>-    th = (struct tcphdr *)&amp;((u_char *)&amp;cs-&gt;cs_ip)[hlen];</div><div class='del'>-    th-&gt;th_sum = htons((*cp &lt;&lt; 8) | cp[1]);</div><div class='del'>-    cp += 2;</div><div class='del'>-    if (changes &amp; TCP_PUSH_BIT)</div><div class='del'>-	th-&gt;th_flags |= TH_PUSH;</div><div class='del'>-    else</div><div class='del'>-	th-&gt;th_flags &amp;=~ TH_PUSH;</div><div class='del'>-</div><div class='del'>-    switch (changes &amp; SPECIALS_MASK) {</div><div class='del'>-    case SPECIAL_I:</div><div class='del'>-	{</div><div class='del'>-	    register u_int32_t i = ntohs(cs-&gt;cs_ip.ip_len) - cs-&gt;cs_hlen;</div><div class='del'>-	    /* some compilers can't nest inline assembler.. */</div><div class='del'>-	    tmp = ntohl(th-&gt;th_ack) + i;</div><div class='del'>-	    th-&gt;th_ack = htonl(tmp);</div><div class='del'>-	    tmp = ntohl(th-&gt;th_seq) + i;</div><div class='del'>-	    th-&gt;th_seq = htonl(tmp);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case SPECIAL_D:</div><div class='del'>-	/* some compilers can't nest inline assembler.. */</div><div class='del'>-	tmp = ntohl(th-&gt;th_seq) + ntohs(cs-&gt;cs_ip.ip_len) - cs-&gt;cs_hlen;</div><div class='del'>-	th-&gt;th_seq = htonl(tmp);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	if (changes &amp; NEW_U) {</div><div class='del'>-	    th-&gt;th_flags |= TH_URG;</div><div class='del'>-	    DECODEU(th-&gt;th_urp);</div><div class='del'>-	} else</div><div class='del'>-	    th-&gt;th_flags &amp;=~ TH_URG;</div><div class='del'>-	if (changes &amp; NEW_W)</div><div class='del'>-	    DECODES(th-&gt;th_win);</div><div class='del'>-	if (changes &amp; NEW_A)</div><div class='del'>-	    DECODEL(th-&gt;th_ack);</div><div class='del'>-	if (changes &amp; NEW_S)</div><div class='del'>-	    DECODEL(th-&gt;th_seq);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    if (changes &amp; NEW_I) {</div><div class='del'>-	DECODES(cs-&gt;cs_ip.ip_id);</div><div class='del'>-    } else {</div><div class='del'>-	cs-&gt;cs_ip.ip_id = ntohs(cs-&gt;cs_ip.ip_id) + 1;</div><div class='del'>-	cs-&gt;cs_ip.ip_id = htons(cs-&gt;cs_ip.ip_id);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * At this point, cp points to the first byte of data in the</div><div class='del'>-     * packet.  Fill in the IP total length and update the IP</div><div class='del'>-     * header checksum.</div><div class='del'>-     */</div><div class='del'>-    vjlen = cp - buf;</div><div class='del'>-    buflen -= vjlen;</div><div class='del'>-    if (buflen &lt; 0)</div><div class='del'>-	/* we must have dropped some characters (crc should detect</div><div class='del'>-	 * this but the old slip framing won't) */</div><div class='del'>-	goto bad;</div><div class='del'>-</div><div class='del'>-    total_len += cs-&gt;cs_hlen - vjlen;</div><div class='del'>-    cs-&gt;cs_ip.ip_len = htons(total_len);</div><div class='del'>-</div><div class='del'>-    /* recompute the ip header checksum */</div><div class='del'>-    bp = (u_short *) &amp;cs-&gt;cs_ip;</div><div class='del'>-    cs-&gt;cs_ip.ip_sum = 0;</div><div class='del'>-    for (changes = 0; hlen &gt; 0; hlen -= 2)</div><div class='del'>-	changes += *bp++;</div><div class='del'>-    changes = (changes &amp; 0xffff) + (changes &gt;&gt; 16);</div><div class='del'>-    changes = (changes &amp; 0xffff) + (changes &gt;&gt; 16);</div><div class='del'>-    cs-&gt;cs_ip.ip_sum = ~ changes;</div><div class='del'>-</div><div class='del'>-    *hdrp = (u_char *) &amp;cs-&gt;cs_ip;</div><div class='del'>-    *hlenp = cs-&gt;cs_hlen;</div><div class='del'>-    return vjlen;</div><div class='del'>-</div><div class='del'>- bad:</div><div class='del'>-    comp-&gt;flags |= VJF_TOSS;</div><div class='del'>-    INCR(vjs_errorin);</div><div class='del'>-    return (-1);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/.cvsignore b/mdk-stage1/ppp/pppd/.cvsignore<br/>deleted file mode 100644<br/>index 476ef2253..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/.cvsignore?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/.cvsignore</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2 +0,0 @@</div><div class='del'>-pppd</div><div class='del'>-pppd-DIET</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile b/mdk-stage1/ppp/pppd/Makefile<br/>deleted file mode 100644<br/>index ad2bdae90..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,59 +0,0 @@</div><div class='del'>- #******************************************************************************</div><div class='del'>- #</div><div class='del'>- # Guillaume Cottenceau (gc@mandrakesoft.com)</div><div class='del'>- #</div><div class='del'>- # Copyright 2000 MandrakeSoft</div><div class='del'>- #</div><div class='del'>- # This software may be freely redistributed under the terms of the GNU</div><div class='del'>- # public license.</div><div class='del'>- #</div><div class='del'>- # You should have received a copy of the GNU General Public License</div><div class='del'>- # along with this program; if not, write to the Free Software</div><div class='del'>- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</div><div class='del'>- #</div><div class='del'>- #*****************************************************************************</div><div class='del'>-</div><div class='del'>-top_dir = ../..</div><div class='del'>-</div><div class='del'>-include $(top_dir)/Makefile.common</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-TARGETS = pppd</div><div class='del'>-</div><div class='del'>-ifeq (DIETLIBC, $(L))</div><div class='del'>-TARGETS += pppd-DIET</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-BINTARGET = ../pppd-bin</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-all: $(TARGETS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.a $(BINTARGET) pppd pppd-DIET</div><div class='del'>-</div><div class='del'>-FLAGS = -Wall -Werror -Os -fomit-frame-pointer -DDO_BSD_COMPRESS=0 -D_linux_=1 -DHAVE_MMAP -DNO_DRAND48</div><div class='del'>-</div><div class='del'>-INCS = -I../include -I.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o multilink.o tdb.o tty.o</div><div class='del'>-OBJS-DIET = $(subst .o,-DIET.o,$(OBJS))</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-pppd: $(OBJS)</div><div class='del'>-	gcc -static -o $@ $^ -lcrypt</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-	cp -f $@ $(BINTARGET)</div><div class='del'>-</div><div class='del'>-pppd-DIET: $(OBJS-DIET)</div><div class='del'>-	gcc $(DIETLIBC_LDFLAGS_STAGE1) -o $@ $^ $(DIETLIBC_LIBC)</div><div class='del'>-	$(STRIPCMD) $@</div><div class='del'>-	cp -f $@ $(BINTARGET)</div><div class='del'>-</div><div class='del'>-$(OBJS): %.o: %.c</div><div class='del'>-	gcc $(FLAGS) $(INCS) $(GLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='del'>-$(OBJS-DIET): %-DIET.o: %.c</div><div class='del'>-	gcc $(FLAGS) $(INCS) $(DIETLIBC_INCLUDES) -c $&lt; -o $@</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile.linux b/mdk-stage1/ppp/pppd/Makefile.linux<br/>deleted file mode 100644<br/>index 47d6ba01e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile.linux?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile.linux</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,129 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# pppd makefile for Linux</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-# Default installation locations</div><div class='del'>-BINDIR = $(DESTDIR)/usr/sbin</div><div class='del'>-MANDIR = $(DESTDIR)/usr/man</div><div class='del'>-</div><div class='del'>-PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \</div><div class='del'>-	   ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c cbcp.c \</div><div class='del'>-	   demand.c utils.c multilink.c tdb.c tty.c</div><div class='del'>-HEADERS =  callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \</div><div class='del'>-	   ipxcp.h cbcp.h tdb.h</div><div class='del'>-MANPAGES = pppd.8</div><div class='del'>-PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-	   auth.o options.o demand.o utils.o sys-linux.o ipxcp.o multilink.o \</div><div class='del'>-	   tdb.o tty.o</div><div class='del'>-</div><div class='del'>-all: pppd</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# include dependancies if present and backup if as a header file</div><div class='del'>-ifeq (.depend,$(wildcard .depend))</div><div class='del'>-include .depend</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-CC = gcc</div><div class='del'>-#</div><div class='del'>-COPTS = -Wall $(RPM_OPT_FLAGS)</div><div class='del'>-LIBS = -lutil</div><div class='del'>-</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-LIBS += -lcrypt</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next 2 lines to include support for Microsoft's</div><div class='del'>-# MS-CHAP authentication protocol.</div><div class='del'>-CHAPMS=y</div><div class='del'>-USE_CRYPT=y</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-HAVE_CRYPT_H=y</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next line to include support for PPP packet filtering.</div><div class='del'>-# This requires that the libpcap library and headers be installed</div><div class='del'>-# and that the kernel driver support PPP packet filtering, which it</div><div class='del'>-# doesn't yet.</div><div class='del'>-#FILTER=y</div><div class='del'>-</div><div class='del'>-HAS_SHADOW=y</div><div class='del'>-USE_PAM=y</div><div class='del'>-#HAVE_INET6=y</div><div class='del'>-</div><div class='del'>-PLUGIN=y</div><div class='del'>-</div><div class='del'>-INCLUDE_DIRS= -I../include</div><div class='del'>-</div><div class='del'>-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP</div><div class='del'>-</div><div class='del'>-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)</div><div class='del'>-</div><div class='del'>-ifdef CHAPMS</div><div class='del'>-CFLAGS   += -DCHAPMS=1</div><div class='del'>-ifndef USE_CRYPT</div><div class='del'>-LIBS     := -ldes $(LIBS)</div><div class='del'>-else</div><div class='del'>-CFLAGS   += -DUSE_CRYPT=1</div><div class='del'>-ifneq ($(wildcard /usr/include/crypt.h),)</div><div class='del'>-CFLAGS   += -DHAVE_CRYPT_H=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-PPPDOBJS += md4.o chap_ms.o</div><div class='del'>-ifdef MSLANMAN</div><div class='del'>-CFLAGS   += -DMSLANMAN=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAS_SHADOW</div><div class='del'>-CFLAGS   += -DHAS_SHADOW</div><div class='del'>-#LIBS     := -lshadow $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.</div><div class='del'>-ifdef USE_PAM</div><div class='del'>-CFLAGS   += -DUSE_PAM</div><div class='del'>-LIBS     := -lpam -ldl $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Lock library binary for Linux is included in 'linux' subdirectory.</div><div class='del'>-ifdef LOCKLIB</div><div class='del'>-LIBS     := -llock $(LIBS)</div><div class='del'>-CFLAGS   += -DLOCKLIB=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef PLUGIN</div><div class='del'>-CFLAGS	+= -DPLUGIN</div><div class='del'>-LDFLAGS	+= -Wl,-E</div><div class='del'>-LIBS	+= -ldl</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef FILTER</div><div class='del'>-LIBS    += -lpcap</div><div class='del'>-CFLAGS  += -DPPP_FILTER -I/usr/include/pcap</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAVE_INET6</div><div class='del'>-     PPPDSRCS += ipv6cp.c eui64.c</div><div class='del'>-     HEADERS  += ipv6cp.h eui64.h</div><div class='del'>-     PPPDOBJS += ipv6cp.o eui64.o</div><div class='del'>-     CFLAGS   += -DINET6=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INSTALL= install</div><div class='del'>-</div><div class='del'>-install: pppd</div><div class='del'>-	mkdir -p $(BINDIR) $(MANDIR)</div><div class='del'>-	$(INSTALL)  -m 555 pppd $(BINDIR)/pppd</div><div class='del'>-	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8</div><div class='del'>-</div><div class='del'>-pppd: $(PPPDOBJS)</div><div class='del'>-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f $(PPPDOBJS) pppd *~ #* core</div><div class='del'>-</div><div class='del'>-depend:</div><div class='del'>-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) &gt;.depend</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile.linux.make b/mdk-stage1/ppp/pppd/Makefile.linux.make<br/>deleted file mode 100644<br/>index d98a32562..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile.linux.make?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile.linux.make</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,131 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# pppd makefile for Linux</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-# Default installation locations</div><div class='del'>-BINDIR = /usr/sbin</div><div class='del'>-MANDIR = /usr/man</div><div class='del'>-</div><div class='del'>-PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \</div><div class='del'>-	   ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c cbcp.c \</div><div class='del'>-	   demand.c utils.c multilink.c tdb.c tty.c</div><div class='del'>-HEADERS =  callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \</div><div class='del'>-	   ipxcp.h cbcp.h tdb.h</div><div class='del'>-MANPAGES = pppd.8</div><div class='del'>-PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-	   auth.o options.o demand.o utils.o sys-linux.o ipxcp.o multilink.o \</div><div class='del'>-	   tdb.o tty.o</div><div class='del'>-</div><div class='del'>-all: pppd</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# include dependancies if present and backup if as a header file</div><div class='del'>-ifeq (.depend,$(wildcard .depend))</div><div class='del'>-include .depend</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# CC = gcc</div><div class='del'>-#</div><div class='del'>-COPTS = -O2 -pipe -Wall -g</div><div class='del'>-LIBS =</div><div class='del'>-</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-LIBS += -lcrypt</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next 2 lines to include support for Microsoft's</div><div class='del'>-# MS-CHAP authentication protocol.</div><div class='del'>-CHAPMS=y</div><div class='del'>-USE_CRYPT=y</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-HAVE_CRYPT_H=y</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next line to include support for PPP packet filtering.</div><div class='del'>-# This requires that the libpcap library and headers be installed</div><div class='del'>-# and that the kernel driver support PPP packet filtering, which it</div><div class='del'>-# doesn't yet.</div><div class='del'>-#FILTER=y</div><div class='del'>-</div><div class='del'>-HAS_SHADOW=y</div><div class='del'>-#USE_PAM=y</div><div class='del'>-#HAVE_INET6=y</div><div class='del'>-</div><div class='del'>-PLUGIN=y</div><div class='del'>-</div><div class='del'>-INCLUDE_DIRS= -I../include</div><div class='del'>-</div><div class='del'>-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP</div><div class='del'>-</div><div class='del'>-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)</div><div class='del'>-</div><div class='del'>-ifdef CHAPMS</div><div class='del'>-CFLAGS   += -DCHAPMS=1</div><div class='del'>-ifndef USE_CRYPT</div><div class='del'>-LIBS     := -ldes $(LIBS)</div><div class='del'>-else</div><div class='del'>-CFLAGS   += -DUSE_CRYPT=1</div><div class='del'>-ifneq ($(wildcard /usr/include/crypt.h),)</div><div class='del'>-CFLAGS   += -DHAVE_CRYPT_H=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-PPPDOBJS += md4.o chap_ms.o</div><div class='del'>-ifdef MSLANMAN</div><div class='del'>-CFLAGS   += -DMSLANMAN=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAS_SHADOW</div><div class='del'>-CFLAGS   += -DHAS_SHADOW</div><div class='del'>-#LIBS     := -lshadow $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.</div><div class='del'>-ifdef USE_PAM</div><div class='del'>-CFLAGS   += -DUSE_PAM</div><div class='del'>-LIBS     := -lpam -ldl $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Lock library binary for Linux is included in 'linux' subdirectory.</div><div class='del'>-ifdef LOCKLIB</div><div class='del'>-LIBS     := -llock $(LIBS)</div><div class='del'>-CFLAGS   += -DLOCKLIB=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef PLUGIN</div><div class='del'>-CFLAGS	+= -DPLUGIN</div><div class='del'>-LDFLAGS	+= -Wl,-E</div><div class='del'>-LIBS	+= -ldl</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef FILTER</div><div class='del'>-LIBS    += -lpcap</div><div class='del'>-CFLAGS  += -DPPP_FILTER -I/usr/include/pcap</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAVE_INET6</div><div class='del'>-     PPPDSRCS += ipv6cp.c eui64.c</div><div class='del'>-     HEADERS  += ipv6cp.h eui64.h</div><div class='del'>-     PPPDOBJS += ipv6cp.o eui64.o</div><div class='del'>-     CFLAGS   += -DINET6=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INSTALL= install -o root</div><div class='del'>-</div><div class='del'>-install: pppd</div><div class='del'>-	mkdir -p $(BINDIR) $(MANDIR)</div><div class='del'>-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd</div><div class='del'>-	if chgrp pppusers $(BINDIR)/pppd 2&gt;/dev/null; then \</div><div class='del'>-	  chmod o-rx,u+s $(BINDIR)/pppd; fi</div><div class='del'>-	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8</div><div class='del'>-</div><div class='del'>-pppd: $(PPPDOBJS)</div><div class='del'>-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f $(PPPDOBJS) pppd *~ #* core</div><div class='del'>-</div><div class='del'>-depend:</div><div class='del'>-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) &gt;.depend</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile.linux.makeopt b/mdk-stage1/ppp/pppd/Makefile.linux.makeopt<br/>deleted file mode 100644<br/>index 3094c941c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile.linux.makeopt?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile.linux.makeopt</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,129 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# pppd makefile for Linux</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-# Default installation locations</div><div class='del'>-BINDIR = $(DESTDIR)/usr/sbin</div><div class='del'>-MANDIR = $(DESTDIR)/usr/man</div><div class='del'>-</div><div class='del'>-PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \</div><div class='del'>-	   ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c cbcp.c \</div><div class='del'>-	   demand.c utils.c multilink.c tdb.c tty.c</div><div class='del'>-HEADERS =  callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \</div><div class='del'>-	   ipxcp.h cbcp.h tdb.h</div><div class='del'>-MANPAGES = pppd.8</div><div class='del'>-PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-	   auth.o options.o demand.o utils.o sys-linux.o ipxcp.o multilink.o \</div><div class='del'>-	   tdb.o tty.o</div><div class='del'>-</div><div class='del'>-all: pppd</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# include dependancies if present and backup if as a header file</div><div class='del'>-ifeq (.depend,$(wildcard .depend))</div><div class='del'>-include .depend</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-CC = gcc</div><div class='del'>-#</div><div class='del'>-COPTS = -O2 -pipe -Wall -g</div><div class='del'>-LIBS = -lutil</div><div class='del'>-</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-LIBS += -lcrypt</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next 2 lines to include support for Microsoft's</div><div class='del'>-# MS-CHAP authentication protocol.</div><div class='del'>-CHAPMS=y</div><div class='del'>-USE_CRYPT=y</div><div class='del'>-ifneq ($(wildcard /usr/lib/libcrypt.*),)</div><div class='del'>-HAVE_CRYPT_H=y</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Uncomment the next line to include support for PPP packet filtering.</div><div class='del'>-# This requires that the libpcap library and headers be installed</div><div class='del'>-# and that the kernel driver support PPP packet filtering, which it</div><div class='del'>-# doesn't yet.</div><div class='del'>-#FILTER=y</div><div class='del'>-</div><div class='del'>-HAS_SHADOW=y</div><div class='del'>-USE_PAM=y</div><div class='del'>-#HAVE_INET6=y</div><div class='del'>-</div><div class='del'>-PLUGIN=y</div><div class='del'>-</div><div class='del'>-INCLUDE_DIRS= -I../include</div><div class='del'>-</div><div class='del'>-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP</div><div class='del'>-</div><div class='del'>-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)</div><div class='del'>-</div><div class='del'>-ifdef CHAPMS</div><div class='del'>-CFLAGS   += -DCHAPMS=1</div><div class='del'>-ifndef USE_CRYPT</div><div class='del'>-LIBS     := -ldes $(LIBS)</div><div class='del'>-else</div><div class='del'>-CFLAGS   += -DUSE_CRYPT=1</div><div class='del'>-ifneq ($(wildcard /usr/include/crypt.h),)</div><div class='del'>-CFLAGS   += -DHAVE_CRYPT_H=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-PPPDOBJS += md4.o chap_ms.o</div><div class='del'>-ifdef MSLANMAN</div><div class='del'>-CFLAGS   += -DMSLANMAN=1</div><div class='del'>-endif</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAS_SHADOW</div><div class='del'>-CFLAGS   += -DHAS_SHADOW</div><div class='del'>-#LIBS     := -lshadow $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.</div><div class='del'>-ifdef USE_PAM</div><div class='del'>-CFLAGS   += -DUSE_PAM</div><div class='del'>-LIBS     := -lpam -ldl $(LIBS)</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-# Lock library binary for Linux is included in 'linux' subdirectory.</div><div class='del'>-ifdef LOCKLIB</div><div class='del'>-LIBS     := -llock $(LIBS)</div><div class='del'>-CFLAGS   += -DLOCKLIB=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef PLUGIN</div><div class='del'>-CFLAGS	+= -DPLUGIN</div><div class='del'>-LDFLAGS	+= -Wl,-E</div><div class='del'>-LIBS	+= -ldl</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef FILTER</div><div class='del'>-LIBS    += -lpcap</div><div class='del'>-CFLAGS  += -DPPP_FILTER -I/usr/include/pcap</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-ifdef HAVE_INET6</div><div class='del'>-     PPPDSRCS += ipv6cp.c eui64.c</div><div class='del'>-     HEADERS  += ipv6cp.h eui64.h</div><div class='del'>-     PPPDOBJS += ipv6cp.o eui64.o</div><div class='del'>-     CFLAGS   += -DINET6=1</div><div class='del'>-endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-INSTALL= install</div><div class='del'>-</div><div class='del'>-install: pppd</div><div class='del'>-	mkdir -p $(BINDIR) $(MANDIR)</div><div class='del'>-	$(INSTALL)  -m 555 pppd $(BINDIR)/pppd</div><div class='del'>-	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8</div><div class='del'>-</div><div class='del'>-pppd: $(PPPDOBJS)</div><div class='del'>-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f $(PPPDOBJS) pppd *~ #* core</div><div class='del'>-</div><div class='del'>-depend:</div><div class='del'>-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) &gt;.depend</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile.sol2 b/mdk-stage1/ppp/pppd/Makefile.sol2<br/>deleted file mode 100644<br/>index dfdcddd97..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile.sol2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile.sol2</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,48 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# Makefile for pppd under Solaris 2.</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-include ../solaris/Makedefs</div><div class='del'>-</div><div class='del'>-COPTS	+= -xO2 -xspace -W0,-Lt</div><div class='del'>-CFLAGS	=  -I../include -DSVR4 -DSOL2 $(COPTS)</div><div class='del'>-LIBS	= -lsocket -lnsl</div><div class='del'>-</div><div class='del'>-OBJS	=  main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o tty.o \</div><div class='del'>-	ccp.o auth.o options.o demand.o utils.o	sys-solaris.o tdb.o</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# uncomment the following to enable plugins</div><div class='del'>-#</div><div class='del'>-CFLAGS	+= -DPLUGIN</div><div class='del'>-LIBS	+= -ldl</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# Solaris 8 and above accomodates /var/run, so uncomment the</div><div class='del'>-# following to place pppd process IDs on that location</div><div class='del'>-#</div><div class='del'>-#CFLAGS += -D_PATH_VARRUN='"/var/run/"'</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# uncomment the following to enable IPv6</div><div class='del'>-#</div><div class='del'>-# Solaris 8 and on includes support for IPv6</div><div class='del'>-#</div><div class='del'>-#CFLAGS	+= -DINET6</div><div class='del'>-#OBJS	+= ipv6cp.o eui64.o</div><div class='del'>-</div><div class='del'>-#</div><div class='del'>-# Make targets</div><div class='del'>-#</div><div class='del'>-all: pppd</div><div class='del'>-</div><div class='del'>-pppd:	$(OBJS)</div><div class='del'>-	$(CC) -o pppd $(OBJS) $(LIBS)</div><div class='del'>-</div><div class='del'>-install:</div><div class='del'>-	$(INSTALL) -f $(BINDIR) -m 4755 -u root pppd</div><div class='del'>-	$(INSTALL) -f $(MANDIR)/man8 -m 444 pppd.8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f $(OBJS) pppd *~ core y.tab.c y.tab.h</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/Makefile.sunos4 b/mdk-stage1/ppp/pppd/Makefile.sunos4<br/>deleted file mode 100644<br/>index 694ac341f..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/Makefile.sunos4?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/Makefile.sunos4</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# Makefile for pppd under SunOS 4.</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-include ../sunos4/Makedefs</div><div class='del'>-</div><div class='del'>-LIBS =</div><div class='del'>-</div><div class='del'>-CFLAGS = $(COPTS) -I../include -DSUNOS4 -DGIDSET_TYPE=int \</div><div class='del'>-	-DLOCK_DIR=\"/usr/spool/locks\"</div><div class='del'>-</div><div class='del'>-all: pppd</div><div class='del'>-</div><div class='del'>-OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \</div><div class='del'>-	auth.o options.o demand.o utils.o sys-sunos4.o tty.o</div><div class='del'>-</div><div class='del'>-pppd:	$(OBJS)</div><div class='del'>-	$(CC) -o pppd $(OBJS) $(LIBS)</div><div class='del'>-</div><div class='del'>-install:</div><div class='del'>-	$(INSTALL) -c -m 4555 pppd $(BINDIR)/pppd</div><div class='del'>-	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8/pppd.8</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f $(OBJS) pppd *~ core</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/auth.c b/mdk-stage1/ppp/pppd/auth.c<br/>deleted file mode 100644<br/>index 5f95a2982..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/auth.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/auth.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1939 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * auth.c - PPP authentication and phase control.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1993 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the Australian National University.  The name of the University</div><div class='del'>- * may not be used to endorse or promote products derived from this</div><div class='del'>- * software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-#include &lt;grp.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;utmp.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#if defined(_PATH_LASTLOG) &amp;&amp; defined(_linux_)</div><div class='del'>-#include &lt;lastlog.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#ifdef USE_PAM</div><div class='del'>-#include &lt;security/pam_appl.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef HAS_SHADOW</div><div class='del'>-#include &lt;shadow.h&gt;</div><div class='del'>-#ifndef PW_PPP</div><div class='del'>-#define PW_PPP PW_LOGIN</div><div class='del'>-#endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#include "upap.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#ifdef CBCP_SUPPORT</div><div class='del'>-#include "cbcp.h"</div><div class='del'>-#endif</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/* Bits in scan_authfile return value */</div><div class='del'>-#define NONWILD_SERVER	1</div><div class='del'>-#define NONWILD_CLIENT	2</div><div class='del'>-</div><div class='del'>-#define ISWILD(word)	(word[0] == '*' &amp;&amp; word[1] == 0)</div><div class='del'>-</div><div class='del'>-/* The name by which the peer authenticated itself to us. */</div><div class='del'>-char peer_authname[MAXNAMELEN];</div><div class='del'>-</div><div class='del'>-/* Records which authentication operations haven't completed yet. */</div><div class='del'>-static int auth_pending[NUM_PPP];</div><div class='del'>-</div><div class='del'>-/* Set if we have successfully called plogin() */</div><div class='del'>-static int logged_in;</div><div class='del'>-</div><div class='del'>-/* List of addresses which the peer may use. */</div><div class='del'>-static struct permitted_ip *addresses[NUM_PPP];</div><div class='del'>-</div><div class='del'>-/* Wordlist giving addresses which the peer may use</div><div class='del'>-   without authenticating itself. */</div><div class='del'>-static struct wordlist *noauth_addrs;</div><div class='del'>-</div><div class='del'>-/* Extra options to apply, from the secrets file entry for the peer. */</div><div class='del'>-static struct wordlist *extra_options;</div><div class='del'>-</div><div class='del'>-/* Number of network protocols which we have opened. */</div><div class='del'>-static int num_np_open;</div><div class='del'>-</div><div class='del'>-/* Number of network protocols which have come up. */</div><div class='del'>-static int num_np_up;</div><div class='del'>-</div><div class='del'>-/* Set if we got the contents of passwd[] from the pap-secrets file. */</div><div class='del'>-static int passwd_from_file;</div><div class='del'>-</div><div class='del'>-/* Set if we require authentication only because we have a default route. */</div><div class='del'>-static bool default_auth;</div><div class='del'>-</div><div class='del'>-/* Hook to enable a plugin to control the idle time limit */</div><div class='del'>-int (*idle_time_hook) __P((struct ppp_idle *)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to say whether we can possibly authenticate any peer */</div><div class='del'>-int (*pap_check_hook) __P((void)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to check the PAP user and password */</div><div class='del'>-int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,</div><div class='del'>-			  struct wordlist **paddrs,</div><div class='del'>-			  struct wordlist **popts)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to know about the PAP user logout */</div><div class='del'>-void (*pap_logout_hook) __P((void)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to get the PAP password for authenticating us */</div><div class='del'>-int (*pap_passwd_hook) __P((char *user, char *passwd)) = NULL;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This is used to ensure that we don't start an auth-up/down</div><div class='del'>- * script while one is already running.</div><div class='del'>- */</div><div class='del'>-enum script_state {</div><div class='del'>-    s_down,</div><div class='del'>-    s_up</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static enum script_state auth_state = s_down;</div><div class='del'>-static enum script_state auth_script_state = s_down;</div><div class='del'>-static pid_t auth_script_pid = 0;</div><div class='del'>-</div><div class='del'>-static int used_login;		/* peer authenticated against login database */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option variables.</div><div class='del'>- */</div><div class='del'>-bool uselogin = 0;		/* Use /etc/passwd for checking PAP */</div><div class='del'>-bool cryptpap = 0;		/* Passwords in pap-secrets are encrypted */</div><div class='del'>-bool refuse_pap = 0;		/* Don't wanna auth. ourselves with PAP */</div><div class='del'>-bool refuse_chap = 0;		/* Don't wanna auth. ourselves with CHAP */</div><div class='del'>-bool usehostname = 0;		/* Use hostname for our_name */</div><div class='del'>-bool auth_required = 0;		/* Always require authentication from peer */</div><div class='del'>-bool allow_any_ip = 0;		/* Allow peer to use any IP address */</div><div class='del'>-bool explicit_remote = 0;	/* User specified explicit remote name */</div><div class='del'>-char remote_name[MAXNAMELEN];	/* Peer's name for authentication */</div><div class='del'>-</div><div class='del'>-static char *uafname;		/* name of most recent +ua file */</div><div class='del'>-</div><div class='del'>-/* Bits in auth_pending[] */</div><div class='del'>-#define PAP_WITHPEER	1</div><div class='del'>-#define PAP_PEER	2</div><div class='del'>-#define CHAP_WITHPEER	4</div><div class='del'>-#define CHAP_PEER	8</div><div class='del'>-</div><div class='del'>-extern char *crypt __P((const char *, const char *));</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-</div><div class='del'>-static void network_phase __P((int));</div><div class='del'>-static void check_idle __P((void *));</div><div class='del'>-static void connect_time_expired __P((void *));</div><div class='del'>-static int  plogin __P((char *, char *, char **));</div><div class='del'>-static void plogout __P((void));</div><div class='del'>-static int  null_login __P((int));</div><div class='del'>-static int  get_pap_passwd __P((char *));</div><div class='del'>-static int  have_pap_secret __P((int *));</div><div class='del'>-static int  have_chap_secret __P((char *, char *, int, int *));</div><div class='del'>-static int  ip_addr_check __P((u_int32_t, struct permitted_ip *));</div><div class='del'>-static int  scan_authfile __P((FILE *, char *, char *, char *,</div><div class='del'>-			       struct wordlist **, struct wordlist **,</div><div class='del'>-			       char *));</div><div class='del'>-static void free_wordlist __P((struct wordlist *));</div><div class='del'>-static void auth_script __P((char *));</div><div class='del'>-static void auth_script_done __P((void *));</div><div class='del'>-static void set_allowed_addrs __P((int, struct wordlist *, struct wordlist *));</div><div class='del'>-static int  some_ip_ok __P((struct wordlist *));</div><div class='del'>-static int  setupapfile __P((char **));</div><div class='del'>-static int  privgroup __P((char **));</div><div class='del'>-static int  set_noauth_addr __P((char **));</div><div class='del'>-static void check_access __P((FILE *, char *));</div><div class='del'>-static int  wordlist_count __P((struct wordlist *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Authentication-related options.</div><div class='del'>- */</div><div class='del'>-option_t auth_options[] = {</div><div class='del'>-    { "auth", o_bool, &amp;auth_required,</div><div class='del'>-      "Require authentication from peer", OPT_PRIO | 1 },</div><div class='del'>-    { "noauth", o_bool, &amp;auth_required,</div><div class='del'>-      "Don't require peer to authenticate", OPT_PRIOSUB | OPT_PRIV,</div><div class='del'>-      &amp;allow_any_ip },</div><div class='del'>-    { "require-pap", o_bool, &amp;lcp_wantoptions[0].neg_upap,</div><div class='del'>-      "Require PAP authentication from peer",</div><div class='del'>-      OPT_PRIOSUB | 1, &amp;auth_required },</div><div class='del'>-    { "+pap", o_bool, &amp;lcp_wantoptions[0].neg_upap,</div><div class='del'>-      "Require PAP authentication from peer",</div><div class='del'>-      OPT_ALIAS | OPT_PRIOSUB | 1, &amp;auth_required },</div><div class='del'>-    { "require-chap", o_bool, &amp;lcp_wantoptions[0].neg_chap,</div><div class='del'>-      "Require CHAP authentication from peer",</div><div class='del'>-      OPT_PRIOSUB | 1, &amp;auth_required },</div><div class='del'>-    { "+chap", o_bool, &amp;lcp_wantoptions[0].neg_chap,</div><div class='del'>-      "Require CHAP authentication from peer",</div><div class='del'>-      OPT_ALIAS | OPT_PRIOSUB | 1, &amp;auth_required },</div><div class='del'>-</div><div class='del'>-    { "refuse-pap", o_bool, &amp;refuse_pap,</div><div class='del'>-      "Don't agree to auth to peer with PAP", 1 },</div><div class='del'>-    { "-pap", o_bool, &amp;refuse_pap,</div><div class='del'>-      "Don't allow PAP authentication with peer", OPT_ALIAS | 1 },</div><div class='del'>-</div><div class='del'>-    { "refuse-chap", o_bool, &amp;refuse_chap,</div><div class='del'>-      "Don't agree to auth to peer with CHAP", 1 },</div><div class='del'>-    { "-chap", o_bool, &amp;refuse_chap,</div><div class='del'>-      "Don't allow CHAP authentication with peer", OPT_ALIAS | 1 },</div><div class='del'>-</div><div class='del'>-    { "name", o_string, our_name,</div><div class='del'>-      "Set local name for authentication",</div><div class='del'>-      OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXNAMELEN },</div><div class='del'>-</div><div class='del'>-    { "+ua", o_special, (void *)setupapfile,</div><div class='del'>-      "Get PAP user and password from file",</div><div class='del'>-      OPT_PRIO | OPT_A2STRVAL, &amp;uafname },</div><div class='del'>-</div><div class='del'>-    { "user", o_string, user,</div><div class='del'>-      "Set name for auth with peer", OPT_PRIO | OPT_STATIC, NULL, MAXNAMELEN },</div><div class='del'>-</div><div class='del'>-    { "password", o_string, passwd,</div><div class='del'>-      "Password for authenticating us to the peer",</div><div class='del'>-      OPT_PRIO | OPT_STATIC | OPT_HIDE, NULL, MAXSECRETLEN },</div><div class='del'>-</div><div class='del'>-    { "usehostname", o_bool, &amp;usehostname,</div><div class='del'>-      "Must use hostname for authentication", 1 },</div><div class='del'>-</div><div class='del'>-    { "remotename", o_string, remote_name,</div><div class='del'>-      "Set remote name for authentication", OPT_PRIO | OPT_STATIC,</div><div class='del'>-      &amp;explicit_remote, MAXNAMELEN },</div><div class='del'>-</div><div class='del'>-    { "login", o_bool, &amp;uselogin,</div><div class='del'>-      "Use system password database for PAP", 1 },</div><div class='del'>-</div><div class='del'>-    { "papcrypt", o_bool, &amp;cryptpap,</div><div class='del'>-      "PAP passwords are encrypted", 1 },</div><div class='del'>-</div><div class='del'>-    { "privgroup", o_special, (void *)privgroup,</div><div class='del'>-      "Allow group members to use privileged options", OPT_PRIV | OPT_A2LIST },</div><div class='del'>-</div><div class='del'>-    { "allow-ip", o_special, (void *)set_noauth_addr,</div><div class='del'>-      "Set IP address(es) which can be used without authentication",</div><div class='del'>-      OPT_PRIV | OPT_A2LIST },</div><div class='del'>-</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setupapfile - specifies UPAP info for authenticating with peer.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setupapfile(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    FILE *ufile;</div><div class='del'>-    int l;</div><div class='del'>-    char u[MAXNAMELEN], p[MAXSECRETLEN];</div><div class='del'>-    char *fname;</div><div class='del'>-</div><div class='del'>-    lcp_allowoptions[0].neg_upap = 1;</div><div class='del'>-</div><div class='del'>-    /* open user info file */</div><div class='del'>-    fname = strdup(*argv);</div><div class='del'>-    if (fname == NULL)</div><div class='del'>-	novm("+ua file name");</div><div class='del'>-    seteuid(getuid());</div><div class='del'>-    ufile = fopen(fname, "r");</div><div class='del'>-    seteuid(0);</div><div class='del'>-    if (ufile == NULL) {</div><div class='del'>-	option_error("unable to open user login data file %s", fname);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    check_access(ufile, fname);</div><div class='del'>-    uafname = fname;</div><div class='del'>-</div><div class='del'>-    /* get username */</div><div class='del'>-    if (fgets(u, MAXNAMELEN - 1, ufile) == NULL</div><div class='del'>-	|| fgets(p, MAXSECRETLEN - 1, ufile) == NULL){</div><div class='del'>-	option_error("unable to read user login data file %s", fname);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    fclose(ufile);</div><div class='del'>-</div><div class='del'>-    /* get rid of newlines */</div><div class='del'>-    l = strlen(u);</div><div class='del'>-    if (l &gt; 0 &amp;&amp; u[l-1] == '\n')</div><div class='del'>-	u[l-1] = 0;</div><div class='del'>-    l = strlen(p);</div><div class='del'>-    if (l &gt; 0 &amp;&amp; p[l-1] == '\n')</div><div class='del'>-	p[l-1] = 0;</div><div class='del'>-</div><div class='del'>-    if (override_value("user", option_priority, fname))</div><div class='del'>-	strlcpy(user, u, sizeof(user));</div><div class='del'>-    if (override_value("passwd", option_priority, fname))</div><div class='del'>-	strlcpy(passwd, p, sizeof(passwd));</div><div class='del'>-</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * privgroup - allow members of the group to have privileged access.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-privgroup(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    struct group *g;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    g = getgrnam(*argv);</div><div class='del'>-    if (g == 0) {</div><div class='del'>-	option_error("group %s is unknown", *argv);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    for (i = 0; i &lt; ngroups; ++i) {</div><div class='del'>-	if (groups[i] == g-&gt;gr_gid) {</div><div class='del'>-	    privileged = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * set_noauth_addr - set address(es) that can be used without authentication.</div><div class='del'>- * Equivalent to specifying an entry like `"" * "" addr' in pap-secrets.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-set_noauth_addr(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *addr = *argv;</div><div class='del'>-    int l = strlen(addr) + 1;</div><div class='del'>-    struct wordlist *wp;</div><div class='del'>-</div><div class='del'>-    wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l);</div><div class='del'>-    if (wp == NULL)</div><div class='del'>-	novm("allow-ip argument");</div><div class='del'>-    wp-&gt;word = (char *) (wp + 1);</div><div class='del'>-    wp-&gt;next = noauth_addrs;</div><div class='del'>-    BCOPY(addr, wp-&gt;word, l);</div><div class='del'>-    noauth_addrs = wp;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * An Open on LCP has requested a change from Dead to Establish phase.</div><div class='del'>- * Do what's necessary to bring the physical layer up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-link_required(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LCP has terminated the link; go to the Dead phase and take the</div><div class='del'>- * physical layer down.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-link_terminated(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    if (phase == PHASE_DEAD)</div><div class='del'>-	return;</div><div class='del'>-    if (pap_logout_hook) {</div><div class='del'>-	pap_logout_hook();</div><div class='del'>-    } else {</div><div class='del'>-	if (logged_in)</div><div class='del'>-	    plogout();</div><div class='del'>-    }</div><div class='del'>-    new_phase(PHASE_DEAD);</div><div class='del'>-    notice("Connection terminated.");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LCP has gone down; it will either die or try to re-establish.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-link_down(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    auth_state = s_down;</div><div class='del'>-    if (auth_script_state == s_up &amp;&amp; auth_script_pid == 0) {</div><div class='del'>-	update_link_stats(unit);</div><div class='del'>-	auth_script_state = s_down;</div><div class='del'>-	auth_script(_PATH_AUTHDOWN);</div><div class='del'>-    }</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i) {</div><div class='del'>-	if (!protp-&gt;enabled_flag)</div><div class='del'>-	    continue;</div><div class='del'>-        if (protp-&gt;protocol != PPP_LCP &amp;&amp; protp-&gt;lowerdown != NULL)</div><div class='del'>-	    (*protp-&gt;lowerdown)(unit);</div><div class='del'>-        if (protp-&gt;protocol &lt; 0xC000 &amp;&amp; protp-&gt;close != NULL)</div><div class='del'>-	    (*protp-&gt;close)(unit, "LCP down");</div><div class='del'>-    }</div><div class='del'>-    num_np_open = 0;</div><div class='del'>-    num_np_up = 0;</div><div class='del'>-    if (phase != PHASE_DEAD)</div><div class='del'>-	new_phase(PHASE_TERMINATE);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The link is established.</div><div class='del'>- * Proceed to the Dead, Authenticate or Network phase as appropriate.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-link_established(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    int auth;</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[unit];</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[unit];</div><div class='del'>-    lcp_options *ho = &amp;lcp_hisoptions[unit];</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Tell higher-level protocols that LCP is up.</div><div class='del'>-     */</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-        if (protp-&gt;protocol != PPP_LCP &amp;&amp; protp-&gt;enabled_flag</div><div class='del'>-	    &amp;&amp; protp-&gt;lowerup != NULL)</div><div class='del'>-	    (*protp-&gt;lowerup)(unit);</div><div class='del'>-</div><div class='del'>-    if (auth_required &amp;&amp; !(go-&gt;neg_chap || go-&gt;neg_upap)) {</div><div class='del'>-	/*</div><div class='del'>-	 * We wanted the peer to authenticate itself, and it refused:</div><div class='del'>-	 * if we have some address(es) it can use without auth, fine,</div><div class='del'>-	 * otherwise treat it as though it authenticated with PAP using</div><div class='del'>-	 * a username * of "" and a password of "".  If that's not OK,</div><div class='del'>-	 * boot it out.</div><div class='del'>-	 */</div><div class='del'>-	if (noauth_addrs != NULL) {</div><div class='del'>-	    set_allowed_addrs(unit, NULL, NULL);</div><div class='del'>-	} else if (!wo-&gt;neg_upap || uselogin || !null_login(unit)) {</div><div class='del'>-	    warn("peer refused to authenticate: terminating link");</div><div class='del'>-	    lcp_close(unit, "peer refused to authenticate");</div><div class='del'>-	    status = EXIT_PEER_AUTH_FAILED;</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    new_phase(PHASE_AUTHENTICATE);</div><div class='del'>-    used_login = 0;</div><div class='del'>-    auth = 0;</div><div class='del'>-    if (go-&gt;neg_chap) {</div><div class='del'>-	ChapAuthPeer(unit, our_name, go-&gt;chap_mdtype);</div><div class='del'>-	auth |= CHAP_PEER;</div><div class='del'>-    } else if (go-&gt;neg_upap) {</div><div class='del'>-	upap_authpeer(unit);</div><div class='del'>-	auth |= PAP_PEER;</div><div class='del'>-    }</div><div class='del'>-    if (ho-&gt;neg_chap) {</div><div class='del'>-	ChapAuthWithPeer(unit, user, ho-&gt;chap_mdtype);</div><div class='del'>-	auth |= CHAP_WITHPEER;</div><div class='del'>-    } else if (ho-&gt;neg_upap) {</div><div class='del'>-	if (passwd[0] == 0) {</div><div class='del'>-	    passwd_from_file = 1;</div><div class='del'>-	    if (!get_pap_passwd(passwd))</div><div class='del'>-		error("No secret found for PAP login");</div><div class='del'>-	}</div><div class='del'>-	upap_authwithpeer(unit, user, passwd);</div><div class='del'>-	auth |= PAP_WITHPEER;</div><div class='del'>-    }</div><div class='del'>-    auth_pending[unit] = auth;</div><div class='del'>-</div><div class='del'>-    if (!auth)</div><div class='del'>-	network_phase(unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Proceed to the network phase.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-network_phase(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[unit];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If the peer had to authenticate, run the auth-up script now.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;neg_chap || go-&gt;neg_upap) {</div><div class='del'>-	auth_state = s_up;</div><div class='del'>-	if (auth_script_state == s_down &amp;&amp; auth_script_pid == 0) {</div><div class='del'>-	    auth_script_state = s_up;</div><div class='del'>-	    auth_script(_PATH_AUTHUP);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#ifdef CBCP_SUPPORT</div><div class='del'>-    /*</div><div class='del'>-     * If we negotiated callback, do it now.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;neg_cbcp) {</div><div class='del'>-	new_phase(PHASE_CALLBACK);</div><div class='del'>-	(*cbcp_protent.open)(unit);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Process extra options from the secrets file</div><div class='del'>-     */</div><div class='del'>-    if (extra_options) {</div><div class='del'>-	options_from_list(extra_options, 1);</div><div class='del'>-	free_wordlist(extra_options);</div><div class='del'>-	extra_options = 0;</div><div class='del'>-    }</div><div class='del'>-    start_networks();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-start_networks()</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    new_phase(PHASE_NETWORK);</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-    if (multilink) {</div><div class='del'>-	if (mp_join_bundle()) {</div><div class='del'>-	    if (updetach &amp;&amp; !nodetach)</div><div class='del'>-		detach();</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-    if (!demand)</div><div class='del'>-	set_filters(&amp;pass_filter, &amp;active_filter);</div><div class='del'>-#endif</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-        if (protp-&gt;protocol &lt; 0xC000 &amp;&amp; protp-&gt;enabled_flag</div><div class='del'>-	    &amp;&amp; protp-&gt;open != NULL) {</div><div class='del'>-	    (*protp-&gt;open)(0);</div><div class='del'>-	    if (protp-&gt;protocol != PPP_CCP)</div><div class='del'>-		++num_np_open;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    if (num_np_open == 0)</div><div class='del'>-	/* nothing to do */</div><div class='del'>-	lcp_close(0, "No network protocols running");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The peer has failed to authenticate himself using `protocol'.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_peer_fail(unit, protocol)</div><div class='del'>-    int unit, protocol;</div><div class='del'>-{</div><div class='del'>-    /*</div><div class='del'>-     * Authentication failure: take the link down</div><div class='del'>-     */</div><div class='del'>-    lcp_close(unit, "Authentication failed");</div><div class='del'>-    status = EXIT_PEER_AUTH_FAILED;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The peer has been successfully authenticated using `protocol'.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_peer_success(unit, protocol, name, namelen)</div><div class='del'>-    int unit, protocol;</div><div class='del'>-    char *name;</div><div class='del'>-    int namelen;</div><div class='del'>-{</div><div class='del'>-    int bit;</div><div class='del'>-</div><div class='del'>-    switch (protocol) {</div><div class='del'>-    case PPP_CHAP:</div><div class='del'>-	bit = CHAP_PEER;</div><div class='del'>-	break;</div><div class='del'>-    case PPP_PAP:</div><div class='del'>-	bit = PAP_PEER;</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-	warn("auth_peer_success: unknown protocol %x", protocol);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Save the authenticated name of the peer for later.</div><div class='del'>-     */</div><div class='del'>-    if (namelen &gt; sizeof(peer_authname) - 1)</div><div class='del'>-	namelen = sizeof(peer_authname) - 1;</div><div class='del'>-    BCOPY(name, peer_authname, namelen);</div><div class='del'>-    peer_authname[namelen] = 0;</div><div class='del'>-    script_setenv("PEERNAME", peer_authname, 0);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there is no more authentication still to be done,</div><div class='del'>-     * proceed to the network (or callback) phase.</div><div class='del'>-     */</div><div class='del'>-    if ((auth_pending[unit] &amp;= ~bit) == 0)</div><div class='del'>-        network_phase(unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We have failed to authenticate ourselves to the peer using `protocol'.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_withpeer_fail(unit, protocol)</div><div class='del'>-    int unit, protocol;</div><div class='del'>-{</div><div class='del'>-    if (passwd_from_file)</div><div class='del'>-	BZERO(passwd, MAXSECRETLEN);</div><div class='del'>-    /*</div><div class='del'>-     * We've failed to authenticate ourselves to our peer.</div><div class='del'>-     * Some servers keep sending CHAP challenges, but there</div><div class='del'>-     * is no point in persisting without any way to get updated</div><div class='del'>-     * authentication secrets.</div><div class='del'>-     */</div><div class='del'>-    lcp_close(unit, "Failed to authenticate ourselves to peer");</div><div class='del'>-    status = EXIT_AUTH_TOPEER_FAILED;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We have successfully authenticated ourselves with the peer using `protocol'.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_withpeer_success(unit, protocol)</div><div class='del'>-    int unit, protocol;</div><div class='del'>-{</div><div class='del'>-    int bit;</div><div class='del'>-</div><div class='del'>-    switch (protocol) {</div><div class='del'>-    case PPP_CHAP:</div><div class='del'>-	bit = CHAP_WITHPEER;</div><div class='del'>-	break;</div><div class='del'>-    case PPP_PAP:</div><div class='del'>-	if (passwd_from_file)</div><div class='del'>-	    BZERO(passwd, MAXSECRETLEN);</div><div class='del'>-	bit = PAP_WITHPEER;</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-	warn("auth_withpeer_success: unknown protocol %x", protocol);</div><div class='del'>-	bit = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there is no more authentication still being done,</div><div class='del'>-     * proceed to the network (or callback) phase.</div><div class='del'>-     */</div><div class='del'>-    if ((auth_pending[unit] &amp;= ~bit) == 0)</div><div class='del'>-	network_phase(unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * np_up - a network protocol has come up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-np_up(unit, proto)</div><div class='del'>-    int unit, proto;</div><div class='del'>-{</div><div class='del'>-    int tlim;</div><div class='del'>-</div><div class='del'>-    if (num_np_up == 0) {</div><div class='del'>-	/*</div><div class='del'>-	 * At this point we consider that the link has come up successfully.</div><div class='del'>-	 */</div><div class='del'>-	status = EXIT_OK;</div><div class='del'>-	unsuccess = 0;</div><div class='del'>-	new_phase(PHASE_RUNNING);</div><div class='del'>-</div><div class='del'>-	if (idle_time_hook != 0)</div><div class='del'>-	    tlim = (*idle_time_hook)(NULL);</div><div class='del'>-	else</div><div class='del'>-	    tlim = idle_time_limit;</div><div class='del'>-	if (tlim &gt; 0)</div><div class='del'>-	    TIMEOUT(check_idle, NULL, tlim);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Set a timeout to close the connection once the maximum</div><div class='del'>-	 * connect time has expired.</div><div class='del'>-	 */</div><div class='del'>-	if (maxconnect &gt; 0)</div><div class='del'>-	    TIMEOUT(connect_time_expired, 0, maxconnect);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Detach now, if the updetach option was given.</div><div class='del'>-	 */</div><div class='del'>-	if (updetach &amp;&amp; !nodetach)</div><div class='del'>-	    detach();</div><div class='del'>-    }</div><div class='del'>-    ++num_np_up;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * np_down - a network protocol has gone down.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-np_down(unit, proto)</div><div class='del'>-    int unit, proto;</div><div class='del'>-{</div><div class='del'>-    if (--num_np_up == 0) {</div><div class='del'>-	UNTIMEOUT(check_idle, NULL);</div><div class='del'>-	new_phase(PHASE_NETWORK);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * np_finished - a network protocol has finished using the link.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-np_finished(unit, proto)</div><div class='del'>-    int unit, proto;</div><div class='del'>-{</div><div class='del'>-    if (--num_np_open &lt;= 0) {</div><div class='del'>-	/* no further use for the link: shut up shop. */</div><div class='del'>-	lcp_close(0, "No network protocols running");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * check_idle - check whether the link has been idle for long</div><div class='del'>- * enough that we can shut it down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-check_idle(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct ppp_idle idle;</div><div class='del'>-    time_t itime;</div><div class='del'>-    int tlim;</div><div class='del'>-</div><div class='del'>-    if (!get_idle_time(0, &amp;idle))</div><div class='del'>-	return;</div><div class='del'>-    if (idle_time_hook != 0) {</div><div class='del'>-	tlim = idle_time_hook(&amp;idle);</div><div class='del'>-    } else {</div><div class='del'>-	itime = MIN(idle.xmit_idle, idle.recv_idle);</div><div class='del'>-	tlim = idle_time_limit - itime;</div><div class='del'>-    }</div><div class='del'>-    if (tlim &lt;= 0) {</div><div class='del'>-	/* link is idle: shut it down. */</div><div class='del'>-	notice("Terminating connection due to lack of activity.");</div><div class='del'>-	lcp_close(0, "Link inactive");</div><div class='del'>-	need_holdoff = 0;</div><div class='del'>-	status = EXIT_IDLE_TIMEOUT;</div><div class='del'>-    } else {</div><div class='del'>-	TIMEOUT(check_idle, NULL, tlim);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * connect_time_expired - log a message and close the connection.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-connect_time_expired(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    info("Connect time expired");</div><div class='del'>-    lcp_close(0, "Connect time expired");	/* Close connection */</div><div class='del'>-    status = EXIT_CONNECT_TIME;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_check_options - called to check authentication options.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_check_options()</div><div class='del'>-{</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[0];</div><div class='del'>-    int can_auth;</div><div class='del'>-    int lacks_ip;</div><div class='del'>-</div><div class='del'>-    /* Default our_name to hostname, and user to our_name */</div><div class='del'>-    if (our_name[0] == 0 || usehostname)</div><div class='del'>-	strlcpy(our_name, hostname, sizeof(our_name));</div><div class='del'>-    if (user[0] == 0)</div><div class='del'>-	strlcpy(user, our_name, sizeof(user));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we have a default route, require the peer to authenticate</div><div class='del'>-     * unless the noauth option was given or the real user is root.</div><div class='del'>-     */</div><div class='del'>-    if (!auth_required &amp;&amp; !allow_any_ip &amp;&amp; have_route_to(0) &amp;&amp; !privileged) {</div><div class='del'>-	auth_required = 1;</div><div class='del'>-	default_auth = 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* If authentication is required, ask peer for CHAP or PAP. */</div><div class='del'>-    if (auth_required) {</div><div class='del'>-	allow_any_ip = 0;</div><div class='del'>-	if (!wo-&gt;neg_chap &amp;&amp; !wo-&gt;neg_upap) {</div><div class='del'>-	    wo-&gt;neg_chap = 1;</div><div class='del'>-	    wo-&gt;neg_upap = 1;</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-	wo-&gt;neg_chap = 0;</div><div class='del'>-	wo-&gt;neg_upap = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check whether we have appropriate secrets to use</div><div class='del'>-     * to authenticate the peer.</div><div class='del'>-     */</div><div class='del'>-    lacks_ip = 0;</div><div class='del'>-    can_auth = wo-&gt;neg_upap &amp;&amp; (uselogin || have_pap_secret(&amp;lacks_ip));</div><div class='del'>-    if (!can_auth &amp;&amp; wo-&gt;neg_chap) {</div><div class='del'>-	can_auth = have_chap_secret((explicit_remote? remote_name: NULL),</div><div class='del'>-				    our_name, 1, &amp;lacks_ip);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (auth_required &amp;&amp; !can_auth &amp;&amp; noauth_addrs == NULL) {</div><div class='del'>-	if (default_auth) {</div><div class='del'>-	    option_error(</div><div class='del'>-"By default the remote system is required to authenticate itself");</div><div class='del'>-	    option_error(</div><div class='del'>-"(because this system has a default route to the internet)");</div><div class='del'>-	} else if (explicit_remote)</div><div class='del'>-	    option_error(</div><div class='del'>-"The remote system (%s) is required to authenticate itself",</div><div class='del'>-			 remote_name);</div><div class='del'>-	else</div><div class='del'>-	    option_error(</div><div class='del'>-"The remote system is required to authenticate itself");</div><div class='del'>-	option_error(</div><div class='del'>-"but I couldn't find any suitable secret (password) for it to use to do so.");</div><div class='del'>-	if (lacks_ip)</div><div class='del'>-	    option_error(</div><div class='del'>-"(None of the available passwords would let it use an IP address.)");</div><div class='del'>-</div><div class='del'>-	exit(1);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_reset - called when LCP is starting negotiations to recheck</div><div class='del'>- * authentication options, i.e. whether we have appropriate secrets</div><div class='del'>- * to use for authenticating ourselves and/or the peer.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-auth_reset(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[unit];</div><div class='del'>-    lcp_options *ao = &amp;lcp_allowoptions[0];</div><div class='del'>-</div><div class='del'>-    ao-&gt;neg_upap = !refuse_pap &amp;&amp; (passwd[0] != 0 || get_pap_passwd(NULL));</div><div class='del'>-    ao-&gt;neg_chap = !refuse_chap</div><div class='del'>-	&amp;&amp; (passwd[0] != 0</div><div class='del'>-	    || have_chap_secret(user, (explicit_remote? remote_name: NULL),</div><div class='del'>-				0, NULL));</div><div class='del'>-</div><div class='del'>-    if (go-&gt;neg_upap &amp;&amp; !uselogin &amp;&amp; !have_pap_secret(NULL))</div><div class='del'>-	go-&gt;neg_upap = 0;</div><div class='del'>-    if (go-&gt;neg_chap) {</div><div class='del'>-	if (!have_chap_secret((explicit_remote? remote_name: NULL),</div><div class='del'>-			      our_name, 1, NULL))</div><div class='del'>-	    go-&gt;neg_chap = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * check_passwd - Check the user name and passwd against the PAP secrets</div><div class='del'>- * file.  If requested, also check against the system password database,</div><div class='del'>- * and login the user if OK.</div><div class='del'>- *</div><div class='del'>- * returns:</div><div class='del'>- *	UPAP_AUTHNAK: Authentication failed.</div><div class='del'>- *	UPAP_AUTHACK: Authentication succeeded.</div><div class='del'>- * In either case, msg points to an appropriate message.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)</div><div class='del'>-    int unit;</div><div class='del'>-    char *auser;</div><div class='del'>-    int userlen;</div><div class='del'>-    char *apasswd;</div><div class='del'>-    int passwdlen;</div><div class='del'>-    char **msg;</div><div class='del'>-{</div><div class='del'>-    int ret;</div><div class='del'>-    char *filename;</div><div class='del'>-    FILE *f;</div><div class='del'>-    struct wordlist *addrs = NULL, *opts = NULL;</div><div class='del'>-    char passwd[256], user[256];</div><div class='del'>-    char secret[MAXWORDLEN];</div><div class='del'>-    static int attempts = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Make copies of apasswd and auser, then null-terminate them.</div><div class='del'>-     * If there are unprintable characters in the password, make</div><div class='del'>-     * them visible.</div><div class='del'>-     */</div><div class='del'>-    slprintf(passwd, sizeof(passwd), "%.*v", passwdlen, apasswd);</div><div class='del'>-    slprintf(user, sizeof(user), "%.*v", userlen, auser);</div><div class='del'>-    *msg = "";</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check if a plugin wants to handle this.</div><div class='del'>-     */</div><div class='del'>-    if (pap_auth_hook) {</div><div class='del'>-	ret = (*pap_auth_hook)(user, passwd, msg, &amp;addrs, &amp;opts);</div><div class='del'>-	if (ret &gt;= 0) {</div><div class='del'>-	    if (ret)</div><div class='del'>-		set_allowed_addrs(unit, addrs, opts);</div><div class='del'>-	    BZERO(passwd, sizeof(passwd));</div><div class='del'>-	    if (addrs != 0)</div><div class='del'>-		free_wordlist(addrs);</div><div class='del'>-	    return ret? UPAP_AUTHACK: UPAP_AUTHNAK;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Open the file of pap secrets and scan for a suitable secret</div><div class='del'>-     * for authenticating this user.</div><div class='del'>-     */</div><div class='del'>-    filename = _PATH_UPAPFILE;</div><div class='del'>-    addrs = opts = NULL;</div><div class='del'>-    ret = UPAP_AUTHNAK;</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    if (f == NULL) {</div><div class='del'>-	error("Can't open PAP password file %s: %m", filename);</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	check_access(f, filename);</div><div class='del'>-	if (scan_authfile(f, user, our_name, secret, &amp;addrs, &amp;opts, filename) &lt; 0) {</div><div class='del'>-	    warn("no PAP secret found for %s", user);</div><div class='del'>-	} else {</div><div class='del'>-	    /*</div><div class='del'>-	     * If the secret is "@login", it means to check</div><div class='del'>-	     * the password against the login database.</div><div class='del'>-	     */</div><div class='del'>-	    int login_secret = strcmp(secret, "@login") == 0;</div><div class='del'>-	    ret = UPAP_AUTHACK;</div><div class='del'>-	    if (uselogin || login_secret) {</div><div class='del'>-		/* login option or secret is @login */</div><div class='del'>-		ret = plogin(user, passwd, msg);</div><div class='del'>-		if (ret == UPAP_AUTHNAK)</div><div class='del'>-		    warn("PAP login failure for %s", user);</div><div class='del'>-		else</div><div class='del'>-		    used_login = 1;</div><div class='del'>-	    }</div><div class='del'>-	    if (secret[0] != 0 &amp;&amp; !login_secret) {</div><div class='del'>-		/* password given in pap-secrets - must match */</div><div class='del'>-		if ((cryptpap || strcmp(passwd, secret) != 0)</div><div class='del'>-		    &amp;&amp; strcmp(crypt(passwd, secret), secret) != 0) {</div><div class='del'>-		    ret = UPAP_AUTHNAK;</div><div class='del'>-		    warn("PAP authentication failure for %s", user);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	fclose(f);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ret == UPAP_AUTHNAK) {</div><div class='del'>-        if (**msg == 0)</div><div class='del'>-	    *msg = "Login incorrect";</div><div class='del'>-	/*</div><div class='del'>-	 * XXX can we ever get here more than once??</div><div class='del'>-	 * Frustrate passwd stealer programs.</div><div class='del'>-	 * Allow 10 tries, but start backing off after 3 (stolen from login).</div><div class='del'>-	 * On 10'th, drop the connection.</div><div class='del'>-	 */</div><div class='del'>-	if (attempts++ &gt;= 10) {</div><div class='del'>-	    warn("%d LOGIN FAILURES ON %s, %s", attempts, devnam, user);</div><div class='del'>-	    lcp_close(unit, "login failed");</div><div class='del'>-	}</div><div class='del'>-	if (attempts &gt; 3)</div><div class='del'>-	    sleep((u_int) (attempts - 3) * 5);</div><div class='del'>-	if (opts != NULL)</div><div class='del'>-	    free_wordlist(opts);</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	attempts = 0;			/* Reset count */</div><div class='del'>-	if (**msg == 0)</div><div class='del'>-	    *msg = "Login ok";</div><div class='del'>-	set_allowed_addrs(unit, addrs, opts);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (addrs != NULL)</div><div class='del'>-	free_wordlist(addrs);</div><div class='del'>-    BZERO(passwd, sizeof(passwd));</div><div class='del'>-    BZERO(secret, sizeof(secret));</div><div class='del'>-</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This function is needed for PAM.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef USE_PAM</div><div class='del'>-/* Static variables used to communicate between the conversation function</div><div class='del'>- * and the server_login function </div><div class='del'>- */</div><div class='del'>-static char *PAM_username;</div><div class='del'>-static char *PAM_password;</div><div class='del'>-static int PAM_error = 0;</div><div class='del'>-static pam_handle_t *pamh = NULL;</div><div class='del'>-</div><div class='del'>-/* PAM conversation function</div><div class='del'>- * Here we assume (for now, at least) that echo on means login name, and</div><div class='del'>- * echo off means password.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int PAM_conv (int num_msg, const struct pam_message **msg,</div><div class='del'>-                    struct pam_response **resp, void *appdata_ptr)</div><div class='del'>-{</div><div class='del'>-    int replies = 0;</div><div class='del'>-    struct pam_response *reply = NULL;</div><div class='del'>-</div><div class='del'>-#define COPY_STRING(s) (s) ? strdup(s) : NULL</div><div class='del'>-</div><div class='del'>-    reply = malloc(sizeof(struct pam_response) * num_msg);</div><div class='del'>-    if (!reply) return PAM_CONV_ERR;</div><div class='del'>-</div><div class='del'>-    for (replies = 0; replies &lt; num_msg; replies++) {</div><div class='del'>-        switch (msg[replies]-&gt;msg_style) {</div><div class='del'>-            case PAM_PROMPT_ECHO_ON:</div><div class='del'>-                reply[replies].resp_retcode = PAM_SUCCESS;</div><div class='del'>-                reply[replies].resp = COPY_STRING(PAM_username);</div><div class='del'>-                /* PAM frees resp */</div><div class='del'>-                break;</div><div class='del'>-            case PAM_PROMPT_ECHO_OFF:</div><div class='del'>-                reply[replies].resp_retcode = PAM_SUCCESS;</div><div class='del'>-                reply[replies].resp = COPY_STRING(PAM_password);</div><div class='del'>-                /* PAM frees resp */</div><div class='del'>-                break;</div><div class='del'>-            case PAM_TEXT_INFO:</div><div class='del'>-                /* fall through */</div><div class='del'>-            case PAM_ERROR_MSG:</div><div class='del'>-                /* ignore it, but pam still wants a NULL response... */</div><div class='del'>-                reply[replies].resp_retcode = PAM_SUCCESS;</div><div class='del'>-                reply[replies].resp = NULL;</div><div class='del'>-                break;</div><div class='del'>-            default:       </div><div class='del'>-                /* Must be an error of some sort... */</div><div class='del'>-                free (reply);</div><div class='del'>-                PAM_error = 1;</div><div class='del'>-                return PAM_CONV_ERR;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-    *resp = reply;     </div><div class='del'>-    return PAM_SUCCESS;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static struct pam_conv PAM_conversation = {</div><div class='del'>-    &amp;PAM_conv,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-#endif  /* USE_PAM */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * plogin - Check the user name and password against the system</div><div class='del'>- * password database, and login the user if OK.</div><div class='del'>- *</div><div class='del'>- * returns:</div><div class='del'>- *	UPAP_AUTHNAK: Login failed.</div><div class='del'>- *	UPAP_AUTHACK: Login succeeded.</div><div class='del'>- * In either case, msg points to an appropriate message.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-plogin(user, passwd, msg)</div><div class='del'>-    char *user;</div><div class='del'>-    char *passwd;</div><div class='del'>-    char **msg;</div><div class='del'>-{</div><div class='del'>-    char *tty;</div><div class='del'>-</div><div class='del'>-#ifdef USE_PAM</div><div class='del'>-    int pam_error;</div><div class='del'>-</div><div class='del'>-    pam_error = pam_start ("ppp", user, &amp;PAM_conversation, &amp;pamh);</div><div class='del'>-    if (pam_error != PAM_SUCCESS) {</div><div class='del'>-        *msg = (char *) pam_strerror (pamh, pam_error);</div><div class='del'>-	reopen_log();</div><div class='del'>-	return UPAP_AUTHNAK;</div><div class='del'>-    }</div><div class='del'>-    /*</div><div class='del'>-     * Define the fields for the credential validation</div><div class='del'>-     */</div><div class='del'>-     </div><div class='del'>-    PAM_username = user;</div><div class='del'>-    PAM_password = passwd;</div><div class='del'>-    PAM_error = 0;</div><div class='del'>-    pam_set_item (pamh, PAM_TTY, devnam); /* this might be useful to some modules */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Validate the user</div><div class='del'>-     */</div><div class='del'>-    pam_error = pam_authenticate (pamh, PAM_SILENT);</div><div class='del'>-    if (pam_error == PAM_SUCCESS &amp;&amp; !PAM_error) {    </div><div class='del'>-        pam_error = pam_acct_mgmt (pamh, PAM_SILENT);</div><div class='del'>-        if (pam_error == PAM_SUCCESS)</div><div class='del'>-	    pam_error = pam_open_session (pamh, PAM_SILENT);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *msg = (char *) pam_strerror (pamh, pam_error);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Clean up the mess</div><div class='del'>-     */</div><div class='del'>-    reopen_log();	/* apparently the PAM stuff does closelog() */</div><div class='del'>-    PAM_username = NULL;</div><div class='del'>-    PAM_password = NULL;</div><div class='del'>-    if (pam_error != PAM_SUCCESS)</div><div class='del'>-        return UPAP_AUTHNAK;</div><div class='del'>-#else /* #ifdef USE_PAM */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Use the non-PAM methods directly</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef HAS_SHADOW</div><div class='del'>-    struct spwd *spwd;</div><div class='del'>-    struct spwd *getspnam();</div><div class='del'>-#endif</div><div class='del'>-    struct passwd *pw = getpwnam(user);</div><div class='del'>-</div><div class='del'>-    endpwent();</div><div class='del'>-    if (pw == NULL)</div><div class='del'>-	return (UPAP_AUTHNAK);</div><div class='del'>-</div><div class='del'>-#ifdef HAS_SHADOW</div><div class='del'>-    spwd = getspnam(user);</div><div class='del'>-    endspent();</div><div class='del'>-    if (spwd) {</div><div class='del'>-	/* check the age of the password entry */</div><div class='del'>-	long now = time(NULL) / 86400L;</div><div class='del'>-</div><div class='del'>-	if ((spwd-&gt;sp_expire &gt; 0 &amp;&amp; now &gt;= spwd-&gt;sp_expire)</div><div class='del'>-	    || ((spwd-&gt;sp_max &gt;= 0 &amp;&amp; spwd-&gt;sp_max &lt; 10000)</div><div class='del'>-		&amp;&amp; spwd-&gt;sp_lstchg &gt;= 0</div><div class='del'>-		&amp;&amp; now &gt;= spwd-&gt;sp_lstchg + spwd-&gt;sp_max)) {</div><div class='del'>-	    warn("Password for %s has expired", user);</div><div class='del'>-	    return (UPAP_AUTHNAK);</div><div class='del'>-	}</div><div class='del'>-	pw-&gt;pw_passwd = spwd-&gt;sp_pwdp;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If no passwd, don't let them login.</div><div class='del'>-     */</div><div class='del'>-    if (pw-&gt;pw_passwd == NULL || strlen(pw-&gt;pw_passwd) &lt; 2</div><div class='del'>-	|| strcmp(crypt(passwd, pw-&gt;pw_passwd), pw-&gt;pw_passwd) != 0)</div><div class='del'>-	return (UPAP_AUTHNAK);</div><div class='del'>-</div><div class='del'>-#endif /* #ifdef USE_PAM */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Write a wtmp entry for this user.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    tty = devnam;</div><div class='del'>-    if (strncmp(tty, "/dev/", 5) == 0)</div><div class='del'>-	tty += 5;</div><div class='del'>-//    logwtmp(tty, user, remote_name);		/* Add wtmp login entry */</div><div class='del'>-</div><div class='del'>-#if defined(_PATH_LASTLOG) &amp;&amp; !defined(USE_PAM)</div><div class='del'>-    if (pw != (struct passwd *)NULL) {</div><div class='del'>-	    struct lastlog ll;</div><div class='del'>-	    int fd;</div><div class='del'>-</div><div class='del'>-	    if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) &gt;= 0) {</div><div class='del'>-		(void)lseek(fd, (off_t)(pw-&gt;pw_uid * sizeof(ll)), SEEK_SET);</div><div class='del'>-		memset((void *)&amp;ll, 0, sizeof(ll));</div><div class='del'>-		(void)time(&amp;ll.ll_time);</div><div class='del'>-		(void)strncpy(ll.ll_line, tty, sizeof(ll.ll_line));</div><div class='del'>-		(void)write(fd, (char *)&amp;ll, sizeof(ll));</div><div class='del'>-		(void)close(fd);</div><div class='del'>-	    }</div><div class='del'>-    }</div><div class='del'>-#endif /* _PATH_LASTLOG and not USE_PAM */</div><div class='del'>-</div><div class='del'>-    info("user %s logged in", user);</div><div class='del'>-    logged_in = 1;</div><div class='del'>-</div><div class='del'>-    return (UPAP_AUTHACK);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * plogout - Logout the user.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-plogout()</div><div class='del'>-{</div><div class='del'>-#ifdef USE_PAM</div><div class='del'>-    int pam_error;</div><div class='del'>-</div><div class='del'>-    if (pamh != NULL) {</div><div class='del'>-	pam_error = pam_close_session (pamh, PAM_SILENT);</div><div class='del'>-	pam_end (pamh, pam_error);</div><div class='del'>-	pamh = NULL;</div><div class='del'>-    }</div><div class='del'>-    /* Apparently the pam stuff does closelog(). */</div><div class='del'>-    reopen_log();</div><div class='del'>-#else /* ! USE_PAM */   </div><div class='del'>-    char *tty;</div><div class='del'>-</div><div class='del'>-    tty = devnam;</div><div class='del'>-    if (strncmp(tty, "/dev/", 5) == 0)</div><div class='del'>-	tty += 5;</div><div class='del'>-//    logwtmp(tty, "", "");		/* Wipe out utmp logout entry */</div><div class='del'>-#endif /* ! USE_PAM */</div><div class='del'>-    logged_in = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * null_login - Check if a username of "" and a password of "" are</div><div class='del'>- * acceptable, and iff so, set the list of acceptable IP addresses</div><div class='del'>- * and return 1.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-null_login(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    char *filename;</div><div class='del'>-    FILE *f;</div><div class='del'>-    int i, ret;</div><div class='del'>-    struct wordlist *addrs, *opts;</div><div class='del'>-    char secret[MAXWORDLEN];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Open the file of pap secrets and scan for a suitable secret.</div><div class='del'>-     */</div><div class='del'>-    filename = _PATH_UPAPFILE;</div><div class='del'>-    addrs = NULL;</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-    check_access(f, filename);</div><div class='del'>-</div><div class='del'>-    i = scan_authfile(f, "", our_name, secret, &amp;addrs, &amp;opts, filename);</div><div class='del'>-    ret = i &gt;= 0 &amp;&amp; secret[0] == 0;</div><div class='del'>-    BZERO(secret, sizeof(secret));</div><div class='del'>-</div><div class='del'>-    if (ret)</div><div class='del'>-	set_allowed_addrs(unit, addrs, opts);</div><div class='del'>-    else if (opts != 0)</div><div class='del'>-	free_wordlist(opts);</div><div class='del'>-    if (addrs != 0)</div><div class='del'>-	free_wordlist(addrs);</div><div class='del'>-</div><div class='del'>-    fclose(f);</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_pap_passwd - get a password for authenticating ourselves with</div><div class='del'>- * our peer using PAP.  Returns 1 on success, 0 if no suitable password</div><div class='del'>- * could be found.</div><div class='del'>- * Assumes passwd points to MAXSECRETLEN bytes of space (if non-null).</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-get_pap_passwd(passwd)</div><div class='del'>-    char *passwd;</div><div class='del'>-{</div><div class='del'>-    char *filename;</div><div class='del'>-    FILE *f;</div><div class='del'>-    int ret;</div><div class='del'>-    char secret[MAXWORDLEN];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check whether a plugin wants to supply this.</div><div class='del'>-     */</div><div class='del'>-    if (pap_passwd_hook) {</div><div class='del'>-	ret = (*pap_passwd_hook)(user, passwd);</div><div class='del'>-	if (ret &gt;= 0)</div><div class='del'>-	    return ret;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    filename = _PATH_UPAPFILE;</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-    check_access(f, filename);</div><div class='del'>-    ret = scan_authfile(f, user,</div><div class='del'>-			(remote_name[0]? remote_name: NULL),</div><div class='del'>-			secret, NULL, NULL, filename);</div><div class='del'>-    fclose(f);</div><div class='del'>-    if (ret &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (passwd != NULL)</div><div class='del'>-	strlcpy(passwd, secret, MAXSECRETLEN);</div><div class='del'>-    BZERO(secret, sizeof(secret));</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_pap_secret - check whether we have a PAP file with any</div><div class='del'>- * secrets that we could possibly use for authenticating the peer.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-have_pap_secret(lacks_ipp)</div><div class='del'>-    int *lacks_ipp;</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    int ret;</div><div class='del'>-    char *filename;</div><div class='del'>-    struct wordlist *addrs;</div><div class='del'>-</div><div class='del'>-    /* let the plugin decide, if there is one */</div><div class='del'>-    if (pap_check_hook) {</div><div class='del'>-	ret = (*pap_check_hook)();</div><div class='del'>-	if (ret &gt;= 0)</div><div class='del'>-	    return ret;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    filename = _PATH_UPAPFILE;</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    ret = scan_authfile(f, (explicit_remote? remote_name: NULL), our_name,</div><div class='del'>-			NULL, &amp;addrs, NULL, filename);</div><div class='del'>-    fclose(f);</div><div class='del'>-    if (ret &gt;= 0 &amp;&amp; !some_ip_ok(addrs)) {</div><div class='del'>-	if (lacks_ipp != 0)</div><div class='del'>-	    *lacks_ipp = 1;</div><div class='del'>-	ret = -1;</div><div class='del'>-    }</div><div class='del'>-    if (addrs != 0)</div><div class='del'>-	free_wordlist(addrs);</div><div class='del'>-</div><div class='del'>-    return ret &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_chap_secret - check whether we have a CHAP file with a</div><div class='del'>- * secret that we could possibly use for authenticating `client'</div><div class='del'>- * on `server'.  Either can be the null string, meaning we don't</div><div class='del'>- * know the identity yet.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-have_chap_secret(client, server, need_ip, lacks_ipp)</div><div class='del'>-    char *client;</div><div class='del'>-    char *server;</div><div class='del'>-    int need_ip;</div><div class='del'>-    int *lacks_ipp;</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    int ret;</div><div class='del'>-    char *filename;</div><div class='del'>-    struct wordlist *addrs;</div><div class='del'>-</div><div class='del'>-    filename = _PATH_CHAPFILE;</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    if (f == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (client != NULL &amp;&amp; client[0] == 0)</div><div class='del'>-	client = NULL;</div><div class='del'>-    else if (server != NULL &amp;&amp; server[0] == 0)</div><div class='del'>-	server = NULL;</div><div class='del'>-</div><div class='del'>-    ret = scan_authfile(f, client, server, NULL, &amp;addrs, NULL, filename);</div><div class='del'>-    fclose(f);</div><div class='del'>-    if (ret &gt;= 0 &amp;&amp; need_ip &amp;&amp; !some_ip_ok(addrs)) {</div><div class='del'>-	if (lacks_ipp != 0)</div><div class='del'>-	    *lacks_ipp = 1;</div><div class='del'>-	ret = -1;</div><div class='del'>-    }</div><div class='del'>-    if (addrs != 0)</div><div class='del'>-	free_wordlist(addrs);</div><div class='del'>-</div><div class='del'>-    return ret &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_secret - open the CHAP secret file and return the secret</div><div class='del'>- * for authenticating the given client on the given server.</div><div class='del'>- * (We could be either client or server).</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_secret(unit, client, server, secret, secret_len, am_server)</div><div class='del'>-    int unit;</div><div class='del'>-    char *client;</div><div class='del'>-    char *server;</div><div class='del'>-    char *secret;</div><div class='del'>-    int *secret_len;</div><div class='del'>-    int am_server;</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    int ret, len;</div><div class='del'>-    char *filename;</div><div class='del'>-    struct wordlist *addrs, *opts;</div><div class='del'>-    char secbuf[MAXWORDLEN];</div><div class='del'>-</div><div class='del'>-    if (!am_server &amp;&amp; passwd[0] != 0) {</div><div class='del'>-	strlcpy(secbuf, passwd, sizeof(secbuf));</div><div class='del'>-    } else {</div><div class='del'>-	filename = _PATH_CHAPFILE;</div><div class='del'>-	addrs = NULL;</div><div class='del'>-	secbuf[0] = 0;</div><div class='del'>-</div><div class='del'>-	f = fopen(filename, "r");</div><div class='del'>-	if (f == NULL) {</div><div class='del'>-	    error("Can't open chap secret file %s: %m", filename);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	check_access(f, filename);</div><div class='del'>-</div><div class='del'>-	ret = scan_authfile(f, client, server, secbuf, &amp;addrs, &amp;opts, filename);</div><div class='del'>-	fclose(f);</div><div class='del'>-	if (ret &lt; 0)</div><div class='del'>-	    return 0;</div><div class='del'>-</div><div class='del'>-	if (am_server)</div><div class='del'>-	    set_allowed_addrs(unit, addrs, opts);</div><div class='del'>-	else if (opts != 0)</div><div class='del'>-	    free_wordlist(opts);</div><div class='del'>-	if (addrs != 0)</div><div class='del'>-	    free_wordlist(addrs);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    len = strlen(secbuf);</div><div class='del'>-    if (len &gt; MAXSECRETLEN) {</div><div class='del'>-	error("Secret for %s on %s is too long", client, server);</div><div class='del'>-	len = MAXSECRETLEN;</div><div class='del'>-    }</div><div class='del'>-    BCOPY(secbuf, secret, len);</div><div class='del'>-    BZERO(secbuf, sizeof(secbuf));</div><div class='del'>-    *secret_len = len;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * set_allowed_addrs() - set the list of allowed addresses.</div><div class='del'>- * Also looks for `--' indicating options to apply for this peer</div><div class='del'>- * and leaves the following words in extra_options.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-set_allowed_addrs(unit, addrs, opts)</div><div class='del'>-    int unit;</div><div class='del'>-    struct wordlist *addrs;</div><div class='del'>-    struct wordlist *opts;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-    struct wordlist *ap, **plink;</div><div class='del'>-    struct permitted_ip *ip;</div><div class='del'>-    char *ptr_word, *ptr_mask;</div><div class='del'>-    struct hostent *hp;</div><div class='del'>-    u_int32_t a, mask, offset;</div><div class='del'>-    struct ipcp_options *wo = &amp;ipcp_wantoptions[unit];</div><div class='del'>-    u_int32_t suggested_ip = 0;</div><div class='del'>-</div><div class='del'>-    if (addresses[unit] != NULL)</div><div class='del'>-	free(addresses[unit]);</div><div class='del'>-    addresses[unit] = NULL;</div><div class='del'>-    if (extra_options != NULL)</div><div class='del'>-	free_wordlist(extra_options);</div><div class='del'>-    extra_options = opts;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Count the number of IP addresses given.</div><div class='del'>-     */</div><div class='del'>-    n = wordlist_count(addrs) + wordlist_count(noauth_addrs);</div><div class='del'>-    if (n == 0)</div><div class='del'>-	return;</div><div class='del'>-    ip = (struct permitted_ip *) malloc((n + 1) * sizeof(struct permitted_ip));</div><div class='del'>-    if (ip == 0)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    /* temporarily append the noauth_addrs list to addrs */</div><div class='del'>-    for (plink = &amp;addrs; *plink != NULL; plink = &amp;(*plink)-&gt;next)</div><div class='del'>-	;</div><div class='del'>-    *plink = noauth_addrs;</div><div class='del'>-</div><div class='del'>-    n = 0;</div><div class='del'>-    for (ap = addrs; ap != NULL; ap = ap-&gt;next) {</div><div class='del'>-	/* "-" means no addresses authorized, "*" means any address allowed */</div><div class='del'>-	ptr_word = ap-&gt;word;</div><div class='del'>-	if (strcmp(ptr_word, "-") == 0)</div><div class='del'>-	    break;</div><div class='del'>-	if (strcmp(ptr_word, "*") == 0) {</div><div class='del'>-	    ip[n].permit = 1;</div><div class='del'>-	    ip[n].base = ip[n].mask = 0;</div><div class='del'>-	    ++n;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	ip[n].permit = 1;</div><div class='del'>-	if (*ptr_word == '!') {</div><div class='del'>-	    ip[n].permit = 0;</div><div class='del'>-	    ++ptr_word;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	mask = ~ (u_int32_t) 0;</div><div class='del'>-	offset = 0;</div><div class='del'>-	ptr_mask = strchr (ptr_word, '/');</div><div class='del'>-	if (ptr_mask != NULL) {</div><div class='del'>-	    int bit_count;</div><div class='del'>-	    char *endp;</div><div class='del'>-</div><div class='del'>-	    bit_count = (int) strtol (ptr_mask+1, &amp;endp, 10);</div><div class='del'>-	    if (bit_count &lt;= 0 || bit_count &gt; 32) {</div><div class='del'>-		warn("invalid address length %v in auth. address list",</div><div class='del'>-		     ptr_mask+1);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	    bit_count = 32 - bit_count;	/* # bits in host part */</div><div class='del'>-	    if (*endp == '+') {</div><div class='del'>-		offset = ifunit + 1;</div><div class='del'>-		++endp;</div><div class='del'>-	    }</div><div class='del'>-	    if (*endp != 0) {</div><div class='del'>-		warn("invalid address length syntax: %v", ptr_mask+1);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	    *ptr_mask = '\0';</div><div class='del'>-	    mask &lt;&lt;= bit_count;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	hp = gethostbyname(ptr_word);</div><div class='del'>-	if (hp != NULL &amp;&amp; hp-&gt;h_addrtype == AF_INET) {</div><div class='del'>-	    a = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-	} else {</div><div class='del'>-		printf("*** getnetbyname is unsupported, please report bug! ***\n");</div><div class='del'>-		return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ptr_mask != NULL)</div><div class='del'>-	    *ptr_mask = '/';</div><div class='del'>-</div><div class='del'>-	if (a == (u_int32_t)-1L) {</div><div class='del'>-	    warn("unknown host %s in auth. address list", ap-&gt;word);</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	if (offset != 0) {</div><div class='del'>-	    if (offset &gt;= ~mask) {</div><div class='del'>-		warn("interface unit %d too large for subnet %v",</div><div class='del'>-		     ifunit, ptr_word);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-	    a = htonl((ntohl(a) &amp; mask) + offset);</div><div class='del'>-	    mask = ~(u_int32_t)0;</div><div class='del'>-	}</div><div class='del'>-	ip[n].mask = htonl(mask);</div><div class='del'>-	ip[n].base = a &amp; ip[n].mask;</div><div class='del'>-	++n;</div><div class='del'>-	if (~mask == 0 &amp;&amp; suggested_ip == 0)</div><div class='del'>-	    suggested_ip = a;</div><div class='del'>-    }</div><div class='del'>-    *plink = NULL;</div><div class='del'>-</div><div class='del'>-    ip[n].permit = 0;		/* make the last entry forbid all addresses */</div><div class='del'>-    ip[n].base = 0;		/* to terminate the list */</div><div class='del'>-    ip[n].mask = 0;</div><div class='del'>-</div><div class='del'>-    addresses[unit] = ip;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If the address given for the peer isn't authorized, or if</div><div class='del'>-     * the user hasn't given one, AND there is an authorized address</div><div class='del'>-     * which is a single host, then use that if we find one.</div><div class='del'>-     */</div><div class='del'>-    if (suggested_ip != 0</div><div class='del'>-	&amp;&amp; (wo-&gt;hisaddr == 0 || !auth_ip_addr(unit, wo-&gt;hisaddr))) {</div><div class='del'>-	wo-&gt;hisaddr = suggested_ip;</div><div class='del'>-	/*</div><div class='del'>-	 * Do we insist on this address?  No, if there are other</div><div class='del'>-	 * addresses authorized than the suggested one.</div><div class='del'>-	 */</div><div class='del'>-	if (n &gt; 1)</div><div class='del'>-	    wo-&gt;accept_remote = 1;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_ip_addr - check whether the peer is authorized to use</div><div class='del'>- * a given IP address.  Returns 1 if authorized, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-auth_ip_addr(unit, addr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-    int ok;</div><div class='del'>-</div><div class='del'>-    /* don't allow loopback or multicast address */</div><div class='del'>-    if (bad_ip_adrs(addr))</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (addresses[unit] != NULL) {</div><div class='del'>-	ok = ip_addr_check(addr, addresses[unit]);</div><div class='del'>-	if (ok &gt;= 0)</div><div class='del'>-	    return ok;</div><div class='del'>-    }</div><div class='del'>-    if (auth_required)</div><div class='del'>-	return 0;		/* no addresses authorized */</div><div class='del'>-    return allow_any_ip || privileged || !have_route_to(addr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ip_addr_check(addr, addrs)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-    struct permitted_ip *addrs;</div><div class='del'>-{</div><div class='del'>-    for (; ; ++addrs)</div><div class='del'>-	if ((addr &amp; addrs-&gt;mask) == addrs-&gt;base)</div><div class='del'>-	    return addrs-&gt;permit;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bad_ip_adrs - return 1 if the IP address is one we don't want</div><div class='del'>- * to use, such as an address in the loopback net or a multicast address.</div><div class='del'>- * addr is in network byte order.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-bad_ip_adrs(addr)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-    addr = ntohl(addr);</div><div class='del'>-    return (addr &gt;&gt; IN_CLASSA_NSHIFT) == IN_LOOPBACKNET</div><div class='del'>-	|| IN_MULTICAST(addr) || IN_BADCLASS(addr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * some_ip_ok - check a wordlist to see if it authorizes any</div><div class='del'>- * IP address(es).</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-some_ip_ok(addrs)</div><div class='del'>-    struct wordlist *addrs;</div><div class='del'>-{</div><div class='del'>-    for (; addrs != 0; addrs = addrs-&gt;next) {</div><div class='del'>-	if (addrs-&gt;word[0] == '-')</div><div class='del'>-	    break;</div><div class='del'>-	if (addrs-&gt;word[0] != '!')</div><div class='del'>-	    return 1;		/* some IP address is allowed */</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * check_access - complain if a secret file has too-liberal permissions.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-check_access(f, filename)</div><div class='del'>-    FILE *f;</div><div class='del'>-    char *filename;</div><div class='del'>-{</div><div class='del'>-    struct stat sbuf;</div><div class='del'>-</div><div class='del'>-    if (fstat(fileno(f), &amp;sbuf) &lt; 0) {</div><div class='del'>-	warn("cannot stat secret file %s: %m", filename);</div><div class='del'>-    } else if ((sbuf.st_mode &amp; (S_IRWXG | S_IRWXO)) != 0) {</div><div class='del'>-	warn("Warning - secret file %s has world and/or group access",</div><div class='del'>-	     filename);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * scan_authfile - Scan an authorization file for a secret suitable</div><div class='del'>- * for authenticating `client' on `server'.  The return value is -1</div><div class='del'>- * if no secret is found, otherwise &gt;= 0.  The return value has</div><div class='del'>- * NONWILD_CLIENT set if the secret didn't have "*" for the client, and</div><div class='del'>- * NONWILD_SERVER set if the secret didn't have "*" for the server.</div><div class='del'>- * Any following words on the line up to a "--" (i.e. address authorization</div><div class='del'>- * info) are placed in a wordlist and returned in *addrs.  Any</div><div class='del'>- * following words (extra options) are placed in a wordlist and</div><div class='del'>- * returned in *opts.</div><div class='del'>- * We assume secret is NULL or points to MAXWORDLEN bytes of space.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-scan_authfile(f, client, server, secret, addrs, opts, filename)</div><div class='del'>-    FILE *f;</div><div class='del'>-    char *client;</div><div class='del'>-    char *server;</div><div class='del'>-    char *secret;</div><div class='del'>-    struct wordlist **addrs;</div><div class='del'>-    struct wordlist **opts;</div><div class='del'>-    char *filename;</div><div class='del'>-{</div><div class='del'>-    int newline, xxx;</div><div class='del'>-    int got_flag, best_flag;</div><div class='del'>-    FILE *sf;</div><div class='del'>-    struct wordlist *ap, *addr_list, *alist, **app;</div><div class='del'>-    char word[MAXWORDLEN];</div><div class='del'>-    char atfile[MAXWORDLEN];</div><div class='del'>-    char lsecret[MAXWORDLEN];</div><div class='del'>-</div><div class='del'>-    if (addrs != NULL)</div><div class='del'>-	*addrs = NULL;</div><div class='del'>-    if (opts != NULL)</div><div class='del'>-	*opts = NULL;</div><div class='del'>-    addr_list = NULL;</div><div class='del'>-    if (!getword(f, word, &amp;newline, filename))</div><div class='del'>-	return -1;		/* file is empty??? */</div><div class='del'>-    newline = 1;</div><div class='del'>-    best_flag = -1;</div><div class='del'>-    for (;;) {</div><div class='del'>-	/*</div><div class='del'>-	 * Skip until we find a word at the start of a line.</div><div class='del'>-	 */</div><div class='del'>-	while (!newline &amp;&amp; getword(f, word, &amp;newline, filename))</div><div class='del'>-	    ;</div><div class='del'>-	if (!newline)</div><div class='del'>-	    break;		/* got to end of file */</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Got a client - check if it's a match or a wildcard.</div><div class='del'>-	 */</div><div class='del'>-	got_flag = 0;</div><div class='del'>-	if (client != NULL &amp;&amp; strcmp(word, client) != 0 &amp;&amp; !ISWILD(word)) {</div><div class='del'>-	    newline = 0;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	if (!ISWILD(word))</div><div class='del'>-	    got_flag = NONWILD_CLIENT;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Now get a server and check if it matches.</div><div class='del'>-	 */</div><div class='del'>-	if (!getword(f, word, &amp;newline, filename))</div><div class='del'>-	    break;</div><div class='del'>-	if (newline)</div><div class='del'>-	    continue;</div><div class='del'>-	if (!ISWILD(word)) {</div><div class='del'>-	    if (server != NULL &amp;&amp; strcmp(word, server) != 0)</div><div class='del'>-		continue;</div><div class='del'>-	    got_flag |= NONWILD_SERVER;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Got some sort of a match - see if it's better than what</div><div class='del'>-	 * we have already.</div><div class='del'>-	 */</div><div class='del'>-	if (got_flag &lt;= best_flag)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Get the secret.</div><div class='del'>-	 */</div><div class='del'>-	if (!getword(f, word, &amp;newline, filename))</div><div class='del'>-	    break;</div><div class='del'>-	if (newline)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	if (secret != NULL) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Special syntax: @/pathname means read secret from file.</div><div class='del'>-	     */</div><div class='del'>-	    if (word[0] == '@' &amp;&amp; word[1] == '/') {</div><div class='del'>-		strlcpy(atfile, word+1, sizeof(atfile));</div><div class='del'>-		if ((sf = fopen(atfile, "r")) == NULL) {</div><div class='del'>-		    warn("can't open indirect secret file %s", atfile);</div><div class='del'>-		    continue;</div><div class='del'>-		}</div><div class='del'>-		check_access(sf, atfile);</div><div class='del'>-		if (!getword(sf, word, &amp;xxx, atfile)) {</div><div class='del'>-		    warn("no secret in indirect secret file %s", atfile);</div><div class='del'>-		    fclose(sf);</div><div class='del'>-		    continue;</div><div class='del'>-		}</div><div class='del'>-		fclose(sf);</div><div class='del'>-	    }</div><div class='del'>-	    strlcpy(lsecret, word, sizeof(lsecret));</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Now read address authorization info and make a wordlist.</div><div class='del'>-	 */</div><div class='del'>-	app = &amp;alist;</div><div class='del'>-	for (;;) {</div><div class='del'>-	    if (!getword(f, word, &amp;newline, filename) || newline)</div><div class='del'>-		break;</div><div class='del'>-	    ap = (struct wordlist *)</div><div class='del'>-		    malloc(sizeof(struct wordlist) + strlen(word) + 1);</div><div class='del'>-	    if (ap == NULL)</div><div class='del'>-		novm("authorized addresses");</div><div class='del'>-	    ap-&gt;word = (char *) (ap + 1);</div><div class='del'>-	    strcpy(ap-&gt;word, word);</div><div class='del'>-	    *app = ap;</div><div class='del'>-	    app = &amp;ap-&gt;next;</div><div class='del'>-	}</div><div class='del'>-	*app = NULL;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * This is the best so far; remember it.</div><div class='del'>-	 */</div><div class='del'>-	best_flag = got_flag;</div><div class='del'>-	if (addr_list)</div><div class='del'>-	    free_wordlist(addr_list);</div><div class='del'>-	addr_list = alist;</div><div class='del'>-	if (secret != NULL)</div><div class='del'>-	    strlcpy(secret, lsecret, MAXWORDLEN);</div><div class='del'>-</div><div class='del'>-	if (!newline)</div><div class='del'>-	    break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* scan for a -- word indicating the start of options */</div><div class='del'>-    for (app = &amp;addr_list; (ap = *app) != NULL; app = &amp;ap-&gt;next)</div><div class='del'>-	if (strcmp(ap-&gt;word, "--") == 0)</div><div class='del'>-	    break;</div><div class='del'>-    /* ap = start of options */</div><div class='del'>-    if (ap != NULL) {</div><div class='del'>-	ap = ap-&gt;next;		/* first option */</div><div class='del'>-	free(*app);			/* free the "--" word */</div><div class='del'>-	*app = NULL;		/* terminate addr list */</div><div class='del'>-    }</div><div class='del'>-    if (opts != NULL)</div><div class='del'>-	*opts = ap;</div><div class='del'>-    else if (ap != NULL)</div><div class='del'>-	free_wordlist(ap);</div><div class='del'>-    if (addrs != NULL)</div><div class='del'>-	*addrs = addr_list;</div><div class='del'>-    else if (addr_list != NULL)</div><div class='del'>-	free_wordlist(addr_list);</div><div class='del'>-</div><div class='del'>-    return best_flag;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * wordlist_count - return the number of items in a wordlist</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-wordlist_count(wp)</div><div class='del'>-    struct wordlist *wp;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    for (n = 0; wp != NULL; wp = wp-&gt;next)</div><div class='del'>-	++n;</div><div class='del'>-    return n;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * free_wordlist - release memory allocated for a wordlist.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-free_wordlist(wp)</div><div class='del'>-    struct wordlist *wp;</div><div class='del'>-{</div><div class='del'>-    struct wordlist *next;</div><div class='del'>-</div><div class='del'>-    while (wp != NULL) {</div><div class='del'>-	next = wp-&gt;next;</div><div class='del'>-	free(wp);</div><div class='del'>-	wp = next;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_script_done - called when the auth-up or auth-down script</div><div class='del'>- * has finished.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-auth_script_done(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    auth_script_pid = 0;</div><div class='del'>-    switch (auth_script_state) {</div><div class='del'>-    case s_up:</div><div class='del'>-	if (auth_state == s_down) {</div><div class='del'>-	    auth_script_state = s_down;</div><div class='del'>-	    auth_script(_PATH_AUTHDOWN);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case s_down:</div><div class='del'>-	if (auth_state == s_up) {</div><div class='del'>-	    auth_script_state = s_up;</div><div class='del'>-	    auth_script(_PATH_AUTHUP);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * auth_script - execute a script with arguments</div><div class='del'>- * interface-name peer-name real-user tty speed</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-auth_script(script)</div><div class='del'>-    char *script;</div><div class='del'>-{</div><div class='del'>-    char strspeed[32];</div><div class='del'>-    struct passwd *pw;</div><div class='del'>-    char struid[32];</div><div class='del'>-    char *user_name;</div><div class='del'>-    char *argv[8];</div><div class='del'>-</div><div class='del'>-    if ((pw = getpwuid(getuid())) != NULL &amp;&amp; pw-&gt;pw_name != NULL)</div><div class='del'>-	user_name = pw-&gt;pw_name;</div><div class='del'>-    else {</div><div class='del'>-	slprintf(struid, sizeof(struid), "%d", getuid());</div><div class='del'>-	user_name = struid;</div><div class='del'>-    }</div><div class='del'>-    slprintf(strspeed, sizeof(strspeed), "%d", baud_rate);</div><div class='del'>-</div><div class='del'>-    argv[0] = script;</div><div class='del'>-    argv[1] = ifname;</div><div class='del'>-    argv[2] = peer_authname;</div><div class='del'>-    argv[3] = user_name;</div><div class='del'>-    argv[4] = devnam;</div><div class='del'>-    argv[5] = strspeed;</div><div class='del'>-    argv[6] = NULL;</div><div class='del'>-</div><div class='del'>-    auth_script_pid = run_program(script, argv, 0, auth_script_done, NULL);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/cbcp.c b/mdk-stage1/ppp/pppd/cbcp.c<br/>deleted file mode 100644<br/>index 8c57b3cde..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/cbcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/cbcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,456 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * cbcp - Call Back Configuration Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1995 Pedro Roque Marques</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Pedro Roque Marques.  The name of the author may not be used to</div><div class='del'>- * endorse or promote products derived from this software without</div><div class='del'>- * specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "cbcp.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Options.</div><div class='del'>- */</div><div class='del'>-static int setcbcp __P((char **));</div><div class='del'>-</div><div class='del'>-static option_t cbcp_option_list[] = {</div><div class='del'>-    { "callback", o_special, setcbcp,</div><div class='del'>-      "Ask for callback", OPT_PRIO | OPT_A2STRVAL, &amp;cbcp[0].us_number },</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points.</div><div class='del'>- */</div><div class='del'>-static void cbcp_init      __P((int unit));</div><div class='del'>-static void cbcp_open      __P((int unit));</div><div class='del'>-static void cbcp_lowerup   __P((int unit));</div><div class='del'>-static void cbcp_input     __P((int unit, u_char *pkt, int len));</div><div class='del'>-static void cbcp_protrej   __P((int unit));</div><div class='del'>-static int  cbcp_printpkt  __P((u_char *pkt, int len,</div><div class='del'>-				void (*printer) __P((void *, char *, ...)),</div><div class='del'>-				void *arg));</div><div class='del'>-</div><div class='del'>-struct protent cbcp_protent = {</div><div class='del'>-    PPP_CBCP,</div><div class='del'>-    cbcp_init,</div><div class='del'>-    cbcp_input,</div><div class='del'>-    cbcp_protrej,</div><div class='del'>-    cbcp_lowerup,</div><div class='del'>-    NULL,</div><div class='del'>-    cbcp_open,</div><div class='del'>-    NULL,</div><div class='del'>-    cbcp_printpkt,</div><div class='del'>-    NULL,</div><div class='del'>-    0,</div><div class='del'>-    "CBCP",</div><div class='del'>-    NULL,</div><div class='del'>-    cbcp_option_list,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-cbcp_state cbcp[NUM_PPP];	</div><div class='del'>-</div><div class='del'>-/* internal prototypes */</div><div class='del'>-</div><div class='del'>-static void cbcp_recvreq __P((cbcp_state *us, char *pckt, int len));</div><div class='del'>-static void cbcp_resp __P((cbcp_state *us));</div><div class='del'>-static void cbcp_up __P((cbcp_state *us));</div><div class='del'>-static void cbcp_recvack __P((cbcp_state *us, char *pckt, int len));</div><div class='del'>-static void cbcp_send __P((cbcp_state *us, u_char code, u_char *buf, int len));</div><div class='del'>-</div><div class='del'>-/* option processing */</div><div class='del'>-static int</div><div class='del'>-setcbcp(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    lcp_wantoptions[0].neg_cbcp = 1;</div><div class='del'>-    cbcp_protent.enabled_flag = 1;</div><div class='del'>-    cbcp[0].us_number = strdup(*argv);</div><div class='del'>-    if (cbcp[0].us_number == 0)</div><div class='del'>-	novm("callback number");</div><div class='del'>-    cbcp[0].us_type |= (1 &lt;&lt; CB_CONF_USER);</div><div class='del'>-    cbcp[0].us_type |= (1 &lt;&lt; CB_CONF_ADMIN);</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* init state */</div><div class='del'>-static void</div><div class='del'>-cbcp_init(iface)</div><div class='del'>-    int iface;</div><div class='del'>-{</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-</div><div class='del'>-    us = &amp;cbcp[iface];</div><div class='del'>-    memset(us, 0, sizeof(cbcp_state));</div><div class='del'>-    us-&gt;us_unit = iface;</div><div class='del'>-    us-&gt;us_type |= (1 &lt;&lt; CB_CONF_NO);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* lower layer is up */</div><div class='del'>-static void</div><div class='del'>-cbcp_lowerup(iface)</div><div class='del'>-    int iface;</div><div class='del'>-{</div><div class='del'>-    cbcp_state *us = &amp;cbcp[iface];</div><div class='del'>-</div><div class='del'>-    dbglog("cbcp_lowerup");</div><div class='del'>-    dbglog("want: %d", us-&gt;us_type);</div><div class='del'>-</div><div class='del'>-    if (us-&gt;us_type == CB_CONF_USER)</div><div class='del'>-        dbglog("phone no: %s", us-&gt;us_number);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-cbcp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    dbglog("cbcp_open");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* process an incomming packet */</div><div class='del'>-static void</div><div class='del'>-cbcp_input(unit, inpacket, pktlen)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *inpacket;</div><div class='del'>-    int pktlen;</div><div class='del'>-{</div><div class='del'>-    u_char *inp;</div><div class='del'>-    u_char code, id;</div><div class='del'>-    u_short len;</div><div class='del'>-</div><div class='del'>-    cbcp_state *us = &amp;cbcp[unit];</div><div class='del'>-</div><div class='del'>-    inp = inpacket;</div><div class='del'>-</div><div class='del'>-    if (pktlen &lt; CBCP_MINLEN) {</div><div class='del'>-        error("CBCP packet is too small");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    GETCHAR(code, inp);</div><div class='del'>-    GETCHAR(id, inp);</div><div class='del'>-    GETSHORT(len, inp);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    if (len &gt; pktlen) {</div><div class='del'>-        error("CBCP packet: invalid length");</div><div class='del'>-        return;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    len -= CBCP_MINLEN;</div><div class='del'>- </div><div class='del'>-    switch(code) {</div><div class='del'>-    case CBCP_REQ:</div><div class='del'>-        us-&gt;us_id = id;</div><div class='del'>-	cbcp_recvreq(us, inp, len);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CBCP_RESP:</div><div class='del'>-	dbglog("CBCP_RESP received");</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CBCP_ACK:</div><div class='del'>-	if (id != us-&gt;us_id)</div><div class='del'>-	    dbglog("id doesn't match: expected %d recv %d",</div><div class='del'>-		   us-&gt;us_id, id);</div><div class='del'>-</div><div class='del'>-	cbcp_recvack(us, inp, len);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* protocol was rejected by foe */</div><div class='del'>-void cbcp_protrej(int iface)</div><div class='del'>-{</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-char *cbcp_codenames[] = {</div><div class='del'>-    "Request", "Response", "Ack"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-char *cbcp_optionnames[] = {</div><div class='del'>-    "NoCallback",</div><div class='del'>-    "UserDefined",</div><div class='del'>-    "AdminDefined",</div><div class='del'>-    "List"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* pretty print a packet */</div><div class='del'>-static int</div><div class='del'>-cbcp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, opt, id, len, olen, delay;</div><div class='del'>-    u_char *pstart;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    pstart = p;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(cbcp_codenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", cbcp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code); </div><div class='del'>-</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CBCP_REQ:</div><div class='del'>-    case CBCP_RESP:</div><div class='del'>-    case CBCP_ACK:</div><div class='del'>-        while(len &gt;= 2) {</div><div class='del'>-	    GETCHAR(opt, p);</div><div class='del'>-	    GETCHAR(olen, p);</div><div class='del'>-</div><div class='del'>-	    if (olen &lt; 2 || olen &gt; len) {</div><div class='del'>-	        break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= olen;</div><div class='del'>-</div><div class='del'>-	    if (opt &gt;= 1 &amp;&amp; opt &lt;= sizeof(cbcp_optionnames) / sizeof(char *))</div><div class='del'>-	    	printer(arg, " %s", cbcp_optionnames[opt-1]);</div><div class='del'>-	    else</div><div class='del'>-	        printer(arg, " option=0x%x", opt); </div><div class='del'>-</div><div class='del'>-	    if (olen &gt; 2) {</div><div class='del'>-	        GETCHAR(delay, p);</div><div class='del'>-		printer(arg, " delay = %d", delay);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if (olen &gt; 3) {</div><div class='del'>-	        int addrt;</div><div class='del'>-		char str[256];</div><div class='del'>-</div><div class='del'>-		GETCHAR(addrt, p);</div><div class='del'>-		memcpy(str, p, olen - 4);</div><div class='del'>-		str[olen - 4] = 0;</div><div class='del'>-		printer(arg, " number = %s", str);</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    for (; len &gt; 0; --len) {</div><div class='del'>-	GETCHAR(code, p);</div><div class='del'>-	printer(arg, " %.2x", code);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return p - pstart;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* received CBCP request */</div><div class='del'>-static void</div><div class='del'>-cbcp_recvreq(us, pckt, pcktlen)</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-    char *pckt;</div><div class='del'>-    int pcktlen;</div><div class='del'>-{</div><div class='del'>-    u_char type, opt_len, delay, addr_type;</div><div class='del'>-    char address[256];</div><div class='del'>-    int len = pcktlen;</div><div class='del'>-</div><div class='del'>-    address[0] = 0;</div><div class='del'>-</div><div class='del'>-    while (len) {</div><div class='del'>-        dbglog("length: %d", len);</div><div class='del'>-</div><div class='del'>-	GETCHAR(type, pckt);</div><div class='del'>-	GETCHAR(opt_len, pckt);</div><div class='del'>-</div><div class='del'>-	if (opt_len &gt; 2)</div><div class='del'>-	    GETCHAR(delay, pckt);</div><div class='del'>-</div><div class='del'>-	us-&gt;us_allowed |= (1 &lt;&lt; type);</div><div class='del'>-</div><div class='del'>-	switch(type) {</div><div class='del'>-	case CB_CONF_NO:</div><div class='del'>-	    dbglog("no callback allowed");</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CB_CONF_USER:</div><div class='del'>-	    dbglog("user callback allowed");</div><div class='del'>-	    if (opt_len &gt; 4) {</div><div class='del'>-	        GETCHAR(addr_type, pckt);</div><div class='del'>-		memcpy(address, pckt, opt_len - 4);</div><div class='del'>-		address[opt_len - 4] = 0;</div><div class='del'>-		if (address[0])</div><div class='del'>-		    dbglog("address: %s", address);</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CB_CONF_ADMIN:</div><div class='del'>-	    dbglog("user admin defined allowed");</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CB_CONF_LIST:</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	len -= opt_len;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    cbcp_resp(us);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-cbcp_resp(us)</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-{</div><div class='del'>-    u_char cb_type;</div><div class='del'>-    u_char buf[256];</div><div class='del'>-    u_char *bufp = buf;</div><div class='del'>-    int len = 0;</div><div class='del'>-</div><div class='del'>-    cb_type = us-&gt;us_allowed &amp; us-&gt;us_type;</div><div class='del'>-    dbglog("cbcp_resp cb_type=%d", cb_type);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    if (!cb_type)</div><div class='del'>-        lcp_down(us-&gt;us_unit);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (cb_type &amp; ( 1 &lt;&lt; CB_CONF_USER ) ) {</div><div class='del'>-	dbglog("cbcp_resp CONF_USER");</div><div class='del'>-	PUTCHAR(CB_CONF_USER, bufp);</div><div class='del'>-	len = 3 + 1 + strlen(us-&gt;us_number) + 1;</div><div class='del'>-	PUTCHAR(len , bufp);</div><div class='del'>-	PUTCHAR(5, bufp); /* delay */</div><div class='del'>-	PUTCHAR(1, bufp);</div><div class='del'>-	BCOPY(us-&gt;us_number, bufp, strlen(us-&gt;us_number) + 1);</div><div class='del'>-	cbcp_send(us, CBCP_RESP, buf, len);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (cb_type &amp; ( 1 &lt;&lt; CB_CONF_ADMIN ) ) {</div><div class='del'>-	dbglog("cbcp_resp CONF_ADMIN");</div><div class='del'>-        PUTCHAR(CB_CONF_ADMIN, bufp);</div><div class='del'>-	len = 3;</div><div class='del'>-	PUTCHAR(len, bufp);</div><div class='del'>-	PUTCHAR(5, bufp); /* delay */</div><div class='del'>-	cbcp_send(us, CBCP_RESP, buf, len);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (cb_type &amp; ( 1 &lt;&lt; CB_CONF_NO ) ) {</div><div class='del'>-        dbglog("cbcp_resp CONF_NO");</div><div class='del'>-	PUTCHAR(CB_CONF_NO, bufp);</div><div class='del'>-	len = 3;</div><div class='del'>-	PUTCHAR(len , bufp);</div><div class='del'>-	PUTCHAR(0, bufp);</div><div class='del'>-	cbcp_send(us, CBCP_RESP, buf, len);</div><div class='del'>-	start_networks();</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-cbcp_send(us, code, buf, len)</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-    u_char code;</div><div class='del'>-    u_char *buf;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int outlen;</div><div class='del'>-</div><div class='del'>-    outp = outpacket_buf;</div><div class='del'>-</div><div class='del'>-    outlen = 4 + len;</div><div class='del'>-    </div><div class='del'>-    MAKEHEADER(outp, PPP_CBCP);</div><div class='del'>-</div><div class='del'>-    PUTCHAR(code, outp);</div><div class='del'>-    PUTCHAR(us-&gt;us_id, outp);</div><div class='del'>-    PUTSHORT(outlen, outp);</div><div class='del'>-    </div><div class='del'>-    if (len)</div><div class='del'>-        BCOPY(buf, outp, len);</div><div class='del'>-</div><div class='del'>-    output(us-&gt;us_unit, outpacket_buf, outlen + PPP_HDRLEN);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-cbcp_recvack(us, pckt, len)</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-    char *pckt;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char type, delay, addr_type;</div><div class='del'>-    int opt_len;</div><div class='del'>-    char address[256];</div><div class='del'>-</div><div class='del'>-    if (len) {</div><div class='del'>-        GETCHAR(type, pckt);</div><div class='del'>-	GETCHAR(opt_len, pckt);</div><div class='del'>-     </div><div class='del'>-	if (opt_len &gt; 2)</div><div class='del'>-	    GETCHAR(delay, pckt);</div><div class='del'>-</div><div class='del'>-	if (opt_len &gt; 4) {</div><div class='del'>-	    GETCHAR(addr_type, pckt);</div><div class='del'>-	    memcpy(address, pckt, opt_len - 4);</div><div class='del'>-	    address[opt_len - 4] = 0;</div><div class='del'>-	    if (address[0])</div><div class='del'>-	        dbglog("peer will call: %s", address);</div><div class='del'>-	}</div><div class='del'>-	if (type == CB_CONF_NO)</div><div class='del'>-	    return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    cbcp_up(us);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* ok peer will do callback */</div><div class='del'>-static void</div><div class='del'>-cbcp_up(us)</div><div class='del'>-    cbcp_state *us;</div><div class='del'>-{</div><div class='del'>-    persist = 0;</div><div class='del'>-    lcp_close(0, "Call me back, please");</div><div class='del'>-    status = EXIT_CALLBACK;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/cbcp.h b/mdk-stage1/ppp/pppd/cbcp.h<br/>deleted file mode 100644<br/>index c2ab3f689..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/cbcp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/cbcp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,26 +0,0 @@</div><div class='del'>-#ifndef CBCP_H</div><div class='del'>-#define CBCP_H</div><div class='del'>-</div><div class='del'>-typedef struct cbcp_state {</div><div class='del'>-    int    us_unit;	/* Interface unit number */</div><div class='del'>-    u_char us_id;		/* Current id */</div><div class='del'>-    u_char us_allowed;</div><div class='del'>-    int    us_type;</div><div class='del'>-    char   *us_number;    /* Telefone Number */</div><div class='del'>-} cbcp_state;</div><div class='del'>-</div><div class='del'>-extern cbcp_state cbcp[];</div><div class='del'>-</div><div class='del'>-extern struct protent cbcp_protent;</div><div class='del'>-</div><div class='del'>-#define CBCP_MINLEN 4</div><div class='del'>-</div><div class='del'>-#define CBCP_REQ    1</div><div class='del'>-#define CBCP_RESP   2</div><div class='del'>-#define CBCP_ACK    3</div><div class='del'>-</div><div class='del'>-#define CB_CONF_NO     1</div><div class='del'>-#define CB_CONF_USER   2</div><div class='del'>-#define CB_CONF_ADMIN  3</div><div class='del'>-#define CB_CONF_LIST   4</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ccp.c b/mdk-stage1/ppp/pppd/ccp.c<br/>deleted file mode 100644<br/>index 7e36e384e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ccp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ccp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1257 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ccp.c - PPP Compression Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ccp.h"</div><div class='del'>-#include &lt;net/ppp-comp.h&gt;</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unfortunately there is a bug in zlib which means that using a</div><div class='del'>- * size of 8 (window size = 256) for Deflate compression will cause</div><div class='del'>- * buffer overruns and kernel crashes in the deflate module.</div><div class='del'>- * Until this is fixed we only accept sizes in the range 9 .. 15.</div><div class='del'>- * Thanks to James Carlson for pointing this out.</div><div class='del'>- */</div><div class='del'>-#define DEFLATE_MIN_WORKS	9</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Command-line options.</div><div class='del'>- */</div><div class='del'>-static int setbsdcomp __P((char **));</div><div class='del'>-static int setdeflate __P((char **));</div><div class='del'>-static char bsd_value[8];</div><div class='del'>-static char deflate_value[8];</div><div class='del'>-</div><div class='del'>-static option_t ccp_option_list[] = {</div><div class='del'>-    { "noccp", o_bool, &amp;ccp_protent.enabled_flag,</div><div class='del'>-      "Disable CCP negotiation" },</div><div class='del'>-    { "-ccp", o_bool, &amp;ccp_protent.enabled_flag,</div><div class='del'>-      "Disable CCP negotiation", OPT_ALIAS },</div><div class='del'>-</div><div class='del'>-    { "bsdcomp", o_special, (void *)setbsdcomp,</div><div class='del'>-      "Request BSD-Compress packet compression",</div><div class='del'>-      OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, bsd_value },</div><div class='del'>-    { "nobsdcomp", o_bool, &amp;ccp_wantoptions[0].bsd_compress,</div><div class='del'>-      "don't allow BSD-Compress", OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].bsd_compress },</div><div class='del'>-    { "-bsdcomp", o_bool, &amp;ccp_wantoptions[0].bsd_compress,</div><div class='del'>-      "don't allow BSD-Compress", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].bsd_compress },</div><div class='del'>-</div><div class='del'>-    { "deflate", o_special, (void *)setdeflate,</div><div class='del'>-      "request Deflate compression",</div><div class='del'>-      OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, deflate_value },</div><div class='del'>-    { "nodeflate", o_bool, &amp;ccp_wantoptions[0].deflate,</div><div class='del'>-      "don't allow Deflate compression", OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].deflate },</div><div class='del'>-    { "-deflate", o_bool, &amp;ccp_wantoptions[0].deflate,</div><div class='del'>-      "don't allow Deflate compression", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].deflate },</div><div class='del'>-</div><div class='del'>-    { "nodeflatedraft", o_bool, &amp;ccp_wantoptions[0].deflate_draft,</div><div class='del'>-      "don't use draft deflate #", OPT_A2COPY,</div><div class='del'>-      &amp;ccp_allowoptions[0].deflate_draft },</div><div class='del'>-</div><div class='del'>-    { "predictor1", o_bool, &amp;ccp_wantoptions[0].predictor_1,</div><div class='del'>-      "request Predictor-1", 1, &amp;ccp_allowoptions[0].predictor_1, OPT_PRIO },</div><div class='del'>-    { "nopredictor1", o_bool, &amp;ccp_wantoptions[0].predictor_1,</div><div class='del'>-      "don't allow Predictor-1", OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].predictor_1 },</div><div class='del'>-    { "-predictor1", o_bool, &amp;ccp_wantoptions[0].predictor_1,</div><div class='del'>-      "don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,</div><div class='del'>-      &amp;ccp_allowoptions[0].predictor_1 },</div><div class='del'>-</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points from main code.</div><div class='del'>- */</div><div class='del'>-static void ccp_init __P((int unit));</div><div class='del'>-static void ccp_open __P((int unit));</div><div class='del'>-static void ccp_close __P((int unit, char *));</div><div class='del'>-static void ccp_lowerup __P((int unit));</div><div class='del'>-static void ccp_lowerdown __P((int));</div><div class='del'>-static void ccp_input __P((int unit, u_char *pkt, int len));</div><div class='del'>-static void ccp_protrej __P((int unit));</div><div class='del'>-static int  ccp_printpkt __P((u_char *pkt, int len,</div><div class='del'>-			      void (*printer) __P((void *, char *, ...)),</div><div class='del'>-			      void *arg));</div><div class='del'>-static void ccp_datainput __P((int unit, u_char *pkt, int len));</div><div class='del'>-</div><div class='del'>-struct protent ccp_protent = {</div><div class='del'>-    PPP_CCP,</div><div class='del'>-    ccp_init,</div><div class='del'>-    ccp_input,</div><div class='del'>-    ccp_protrej,</div><div class='del'>-    ccp_lowerup,</div><div class='del'>-    ccp_lowerdown,</div><div class='del'>-    ccp_open,</div><div class='del'>-    ccp_close,</div><div class='del'>-    ccp_printpkt,</div><div class='del'>-    ccp_datainput,</div><div class='del'>-    1,</div><div class='del'>-    "CCP",</div><div class='del'>-    "Compressed",</div><div class='del'>-    ccp_option_list,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-fsm ccp_fsm[NUM_PPP];</div><div class='del'>-ccp_options ccp_wantoptions[NUM_PPP];	/* what to request the peer to use */</div><div class='del'>-ccp_options ccp_gotoptions[NUM_PPP];	/* what the peer agreed to do */</div><div class='del'>-ccp_options ccp_allowoptions[NUM_PPP];	/* what we'll agree to do */</div><div class='del'>-ccp_options ccp_hisoptions[NUM_PPP];	/* what we agreed to do */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Callbacks for fsm code.</div><div class='del'>- */</div><div class='del'>-static void ccp_resetci __P((fsm *));</div><div class='del'>-static int  ccp_cilen __P((fsm *));</div><div class='del'>-static void ccp_addci __P((fsm *, u_char *, int *));</div><div class='del'>-static int  ccp_ackci __P((fsm *, u_char *, int));</div><div class='del'>-static int  ccp_nakci __P((fsm *, u_char *, int));</div><div class='del'>-static int  ccp_rejci __P((fsm *, u_char *, int));</div><div class='del'>-static int  ccp_reqci __P((fsm *, u_char *, int *, int));</div><div class='del'>-static void ccp_up __P((fsm *));</div><div class='del'>-static void ccp_down __P((fsm *));</div><div class='del'>-static int  ccp_extcode __P((fsm *, int, int, u_char *, int));</div><div class='del'>-static void ccp_rack_timeout __P((void *));</div><div class='del'>-static char *method_name __P((ccp_options *, ccp_options *));</div><div class='del'>-</div><div class='del'>-static fsm_callbacks ccp_callbacks = {</div><div class='del'>-    ccp_resetci,</div><div class='del'>-    ccp_cilen,</div><div class='del'>-    ccp_addci,</div><div class='del'>-    ccp_ackci,</div><div class='del'>-    ccp_nakci,</div><div class='del'>-    ccp_rejci,</div><div class='del'>-    ccp_reqci,</div><div class='del'>-    ccp_up,</div><div class='del'>-    ccp_down,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    ccp_extcode,</div><div class='del'>-    "CCP"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Do we want / did we get any compression?</div><div class='del'>- */</div><div class='del'>-#define ANY_COMPRESS(opt)	((opt).deflate || (opt).bsd_compress \</div><div class='del'>-				 || (opt).predictor_1 || (opt).predictor_2)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Local state (mainly for handling reset-reqs and reset-acks).</div><div class='del'>- */</div><div class='del'>-static int ccp_localstate[NUM_PPP];</div><div class='del'>-#define RACK_PENDING	1	/* waiting for reset-ack */</div><div class='del'>-#define RREQ_REPEAT	2	/* send another reset-req if no reset-ack */</div><div class='del'>-</div><div class='del'>-#define RACKTIMEOUT	1	/* second */</div><div class='del'>-</div><div class='del'>-static int all_rejected[NUM_PPP];	/* we rejected all peer's options */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option parsing.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setbsdcomp(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    int rbits, abits;</div><div class='del'>-    char *str, *endp;</div><div class='del'>-</div><div class='del'>-    str = *argv;</div><div class='del'>-    abits = rbits = strtol(str, &amp;endp, 0);</div><div class='del'>-    if (endp != str &amp;&amp; *endp == ',') {</div><div class='del'>-	str = endp + 1;</div><div class='del'>-	abits = strtol(str, &amp;endp, 0);</div><div class='del'>-    }</div><div class='del'>-    if (*endp != 0 || endp == str) {</div><div class='del'>-	option_error("invalid parameter '%s' for bsdcomp option", *argv);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((rbits != 0 &amp;&amp; (rbits &lt; BSD_MIN_BITS || rbits &gt; BSD_MAX_BITS))</div><div class='del'>-	|| (abits != 0 &amp;&amp; (abits &lt; BSD_MIN_BITS || abits &gt; BSD_MAX_BITS))) {</div><div class='del'>-	option_error("bsdcomp option values must be 0 or %d .. %d",</div><div class='del'>-		     BSD_MIN_BITS, BSD_MAX_BITS);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (rbits &gt; 0) {</div><div class='del'>-	ccp_wantoptions[0].bsd_compress = 1;</div><div class='del'>-	ccp_wantoptions[0].bsd_bits = rbits;</div><div class='del'>-    } else</div><div class='del'>-	ccp_wantoptions[0].bsd_compress = 0;</div><div class='del'>-    if (abits &gt; 0) {</div><div class='del'>-	ccp_allowoptions[0].bsd_compress = 1;</div><div class='del'>-	ccp_allowoptions[0].bsd_bits = abits;</div><div class='del'>-    } else</div><div class='del'>-	ccp_allowoptions[0].bsd_compress = 0;</div><div class='del'>-    slprintf(bsd_value, sizeof(bsd_value),</div><div class='del'>-	     rbits == abits? "%d": "%d,%d", rbits, abits);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-setdeflate(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    int rbits, abits;</div><div class='del'>-    char *str, *endp;</div><div class='del'>-</div><div class='del'>-    str = *argv;</div><div class='del'>-    abits = rbits = strtol(str, &amp;endp, 0);</div><div class='del'>-    if (endp != str &amp;&amp; *endp == ',') {</div><div class='del'>-	str = endp + 1;</div><div class='del'>-	abits = strtol(str, &amp;endp, 0);</div><div class='del'>-    }</div><div class='del'>-    if (*endp != 0 || endp == str) {</div><div class='del'>-	option_error("invalid parameter '%s' for deflate option", *argv);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((rbits != 0 &amp;&amp; (rbits &lt; DEFLATE_MIN_SIZE || rbits &gt; DEFLATE_MAX_SIZE))</div><div class='del'>-	|| (abits != 0 &amp;&amp; (abits &lt; DEFLATE_MIN_SIZE</div><div class='del'>-			  || abits &gt; DEFLATE_MAX_SIZE))) {</div><div class='del'>-	option_error("deflate option values must be 0 or %d .. %d",</div><div class='del'>-		     DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (rbits == DEFLATE_MIN_SIZE || abits == DEFLATE_MIN_SIZE) {</div><div class='del'>-	if (rbits == DEFLATE_MIN_SIZE)</div><div class='del'>-	    rbits = DEFLATE_MIN_WORKS;</div><div class='del'>-	if (abits == DEFLATE_MIN_SIZE)</div><div class='del'>-	    abits = DEFLATE_MIN_WORKS;</div><div class='del'>-	warn("deflate option value of %d changed to %d to avoid zlib bug",</div><div class='del'>-	     DEFLATE_MIN_SIZE, DEFLATE_MIN_WORKS);</div><div class='del'>-    }</div><div class='del'>-    if (rbits &gt; 0) {</div><div class='del'>-	ccp_wantoptions[0].deflate = 1;</div><div class='del'>-	ccp_wantoptions[0].deflate_size = rbits;</div><div class='del'>-    } else</div><div class='del'>-	ccp_wantoptions[0].deflate = 0;</div><div class='del'>-    if (abits &gt; 0) {</div><div class='del'>-	ccp_allowoptions[0].deflate = 1;</div><div class='del'>-	ccp_allowoptions[0].deflate_size = abits;</div><div class='del'>-    } else</div><div class='del'>-	ccp_allowoptions[0].deflate = 0;</div><div class='del'>-    slprintf(deflate_value, sizeof(deflate_value),</div><div class='del'>-	     rbits == abits? "%d": "%d,%d", rbits, abits);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_init - initialize CCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_init(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ccp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;unit = unit;</div><div class='del'>-    f-&gt;protocol = PPP_CCP;</div><div class='del'>-    f-&gt;callbacks = &amp;ccp_callbacks;</div><div class='del'>-    fsm_init(f);</div><div class='del'>-</div><div class='del'>-    memset(&amp;ccp_wantoptions[unit],  0, sizeof(ccp_options));</div><div class='del'>-    memset(&amp;ccp_gotoptions[unit],   0, sizeof(ccp_options));</div><div class='del'>-    memset(&amp;ccp_allowoptions[unit], 0, sizeof(ccp_options));</div><div class='del'>-    memset(&amp;ccp_hisoptions[unit],   0, sizeof(ccp_options));</div><div class='del'>-</div><div class='del'>-    ccp_wantoptions[0].deflate = 1;</div><div class='del'>-    ccp_wantoptions[0].deflate_size = DEFLATE_MAX_SIZE;</div><div class='del'>-    ccp_wantoptions[0].deflate_correct = 1;</div><div class='del'>-    ccp_wantoptions[0].deflate_draft = 1;</div><div class='del'>-    ccp_allowoptions[0].deflate = 1;</div><div class='del'>-    ccp_allowoptions[0].deflate_size = DEFLATE_MAX_SIZE;</div><div class='del'>-    ccp_allowoptions[0].deflate_correct = 1;</div><div class='del'>-    ccp_allowoptions[0].deflate_draft = 1;</div><div class='del'>-</div><div class='del'>-    ccp_wantoptions[0].bsd_compress = 1;</div><div class='del'>-    ccp_wantoptions[0].bsd_bits = BSD_MAX_BITS;</div><div class='del'>-    ccp_allowoptions[0].bsd_compress = 1;</div><div class='del'>-    ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;</div><div class='del'>-</div><div class='del'>-    ccp_allowoptions[0].predictor_1 = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_open - CCP is allowed to come up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ccp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	ccp_flags_set(unit, 1, 0);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Find out which compressors the kernel supports before</div><div class='del'>-     * deciding whether to open in silent mode.</div><div class='del'>-     */</div><div class='del'>-    ccp_resetci(f);</div><div class='del'>-    if (!ANY_COMPRESS(ccp_gotoptions[unit]))</div><div class='del'>-	f-&gt;flags |= OPT_SILENT;</div><div class='del'>-</div><div class='del'>-    fsm_open(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_close - Terminate CCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_close(unit, reason)</div><div class='del'>-    int unit;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    ccp_flags_set(unit, 0, 0);</div><div class='del'>-    fsm_close(&amp;ccp_fsm[unit], reason);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_lowerup - we may now transmit CCP packets.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_lowerup(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerup(&amp;ccp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_lowerdown - we may not transmit CCP packets.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_lowerdown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ccp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_input - process a received CCP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_input(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ccp_fsm[unit];</div><div class='del'>-    int oldstate;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check for a terminate-request so we can print a message.</div><div class='del'>-     */</div><div class='del'>-    oldstate = f-&gt;state;</div><div class='del'>-    fsm_input(f, p, len);</div><div class='del'>-    if (oldstate == OPENED &amp;&amp; p[0] == TERMREQ &amp;&amp; f-&gt;state != OPENED)</div><div class='del'>-	notice("Compression disabled by peer.");</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we get a terminate-ack and we're not asking for compression,</div><div class='del'>-     * close CCP.</div><div class='del'>-     */</div><div class='del'>-    if (oldstate == REQSENT &amp;&amp; p[0] == TERMACK</div><div class='del'>-	&amp;&amp; !ANY_COMPRESS(ccp_gotoptions[unit]))</div><div class='del'>-	ccp_close(unit, "No compression negotiated");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Handle a CCP-specific code.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_extcode(f, code, id, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int code, id;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CCP_RESETREQ:</div><div class='del'>-	if (f-&gt;state != OPENED)</div><div class='del'>-	    break;</div><div class='del'>-	/* send a reset-ack, which the transmitter will see and</div><div class='del'>-	   reset its compression state. */</div><div class='del'>-	fsm_sdata(f, CCP_RESETACK, id, NULL, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CCP_RESETACK:</div><div class='del'>-	if (ccp_localstate[f-&gt;unit] &amp; RACK_PENDING &amp;&amp; id == f-&gt;reqid) {</div><div class='del'>-	    ccp_localstate[f-&gt;unit] &amp;= ~(RACK_PENDING | RREQ_REPEAT);</div><div class='del'>-	    UNTIMEOUT(ccp_rack_timeout, f);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_protrej - peer doesn't talk CCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_protrej(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    ccp_flags_set(unit, 0, 0);</div><div class='del'>-    fsm_lowerdown(&amp;ccp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_resetci - initialize at start of negotiation.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_resetci(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char opt_buf[16];</div><div class='del'>-</div><div class='del'>-    *go = ccp_wantoptions[f-&gt;unit];</div><div class='del'>-    all_rejected[f-&gt;unit] = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check whether the kernel knows about the various</div><div class='del'>-     * compression methods we might request.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;bsd_compress) {</div><div class='del'>-	opt_buf[0] = CI_BSD_COMPRESS;</div><div class='del'>-	opt_buf[1] = CILEN_BSD_COMPRESS;</div><div class='del'>-	opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, BSD_MIN_BITS);</div><div class='del'>-	if (ccp_test(f-&gt;unit, opt_buf, CILEN_BSD_COMPRESS, 0) &lt;= 0)</div><div class='del'>-	    go-&gt;bsd_compress = 0;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;deflate) {</div><div class='del'>-	if (go-&gt;deflate_correct) {</div><div class='del'>-	    opt_buf[0] = CI_DEFLATE;</div><div class='del'>-	    opt_buf[1] = CILEN_DEFLATE;</div><div class='del'>-	    opt_buf[2] = DEFLATE_MAKE_OPT(DEFLATE_MIN_WORKS);</div><div class='del'>-	    opt_buf[3] = DEFLATE_CHK_SEQUENCE;</div><div class='del'>-	    if (ccp_test(f-&gt;unit, opt_buf, CILEN_DEFLATE, 0) &lt;= 0)</div><div class='del'>-		go-&gt;deflate_correct = 0;</div><div class='del'>-	}</div><div class='del'>-	if (go-&gt;deflate_draft) {</div><div class='del'>-	    opt_buf[0] = CI_DEFLATE_DRAFT;</div><div class='del'>-	    opt_buf[1] = CILEN_DEFLATE;</div><div class='del'>-	    opt_buf[2] = DEFLATE_MAKE_OPT(DEFLATE_MIN_WORKS);</div><div class='del'>-	    opt_buf[3] = DEFLATE_CHK_SEQUENCE;</div><div class='del'>-	    if (ccp_test(f-&gt;unit, opt_buf, CILEN_DEFLATE, 0) &lt;= 0)</div><div class='del'>-		go-&gt;deflate_draft = 0;</div><div class='del'>-	}</div><div class='del'>-	if (!go-&gt;deflate_correct &amp;&amp; !go-&gt;deflate_draft)</div><div class='del'>-	    go-&gt;deflate = 0;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_1) {</div><div class='del'>-	opt_buf[0] = CI_PREDICTOR_1;</div><div class='del'>-	opt_buf[1] = CILEN_PREDICTOR_1;</div><div class='del'>-	if (ccp_test(f-&gt;unit, opt_buf, CILEN_PREDICTOR_1, 0) &lt;= 0)</div><div class='del'>-	    go-&gt;predictor_1 = 0;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_2) {</div><div class='del'>-	opt_buf[0] = CI_PREDICTOR_2;</div><div class='del'>-	opt_buf[1] = CILEN_PREDICTOR_2;</div><div class='del'>-	if (ccp_test(f-&gt;unit, opt_buf, CILEN_PREDICTOR_2, 0) &lt;= 0)</div><div class='del'>-	    go-&gt;predictor_2 = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_cilen - Return total length of our configuration info.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_cilen(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    return (go-&gt;bsd_compress? CILEN_BSD_COMPRESS: 0)</div><div class='del'>-	+ (go-&gt;deflate? CILEN_DEFLATE: 0)</div><div class='del'>-	+ (go-&gt;predictor_1? CILEN_PREDICTOR_1: 0)</div><div class='del'>-	+ (go-&gt;predictor_2? CILEN_PREDICTOR_2: 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_addci - put our requests in a packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_addci(f, p, lenp)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int *lenp;</div><div class='del'>-{</div><div class='del'>-    int res;</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char *p0 = p;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Add the compression types that we can receive, in decreasing</div><div class='del'>-     * preference order.  Get the kernel to allocate the first one</div><div class='del'>-     * in case it gets Acked.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;deflate) {</div><div class='del'>-	p[0] = go-&gt;deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;</div><div class='del'>-	p[1] = CILEN_DEFLATE;</div><div class='del'>-	p[2] = DEFLATE_MAKE_OPT(go-&gt;deflate_size);</div><div class='del'>-	p[3] = DEFLATE_CHK_SEQUENCE;</div><div class='del'>-	for (;;) {</div><div class='del'>-	    res = ccp_test(f-&gt;unit, p, CILEN_DEFLATE, 0);</div><div class='del'>-	    if (res &gt; 0) {</div><div class='del'>-		p += CILEN_DEFLATE;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (res &lt; 0 || go-&gt;deflate_size &lt;= DEFLATE_MIN_WORKS) {</div><div class='del'>-		go-&gt;deflate = 0;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    --go-&gt;deflate_size;</div><div class='del'>-	    p[2] = DEFLATE_MAKE_OPT(go-&gt;deflate_size);</div><div class='del'>-	}</div><div class='del'>-	if (p != p0 &amp;&amp; go-&gt;deflate_correct &amp;&amp; go-&gt;deflate_draft) {</div><div class='del'>-	    p[0] = CI_DEFLATE_DRAFT;</div><div class='del'>-	    p[1] = CILEN_DEFLATE;</div><div class='del'>-	    p[2] = p[2 - CILEN_DEFLATE];</div><div class='del'>-	    p[3] = DEFLATE_CHK_SEQUENCE;</div><div class='del'>-	    p += CILEN_DEFLATE;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;bsd_compress) {</div><div class='del'>-	p[0] = CI_BSD_COMPRESS;</div><div class='del'>-	p[1] = CILEN_BSD_COMPRESS;</div><div class='del'>-	p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go-&gt;bsd_bits);</div><div class='del'>-	if (p != p0) {</div><div class='del'>-	    p += CILEN_BSD_COMPRESS;	/* not the first option */</div><div class='del'>-	} else {</div><div class='del'>-	    for (;;) {</div><div class='del'>-		res = ccp_test(f-&gt;unit, p, CILEN_BSD_COMPRESS, 0);</div><div class='del'>-		if (res &gt; 0) {</div><div class='del'>-		    p += CILEN_BSD_COMPRESS;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		if (res &lt; 0 || go-&gt;bsd_bits &lt;= BSD_MIN_BITS) {</div><div class='del'>-		    go-&gt;bsd_compress = 0;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		--go-&gt;bsd_bits;</div><div class='del'>-		p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go-&gt;bsd_bits);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    /* XXX Should Predictor 2 be preferable to Predictor 1? */</div><div class='del'>-    if (go-&gt;predictor_1) {</div><div class='del'>-	p[0] = CI_PREDICTOR_1;</div><div class='del'>-	p[1] = CILEN_PREDICTOR_1;</div><div class='del'>-	if (p == p0 &amp;&amp; ccp_test(f-&gt;unit, p, CILEN_PREDICTOR_1, 0) &lt;= 0) {</div><div class='del'>-	    go-&gt;predictor_1 = 0;</div><div class='del'>-	} else {</div><div class='del'>-	    p += CILEN_PREDICTOR_1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_2) {</div><div class='del'>-	p[0] = CI_PREDICTOR_2;</div><div class='del'>-	p[1] = CILEN_PREDICTOR_2;</div><div class='del'>-	if (p == p0 &amp;&amp; ccp_test(f-&gt;unit, p, CILEN_PREDICTOR_2, 0) &lt;= 0) {</div><div class='del'>-	    go-&gt;predictor_2 = 0;</div><div class='del'>-	} else {</div><div class='del'>-	    p += CILEN_PREDICTOR_2;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    go-&gt;method = (p &gt; p0)? p0[0]: -1;</div><div class='del'>-</div><div class='del'>-    *lenp = p - p0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_ackci - process a received configure-ack, and return</div><div class='del'>- * 1 iff the packet was OK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_ackci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char *p0 = p;</div><div class='del'>-</div><div class='del'>-    if (go-&gt;deflate) {</div><div class='del'>-	if (len &lt; CILEN_DEFLATE</div><div class='del'>-	    || p[0] != (go-&gt;deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)</div><div class='del'>-	    || p[1] != CILEN_DEFLATE</div><div class='del'>-	    || p[2] != DEFLATE_MAKE_OPT(go-&gt;deflate_size)</div><div class='del'>-	    || p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	    return 0;</div><div class='del'>-	p += CILEN_DEFLATE;</div><div class='del'>-	len -= CILEN_DEFLATE;</div><div class='del'>-	/* XXX Cope with first/fast ack */</div><div class='del'>-	if (len == 0)</div><div class='del'>-	    return 1;</div><div class='del'>-	if (go-&gt;deflate_correct &amp;&amp; go-&gt;deflate_draft) {</div><div class='del'>-	    if (len &lt; CILEN_DEFLATE</div><div class='del'>-		|| p[0] != CI_DEFLATE_DRAFT</div><div class='del'>-		|| p[1] != CILEN_DEFLATE</div><div class='del'>-		|| p[2] != DEFLATE_MAKE_OPT(go-&gt;deflate_size)</div><div class='del'>-		|| p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-		return 0;</div><div class='del'>-	    p += CILEN_DEFLATE;</div><div class='del'>-	    len -= CILEN_DEFLATE;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;bsd_compress) {</div><div class='del'>-	if (len &lt; CILEN_BSD_COMPRESS</div><div class='del'>-	    || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS</div><div class='del'>-	    || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go-&gt;bsd_bits))</div><div class='del'>-	    return 0;</div><div class='del'>-	p += CILEN_BSD_COMPRESS;</div><div class='del'>-	len -= CILEN_BSD_COMPRESS;</div><div class='del'>-	/* XXX Cope with first/fast ack */</div><div class='del'>-	if (p == p0 &amp;&amp; len == 0)</div><div class='del'>-	    return 1;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_1) {</div><div class='del'>-	if (len &lt; CILEN_PREDICTOR_1</div><div class='del'>-	    || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1)</div><div class='del'>-	    return 0;</div><div class='del'>-	p += CILEN_PREDICTOR_1;</div><div class='del'>-	len -= CILEN_PREDICTOR_1;</div><div class='del'>-	/* XXX Cope with first/fast ack */</div><div class='del'>-	if (p == p0 &amp;&amp; len == 0)</div><div class='del'>-	    return 1;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_2) {</div><div class='del'>-	if (len &lt; CILEN_PREDICTOR_2</div><div class='del'>-	    || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2)</div><div class='del'>-	    return 0;</div><div class='del'>-	p += CILEN_PREDICTOR_2;</div><div class='del'>-	len -= CILEN_PREDICTOR_2;</div><div class='del'>-	/* XXX Cope with first/fast ack */</div><div class='del'>-	if (p == p0 &amp;&amp; len == 0)</div><div class='del'>-	    return 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (len != 0)</div><div class='del'>-	return 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_nakci - process received configure-nak.</div><div class='del'>- * Returns 1 iff the nak was OK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_nakci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    ccp_options no;		/* options we've seen already */</div><div class='del'>-    ccp_options try;		/* options to ask for next time */</div><div class='del'>-</div><div class='del'>-    memset(&amp;no, 0, sizeof(no));</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    if (go-&gt;deflate &amp;&amp; len &gt;= CILEN_DEFLATE</div><div class='del'>-	&amp;&amp; p[0] == (go-&gt;deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)</div><div class='del'>-	&amp;&amp; p[1] == CILEN_DEFLATE) {</div><div class='del'>-	no.deflate = 1;</div><div class='del'>-	/*</div><div class='del'>-	 * Peer wants us to use a different code size or something.</div><div class='del'>-	 * Stop asking for Deflate if we don't understand his suggestion.</div><div class='del'>-	 */</div><div class='del'>-	if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-	    || DEFLATE_SIZE(p[2]) &lt; DEFLATE_MIN_WORKS</div><div class='del'>-	    || p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	    try.deflate = 0;</div><div class='del'>-	else if (DEFLATE_SIZE(p[2]) &lt; go-&gt;deflate_size)</div><div class='del'>-	    try.deflate_size = DEFLATE_SIZE(p[2]);</div><div class='del'>-	p += CILEN_DEFLATE;</div><div class='del'>-	len -= CILEN_DEFLATE;</div><div class='del'>-	if (go-&gt;deflate_correct &amp;&amp; go-&gt;deflate_draft</div><div class='del'>-	    &amp;&amp; len &gt;= CILEN_DEFLATE &amp;&amp; p[0] == CI_DEFLATE_DRAFT</div><div class='del'>-	    &amp;&amp; p[1] == CILEN_DEFLATE) {</div><div class='del'>-	    p += CILEN_DEFLATE;</div><div class='del'>-	    len -= CILEN_DEFLATE;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (go-&gt;bsd_compress &amp;&amp; len &gt;= CILEN_BSD_COMPRESS</div><div class='del'>-	&amp;&amp; p[0] == CI_BSD_COMPRESS &amp;&amp; p[1] == CILEN_BSD_COMPRESS) {</div><div class='del'>-	no.bsd_compress = 1;</div><div class='del'>-	/*</div><div class='del'>-	 * Peer wants us to use a different number of bits</div><div class='del'>-	 * or a different version.</div><div class='del'>-	 */</div><div class='del'>-	if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION)</div><div class='del'>-	    try.bsd_compress = 0;</div><div class='del'>-	else if (BSD_NBITS(p[2]) &lt; go-&gt;bsd_bits)</div><div class='del'>-	    try.bsd_bits = BSD_NBITS(p[2]);</div><div class='del'>-	p += CILEN_BSD_COMPRESS;</div><div class='del'>-	len -= CILEN_BSD_COMPRESS;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Predictor-1 and 2 have no options, so they can't be Naked.</div><div class='del'>-     *</div><div class='del'>-     * There may be remaining options but we ignore them.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_rejci - reject some of our suggested compression methods.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_rejci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    ccp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Cope with empty configure-rejects by ceasing to send</div><div class='del'>-     * configure-requests.</div><div class='del'>-     */</div><div class='del'>-    if (len == 0 &amp;&amp; all_rejected[f-&gt;unit])</div><div class='del'>-	return -1;</div><div class='del'>-</div><div class='del'>-    if (go-&gt;deflate &amp;&amp; len &gt;= CILEN_DEFLATE</div><div class='del'>-	&amp;&amp; p[0] == (go-&gt;deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)</div><div class='del'>-	&amp;&amp; p[1] == CILEN_DEFLATE) {</div><div class='del'>-	if (p[2] != DEFLATE_MAKE_OPT(go-&gt;deflate_size)</div><div class='del'>-	    || p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-	    return 0;		/* Rej is bad */</div><div class='del'>-	if (go-&gt;deflate_correct)</div><div class='del'>-	    try.deflate_correct = 0;</div><div class='del'>-	else</div><div class='del'>-	    try.deflate_draft = 0;</div><div class='del'>-	p += CILEN_DEFLATE;</div><div class='del'>-	len -= CILEN_DEFLATE;</div><div class='del'>-	if (go-&gt;deflate_correct &amp;&amp; go-&gt;deflate_draft</div><div class='del'>-	    &amp;&amp; len &gt;= CILEN_DEFLATE &amp;&amp; p[0] == CI_DEFLATE_DRAFT</div><div class='del'>-	    &amp;&amp; p[1] == CILEN_DEFLATE) {</div><div class='del'>-	    if (p[2] != DEFLATE_MAKE_OPT(go-&gt;deflate_size)</div><div class='del'>-		|| p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-		return 0;		/* Rej is bad */</div><div class='del'>-	    try.deflate_draft = 0;</div><div class='del'>-	    p += CILEN_DEFLATE;</div><div class='del'>-	    len -= CILEN_DEFLATE;</div><div class='del'>-	}</div><div class='del'>-	if (!try.deflate_correct &amp;&amp; !try.deflate_draft)</div><div class='del'>-	    try.deflate = 0;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;bsd_compress &amp;&amp; len &gt;= CILEN_BSD_COMPRESS</div><div class='del'>-	&amp;&amp; p[0] == CI_BSD_COMPRESS &amp;&amp; p[1] == CILEN_BSD_COMPRESS) {</div><div class='del'>-	if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go-&gt;bsd_bits))</div><div class='del'>-	    return 0;</div><div class='del'>-	try.bsd_compress = 0;</div><div class='del'>-	p += CILEN_BSD_COMPRESS;</div><div class='del'>-	len -= CILEN_BSD_COMPRESS;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_1 &amp;&amp; len &gt;= CILEN_PREDICTOR_1</div><div class='del'>-	&amp;&amp; p[0] == CI_PREDICTOR_1 &amp;&amp; p[1] == CILEN_PREDICTOR_1) {</div><div class='del'>-	try.predictor_1 = 0;</div><div class='del'>-	p += CILEN_PREDICTOR_1;</div><div class='del'>-	len -= CILEN_PREDICTOR_1;</div><div class='del'>-    }</div><div class='del'>-    if (go-&gt;predictor_2 &amp;&amp; len &gt;= CILEN_PREDICTOR_2</div><div class='del'>-	&amp;&amp; p[0] == CI_PREDICTOR_2 &amp;&amp; p[1] == CILEN_PREDICTOR_2) {</div><div class='del'>-	try.predictor_2 = 0;</div><div class='del'>-	p += CILEN_PREDICTOR_2;</div><div class='del'>-	len -= CILEN_PREDICTOR_2;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (len != 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_reqci - processed a received configure-request.</div><div class='del'>- * Returns CONFACK, CONFNAK or CONFREJ and the packet modified</div><div class='del'>- * appropriately.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ccp_reqci(f, p, lenp, dont_nak)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int *lenp;</div><div class='del'>-    int dont_nak;</div><div class='del'>-{</div><div class='del'>-    int ret, newret, res;</div><div class='del'>-    u_char *p0, *retp;</div><div class='del'>-    int len, clen, type, nb;</div><div class='del'>-    ccp_options *ho = &amp;ccp_hisoptions[f-&gt;unit];</div><div class='del'>-    ccp_options *ao = &amp;ccp_allowoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    ret = CONFACK;</div><div class='del'>-    retp = p0 = p;</div><div class='del'>-    len = *lenp;</div><div class='del'>-</div><div class='del'>-    memset(ho, 0, sizeof(ccp_options));</div><div class='del'>-    ho-&gt;method = (len &gt; 0)? p[0]: -1;</div><div class='del'>-</div><div class='del'>-    while (len &gt; 0) {</div><div class='del'>-	newret = CONFACK;</div><div class='del'>-	if (len &lt; 2 || p[1] &lt; 2 || p[1] &gt; len) {</div><div class='del'>-	    /* length is bad */</div><div class='del'>-	    clen = len;</div><div class='del'>-	    newret = CONFREJ;</div><div class='del'>-</div><div class='del'>-	} else {</div><div class='del'>-	    type = p[0];</div><div class='del'>-	    clen = p[1];</div><div class='del'>-</div><div class='del'>-	    switch (type) {</div><div class='del'>-	    case CI_DEFLATE:</div><div class='del'>-	    case CI_DEFLATE_DRAFT:</div><div class='del'>-		if (!ao-&gt;deflate || clen != CILEN_DEFLATE</div><div class='del'>-		    || (!ao-&gt;deflate_correct &amp;&amp; type == CI_DEFLATE)</div><div class='del'>-		    || (!ao-&gt;deflate_draft &amp;&amp; type == CI_DEFLATE_DRAFT)) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		ho-&gt;deflate = 1;</div><div class='del'>-		ho-&gt;deflate_size = nb = DEFLATE_SIZE(p[2]);</div><div class='del'>-		if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL</div><div class='del'>-		    || p[3] != DEFLATE_CHK_SEQUENCE</div><div class='del'>-		    || nb &gt; ao-&gt;deflate_size || nb &lt; DEFLATE_MIN_WORKS) {</div><div class='del'>-		    newret = CONFNAK;</div><div class='del'>-		    if (!dont_nak) {</div><div class='del'>-			p[2] = DEFLATE_MAKE_OPT(ao-&gt;deflate_size);</div><div class='del'>-			p[3] = DEFLATE_CHK_SEQUENCE;</div><div class='del'>-			/* fall through to test this #bits below */</div><div class='del'>-		    } else</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Check whether we can do Deflate with the window</div><div class='del'>-		 * size they want.  If the window is too big, reduce</div><div class='del'>-		 * it until the kernel can cope and nak with that.</div><div class='del'>-		 * We only check this for the first option.</div><div class='del'>-		 */</div><div class='del'>-		if (p == p0) {</div><div class='del'>-		    for (;;) {</div><div class='del'>-			res = ccp_test(f-&gt;unit, p, CILEN_DEFLATE, 1);</div><div class='del'>-			if (res &gt; 0)</div><div class='del'>-			    break;		/* it's OK now */</div><div class='del'>-			if (res &lt; 0 || nb == DEFLATE_MIN_WORKS || dont_nak) {</div><div class='del'>-			    newret = CONFREJ;</div><div class='del'>-			    p[2] = DEFLATE_MAKE_OPT(ho-&gt;deflate_size);</div><div class='del'>-			    break;</div><div class='del'>-			}</div><div class='del'>-			newret = CONFNAK;</div><div class='del'>-			--nb;</div><div class='del'>-			p[2] = DEFLATE_MAKE_OPT(nb);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case CI_BSD_COMPRESS:</div><div class='del'>-		if (!ao-&gt;bsd_compress || clen != CILEN_BSD_COMPRESS) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		ho-&gt;bsd_compress = 1;</div><div class='del'>-		ho-&gt;bsd_bits = nb = BSD_NBITS(p[2]);</div><div class='del'>-		if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION</div><div class='del'>-		    || nb &gt; ao-&gt;bsd_bits || nb &lt; BSD_MIN_BITS) {</div><div class='del'>-		    newret = CONFNAK;</div><div class='del'>-		    if (!dont_nak) {</div><div class='del'>-			p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao-&gt;bsd_bits);</div><div class='del'>-			/* fall through to test this #bits below */</div><div class='del'>-		    } else</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Check whether we can do BSD-Compress with the code</div><div class='del'>-		 * size they want.  If the code size is too big, reduce</div><div class='del'>-		 * it until the kernel can cope and nak with that.</div><div class='del'>-		 * We only check this for the first option.</div><div class='del'>-		 */</div><div class='del'>-		if (p == p0) {</div><div class='del'>-		    for (;;) {</div><div class='del'>-			res = ccp_test(f-&gt;unit, p, CILEN_BSD_COMPRESS, 1);</div><div class='del'>-			if (res &gt; 0)</div><div class='del'>-			    break;</div><div class='del'>-			if (res &lt; 0 || nb == BSD_MIN_BITS || dont_nak) {</div><div class='del'>-			    newret = CONFREJ;</div><div class='del'>-			    p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION,</div><div class='del'>-						ho-&gt;bsd_bits);</div><div class='del'>-			    break;</div><div class='del'>-			}</div><div class='del'>-			newret = CONFNAK;</div><div class='del'>-			--nb;</div><div class='del'>-			p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case CI_PREDICTOR_1:</div><div class='del'>-		if (!ao-&gt;predictor_1 || clen != CILEN_PREDICTOR_1) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		ho-&gt;predictor_1 = 1;</div><div class='del'>-		if (p == p0</div><div class='del'>-		    &amp;&amp; ccp_test(f-&gt;unit, p, CILEN_PREDICTOR_1, 1) &lt;= 0) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    case CI_PREDICTOR_2:</div><div class='del'>-		if (!ao-&gt;predictor_2 || clen != CILEN_PREDICTOR_2) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		ho-&gt;predictor_2 = 1;</div><div class='del'>-		if (p == p0</div><div class='del'>-		    &amp;&amp; ccp_test(f-&gt;unit, p, CILEN_PREDICTOR_2, 1) &lt;= 0) {</div><div class='del'>-		    newret = CONFREJ;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    default:</div><div class='del'>-		newret = CONFREJ;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (newret == CONFNAK &amp;&amp; dont_nak)</div><div class='del'>-	    newret = CONFREJ;</div><div class='del'>-	if (!(newret == CONFACK || (newret == CONFNAK &amp;&amp; ret == CONFREJ))) {</div><div class='del'>-	    /* we're returning this option */</div><div class='del'>-	    if (newret == CONFREJ &amp;&amp; ret == CONFNAK)</div><div class='del'>-		retp = p0;</div><div class='del'>-	    ret = newret;</div><div class='del'>-	    if (p != retp)</div><div class='del'>-		BCOPY(p, retp, clen);</div><div class='del'>-	    retp += clen;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	p += clen;</div><div class='del'>-	len -= clen;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ret != CONFACK) {</div><div class='del'>-	if (ret == CONFREJ &amp;&amp; *lenp == retp - p0)</div><div class='del'>-	    all_rejected[f-&gt;unit] = 1;</div><div class='del'>-	else</div><div class='del'>-	    *lenp = retp - p0;</div><div class='del'>-    }</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Make a string name for a compression method (or 2).</div><div class='del'>- */</div><div class='del'>-static char *</div><div class='del'>-method_name(opt, opt2)</div><div class='del'>-    ccp_options *opt, *opt2;</div><div class='del'>-{</div><div class='del'>-    static char result[64];</div><div class='del'>-</div><div class='del'>-    if (!ANY_COMPRESS(*opt))</div><div class='del'>-	return "(none)";</div><div class='del'>-    switch (opt-&gt;method) {</div><div class='del'>-    case CI_DEFLATE:</div><div class='del'>-    case CI_DEFLATE_DRAFT:</div><div class='del'>-	if (opt2 != NULL &amp;&amp; opt2-&gt;deflate_size != opt-&gt;deflate_size)</div><div class='del'>-	    slprintf(result, sizeof(result), "Deflate%s (%d/%d)",</div><div class='del'>-		     (opt-&gt;method == CI_DEFLATE_DRAFT? "(old#)": ""),</div><div class='del'>-		     opt-&gt;deflate_size, opt2-&gt;deflate_size);</div><div class='del'>-	else</div><div class='del'>-	    slprintf(result, sizeof(result), "Deflate%s (%d)",</div><div class='del'>-		     (opt-&gt;method == CI_DEFLATE_DRAFT? "(old#)": ""),</div><div class='del'>-		     opt-&gt;deflate_size);</div><div class='del'>-	break;</div><div class='del'>-    case CI_BSD_COMPRESS:</div><div class='del'>-	if (opt2 != NULL &amp;&amp; opt2-&gt;bsd_bits != opt-&gt;bsd_bits)</div><div class='del'>-	    slprintf(result, sizeof(result), "BSD-Compress (%d/%d)",</div><div class='del'>-		     opt-&gt;bsd_bits, opt2-&gt;bsd_bits);</div><div class='del'>-	else</div><div class='del'>-	    slprintf(result, sizeof(result), "BSD-Compress (%d)",</div><div class='del'>-		     opt-&gt;bsd_bits);</div><div class='del'>-	break;</div><div class='del'>-    case CI_PREDICTOR_1:</div><div class='del'>-	return "Predictor 1";</div><div class='del'>-    case CI_PREDICTOR_2:</div><div class='del'>-	return "Predictor 2";</div><div class='del'>-    default:</div><div class='del'>-	slprintf(result, sizeof(result), "Method %d", opt-&gt;method);</div><div class='del'>-    }</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * CCP has come up - inform the kernel driver and log a message.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_up(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ccp_options *go = &amp;ccp_gotoptions[f-&gt;unit];</div><div class='del'>-    ccp_options *ho = &amp;ccp_hisoptions[f-&gt;unit];</div><div class='del'>-    char method1[64];</div><div class='del'>-</div><div class='del'>-    ccp_flags_set(f-&gt;unit, 1, 1);</div><div class='del'>-    if (ANY_COMPRESS(*go)) {</div><div class='del'>-	if (ANY_COMPRESS(*ho)) {</div><div class='del'>-	    if (go-&gt;method == ho-&gt;method) {</div><div class='del'>-		notice("%s compression enabled", method_name(go, ho));</div><div class='del'>-	    } else {</div><div class='del'>-		strlcpy(method1, method_name(go, NULL), sizeof(method1));</div><div class='del'>-		notice("%s / %s compression enabled",</div><div class='del'>-		       method1, method_name(ho, NULL));</div><div class='del'>-	    }</div><div class='del'>-	} else</div><div class='del'>-	    notice("%s receive compression enabled", method_name(go, NULL));</div><div class='del'>-    } else if (ANY_COMPRESS(*ho))</div><div class='del'>-	notice("%s transmit compression enabled", method_name(ho, NULL));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * CCP has gone down - inform the kernel driver.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_down(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    if (ccp_localstate[f-&gt;unit] &amp; RACK_PENDING)</div><div class='del'>-	UNTIMEOUT(ccp_rack_timeout, f);</div><div class='del'>-    ccp_localstate[f-&gt;unit] = 0;</div><div class='del'>-    ccp_flags_set(f-&gt;unit, 1, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Print the contents of a CCP packet.</div><div class='del'>- */</div><div class='del'>-static char *ccp_codenames[] = {</div><div class='del'>-    "ConfReq", "ConfAck", "ConfNak", "ConfRej",</div><div class='del'>-    "TermReq", "TermAck", "CodeRej",</div><div class='del'>-    NULL, NULL, NULL, NULL, NULL, NULL,</div><div class='del'>-    "ResetReq", "ResetAck",</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ccp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    u_char *p0, *optend;</div><div class='del'>-    int code, id, len;</div><div class='del'>-    int optlen;</div><div class='del'>-</div><div class='del'>-    p0 = p;</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    code = p[0];</div><div class='del'>-    id = p[1];</div><div class='del'>-    len = (p[2] &lt;&lt; 8) + p[3];</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(ccp_codenames) / sizeof(char *)</div><div class='del'>-	&amp;&amp; ccp_codenames[code-1] != NULL)</div><div class='del'>-	printer(arg, " %s", ccp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-    p += HEADERLEN;</div><div class='del'>-</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-    case CONFACK:</div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	/* print list of possible compression methods */</div><div class='del'>-	while (len &gt;= 2) {</div><div class='del'>-	    code = p[0];</div><div class='del'>-	    optlen = p[1];</div><div class='del'>-	    if (optlen &lt; 2 || optlen &gt; len)</div><div class='del'>-		break;</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= optlen;</div><div class='del'>-	    optend = p + optlen;</div><div class='del'>-	    switch (code) {</div><div class='del'>-	    case CI_DEFLATE:</div><div class='del'>-	    case CI_DEFLATE_DRAFT:</div><div class='del'>-		if (optlen &gt;= CILEN_DEFLATE) {</div><div class='del'>-		    printer(arg, "deflate%s %d",</div><div class='del'>-			    (code == CI_DEFLATE_DRAFT? "(old#)": ""),</div><div class='del'>-			    DEFLATE_SIZE(p[2]));</div><div class='del'>-		    if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL)</div><div class='del'>-			printer(arg, " method %d", DEFLATE_METHOD(p[2]));</div><div class='del'>-		    if (p[3] != DEFLATE_CHK_SEQUENCE)</div><div class='del'>-			printer(arg, " check %d", p[3]);</div><div class='del'>-		    p += CILEN_DEFLATE;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_BSD_COMPRESS:</div><div class='del'>-		if (optlen &gt;= CILEN_BSD_COMPRESS) {</div><div class='del'>-		    printer(arg, "bsd v%d %d", BSD_VERSION(p[2]),</div><div class='del'>-			    BSD_NBITS(p[2]));</div><div class='del'>-		    p += CILEN_BSD_COMPRESS;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_PREDICTOR_1:</div><div class='del'>-		if (optlen &gt;= CILEN_PREDICTOR_1) {</div><div class='del'>-		    printer(arg, "predictor 1");</div><div class='del'>-		    p += CILEN_PREDICTOR_1;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_PREDICTOR_2:</div><div class='del'>-		if (optlen &gt;= CILEN_PREDICTOR_2) {</div><div class='del'>-		    printer(arg, "predictor 2");</div><div class='del'>-		    p += CILEN_PREDICTOR_2;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    while (p &lt; optend)</div><div class='del'>-		printer(arg, " %.2x", *p++);</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case TERMACK:</div><div class='del'>-    case TERMREQ:</div><div class='del'>-	if (len &gt; 0 &amp;&amp; *p &gt;= ' ' &amp;&amp; *p &lt; 0x7f) {</div><div class='del'>-	    print_string((char *)p, len, printer, arg);</div><div class='del'>-	    p += len;</div><div class='del'>-	    len = 0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* dump out the rest of the packet in hex */</div><div class='del'>-    while (--len &gt;= 0)</div><div class='del'>-	printer(arg, " %.2x", *p++);</div><div class='del'>-</div><div class='del'>-    return p - p0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We have received a packet that the decompressor failed to</div><div class='del'>- * decompress.  Here we would expect to issue a reset-request, but</div><div class='del'>- * Motorola has a patent on resetting the compressor as a result of</div><div class='del'>- * detecting an error in the decompressed data after decompression.</div><div class='del'>- * (See US patent 5,130,993; international patent publication number</div><div class='del'>- * WO 91/10289; Australian patent 73296/91.)</div><div class='del'>- *</div><div class='del'>- * So we ask the kernel whether the error was detected after</div><div class='del'>- * decompression; if it was, we take CCP down, thus disabling</div><div class='del'>- * compression :-(, otherwise we issue the reset-request.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_datainput(unit, pkt, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *pkt;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm *f;</div><div class='del'>-</div><div class='del'>-    f = &amp;ccp_fsm[unit];</div><div class='del'>-    if (f-&gt;state == OPENED) {</div><div class='del'>-	if (ccp_fatal_error(unit)) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Disable compression by taking CCP down.</div><div class='del'>-	     */</div><div class='del'>-	    error("Lost compression sync: disabling compression");</div><div class='del'>-	    ccp_close(unit, "Lost compression sync");</div><div class='del'>-	} else {</div><div class='del'>-	    /*</div><div class='del'>-	     * Send a reset-request to reset the peer's compressor.</div><div class='del'>-	     * We don't do that if we are still waiting for an</div><div class='del'>-	     * acknowledgement to a previous reset-request.</div><div class='del'>-	     */</div><div class='del'>-	    if (!(ccp_localstate[f-&gt;unit] &amp; RACK_PENDING)) {</div><div class='del'>-		fsm_sdata(f, CCP_RESETREQ, f-&gt;reqid = ++f-&gt;id, NULL, 0);</div><div class='del'>-		TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT);</div><div class='del'>-		ccp_localstate[f-&gt;unit] |= RACK_PENDING;</div><div class='del'>-	    } else</div><div class='del'>-		ccp_localstate[f-&gt;unit] |= RREQ_REPEAT;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Timeout waiting for reset-ack.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ccp_rack_timeout(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    fsm *f = arg;</div><div class='del'>-</div><div class='del'>-    if (f-&gt;state == OPENED &amp;&amp; ccp_localstate[f-&gt;unit] &amp; RREQ_REPEAT) {</div><div class='del'>-	fsm_sdata(f, CCP_RESETREQ, f-&gt;reqid, NULL, 0);</div><div class='del'>-	TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT);</div><div class='del'>-	ccp_localstate[f-&gt;unit] &amp;= ~RREQ_REPEAT;</div><div class='del'>-    } else</div><div class='del'>-	ccp_localstate[f-&gt;unit] &amp;= ~RACK_PENDING;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ccp.h b/mdk-stage1/ppp/pppd/ccp.h<br/>deleted file mode 100644<br/>index 609d858c5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ccp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ccp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,48 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ccp.h - Definitions for PPP Compression Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef struct ccp_options {</div><div class='del'>-    bool bsd_compress;		/* do BSD Compress? */</div><div class='del'>-    bool deflate;		/* do Deflate? */</div><div class='del'>-    bool predictor_1;		/* do Predictor-1? */</div><div class='del'>-    bool predictor_2;		/* do Predictor-2? */</div><div class='del'>-    bool deflate_correct;	/* use correct code for deflate? */</div><div class='del'>-    bool deflate_draft;		/* use draft RFC code for deflate? */</div><div class='del'>-    u_short bsd_bits;		/* # bits/code for BSD Compress */</div><div class='del'>-    u_short deflate_size;	/* lg(window size) for Deflate */</div><div class='del'>-    short method;		/* code for chosen compression method */</div><div class='del'>-} ccp_options;</div><div class='del'>-</div><div class='del'>-extern fsm ccp_fsm[];</div><div class='del'>-extern ccp_options ccp_wantoptions[];</div><div class='del'>-extern ccp_options ccp_gotoptions[];</div><div class='del'>-extern ccp_options ccp_allowoptions[];</div><div class='del'>-extern ccp_options ccp_hisoptions[];</div><div class='del'>-</div><div class='del'>-extern struct protent ccp_protent;</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/chap.c b/mdk-stage1/ppp/pppd/chap.c<br/>deleted file mode 100644<br/>index 54c0e0095..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/chap.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/chap.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,860 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * chap.c - Challenge Handshake Authentication Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1993 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the Australian National University.  The name of the University</div><div class='del'>- * may not be used to endorse or promote products derived from this</div><div class='del'>- * software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1991 Gregory M. Christy.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Gregory M. Christy.  The name of the author may not be used to</div><div class='del'>- * endorse or promote products derived from this software without</div><div class='del'>- * specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#include "md5.h"</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-#include "chap_ms.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Command-line options.</div><div class='del'>- */</div><div class='del'>-static option_t chap_option_list[] = {</div><div class='del'>-    { "chap-restart", o_int, &amp;chap[0].timeouttime,</div><div class='del'>-      "Set timeout for CHAP", OPT_PRIO },</div><div class='del'>-    { "chap-max-challenge", o_int, &amp;chap[0].max_transmits,</div><div class='del'>-      "Set max #xmits for challenge", OPT_PRIO },</div><div class='del'>-    { "chap-interval", o_int, &amp;chap[0].chal_interval,</div><div class='del'>-      "Set interval for rechallenge", OPT_PRIO },</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-    { "ms-lanman", o_bool, &amp;ms_lanman,</div><div class='del'>-      "Use LanMan passwd when using MS-CHAP", 1 },</div><div class='del'>-#endif</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points.</div><div class='del'>- */</div><div class='del'>-static void ChapInit __P((int));</div><div class='del'>-static void ChapLowerUp __P((int));</div><div class='del'>-static void ChapLowerDown __P((int));</div><div class='del'>-static void ChapInput __P((int, u_char *, int));</div><div class='del'>-static void ChapProtocolReject __P((int));</div><div class='del'>-static int  ChapPrintPkt __P((u_char *, int,</div><div class='del'>-			      void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-</div><div class='del'>-struct protent chap_protent = {</div><div class='del'>-    PPP_CHAP,</div><div class='del'>-    ChapInit,</div><div class='del'>-    ChapInput,</div><div class='del'>-    ChapProtocolReject,</div><div class='del'>-    ChapLowerUp,</div><div class='del'>-    ChapLowerDown,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    ChapPrintPkt,</div><div class='del'>-    NULL,</div><div class='del'>-    1,</div><div class='del'>-    "CHAP",</div><div class='del'>-    NULL,</div><div class='del'>-    chap_option_list,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-chap_state chap[NUM_PPP];		/* CHAP state; one for each unit */</div><div class='del'>-</div><div class='del'>-static void ChapChallengeTimeout __P((void *));</div><div class='del'>-static void ChapResponseTimeout __P((void *));</div><div class='del'>-static void ChapReceiveChallenge __P((chap_state *, u_char *, int, int));</div><div class='del'>-static void ChapRechallenge __P((void *));</div><div class='del'>-static void ChapReceiveResponse __P((chap_state *, u_char *, int, int));</div><div class='del'>-static void ChapReceiveSuccess __P((chap_state *, u_char *, int, int));</div><div class='del'>-static void ChapReceiveFailure __P((chap_state *, u_char *, int, int));</div><div class='del'>-static void ChapSendStatus __P((chap_state *, int));</div><div class='del'>-static void ChapSendChallenge __P((chap_state *));</div><div class='del'>-static void ChapSendResponse __P((chap_state *));</div><div class='del'>-static void ChapGenChallenge __P((chap_state *));</div><div class='del'>-</div><div class='del'>-extern double drand48 __P((void));</div><div class='del'>-extern void srand48 __P((long));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapInit - Initialize a CHAP unit.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapInit(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-</div><div class='del'>-    BZERO(cstate, sizeof(*cstate));</div><div class='del'>-    cstate-&gt;unit = unit;</div><div class='del'>-    cstate-&gt;clientstate = CHAPCS_INITIAL;</div><div class='del'>-    cstate-&gt;serverstate = CHAPSS_INITIAL;</div><div class='del'>-    cstate-&gt;timeouttime = CHAP_DEFTIMEOUT;</div><div class='del'>-    cstate-&gt;max_transmits = CHAP_DEFTRANSMITS;</div><div class='del'>-    /* random number generator is initialized in magic_init */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapAuthWithPeer - Authenticate us with our peer (start client).</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ChapAuthWithPeer(unit, our_name, digest)</div><div class='del'>-    int unit;</div><div class='del'>-    char *our_name;</div><div class='del'>-    int digest;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-</div><div class='del'>-    cstate-&gt;resp_name = our_name;</div><div class='del'>-    cstate-&gt;resp_type = digest;</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_INITIAL ||</div><div class='del'>-	cstate-&gt;clientstate == CHAPCS_PENDING) {</div><div class='del'>-	/* lower layer isn't up - wait until later */</div><div class='del'>-	cstate-&gt;clientstate = CHAPCS_PENDING;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We get here as a result of LCP coming up.</div><div class='del'>-     * So even if CHAP was open before, we will </div><div class='del'>-     * have to re-authenticate ourselves.</div><div class='del'>-     */</div><div class='del'>-    cstate-&gt;clientstate = CHAPCS_LISTEN;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapAuthPeer - Authenticate our peer (start server).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ChapAuthPeer(unit, our_name, digest)</div><div class='del'>-    int unit;</div><div class='del'>-    char *our_name;</div><div class='del'>-    int digest;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-  </div><div class='del'>-    cstate-&gt;chal_name = our_name;</div><div class='del'>-    cstate-&gt;chal_type = digest;</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_INITIAL ||</div><div class='del'>-	cstate-&gt;serverstate == CHAPSS_PENDING) {</div><div class='del'>-	/* lower layer isn't up - wait until later */</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_PENDING;</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ChapGenChallenge(cstate);</div><div class='del'>-    ChapSendChallenge(cstate);		/* crank it up dude! */</div><div class='del'>-    cstate-&gt;serverstate = CHAPSS_INITIAL_CHAL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapChallengeTimeout - Timeout expired on sending challenge.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapChallengeTimeout(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = (chap_state *) arg;</div><div class='del'>-  </div><div class='del'>-    /* if we aren't sending challenges, don't worry.  then again we */</div><div class='del'>-    /* probably shouldn't be here either */</div><div class='del'>-    if (cstate-&gt;serverstate != CHAPSS_INITIAL_CHAL &amp;&amp;</div><div class='del'>-	cstate-&gt;serverstate != CHAPSS_RECHALLENGE)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;chal_transmits &gt;= cstate-&gt;max_transmits) {</div><div class='del'>-	/* give up on peer */</div><div class='del'>-	error("Peer failed to respond to CHAP challenge");</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_BADAUTH;</div><div class='del'>-	auth_peer_fail(cstate-&gt;unit, PPP_CHAP);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ChapSendChallenge(cstate);		/* Re-send challenge */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapResponseTimeout - Timeout expired on sending response.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapResponseTimeout(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = (chap_state *) arg;</div><div class='del'>-</div><div class='del'>-    /* if we aren't sending a response, don't worry. */</div><div class='del'>-    if (cstate-&gt;clientstate != CHAPCS_RESPONSE)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    ChapSendResponse(cstate);		/* re-send response */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapRechallenge - Time to challenge the peer again.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapRechallenge(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = (chap_state *) arg;</div><div class='del'>-</div><div class='del'>-    /* if we aren't sending a response, don't worry. */</div><div class='del'>-    if (cstate-&gt;serverstate != CHAPSS_OPEN)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    ChapGenChallenge(cstate);</div><div class='del'>-    ChapSendChallenge(cstate);</div><div class='del'>-    cstate-&gt;serverstate = CHAPSS_RECHALLENGE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapLowerUp - The lower layer is up.</div><div class='del'>- *</div><div class='del'>- * Start up if we have pending requests.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapLowerUp(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-  </div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_INITIAL)</div><div class='del'>-	cstate-&gt;clientstate = CHAPCS_CLOSED;</div><div class='del'>-    else if (cstate-&gt;clientstate == CHAPCS_PENDING)</div><div class='del'>-	cstate-&gt;clientstate = CHAPCS_LISTEN;</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_INITIAL)</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_CLOSED;</div><div class='del'>-    else if (cstate-&gt;serverstate == CHAPSS_PENDING) {</div><div class='del'>-	ChapGenChallenge(cstate);</div><div class='del'>-	ChapSendChallenge(cstate);</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_INITIAL_CHAL;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapLowerDown - The lower layer is down.</div><div class='del'>- *</div><div class='del'>- * Cancel all timeouts.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapLowerDown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-  </div><div class='del'>-    /* Timeout(s) pending?  Cancel if so. */</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_INITIAL_CHAL ||</div><div class='del'>-	cstate-&gt;serverstate == CHAPSS_RECHALLENGE)</div><div class='del'>-	UNTIMEOUT(ChapChallengeTimeout, cstate);</div><div class='del'>-    else if (cstate-&gt;serverstate == CHAPSS_OPEN</div><div class='del'>-	     &amp;&amp; cstate-&gt;chal_interval != 0)</div><div class='del'>-	UNTIMEOUT(ChapRechallenge, cstate);</div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_RESPONSE)</div><div class='del'>-	UNTIMEOUT(ChapResponseTimeout, cstate);</div><div class='del'>-</div><div class='del'>-    cstate-&gt;clientstate = CHAPCS_INITIAL;</div><div class='del'>-    cstate-&gt;serverstate = CHAPSS_INITIAL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapProtocolReject - Peer doesn't grok CHAP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapProtocolReject(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;serverstate != CHAPSS_INITIAL &amp;&amp;</div><div class='del'>-	cstate-&gt;serverstate != CHAPSS_CLOSED)</div><div class='del'>-	auth_peer_fail(unit, PPP_CHAP);</div><div class='del'>-    if (cstate-&gt;clientstate != CHAPCS_INITIAL &amp;&amp;</div><div class='del'>-	cstate-&gt;clientstate != CHAPCS_CLOSED)</div><div class='del'>-	auth_withpeer_fail(unit, PPP_CHAP);</div><div class='del'>-    ChapLowerDown(unit);		/* shutdown chap */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapInput - Input CHAP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapInput(unit, inpacket, packet_len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *inpacket;</div><div class='del'>-    int packet_len;</div><div class='del'>-{</div><div class='del'>-    chap_state *cstate = &amp;chap[unit];</div><div class='del'>-    u_char *inp;</div><div class='del'>-    u_char code, id;</div><div class='del'>-    int len;</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * Parse header (code, id and length).</div><div class='del'>-     * If packet too short, drop it.</div><div class='del'>-     */</div><div class='del'>-    inp = inpacket;</div><div class='del'>-    if (packet_len &lt; CHAP_HEADERLEN) {</div><div class='del'>-	CHAPDEBUG(("ChapInput: rcvd short header."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    GETCHAR(code, inp);</div><div class='del'>-    GETCHAR(id, inp);</div><div class='del'>-    GETSHORT(len, inp);</div><div class='del'>-    if (len &lt; CHAP_HEADERLEN) {</div><div class='del'>-	CHAPDEBUG(("ChapInput: rcvd illegal length."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (len &gt; packet_len) {</div><div class='del'>-	CHAPDEBUG(("ChapInput: rcvd short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    len -= CHAP_HEADERLEN;</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * Action depends on code (as in fact it usually does :-).</div><div class='del'>-     */</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CHAP_CHALLENGE:</div><div class='del'>-	ChapReceiveChallenge(cstate, inp, id, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case CHAP_RESPONSE:</div><div class='del'>-	ChapReceiveResponse(cstate, inp, id, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case CHAP_FAILURE:</div><div class='del'>-	ChapReceiveFailure(cstate, inp, id, len);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CHAP_SUCCESS:</div><div class='del'>-	ChapReceiveSuccess(cstate, inp, id, len);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:				/* Need code reject? */</div><div class='del'>-	warn("Unknown CHAP code (%d) received.", code);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapReceiveChallenge - Receive Challenge and send Response.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapReceiveChallenge(cstate, inp, id, len)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int id;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    int rchallenge_len;</div><div class='del'>-    u_char *rchallenge;</div><div class='del'>-    int secret_len;</div><div class='del'>-    char secret[MAXSECRETLEN];</div><div class='del'>-    char rhostname[256];</div><div class='del'>-    MD5_CTX mdContext;</div><div class='del'>-    u_char hash[MD5_SIGNATURE_SIZE];</div><div class='del'>- </div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_CLOSED ||</div><div class='del'>-	cstate-&gt;clientstate == CHAPCS_PENDING) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveChallenge: in state %d", cstate-&gt;clientstate));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (len &lt; 2) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveChallenge: rcvd short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    GETCHAR(rchallenge_len, inp);</div><div class='del'>-    len -= sizeof (u_char) + rchallenge_len;	/* now name field length */</div><div class='del'>-    if (len &lt; 0) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveChallenge: rcvd short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    rchallenge = inp;</div><div class='del'>-    INCPTR(rchallenge_len, inp);</div><div class='del'>-</div><div class='del'>-    if (len &gt;= sizeof(rhostname))</div><div class='del'>-	len = sizeof(rhostname) - 1;</div><div class='del'>-    BCOPY(inp, rhostname, len);</div><div class='del'>-    rhostname[len] = '\000';</div><div class='del'>-</div><div class='del'>-    /* Microsoft doesn't send their name back in the PPP packet */</div><div class='del'>-    if (explicit_remote || (remote_name[0] != 0 &amp;&amp; rhostname[0] == 0)) {</div><div class='del'>-	strlcpy(rhostname, remote_name, sizeof(rhostname));</div><div class='del'>-	CHAPDEBUG(("ChapReceiveChallenge: using '%q' as remote name",</div><div class='del'>-		   rhostname));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* get secret for authenticating ourselves with the specified host */</div><div class='del'>-    if (!get_secret(cstate-&gt;unit, cstate-&gt;resp_name, rhostname,</div><div class='del'>-		    secret, &amp;secret_len, 0)) {</div><div class='del'>-	secret_len = 0;		/* assume null secret if can't find one */</div><div class='del'>-	warn("No CHAP secret found for authenticating us to %q", rhostname);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* cancel response send timeout if necessary */</div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_RESPONSE)</div><div class='del'>-	UNTIMEOUT(ChapResponseTimeout, cstate);</div><div class='del'>-</div><div class='del'>-    cstate-&gt;resp_id = id;</div><div class='del'>-    cstate-&gt;resp_transmits = 0;</div><div class='del'>-</div><div class='del'>-    /*  generate MD based on negotiated type */</div><div class='del'>-    switch (cstate-&gt;resp_type) { </div><div class='del'>-</div><div class='del'>-    case CHAP_DIGEST_MD5:</div><div class='del'>-	MD5Init(&amp;mdContext);</div><div class='del'>-	MD5Update(&amp;mdContext, &amp;cstate-&gt;resp_id, 1);</div><div class='del'>-	MD5Update(&amp;mdContext, secret, secret_len);</div><div class='del'>-	MD5Update(&amp;mdContext, rchallenge, rchallenge_len);</div><div class='del'>-	MD5Final(hash, &amp;mdContext);</div><div class='del'>-	BCOPY(hash, cstate-&gt;response, MD5_SIGNATURE_SIZE);</div><div class='del'>-	cstate-&gt;resp_length = MD5_SIGNATURE_SIZE;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-    case CHAP_MICROSOFT:</div><div class='del'>-	ChapMS(cstate, rchallenge, rchallenge_len, secret, secret_len);</div><div class='del'>-	break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	CHAPDEBUG(("unknown digest type %d", cstate-&gt;resp_type));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    BZERO(secret, sizeof(secret));</div><div class='del'>-    ChapSendResponse(cstate);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapReceiveResponse - Receive and process response.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapReceiveResponse(cstate, inp, id, len)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int id;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char *remmd, remmd_len;</div><div class='del'>-    int secret_len, old_state;</div><div class='del'>-    int code;</div><div class='del'>-    char rhostname[256];</div><div class='del'>-    MD5_CTX mdContext;</div><div class='del'>-    char secret[MAXSECRETLEN];</div><div class='del'>-    u_char hash[MD5_SIGNATURE_SIZE];</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_CLOSED ||</div><div class='del'>-	cstate-&gt;serverstate == CHAPSS_PENDING) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveResponse: in state %d", cstate-&gt;serverstate));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (id != cstate-&gt;chal_id)</div><div class='del'>-	return;			/* doesn't match ID of last challenge */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we have received a duplicate or bogus Response,</div><div class='del'>-     * we have to send the same answer (Success/Failure)</div><div class='del'>-     * as we did for the first Response we saw.</div><div class='del'>-     */</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_OPEN) {</div><div class='del'>-	ChapSendStatus(cstate, CHAP_SUCCESS);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (cstate-&gt;serverstate == CHAPSS_BADAUTH) {</div><div class='del'>-	ChapSendStatus(cstate, CHAP_FAILURE);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (len &lt; 2) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveResponse: rcvd short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    GETCHAR(remmd_len, inp);		/* get length of MD */</div><div class='del'>-    remmd = inp;			/* get pointer to MD */</div><div class='del'>-    INCPTR(remmd_len, inp);</div><div class='del'>-</div><div class='del'>-    len -= sizeof (u_char) + remmd_len;</div><div class='del'>-    if (len &lt; 0) {</div><div class='del'>-	CHAPDEBUG(("ChapReceiveResponse: rcvd short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    UNTIMEOUT(ChapChallengeTimeout, cstate);</div><div class='del'>-</div><div class='del'>-    if (len &gt;= sizeof(rhostname))</div><div class='del'>-	len = sizeof(rhostname) - 1;</div><div class='del'>-    BCOPY(inp, rhostname, len);</div><div class='del'>-    rhostname[len] = '\000';</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Get secret for authenticating them with us,</div><div class='del'>-     * do the hash ourselves, and compare the result.</div><div class='del'>-     */</div><div class='del'>-    code = CHAP_FAILURE;</div><div class='del'>-    if (!get_secret(cstate-&gt;unit, (explicit_remote? remote_name: rhostname),</div><div class='del'>-		    cstate-&gt;chal_name, secret, &amp;secret_len, 1)) {</div><div class='del'>-	warn("No CHAP secret found for authenticating %q", rhostname);</div><div class='del'>-    } else {</div><div class='del'>-</div><div class='del'>-	/*  generate MD based on negotiated type */</div><div class='del'>-	switch (cstate-&gt;chal_type) { </div><div class='del'>-</div><div class='del'>-	case CHAP_DIGEST_MD5:		/* only MD5 is defined for now */</div><div class='del'>-	    if (remmd_len != MD5_SIGNATURE_SIZE)</div><div class='del'>-		break;			/* it's not even the right length */</div><div class='del'>-	    MD5Init(&amp;mdContext);</div><div class='del'>-	    MD5Update(&amp;mdContext, &amp;cstate-&gt;chal_id, 1);</div><div class='del'>-	    MD5Update(&amp;mdContext, secret, secret_len);</div><div class='del'>-	    MD5Update(&amp;mdContext, cstate-&gt;challenge, cstate-&gt;chal_len);</div><div class='del'>-	    MD5Final(hash, &amp;mdContext); </div><div class='del'>-</div><div class='del'>-	    /* compare local and remote MDs and send the appropriate status */</div><div class='del'>-	    if (memcmp (hash, remmd, MD5_SIGNATURE_SIZE) == 0)</div><div class='del'>-		code = CHAP_SUCCESS;	/* they are the same! */</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    CHAPDEBUG(("unknown digest type %d", cstate-&gt;chal_type));</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    BZERO(secret, sizeof(secret));</div><div class='del'>-    ChapSendStatus(cstate, code);</div><div class='del'>-</div><div class='del'>-    if (code == CHAP_SUCCESS) {</div><div class='del'>-	old_state = cstate-&gt;serverstate;</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_OPEN;</div><div class='del'>-	if (old_state == CHAPSS_INITIAL_CHAL) {</div><div class='del'>-	    auth_peer_success(cstate-&gt;unit, PPP_CHAP, rhostname, len);</div><div class='del'>-	}</div><div class='del'>-	if (cstate-&gt;chal_interval != 0)</div><div class='del'>-	    TIMEOUT(ChapRechallenge, cstate, cstate-&gt;chal_interval);</div><div class='del'>-	notice("CHAP peer authentication succeeded for %q", rhostname);</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	error("CHAP peer authentication failed for remote host %q", rhostname);</div><div class='del'>-	cstate-&gt;serverstate = CHAPSS_BADAUTH;</div><div class='del'>-	auth_peer_fail(cstate-&gt;unit, PPP_CHAP);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapReceiveSuccess - Receive Success</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapReceiveSuccess(cstate, inp, id, len)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    u_char id;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;clientstate == CHAPCS_OPEN)</div><div class='del'>-	/* presumably an answer to a duplicate response */</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    if (cstate-&gt;clientstate != CHAPCS_RESPONSE) {</div><div class='del'>-	/* don't know what this is */</div><div class='del'>-	CHAPDEBUG(("ChapReceiveSuccess: in state %d\n", cstate-&gt;clientstate));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    UNTIMEOUT(ChapResponseTimeout, cstate);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Print message.</div><div class='del'>-     */</div><div class='del'>-    if (len &gt; 0)</div><div class='del'>-	PRINTMSG(inp, len);</div><div class='del'>-</div><div class='del'>-    cstate-&gt;clientstate = CHAPCS_OPEN;</div><div class='del'>-</div><div class='del'>-    auth_withpeer_success(cstate-&gt;unit, PPP_CHAP);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapReceiveFailure - Receive failure.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapReceiveFailure(cstate, inp, id, len)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    u_char id;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    if (cstate-&gt;clientstate != CHAPCS_RESPONSE) {</div><div class='del'>-	/* don't know what this is */</div><div class='del'>-	CHAPDEBUG(("ChapReceiveFailure: in state %d\n", cstate-&gt;clientstate));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    UNTIMEOUT(ChapResponseTimeout, cstate);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Print message.</div><div class='del'>-     */</div><div class='del'>-    if (len &gt; 0)</div><div class='del'>-	PRINTMSG(inp, len);</div><div class='del'>-</div><div class='del'>-    error("CHAP authentication failed");</div><div class='del'>-    auth_withpeer_fail(cstate-&gt;unit, PPP_CHAP);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapSendChallenge - Send an Authenticate challenge.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapSendChallenge(cstate)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int chal_len, name_len;</div><div class='del'>-    int outlen;</div><div class='del'>-</div><div class='del'>-    chal_len = cstate-&gt;chal_len;</div><div class='del'>-    name_len = strlen(cstate-&gt;chal_name);</div><div class='del'>-    outlen = CHAP_HEADERLEN + sizeof (u_char) + chal_len + name_len;</div><div class='del'>-    outp = outpacket_buf;</div><div class='del'>-</div><div class='del'>-    MAKEHEADER(outp, PPP_CHAP);		/* paste in a CHAP header */</div><div class='del'>-</div><div class='del'>-    PUTCHAR(CHAP_CHALLENGE, outp);</div><div class='del'>-    PUTCHAR(cstate-&gt;chal_id, outp);</div><div class='del'>-    PUTSHORT(outlen, outp);</div><div class='del'>-</div><div class='del'>-    PUTCHAR(chal_len, outp);		/* put length of challenge */</div><div class='del'>-    BCOPY(cstate-&gt;challenge, outp, chal_len);</div><div class='del'>-    INCPTR(chal_len, outp);</div><div class='del'>-</div><div class='del'>-    BCOPY(cstate-&gt;chal_name, outp, name_len);	/* append hostname */</div><div class='del'>-</div><div class='del'>-    output(cstate-&gt;unit, outpacket_buf, outlen + PPP_HDRLEN);</div><div class='del'>-  </div><div class='del'>-    TIMEOUT(ChapChallengeTimeout, cstate, cstate-&gt;timeouttime);</div><div class='del'>-    ++cstate-&gt;chal_transmits;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapSendStatus - Send a status response (ack or nak).</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ChapSendStatus(cstate, code)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    int code;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int outlen, msglen;</div><div class='del'>-    char msg[256];</div><div class='del'>-</div><div class='del'>-    if (code == CHAP_SUCCESS)</div><div class='del'>-	slprintf(msg, sizeof(msg), "Welcome to %s.", hostname);</div><div class='del'>-    else</div><div class='del'>-	slprintf(msg, sizeof(msg), "I don't like you.  Go 'way.");</div><div class='del'>-    msglen = strlen(msg);</div><div class='del'>-</div><div class='del'>-    outlen = CHAP_HEADERLEN + msglen;</div><div class='del'>-    outp = outpacket_buf;</div><div class='del'>-</div><div class='del'>-    MAKEHEADER(outp, PPP_CHAP);	/* paste in a header */</div><div class='del'>-  </div><div class='del'>-    PUTCHAR(code, outp);</div><div class='del'>-    PUTCHAR(cstate-&gt;chal_id, outp);</div><div class='del'>-    PUTSHORT(outlen, outp);</div><div class='del'>-    BCOPY(msg, outp, msglen);</div><div class='del'>-    output(cstate-&gt;unit, outpacket_buf, outlen + PPP_HDRLEN);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapGenChallenge is used to generate a pseudo-random challenge string of</div><div class='del'>- * a pseudo-random length between min_len and max_len.  The challenge</div><div class='del'>- * string and its length are stored in *cstate, and various other fields of</div><div class='del'>- * *cstate are initialized.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ChapGenChallenge(cstate)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-{</div><div class='del'>-    int chal_len;</div><div class='del'>-    u_char *ptr = cstate-&gt;challenge;</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    /* pick a random challenge length between MIN_CHALLENGE_LENGTH and </div><div class='del'>-       MAX_CHALLENGE_LENGTH */  </div><div class='del'>-    chal_len =  (unsigned) ((drand48() *</div><div class='del'>-			     (MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) +</div><div class='del'>-			    MIN_CHALLENGE_LENGTH);</div><div class='del'>-    cstate-&gt;chal_len = chal_len;</div><div class='del'>-    cstate-&gt;chal_id = ++cstate-&gt;id;</div><div class='del'>-    cstate-&gt;chal_transmits = 0;</div><div class='del'>-</div><div class='del'>-    /* generate a random string */</div><div class='del'>-    for (i = 0; i &lt; chal_len; i++)</div><div class='del'>-	*ptr++ = (char) (drand48() * 0xff);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapSendResponse - send a response packet with values as specified</div><div class='del'>- * in *cstate.</div><div class='del'>- */</div><div class='del'>-/* ARGSUSED */</div><div class='del'>-static void</div><div class='del'>-ChapSendResponse(cstate)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int outlen, md_len, name_len;</div><div class='del'>-</div><div class='del'>-    md_len = cstate-&gt;resp_length;</div><div class='del'>-    name_len = strlen(cstate-&gt;resp_name);</div><div class='del'>-    outlen = CHAP_HEADERLEN + sizeof (u_char) + md_len + name_len;</div><div class='del'>-    outp = outpacket_buf;</div><div class='del'>-</div><div class='del'>-    MAKEHEADER(outp, PPP_CHAP);</div><div class='del'>-</div><div class='del'>-    PUTCHAR(CHAP_RESPONSE, outp);	/* we are a response */</div><div class='del'>-    PUTCHAR(cstate-&gt;resp_id, outp);	/* copy id from challenge packet */</div><div class='del'>-    PUTSHORT(outlen, outp);		/* packet length */</div><div class='del'>-</div><div class='del'>-    PUTCHAR(md_len, outp);		/* length of MD */</div><div class='del'>-    BCOPY(cstate-&gt;response, outp, md_len);	/* copy MD to buffer */</div><div class='del'>-    INCPTR(md_len, outp);</div><div class='del'>-</div><div class='del'>-    BCOPY(cstate-&gt;resp_name, outp, name_len); /* append our name */</div><div class='del'>-</div><div class='del'>-    /* send the packet */</div><div class='del'>-    output(cstate-&gt;unit, outpacket_buf, outlen + PPP_HDRLEN);</div><div class='del'>-</div><div class='del'>-    cstate-&gt;clientstate = CHAPCS_RESPONSE;</div><div class='del'>-    TIMEOUT(ChapResponseTimeout, cstate, cstate-&gt;timeouttime);</div><div class='del'>-    ++cstate-&gt;resp_transmits;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ChapPrintPkt - print the contents of a CHAP packet.</div><div class='del'>- */</div><div class='del'>-static char *ChapCodenames[] = {</div><div class='del'>-    "Challenge", "Response", "Success", "Failure"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ChapPrintPkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, id, len;</div><div class='del'>-    int clen, nlen;</div><div class='del'>-    u_char x;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; CHAP_HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; CHAP_HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(ChapCodenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", ChapCodenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= CHAP_HEADERLEN;</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CHAP_CHALLENGE:</div><div class='del'>-    case CHAP_RESPONSE:</div><div class='del'>-	if (len &lt; 1)</div><div class='del'>-	    break;</div><div class='del'>-	clen = p[0];</div><div class='del'>-	if (len &lt; clen + 1)</div><div class='del'>-	    break;</div><div class='del'>-	++p;</div><div class='del'>-	nlen = len - clen - 1;</div><div class='del'>-	printer(arg, " &lt;");</div><div class='del'>-	for (; clen &gt; 0; --clen) {</div><div class='del'>-	    GETCHAR(x, p);</div><div class='del'>-	    printer(arg, "%.2x", x);</div><div class='del'>-	}</div><div class='del'>-	printer(arg, "&gt;, name = ");</div><div class='del'>-	print_string((char *)p, nlen, printer, arg);</div><div class='del'>-	break;</div><div class='del'>-    case CHAP_FAILURE:</div><div class='del'>-    case CHAP_SUCCESS:</div><div class='del'>-	printer(arg, " ");</div><div class='del'>-	print_string((char *)p, len, printer, arg);</div><div class='del'>-	break;</div><div class='del'>-    default:</div><div class='del'>-	for (clen = len; clen &gt; 0; --clen) {</div><div class='del'>-	    GETCHAR(x, p);</div><div class='del'>-	    printer(arg, " %.2x", x);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return len + CHAP_HEADERLEN;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/chap.h b/mdk-stage1/ppp/pppd/chap.h<br/>deleted file mode 100644<br/>index 945d051d0..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/chap.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/chap.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,124 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * chap.h - Challenge Handshake Authentication Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1993 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the Australian National University.  The name of the University</div><div class='del'>- * may not be used to endorse or promote products derived from this</div><div class='del'>- * software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1991 Gregory M. Christy</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the author.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __CHAP_INCLUDE__</div><div class='del'>-</div><div class='del'>-/* Code + ID + length */</div><div class='del'>-#define CHAP_HEADERLEN		4</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * CHAP codes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CHAP_DIGEST_MD5		5	/* use MD5 algorithm */</div><div class='del'>-#define MD5_SIGNATURE_SIZE	16	/* 16 bytes in a MD5 message digest */</div><div class='del'>-#define CHAP_MICROSOFT		0x80	/* use Microsoft-compatible alg. */</div><div class='del'>-#define MS_CHAP_RESPONSE_LEN	49	/* Response length for MS-CHAP */</div><div class='del'>-</div><div class='del'>-#define CHAP_CHALLENGE		1</div><div class='del'>-#define CHAP_RESPONSE		2</div><div class='del'>-#define CHAP_SUCCESS		3</div><div class='del'>-#define CHAP_FAILURE    	4</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  Challenge lengths (for challenges we send) and other limits.</div><div class='del'>- */</div><div class='del'>-#define MIN_CHALLENGE_LENGTH	16</div><div class='del'>-#define MAX_CHALLENGE_LENGTH	24</div><div class='del'>-#define MAX_RESPONSE_LENGTH	64	/* sufficient for MD5 or MS-CHAP */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Each interface is described by a chap structure.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef struct chap_state {</div><div class='del'>-    int unit;			/* Interface unit number */</div><div class='del'>-    int clientstate;		/* Client state */</div><div class='del'>-    int serverstate;		/* Server state */</div><div class='del'>-    u_char challenge[MAX_CHALLENGE_LENGTH]; /* last challenge string sent */</div><div class='del'>-    u_char chal_len;		/* challenge length */</div><div class='del'>-    u_char chal_id;		/* ID of last challenge */</div><div class='del'>-    u_char chal_type;		/* hash algorithm for challenges */</div><div class='del'>-    u_char id;			/* Current id */</div><div class='del'>-    char *chal_name;		/* Our name to use with challenge */</div><div class='del'>-    int chal_interval;		/* Time until we challenge peer again */</div><div class='del'>-    int timeouttime;		/* Timeout time in seconds */</div><div class='del'>-    int max_transmits;		/* Maximum # of challenge transmissions */</div><div class='del'>-    int chal_transmits;		/* Number of transmissions of challenge */</div><div class='del'>-    int resp_transmits;		/* Number of transmissions of response */</div><div class='del'>-    u_char response[MAX_RESPONSE_LENGTH];	/* Response to send */</div><div class='del'>-    u_char resp_length;		/* length of response */</div><div class='del'>-    u_char resp_id;		/* ID for response messages */</div><div class='del'>-    u_char resp_type;		/* hash algorithm for responses */</div><div class='del'>-    char *resp_name;		/* Our name to send with response */</div><div class='del'>-} chap_state;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Client (peer) states.</div><div class='del'>- */</div><div class='del'>-#define CHAPCS_INITIAL		0	/* Lower layer down, not opened */</div><div class='del'>-#define CHAPCS_CLOSED		1	/* Lower layer up, not opened */</div><div class='del'>-#define CHAPCS_PENDING		2	/* Auth us to peer when lower up */</div><div class='del'>-#define CHAPCS_LISTEN		3	/* Listening for a challenge */</div><div class='del'>-#define CHAPCS_RESPONSE		4	/* Sent response, waiting for status */</div><div class='del'>-#define CHAPCS_OPEN		5	/* We've received Success */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Server (authenticator) states.</div><div class='del'>- */</div><div class='del'>-#define CHAPSS_INITIAL		0	/* Lower layer down, not opened */</div><div class='del'>-#define CHAPSS_CLOSED		1	/* Lower layer up, not opened */</div><div class='del'>-#define CHAPSS_PENDING		2	/* Auth peer when lower up */</div><div class='del'>-#define CHAPSS_INITIAL_CHAL	3	/* We've sent the first challenge */</div><div class='del'>-#define CHAPSS_OPEN		4	/* We've sent a Success msg */</div><div class='del'>-#define CHAPSS_RECHALLENGE	5	/* We've sent another challenge */</div><div class='del'>-#define CHAPSS_BADAUTH		6	/* We've sent a Failure msg */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Timeouts.</div><div class='del'>- */</div><div class='del'>-#define CHAP_DEFTIMEOUT		3	/* Timeout time in seconds */</div><div class='del'>-#define CHAP_DEFTRANSMITS	10	/* max # times to send challenge */</div><div class='del'>-</div><div class='del'>-extern chap_state chap[];</div><div class='del'>-</div><div class='del'>-void ChapAuthWithPeer __P((int, char *, int));</div><div class='del'>-void ChapAuthPeer __P((int, char *, int));</div><div class='del'>-</div><div class='del'>-extern struct protent chap_protent;</div><div class='del'>-</div><div class='del'>-#define __CHAP_INCLUDE__</div><div class='del'>-#endif /* __CHAP_INCLUDE__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/chap_ms.c b/mdk-stage1/ppp/pppd/chap_ms.c<br/>deleted file mode 100644<br/>index 81a57bb5a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/chap_ms.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/chap_ms.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,338 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * chap_ms.c - Microsoft MS-CHAP compatible implementation.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.</div><div class='del'>- * http://www.strataware.com/</div><div class='del'>- *</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Eric Rosenquist.  The name of the author may not be used to</div><div class='del'>- * endorse or promote products derived from this software without</div><div class='del'>- * specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Modifications by Lauri Pesonen / lpesonen@clinet.fi, april 1997</div><div class='del'>- *</div><div class='del'>- *   Implemented LANManager type password response to MS-CHAP challenges.</div><div class='del'>- *   Now pppd provides both NT style and LANMan style blocks, and the</div><div class='del'>- *   prefered is set by option "ms-lanman". Default is to use NT.</div><div class='del'>- *   The hash text (StdText) was taken from Win95 RASAPI32.DLL.</div><div class='del'>- *</div><div class='del'>- *   You should also use DOMAIN\\USERNAME as described in README.MSCHAP80</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#ifdef HAVE_CRYPT_H</div><div class='del'>-#include &lt;crypt.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#include "chap_ms.h"</div><div class='del'>-#include "md4.h"</div><div class='del'>-</div><div class='del'>-#ifndef USE_CRYPT</div><div class='del'>-#include &lt;des.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-    u_char LANManResp[24];</div><div class='del'>-    u_char NTResp[24];</div><div class='del'>-    u_char UseNT;		/* If 1, ignore the LANMan response field */</div><div class='del'>-} MS_ChapResponse;</div><div class='del'>-/* We use MS_CHAP_RESPONSE_LEN, rather than sizeof(MS_ChapResponse),</div><div class='del'>-   in case this struct gets padded. */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static void	ChallengeResponse __P((u_char *, u_char *, u_char *));</div><div class='del'>-static void	DesEncrypt __P((u_char *, u_char *, u_char *));</div><div class='del'>-static void	MakeKey __P((u_char *, u_char *));</div><div class='del'>-static u_char	Get7Bits __P((u_char *, int));</div><div class='del'>-static void	ChapMS_NT __P((char *, int, char *, int, MS_ChapResponse *));</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-static void	ChapMS_LANMan __P((char *, int, char *, int, MS_ChapResponse *));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef USE_CRYPT</div><div class='del'>-static void	Expand __P((u_char *, u_char *));</div><div class='del'>-static void	Collapse __P((u_char *, u_char *));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-bool	ms_lanman = 0;    	/* Use LanMan password instead of NT */</div><div class='del'>-			  	/* Has meaning only with MS-CHAP challenges */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ChallengeResponse(challenge, pwHash, response)</div><div class='del'>-    u_char *challenge;	/* IN   8 octets */</div><div class='del'>-    u_char *pwHash;	/* IN  16 octets */</div><div class='del'>-    u_char *response;	/* OUT 24 octets */</div><div class='del'>-{</div><div class='del'>-    char    ZPasswordHash[21];</div><div class='del'>-</div><div class='del'>-    BZERO(ZPasswordHash, sizeof(ZPasswordHash));</div><div class='del'>-    BCOPY(pwHash, ZPasswordHash, MD4_SIGNATURE_SIZE);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    dbglog("ChallengeResponse - ZPasswordHash %.*B",</div><div class='del'>-	   sizeof(ZPasswordHash), ZPasswordHash);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    DesEncrypt(challenge, ZPasswordHash +  0, response + 0);</div><div class='del'>-    DesEncrypt(challenge, ZPasswordHash +  7, response + 8);</div><div class='del'>-    DesEncrypt(challenge, ZPasswordHash + 14, response + 16);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    dbglog("ChallengeResponse - response %.24B", response);</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#ifdef USE_CRYPT</div><div class='del'>-static void</div><div class='del'>-DesEncrypt(clear, key, cipher)</div><div class='del'>-    u_char *clear;	/* IN  8 octets */</div><div class='del'>-    u_char *key;	/* IN  7 octets */</div><div class='del'>-    u_char *cipher;	/* OUT 8 octets */</div><div class='del'>-{</div><div class='del'>-    u_char des_key[8];</div><div class='del'>-    u_char crypt_key[66];</div><div class='del'>-    u_char des_input[66];</div><div class='del'>-</div><div class='del'>-    MakeKey(key, des_key);</div><div class='del'>-</div><div class='del'>-    Expand(des_key, crypt_key);</div><div class='del'>-    setkey(crypt_key);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet input : %.8B", clear));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    Expand(clear, des_input);</div><div class='del'>-    encrypt(des_input, 0);</div><div class='del'>-    Collapse(des_input, cipher);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet output: %.8B", cipher));</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#else /* USE_CRYPT */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-DesEncrypt(clear, key, cipher)</div><div class='del'>-    u_char *clear;	/* IN  8 octets */</div><div class='del'>-    u_char *key;	/* IN  7 octets */</div><div class='del'>-    u_char *cipher;	/* OUT 8 octets */</div><div class='del'>-{</div><div class='del'>-    des_cblock		des_key;</div><div class='del'>-    des_key_schedule	key_schedule;</div><div class='del'>-</div><div class='del'>-    MakeKey(key, des_key);</div><div class='del'>-</div><div class='del'>-    des_set_key(&amp;des_key, key_schedule);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet input : %.8B", clear));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "DesEncrypt: 8 octet output: %.8B", cipher));</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* USE_CRYPT */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static u_char Get7Bits(input, startBit)</div><div class='del'>-    u_char *input;</div><div class='del'>-    int startBit;</div><div class='del'>-{</div><div class='del'>-    register unsigned int	word;</div><div class='del'>-</div><div class='del'>-    word  = (unsigned)input[startBit / 8] &lt;&lt; 8;</div><div class='del'>-    word |= (unsigned)input[startBit / 8 + 1];</div><div class='del'>-</div><div class='del'>-    word &gt;&gt;= 15 - (startBit % 8 + 7);</div><div class='del'>-</div><div class='del'>-    return word &amp; 0xFE;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef USE_CRYPT</div><div class='del'>-</div><div class='del'>-/* in == 8-byte string (expanded version of the 56-bit key)</div><div class='del'>- * out == 64-byte string where each byte is either 1 or 0</div><div class='del'>- * Note that the low-order "bit" is always ignored by by setkey()</div><div class='del'>- */</div><div class='del'>-static void Expand(in, out)</div><div class='del'>-    u_char *in;</div><div class='del'>-    u_char *out;</div><div class='del'>-{</div><div class='del'>-        int j, c;</div><div class='del'>-        int i;</div><div class='del'>-</div><div class='del'>-        for(i = 0; i &lt; 64; in++){</div><div class='del'>-		c = *in;</div><div class='del'>-                for(j = 7; j &gt;= 0; j--)</div><div class='del'>-                        *out++ = (c &gt;&gt; j) &amp; 01;</div><div class='del'>-                i += 8;</div><div class='del'>-        }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* The inverse of Expand</div><div class='del'>- */</div><div class='del'>-static void Collapse(in, out)</div><div class='del'>-    u_char *in;</div><div class='del'>-    u_char *out;</div><div class='del'>-{</div><div class='del'>-        int j;</div><div class='del'>-        int i;</div><div class='del'>-	unsigned int c;</div><div class='del'>-</div><div class='del'>-	for (i = 0; i &lt; 64; i += 8, out++) {</div><div class='del'>-	    c = 0;</div><div class='del'>-	    for (j = 7; j &gt;= 0; j--, in++)</div><div class='del'>-		c |= *in &lt;&lt; j;</div><div class='del'>-	    *out = c &amp; 0xff;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static void MakeKey(key, des_key)</div><div class='del'>-    u_char *key;	/* IN  56 bit DES key missing parity bits */</div><div class='del'>-    u_char *des_key;	/* OUT 64 bit DES key with parity bits added */</div><div class='del'>-{</div><div class='del'>-    des_key[0] = Get7Bits(key,  0);</div><div class='del'>-    des_key[1] = Get7Bits(key,  7);</div><div class='del'>-    des_key[2] = Get7Bits(key, 14);</div><div class='del'>-    des_key[3] = Get7Bits(key, 21);</div><div class='del'>-    des_key[4] = Get7Bits(key, 28);</div><div class='del'>-    des_key[5] = Get7Bits(key, 35);</div><div class='del'>-    des_key[6] = Get7Bits(key, 42);</div><div class='del'>-    des_key[7] = Get7Bits(key, 49);</div><div class='del'>-</div><div class='del'>-#ifndef USE_CRYPT</div><div class='del'>-    des_set_odd_parity((des_cblock *)des_key);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "MakeKey: 56-bit input : %.7B", key));</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "MakeKey: 64-bit output: %.8B", des_key));</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ChapMS_NT(rchallenge, rchallenge_len, secret, secret_len, response)</div><div class='del'>-    char *rchallenge;</div><div class='del'>-    int rchallenge_len;</div><div class='del'>-    char *secret;</div><div class='del'>-    int secret_len;</div><div class='del'>-    MS_ChapResponse    *response;</div><div class='del'>-{</div><div class='del'>-    int			i;</div><div class='del'>-#ifdef __NetBSD__</div><div class='del'>-    /* NetBSD uses the libc md4 routines which take bytes instead of bits */</div><div class='del'>-    int			mdlen = secret_len * 2;</div><div class='del'>-#else</div><div class='del'>-    int			mdlen = secret_len * 2 * 8;</div><div class='del'>-#endif</div><div class='del'>-    MD4_CTX		md4Context;</div><div class='del'>-    u_char		hash[MD4_SIGNATURE_SIZE];</div><div class='del'>-    u_char		unicodePassword[MAX_NT_PASSWORD * 2];</div><div class='del'>-</div><div class='del'>-    /* Initialize the Unicode version of the secret (== password). */</div><div class='del'>-    /* This implicitly supports 8-bit ISO8859/1 characters. */</div><div class='del'>-    BZERO(unicodePassword, sizeof(unicodePassword));</div><div class='del'>-    for (i = 0; i &lt; secret_len; i++)</div><div class='del'>-	unicodePassword[i * 2] = (u_char)secret[i];</div><div class='del'>-</div><div class='del'>-    MD4Init(&amp;md4Context);</div><div class='del'>-    MD4Update(&amp;md4Context, unicodePassword, mdlen);</div><div class='del'>-</div><div class='del'>-    MD4Final(hash, &amp;md4Context); 	/* Tell MD4 we're done */</div><div class='del'>-</div><div class='del'>-    ChallengeResponse(rchallenge, hash, response-&gt;NTResp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ChapMS_LANMan(rchallenge, rchallenge_len, secret, secret_len, response)</div><div class='del'>-    char *rchallenge;</div><div class='del'>-    int rchallenge_len;</div><div class='del'>-    char *secret;</div><div class='del'>-    int secret_len;</div><div class='del'>-    MS_ChapResponse	*response;</div><div class='del'>-{</div><div class='del'>-    int			i;</div><div class='del'>-    u_char		UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */</div><div class='del'>-    u_char		PasswordHash[MD4_SIGNATURE_SIZE];</div><div class='del'>-</div><div class='del'>-    /* LANMan password is case insensitive */</div><div class='del'>-    BZERO(UcasePassword, sizeof(UcasePassword));</div><div class='del'>-    for (i = 0; i &lt; secret_len; i++)</div><div class='del'>-       UcasePassword[i] = (u_char)toupper(secret[i]);</div><div class='del'>-    DesEncrypt( StdText, UcasePassword + 0, PasswordHash + 0 );</div><div class='del'>-    DesEncrypt( StdText, UcasePassword + 7, PasswordHash + 8 );</div><div class='del'>-    ChallengeResponse(rchallenge, PasswordHash, response-&gt;LANManResp);</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-ChapMS(cstate, rchallenge, rchallenge_len, secret, secret_len)</div><div class='del'>-    chap_state *cstate;</div><div class='del'>-    char *rchallenge;</div><div class='del'>-    int rchallenge_len;</div><div class='del'>-    char *secret;</div><div class='del'>-    int secret_len;</div><div class='del'>-{</div><div class='del'>-    MS_ChapResponse	response;</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-    CHAPDEBUG((LOG_INFO, "ChapMS: secret is '%.*s'", secret_len, secret));</div><div class='del'>-#endif</div><div class='del'>-    BZERO(&amp;response, sizeof(response));</div><div class='del'>-</div><div class='del'>-    /* Calculate both always */</div><div class='del'>-    ChapMS_NT(rchallenge, rchallenge_len, secret, secret_len, &amp;response);</div><div class='del'>-</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-    ChapMS_LANMan(rchallenge, rchallenge_len, secret, secret_len, &amp;response);</div><div class='del'>-</div><div class='del'>-    /* prefered method is set by option  */</div><div class='del'>-    response.UseNT = !ms_lanman;</div><div class='del'>-#else</div><div class='del'>-    response.UseNT = 1;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    BCOPY(&amp;response, cstate-&gt;response, MS_CHAP_RESPONSE_LEN);</div><div class='del'>-    cstate-&gt;resp_length = MS_CHAP_RESPONSE_LEN;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* CHAPMS */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/chap_ms.h b/mdk-stage1/ppp/pppd/chap_ms.h<br/>deleted file mode 100644<br/>index fad2755c8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/chap_ms.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/chap_ms.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,33 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * chap.h - Challenge Handshake Authentication Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.</div><div class='del'>- * http://www.strataware.com/</div><div class='del'>- *</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Eric Rosenquist.  The name of the author may not be used to</div><div class='del'>- * endorse or promote products derived from this software without</div><div class='del'>- * specific prior written permission.</div><div class='del'>- *</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __CHAPMS_INCLUDE__</div><div class='del'>-</div><div class='del'>-#define MD4_SIGNATURE_SIZE	16	/* 16 bytes in a MD4 message digest */</div><div class='del'>-#define MAX_NT_PASSWORD	256	/* Maximum number of (Unicode) chars in an NT password */</div><div class='del'>-</div><div class='del'>-void ChapMS __P((chap_state *, char *, int, char *, int));</div><div class='del'>-</div><div class='del'>-#define __CHAPMS_INCLUDE__</div><div class='del'>-#endif /* __CHAPMS_INCLUDE__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/demand.c b/mdk-stage1/ppp/pppd/demand.c<br/>deleted file mode 100644<br/>index 9a740be8d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/demand.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/demand.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,351 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * demand.c - Support routines for demand-dialling.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1993 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by the Australian National University.  The name of the University</div><div class='del'>- * may not be used to endorse or promote products derived from this</div><div class='del'>- * software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/resource.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/bpf.h&gt;</div><div class='del'>-#include &lt;pcap.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-char *frame;</div><div class='del'>-int framelen;</div><div class='del'>-int framemax;</div><div class='del'>-int escape_flag;</div><div class='del'>-int flush_flag;</div><div class='del'>-int fcs;</div><div class='del'>-</div><div class='del'>-struct packet {</div><div class='del'>-    int length;</div><div class='del'>-    struct packet *next;</div><div class='del'>-    unsigned char data[1];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-struct packet *pend_q;</div><div class='del'>-struct packet *pend_qtail;</div><div class='del'>-</div><div class='del'>-static int active_packet __P((unsigned char *, int));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * demand_conf - configure the interface for doing dial-on-demand.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-demand_conf()</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-/*    framemax = lcp_allowoptions[0].mru;</div><div class='del'>-    if (framemax &lt; PPP_MRU) */</div><div class='del'>-	framemax = PPP_MRU;</div><div class='del'>-    framemax += PPP_HDRLEN + PPP_FCSLEN;</div><div class='del'>-    frame = malloc(framemax);</div><div class='del'>-    if (frame == NULL)</div><div class='del'>-	novm("demand frame");</div><div class='del'>-    framelen = 0;</div><div class='del'>-    pend_q = NULL;</div><div class='del'>-    escape_flag = 0;</div><div class='del'>-    flush_flag = 0;</div><div class='del'>-    fcs = PPP_INITFCS;</div><div class='del'>-</div><div class='del'>-    netif_set_mtu(0, MIN(lcp_allowoptions[0].mru, PPP_MRU));</div><div class='del'>-    ppp_send_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);</div><div class='del'>-    ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0);</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-    set_filters(&amp;pass_filter, &amp;active_filter);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Call the demand_conf procedure for each protocol that's got one.</div><div class='del'>-     */</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;enabled_flag &amp;&amp; protp-&gt;demand_conf != NULL)</div><div class='del'>-	    if (!((*protp-&gt;demand_conf)(0)))</div><div class='del'>-		die(1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * demand_block - set each network protocol to block further packets.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-demand_block()</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;enabled_flag &amp;&amp; protp-&gt;demand_conf != NULL)</div><div class='del'>-	    sifnpmode(0, protp-&gt;protocol &amp; ~0x8000, NPMODE_QUEUE);</div><div class='del'>-    get_loop_output();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * demand_discard - set each network protocol to discard packets</div><div class='del'>- * with an error.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-demand_discard()</div><div class='del'>-{</div><div class='del'>-    struct packet *pkt, *nextpkt;</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;enabled_flag &amp;&amp; protp-&gt;demand_conf != NULL)</div><div class='del'>-	    sifnpmode(0, protp-&gt;protocol &amp; ~0x8000, NPMODE_ERROR);</div><div class='del'>-    get_loop_output();</div><div class='del'>-</div><div class='del'>-    /* discard all saved packets */</div><div class='del'>-    for (pkt = pend_q; pkt != NULL; pkt = nextpkt) {</div><div class='del'>-	nextpkt = pkt-&gt;next;</div><div class='del'>-	free(pkt);</div><div class='del'>-    }</div><div class='del'>-    pend_q = NULL;</div><div class='del'>-    framelen = 0;</div><div class='del'>-    flush_flag = 0;</div><div class='del'>-    escape_flag = 0;</div><div class='del'>-    fcs = PPP_INITFCS;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * demand_unblock - set each enabled network protocol to pass packets.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-demand_unblock()</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;enabled_flag &amp;&amp; protp-&gt;demand_conf != NULL)</div><div class='del'>-	    sifnpmode(0, protp-&gt;protocol &amp; ~0x8000, NPMODE_PASS);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * FCS lookup table as calculated by genfcstab.</div><div class='del'>- */</div><div class='del'>-static u_short fcstab[256] = {</div><div class='del'>-	0x0000,	0x1189,	0x2312,	0x329b,	0x4624,	0x57ad,	0x6536,	0x74bf,</div><div class='del'>-	0x8c48,	0x9dc1,	0xaf5a,	0xbed3,	0xca6c,	0xdbe5,	0xe97e,	0xf8f7,</div><div class='del'>-	0x1081,	0x0108,	0x3393,	0x221a,	0x56a5,	0x472c,	0x75b7,	0x643e,</div><div class='del'>-	0x9cc9,	0x8d40,	0xbfdb,	0xae52,	0xdaed,	0xcb64,	0xf9ff,	0xe876,</div><div class='del'>-	0x2102,	0x308b,	0x0210,	0x1399,	0x6726,	0x76af,	0x4434,	0x55bd,</div><div class='del'>-	0xad4a,	0xbcc3,	0x8e58,	0x9fd1,	0xeb6e,	0xfae7,	0xc87c,	0xd9f5,</div><div class='del'>-	0x3183,	0x200a,	0x1291,	0x0318,	0x77a7,	0x662e,	0x54b5,	0x453c,</div><div class='del'>-	0xbdcb,	0xac42,	0x9ed9,	0x8f50,	0xfbef,	0xea66,	0xd8fd,	0xc974,</div><div class='del'>-	0x4204,	0x538d,	0x6116,	0x709f,	0x0420,	0x15a9,	0x2732,	0x36bb,</div><div class='del'>-	0xce4c,	0xdfc5,	0xed5e,	0xfcd7,	0x8868,	0x99e1,	0xab7a,	0xbaf3,</div><div class='del'>-	0x5285,	0x430c,	0x7197,	0x601e,	0x14a1,	0x0528,	0x37b3,	0x263a,</div><div class='del'>-	0xdecd,	0xcf44,	0xfddf,	0xec56,	0x98e9,	0x8960,	0xbbfb,	0xaa72,</div><div class='del'>-	0x6306,	0x728f,	0x4014,	0x519d,	0x2522,	0x34ab,	0x0630,	0x17b9,</div><div class='del'>-	0xef4e,	0xfec7,	0xcc5c,	0xddd5,	0xa96a,	0xb8e3,	0x8a78,	0x9bf1,</div><div class='del'>-	0x7387,	0x620e,	0x5095,	0x411c,	0x35a3,	0x242a,	0x16b1,	0x0738,</div><div class='del'>-	0xffcf,	0xee46,	0xdcdd,	0xcd54,	0xb9eb,	0xa862,	0x9af9,	0x8b70,</div><div class='del'>-	0x8408,	0x9581,	0xa71a,	0xb693,	0xc22c,	0xd3a5,	0xe13e,	0xf0b7,</div><div class='del'>-	0x0840,	0x19c9,	0x2b52,	0x3adb,	0x4e64,	0x5fed,	0x6d76,	0x7cff,</div><div class='del'>-	0x9489,	0x8500,	0xb79b,	0xa612,	0xd2ad,	0xc324,	0xf1bf,	0xe036,</div><div class='del'>-	0x18c1,	0x0948,	0x3bd3,	0x2a5a,	0x5ee5,	0x4f6c,	0x7df7,	0x6c7e,</div><div class='del'>-	0xa50a,	0xb483,	0x8618,	0x9791,	0xe32e,	0xf2a7,	0xc03c,	0xd1b5,</div><div class='del'>-	0x2942,	0x38cb,	0x0a50,	0x1bd9,	0x6f66,	0x7eef,	0x4c74,	0x5dfd,</div><div class='del'>-	0xb58b,	0xa402,	0x9699,	0x8710,	0xf3af,	0xe226,	0xd0bd,	0xc134,</div><div class='del'>-	0x39c3,	0x284a,	0x1ad1,	0x0b58,	0x7fe7,	0x6e6e,	0x5cf5,	0x4d7c,</div><div class='del'>-	0xc60c,	0xd785,	0xe51e,	0xf497,	0x8028,	0x91a1,	0xa33a,	0xb2b3,</div><div class='del'>-	0x4a44,	0x5bcd,	0x6956,	0x78df,	0x0c60,	0x1de9,	0x2f72,	0x3efb,</div><div class='del'>-	0xd68d,	0xc704,	0xf59f,	0xe416,	0x90a9,	0x8120,	0xb3bb,	0xa232,</div><div class='del'>-	0x5ac5,	0x4b4c,	0x79d7,	0x685e,	0x1ce1,	0x0d68,	0x3ff3,	0x2e7a,</div><div class='del'>-	0xe70e,	0xf687,	0xc41c,	0xd595,	0xa12a,	0xb0a3,	0x8238,	0x93b1,</div><div class='del'>-	0x6b46,	0x7acf,	0x4854,	0x59dd,	0x2d62,	0x3ceb,	0x0e70,	0x1ff9,</div><div class='del'>-	0xf78f,	0xe606,	0xd49d,	0xc514,	0xb1ab,	0xa022,	0x92b9,	0x8330,</div><div class='del'>-	0x7bc7,	0x6a4e,	0x58d5,	0x495c,	0x3de3,	0x2c6a,	0x1ef1,	0x0f78</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * loop_chars - process characters received from the loopback.</div><div class='del'>- * Calls loop_frame when a complete frame has been accumulated.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-loop_chars(p, n)</div><div class='del'>-    unsigned char *p;</div><div class='del'>-    int n;</div><div class='del'>-{</div><div class='del'>-    int c, rv;</div><div class='del'>-</div><div class='del'>-    rv = 0;</div><div class='del'>-    for (; n &gt; 0; --n) {</div><div class='del'>-	c = *p++;</div><div class='del'>-	if (c == PPP_FLAG) {</div><div class='del'>-	    if (!escape_flag &amp;&amp; !flush_flag</div><div class='del'>-		&amp;&amp; framelen &gt; 2 &amp;&amp; fcs == PPP_GOODFCS) {</div><div class='del'>-		framelen -= 2;</div><div class='del'>-		if (loop_frame((unsigned char *)frame, framelen))</div><div class='del'>-		    rv = 1;</div><div class='del'>-	    }</div><div class='del'>-	    framelen = 0;</div><div class='del'>-	    flush_flag = 0;</div><div class='del'>-	    escape_flag = 0;</div><div class='del'>-	    fcs = PPP_INITFCS;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	if (flush_flag)</div><div class='del'>-	    continue;</div><div class='del'>-	if (escape_flag) {</div><div class='del'>-	    c ^= PPP_TRANS;</div><div class='del'>-	    escape_flag = 0;</div><div class='del'>-	} else if (c == PPP_ESCAPE) {</div><div class='del'>-	    escape_flag = 1;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	if (framelen &gt;= framemax) {</div><div class='del'>-	    flush_flag = 1;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-	frame[framelen++] = c;</div><div class='del'>-	fcs = PPP_FCS(fcs, c);</div><div class='del'>-    }</div><div class='del'>-    return rv;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * loop_frame - given a frame obtained from the loopback,</div><div class='del'>- * decide whether to bring up the link or not, and, if we want</div><div class='del'>- * to transmit this frame later, put it on the pending queue.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- * We assume that the kernel driver has already applied the</div><div class='del'>- * pass_filter, so we won't get packets it rejected.</div><div class='del'>- * We apply the active_filter to see if we want this packet to</div><div class='del'>- * bring up the link.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-loop_frame(frame, len)</div><div class='del'>-    unsigned char *frame;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    struct packet *pkt;</div><div class='del'>-</div><div class='del'>-    /* dbglog("from loop: %P", frame, len); */</div><div class='del'>-    if (len &lt; PPP_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    if ((PPP_PROTOCOL(frame) &amp; 0x8000) != 0)</div><div class='del'>-	return 0;		/* shouldn't get any of these anyway */</div><div class='del'>-    if (!active_packet(frame, len))</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    pkt = (struct packet *) malloc(sizeof(struct packet) + len);</div><div class='del'>-    if (pkt != NULL) {</div><div class='del'>-	pkt-&gt;length = len;</div><div class='del'>-	pkt-&gt;next = NULL;</div><div class='del'>-	memcpy(pkt-&gt;data, frame, len);</div><div class='del'>-	if (pend_q == NULL)</div><div class='del'>-	    pend_q = pkt;</div><div class='del'>-	else</div><div class='del'>-	    pend_qtail-&gt;next = pkt;</div><div class='del'>-	pend_qtail = pkt;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * demand_rexmit - Resend all those frames which we got via the</div><div class='del'>- * loopback, now that the real serial link is up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-demand_rexmit(proto)</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-    struct packet *pkt, *prev, *nextpkt;</div><div class='del'>-</div><div class='del'>-    prev = NULL;</div><div class='del'>-    pkt = pend_q;</div><div class='del'>-    pend_q = NULL;</div><div class='del'>-    for (; pkt != NULL; pkt = nextpkt) {</div><div class='del'>-	nextpkt = pkt-&gt;next;</div><div class='del'>-	if (PPP_PROTOCOL(pkt-&gt;data) == proto) {</div><div class='del'>-	    output(0, pkt-&gt;data, pkt-&gt;length);</div><div class='del'>-	    free(pkt);</div><div class='del'>-	} else {</div><div class='del'>-	    if (prev == NULL)</div><div class='del'>-		pend_q = pkt;</div><div class='del'>-	    else</div><div class='del'>-		prev-&gt;next = pkt;</div><div class='del'>-	    prev = pkt;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    pend_qtail = prev;</div><div class='del'>-    if (prev != NULL)</div><div class='del'>-	prev-&gt;next = NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Scan a packet to decide whether it is an "active" packet,</div><div class='del'>- * that is, whether it is worth bringing up the link for.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-active_packet(p, len)</div><div class='del'>-    unsigned char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    int proto, i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    if (len &lt; PPP_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    proto = PPP_PROTOCOL(p);</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-    if (pass_filter.bf_len != 0</div><div class='del'>-	&amp;&amp; bpf_filter(pass_filter.bf_insns, p, len, len) == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (active_filter.bf_len != 0</div><div class='del'>-	&amp;&amp; bpf_filter(active_filter.bf_insns, p, len, len) == 0)</div><div class='del'>-	return 0;</div><div class='del'>-#endif</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i) {</div><div class='del'>-	if (protp-&gt;protocol &lt; 0xC000 &amp;&amp; (protp-&gt;protocol &amp; ~0x8000) == proto) {</div><div class='del'>-	    if (!protp-&gt;enabled_flag)</div><div class='del'>-		return 0;</div><div class='del'>-	    if (protp-&gt;active_pkt == NULL)</div><div class='del'>-		return 1;</div><div class='del'>-	    return (*protp-&gt;active_pkt)(p, len);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 0;			/* not a supported protocol !!?? */</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/eui64.c b/mdk-stage1/ppp/pppd/eui64.c<br/>deleted file mode 100644<br/>index 7f3176035..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/eui64.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/eui64.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,40 +0,0 @@</div><div class='del'>-/*</div><div class='del'>-    eui64.c - EUI64 routines for IPv6CP.</div><div class='del'>-    Copyright (C) 1999  Tommi Komulainen &lt;Tommi.Komulainen@iki.fi&gt;</div><div class='del'>-</div><div class='del'>-    Redistribution and use in source and binary forms are permitted</div><div class='del'>-    provided that the above copyright notice and this paragraph are</div><div class='del'>-    duplicated in all such forms and that any documentation,</div><div class='del'>-    advertising materials, and other materials related to such</div><div class='del'>-    distribution and use acknowledge that the software was developed</div><div class='del'>-    by Tommi Komulainen.  The name of the author may not be used</div><div class='del'>-    to endorse or promote products derived from this software without</div><div class='del'>-    specific prior written permission.</div><div class='del'>-    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>-    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>-    WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    $Id$</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * eui64_ntoa - Make an ascii representation of an interface identifier</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-eui64_ntoa(e)</div><div class='del'>-    eui64_t e;</div><div class='del'>-{</div><div class='del'>-    static char buf[32];</div><div class='del'>-</div><div class='del'>-    snprintf(buf, 32, "%02x%02x:%02x%02x:%02x%02x:%02x%02x",</div><div class='del'>-	     e.e8[0], e.e8[1], e.e8[2], e.e8[3], </div><div class='del'>-	     e.e8[4], e.e8[5], e.e8[6], e.e8[7]);</div><div class='del'>-    return buf;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/eui64.h b/mdk-stage1/ppp/pppd/eui64.h<br/>deleted file mode 100644<br/>index ca4445345..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/eui64.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/eui64.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,97 +0,0 @@</div><div class='del'>-/*</div><div class='del'>-    eui64.h - EUI64 routines for IPv6CP.</div><div class='del'>-    Copyright (C) 1999  Tommi Komulainen &lt;Tommi.Komulainen@iki.fi&gt;</div><div class='del'>-</div><div class='del'>-    Redistribution and use in source and binary forms are permitted</div><div class='del'>-    provided that the above copyright notice and this paragraph are</div><div class='del'>-    duplicated in all such forms and that any documentation,</div><div class='del'>-    advertising materials, and other materials related to such</div><div class='del'>-    distribution and use acknowledge that the software was developed</div><div class='del'>-    by Tommi Komulainen.  The name of the author may not be used</div><div class='del'>-    to endorse or promote products derived from this software without</div><div class='del'>-    specific prior written permission.</div><div class='del'>-    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>-    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>-    WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>-</div><div class='del'>-    </div><div class='del'>-    $Id$</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#ifndef __EUI64_H__</div><div class='del'>-#define __EUI64_H__</div><div class='del'>-</div><div class='del'>-#if !defined(INET6)</div><div class='del'>-#error	"this file should only be included when INET6 is defined"</div><div class='del'>-#endif /* not defined(INET6) */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-typedef union {</div><div class='del'>-    uint8_t	e8[8];		/* lower 64-bit IPv6 address */</div><div class='del'>-    uint32_t	e32[2];		/* lower 64-bit IPv6 address */</div><div class='del'>-} eui64_t;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Declare the two below, since in.h only defines them when _KERNEL</div><div class='del'>- * is declared - which shouldn't be true when dealing with user-land programs</div><div class='del'>- */</div><div class='del'>-#define	s6_addr8	_S6_un._S6_u8</div><div class='del'>-#define	s6_addr32	_S6_un._S6_u32</div><div class='del'>-</div><div class='del'>-#else /* else if not defined(SOL2) */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- *</div><div class='del'>- * Maybe this should be done by processing struct in6_addr directly...</div><div class='del'>- */</div><div class='del'>-typedef union</div><div class='del'>-{</div><div class='del'>-    u_int8_t e8[8];</div><div class='del'>-    u_int16_t e16[4];</div><div class='del'>-    u_int32_t e32[2];</div><div class='del'>-} eui64_t;</div><div class='del'>-</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#define eui64_iszero(e)		(((e).e32[0] | (e).e32[1]) == 0)</div><div class='del'>-#define eui64_equals(e, o)	(((e).e32[0] == (o).e32[0]) &amp;&amp; \</div><div class='del'>-				((e).e32[1] == (o).e32[1]))</div><div class='del'>-#define eui64_zero(e)		(e).e32[0] = (e).e32[1] = 0;</div><div class='del'>-</div><div class='del'>-#define eui64_copy(s, d)	memcpy(&amp;(d), &amp;(s), sizeof(eui64_t))</div><div class='del'>-</div><div class='del'>-#define eui64_magic(e)		do {			\</div><div class='del'>-				(e).e32[0] = magic();	\</div><div class='del'>-				(e).e32[1] = magic();	\</div><div class='del'>-				(e).e8[0] &amp;= ~2;	\</div><div class='del'>-				} while (0)</div><div class='del'>-#define eui64_magic_nz(x)	do {				\</div><div class='del'>-				eui64_magic(x);			\</div><div class='del'>-				} while (eui64_iszero(x))</div><div class='del'>-#define eui64_magic_ne(x, y)	do {				\</div><div class='del'>-				eui64_magic(x);			\</div><div class='del'>-				} while (eui64_equals(x, y))</div><div class='del'>-</div><div class='del'>-#define eui64_get(ll, cp)	do {				\</div><div class='del'>-				eui64_copy((*cp), (ll));	\</div><div class='del'>-				(cp) += sizeof(eui64_t);	\</div><div class='del'>-				} while (0)</div><div class='del'>-</div><div class='del'>-#define eui64_put(ll, cp)	do {				\</div><div class='del'>-				eui64_copy((ll), (*cp));	\</div><div class='del'>-				(cp) += sizeof(eui64_t);	\</div><div class='del'>-				} while (0)</div><div class='del'>-</div><div class='del'>-#define eui64_set32(e, l)	do {			\</div><div class='del'>-				(e).e32[0] = 0;		\</div><div class='del'>-				(e).e32[1] = htonl(l);	\</div><div class='del'>-				} while (0)</div><div class='del'>-#define eui64_setlo32(e, l)	eui64_set32(e, l)</div><div class='del'>-</div><div class='del'>-char *eui64_ntoa __P((eui64_t));	/* Returns ascii representation of id */</div><div class='del'>-</div><div class='del'>-#endif /* __EUI64_H__ */</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/fsm.c b/mdk-stage1/ppp/pppd/fsm.c<br/>deleted file mode 100644<br/>index 07a8c11f1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/fsm.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/fsm.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,762 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * fsm.c - {Link, IP} Control Protocol Finite State Machine.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- * Randomize fsm id on link/init.</div><div class='del'>- * Deal with variable outgoing MTU.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-static void fsm_timeout __P((void *));</div><div class='del'>-static void fsm_rconfreq __P((fsm *, int, u_char *, int));</div><div class='del'>-static void fsm_rconfack __P((fsm *, int, u_char *, int));</div><div class='del'>-static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));</div><div class='del'>-static void fsm_rtermreq __P((fsm *, int, u_char *, int));</div><div class='del'>-static void fsm_rtermack __P((fsm *));</div><div class='del'>-static void fsm_rcoderej __P((fsm *, u_char *, int));</div><div class='del'>-static void fsm_sconfreq __P((fsm *, int));</div><div class='del'>-</div><div class='del'>-#define PROTO_NAME(f)	((f)-&gt;callbacks-&gt;proto_name)</div><div class='del'>-</div><div class='del'>-int peer_mru[NUM_PPP];</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_init - Initialize fsm.</div><div class='del'>- *</div><div class='del'>- * Initialize fsm state.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_init(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    f-&gt;state = INITIAL;</div><div class='del'>-    f-&gt;flags = 0;</div><div class='del'>-    f-&gt;id = 0;				/* XXX Start with random id? */</div><div class='del'>-    f-&gt;timeouttime = DEFTIMEOUT;</div><div class='del'>-    f-&gt;maxconfreqtransmits = DEFMAXCONFREQS;</div><div class='del'>-    f-&gt;maxtermtransmits = DEFMAXTERMREQS;</div><div class='del'>-    f-&gt;maxnakloops = DEFMAXNAKLOOPS;</div><div class='del'>-    f-&gt;term_reason_len = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_lowerup - The lower layer is up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_lowerup(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case INITIAL:</div><div class='del'>-	f-&gt;state = CLOSED;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case STARTING:</div><div class='del'>-	if( f-&gt;flags &amp; OPT_SILENT )</div><div class='del'>-	    f-&gt;state = STOPPED;</div><div class='del'>-	else {</div><div class='del'>-	    /* Send an initial configure-request */</div><div class='del'>-	    fsm_sconfreq(f, 0);</div><div class='del'>-	    f-&gt;state = REQSENT;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f-&gt;state));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_lowerdown - The lower layer is down.</div><div class='del'>- *</div><div class='del'>- * Cancel all timeouts and inform upper layers.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_lowerdown(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case CLOSED:</div><div class='del'>-	f-&gt;state = INITIAL;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case STOPPED:</div><div class='del'>-	f-&gt;state = STARTING;</div><div class='del'>-	if( f-&gt;callbacks-&gt;starting )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;starting)(f);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CLOSING:</div><div class='del'>-	f-&gt;state = INITIAL;</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case STOPPING:</div><div class='del'>-    case REQSENT:</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	f-&gt;state = STARTING;</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	if( f-&gt;callbacks-&gt;down )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);</div><div class='del'>-	f-&gt;state = STARTING;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f-&gt;state));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_open - Link is allowed to come up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_open(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case INITIAL:</div><div class='del'>-	f-&gt;state = STARTING;</div><div class='del'>-	if( f-&gt;callbacks-&gt;starting )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;starting)(f);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CLOSED:</div><div class='del'>-	if( f-&gt;flags &amp; OPT_SILENT )</div><div class='del'>-	    f-&gt;state = STOPPED;</div><div class='del'>-	else {</div><div class='del'>-	    /* Send an initial configure-request */</div><div class='del'>-	    fsm_sconfreq(f, 0);</div><div class='del'>-	    f-&gt;state = REQSENT;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case CLOSING:</div><div class='del'>-	f-&gt;state = STOPPING;</div><div class='del'>-	/* fall through */</div><div class='del'>-    case STOPPED:</div><div class='del'>-    case OPENED:</div><div class='del'>-	if( f-&gt;flags &amp; OPT_RESTART ){</div><div class='del'>-	    fsm_lowerdown(f);</div><div class='del'>-	    fsm_lowerup(f);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_close - Start closing connection.</div><div class='del'>- *</div><div class='del'>- * Cancel timeouts and either initiate close or possibly go directly to</div><div class='del'>- * the CLOSED state.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_close(f, reason)</div><div class='del'>-    fsm *f;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    f-&gt;term_reason = reason;</div><div class='del'>-    f-&gt;term_reason_len = (reason == NULL? 0: strlen(reason));</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case STARTING:</div><div class='del'>-	f-&gt;state = INITIAL;</div><div class='del'>-	break;</div><div class='del'>-    case STOPPED:</div><div class='del'>-	f-&gt;state = CLOSED;</div><div class='del'>-	break;</div><div class='del'>-    case STOPPING:</div><div class='del'>-	f-&gt;state = CLOSING;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case REQSENT:</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-    case OPENED:</div><div class='del'>-	if( f-&gt;state != OPENED )</div><div class='del'>-	    UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	else if( f-&gt;callbacks-&gt;down )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers we're down */</div><div class='del'>-</div><div class='del'>-	/* Init restart counter, send Terminate-Request */</div><div class='del'>-	f-&gt;retransmits = f-&gt;maxtermtransmits;</div><div class='del'>-	fsm_sdata(f, TERMREQ, f-&gt;reqid = ++f-&gt;id,</div><div class='del'>-		  (u_char *) f-&gt;term_reason, f-&gt;term_reason_len);</div><div class='del'>-	TIMEOUT(fsm_timeout, f, f-&gt;timeouttime);</div><div class='del'>-	--f-&gt;retransmits;</div><div class='del'>-</div><div class='del'>-	f-&gt;state = CLOSING;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_timeout - Timeout expired.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_timeout(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    fsm *f = (fsm *) arg;</div><div class='del'>-</div><div class='del'>-    switch (f-&gt;state) {</div><div class='del'>-    case CLOSING:</div><div class='del'>-    case STOPPING:</div><div class='del'>-	if( f-&gt;retransmits &lt;= 0 ){</div><div class='del'>-	    /*</div><div class='del'>-	     * We've waited for an ack long enough.  Peer probably heard us.</div><div class='del'>-	     */</div><div class='del'>-	    f-&gt;state = (f-&gt;state == CLOSING)? CLOSED: STOPPED;</div><div class='del'>-	    if( f-&gt;callbacks-&gt;finished )</div><div class='del'>-		(*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-	} else {</div><div class='del'>-	    /* Send Terminate-Request */</div><div class='del'>-	    fsm_sdata(f, TERMREQ, f-&gt;reqid = ++f-&gt;id,</div><div class='del'>-		      (u_char *) f-&gt;term_reason, f-&gt;term_reason_len);</div><div class='del'>-	    TIMEOUT(fsm_timeout, f, f-&gt;timeouttime);</div><div class='del'>-	    --f-&gt;retransmits;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case REQSENT:</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	if (f-&gt;retransmits &lt;= 0) {</div><div class='del'>-	    warn("%s: timeout sending Config-Requests\n", PROTO_NAME(f));</div><div class='del'>-	    f-&gt;state = STOPPED;</div><div class='del'>-	    if( (f-&gt;flags &amp; OPT_PASSIVE) == 0 &amp;&amp; f-&gt;callbacks-&gt;finished )</div><div class='del'>-		(*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-</div><div class='del'>-	} else {</div><div class='del'>-	    /* Retransmit the configure-request */</div><div class='del'>-	    if (f-&gt;callbacks-&gt;retransmit)</div><div class='del'>-		(*f-&gt;callbacks-&gt;retransmit)(f);</div><div class='del'>-	    fsm_sconfreq(f, 1);		/* Re-send Configure-Request */</div><div class='del'>-	    if( f-&gt;state == ACKRCVD )</div><div class='del'>-		f-&gt;state = REQSENT;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f-&gt;state));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_input - Input packet.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_input(f, inpacket, l)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inpacket;</div><div class='del'>-    int l;</div><div class='del'>-{</div><div class='del'>-    u_char *inp;</div><div class='del'>-    u_char code, id;</div><div class='del'>-    int len;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Parse header (code, id and length).</div><div class='del'>-     * If packet too short, drop it.</div><div class='del'>-     */</div><div class='del'>-    inp = inpacket;</div><div class='del'>-    if (l &lt; HEADERLEN) {</div><div class='del'>-	FSMDEBUG(("fsm_input(%x): Rcvd short header.", f-&gt;protocol));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    GETCHAR(code, inp);</div><div class='del'>-    GETCHAR(id, inp);</div><div class='del'>-    GETSHORT(len, inp);</div><div class='del'>-    if (len &lt; HEADERLEN) {</div><div class='del'>-	FSMDEBUG(("fsm_input(%x): Rcvd illegal length.", f-&gt;protocol));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (len &gt; l) {</div><div class='del'>-	FSMDEBUG(("fsm_input(%x): Rcvd short packet.", f-&gt;protocol));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    len -= HEADERLEN;		/* subtract header length */</div><div class='del'>-</div><div class='del'>-    if( f-&gt;state == INITIAL || f-&gt;state == STARTING ){</div><div class='del'>-	FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.",</div><div class='del'>-		  f-&gt;protocol, f-&gt;state));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Action depends on code.</div><div class='del'>-     */</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-	fsm_rconfreq(f, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case CONFACK:</div><div class='del'>-	fsm_rconfack(f, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	fsm_rconfnakrej(f, code, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case TERMREQ:</div><div class='del'>-	fsm_rtermreq(f, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case TERMACK:</div><div class='del'>-	fsm_rtermack(f);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case CODEREJ:</div><div class='del'>-	fsm_rcoderej(f, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    default:</div><div class='del'>-	if( !f-&gt;callbacks-&gt;extcode</div><div class='del'>-	   || !(*f-&gt;callbacks-&gt;extcode)(f, code, id, inp, len) )</div><div class='del'>-	    fsm_sdata(f, CODEREJ, ++f-&gt;id, inpacket, len + HEADERLEN);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rconfreq - Receive Configure-Request.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rconfreq(f, id, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char id;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    int code, reject_if_disagree;</div><div class='del'>-</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case CLOSED:</div><div class='del'>-	/* Go away, we're closed */</div><div class='del'>-	fsm_sdata(f, TERMACK, id, NULL, 0);</div><div class='del'>-	return;</div><div class='del'>-    case CLOSING:</div><div class='del'>-    case STOPPING:</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	/* Go down and restart negotiation */</div><div class='del'>-	if( f-&gt;callbacks-&gt;down )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers */</div><div class='del'>-	fsm_sconfreq(f, 0);		/* Send initial Configure-Request */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case STOPPED:</div><div class='del'>-	/* Negotiation started by our peer */</div><div class='del'>-	fsm_sconfreq(f, 0);		/* Send initial Configure-Request */</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Pass the requested configuration options</div><div class='del'>-     * to protocol-specific code for checking.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;callbacks-&gt;reqci){		/* Check CI */</div><div class='del'>-	reject_if_disagree = (f-&gt;nakloops &gt;= f-&gt;maxnakloops);</div><div class='del'>-	code = (*f-&gt;callbacks-&gt;reqci)(f, inp, &amp;len, reject_if_disagree);</div><div class='del'>-    } else if (len)</div><div class='del'>-	code = CONFREJ;			/* Reject all CI */</div><div class='del'>-    else</div><div class='del'>-	code = CONFACK;</div><div class='del'>-</div><div class='del'>-    /* send the Ack, Nak or Rej to the peer */</div><div class='del'>-    fsm_sdata(f, code, id, inp, len);</div><div class='del'>-</div><div class='del'>-    if (code == CONFACK) {</div><div class='del'>-	if (f-&gt;state == ACKRCVD) {</div><div class='del'>-	    UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	    f-&gt;state = OPENED;</div><div class='del'>-	    if (f-&gt;callbacks-&gt;up)</div><div class='del'>-		(*f-&gt;callbacks-&gt;up)(f);	/* Inform upper layers */</div><div class='del'>-	} else</div><div class='del'>-	    f-&gt;state = ACKSENT;</div><div class='del'>-	f-&gt;nakloops = 0;</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	/* we sent CONFACK or CONFREJ */</div><div class='del'>-	if (f-&gt;state != ACKRCVD)</div><div class='del'>-	    f-&gt;state = REQSENT;</div><div class='del'>-	if( code == CONFNAK )</div><div class='del'>-	    ++f-&gt;nakloops;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rconfack - Receive Configure-Ack.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rconfack(f, id, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int id;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    if (id != f-&gt;reqid || f-&gt;seen_ack)		/* Expected id? */</div><div class='del'>-	return;					/* Nope, toss... */</div><div class='del'>-    if( !(f-&gt;callbacks-&gt;ackci? (*f-&gt;callbacks-&gt;ackci)(f, inp, len):</div><div class='del'>-	  (len == 0)) ){</div><div class='del'>-	/* Ack is bad - ignore it */</div><div class='del'>-	error("Received bad configure-ack: %P", inp, len);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    f-&gt;seen_ack = 1;</div><div class='del'>-</div><div class='del'>-    switch (f-&gt;state) {</div><div class='del'>-    case CLOSED:</div><div class='del'>-    case STOPPED:</div><div class='del'>-	fsm_sdata(f, TERMACK, id, NULL, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case REQSENT:</div><div class='del'>-	f-&gt;state = ACKRCVD;</div><div class='del'>-	f-&gt;retransmits = f-&gt;maxconfreqtransmits;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-	/* Huh? an extra valid Ack? oh well... */</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	fsm_sconfreq(f, 0);</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	f-&gt;state = OPENED;</div><div class='del'>-	f-&gt;retransmits = f-&gt;maxconfreqtransmits;</div><div class='del'>-	if (f-&gt;callbacks-&gt;up)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;up)(f);	/* Inform upper layers */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	/* Go down and restart negotiation */</div><div class='del'>-	if (f-&gt;callbacks-&gt;down)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers */</div><div class='del'>-	fsm_sconfreq(f, 0);		/* Send initial Configure-Request */</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rconfnakrej(f, code, id, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int code, id;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    int (*proc) __P((fsm *, u_char *, int));</div><div class='del'>-    int ret;</div><div class='del'>-</div><div class='del'>-    if (id != f-&gt;reqid || f-&gt;seen_ack)	/* Expected id? */</div><div class='del'>-	return;				/* Nope, toss... */</div><div class='del'>-    proc = (code == CONFNAK)? f-&gt;callbacks-&gt;nakci: f-&gt;callbacks-&gt;rejci;</div><div class='del'>-    if (!proc || !(ret = proc(f, inp, len))) {</div><div class='del'>-	/* Nak/reject is bad - ignore it */</div><div class='del'>-	error("Received bad configure-nak/rej: %P", inp, len);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    f-&gt;seen_ack = 1;</div><div class='del'>-</div><div class='del'>-    switch (f-&gt;state) {</div><div class='del'>-    case CLOSED:</div><div class='del'>-    case STOPPED:</div><div class='del'>-	fsm_sdata(f, TERMACK, id, NULL, 0);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case REQSENT:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	/* They didn't agree to what we wanted - try another request */</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	if (ret &lt; 0)</div><div class='del'>-	    f-&gt;state = STOPPED;		/* kludge for stopping CCP */</div><div class='del'>-	else</div><div class='del'>-	    fsm_sconfreq(f, 0);		/* Send Configure-Request */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-	/* Got a Nak/reject when we had already had an Ack?? oh well... */</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	fsm_sconfreq(f, 0);</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	/* Go down and restart negotiation */</div><div class='del'>-	if (f-&gt;callbacks-&gt;down)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers */</div><div class='del'>-	fsm_sconfreq(f, 0);		/* Send initial Configure-Request */</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rtermreq - Receive Terminate-Req.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rtermreq(f, id, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int id;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    switch (f-&gt;state) {</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	f-&gt;state = REQSENT;		/* Start over but keep trying */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	if (len &gt; 0) {</div><div class='del'>-	    info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p);</div><div class='del'>-	} else</div><div class='del'>-	    info("%s terminated by peer", PROTO_NAME(f));</div><div class='del'>-	if (f-&gt;callbacks-&gt;down)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers */</div><div class='del'>-	f-&gt;retransmits = 0;</div><div class='del'>-	f-&gt;state = STOPPING;</div><div class='del'>-	TIMEOUT(fsm_timeout, f, f-&gt;timeouttime);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    fsm_sdata(f, TERMACK, id, NULL, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rtermack - Receive Terminate-Ack.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rtermack(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    switch (f-&gt;state) {</div><div class='del'>-    case CLOSING:</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);</div><div class='del'>-	f-&gt;state = CLOSED;</div><div class='del'>-	if( f-&gt;callbacks-&gt;finished )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-	break;</div><div class='del'>-    case STOPPING:</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);</div><div class='del'>-	f-&gt;state = STOPPED;</div><div class='del'>-	if( f-&gt;callbacks-&gt;finished )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	if (f-&gt;callbacks-&gt;down)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);	/* Inform upper layers */</div><div class='del'>-	fsm_sconfreq(f, 0);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_rcoderej - Receive an Code-Reject.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_rcoderej(f, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char code, id;</div><div class='del'>-</div><div class='del'>-    if (len &lt; HEADERLEN) {</div><div class='del'>-	FSMDEBUG(("fsm_rcoderej: Rcvd short Code-Reject packet!"));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    GETCHAR(code, inp);</div><div class='del'>-    GETCHAR(id, inp);</div><div class='del'>-    warn("%s: Rcvd Code-Reject for code %d, id %d", PROTO_NAME(f), code, id);</div><div class='del'>-</div><div class='del'>-    if( f-&gt;state == ACKRCVD )</div><div class='del'>-	f-&gt;state = REQSENT;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_protreject - Peer doesn't speak this protocol.</div><div class='del'>- *</div><div class='del'>- * Treat this as a catastrophic error (RXJ-).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_protreject(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    switch( f-&gt;state ){</div><div class='del'>-    case CLOSING:</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	/* fall through */</div><div class='del'>-    case CLOSED:</div><div class='del'>-	f-&gt;state = CLOSED;</div><div class='del'>-	if( f-&gt;callbacks-&gt;finished )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case STOPPING:</div><div class='del'>-    case REQSENT:</div><div class='del'>-    case ACKRCVD:</div><div class='del'>-    case ACKSENT:</div><div class='del'>-	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */</div><div class='del'>-	/* fall through */</div><div class='del'>-    case STOPPED:</div><div class='del'>-	f-&gt;state = STOPPED;</div><div class='del'>-	if( f-&gt;callbacks-&gt;finished )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;finished)(f);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case OPENED:</div><div class='del'>-	if( f-&gt;callbacks-&gt;down )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;down)(f);</div><div class='del'>-</div><div class='del'>-	/* Init restart counter, send Terminate-Request */</div><div class='del'>-	f-&gt;retransmits = f-&gt;maxtermtransmits;</div><div class='del'>-	fsm_sdata(f, TERMREQ, f-&gt;reqid = ++f-&gt;id,</div><div class='del'>-		  (u_char *) f-&gt;term_reason, f-&gt;term_reason_len);</div><div class='del'>-	TIMEOUT(fsm_timeout, f, f-&gt;timeouttime);</div><div class='del'>-	--f-&gt;retransmits;</div><div class='del'>-</div><div class='del'>-	f-&gt;state = STOPPING;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	FSMDEBUG(("%s: Protocol-reject event in state %d!",</div><div class='del'>-		  PROTO_NAME(f), f-&gt;state));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_sconfreq - Send a Configure-Request.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-fsm_sconfreq(f, retransmit)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int retransmit;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int cilen;</div><div class='del'>-</div><div class='del'>-    if( f-&gt;state != REQSENT &amp;&amp; f-&gt;state != ACKRCVD &amp;&amp; f-&gt;state != ACKSENT ){</div><div class='del'>-	/* Not currently negotiating - reset options */</div><div class='del'>-	if( f-&gt;callbacks-&gt;resetci )</div><div class='del'>-	    (*f-&gt;callbacks-&gt;resetci)(f);</div><div class='del'>-	f-&gt;nakloops = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if( !retransmit ){</div><div class='del'>-	/* New request - reset retransmission counter, use new ID */</div><div class='del'>-	f-&gt;retransmits = f-&gt;maxconfreqtransmits;</div><div class='del'>-	f-&gt;reqid = ++f-&gt;id;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    f-&gt;seen_ack = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Make up the request packet</div><div class='del'>-     */</div><div class='del'>-    outp = outpacket_buf + PPP_HDRLEN + HEADERLEN;</div><div class='del'>-    if( f-&gt;callbacks-&gt;cilen &amp;&amp; f-&gt;callbacks-&gt;addci ){</div><div class='del'>-	cilen = (*f-&gt;callbacks-&gt;cilen)(f);</div><div class='del'>-	if( cilen &gt; peer_mru[f-&gt;unit] - HEADERLEN )</div><div class='del'>-	    cilen = peer_mru[f-&gt;unit] - HEADERLEN;</div><div class='del'>-	if (f-&gt;callbacks-&gt;addci)</div><div class='del'>-	    (*f-&gt;callbacks-&gt;addci)(f, outp, &amp;cilen);</div><div class='del'>-    } else</div><div class='del'>-	cilen = 0;</div><div class='del'>-</div><div class='del'>-    /* send the request to our peer */</div><div class='del'>-    fsm_sdata(f, CONFREQ, f-&gt;reqid, outp, cilen);</div><div class='del'>-</div><div class='del'>-    /* start the retransmit timer */</div><div class='del'>-    --f-&gt;retransmits;</div><div class='del'>-    TIMEOUT(fsm_timeout, f, f-&gt;timeouttime);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * fsm_sdata - Send some data.</div><div class='del'>- *</div><div class='del'>- * Used for all packets sent to our peer by this module.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-fsm_sdata(f, code, id, data, datalen)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char code, id;</div><div class='del'>-    u_char *data;</div><div class='del'>-    int datalen;</div><div class='del'>-{</div><div class='del'>-    u_char *outp;</div><div class='del'>-    int outlen;</div><div class='del'>-</div><div class='del'>-    /* Adjust length to be smaller than MTU */</div><div class='del'>-    outp = outpacket_buf;</div><div class='del'>-    if (datalen &gt; peer_mru[f-&gt;unit] - HEADERLEN)</div><div class='del'>-	datalen = peer_mru[f-&gt;unit] - HEADERLEN;</div><div class='del'>-    if (datalen &amp;&amp; data != outp + PPP_HDRLEN + HEADERLEN)</div><div class='del'>-	BCOPY(data, outp + PPP_HDRLEN + HEADERLEN, datalen);</div><div class='del'>-    outlen = datalen + HEADERLEN;</div><div class='del'>-    MAKEHEADER(outp, f-&gt;protocol);</div><div class='del'>-    PUTCHAR(code, outp);</div><div class='del'>-    PUTCHAR(id, outp);</div><div class='del'>-    PUTSHORT(outlen, outp);</div><div class='del'>-    output(f-&gt;unit, outpacket_buf, outlen + PPP_HDRLEN);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/fsm.h b/mdk-stage1/ppp/pppd/fsm.h<br/>deleted file mode 100644<br/>index c94a68e6c..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/fsm.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/fsm.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,144 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * fsm.h - {Link, IP} Control Protocol Finite State Machine definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Packet header = Code, id, length.</div><div class='del'>- */</div><div class='del'>-#define HEADERLEN	4</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  CP (LCP, IPCP, etc.) codes.</div><div class='del'>- */</div><div class='del'>-#define CONFREQ		1	/* Configuration Request */</div><div class='del'>-#define CONFACK		2	/* Configuration Ack */</div><div class='del'>-#define CONFNAK		3	/* Configuration Nak */</div><div class='del'>-#define CONFREJ		4	/* Configuration Reject */</div><div class='del'>-#define TERMREQ		5	/* Termination Request */</div><div class='del'>-#define TERMACK		6	/* Termination Ack */</div><div class='del'>-#define CODEREJ		7	/* Code Reject */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Each FSM is described by an fsm structure and fsm callbacks.</div><div class='del'>- */</div><div class='del'>-typedef struct fsm {</div><div class='del'>-    int unit;			/* Interface unit number */</div><div class='del'>-    int protocol;		/* Data Link Layer Protocol field value */</div><div class='del'>-    int state;			/* State */</div><div class='del'>-    int flags;			/* Contains option bits */</div><div class='del'>-    u_char id;			/* Current id */</div><div class='del'>-    u_char reqid;		/* Current request id */</div><div class='del'>-    u_char seen_ack;		/* Have received valid Ack/Nak/Rej to Req */</div><div class='del'>-    int timeouttime;		/* Timeout time in milliseconds */</div><div class='del'>-    int maxconfreqtransmits;	/* Maximum Configure-Request transmissions */</div><div class='del'>-    int retransmits;		/* Number of retransmissions left */</div><div class='del'>-    int maxtermtransmits;	/* Maximum Terminate-Request transmissions */</div><div class='del'>-    int nakloops;		/* Number of nak loops since last ack */</div><div class='del'>-    int maxnakloops;		/* Maximum number of nak loops tolerated */</div><div class='del'>-    struct fsm_callbacks *callbacks;	/* Callback routines */</div><div class='del'>-    char *term_reason;		/* Reason for closing protocol */</div><div class='del'>-    int term_reason_len;	/* Length of term_reason */</div><div class='del'>-} fsm;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-typedef struct fsm_callbacks {</div><div class='del'>-    void (*resetci)		/* Reset our Configuration Information */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    int  (*cilen)		/* Length of our Configuration Information */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    void (*addci) 		/* Add our Configuration Information */</div><div class='del'>-		__P((fsm *, u_char *, int *));</div><div class='del'>-    int  (*ackci)		/* ACK our Configuration Information */</div><div class='del'>-		__P((fsm *, u_char *, int));</div><div class='del'>-    int  (*nakci)		/* NAK our Configuration Information */</div><div class='del'>-		__P((fsm *, u_char *, int));</div><div class='del'>-    int  (*rejci)		/* Reject our Configuration Information */</div><div class='del'>-		__P((fsm *, u_char *, int));</div><div class='del'>-    int  (*reqci)		/* Request peer's Configuration Information */</div><div class='del'>-		__P((fsm *, u_char *, int *, int));</div><div class='del'>-    void (*up)			/* Called when fsm reaches OPENED state */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    void (*down)		/* Called when fsm leaves OPENED state */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    void (*starting)		/* Called when we want the lower layer */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    void (*finished)		/* Called when we don't want the lower layer */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    void (*protreject)		/* Called when Protocol-Reject received */</div><div class='del'>-		__P((int));</div><div class='del'>-    void (*retransmit)		/* Retransmission is necessary */</div><div class='del'>-		__P((fsm *));</div><div class='del'>-    int  (*extcode)		/* Called when unknown code received */</div><div class='del'>-		__P((fsm *, int, int, u_char *, int));</div><div class='del'>-    char *proto_name;		/* String name for protocol (for messages) */</div><div class='del'>-} fsm_callbacks;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Link states.</div><div class='del'>- */</div><div class='del'>-#define INITIAL		0	/* Down, hasn't been opened */</div><div class='del'>-#define STARTING	1	/* Down, been opened */</div><div class='del'>-#define CLOSED		2	/* Up, hasn't been opened */</div><div class='del'>-#define STOPPED		3	/* Open, waiting for down event */</div><div class='del'>-#define CLOSING		4	/* Terminating the connection, not open */</div><div class='del'>-#define STOPPING	5	/* Terminating, but open */</div><div class='del'>-#define REQSENT		6	/* We've sent a Config Request */</div><div class='del'>-#define ACKRCVD		7	/* We've received a Config Ack */</div><div class='del'>-#define ACKSENT		8	/* We've sent a Config Ack */</div><div class='del'>-#define OPENED		9	/* Connection available */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Flags - indicate options controlling FSM operation</div><div class='del'>- */</div><div class='del'>-#define OPT_PASSIVE	1	/* Don't die if we don't get a response */</div><div class='del'>-#define OPT_RESTART	2	/* Treat 2nd OPEN as DOWN, UP */</div><div class='del'>-#define OPT_SILENT	4	/* Wait for peer to speak first */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Timeouts.</div><div class='del'>- */</div><div class='del'>-#define DEFTIMEOUT	3	/* Timeout time in seconds */</div><div class='del'>-#define DEFMAXTERMREQS	2	/* Maximum Terminate-Request transmissions */</div><div class='del'>-#define DEFMAXCONFREQS	10	/* Maximum Configure-Request transmissions */</div><div class='del'>-#define DEFMAXNAKLOOPS	5	/* Maximum number of nak loops */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prototypes</div><div class='del'>- */</div><div class='del'>-void fsm_init __P((fsm *));</div><div class='del'>-void fsm_lowerup __P((fsm *));</div><div class='del'>-void fsm_lowerdown __P((fsm *));</div><div class='del'>-void fsm_open __P((fsm *));</div><div class='del'>-void fsm_close __P((fsm *, char *));</div><div class='del'>-void fsm_input __P((fsm *, u_char *, int));</div><div class='del'>-void fsm_protreject __P((fsm *));</div><div class='del'>-void fsm_sdata __P((fsm *, int, int, u_char *, int));</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Variables</div><div class='del'>- */</div><div class='del'>-extern int peer_mru[];		/* currently negotiated peer MRU (per unit) */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipcp.c b/mdk-stage1/ppp/pppd/ipcp.c<br/>deleted file mode 100644<br/>index 3f64357ed..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2054 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ipcp.c - PPP IP Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/* global vars */</div><div class='del'>-ipcp_options ipcp_wantoptions[NUM_PPP];	/* Options that we want to request */</div><div class='del'>-ipcp_options ipcp_gotoptions[NUM_PPP];	/* Options that peer ack'd */</div><div class='del'>-ipcp_options ipcp_allowoptions[NUM_PPP]; /* Options we allow peer to request */</div><div class='del'>-ipcp_options ipcp_hisoptions[NUM_PPP];	/* Options that we ack'd */</div><div class='del'>-</div><div class='del'>-u_int32_t netmask = 0;		/* IP netmask to set on interface */</div><div class='del'>-</div><div class='del'>-bool	disable_defaultip = 0;	/* Don't use hostname for default IP adrs */</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to know when IP protocol has come up */</div><div class='del'>-void (*ip_up_hook) __P((void)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to know when IP protocol has come down */</div><div class='del'>-void (*ip_down_hook) __P((void)) = NULL;</div><div class='del'>-</div><div class='del'>-/* Hook for a plugin to choose the remote IP address */</div><div class='del'>-void (*ip_choose_hook) __P((u_int32_t *)) = NULL;</div><div class='del'>-</div><div class='del'>-/* local vars */</div><div class='del'>-static int default_route_set[NUM_PPP];	/* Have set up a default route */</div><div class='del'>-static int proxy_arp_set[NUM_PPP];	/* Have created proxy arp entry */</div><div class='del'>-static bool usepeerdns;			/* Ask peer for DNS addrs */</div><div class='del'>-static int ipcp_is_up;			/* have called np_up() */</div><div class='del'>-static bool ask_for_local;		/* request our address from peer */</div><div class='del'>-static char vj_value[8];		/* string form of vj option value */</div><div class='del'>-static char netmask_str[20];		/* string form of netmask value */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Callbacks for fsm code.  (CI = Configuration Information)</div><div class='del'>- */</div><div class='del'>-static void ipcp_resetci __P((fsm *));	/* Reset our CI */</div><div class='del'>-static int  ipcp_cilen __P((fsm *));	        /* Return length of our CI */</div><div class='del'>-static void ipcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */</div><div class='del'>-static int  ipcp_ackci __P((fsm *, u_char *, int));	/* Peer ack'd our CI */</div><div class='del'>-static int  ipcp_nakci __P((fsm *, u_char *, int));	/* Peer nak'd our CI */</div><div class='del'>-static int  ipcp_rejci __P((fsm *, u_char *, int));	/* Peer rej'd our CI */</div><div class='del'>-static int  ipcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */</div><div class='del'>-static void ipcp_up __P((fsm *));		/* We're UP */</div><div class='del'>-static void ipcp_down __P((fsm *));		/* We're DOWN */</div><div class='del'>-static void ipcp_finished __P((fsm *));	/* Don't need lower layer */</div><div class='del'>-</div><div class='del'>-fsm ipcp_fsm[NUM_PPP];		/* IPCP fsm structure */</div><div class='del'>-</div><div class='del'>-static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */</div><div class='del'>-    ipcp_resetci,		/* Reset our Configuration Information */</div><div class='del'>-    ipcp_cilen,			/* Length of our Configuration Information */</div><div class='del'>-    ipcp_addci,			/* Add our Configuration Information */</div><div class='del'>-    ipcp_ackci,			/* ACK our Configuration Information */</div><div class='del'>-    ipcp_nakci,			/* NAK our Configuration Information */</div><div class='del'>-    ipcp_rejci,			/* Reject our Configuration Information */</div><div class='del'>-    ipcp_reqci,			/* Request peer's Configuration Information */</div><div class='del'>-    ipcp_up,			/* Called when fsm reaches OPENED state */</div><div class='del'>-    ipcp_down,			/* Called when fsm leaves OPENED state */</div><div class='del'>-    NULL,			/* Called when we want the lower layer up */</div><div class='del'>-    ipcp_finished,		/* Called when we want the lower layer down */</div><div class='del'>-    NULL,			/* Called when Protocol-Reject received */</div><div class='del'>-    NULL,			/* Retransmission is necessary */</div><div class='del'>-    NULL,			/* Called to handle protocol-specific codes */</div><div class='del'>-    "IPCP"			/* String name of protocol */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Command-line options.</div><div class='del'>- */</div><div class='del'>-static int setvjslots __P((char **));</div><div class='del'>-static int setdnsaddr __P((char **));</div><div class='del'>-static int setwinsaddr __P((char **));</div><div class='del'>-static int setnetmask __P((char **));</div><div class='del'>-static int setipaddr __P((char *, char **, int));</div><div class='del'>-static void printipaddr __P((option_t *, void (*)(void *, char *,...),void *));</div><div class='del'>-</div><div class='del'>-static option_t ipcp_option_list[] = {</div><div class='del'>-    { "noip", o_bool, &amp;ipcp_protent.enabled_flag,</div><div class='del'>-      "Disable IP and IPCP" },</div><div class='del'>-    { "-ip", o_bool, &amp;ipcp_protent.enabled_flag,</div><div class='del'>-      "Disable IP and IPCP", OPT_ALIAS },</div><div class='del'>-</div><div class='del'>-    { "novj", o_bool, &amp;ipcp_wantoptions[0].neg_vj,</div><div class='del'>-      "Disable VJ compression", OPT_A2CLR, &amp;ipcp_allowoptions[0].neg_vj },</div><div class='del'>-    { "-vj", o_bool, &amp;ipcp_wantoptions[0].neg_vj,</div><div class='del'>-      "Disable VJ compression", OPT_ALIAS | OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_allowoptions[0].neg_vj },</div><div class='del'>-</div><div class='del'>-    { "novjccomp", o_bool, &amp;ipcp_wantoptions[0].cflag,</div><div class='del'>-      "Disable VJ connection-ID compression", OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_allowoptions[0].cflag },</div><div class='del'>-    { "-vjccomp", o_bool, &amp;ipcp_wantoptions[0].cflag,</div><div class='del'>-      "Disable VJ connection-ID compression", OPT_ALIAS | OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_allowoptions[0].cflag },</div><div class='del'>-</div><div class='del'>-    { "vj-max-slots", o_special, (void *)setvjslots,</div><div class='del'>-      "Set maximum VJ header slots",</div><div class='del'>-      OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, vj_value },</div><div class='del'>-</div><div class='del'>-    { "ipcp-accept-local", o_bool, &amp;ipcp_wantoptions[0].accept_local,</div><div class='del'>-      "Accept peer's address for us", 1 },</div><div class='del'>-    { "ipcp-accept-remote", o_bool, &amp;ipcp_wantoptions[0].accept_remote,</div><div class='del'>-      "Accept peer's address for it", 1 },</div><div class='del'>-</div><div class='del'>-    { "ipparam", o_string, &amp;ipparam,</div><div class='del'>-      "Set ip script parameter", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "noipdefault", o_bool, &amp;disable_defaultip,</div><div class='del'>-      "Don't use name for default IP adrs", 1 },</div><div class='del'>-</div><div class='del'>-    { "ms-dns", 1, (void *)setdnsaddr,</div><div class='del'>-      "DNS address for the peer's use" },</div><div class='del'>-    { "ms-wins", 1, (void *)setwinsaddr,</div><div class='del'>-      "Nameserver for SMB over TCP/IP for peer" },</div><div class='del'>-</div><div class='del'>-    { "ipcp-restart", o_int, &amp;ipcp_fsm[0].timeouttime,</div><div class='del'>-      "Set timeout for IPCP", OPT_PRIO },</div><div class='del'>-    { "ipcp-max-terminate", o_int, &amp;ipcp_fsm[0].maxtermtransmits,</div><div class='del'>-      "Set max #xmits for term-reqs", OPT_PRIO },</div><div class='del'>-    { "ipcp-max-configure", o_int, &amp;ipcp_fsm[0].maxconfreqtransmits,</div><div class='del'>-      "Set max #xmits for conf-reqs", OPT_PRIO },</div><div class='del'>-    { "ipcp-max-failure", o_int, &amp;ipcp_fsm[0].maxnakloops,</div><div class='del'>-      "Set max #conf-naks for IPCP", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "defaultroute", o_bool, &amp;ipcp_wantoptions[0].default_route,</div><div class='del'>-      "Add default route", OPT_ENABLE|1, &amp;ipcp_allowoptions[0].default_route },</div><div class='del'>-    { "nodefaultroute", o_bool, &amp;ipcp_allowoptions[0].default_route,</div><div class='del'>-      "disable defaultroute option", OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_wantoptions[0].default_route },</div><div class='del'>-    { "-defaultroute", o_bool, &amp;ipcp_allowoptions[0].default_route,</div><div class='del'>-      "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_wantoptions[0].default_route },</div><div class='del'>-</div><div class='del'>-    { "proxyarp", o_bool, &amp;ipcp_wantoptions[0].proxy_arp,</div><div class='del'>-      "Add proxy ARP entry", OPT_ENABLE|1, &amp;ipcp_allowoptions[0].proxy_arp },</div><div class='del'>-    { "noproxyarp", o_bool, &amp;ipcp_allowoptions[0].proxy_arp,</div><div class='del'>-      "disable proxyarp option", OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_wantoptions[0].proxy_arp },</div><div class='del'>-    { "-proxyarp", o_bool, &amp;ipcp_allowoptions[0].proxy_arp,</div><div class='del'>-      "disable proxyarp option", OPT_ALIAS | OPT_A2CLR,</div><div class='del'>-      &amp;ipcp_wantoptions[0].proxy_arp },</div><div class='del'>-</div><div class='del'>-    { "usepeerdns", o_bool, &amp;usepeerdns,</div><div class='del'>-      "Ask peer for DNS address(es)", 1 },</div><div class='del'>-</div><div class='del'>-    { "netmask", o_special, (void *)setnetmask,</div><div class='del'>-      "set netmask", OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, netmask_str },</div><div class='del'>-</div><div class='del'>-    { "IP addresses", o_wild, (void *) &amp;setipaddr,</div><div class='del'>-      "set local and remote IP addresses",</div><div class='del'>-      OPT_NOARG | OPT_A2PRINTER, (void *) &amp;printipaddr },</div><div class='del'>-</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points from main code.</div><div class='del'>- */</div><div class='del'>-static void ipcp_init __P((int));</div><div class='del'>-static void ipcp_open __P((int));</div><div class='del'>-static void ipcp_close __P((int, char *));</div><div class='del'>-static void ipcp_lowerup __P((int));</div><div class='del'>-static void ipcp_lowerdown __P((int));</div><div class='del'>-static void ipcp_input __P((int, u_char *, int));</div><div class='del'>-static void ipcp_protrej __P((int));</div><div class='del'>-static int  ipcp_printpkt __P((u_char *, int,</div><div class='del'>-			       void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-static void ip_check_options __P((void));</div><div class='del'>-static int  ip_demand_conf __P((int));</div><div class='del'>-static int  ip_active_pkt __P((u_char *, int));</div><div class='del'>-static void create_resolv __P((u_int32_t, u_int32_t));</div><div class='del'>-</div><div class='del'>-struct protent ipcp_protent = {</div><div class='del'>-    PPP_IPCP,</div><div class='del'>-    ipcp_init,</div><div class='del'>-    ipcp_input,</div><div class='del'>-    ipcp_protrej,</div><div class='del'>-    ipcp_lowerup,</div><div class='del'>-    ipcp_lowerdown,</div><div class='del'>-    ipcp_open,</div><div class='del'>-    ipcp_close,</div><div class='del'>-    ipcp_printpkt,</div><div class='del'>-    NULL,</div><div class='del'>-    1,</div><div class='del'>-    "IPCP",</div><div class='del'>-    "IP",</div><div class='del'>-    ipcp_option_list,</div><div class='del'>-    ip_check_options,</div><div class='del'>-    ip_demand_conf,</div><div class='del'>-    ip_active_pkt</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));</div><div class='del'>-static void ipcp_script __P((char *));		/* Run an up/down script */</div><div class='del'>-static void ipcp_script_done __P((void *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Lengths of configuration options.</div><div class='del'>- */</div><div class='del'>-#define CILEN_VOID	2</div><div class='del'>-#define CILEN_COMPRESS	4	/* min length for compression protocol opt. */</div><div class='del'>-#define CILEN_VJ	6	/* length for RFC1332 Van-Jacobson opt. */</div><div class='del'>-#define CILEN_ADDR	6	/* new-style single address option */</div><div class='del'>-#define CILEN_ADDRS	10	/* old-style dual address option */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define CODENAME(x)	((x) == CONFACK ? "ACK" : \</div><div class='del'>-			 (x) == CONFNAK ? "NAK" : "REJ")</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This state variable is used to ensure that we don't</div><div class='del'>- * run an ipcp-up/down script while one is already running.</div><div class='del'>- */</div><div class='del'>-static enum script_state {</div><div class='del'>-    s_down,</div><div class='del'>-    s_up,</div><div class='del'>-} ipcp_script_state;</div><div class='del'>-static pid_t ipcp_script_pid;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Make a string representation of a network IP address.</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-ip_ntoa(ipaddr)</div><div class='del'>-u_int32_t ipaddr;</div><div class='del'>-{</div><div class='del'>-    static char b[64];</div><div class='del'>-</div><div class='del'>-    slprintf(b, sizeof(b), "%I", ipaddr);</div><div class='del'>-    return b;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option parsing.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setvjslots - set maximum number of connection slots for VJ compression</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setvjslots(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    int value;</div><div class='del'>-</div><div class='del'>-    if (!int_option(*argv, &amp;value))</div><div class='del'>-	return 0;</div><div class='del'>-    if (value &lt; 2 || value &gt; 16) {</div><div class='del'>-	option_error("vj-max-slots value must be between 2 and 16");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ipcp_wantoptions [0].maxslotindex =</div><div class='del'>-        ipcp_allowoptions[0].maxslotindex = value - 1;</div><div class='del'>-    slprintf(vj_value, sizeof(vj_value), "%d", value);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setdnsaddr - set the dns address(es)</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setdnsaddr(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    u_int32_t dns;</div><div class='del'>-    struct hostent *hp;</div><div class='del'>-</div><div class='del'>-    dns = inet_addr(*argv);</div><div class='del'>-    if (dns == (u_int32_t) -1) {</div><div class='del'>-	if ((hp = gethostbyname(*argv)) == NULL) {</div><div class='del'>-	    option_error("invalid address parameter '%s' for ms-dns option",</div><div class='del'>-			 *argv);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	dns = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* We take the last 2 values given, the 2nd-last as the primary</div><div class='del'>-       and the last as the secondary.  If only one is given it</div><div class='del'>-       becomes both primary and secondary. */</div><div class='del'>-    if (ipcp_allowoptions[0].dnsaddr[1] == 0)</div><div class='del'>-	ipcp_allowoptions[0].dnsaddr[0] = dns;</div><div class='del'>-    else</div><div class='del'>-	ipcp_allowoptions[0].dnsaddr[0] = ipcp_allowoptions[0].dnsaddr[1];</div><div class='del'>-</div><div class='del'>-    /* always set the secondary address value. */</div><div class='del'>-    ipcp_allowoptions[0].dnsaddr[1] = dns;</div><div class='del'>-</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setwinsaddr - set the wins address(es)</div><div class='del'>- * This is primrarly used with the Samba package under UNIX or for pointing</div><div class='del'>- * the caller to the existing WINS server on a Windows NT platform.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setwinsaddr(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    u_int32_t wins;</div><div class='del'>-    struct hostent *hp;</div><div class='del'>-</div><div class='del'>-    wins = inet_addr(*argv);</div><div class='del'>-    if (wins == (u_int32_t) -1) {</div><div class='del'>-	if ((hp = gethostbyname(*argv)) == NULL) {</div><div class='del'>-	    option_error("invalid address parameter '%s' for ms-wins option",</div><div class='del'>-			 *argv);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	wins = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* We take the last 2 values given, the 2nd-last as the primary</div><div class='del'>-       and the last as the secondary.  If only one is given it</div><div class='del'>-       becomes both primary and secondary. */</div><div class='del'>-    if (ipcp_allowoptions[0].winsaddr[1] == 0)</div><div class='del'>-	ipcp_allowoptions[0].winsaddr[0] = wins;</div><div class='del'>-    else</div><div class='del'>-	ipcp_allowoptions[0].winsaddr[0] = ipcp_allowoptions[0].winsaddr[1];</div><div class='del'>-</div><div class='del'>-    /* always set the secondary address value. */</div><div class='del'>-    ipcp_allowoptions[0].winsaddr[1] = wins;</div><div class='del'>-</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setipaddr - Set the IP address</div><div class='del'>- * If doit is 0, the call is to check whether this option is</div><div class='del'>- * potentially an IP address specification.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setipaddr(arg, argv, doit)</div><div class='del'>-    char *arg;</div><div class='del'>-    char **argv;</div><div class='del'>-    int doit;</div><div class='del'>-{</div><div class='del'>-    struct hostent *hp;</div><div class='del'>-    char *colon;</div><div class='del'>-    u_int32_t local, remote;</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[0];</div><div class='del'>-    static int prio_local = 0, prio_remote = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * IP address pair separated by ":".</div><div class='del'>-     */</div><div class='del'>-    if ((colon = strchr(arg, ':')) == NULL)</div><div class='del'>-	return 0;</div><div class='del'>-    if (!doit)</div><div class='del'>-	return 1;</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * If colon first character, then no local addr.</div><div class='del'>-     */</div><div class='del'>-    if (colon != arg &amp;&amp; option_priority &gt;= prio_local) {</div><div class='del'>-	*colon = '\0';</div><div class='del'>-	if ((local = inet_addr(arg)) == (u_int32_t) -1) {</div><div class='del'>-	    if ((hp = gethostbyname(arg)) == NULL) {</div><div class='del'>-		option_error("unknown host: %s", arg);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	    local = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-	}</div><div class='del'>-	if (bad_ip_adrs(local)) {</div><div class='del'>-	    option_error("bad local IP address %s", ip_ntoa(local));</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	if (local != 0)</div><div class='del'>-	    wo-&gt;ouraddr = local;</div><div class='del'>-	*colon = ':';</div><div class='del'>-	prio_local = option_priority;</div><div class='del'>-    }</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * If colon last character, then no remote addr.</div><div class='del'>-     */</div><div class='del'>-    if (*++colon != '\0' &amp;&amp; option_priority &gt;= prio_remote) {</div><div class='del'>-	if ((remote = inet_addr(colon)) == (u_int32_t) -1) {</div><div class='del'>-	    if ((hp = gethostbyname(colon)) == NULL) {</div><div class='del'>-		option_error("unknown host: %s", colon);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	    remote = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-	    if (remote_name[0] == 0)</div><div class='del'>-		strlcpy(remote_name, colon, sizeof(remote_name));</div><div class='del'>-	}</div><div class='del'>-	if (bad_ip_adrs(remote)) {</div><div class='del'>-	    option_error("bad remote IP address %s", ip_ntoa(remote));</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	if (remote != 0)</div><div class='del'>-	    wo-&gt;hisaddr = remote;</div><div class='del'>-	prio_remote = option_priority;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-printipaddr(opt, printer, arg)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	ipcp_options *wo = &amp;ipcp_wantoptions[0];</div><div class='del'>-</div><div class='del'>-	if (wo-&gt;ouraddr != 0)</div><div class='del'>-		printer(arg, "%I", wo-&gt;ouraddr);</div><div class='del'>-	printer(arg, ":");</div><div class='del'>-	if (wo-&gt;hisaddr != 0)</div><div class='del'>-		printer(arg, "%I", wo-&gt;hisaddr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setnetmask - set the netmask to be used on the interface.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setnetmask(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask;</div><div class='del'>-    int n;</div><div class='del'>-    char *p;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Unfortunately, if we use inet_addr, we can't tell whether</div><div class='del'>-     * a result of all 1s is an error or a valid 255.255.255.255.</div><div class='del'>-     */</div><div class='del'>-    p = *argv;</div><div class='del'>-    n = parse_dotted_ip(p, &amp;mask);</div><div class='del'>-</div><div class='del'>-    mask = htonl(mask);</div><div class='del'>-</div><div class='del'>-    if (n == 0 || p[n] != 0 || (netmask &amp; ~mask) != 0) {</div><div class='del'>-	option_error("invalid netmask value '%s'", *argv);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    netmask = mask;</div><div class='del'>-    slprintf(netmask_str, sizeof(netmask_str), "%I", mask);</div><div class='del'>-</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-parse_dotted_ip(p, vp)</div><div class='del'>-    char *p;</div><div class='del'>-    u_int32_t *vp;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-    u_int32_t v, b;</div><div class='del'>-    char *endp, *p0 = p;</div><div class='del'>-</div><div class='del'>-    v = 0;</div><div class='del'>-    for (n = 3;; --n) {</div><div class='del'>-	b = strtoul(p, &amp;endp, 0);</div><div class='del'>-	if (endp == p)</div><div class='del'>-	    return 0;</div><div class='del'>-	if (b &gt; 255) {</div><div class='del'>-	    if (n &lt; 3)</div><div class='del'>-		return 0;</div><div class='del'>-	    /* accept e.g. 0xffffff00 */</div><div class='del'>-	    *vp = b;</div><div class='del'>-	    return endp - p0;</div><div class='del'>-	}</div><div class='del'>-	v |= b &lt;&lt; (n * 8);</div><div class='del'>-	p = endp;</div><div class='del'>-	if (n == 0)</div><div class='del'>-	    break;</div><div class='del'>-	if (*p != '.')</div><div class='del'>-	    return 0;</div><div class='del'>-	++p;</div><div class='del'>-    }</div><div class='del'>-    *vp = v;</div><div class='del'>-    return p - p0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_init - Initialize IPCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_init(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ipcp_fsm[unit];</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[unit];</div><div class='del'>-    ipcp_options *ao = &amp;ipcp_allowoptions[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;unit = unit;</div><div class='del'>-    f-&gt;protocol = PPP_IPCP;</div><div class='del'>-    f-&gt;callbacks = &amp;ipcp_callbacks;</div><div class='del'>-    fsm_init(&amp;ipcp_fsm[unit]);</div><div class='del'>-</div><div class='del'>-    memset(wo, 0, sizeof(*wo));</div><div class='del'>-    memset(ao, 0, sizeof(*ao));</div><div class='del'>-</div><div class='del'>-    wo-&gt;neg_addr = 1;</div><div class='del'>-    wo-&gt;neg_vj = 1;</div><div class='del'>-    wo-&gt;vj_protocol = IPCP_VJ_COMP;</div><div class='del'>-    wo-&gt;maxslotindex = MAX_STATES - 1; /* really max index */</div><div class='del'>-    wo-&gt;cflag = 1;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    /* max slots and slot-id compression are currently hardwired in */</div><div class='del'>-    /* ppp_if.c to 16 and 1, this needs to be changed (among other */</div><div class='del'>-    /* things) gmc */</div><div class='del'>-</div><div class='del'>-    ao-&gt;neg_addr = 1;</div><div class='del'>-    ao-&gt;neg_vj = 1;</div><div class='del'>-    ao-&gt;maxslotindex = MAX_STATES - 1;</div><div class='del'>-    ao-&gt;cflag = 1;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * XXX These control whether the user may use the proxyarp</div><div class='del'>-     * and defaultroute options.</div><div class='del'>-     */</div><div class='del'>-    ao-&gt;proxy_arp = 1;</div><div class='del'>-    ao-&gt;default_route = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_open - IPCP is allowed to come up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_open(&amp;ipcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_close - Take IPCP down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_close(unit, reason)</div><div class='del'>-    int unit;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    fsm_close(&amp;ipcp_fsm[unit], reason);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_lowerup - The lower layer is up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_lowerup(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerup(&amp;ipcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_lowerdown - The lower layer is down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_lowerdown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_input - Input IPCP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_input(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm_input(&amp;ipcp_fsm[unit], p, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_protrej - A Protocol-Reject was received for IPCP.</div><div class='del'>- *</div><div class='del'>- * Pretend the lower layer went down, so we shut up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_protrej(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_resetci - Reset our CI.</div><div class='del'>- * Called by fsm_sconfreq, Send Configure Request.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_resetci(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    wo-&gt;req_addr = wo-&gt;neg_addr &amp;&amp; ipcp_allowoptions[f-&gt;unit].neg_addr;</div><div class='del'>-    if (wo-&gt;ouraddr == 0)</div><div class='del'>-	wo-&gt;accept_local = 1;</div><div class='del'>-    if (wo-&gt;hisaddr == 0)</div><div class='del'>-	wo-&gt;accept_remote = 1;</div><div class='del'>-    wo-&gt;req_dns1 = usepeerdns;	/* Request DNS addresses from the peer */</div><div class='del'>-    wo-&gt;req_dns2 = usepeerdns;</div><div class='del'>-    *go = *wo;</div><div class='del'>-    if (!ask_for_local)</div><div class='del'>-	go-&gt;ouraddr = 0;</div><div class='del'>-    if (ip_choose_hook)</div><div class='del'>-	ip_choose_hook(&amp;wo-&gt;hisaddr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_cilen - Return length of our CI.</div><div class='del'>- * Called by fsm_sconfreq, Send Configure Request.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipcp_cilen(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *ho = &amp;ipcp_hisoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-#define LENCIVJ(neg, old)	(neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0)</div><div class='del'>-#define LENCIADDR(neg, old)	(neg ? (old? CILEN_ADDRS : CILEN_ADDR) : 0)</div><div class='del'>-#define LENCIDNS(neg)		(neg ? (CILEN_ADDR) : 0)</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * First see if we want to change our options to the old</div><div class='del'>-     * forms because we have received old forms from the peer.</div><div class='del'>-     */</div><div class='del'>-    if (wo-&gt;neg_addr &amp;&amp; !go-&gt;neg_addr &amp;&amp; !go-&gt;old_addrs) {</div><div class='del'>-	/* use the old style of address negotiation */</div><div class='del'>-	go-&gt;neg_addr = 1;</div><div class='del'>-	go-&gt;old_addrs = 1;</div><div class='del'>-    }</div><div class='del'>-    if (wo-&gt;neg_vj &amp;&amp; !go-&gt;neg_vj &amp;&amp; !go-&gt;old_vj) {</div><div class='del'>-	/* try an older style of VJ negotiation */</div><div class='del'>-	/* use the old style only if the peer did */</div><div class='del'>-	if (ho-&gt;neg_vj &amp;&amp; ho-&gt;old_vj) {</div><div class='del'>-	    go-&gt;neg_vj = 1;</div><div class='del'>-	    go-&gt;old_vj = 1;</div><div class='del'>-	    go-&gt;vj_protocol = ho-&gt;vj_protocol;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return (LENCIADDR(go-&gt;neg_addr, go-&gt;old_addrs) +</div><div class='del'>-	    LENCIVJ(go-&gt;neg_vj, go-&gt;old_vj) +</div><div class='del'>-	    LENCIDNS(go-&gt;req_dns1) +</div><div class='del'>-	    LENCIDNS(go-&gt;req_dns2)) ;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_addci - Add our desired CIs to a packet.</div><div class='del'>- * Called by fsm_sconfreq, Send Configure Request.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_addci(f, ucp, lenp)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *ucp;</div><div class='del'>-    int *lenp;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    int len = *lenp;</div><div class='del'>-</div><div class='del'>-#define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \</div><div class='del'>-	if (len &gt;= vjlen) { \</div><div class='del'>-	    PUTCHAR(opt, ucp); \</div><div class='del'>-	    PUTCHAR(vjlen, ucp); \</div><div class='del'>-	    PUTSHORT(val, ucp); \</div><div class='del'>-	    if (!old) { \</div><div class='del'>-		PUTCHAR(maxslotindex, ucp); \</div><div class='del'>-		PUTCHAR(cflag, ucp); \</div><div class='del'>-	    } \</div><div class='del'>-	    len -= vjlen; \</div><div class='del'>-	} else \</div><div class='del'>-	    neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ADDCIADDR(opt, neg, old, val1, val2) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \</div><div class='del'>-	if (len &gt;= addrlen) { \</div><div class='del'>-	    u_int32_t l; \</div><div class='del'>-	    PUTCHAR(opt, ucp); \</div><div class='del'>-	    PUTCHAR(addrlen, ucp); \</div><div class='del'>-	    l = ntohl(val1); \</div><div class='del'>-	    PUTLONG(l, ucp); \</div><div class='del'>-	    if (old) { \</div><div class='del'>-		l = ntohl(val2); \</div><div class='del'>-		PUTLONG(l, ucp); \</div><div class='del'>-	    } \</div><div class='del'>-	    len -= addrlen; \</div><div class='del'>-	} else \</div><div class='del'>-	    neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ADDCIDNS(opt, neg, addr) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if (len &gt;= CILEN_ADDR) { \</div><div class='del'>-	    u_int32_t l; \</div><div class='del'>-	    PUTCHAR(opt, ucp); \</div><div class='del'>-	    PUTCHAR(CILEN_ADDR, ucp); \</div><div class='del'>-	    l = ntohl(addr); \</div><div class='del'>-	    PUTLONG(l, ucp); \</div><div class='del'>-	    len -= CILEN_ADDR; \</div><div class='del'>-	} else \</div><div class='del'>-	    neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ADDCIADDR((go-&gt;old_addrs? CI_ADDRS: CI_ADDR), go-&gt;neg_addr,</div><div class='del'>-	      go-&gt;old_addrs, go-&gt;ouraddr, go-&gt;hisaddr);</div><div class='del'>-</div><div class='del'>-    ADDCIVJ(CI_COMPRESSTYPE, go-&gt;neg_vj, go-&gt;vj_protocol, go-&gt;old_vj,</div><div class='del'>-	    go-&gt;maxslotindex, go-&gt;cflag);</div><div class='del'>-</div><div class='del'>-    ADDCIDNS(CI_MS_DNS1, go-&gt;req_dns1, go-&gt;dnsaddr[0]);</div><div class='del'>-</div><div class='del'>-    ADDCIDNS(CI_MS_DNS2, go-&gt;req_dns2, go-&gt;dnsaddr[1]);</div><div class='del'>-</div><div class='del'>-    *lenp -= len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_ackci - Ack our CIs.</div><div class='del'>- * Called by fsm_rconfack, Receive Configure ACK.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Ack was bad.</div><div class='del'>- *	1 - Ack was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipcp_ackci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_short cilen, citype, cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-    u_char cimaxslotindex, cicflag;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * CIs must be in exactly the same order that we sent...</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-#define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \</div><div class='del'>-	if ((len -= vjlen) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != vjlen || \</div><div class='del'>-	    citype != opt)  \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	if (!old) { \</div><div class='del'>-	    GETCHAR(cimaxslotindex, p); \</div><div class='del'>-	    if (cimaxslotindex != maxslotindex) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	    GETCHAR(cicflag, p); \</div><div class='del'>-	    if (cicflag != cflag) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	} \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCIADDR(opt, neg, old, val1, val2) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \</div><div class='del'>-	u_int32_t l; \</div><div class='del'>-	if ((len -= addrlen) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != addrlen || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	cilong = htonl(l); \</div><div class='del'>-	if (val1 != cilong) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	if (old) { \</div><div class='del'>-	    GETLONG(l, p); \</div><div class='del'>-	    cilong = htonl(l); \</div><div class='del'>-	    if (val2 != cilong) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	} \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCIDNS(opt, neg, addr) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	u_int32_t l; \</div><div class='del'>-	if ((len -= CILEN_ADDR) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_ADDR || citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	cilong = htonl(l); \</div><div class='del'>-	if (addr != cilong) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ACKCIADDR((go-&gt;old_addrs? CI_ADDRS: CI_ADDR), go-&gt;neg_addr,</div><div class='del'>-	      go-&gt;old_addrs, go-&gt;ouraddr, go-&gt;hisaddr);</div><div class='del'>-</div><div class='del'>-    ACKCIVJ(CI_COMPRESSTYPE, go-&gt;neg_vj, go-&gt;vj_protocol, go-&gt;old_vj,</div><div class='del'>-	    go-&gt;maxslotindex, go-&gt;cflag);</div><div class='del'>-</div><div class='del'>-    ACKCIDNS(CI_MS_DNS1, go-&gt;req_dns1, go-&gt;dnsaddr[0]);</div><div class='del'>-</div><div class='del'>-    ACKCIDNS(CI_MS_DNS2, go-&gt;req_dns2, go-&gt;dnsaddr[1]);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    return (1);</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPCPDEBUG(("ipcp_ackci: received bad Ack!"));</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_nakci - Peer has sent a NAK for some of our CIs.</div><div class='del'>- * This should not modify any state if the Nak is bad</div><div class='del'>- * or if IPCP is in the OPENED state.</div><div class='del'>- * Calback from fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Nak was bad.</div><div class='del'>- *	1 - Nak was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipcp_nakci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char cimaxslotindex, cicflag;</div><div class='del'>-    u_char citype, cilen, *next;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t ciaddr1, ciaddr2, l, cidnsaddr;</div><div class='del'>-    ipcp_options no;		/* options we've seen Naks for */</div><div class='del'>-    ipcp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    BZERO(&amp;no, sizeof(no));</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Any Nak'd CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define NAKCIADDR(opt, neg, old, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= (cilen = (old? CILEN_ADDRS: CILEN_ADDR)) &amp;&amp; \</div><div class='del'>-	p[1] == cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	ciaddr1 = htonl(l); \</div><div class='del'>-	if (old) { \</div><div class='del'>-	    GETLONG(l, p); \</div><div class='del'>-	    ciaddr2 = htonl(l); \</div><div class='del'>-	    no.old_addrs = 1; \</div><div class='del'>-	} else \</div><div class='del'>-	    ciaddr2 = 0; \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define NAKCIVJ(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) &amp;&amp; \</div><div class='del'>-	len &gt;= cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-        code \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define NAKCIDNS(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	((cilen = p[1]) == CILEN_ADDR) &amp;&amp; \</div><div class='del'>-	len &gt;= cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	cidnsaddr = htonl(l); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Accept the peer's idea of {our,his} address, if different</div><div class='del'>-     * from our idea, only if the accept_{local,remote} flag is set.</div><div class='del'>-     */</div><div class='del'>-    NAKCIADDR((go-&gt;old_addrs? CI_ADDRS: CI_ADDR), neg_addr, go-&gt;old_addrs,</div><div class='del'>-	      if (go-&gt;accept_local &amp;&amp; ciaddr1) { /* Do we know our address? */</div><div class='del'>-		  try.ouraddr = ciaddr1;</div><div class='del'>-	      }</div><div class='del'>-	      if (go-&gt;accept_remote &amp;&amp; ciaddr2) { /* Does he know his? */</div><div class='del'>-		  try.hisaddr = ciaddr2;</div><div class='del'>-	      }</div><div class='del'>-	      );</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Accept the peer's value of maxslotindex provided that it</div><div class='del'>-     * is less than what we asked for.  Turn off slot-ID compression</div><div class='del'>-     * if the peer wants.  Send old-style compress-type option if</div><div class='del'>-     * the peer wants.</div><div class='del'>-     */</div><div class='del'>-    NAKCIVJ(CI_COMPRESSTYPE, neg_vj,</div><div class='del'>-	    if (cilen == CILEN_VJ) {</div><div class='del'>-		GETCHAR(cimaxslotindex, p);</div><div class='del'>-		GETCHAR(cicflag, p);</div><div class='del'>-		if (cishort == IPCP_VJ_COMP) {</div><div class='del'>-		    try.old_vj = 0;</div><div class='del'>-		    if (cimaxslotindex &lt; go-&gt;maxslotindex)</div><div class='del'>-			try.maxslotindex = cimaxslotindex;</div><div class='del'>-		    if (!cicflag)</div><div class='del'>-			try.cflag = 0;</div><div class='del'>-		} else {</div><div class='del'>-		    try.neg_vj = 0;</div><div class='del'>-		}</div><div class='del'>-	    } else {</div><div class='del'>-		if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) {</div><div class='del'>-		    try.old_vj = 1;</div><div class='del'>-		    try.vj_protocol = cishort;</div><div class='del'>-		} else {</div><div class='del'>-		    try.neg_vj = 0;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    );</div><div class='del'>-</div><div class='del'>-    NAKCIDNS(CI_MS_DNS1, req_dns1,</div><div class='del'>-	    try.dnsaddr[0] = cidnsaddr;</div><div class='del'>-	    );</div><div class='del'>-</div><div class='del'>-    NAKCIDNS(CI_MS_DNS2, req_dns2,</div><div class='del'>-	    try.dnsaddr[1] = cidnsaddr;</div><div class='del'>-	    );</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * There may be remaining CIs, if the peer is requesting negotiation</div><div class='del'>-     * on an option that we didn't include in our request packet.</div><div class='del'>-     * If they want to negotiate about IP addresses, we comply.</div><div class='del'>-     * If they want us to ask for compression, we refuse.</div><div class='del'>-     */</div><div class='del'>-    while (len &gt; CILEN_VOID) {</div><div class='del'>-	GETCHAR(citype, p);</div><div class='del'>-	GETCHAR(cilen, p);</div><div class='del'>-	if( (len -= cilen) &lt; 0 )</div><div class='del'>-	    goto bad;</div><div class='del'>-	next = p + cilen - 2;</div><div class='del'>-</div><div class='del'>-	switch (citype) {</div><div class='del'>-	case CI_COMPRESSTYPE:</div><div class='del'>-	    if (go-&gt;neg_vj || no.neg_vj ||</div><div class='del'>-		(cilen != CILEN_VJ &amp;&amp; cilen != CILEN_COMPRESS))</div><div class='del'>-		goto bad;</div><div class='del'>-	    no.neg_vj = 1;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_ADDRS:</div><div class='del'>-	    if ((go-&gt;neg_addr &amp;&amp; go-&gt;old_addrs) || no.old_addrs</div><div class='del'>-		|| cilen != CILEN_ADDRS)</div><div class='del'>-		goto bad;</div><div class='del'>-	    try.neg_addr = 1;</div><div class='del'>-	    try.old_addrs = 1;</div><div class='del'>-	    GETLONG(l, p);</div><div class='del'>-	    ciaddr1 = htonl(l);</div><div class='del'>-	    if (ciaddr1 &amp;&amp; go-&gt;accept_local)</div><div class='del'>-		try.ouraddr = ciaddr1;</div><div class='del'>-	    GETLONG(l, p);</div><div class='del'>-	    ciaddr2 = htonl(l);</div><div class='del'>-	    if (ciaddr2 &amp;&amp; go-&gt;accept_remote)</div><div class='del'>-		try.hisaddr = ciaddr2;</div><div class='del'>-	    no.old_addrs = 1;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_ADDR:</div><div class='del'>-	    if (go-&gt;neg_addr || no.neg_addr || cilen != CILEN_ADDR)</div><div class='del'>-		goto bad;</div><div class='del'>-	    try.old_addrs = 0;</div><div class='del'>-	    GETLONG(l, p);</div><div class='del'>-	    ciaddr1 = htonl(l);</div><div class='del'>-	    if (ciaddr1 &amp;&amp; go-&gt;accept_local)</div><div class='del'>-		try.ouraddr = ciaddr1;</div><div class='del'>-	    if (try.ouraddr != 0)</div><div class='del'>-		try.neg_addr = 1;</div><div class='del'>-	    no.neg_addr = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	p = next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * OK, the Nak is good.  Now we can update state.</div><div class='del'>-     * If there are any remaining options, we ignore them.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPCPDEBUG(("ipcp_nakci: received bad Nak!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_rejci - Reject some of our CIs.</div><div class='del'>- * Callback from fsm_rconfnakrej.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipcp_rejci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char cimaxslotindex, ciflag, cilen;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-    ipcp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    try = *go;</div><div class='del'>-    /*</div><div class='del'>-     * Any Rejected CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define REJCIADDR(opt, neg, old, val1, val2) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= (cilen = old? CILEN_ADDRS: CILEN_ADDR) &amp;&amp; \</div><div class='del'>-	p[1] == cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	u_int32_t l; \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	cilong = htonl(l); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cilong != val1) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	if (old) { \</div><div class='del'>-	    GETLONG(l, p); \</div><div class='del'>-	    cilong = htonl(l); \</div><div class='del'>-	    /* Check rejected value. */ \</div><div class='del'>-	    if (cilong != val2) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	} \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	p[1] == (old? CILEN_COMPRESS : CILEN_VJ) &amp;&amp; \</div><div class='del'>-	len &gt;= p[1] &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= p[1]; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	/* Check rejected value. */  \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	if (!old) { \</div><div class='del'>-	   GETCHAR(cimaxslotindex, p); \</div><div class='del'>-	   if (cimaxslotindex != maxslot) \</div><div class='del'>-	     goto bad; \</div><div class='del'>-	   GETCHAR(ciflag, p); \</div><div class='del'>-	   if (ciflag != cflag) \</div><div class='del'>-	     goto bad; \</div><div class='del'>-        } \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-     }</div><div class='del'>-</div><div class='del'>-#define REJCIDNS(opt, neg, dnsaddr) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	((cilen = p[1]) == CILEN_ADDR) &amp;&amp; \</div><div class='del'>-	len &gt;= cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	u_int32_t l; \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(l, p); \</div><div class='del'>-	cilong = htonl(l); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cilong != dnsaddr) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    REJCIADDR((go-&gt;old_addrs? CI_ADDRS: CI_ADDR), neg_addr,</div><div class='del'>-	      go-&gt;old_addrs, go-&gt;ouraddr, go-&gt;hisaddr);</div><div class='del'>-</div><div class='del'>-    REJCIVJ(CI_COMPRESSTYPE, neg_vj, go-&gt;vj_protocol, go-&gt;old_vj,</div><div class='del'>-	    go-&gt;maxslotindex, go-&gt;cflag);</div><div class='del'>-</div><div class='del'>-    REJCIDNS(CI_MS_DNS1, req_dns1, go-&gt;dnsaddr[0]);</div><div class='del'>-</div><div class='del'>-    REJCIDNS(CI_MS_DNS2, req_dns2, go-&gt;dnsaddr[1]);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    /*</div><div class='del'>-     * Now we can update state.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPCPDEBUG(("ipcp_rejci: received bad Reject!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_reqci - Check the peer's requested CIs and send appropriate response.</div><div class='del'>- * Callback from fsm_rconfreq, Receive Configure Request</div><div class='del'>- *</div><div class='del'>- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified</div><div class='del'>- * appropriately.  If reject_if_disagree is non-zero, doesn't return</div><div class='del'>- * CONFNAK; returns CONFREJ if it can't return CONFACK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipcp_reqci(f, inp, len, reject_if_disagree)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;		/* Requested CIs */</div><div class='del'>-    int *len;			/* Length of requested CIs */</div><div class='del'>-    int reject_if_disagree;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *ho = &amp;ipcp_hisoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *ao = &amp;ipcp_allowoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char *cip, *next;		/* Pointer to current and next CIs */</div><div class='del'>-    u_short cilen, citype;	/* Parsed len, type */</div><div class='del'>-    u_short cishort;		/* Parsed short value */</div><div class='del'>-    u_int32_t tl, ciaddr1, ciaddr2;/* Parsed address values */</div><div class='del'>-    int rc = CONFACK;		/* Final packet return code */</div><div class='del'>-    int orc;			/* Individual option return code */</div><div class='del'>-    u_char *p;			/* Pointer to next char to parse */</div><div class='del'>-    u_char *ucp = inp;		/* Pointer to current output char */</div><div class='del'>-    int l = *len;		/* Length left */</div><div class='del'>-    u_char maxslotindex, cflag;</div><div class='del'>-    int d;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Reset all his options.</div><div class='del'>-     */</div><div class='del'>-    BZERO(ho, sizeof(*ho));</div><div class='del'>-    </div><div class='del'>-    /*</div><div class='del'>-     * Process all his options.</div><div class='del'>-     */</div><div class='del'>-    next = inp;</div><div class='del'>-    while (l) {</div><div class='del'>-	orc = CONFACK;			/* Assume success */</div><div class='del'>-	cip = p = next;			/* Remember begining of CI */</div><div class='del'>-	if (l &lt; 2 ||			/* Not enough data for CI header or */</div><div class='del'>-	    p[1] &lt; 2 ||			/*  CI length too small or */</div><div class='del'>-	    p[1] &gt; l) {			/*  CI length too big? */</div><div class='del'>-	    IPCPDEBUG(("ipcp_reqci: bad CI length!"));</div><div class='del'>-	    orc = CONFREJ;		/* Reject bad CI */</div><div class='del'>-	    cilen = l;			/* Reject till end of packet */</div><div class='del'>-	    l = 0;			/* Don't loop again */</div><div class='del'>-	    goto endswitch;</div><div class='del'>-	}</div><div class='del'>-	GETCHAR(citype, p);		/* Parse CI type */</div><div class='del'>-	GETCHAR(cilen, p);		/* Parse CI length */</div><div class='del'>-	l -= cilen;			/* Adjust remaining length */</div><div class='del'>-	next += cilen;			/* Step to next CI */</div><div class='del'>-</div><div class='del'>-	switch (citype) {		/* Check CI type */</div><div class='del'>-	case CI_ADDRS:</div><div class='del'>-	    if (!ao-&gt;neg_addr ||</div><div class='del'>-		cilen != CILEN_ADDRS) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If he has no address, or if we both have his address but</div><div class='del'>-	     * disagree about it, then NAK it with our idea.</div><div class='del'>-	     * In particular, if we don't know his address, but he does,</div><div class='del'>-	     * then accept it.</div><div class='del'>-	     */</div><div class='del'>-	    GETLONG(tl, p);		/* Parse source address (his) */</div><div class='del'>-	    ciaddr1 = htonl(tl);</div><div class='del'>-	    if (ciaddr1 != wo-&gt;hisaddr</div><div class='del'>-		&amp;&amp; (ciaddr1 == 0 || !wo-&gt;accept_remote)) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		if (!reject_if_disagree) {</div><div class='del'>-		    DECPTR(sizeof(u_int32_t), p);</div><div class='del'>-		    tl = ntohl(wo-&gt;hisaddr);</div><div class='del'>-		    PUTLONG(tl, p);</div><div class='del'>-		}</div><div class='del'>-	    } else if (ciaddr1 == 0 &amp;&amp; wo-&gt;hisaddr == 0) {</div><div class='del'>-		/*</div><div class='del'>-		 * If neither we nor he knows his address, reject the option.</div><div class='del'>-		 */</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		wo-&gt;req_addr = 0;	/* don't NAK with 0.0.0.0 later */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If he doesn't know our address, or if we both have our address</div><div class='del'>-	     * but disagree about it, then NAK it with our idea.</div><div class='del'>-	     */</div><div class='del'>-	    GETLONG(tl, p);		/* Parse desination address (ours) */</div><div class='del'>-	    ciaddr2 = htonl(tl);</div><div class='del'>-	    if (ciaddr2 != wo-&gt;ouraddr) {</div><div class='del'>-		if (ciaddr2 == 0 || !wo-&gt;accept_local) {</div><div class='del'>-		    orc = CONFNAK;</div><div class='del'>-		    if (!reject_if_disagree) {</div><div class='del'>-			DECPTR(sizeof(u_int32_t), p);</div><div class='del'>-			tl = ntohl(wo-&gt;ouraddr);</div><div class='del'>-			PUTLONG(tl, p);</div><div class='del'>-		    }</div><div class='del'>-		} else {</div><div class='del'>-		    go-&gt;ouraddr = ciaddr2;	/* accept peer's idea */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ho-&gt;neg_addr = 1;</div><div class='del'>-	    ho-&gt;old_addrs = 1;</div><div class='del'>-	    ho-&gt;hisaddr = ciaddr1;</div><div class='del'>-	    ho-&gt;ouraddr = ciaddr2;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_ADDR:</div><div class='del'>-	    if (!ao-&gt;neg_addr ||</div><div class='del'>-		cilen != CILEN_ADDR) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If he has no address, or if we both have his address but</div><div class='del'>-	     * disagree about it, then NAK it with our idea.</div><div class='del'>-	     * In particular, if we don't know his address, but he does,</div><div class='del'>-	     * then accept it.</div><div class='del'>-	     */</div><div class='del'>-	    GETLONG(tl, p);	/* Parse source address (his) */</div><div class='del'>-	    ciaddr1 = htonl(tl);</div><div class='del'>-	    if (ciaddr1 != wo-&gt;hisaddr</div><div class='del'>-		&amp;&amp; (ciaddr1 == 0 || !wo-&gt;accept_remote)) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		if (!reject_if_disagree) {</div><div class='del'>-		    DECPTR(sizeof(u_int32_t), p);</div><div class='del'>-		    tl = ntohl(wo-&gt;hisaddr);</div><div class='del'>-		    PUTLONG(tl, p);</div><div class='del'>-		}</div><div class='del'>-	    } else if (ciaddr1 == 0 &amp;&amp; wo-&gt;hisaddr == 0) {</div><div class='del'>-		/*</div><div class='del'>-		 * Don't ACK an address of 0.0.0.0 - reject it instead.</div><div class='del'>-		 */</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		wo-&gt;req_addr = 0;	/* don't NAK with 0.0.0.0 later */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	</div><div class='del'>-	    ho-&gt;neg_addr = 1;</div><div class='del'>-	    ho-&gt;hisaddr = ciaddr1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_MS_DNS1:</div><div class='del'>-	case CI_MS_DNS2:</div><div class='del'>-	    /* Microsoft primary or secondary DNS request */</div><div class='del'>-	    d = citype == CI_MS_DNS2;</div><div class='del'>-</div><div class='del'>-	    /* If we do not have a DNS address then we cannot send it */</div><div class='del'>-	    if (ao-&gt;dnsaddr[d] == 0 ||</div><div class='del'>-		cilen != CILEN_ADDR) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETLONG(tl, p);</div><div class='del'>-	    if (htonl(tl) != ao-&gt;dnsaddr[d]) {</div><div class='del'>-                DECPTR(sizeof(u_int32_t), p);</div><div class='del'>-		tl = ntohl(ao-&gt;dnsaddr[d]);</div><div class='del'>-		PUTLONG(tl, p);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-            }</div><div class='del'>-            break;</div><div class='del'>-</div><div class='del'>-	case CI_MS_WINS1:</div><div class='del'>-	case CI_MS_WINS2:</div><div class='del'>-	    /* Microsoft primary or secondary WINS request */</div><div class='del'>-	    d = citype == CI_MS_WINS2;</div><div class='del'>-</div><div class='del'>-	    /* If we do not have a DNS address then we cannot send it */</div><div class='del'>-	    if (ao-&gt;winsaddr[d] == 0 ||</div><div class='del'>-		cilen != CILEN_ADDR) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETLONG(tl, p);</div><div class='del'>-	    if (htonl(tl) != ao-&gt;winsaddr[d]) {</div><div class='del'>-                DECPTR(sizeof(u_int32_t), p);</div><div class='del'>-		tl = ntohl(ao-&gt;winsaddr[d]);</div><div class='del'>-		PUTLONG(tl, p);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-            }</div><div class='del'>-            break;</div><div class='del'>-	</div><div class='del'>-	case CI_COMPRESSTYPE:</div><div class='del'>-	    if (!ao-&gt;neg_vj ||</div><div class='del'>-		(cilen != CILEN_VJ &amp;&amp; cilen != CILEN_COMPRESS)) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-</div><div class='del'>-	    if (!(cishort == IPCP_VJ_COMP ||</div><div class='del'>-		  (cishort == IPCP_VJ_COMP_OLD &amp;&amp; cilen == CILEN_COMPRESS))) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ho-&gt;neg_vj = 1;</div><div class='del'>-	    ho-&gt;vj_protocol = cishort;</div><div class='del'>-	    if (cilen == CILEN_VJ) {</div><div class='del'>-		GETCHAR(maxslotindex, p);</div><div class='del'>-		if (maxslotindex &gt; ao-&gt;maxslotindex) { </div><div class='del'>-		    orc = CONFNAK;</div><div class='del'>-		    if (!reject_if_disagree){</div><div class='del'>-			DECPTR(1, p);</div><div class='del'>-			PUTCHAR(ao-&gt;maxslotindex, p);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		GETCHAR(cflag, p);</div><div class='del'>-		if (cflag &amp;&amp; !ao-&gt;cflag) {</div><div class='del'>-		    orc = CONFNAK;</div><div class='del'>-		    if (!reject_if_disagree){</div><div class='del'>-			DECPTR(1, p);</div><div class='del'>-			PUTCHAR(wo-&gt;cflag, p);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		ho-&gt;maxslotindex = maxslotindex;</div><div class='del'>-		ho-&gt;cflag = cflag;</div><div class='del'>-	    } else {</div><div class='del'>-		ho-&gt;old_vj = 1;</div><div class='del'>-		ho-&gt;maxslotindex = MAX_STATES - 1;</div><div class='del'>-		ho-&gt;cflag = 1;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-endswitch:</div><div class='del'>-	if (orc == CONFACK &amp;&amp;		/* Good CI */</div><div class='del'>-	    rc != CONFACK)		/*  but prior CI wasnt? */</div><div class='del'>-	    continue;			/* Don't send this one */</div><div class='del'>-</div><div class='del'>-	if (orc == CONFNAK) {		/* Nak this CI? */</div><div class='del'>-	    if (reject_if_disagree)	/* Getting fed up with sending NAKs? */</div><div class='del'>-		orc = CONFREJ;		/* Get tough if so */</div><div class='del'>-	    else {</div><div class='del'>-		if (rc == CONFREJ)	/* Rejecting prior CI? */</div><div class='del'>-		    continue;		/* Don't send this one */</div><div class='del'>-		if (rc == CONFACK) {	/* Ack'd all prior CIs? */</div><div class='del'>-		    rc = CONFNAK;	/* Not anymore... */</div><div class='del'>-		    ucp = inp;		/* Backup */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (orc == CONFREJ &amp;&amp;		/* Reject this CI */</div><div class='del'>-	    rc != CONFREJ) {		/*  but no prior ones? */</div><div class='del'>-	    rc = CONFREJ;</div><div class='del'>-	    ucp = inp;			/* Backup */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Need to move CI? */</div><div class='del'>-	if (ucp != cip)</div><div class='del'>-	    BCOPY(cip, ucp, cilen);	/* Move it */</div><div class='del'>-</div><div class='del'>-	/* Update output pointer */</div><div class='del'>-	INCPTR(cilen, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we aren't rejecting this packet, and we want to negotiate</div><div class='del'>-     * their address, and they didn't send their address, then we</div><div class='del'>-     * send a NAK with a CI_ADDR option appended.  We assume the</div><div class='del'>-     * input buffer is long enough that we can append the extra</div><div class='del'>-     * option safely.</div><div class='del'>-     */</div><div class='del'>-    if (rc != CONFREJ &amp;&amp; !ho-&gt;neg_addr &amp;&amp;</div><div class='del'>-	wo-&gt;req_addr &amp;&amp; !reject_if_disagree) {</div><div class='del'>-	if (rc == CONFACK) {</div><div class='del'>-	    rc = CONFNAK;</div><div class='del'>-	    ucp = inp;			/* reset pointer */</div><div class='del'>-	    wo-&gt;req_addr = 0;		/* don't ask again */</div><div class='del'>-	}</div><div class='del'>-	PUTCHAR(CI_ADDR, ucp);</div><div class='del'>-	PUTCHAR(CILEN_ADDR, ucp);</div><div class='del'>-	tl = ntohl(wo-&gt;hisaddr);</div><div class='del'>-	PUTLONG(tl, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *len = ucp - inp;			/* Compute output length */</div><div class='del'>-    IPCPDEBUG(("ipcp: returning Configure-%s", CODENAME(rc)));</div><div class='del'>-    return (rc);			/* Return final code */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ip_check_options - check that any IP-related options are OK,</div><div class='del'>- * and assign appropriate defaults.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ip_check_options()</div><div class='del'>-{</div><div class='del'>-    struct hostent *hp;</div><div class='del'>-    u_int32_t local;</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[0];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Default our local IP address based on our hostname.</div><div class='del'>-     * If local IP address already given, don't bother.</div><div class='del'>-     */</div><div class='del'>-    if (wo-&gt;ouraddr == 0 &amp;&amp; !disable_defaultip) {</div><div class='del'>-	/*</div><div class='del'>-	 * Look up our hostname (possibly with domain name appended)</div><div class='del'>-	 * and take the first IP address as our local IP address.</div><div class='del'>-	 * If there isn't an IP address for our hostname, too bad.</div><div class='del'>-	 */</div><div class='del'>-	wo-&gt;accept_local = 1;	/* don't insist on this default value */</div><div class='del'>-	if ((hp = gethostbyname(hostname)) != NULL) {</div><div class='del'>-	    local = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-	    if (local != 0 &amp;&amp; !bad_ip_adrs(local))</div><div class='del'>-		wo-&gt;ouraddr = local;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    ask_for_local = wo-&gt;ouraddr != 0 || !disable_defaultip;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ip_demand_conf - configure the interface as though</div><div class='del'>- * IPCP were up, for use with dial-on-demand.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ip_demand_conf(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[u];</div><div class='del'>-</div><div class='del'>-    if (wo-&gt;hisaddr == 0) {</div><div class='del'>-	/* make up an arbitrary address for the peer */</div><div class='del'>-	wo-&gt;hisaddr = htonl(0x0a707070 + ifunit);</div><div class='del'>-	wo-&gt;accept_remote = 1;</div><div class='del'>-    }</div><div class='del'>-    if (wo-&gt;ouraddr == 0) {</div><div class='del'>-	/* make up an arbitrary address for us */</div><div class='del'>-	wo-&gt;ouraddr = htonl(0x0a404040 + ifunit);</div><div class='del'>-	wo-&gt;accept_local = 1;</div><div class='del'>-	ask_for_local = 0;	/* don't tell the peer this address */</div><div class='del'>-    }</div><div class='del'>-    if (!sifaddr(u, wo-&gt;ouraddr, wo-&gt;hisaddr, GetMask(wo-&gt;ouraddr)))</div><div class='del'>-	return 0;</div><div class='del'>-    if (!sifup(u))</div><div class='del'>-	return 0;</div><div class='del'>-    if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))</div><div class='del'>-	return 0;</div><div class='del'>-    if (wo-&gt;default_route)</div><div class='del'>-	if (sifdefaultroute(u, wo-&gt;ouraddr, wo-&gt;hisaddr))</div><div class='del'>-	    default_route_set[u] = 1;</div><div class='del'>-    if (wo-&gt;proxy_arp)</div><div class='del'>-	if (sifproxyarp(u, wo-&gt;hisaddr))</div><div class='del'>-	    proxy_arp_set[u] = 1;</div><div class='del'>-</div><div class='del'>-    notice("local  IP address %I", wo-&gt;ouraddr);</div><div class='del'>-    notice("remote IP address %I", wo-&gt;hisaddr);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_up - IPCP has come UP.</div><div class='del'>- *</div><div class='del'>- * Configure the IP network interface appropriately and bring it up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_up(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask;</div><div class='del'>-    ipcp_options *ho = &amp;ipcp_hisoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *go = &amp;ipcp_gotoptions[f-&gt;unit];</div><div class='del'>-    ipcp_options *wo = &amp;ipcp_wantoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    IPCPDEBUG(("ipcp: up"));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We must have a non-zero IP address for both ends of the link.</div><div class='del'>-     */</div><div class='del'>-    if (!ho-&gt;neg_addr)</div><div class='del'>-	ho-&gt;hisaddr = wo-&gt;hisaddr;</div><div class='del'>-</div><div class='del'>-    if (go-&gt;ouraddr == 0) {</div><div class='del'>-	error("Could not determine local IP address");</div><div class='del'>-	ipcp_close(f-&gt;unit, "Could not determine local IP address");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (ho-&gt;hisaddr == 0) {</div><div class='del'>-	ho-&gt;hisaddr = htonl(0x0a404040 + ifunit);</div><div class='del'>-	warn("Could not determine remote IP address: defaulting to %I",</div><div class='del'>-	     ho-&gt;hisaddr);</div><div class='del'>-    }</div><div class='del'>-    script_setenv("IPLOCAL", ip_ntoa(go-&gt;ouraddr), 0);</div><div class='del'>-    script_setenv("IPREMOTE", ip_ntoa(ho-&gt;hisaddr), 1);</div><div class='del'>-</div><div class='del'>-    if (usepeerdns &amp;&amp; (go-&gt;dnsaddr[0] || go-&gt;dnsaddr[1])) {</div><div class='del'>-	script_setenv("USEPEERDNS", "1", 0);</div><div class='del'>-	if (go-&gt;dnsaddr[0])</div><div class='del'>-	    script_setenv("DNS1", ip_ntoa(go-&gt;dnsaddr[0]), 0);</div><div class='del'>-	if (go-&gt;dnsaddr[1])</div><div class='del'>-	    script_setenv("DNS2", ip_ntoa(go-&gt;dnsaddr[1]), 0);</div><div class='del'>-	create_resolv(go-&gt;dnsaddr[0], go-&gt;dnsaddr[1]);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that the peer is allowed to use the IP address it wants.</div><div class='del'>-     */</div><div class='del'>-    if (!auth_ip_addr(f-&gt;unit, ho-&gt;hisaddr)) {</div><div class='del'>-	error("Peer is not authorized to use remote address %I", ho-&gt;hisaddr);</div><div class='del'>-	ipcp_close(f-&gt;unit, "Unauthorized remote IP address");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* set tcp compression */</div><div class='del'>-    sifvjcomp(f-&gt;unit, ho-&gt;neg_vj, ho-&gt;cflag, ho-&gt;maxslotindex);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we are doing dial-on-demand, the interface is already</div><div class='del'>-     * configured, so we put out any saved-up packets, then set the</div><div class='del'>-     * interface to pass IP packets.</div><div class='del'>-     */</div><div class='del'>-    if (demand) {</div><div class='del'>-	if (go-&gt;ouraddr != wo-&gt;ouraddr || ho-&gt;hisaddr != wo-&gt;hisaddr) {</div><div class='del'>-	    ipcp_clear_addrs(f-&gt;unit, wo-&gt;ouraddr, wo-&gt;hisaddr);</div><div class='del'>-	    if (go-&gt;ouraddr != wo-&gt;ouraddr) {</div><div class='del'>-		warn("Local IP address changed to %I", go-&gt;ouraddr);</div><div class='del'>-		script_setenv("OLDIPLOCAL", ip_ntoa(wo-&gt;ouraddr), 0);</div><div class='del'>-		wo-&gt;ouraddr = go-&gt;ouraddr;</div><div class='del'>-	    } else</div><div class='del'>-		script_unsetenv("OLDIPLOCAL");</div><div class='del'>-	    if (ho-&gt;hisaddr != wo-&gt;hisaddr) {</div><div class='del'>-		warn("Remote IP address changed to %I", ho-&gt;hisaddr);</div><div class='del'>-		script_setenv("OLDIPREMOTE", ip_ntoa(wo-&gt;hisaddr), 0);</div><div class='del'>-		wo-&gt;hisaddr = ho-&gt;hisaddr;</div><div class='del'>-	    } else</div><div class='del'>-		script_unsetenv("OLDIPREMOTE");</div><div class='del'>-</div><div class='del'>-	    /* Set the interface to the new addresses */</div><div class='del'>-	    mask = GetMask(go-&gt;ouraddr);</div><div class='del'>-	    if (!sifaddr(f-&gt;unit, go-&gt;ouraddr, ho-&gt;hisaddr, mask)) {</div><div class='del'>-		if (debug)</div><div class='del'>-		    warn("Interface configuration failed");</div><div class='del'>-		ipcp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-		return;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /* assign a default route through the interface if required */</div><div class='del'>-	    if (ipcp_wantoptions[f-&gt;unit].default_route) </div><div class='del'>-		if (sifdefaultroute(f-&gt;unit, go-&gt;ouraddr, ho-&gt;hisaddr))</div><div class='del'>-		    default_route_set[f-&gt;unit] = 1;</div><div class='del'>-</div><div class='del'>-	    /* Make a proxy ARP entry if requested. */</div><div class='del'>-	    if (ipcp_wantoptions[f-&gt;unit].proxy_arp)</div><div class='del'>-		if (sifproxyarp(f-&gt;unit, ho-&gt;hisaddr))</div><div class='del'>-		    proxy_arp_set[f-&gt;unit] = 1;</div><div class='del'>-</div><div class='del'>-	}</div><div class='del'>-	demand_rexmit(PPP_IP);</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IP, NPMODE_PASS);</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * Set IP addresses and (if specified) netmask.</div><div class='del'>-	 */</div><div class='del'>-	mask = GetMask(go-&gt;ouraddr);</div><div class='del'>-</div><div class='del'>-#if !(defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-	if (!sifaddr(f-&gt;unit, go-&gt;ouraddr, ho-&gt;hisaddr, mask)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("Interface configuration failed");</div><div class='del'>-	    ipcp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	/* bring the interface up for IP */</div><div class='del'>-	if (!sifup(f-&gt;unit)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("Interface failed to come up");</div><div class='del'>-	    ipcp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#if (defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-	if (!sifaddr(f-&gt;unit, go-&gt;ouraddr, ho-&gt;hisaddr, mask)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("Interface configuration failed");</div><div class='del'>-	    ipcp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IP, NPMODE_PASS);</div><div class='del'>-</div><div class='del'>-	/* assign a default route through the interface if required */</div><div class='del'>-	if (ipcp_wantoptions[f-&gt;unit].default_route) </div><div class='del'>-	    if (sifdefaultroute(f-&gt;unit, go-&gt;ouraddr, ho-&gt;hisaddr))</div><div class='del'>-		default_route_set[f-&gt;unit] = 1;</div><div class='del'>-</div><div class='del'>-	/* Make a proxy ARP entry if requested. */</div><div class='del'>-	if (ipcp_wantoptions[f-&gt;unit].proxy_arp)</div><div class='del'>-	    if (sifproxyarp(f-&gt;unit, ho-&gt;hisaddr))</div><div class='del'>-		proxy_arp_set[f-&gt;unit] = 1;</div><div class='del'>-</div><div class='del'>-	ipcp_wantoptions[0].ouraddr = go-&gt;ouraddr;</div><div class='del'>-</div><div class='del'>-	notice("local  IP address %I", go-&gt;ouraddr);</div><div class='del'>-	notice("remote IP address %I", ho-&gt;hisaddr);</div><div class='del'>-	if (go-&gt;dnsaddr[0])</div><div class='del'>-	    notice("primary   DNS address %I", go-&gt;dnsaddr[0]);</div><div class='del'>-	if (go-&gt;dnsaddr[1])</div><div class='del'>-	    notice("secondary DNS address %I", go-&gt;dnsaddr[1]);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    np_up(f-&gt;unit, PPP_IP);</div><div class='del'>-    ipcp_is_up = 1;</div><div class='del'>-</div><div class='del'>-    if (ip_up_hook)</div><div class='del'>-	ip_up_hook();</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Execute the ip-up script, like this:</div><div class='del'>-     *	/etc/ppp/ip-up interface tty speed local-IP remote-IP</div><div class='del'>-     */</div><div class='del'>-    if (ipcp_script_state == s_down &amp;&amp; ipcp_script_pid == 0) {</div><div class='del'>-	ipcp_script_state = s_up;</div><div class='del'>-	ipcp_script(_PATH_IPUP);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_down - IPCP has gone DOWN.</div><div class='del'>- *</div><div class='del'>- * Take the IP network interface down, clear its addresses</div><div class='del'>- * and delete routes through it.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_down(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    IPCPDEBUG(("ipcp: down"));</div><div class='del'>-    /* XXX a bit IPv4-centric here, we only need to get the stats</div><div class='del'>-     * before the interface is marked down. */</div><div class='del'>-    update_link_stats(f-&gt;unit);</div><div class='del'>-    if (ip_down_hook)</div><div class='del'>-	ip_down_hook();</div><div class='del'>-    if (ipcp_is_up) {</div><div class='del'>-	ipcp_is_up = 0;</div><div class='del'>-	np_down(f-&gt;unit, PPP_IP);</div><div class='del'>-    }</div><div class='del'>-    sifvjcomp(f-&gt;unit, 0, 0, 0);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we are doing dial-on-demand, set the interface</div><div class='del'>-     * to queue up outgoing packets (for now).</div><div class='del'>-     */</div><div class='del'>-    if (demand) {</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IP, NPMODE_QUEUE);</div><div class='del'>-    } else {</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IP, NPMODE_DROP);</div><div class='del'>-	sifdown(f-&gt;unit);</div><div class='del'>-	ipcp_clear_addrs(f-&gt;unit, ipcp_gotoptions[f-&gt;unit].ouraddr,</div><div class='del'>-			 ipcp_hisoptions[f-&gt;unit].hisaddr);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Execute the ip-down script */</div><div class='del'>-    if (ipcp_script_state == s_up &amp;&amp; ipcp_script_pid == 0) {</div><div class='del'>-	ipcp_script_state = s_down;</div><div class='del'>-	ipcp_script(_PATH_IPDOWN);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_clear_addrs() - clear the interface addresses, routes,</div><div class='del'>- * proxy arp entries, etc.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_clear_addrs(unit, ouraddr, hisaddr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t ouraddr;  /* local address */</div><div class='del'>-    u_int32_t hisaddr;  /* remote address */</div><div class='del'>-{</div><div class='del'>-    if (proxy_arp_set[unit]) {</div><div class='del'>-	cifproxyarp(unit, hisaddr);</div><div class='del'>-	proxy_arp_set[unit] = 0;</div><div class='del'>-    }</div><div class='del'>-    if (default_route_set[unit]) {</div><div class='del'>-	cifdefaultroute(unit, ouraddr, hisaddr);</div><div class='del'>-	default_route_set[unit] = 0;</div><div class='del'>-    }</div><div class='del'>-    cifaddr(unit, ouraddr, hisaddr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_finished - possibly shut down the lower layers.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_finished(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    np_finished(f-&gt;unit, PPP_IP);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_script_done - called when the ip-up or ip-down script</div><div class='del'>- * has finished.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_script_done(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    ipcp_script_pid = 0;</div><div class='del'>-    switch (ipcp_script_state) {</div><div class='del'>-    case s_up:</div><div class='del'>-	if (ipcp_fsm[0].state != OPENED) {</div><div class='del'>-	    ipcp_script_state = s_down;</div><div class='del'>-	    ipcp_script(_PATH_IPDOWN);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case s_down:</div><div class='del'>-	if (ipcp_fsm[0].state == OPENED) {</div><div class='del'>-	    ipcp_script_state = s_up;</div><div class='del'>-	    ipcp_script(_PATH_IPUP);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_script - Execute a script with arguments</div><div class='del'>- * interface-name tty-name speed local-IP remote-IP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipcp_script(script)</div><div class='del'>-    char *script;</div><div class='del'>-{</div><div class='del'>-    char strspeed[32], strlocal[32], strremote[32];</div><div class='del'>-    char *argv[8];</div><div class='del'>-</div><div class='del'>-    slprintf(strspeed, sizeof(strspeed), "%d", baud_rate);</div><div class='del'>-    slprintf(strlocal, sizeof(strlocal), "%I", ipcp_gotoptions[0].ouraddr);</div><div class='del'>-    slprintf(strremote, sizeof(strremote), "%I", ipcp_hisoptions[0].hisaddr);</div><div class='del'>-</div><div class='del'>-    argv[0] = script;</div><div class='del'>-    argv[1] = ifname;</div><div class='del'>-    argv[2] = devnam;</div><div class='del'>-    argv[3] = strspeed;</div><div class='del'>-    argv[4] = strlocal;</div><div class='del'>-    argv[5] = strremote;</div><div class='del'>-    argv[6] = ipparam;</div><div class='del'>-    argv[7] = NULL;</div><div class='del'>-    ipcp_script_pid = run_program(script, argv, 0, ipcp_script_done, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * create_resolv - create the replacement resolv.conf file</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-create_resolv(peerdns1, peerdns2)</div><div class='del'>-    u_int32_t peerdns1, peerdns2;</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-</div><div class='del'>-    f = fopen(_PATH_RESOLV, "w");</div><div class='del'>-    if (f == NULL) {</div><div class='del'>-	error("Failed to create %s: %m", _PATH_RESOLV);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (peerdns1)</div><div class='del'>-	fprintf(f, "nameserver %s\n", ip_ntoa(peerdns1));</div><div class='del'>-</div><div class='del'>-    if (peerdns2)</div><div class='del'>-	fprintf(f, "nameserver %s\n", ip_ntoa(peerdns2));</div><div class='del'>-</div><div class='del'>-    if (ferror(f))</div><div class='del'>-	error("Write failed to %s: %m", _PATH_RESOLV);</div><div class='del'>-</div><div class='del'>-    fclose(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipcp_printpkt - print the contents of an IPCP packet.</div><div class='del'>- */</div><div class='del'>-static char *ipcp_codenames[] = {</div><div class='del'>-    "ConfReq", "ConfAck", "ConfNak", "ConfRej",</div><div class='del'>-    "TermReq", "TermAck", "CodeRej"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipcp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, id, len, olen;</div><div class='del'>-    u_char *pstart, *optend;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    pstart = p;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(ipcp_codenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", ipcp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-    case CONFACK:</div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	/* print option list */</div><div class='del'>-	while (len &gt;= 2) {</div><div class='del'>-	    GETCHAR(code, p);</div><div class='del'>-	    GETCHAR(olen, p);</div><div class='del'>-	    p -= 2;</div><div class='del'>-	    if (olen &lt; 2 || olen &gt; len) {</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= olen;</div><div class='del'>-	    optend = p + olen;</div><div class='del'>-	    switch (code) {</div><div class='del'>-	    case CI_ADDRS:</div><div class='del'>-		if (olen == CILEN_ADDRS) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer(arg, "addrs %I", htonl(cilong));</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer(arg, " %I", htonl(cilong));</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_COMPRESSTYPE:</div><div class='del'>-		if (olen &gt;= CILEN_COMPRESS) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    printer(arg, "compress ");</div><div class='del'>-		    switch (cishort) {</div><div class='del'>-		    case IPCP_VJ_COMP:</div><div class='del'>-			printer(arg, "VJ");</div><div class='del'>-			break;</div><div class='del'>-		    case IPCP_VJ_COMP_OLD:</div><div class='del'>-			printer(arg, "old-VJ");</div><div class='del'>-			break;</div><div class='del'>-		    default:</div><div class='del'>-			printer(arg, "0x%x", cishort);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_ADDR:</div><div class='del'>-		if (olen == CILEN_ADDR) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer(arg, "addr %I", htonl(cilong));</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_MS_DNS1:</div><div class='del'>-	    case CI_MS_DNS2:</div><div class='del'>-	        p += 2;</div><div class='del'>-		GETLONG(cilong, p);</div><div class='del'>-		printer(arg, "ms-dns%d %I", code - CI_MS_DNS1 + 1,</div><div class='del'>-			htonl(cilong));</div><div class='del'>-		break;</div><div class='del'>-	    case CI_MS_WINS1:</div><div class='del'>-	    case CI_MS_WINS2:</div><div class='del'>-	        p += 2;</div><div class='del'>-		GETLONG(cilong, p);</div><div class='del'>-		printer(arg, "ms-wins %I", htonl(cilong));</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    while (p &lt; optend) {</div><div class='del'>-		GETCHAR(code, p);</div><div class='del'>-		printer(arg, " %.2x", code);</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case TERMACK:</div><div class='del'>-    case TERMREQ:</div><div class='del'>-	if (len &gt; 0 &amp;&amp; *p &gt;= ' ' &amp;&amp; *p &lt; 0x7f) {</div><div class='del'>-	    printer(arg, " ");</div><div class='del'>-	    print_string((char *)p, len, printer, arg);</div><div class='del'>-	    p += len;</div><div class='del'>-	    len = 0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* print the rest of the bytes in the packet */</div><div class='del'>-    for (; len &gt; 0; --len) {</div><div class='del'>-	GETCHAR(code, p);</div><div class='del'>-	printer(arg, " %.2x", code);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return p - pstart;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ip_active_pkt - see if this IP packet is worth bringing the link up for.</div><div class='del'>- * We don't bring the link up for IP fragments or for TCP FIN packets</div><div class='del'>- * with no data.</div><div class='del'>- */</div><div class='del'>-#define IP_HDRLEN	20	/* bytes */</div><div class='del'>-#define IP_OFFMASK	0x1fff</div><div class='del'>-// #define IPPROTO_TCP	6</div><div class='del'>-#define TCP_HDRLEN	20</div><div class='del'>-#define TH_FIN		0x01</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We use these macros because the IP header may be at an odd address,</div><div class='del'>- * and some compilers might use word loads to get th_off or ip_hl.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define net_short(x)	(((x)[0] &lt;&lt; 8) + (x)[1])</div><div class='del'>-#define get_iphl(x)	(((unsigned char *)(x))[0] &amp; 0xF)</div><div class='del'>-#define get_ipoff(x)	net_short((unsigned char *)(x) + 6)</div><div class='del'>-#define get_ipproto(x)	(((unsigned char *)(x))[9])</div><div class='del'>-#define get_tcpoff(x)	(((unsigned char *)(x))[12] &gt;&gt; 4)</div><div class='del'>-#define get_tcpflags(x)	(((unsigned char *)(x))[13])</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ip_active_pkt(pkt, len)</div><div class='del'>-    u_char *pkt;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char *tcp;</div><div class='del'>-    int hlen;</div><div class='del'>-</div><div class='del'>-    len -= PPP_HDRLEN;</div><div class='del'>-    pkt += PPP_HDRLEN;</div><div class='del'>-    if (len &lt; IP_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    if ((get_ipoff(pkt) &amp; IP_OFFMASK) != 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (get_ipproto(pkt) != IPPROTO_TCP)</div><div class='del'>-	return 1;</div><div class='del'>-    hlen = get_iphl(pkt) * 4;</div><div class='del'>-    if (len &lt; hlen + TCP_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    tcp = pkt + hlen;</div><div class='del'>-    if ((get_tcpflags(tcp) &amp; TH_FIN) != 0 &amp;&amp; len == hlen + get_tcpoff(tcp) * 4)</div><div class='del'>-	return 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipcp.h b/mdk-stage1/ppp/pppd/ipcp.h<br/>deleted file mode 100644<br/>index 8c5aca861..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipcp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipcp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,73 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ipcp.h - IP Control Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Options.</div><div class='del'>- */</div><div class='del'>-#define CI_ADDRS	1	/* IP Addresses */</div><div class='del'>-#define CI_COMPRESSTYPE	2	/* Compression Type */</div><div class='del'>-#define	CI_ADDR		3</div><div class='del'>-</div><div class='del'>-#define CI_MS_DNS1	129	/* Primary DNS value */</div><div class='del'>-#define CI_MS_WINS1	130	/* Primary WINS value */</div><div class='del'>-#define CI_MS_DNS2	131	/* Secondary DNS value */</div><div class='del'>-#define CI_MS_WINS2	132	/* Secondary WINS value */</div><div class='del'>-</div><div class='del'>-#define MAX_STATES 16		/* from slcompress.h */</div><div class='del'>-</div><div class='del'>-#define IPCP_VJMODE_OLD 1	/* "old" mode (option # = 0x0037) */</div><div class='del'>-#define IPCP_VJMODE_RFC1172 2	/* "old-rfc"mode (option # = 0x002d) */</div><div class='del'>-#define IPCP_VJMODE_RFC1332 3	/* "new-rfc"mode (option # = 0x002d, */</div><div class='del'>-                                /*  maxslot and slot number compression) */</div><div class='del'>-</div><div class='del'>-#define IPCP_VJ_COMP 0x002d	/* current value for VJ compression option*/</div><div class='del'>-#define IPCP_VJ_COMP_OLD 0x0037	/* "old" (i.e, broken) value for VJ */</div><div class='del'>-				/* compression option*/ </div><div class='del'>-</div><div class='del'>-typedef struct ipcp_options {</div><div class='del'>-    bool neg_addr;		/* Negotiate IP Address? */</div><div class='del'>-    bool old_addrs;		/* Use old (IP-Addresses) option? */</div><div class='del'>-    bool req_addr;		/* Ask peer to send IP address? */</div><div class='del'>-    bool default_route;		/* Assign default route through interface? */</div><div class='del'>-    bool proxy_arp;		/* Make proxy ARP entry for peer? */</div><div class='del'>-    bool neg_vj;		/* Van Jacobson Compression? */</div><div class='del'>-    bool old_vj;		/* use old (short) form of VJ option? */</div><div class='del'>-    bool accept_local;		/* accept peer's value for ouraddr */</div><div class='del'>-    bool accept_remote;		/* accept peer's value for hisaddr */</div><div class='del'>-    bool req_dns1;		/* Ask peer to send primary DNS address? */</div><div class='del'>-    bool req_dns2;		/* Ask peer to send secondary DNS address? */</div><div class='del'>-    int  vj_protocol;		/* protocol value to use in VJ option */</div><div class='del'>-    int  maxslotindex;		/* values for RFC1332 VJ compression neg. */</div><div class='del'>-    bool cflag;</div><div class='del'>-    u_int32_t ouraddr, hisaddr;	/* Addresses in NETWORK BYTE ORDER */</div><div class='del'>-    u_int32_t dnsaddr[2];	/* Primary and secondary MS DNS entries */</div><div class='del'>-    u_int32_t winsaddr[2];	/* Primary and secondary MS WINS entries */</div><div class='del'>-} ipcp_options;</div><div class='del'>-</div><div class='del'>-extern fsm ipcp_fsm[];</div><div class='del'>-extern ipcp_options ipcp_wantoptions[];</div><div class='del'>-extern ipcp_options ipcp_gotoptions[];</div><div class='del'>-extern ipcp_options ipcp_allowoptions[];</div><div class='del'>-extern ipcp_options ipcp_hisoptions[];</div><div class='del'>-</div><div class='del'>-char *ip_ntoa __P((u_int32_t));</div><div class='del'>-</div><div class='del'>-extern struct protent ipcp_protent;</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipv6cp.c b/mdk-stage1/ppp/pppd/ipv6cp.c<br/>deleted file mode 100644<br/>index 54ff7d7d8..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipv6cp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipv6cp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1512 +0,0 @@</div><div class='del'>-/*</div><div class='del'>-    ipv6cp.c - PPP IPV6 Control Protocol.</div><div class='del'>-    Copyright (C) 1999  Tommi Komulainen &lt;Tommi.Komulainen@iki.fi&gt;</div><div class='del'>-</div><div class='del'>-    Redistribution and use in source and binary forms are permitted</div><div class='del'>-    provided that the above copyright notice and this paragraph are</div><div class='del'>-    duplicated in all such forms.  The name of the author may not be</div><div class='del'>-    used to endorse or promote products derived from this software</div><div class='del'>-    without specific prior written permission.</div><div class='del'>-    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>-    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>-    WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*  Original version, based on RFC2023 :</div><div class='del'>-</div><div class='del'>-    Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,</div><div class='del'>-    Alain.Durand@imag.fr, IMAG,</div><div class='del'>-    Jean-Luc.Richier@imag.fr, IMAG-LSR.</div><div class='del'>-</div><div class='del'>-    Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,</div><div class='del'>-    Alain.Durand@imag.fr, IMAG,</div><div class='del'>-    Jean-Luc.Richier@imag.fr, IMAG-LSR.</div><div class='del'>-</div><div class='del'>-    Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt</div><div class='del'>-    Économique ayant pour membres BULL S.A. et l'INRIA).</div><div class='del'>-</div><div class='del'>-    Ce logiciel informatique est disponible aux conditions</div><div class='del'>-    usuelles dans la recherche, c'est-à-dire qu'il peut</div><div class='del'>-    être utilisé, copié, modifié, distribué à l'unique</div><div class='del'>-    condition que ce texte soit conservé afin que</div><div class='del'>-    l'origine de ce logiciel soit reconnue.</div><div class='del'>-</div><div class='del'>-    Le nom de l'Institut National de Recherche en Informatique</div><div class='del'>-    et en Automatique (INRIA), de l'IMAG, ou d'une personne morale</div><div class='del'>-    ou physique ayant participé à l'élaboration de ce logiciel ne peut</div><div class='del'>-    être utilisé sans son accord préalable explicite.</div><div class='del'>-</div><div class='del'>-    Ce logiciel est fourni tel quel sans aucune garantie,</div><div class='del'>-    support ou responsabilité d'aucune sorte.</div><div class='del'>-    Ce logiciel est dérivé de sources d'origine</div><div class='del'>-    "University of California at Berkeley" et</div><div class='del'>-    "Digital Equipment Corporation" couvertes par des copyrights.</div><div class='del'>-</div><div class='del'>-    L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG)</div><div class='del'>-    est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National</div><div class='del'>-    Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant</div><div class='del'>-    sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR).</div><div class='del'>-</div><div class='del'>-    This work has been done in the context of GIE DYADE (joint R &amp; D venture</div><div class='del'>-    between BULL S.A. and INRIA).</div><div class='del'>-</div><div class='del'>-    This software is available with usual "research" terms</div><div class='del'>-    with the aim of retain credits of the software. </div><div class='del'>-    Permission to use, copy, modify and distribute this software for any</div><div class='del'>-    purpose and without fee is hereby granted, provided that the above</div><div class='del'>-    copyright notice and this permission notice appear in all copies,</div><div class='del'>-    and the name of INRIA, IMAG, or any contributor not be used in advertising</div><div class='del'>-    or publicity pertaining to this material without the prior explicit</div><div class='del'>-    permission. The software is provided "as is" without any</div><div class='del'>-    warranties, support or liabilities of any kind.</div><div class='del'>-    This software is derived from source code from</div><div class='del'>-    "University of California at Berkeley" and</div><div class='del'>-    "Digital Equipment Corporation" protected by copyrights.</div><div class='del'>-</div><div class='del'>-    Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)</div><div class='del'>-    is a federation of seven research units funded by the CNRS, National</div><div class='del'>-    Polytechnic Institute of Grenoble and University Joseph Fourier.</div><div class='del'>-    The research unit in Software, Systems, Networks (LSR) is member of IMAG.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Derived from :</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * ipcp.c - PPP IP Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$ </div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO: </div><div class='del'>- *</div><div class='del'>- * Proxy Neighbour Discovery.</div><div class='del'>- *</div><div class='del'>- * Better defines for selecting the ordering of</div><div class='del'>- *   interface up / set address. (currently checks for __linux__,</div><div class='del'>- *   since SVR4 &amp;&amp; (SNI || __USLC__) didn't work properly)</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#include "ipv6cp.h"</div><div class='del'>-#include "magic.h"</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/* global vars */</div><div class='del'>-ipv6cp_options ipv6cp_wantoptions[NUM_PPP];     /* Options that we want to request */</div><div class='del'>-ipv6cp_options ipv6cp_gotoptions[NUM_PPP];	/* Options that peer ack'd */</div><div class='del'>-ipv6cp_options ipv6cp_allowoptions[NUM_PPP];	/* Options we allow peer to request */</div><div class='del'>-ipv6cp_options ipv6cp_hisoptions[NUM_PPP];	/* Options that we ack'd */</div><div class='del'>-int no_ifaceid_neg = 0;</div><div class='del'>-</div><div class='del'>-/* local vars */</div><div class='del'>-static int ipv6cp_is_up;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Callbacks for fsm code.  (CI = Configuration Information)</div><div class='del'>- */</div><div class='del'>-static void ipv6cp_resetci __P((fsm *));	/* Reset our CI */</div><div class='del'>-static int  ipv6cp_cilen __P((fsm *));	        /* Return length of our CI */</div><div class='del'>-static void ipv6cp_addci __P((fsm *, u_char *, int *)); /* Add our CI */</div><div class='del'>-static int  ipv6cp_ackci __P((fsm *, u_char *, int));	/* Peer ack'd our CI */</div><div class='del'>-static int  ipv6cp_nakci __P((fsm *, u_char *, int));	/* Peer nak'd our CI */</div><div class='del'>-static int  ipv6cp_rejci __P((fsm *, u_char *, int));	/* Peer rej'd our CI */</div><div class='del'>-static int  ipv6cp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */</div><div class='del'>-static void ipv6cp_up __P((fsm *));		/* We're UP */</div><div class='del'>-static void ipv6cp_down __P((fsm *));		/* We're DOWN */</div><div class='del'>-static void ipv6cp_finished __P((fsm *));	/* Don't need lower layer */</div><div class='del'>-</div><div class='del'>-fsm ipv6cp_fsm[NUM_PPP];		/* IPV6CP fsm structure */</div><div class='del'>-</div><div class='del'>-static fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */</div><div class='del'>-    ipv6cp_resetci,		/* Reset our Configuration Information */</div><div class='del'>-    ipv6cp_cilen,		/* Length of our Configuration Information */</div><div class='del'>-    ipv6cp_addci,		/* Add our Configuration Information */</div><div class='del'>-    ipv6cp_ackci,		/* ACK our Configuration Information */</div><div class='del'>-    ipv6cp_nakci,		/* NAK our Configuration Information */</div><div class='del'>-    ipv6cp_rejci,		/* Reject our Configuration Information */</div><div class='del'>-    ipv6cp_reqci,		/* Request peer's Configuration Information */</div><div class='del'>-    ipv6cp_up,			/* Called when fsm reaches OPENED state */</div><div class='del'>-    ipv6cp_down,		/* Called when fsm leaves OPENED state */</div><div class='del'>-    NULL,			/* Called when we want the lower layer up */</div><div class='del'>-    ipv6cp_finished,		/* Called when we want the lower layer down */</div><div class='del'>-    NULL,			/* Called when Protocol-Reject received */</div><div class='del'>-    NULL,			/* Retransmission is necessary */</div><div class='del'>-    NULL,			/* Called to handle protocol-specific codes */</div><div class='del'>-    "IPV6CP"			/* String name of protocol */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Command-line options.</div><div class='del'>- */</div><div class='del'>-static int setifaceid __P((char **arg));</div><div class='del'>-static void printifaceid __P((option_t *,</div><div class='del'>-			      void (*)(void *, char *, ...), void *));</div><div class='del'>-</div><div class='del'>-static option_t ipv6cp_option_list[] = {</div><div class='del'>-    { "ipv6", o_special, (void *)setifaceid,</div><div class='del'>-      "Set interface identifiers for IPV6",</div><div class='del'>-      OPT_A2PRINTER, (void *)printifaceid },</div><div class='del'>-</div><div class='del'>-    { "+ipv6", o_bool, &amp;ipv6cp_protent.enabled_flag,</div><div class='del'>-      "Enable IPv6 and IPv6CP", OPT_PRIO | 1 },</div><div class='del'>-    { "noipv6", o_bool, &amp;ipv6cp_protent.enabled_flag,</div><div class='del'>-      "Disable IPv6 and IPv6CP", OPT_PRIOSUB },</div><div class='del'>-    { "-ipv6", o_bool, &amp;ipv6cp_protent.enabled_flag,</div><div class='del'>-      "Disable IPv6 and IPv6CP", OPT_PRIOSUB | OPT_ALIAS },</div><div class='del'>-</div><div class='del'>-    { "ipv6cp-accept-local", o_bool, &amp;ipv6cp_allowoptions[0].accept_local,</div><div class='del'>-      "Accept peer's interface identifier for us", 1 },</div><div class='del'>-</div><div class='del'>-    { "ipv6cp-use-ipaddr", o_bool, &amp;ipv6cp_allowoptions[0].use_ip,</div><div class='del'>-      "Use (default) IPv4 address as interface identifier", 1 },</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    { "ipv6cp-use-persistent", o_bool, &amp;ipv6cp_wantoptions[0].use_persistent,</div><div class='del'>-      "Use uniquely-available persistent value for link local address", 1 },</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    { "ipv6cp-restart", o_int, &amp;ipv6cp_fsm[0].timeouttime,</div><div class='del'>-      "Set timeout for IPv6CP", OPT_PRIO },</div><div class='del'>-    { "ipv6cp-max-terminate", o_int, &amp;ipv6cp_fsm[0].maxtermtransmits,</div><div class='del'>-      "Set max #xmits for term-reqs", OPT_PRIO },</div><div class='del'>-    { "ipv6cp-max-configure", o_int, &amp;ipv6cp_fsm[0].maxconfreqtransmits,</div><div class='del'>-      "Set max #xmits for conf-reqs", OPT_PRIO },</div><div class='del'>-    { "ipv6cp-max-failure", o_int, &amp;ipv6cp_fsm[0].maxnakloops,</div><div class='del'>-      "Set max #conf-naks for IPv6CP", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-   { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points from main code.</div><div class='del'>- */</div><div class='del'>-static void ipv6cp_init __P((int));</div><div class='del'>-static void ipv6cp_open __P((int));</div><div class='del'>-static void ipv6cp_close __P((int, char *));</div><div class='del'>-static void ipv6cp_lowerup __P((int));</div><div class='del'>-static void ipv6cp_lowerdown __P((int));</div><div class='del'>-static void ipv6cp_input __P((int, u_char *, int));</div><div class='del'>-static void ipv6cp_protrej __P((int));</div><div class='del'>-static int  ipv6cp_printpkt __P((u_char *, int,</div><div class='del'>-			       void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-static void ipv6_check_options __P((void));</div><div class='del'>-static int  ipv6_demand_conf __P((int));</div><div class='del'>-static int  ipv6_active_pkt __P((u_char *, int));</div><div class='del'>-</div><div class='del'>-struct protent ipv6cp_protent = {</div><div class='del'>-    PPP_IPV6CP,</div><div class='del'>-    ipv6cp_init,</div><div class='del'>-    ipv6cp_input,</div><div class='del'>-    ipv6cp_protrej,</div><div class='del'>-    ipv6cp_lowerup,</div><div class='del'>-    ipv6cp_lowerdown,</div><div class='del'>-    ipv6cp_open,</div><div class='del'>-    ipv6cp_close,</div><div class='del'>-    ipv6cp_printpkt,</div><div class='del'>-    NULL,</div><div class='del'>-    0,</div><div class='del'>-    "IPV6CP",</div><div class='del'>-    "IPV6",</div><div class='del'>-    ipv6cp_option_list,</div><div class='del'>-    ipv6_check_options,</div><div class='del'>-    ipv6_demand_conf,</div><div class='del'>-    ipv6_active_pkt</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static void ipv6cp_clear_addrs __P((int, eui64_t, eui64_t));</div><div class='del'>-static void ipv6cp_script __P((char *));</div><div class='del'>-static void ipv6cp_script_done __P((void *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Lengths of configuration options.</div><div class='del'>- */</div><div class='del'>-#define CILEN_VOID	2</div><div class='del'>-#define CILEN_COMPRESS	4	/* length for RFC2023 compress opt. */</div><div class='del'>-#define CILEN_IFACEID   10	/* RFC2472, interface identifier    */</div><div class='del'>-</div><div class='del'>-#define CODENAME(x)	((x) == CONFACK ? "ACK" : \</div><div class='del'>-			 (x) == CONFNAK ? "NAK" : "REJ")</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This state variable is used to ensure that we don't</div><div class='del'>- * run an ipcp-up/down script while one is already running.</div><div class='del'>- */</div><div class='del'>-static enum script_state {</div><div class='del'>-    s_down,</div><div class='del'>-    s_up,</div><div class='del'>-} ipv6cp_script_state;</div><div class='del'>-static pid_t ipv6cp_script_pid;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setifaceid - set the interface identifiers manually</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setifaceid(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *comma, *arg, c;</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[0];</div><div class='del'>-    struct in6_addr addr;</div><div class='del'>-    static int prio_local, prio_remote;</div><div class='del'>-</div><div class='del'>-#define VALIDID(a) ( (((a).s6_addr32[0] == 0) &amp;&amp; ((a).s6_addr32[1] == 0)) &amp;&amp; \</div><div class='del'>-			(((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) )</div><div class='del'>-    </div><div class='del'>-    arg = *argv;</div><div class='del'>-    if ((comma = strchr(arg, ',')) == NULL)</div><div class='del'>-	comma = arg + strlen(arg);</div><div class='del'>-    </div><div class='del'>-    /* </div><div class='del'>-     * If comma first character, then no local identifier</div><div class='del'>-     */</div><div class='del'>-    if (comma != arg) {</div><div class='del'>-	c = *comma;</div><div class='del'>-	*comma = '\0';</div><div class='del'>-</div><div class='del'>-	if (inet_pton(AF_INET6, arg, &amp;addr) == 0 || !VALIDID(addr)) {</div><div class='del'>-	    option_error("Illegal interface identifier (local): %s", arg);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (option_priority &gt;= prio_local) {</div><div class='del'>-	    eui64_copy(addr.s6_addr32[2], wo-&gt;ourid);</div><div class='del'>-	    wo-&gt;opt_local = 1;</div><div class='del'>-	    prio_local = option_priority;</div><div class='del'>-	}</div><div class='del'>-	*comma = c;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /*</div><div class='del'>-     * If comma last character, the no remote identifier</div><div class='del'>-     */</div><div class='del'>-    if (*comma != 0 &amp;&amp; *++comma != '\0') {</div><div class='del'>-	if (inet_pton(AF_INET6, comma, &amp;addr) == 0 || !VALIDID(addr)) {</div><div class='del'>-	    option_error("Illegal interface identifier (remote): %s", comma);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	if (option_priority &gt;= prio_remote) {</div><div class='del'>-	    eui64_copy(addr.s6_addr32[2], wo-&gt;hisid);</div><div class='del'>-	    wo-&gt;opt_remote = 1;</div><div class='del'>-	    prio_remote = option_priority;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (override_value("+ipv6", option_priority, option_source))</div><div class='del'>-	ipv6cp_protent.enabled_flag = 1;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-printifaceid(opt, printer, arg)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	ipv6cp_options *wo = &amp;ipv6cp_wantoptions[0];</div><div class='del'>-</div><div class='del'>-	if (wo-&gt;opt_local)</div><div class='del'>-		printer(arg, "%s", llv6_ntoa(wo-&gt;ourid));</div><div class='del'>-	printer(arg, ",");</div><div class='del'>-	if (wo-&gt;opt_remote)</div><div class='del'>-		printer(arg, "%s", llv6_ntoa(wo-&gt;hisid));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Make a string representation of a network address.</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-llv6_ntoa(ifaceid)</div><div class='del'>-    eui64_t ifaceid;</div><div class='del'>-{</div><div class='del'>-    static char b[64];</div><div class='del'>-</div><div class='del'>-    sprintf(b, "fe80::%s", eui64_ntoa(ifaceid));</div><div class='del'>-    return b;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_init - Initialize IPV6CP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_init(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ipv6cp_fsm[unit];</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[unit];</div><div class='del'>-    ipv6cp_options *ao = &amp;ipv6cp_allowoptions[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;unit = unit;</div><div class='del'>-    f-&gt;protocol = PPP_IPV6CP;</div><div class='del'>-    f-&gt;callbacks = &amp;ipv6cp_callbacks;</div><div class='del'>-    fsm_init(&amp;ipv6cp_fsm[unit]);</div><div class='del'>-</div><div class='del'>-    memset(wo, 0, sizeof(*wo));</div><div class='del'>-    memset(ao, 0, sizeof(*ao));</div><div class='del'>-</div><div class='del'>-    wo-&gt;accept_local = 1;</div><div class='del'>-    wo-&gt;neg_ifaceid = 1;</div><div class='del'>-    ao-&gt;neg_ifaceid = 1;</div><div class='del'>-</div><div class='del'>-#ifdef IPV6CP_COMP</div><div class='del'>-    wo-&gt;neg_vj = 1;</div><div class='del'>-    ao-&gt;neg_vj = 1;</div><div class='del'>-    wo-&gt;vj_protocol = IPV6CP_COMP;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_open - IPV6CP is allowed to come up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_open(&amp;ipv6cp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_close - Take IPV6CP down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_close(unit, reason)</div><div class='del'>-    int unit;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    fsm_close(&amp;ipv6cp_fsm[unit], reason);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_lowerup - The lower layer is up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_lowerup(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerup(&amp;ipv6cp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_lowerdown - The lower layer is down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_lowerdown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipv6cp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_input - Input IPV6CP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_input(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm_input(&amp;ipv6cp_fsm[unit], p, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_protrej - A Protocol-Reject was received for IPV6CP.</div><div class='del'>- *</div><div class='del'>- * Pretend the lower layer went down, so we shut up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_protrej(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipv6cp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_resetci - Reset our CI.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_resetci(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    wo-&gt;req_ifaceid = wo-&gt;neg_ifaceid &amp;&amp; ipv6cp_allowoptions[f-&gt;unit].neg_ifaceid;</div><div class='del'>-    </div><div class='del'>-    if (!wo-&gt;opt_local) {</div><div class='del'>-	eui64_magic_nz(wo-&gt;ourid);</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    *go = *wo;</div><div class='del'>-    eui64_zero(go-&gt;hisid);	/* last proposed interface identifier */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_cilen - Return length of our CI.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6cp_cilen(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-#define LENCIVJ(neg)		(neg ? CILEN_COMPRESS : 0)</div><div class='del'>-#define LENCIIFACEID(neg)	(neg ? CILEN_IFACEID : 0)</div><div class='del'>-</div><div class='del'>-    return (LENCIIFACEID(go-&gt;neg_ifaceid) +</div><div class='del'>-	    LENCIVJ(go-&gt;neg_vj));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_addci - Add our desired CIs to a packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_addci(f, ucp, lenp)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *ucp;</div><div class='del'>-    int *lenp;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    int len = *lenp;</div><div class='del'>-</div><div class='del'>-#define ADDCIVJ(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int vjlen = CILEN_COMPRESS; \</div><div class='del'>-	if (len &gt;= vjlen) { \</div><div class='del'>-	    PUTCHAR(opt, ucp); \</div><div class='del'>-	    PUTCHAR(vjlen, ucp); \</div><div class='del'>-	    PUTSHORT(val, ucp); \</div><div class='del'>-	    len -= vjlen; \</div><div class='del'>-	} else \</div><div class='del'>-	    neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ADDCIIFACEID(opt, neg, val1) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int idlen = CILEN_IFACEID; \</div><div class='del'>-	if (len &gt;= idlen) { \</div><div class='del'>-	    PUTCHAR(opt, ucp); \</div><div class='del'>-	    PUTCHAR(idlen, ucp); \</div><div class='del'>-	    eui64_put(val1, ucp); \</div><div class='del'>-	    len -= idlen; \</div><div class='del'>-	} else \</div><div class='del'>-	    neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ADDCIIFACEID(CI_IFACEID, go-&gt;neg_ifaceid, go-&gt;ourid);</div><div class='del'>-</div><div class='del'>-    ADDCIVJ(CI_COMPRESSTYPE, go-&gt;neg_vj, go-&gt;vj_protocol);</div><div class='del'>-</div><div class='del'>-    *lenp -= len;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_ackci - Ack our CIs.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Ack was bad.</div><div class='del'>- *	1 - Ack was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6cp_ackci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_short cilen, citype, cishort;</div><div class='del'>-    eui64_t ifaceid;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * CIs must be in exactly the same order that we sent...</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-#define ACKCIVJ(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int vjlen = CILEN_COMPRESS; \</div><div class='del'>-	if ((len -= vjlen) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != vjlen || \</div><div class='del'>-	    citype != opt)  \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCIIFACEID(opt, neg, val1) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int idlen = CILEN_IFACEID; \</div><div class='del'>-	if ((len -= idlen) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != idlen || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	eui64_get(ifaceid, p); \</div><div class='del'>-	if (! eui64_equals(val1, ifaceid)) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ACKCIIFACEID(CI_IFACEID, go-&gt;neg_ifaceid, go-&gt;ourid);</div><div class='del'>-</div><div class='del'>-    ACKCIVJ(CI_COMPRESSTYPE, go-&gt;neg_vj, go-&gt;vj_protocol);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    return (1);</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp_ackci: received bad Ack!"));</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_nakci - Peer has sent a NAK for some of our CIs.</div><div class='del'>- * This should not modify any state if the Nak is bad</div><div class='del'>- * or if IPV6CP is in the OPENED state.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Nak was bad.</div><div class='del'>- *	1 - Nak was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6cp_nakci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char citype, cilen, *next;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    eui64_t ifaceid;</div><div class='del'>-    ipv6cp_options no;		/* options we've seen Naks for */</div><div class='del'>-    ipv6cp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    BZERO(&amp;no, sizeof(no));</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Any Nak'd CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define NAKCIIFACEID(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= (cilen = CILEN_IFACEID) &amp;&amp; \</div><div class='del'>-	p[1] == cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	eui64_get(ifaceid, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define NAKCIVJ(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	((cilen = p[1]) == CILEN_COMPRESS) &amp;&amp; \</div><div class='del'>-	len &gt;= cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-        code \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Accept the peer's idea of {our,his} interface identifier, if different</div><div class='del'>-     * from our idea, only if the accept_{local,remote} flag is set.</div><div class='del'>-     */</div><div class='del'>-    NAKCIIFACEID(CI_IFACEID, neg_ifaceid,</div><div class='del'>-	      if (go-&gt;accept_local) {</div><div class='del'>-		  while (eui64_iszero(ifaceid) || </div><div class='del'>-			 eui64_equals(ifaceid, go-&gt;hisid)) /* bad luck */</div><div class='del'>-		      eui64_magic(ifaceid);</div><div class='del'>-		  try.ourid = ifaceid;</div><div class='del'>-		  IPV6CPDEBUG(("local LL address %s", llv6_ntoa(ifaceid)));</div><div class='del'>-	      }</div><div class='del'>-	      );</div><div class='del'>-</div><div class='del'>-#ifdef IPV6CP_COMP</div><div class='del'>-    NAKCIVJ(CI_COMPRESSTYPE, neg_vj,</div><div class='del'>-	    {</div><div class='del'>-		if (cishort == IPV6CP_COMP) {</div><div class='del'>-		    try.vj_protocol = cishort;</div><div class='del'>-		} else {</div><div class='del'>-		    try.neg_vj = 0;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    );</div><div class='del'>-#else</div><div class='del'>-    NAKCIVJ(CI_COMPRESSTYPE, neg_vj,</div><div class='del'>-	    {</div><div class='del'>-		try.neg_vj = 0;</div><div class='del'>-	    }</div><div class='del'>-	    );</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * There may be remaining CIs, if the peer is requesting negotiation</div><div class='del'>-     * on an option that we didn't include in our request packet.</div><div class='del'>-     * If they want to negotiate about interface identifier, we comply.</div><div class='del'>-     * If they want us to ask for compression, we refuse.</div><div class='del'>-     */</div><div class='del'>-    while (len &gt; CILEN_VOID) {</div><div class='del'>-	GETCHAR(citype, p);</div><div class='del'>-	GETCHAR(cilen, p);</div><div class='del'>-	if( (len -= cilen) &lt; 0 )</div><div class='del'>-	    goto bad;</div><div class='del'>-	next = p + cilen - 2;</div><div class='del'>-</div><div class='del'>-	switch (citype) {</div><div class='del'>-	case CI_COMPRESSTYPE:</div><div class='del'>-	    if (go-&gt;neg_vj || no.neg_vj ||</div><div class='del'>-		(cilen != CILEN_COMPRESS))</div><div class='del'>-		goto bad;</div><div class='del'>-	    no.neg_vj = 1;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_IFACEID:</div><div class='del'>-	    if (go-&gt;neg_ifaceid || no.neg_ifaceid || cilen != CILEN_IFACEID)</div><div class='del'>-		goto bad;</div><div class='del'>-	    try.neg_ifaceid = 1;</div><div class='del'>-	    eui64_get(ifaceid, p);</div><div class='del'>-	    if (go-&gt;accept_local) {</div><div class='del'>-		while (eui64_iszero(ifaceid) || </div><div class='del'>-		       eui64_equals(ifaceid, go-&gt;hisid)) /* bad luck */</div><div class='del'>-		    eui64_magic(ifaceid);</div><div class='del'>-		try.ourid = ifaceid;</div><div class='del'>-	    }</div><div class='del'>-	    no.neg_ifaceid = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	p = next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* If there is still anything left, this packet is bad. */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * OK, the Nak is good.  Now we can update state.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp_nakci: received bad Nak!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_rejci - Reject some of our CIs.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6cp_rejci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char cilen;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    eui64_t ifaceid;</div><div class='del'>-    ipv6cp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    try = *go;</div><div class='del'>-    /*</div><div class='del'>-     * Any Rejected CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define REJCIIFACEID(opt, neg, val1) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= (cilen = CILEN_IFACEID) &amp;&amp; \</div><div class='del'>-	p[1] == cilen &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	eui64_get(ifaceid, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (! eui64_equals(ifaceid, val1)) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define REJCIVJ(opt, neg, val) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_COMPRESS &amp;&amp; \</div><div class='del'>-	len &gt;= p[1] &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= p[1]; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	/* Check rejected value. */  \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-     }</div><div class='del'>-</div><div class='del'>-    REJCIIFACEID(CI_IFACEID, neg_ifaceid, go-&gt;ourid);</div><div class='del'>-</div><div class='del'>-    REJCIVJ(CI_COMPRESSTYPE, neg_vj, go-&gt;vj_protocol);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    /*</div><div class='del'>-     * Now we can update state.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp_rejci: received bad Reject!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_reqci - Check the peer's requested CIs and send appropriate response.</div><div class='del'>- *</div><div class='del'>- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified</div><div class='del'>- * appropriately.  If reject_if_disagree is non-zero, doesn't return</div><div class='del'>- * CONFNAK; returns CONFREJ if it can't return CONFACK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6cp_reqci(f, inp, len, reject_if_disagree)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;		/* Requested CIs */</div><div class='del'>-    int *len;			/* Length of requested CIs */</div><div class='del'>-    int reject_if_disagree;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *ho = &amp;ipv6cp_hisoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *ao = &amp;ipv6cp_allowoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char *cip, *next;		/* Pointer to current and next CIs */</div><div class='del'>-    u_short cilen, citype;	/* Parsed len, type */</div><div class='del'>-    u_short cishort;		/* Parsed short value */</div><div class='del'>-    eui64_t ifaceid;		/* Parsed interface identifier */</div><div class='del'>-    int rc = CONFACK;		/* Final packet return code */</div><div class='del'>-    int orc;			/* Individual option return code */</div><div class='del'>-    u_char *p;			/* Pointer to next char to parse */</div><div class='del'>-    u_char *ucp = inp;		/* Pointer to current output char */</div><div class='del'>-    int l = *len;		/* Length left */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Reset all his options.</div><div class='del'>-     */</div><div class='del'>-    BZERO(ho, sizeof(*ho));</div><div class='del'>-    </div><div class='del'>-    /*</div><div class='del'>-     * Process all his options.</div><div class='del'>-     */</div><div class='del'>-    next = inp;</div><div class='del'>-    while (l) {</div><div class='del'>-	orc = CONFACK;			/* Assume success */</div><div class='del'>-	cip = p = next;			/* Remember begining of CI */</div><div class='del'>-	if (l &lt; 2 ||			/* Not enough data for CI header or */</div><div class='del'>-	    p[1] &lt; 2 ||			/*  CI length too small or */</div><div class='del'>-	    p[1] &gt; l) {			/*  CI length too big? */</div><div class='del'>-	    IPV6CPDEBUG(("ipv6cp_reqci: bad CI length!"));</div><div class='del'>-	    orc = CONFREJ;		/* Reject bad CI */</div><div class='del'>-	    cilen = l;			/* Reject till end of packet */</div><div class='del'>-	    l = 0;			/* Don't loop again */</div><div class='del'>-	    goto endswitch;</div><div class='del'>-	}</div><div class='del'>-	GETCHAR(citype, p);		/* Parse CI type */</div><div class='del'>-	GETCHAR(cilen, p);		/* Parse CI length */</div><div class='del'>-	l -= cilen;			/* Adjust remaining length */</div><div class='del'>-	next += cilen;			/* Step to next CI */</div><div class='del'>-</div><div class='del'>-	switch (citype) {		/* Check CI type */</div><div class='del'>-	case CI_IFACEID:</div><div class='del'>-	    IPV6CPDEBUG(("ipv6cp: received interface identifier "));</div><div class='del'>-</div><div class='del'>-	    if (!ao-&gt;neg_ifaceid ||</div><div class='del'>-		cilen != CILEN_IFACEID) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * If he has no interface identifier, or if we both have same </div><div class='del'>-	     * identifier then NAK it with new idea.</div><div class='del'>-	     * In particular, if we don't know his identifier, but he does,</div><div class='del'>-	     * then accept it.</div><div class='del'>-	     */</div><div class='del'>-	    eui64_get(ifaceid, p);</div><div class='del'>-	    IPV6CPDEBUG(("(%s)", llv6_ntoa(ifaceid)));</div><div class='del'>-	    if (eui64_iszero(ifaceid) &amp;&amp; eui64_iszero(go-&gt;ourid)) {</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (!eui64_iszero(wo-&gt;hisid) &amp;&amp; </div><div class='del'>-		!eui64_equals(ifaceid, wo-&gt;hisid) &amp;&amp; </div><div class='del'>-		eui64_iszero(go-&gt;hisid)) {</div><div class='del'>-		    </div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		ifaceid = wo-&gt;hisid;</div><div class='del'>-		go-&gt;hisid = ifaceid;</div><div class='del'>-		DECPTR(sizeof(ifaceid), p);</div><div class='del'>-		eui64_put(ifaceid, p);</div><div class='del'>-	    } else</div><div class='del'>-	    if (eui64_iszero(ifaceid) || eui64_equals(ifaceid, go-&gt;ourid)) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		if (eui64_iszero(go-&gt;hisid))	/* first time, try option */</div><div class='del'>-		    ifaceid = wo-&gt;hisid;</div><div class='del'>-		while (eui64_iszero(ifaceid) || </div><div class='del'>-		       eui64_equals(ifaceid, go-&gt;ourid)) /* bad luck */</div><div class='del'>-		    eui64_magic(ifaceid);</div><div class='del'>-		go-&gt;hisid = ifaceid;</div><div class='del'>-		DECPTR(sizeof(ifaceid), p);</div><div class='del'>-		eui64_put(ifaceid, p);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ho-&gt;neg_ifaceid = 1;</div><div class='del'>-	    ho-&gt;hisid = ifaceid;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_COMPRESSTYPE:</div><div class='del'>-	    IPV6CPDEBUG(("ipv6cp: received COMPRESSTYPE "));</div><div class='del'>-	    if (!ao-&gt;neg_vj ||</div><div class='del'>-		(cilen != CILEN_COMPRESS)) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-	    IPV6CPDEBUG(("(%d)", cishort));</div><div class='del'>-</div><div class='del'>-#ifdef IPV6CP_COMP</div><div class='del'>-	    if (!(cishort == IPV6CP_COMP)) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ho-&gt;neg_vj = 1;</div><div class='del'>-	    ho-&gt;vj_protocol = cishort;</div><div class='del'>-	    break;</div><div class='del'>-#else</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-endswitch:</div><div class='del'>-	IPV6CPDEBUG((" (%s)\n", CODENAME(orc)));</div><div class='del'>-</div><div class='del'>-	if (orc == CONFACK &amp;&amp;		/* Good CI */</div><div class='del'>-	    rc != CONFACK)		/*  but prior CI wasnt? */</div><div class='del'>-	    continue;			/* Don't send this one */</div><div class='del'>-</div><div class='del'>-	if (orc == CONFNAK) {		/* Nak this CI? */</div><div class='del'>-	    if (reject_if_disagree)	/* Getting fed up with sending NAKs? */</div><div class='del'>-		orc = CONFREJ;		/* Get tough if so */</div><div class='del'>-	    else {</div><div class='del'>-		if (rc == CONFREJ)	/* Rejecting prior CI? */</div><div class='del'>-		    continue;		/* Don't send this one */</div><div class='del'>-		if (rc == CONFACK) {	/* Ack'd all prior CIs? */</div><div class='del'>-		    rc = CONFNAK;	/* Not anymore... */</div><div class='del'>-		    ucp = inp;		/* Backup */</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (orc == CONFREJ &amp;&amp;		/* Reject this CI */</div><div class='del'>-	    rc != CONFREJ) {		/*  but no prior ones? */</div><div class='del'>-	    rc = CONFREJ;</div><div class='del'>-	    ucp = inp;			/* Backup */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Need to move CI? */</div><div class='del'>-	if (ucp != cip)</div><div class='del'>-	    BCOPY(cip, ucp, cilen);	/* Move it */</div><div class='del'>-</div><div class='del'>-	/* Update output pointer */</div><div class='del'>-	INCPTR(cilen, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we aren't rejecting this packet, and we want to negotiate</div><div class='del'>-     * their identifier and they didn't send their identifier, then we</div><div class='del'>-     * send a NAK with a CI_IFACEID option appended.  We assume the</div><div class='del'>-     * input buffer is long enough that we can append the extra</div><div class='del'>-     * option safely.</div><div class='del'>-     */</div><div class='del'>-    if (rc != CONFREJ &amp;&amp; !ho-&gt;neg_ifaceid &amp;&amp;</div><div class='del'>-	wo-&gt;req_ifaceid &amp;&amp; !reject_if_disagree) {</div><div class='del'>-	if (rc == CONFACK) {</div><div class='del'>-	    rc = CONFNAK;</div><div class='del'>-	    ucp = inp;				/* reset pointer */</div><div class='del'>-	    wo-&gt;req_ifaceid = 0;		/* don't ask again */</div><div class='del'>-	}</div><div class='del'>-	PUTCHAR(CI_IFACEID, ucp);</div><div class='del'>-	PUTCHAR(CILEN_IFACEID, ucp);</div><div class='del'>-	eui64_put(wo-&gt;hisid, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *len = ucp - inp;			/* Compute output length */</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp: returning Configure-%s", CODENAME(rc)));</div><div class='del'>-    return (rc);			/* Return final code */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6_check_options - check that any IP-related options are OK,</div><div class='del'>- * and assign appropriate defaults.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6_check_options()</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[0];</div><div class='del'>-</div><div class='del'>-    if (!ipv6cp_protent.enabled_flag)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    /*</div><div class='del'>-     * Persistent link-local id is only used when user has not explicitly</div><div class='del'>-     * configure/hard-code the id</div><div class='del'>-     */</div><div class='del'>-    if ((wo-&gt;use_persistent) &amp;&amp; (!wo-&gt;opt_local) &amp;&amp; (!wo-&gt;opt_remote)) {</div><div class='del'>-</div><div class='del'>-	/* </div><div class='del'>-	 * On systems where there are no Ethernet interfaces used, there</div><div class='del'>-	 * may be other ways to obtain a persistent id. Right now, it</div><div class='del'>-	 * will fall back to using magic [see eui64_magic] below when</div><div class='del'>-	 * an EUI-48 from MAC address can't be obtained. Other possibilities</div><div class='del'>-	 * include obtaining EEPROM serial numbers, or some other unique</div><div class='del'>-	 * yet persistent number. On Sparc platforms, this is possible,</div><div class='del'>-	 * but too bad there's no standards yet for x86 machines.</div><div class='del'>-	 */</div><div class='del'>-	if (ether_to_eui64(&amp;wo-&gt;ourid)) {</div><div class='del'>-	    wo-&gt;opt_local = 1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (!wo-&gt;opt_local) {	/* init interface identifier */</div><div class='del'>-	if (wo-&gt;use_ip &amp;&amp; eui64_iszero(wo-&gt;ourid)) {</div><div class='del'>-	    eui64_setlo32(wo-&gt;ourid, ntohl(ipcp_wantoptions[0].ouraddr));</div><div class='del'>-	    if (!eui64_iszero(wo-&gt;ourid))</div><div class='del'>-		wo-&gt;opt_local = 1;</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	while (eui64_iszero(wo-&gt;ourid))</div><div class='del'>-	    eui64_magic(wo-&gt;ourid);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!wo-&gt;opt_remote) {</div><div class='del'>-	if (wo-&gt;use_ip &amp;&amp; eui64_iszero(wo-&gt;hisid)) {</div><div class='del'>-	    eui64_setlo32(wo-&gt;hisid, ntohl(ipcp_wantoptions[0].hisaddr));</div><div class='del'>-	    if (!eui64_iszero(wo-&gt;hisid))</div><div class='del'>-		wo-&gt;opt_remote = 1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (demand &amp;&amp; (eui64_iszero(wo-&gt;ourid) || eui64_iszero(wo-&gt;hisid))) {</div><div class='del'>-	option_error("local/remote LL address required for demand-dialling\n");</div><div class='del'>-	exit(1);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6_demand_conf - configure the interface as though</div><div class='del'>- * IPV6CP were up, for use with dial-on-demand.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipv6_demand_conf(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[u];</div><div class='del'>-</div><div class='del'>-#if defined(__linux__) || defined(SOL2) || (defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    if (!sif6up(u))</div><div class='del'>-	return 0;</div><div class='del'>-#else</div><div class='del'>-    if (!sifup(u))</div><div class='del'>-	return 0;</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-#endif    </div><div class='del'>-    if (!sif6addr(u, wo-&gt;ourid, wo-&gt;hisid))</div><div class='del'>-	return 0;</div><div class='del'>-#if !defined(__linux__) &amp;&amp; !(defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-    if (!sifup(u))</div><div class='del'>-	return 0;</div><div class='del'>-#endif</div><div class='del'>-    if (!sifnpmode(u, PPP_IPV6, NPMODE_QUEUE))</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    notice("ipv6_demand_conf");</div><div class='del'>-    notice("local  LL address %s", llv6_ntoa(wo-&gt;ourid));</div><div class='del'>-    notice("remote LL address %s", llv6_ntoa(wo-&gt;hisid));</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_up - IPV6CP has come UP.</div><div class='del'>- *</div><div class='del'>- * Configure the IPv6 network interface appropriately and bring it up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_up(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_options *ho = &amp;ipv6cp_hisoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *go = &amp;ipv6cp_gotoptions[f-&gt;unit];</div><div class='del'>-    ipv6cp_options *wo = &amp;ipv6cp_wantoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp: up"));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We must have a non-zero LL address for both ends of the link.</div><div class='del'>-     */</div><div class='del'>-    if (!ho-&gt;neg_ifaceid)</div><div class='del'>-	ho-&gt;hisid = wo-&gt;hisid;</div><div class='del'>-</div><div class='del'>-    if(!no_ifaceid_neg) {</div><div class='del'>-	if (eui64_iszero(ho-&gt;hisid)) {</div><div class='del'>-	    error("Could not determine remote LL address");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Could not determine remote LL address");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-	if (eui64_iszero(go-&gt;ourid)) {</div><div class='del'>-	    error("Could not determine local LL address");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Could not determine local LL address");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-	if (eui64_equals(go-&gt;ourid, ho-&gt;hisid)) {</div><div class='del'>-	    error("local and remote LL addresses are equal");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "local and remote LL addresses are equal");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    script_setenv("LLLOCAL", llv6_ntoa(go-&gt;ourid), 0);</div><div class='del'>-    script_setenv("LLREMOTE", llv6_ntoa(ho-&gt;hisid), 0);</div><div class='del'>-</div><div class='del'>-#ifdef IPV6CP_COMP</div><div class='del'>-    /* set tcp compression */</div><div class='del'>-    sif6comp(f-&gt;unit, ho-&gt;neg_vj);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we are doing dial-on-demand, the interface is already</div><div class='del'>-     * configured, so we put out any saved-up packets, then set the</div><div class='del'>-     * interface to pass IPv6 packets.</div><div class='del'>-     */</div><div class='del'>-    if (demand) {</div><div class='del'>-	if (! eui64_equals(go-&gt;ourid, wo-&gt;ourid) || </div><div class='del'>-	    ! eui64_equals(ho-&gt;hisid, wo-&gt;hisid)) {</div><div class='del'>-	    if (! eui64_equals(go-&gt;ourid, wo-&gt;ourid))</div><div class='del'>-		warn("Local LL address changed to %s", </div><div class='del'>-		     llv6_ntoa(go-&gt;ourid));</div><div class='del'>-	    if (! eui64_equals(ho-&gt;hisid, wo-&gt;hisid))</div><div class='del'>-		warn("Remote LL address changed to %s", </div><div class='del'>-		     llv6_ntoa(ho-&gt;hisid));</div><div class='del'>-	    ipv6cp_clear_addrs(f-&gt;unit, go-&gt;ourid, ho-&gt;hisid);</div><div class='del'>-</div><div class='del'>-	    /* Set the interface to the new addresses */</div><div class='del'>-	    if (!sif6addr(f-&gt;unit, go-&gt;ourid, ho-&gt;hisid)) {</div><div class='del'>-		if (debug)</div><div class='del'>-		    warn("sif6addr failed");</div><div class='del'>-		ipv6cp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-		return;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	}</div><div class='del'>-	demand_rexmit(PPP_IPV6);</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IPV6, NPMODE_PASS);</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * Set LL addresses</div><div class='del'>-	 */</div><div class='del'>-#if !defined(__linux__) &amp;&amp; !defined(SOL2) &amp;&amp; !(defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-	if (!sif6addr(f-&gt;unit, go-&gt;ourid, ho-&gt;hisid)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("sif6addr failed");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	/* bring the interface up for IPv6 */</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	if (!sif6up(f-&gt;unit)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("sifup failed (IPV6)");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#else</div><div class='del'>-	if (!sifup(f-&gt;unit)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("sifup failed (IPV6)");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if defined(__linux__) || defined(SOL2) || (defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC__)))</div><div class='del'>-	if (!sif6addr(f-&gt;unit, go-&gt;ourid, ho-&gt;hisid)) {</div><div class='del'>-	    if (debug)</div><div class='del'>-		warn("sif6addr failed");</div><div class='del'>-	    ipv6cp_close(f-&gt;unit, "Interface configuration failed");</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IPV6, NPMODE_PASS);</div><div class='del'>-</div><div class='del'>-	notice("local  LL address %s", llv6_ntoa(go-&gt;ourid));</div><div class='del'>-	notice("remote LL address %s", llv6_ntoa(ho-&gt;hisid));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    np_up(f-&gt;unit, PPP_IPV6);</div><div class='del'>-    ipv6cp_is_up = 1;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Execute the ipv6-up script, like this:</div><div class='del'>-     *	/etc/ppp/ipv6-up interface tty speed local-LL remote-LL</div><div class='del'>-     */</div><div class='del'>-    if (ipv6cp_script_state == s_down &amp;&amp; ipv6cp_script_pid == 0) {</div><div class='del'>-	ipv6cp_script_state = s_up;</div><div class='del'>-	ipv6cp_script(_PATH_IPV6UP);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_down - IPV6CP has gone DOWN.</div><div class='del'>- *</div><div class='del'>- * Take the IPv6 network interface down, clear its addresses</div><div class='del'>- * and delete routes through it.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_down(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    IPV6CPDEBUG(("ipv6cp: down"));</div><div class='del'>-    update_link_stats(f-&gt;unit);</div><div class='del'>-    if (ipv6cp_is_up) {</div><div class='del'>-	ipv6cp_is_up = 0;</div><div class='del'>-	np_down(f-&gt;unit, PPP_IPV6);</div><div class='del'>-    }</div><div class='del'>-#ifdef IPV6CP_COMP</div><div class='del'>-    sif6comp(f-&gt;unit, 0);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we are doing dial-on-demand, set the interface</div><div class='del'>-     * to queue up outgoing packets (for now).</div><div class='del'>-     */</div><div class='del'>-    if (demand) {</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IPV6, NPMODE_QUEUE);</div><div class='del'>-    } else {</div><div class='del'>-	sifnpmode(f-&gt;unit, PPP_IPV6, NPMODE_DROP);</div><div class='del'>-#if !defined(__linux__) &amp;&amp; !(defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC)))</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-	sif6down(f-&gt;unit);</div><div class='del'>-#else</div><div class='del'>-	sifdown(f-&gt;unit);</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-#endif</div><div class='del'>-	ipv6cp_clear_addrs(f-&gt;unit, </div><div class='del'>-			   ipv6cp_gotoptions[f-&gt;unit].ourid,</div><div class='del'>-			   ipv6cp_hisoptions[f-&gt;unit].hisid);</div><div class='del'>-#if defined(__linux__) || (defined(SVR4) &amp;&amp; (defined(SNI) || defined(__USLC)))</div><div class='del'>-	sifdown(f-&gt;unit);</div><div class='del'>-#endif</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Execute the ipv6-down script */</div><div class='del'>-    if (ipv6cp_script_state == s_up &amp;&amp; ipv6cp_script_pid == 0) {</div><div class='del'>-	ipv6cp_script_state = s_down;</div><div class='del'>-	ipv6cp_script(_PATH_IPV6DOWN);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_clear_addrs() - clear the interface addresses, routes,</div><div class='del'>- * proxy neighbour discovery entries, etc.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_clear_addrs(unit, ourid, hisid)</div><div class='del'>-    int unit;</div><div class='del'>-    eui64_t ourid;</div><div class='del'>-    eui64_t hisid;</div><div class='del'>-{</div><div class='del'>-    cif6addr(unit, ourid, hisid);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_finished - possibly shut down the lower layers.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_finished(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    np_finished(f-&gt;unit, PPP_IPV6);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_script_done - called when the ipv6-up or ipv6-down script</div><div class='del'>- * has finished.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_script_done(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    ipv6cp_script_pid = 0;</div><div class='del'>-    switch (ipv6cp_script_state) {</div><div class='del'>-    case s_up:</div><div class='del'>-	if (ipv6cp_fsm[0].state != OPENED) {</div><div class='del'>-	    ipv6cp_script_state = s_down;</div><div class='del'>-	    ipv6cp_script(_PATH_IPV6DOWN);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    case s_down:</div><div class='del'>-	if (ipv6cp_fsm[0].state == OPENED) {</div><div class='del'>-	    ipv6cp_script_state = s_up;</div><div class='del'>-	    ipv6cp_script(_PATH_IPV6UP);</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_script - Execute a script with arguments</div><div class='del'>- * interface-name tty-name speed local-LL remote-LL.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipv6cp_script(script)</div><div class='del'>-    char *script;</div><div class='del'>-{</div><div class='del'>-    char strspeed[32], strlocal[32], strremote[32];</div><div class='del'>-    char *argv[8];</div><div class='del'>-</div><div class='del'>-    sprintf(strspeed, "%d", baud_rate);</div><div class='del'>-    strcpy(strlocal, llv6_ntoa(ipv6cp_gotoptions[0].ourid));</div><div class='del'>-    strcpy(strremote, llv6_ntoa(ipv6cp_hisoptions[0].hisid));</div><div class='del'>-</div><div class='del'>-    argv[0] = script;</div><div class='del'>-    argv[1] = ifname;</div><div class='del'>-    argv[2] = devnam;</div><div class='del'>-    argv[3] = strspeed;</div><div class='del'>-    argv[4] = strlocal;</div><div class='del'>-    argv[5] = strremote;</div><div class='del'>-    argv[6] = ipparam;</div><div class='del'>-    argv[7] = NULL;</div><div class='del'>-</div><div class='del'>-    ipv6cp_script_pid = run_program(script, argv, 0, ipv6cp_script_done, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6cp_printpkt - print the contents of an IPV6CP packet.</div><div class='del'>- */</div><div class='del'>-static char *ipv6cp_codenames[] = {</div><div class='del'>-    "ConfReq", "ConfAck", "ConfNak", "ConfRej",</div><div class='del'>-    "TermReq", "TermAck", "CodeRej"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipv6cp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, id, len, olen;</div><div class='del'>-    u_char *pstart, *optend;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    eui64_t ifaceid;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    pstart = p;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(ipv6cp_codenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", ipv6cp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-    case CONFACK:</div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	/* print option list */</div><div class='del'>-	while (len &gt;= 2) {</div><div class='del'>-	    GETCHAR(code, p);</div><div class='del'>-	    GETCHAR(olen, p);</div><div class='del'>-	    p -= 2;</div><div class='del'>-	    if (olen &lt; 2 || olen &gt; len) {</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= olen;</div><div class='del'>-	    optend = p + olen;</div><div class='del'>-	    switch (code) {</div><div class='del'>-	    case CI_COMPRESSTYPE:</div><div class='del'>-		if (olen &gt;= CILEN_COMPRESS) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    printer(arg, "compress ");</div><div class='del'>-		    printer(arg, "0x%x", cishort);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_IFACEID:</div><div class='del'>-		if (olen == CILEN_IFACEID) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    eui64_get(ifaceid, p);</div><div class='del'>-		    printer(arg, "addr %s", llv6_ntoa(ifaceid));</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    while (p &lt; optend) {</div><div class='del'>-		GETCHAR(code, p);</div><div class='del'>-		printer(arg, " %.2x", code);</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case TERMACK:</div><div class='del'>-    case TERMREQ:</div><div class='del'>-	if (len &gt; 0 &amp;&amp; *p &gt;= ' ' &amp;&amp; *p &lt; 0x7f) {</div><div class='del'>-	    printer(arg, " ");</div><div class='del'>-	    print_string((char *)p, len, printer, arg);</div><div class='del'>-	    p += len;</div><div class='del'>-	    len = 0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* print the rest of the bytes in the packet */</div><div class='del'>-    for (; len &gt; 0; --len) {</div><div class='del'>-	GETCHAR(code, p);</div><div class='del'>-	printer(arg, " %.2x", code);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return p - pstart;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipv6_active_pkt - see if this IP packet is worth bringing the link up for.</div><div class='del'>- * We don't bring the link up for IP fragments or for TCP FIN packets</div><div class='del'>- * with no data.</div><div class='del'>- */</div><div class='del'>-#define IP6_HDRLEN	40	/* bytes */</div><div class='del'>-#define IP6_NHDR_FRAG	44	/* fragment IPv6 header */</div><div class='del'>-#define IPPROTO_TCP	6</div><div class='del'>-#define TCP_HDRLEN	20</div><div class='del'>-#define TH_FIN		0x01</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We use these macros because the IP header may be at an odd address,</div><div class='del'>- * and some compilers might use word loads to get th_off or ip_hl.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define get_ip6nh(x)	(((unsigned char *)(x))[6])</div><div class='del'>-#define get_tcpoff(x)	(((unsigned char *)(x))[12] &gt;&gt; 4)</div><div class='del'>-#define get_tcpflags(x)	(((unsigned char *)(x))[13])</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipv6_active_pkt(pkt, len)</div><div class='del'>-    u_char *pkt;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char *tcp;</div><div class='del'>-</div><div class='del'>-    len -= PPP_HDRLEN;</div><div class='del'>-    pkt += PPP_HDRLEN;</div><div class='del'>-    if (len &lt; IP6_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    if (get_ip6nh(pkt) == IP6_NHDR_FRAG)</div><div class='del'>-	return 0;</div><div class='del'>-    if (get_ip6nh(pkt) != IPPROTO_TCP)</div><div class='del'>-	return 1;</div><div class='del'>-    if (len &lt; IP6_HDRLEN + TCP_HDRLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    tcp = pkt + IP6_HDRLEN;</div><div class='del'>-    if ((get_tcpflags(tcp) &amp; TH_FIN) != 0 &amp;&amp; len == IP6_HDRLEN + get_tcpoff(tcp) * 4)</div><div class='del'>-	return 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipv6cp.h b/mdk-stage1/ppp/pppd/ipv6cp.h<br/>deleted file mode 100644<br/>index 60d366eb3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipv6cp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipv6cp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,126 +0,0 @@</div><div class='del'>-/*</div><div class='del'>-    ipv6cp.h - PPP IPV6 Control Protocol.</div><div class='del'>-    Copyright (C) 1999  Tommi Komulainen &lt;Tommi.Komulainen@iki.fi&gt;</div><div class='del'>-</div><div class='del'>-    Redistribution and use in source and binary forms are permitted</div><div class='del'>-    provided that the above copyright notice and this paragraph are</div><div class='del'>-    duplicated in all such forms.  The name of the author may not be</div><div class='del'>-    used to endorse or promote products derived from this software</div><div class='del'>-    without specific prior written permission.</div><div class='del'>-    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>-    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>-    WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*  Original version, based on RFC2023 :</div><div class='del'>-</div><div class='del'>-    Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,</div><div class='del'>-    Alain.Durand@imag.fr, IMAG,</div><div class='del'>-    Jean-Luc.Richier@imag.fr, IMAG-LSR.</div><div class='del'>-</div><div class='del'>-    Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,</div><div class='del'>-    Alain.Durand@imag.fr, IMAG,</div><div class='del'>-    Jean-Luc.Richier@imag.fr, IMAG-LSR.</div><div class='del'>-</div><div class='del'>-    Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt</div><div class='del'>-    Économique ayant pour membres BULL S.A. et l'INRIA).</div><div class='del'>-</div><div class='del'>-    Ce logiciel informatique est disponible aux conditions</div><div class='del'>-    usuelles dans la recherche, c'est-à-dire qu'il peut</div><div class='del'>-    être utilisé, copié, modifié, distribué à l'unique</div><div class='del'>-    condition que ce texte soit conservé afin que</div><div class='del'>-    l'origine de ce logiciel soit reconnue.</div><div class='del'>-</div><div class='del'>-    Le nom de l'Institut National de Recherche en Informatique</div><div class='del'>-    et en Automatique (INRIA), de l'IMAG, ou d'une personne morale</div><div class='del'>-    ou physique ayant participé à l'élaboration de ce logiciel ne peut</div><div class='del'>-    être utilisé sans son accord préalable explicite.</div><div class='del'>-</div><div class='del'>-    Ce logiciel est fourni tel quel sans aucune garantie,</div><div class='del'>-    support ou responsabilité d'aucune sorte.</div><div class='del'>-    Ce logiciel est dérivé de sources d'origine</div><div class='del'>-    "University of California at Berkeley" et</div><div class='del'>-    "Digital Equipment Corporation" couvertes par des copyrights.</div><div class='del'>-</div><div class='del'>-    L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG)</div><div class='del'>-    est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National</div><div class='del'>-    Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant</div><div class='del'>-    sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR).</div><div class='del'>-</div><div class='del'>-    This work has been done in the context of GIE DYADE (joint R &amp; D venture</div><div class='del'>-    between BULL S.A. and INRIA).</div><div class='del'>-</div><div class='del'>-    This software is available with usual "research" terms</div><div class='del'>-    with the aim of retain credits of the software. </div><div class='del'>-    Permission to use, copy, modify and distribute this software for any</div><div class='del'>-    purpose and without fee is hereby granted, provided that the above</div><div class='del'>-    copyright notice and this permission notice appear in all copies,</div><div class='del'>-    and the name of INRIA, IMAG, or any contributor not be used in advertising</div><div class='del'>-    or publicity pertaining to this material without the prior explicit</div><div class='del'>-    permission. The software is provided "as is" without any</div><div class='del'>-    warranties, support or liabilities of any kind.</div><div class='del'>-    This software is derived from source code from</div><div class='del'>-    "University of California at Berkeley" and</div><div class='del'>-    "Digital Equipment Corporation" protected by copyrights.</div><div class='del'>-</div><div class='del'>-    Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)</div><div class='del'>-    is a federation of seven research units funded by the CNRS, National</div><div class='del'>-    Polytechnic Institute of Grenoble and University Joseph Fourier.</div><div class='del'>-    The research unit in Software, Systems, Networks (LSR) is member of IMAG.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Derived from :</div><div class='del'>- *</div><div class='del'>- *</div><div class='del'>- * ipcp.h - IP Control Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Options.</div><div class='del'>- */</div><div class='del'>-#define CI_IFACEID	1	/* Interface Identifier */</div><div class='del'>-#define CI_COMPRESSTYPE	2	/* Compression Type     */</div><div class='del'>-</div><div class='del'>-/* No compression types yet defined.</div><div class='del'>- *#define IPV6CP_COMP	0x004f</div><div class='del'>- */</div><div class='del'>-typedef struct ipv6cp_options {</div><div class='del'>-    int neg_ifaceid;		/* Negotiate interface identifier? */</div><div class='del'>-    int req_ifaceid;		/* Ask peer to send interface identifier? */</div><div class='del'>-    int accept_local;		/* accept peer's value for iface id? */</div><div class='del'>-    int opt_local;		/* ourtoken set by option */</div><div class='del'>-    int opt_remote;		/* histoken set by option */</div><div class='del'>-    int use_ip;			/* use IP as interface identifier */</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    int use_persistent;		/* use uniquely persistent value for address */</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-    int neg_vj;			/* Van Jacobson Compression? */</div><div class='del'>-    u_short vj_protocol;	/* protocol value to use in VJ option */</div><div class='del'>-    eui64_t ourid, hisid;	/* Interface identifiers */</div><div class='del'>-} ipv6cp_options;</div><div class='del'>-</div><div class='del'>-extern fsm ipv6cp_fsm[];</div><div class='del'>-extern ipv6cp_options ipv6cp_wantoptions[];</div><div class='del'>-extern ipv6cp_options ipv6cp_gotoptions[];</div><div class='del'>-extern ipv6cp_options ipv6cp_allowoptions[];</div><div class='del'>-extern ipv6cp_options ipv6cp_hisoptions[];</div><div class='del'>-</div><div class='del'>-extern struct protent ipv6cp_protent;</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipxcp.c b/mdk-stage1/ppp/pppd/ipxcp.c<br/>deleted file mode 100644<br/>index f9a12b934..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipxcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipxcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1570 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ipxcp.c - PPP IPX Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipxcp.h"</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-#include "magic.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/* global vars */</div><div class='del'>-ipxcp_options ipxcp_wantoptions[NUM_PPP];	/* Options that we want to request */</div><div class='del'>-ipxcp_options ipxcp_gotoptions[NUM_PPP];	/* Options that peer ack'd */</div><div class='del'>-ipxcp_options ipxcp_allowoptions[NUM_PPP];	/* Options we allow peer to request */</div><div class='del'>-ipxcp_options ipxcp_hisoptions[NUM_PPP];	/* Options that we ack'd */</div><div class='del'>-</div><div class='del'>-#define wo (&amp;ipxcp_wantoptions[0])</div><div class='del'>-#define ao (&amp;ipxcp_allowoptions[0])</div><div class='del'>-#define go (&amp;ipxcp_gotoptions[0])</div><div class='del'>-#define ho (&amp;ipxcp_hisoptions[0])</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Callbacks for fsm code.  (CI = Configuration Information)</div><div class='del'>- */</div><div class='del'>-static void ipxcp_resetci __P((fsm *));	/* Reset our CI */</div><div class='del'>-static int  ipxcp_cilen __P((fsm *));		/* Return length of our CI */</div><div class='del'>-static void ipxcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */</div><div class='del'>-static int  ipxcp_ackci __P((fsm *, u_char *, int));	/* Peer ack'd our CI */</div><div class='del'>-static int  ipxcp_nakci __P((fsm *, u_char *, int));	/* Peer nak'd our CI */</div><div class='del'>-static int  ipxcp_rejci __P((fsm *, u_char *, int));	/* Peer rej'd our CI */</div><div class='del'>-static int  ipxcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */</div><div class='del'>-static void ipxcp_up __P((fsm *));		/* We're UP */</div><div class='del'>-static void ipxcp_down __P((fsm *));		/* We're DOWN */</div><div class='del'>-static void ipxcp_finished __P((fsm *));	/* Don't need lower layer */</div><div class='del'>-static void ipxcp_script __P((fsm *, char *)); /* Run an up/down script */</div><div class='del'>-</div><div class='del'>-fsm ipxcp_fsm[NUM_PPP];		/* IPXCP fsm structure */</div><div class='del'>-</div><div class='del'>-static fsm_callbacks ipxcp_callbacks = { /* IPXCP callback routines */</div><div class='del'>-    ipxcp_resetci,		/* Reset our Configuration Information */</div><div class='del'>-    ipxcp_cilen,		/* Length of our Configuration Information */</div><div class='del'>-    ipxcp_addci,		/* Add our Configuration Information */</div><div class='del'>-    ipxcp_ackci,		/* ACK our Configuration Information */</div><div class='del'>-    ipxcp_nakci,		/* NAK our Configuration Information */</div><div class='del'>-    ipxcp_rejci,		/* Reject our Configuration Information */</div><div class='del'>-    ipxcp_reqci,		/* Request peer's Configuration Information */</div><div class='del'>-    ipxcp_up,			/* Called when fsm reaches OPENED state */</div><div class='del'>-    ipxcp_down,			/* Called when fsm leaves OPENED state */</div><div class='del'>-    NULL,			/* Called when we want the lower layer up */</div><div class='del'>-    ipxcp_finished,		/* Called when we want the lower layer down */</div><div class='del'>-    NULL,			/* Called when Protocol-Reject received */</div><div class='del'>-    NULL,			/* Retransmission is necessary */</div><div class='del'>-    NULL,			/* Called to handle protocol-specific codes */</div><div class='del'>-    "IPXCP"			/* String name of protocol */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Command-line options.</div><div class='del'>- */</div><div class='del'>-static int setipxnode __P((char **));</div><div class='del'>-static void printipxnode __P((option_t *,</div><div class='del'>-			      void (*)(void *, char *, ...), void *));</div><div class='del'>-static int setipxname __P((char **));</div><div class='del'>-</div><div class='del'>-static option_t ipxcp_option_list[] = {</div><div class='del'>-    { "ipx", o_bool, &amp;ipxcp_protent.enabled_flag,</div><div class='del'>-      "Enable IPXCP (and IPX)", OPT_PRIO | 1 },</div><div class='del'>-    { "+ipx", o_bool, &amp;ipxcp_protent.enabled_flag,</div><div class='del'>-      "Enable IPXCP (and IPX)", OPT_PRIOSUB | OPT_ALIAS | 1 },</div><div class='del'>-    { "noipx", o_bool, &amp;ipxcp_protent.enabled_flag,</div><div class='del'>-      "Disable IPXCP (and IPX)", OPT_PRIOSUB },</div><div class='del'>-    { "-ipx", o_bool, &amp;ipxcp_protent.enabled_flag,</div><div class='del'>-      "Disable IPXCP (and IPX)", OPT_PRIOSUB | OPT_ALIAS },</div><div class='del'>-</div><div class='del'>-    { "ipx-network", o_uint32, &amp;ipxcp_wantoptions[0].our_network,</div><div class='del'>-      "Set our IPX network number", OPT_PRIO, &amp;ipxcp_wantoptions[0].neg_nn },</div><div class='del'>-</div><div class='del'>-    { "ipxcp-accept-network", o_bool, &amp;ipxcp_wantoptions[0].accept_network,</div><div class='del'>-      "Accept peer IPX network number", 1,</div><div class='del'>-      &amp;ipxcp_allowoptions[0].accept_network },</div><div class='del'>-</div><div class='del'>-    { "ipx-node", o_special, (void *)setipxnode,</div><div class='del'>-      "Set IPX node number", OPT_A2PRINTER, (void *)printipxnode },</div><div class='del'>-</div><div class='del'>-    { "ipxcp-accept-local", o_bool, &amp;ipxcp_wantoptions[0].accept_local,</div><div class='del'>-      "Accept our IPX address", 1,</div><div class='del'>-      &amp;ipxcp_allowoptions[0].accept_local },</div><div class='del'>-</div><div class='del'>-    { "ipxcp-accept-remote", o_bool, &amp;ipxcp_wantoptions[0].accept_remote,</div><div class='del'>-      "Accept peer's IPX address", 1,</div><div class='del'>-      &amp;ipxcp_allowoptions[0].accept_remote },</div><div class='del'>-</div><div class='del'>-    { "ipx-routing", o_int, &amp;ipxcp_wantoptions[0].router,</div><div class='del'>-      "Set IPX routing proto number", OPT_PRIO,</div><div class='del'>-      &amp;ipxcp_wantoptions[0].neg_router },</div><div class='del'>-</div><div class='del'>-    { "ipx-router-name", o_special, setipxname,</div><div class='del'>-      "Set IPX router name", OPT_PRIO | OPT_A2STRVAL | OPT_STATIC,</div><div class='del'>-       &amp;ipxcp_wantoptions[0].name },</div><div class='del'>-</div><div class='del'>-    { "ipxcp-restart", o_int, &amp;ipxcp_fsm[0].timeouttime,</div><div class='del'>-      "Set timeout for IPXCP", OPT_PRIO },</div><div class='del'>-    { "ipxcp-max-terminate", o_int, &amp;ipxcp_fsm[0].maxtermtransmits,</div><div class='del'>-      "Set max #xmits for IPXCP term-reqs", OPT_PRIO },</div><div class='del'>-    { "ipxcp-max-configure", o_int, &amp;ipxcp_fsm[0].maxconfreqtransmits,</div><div class='del'>-      "Set max #xmits for IPXCP conf-reqs", OPT_PRIO },</div><div class='del'>-    { "ipxcp-max-failure", o_int, &amp;ipxcp_fsm[0].maxnakloops,</div><div class='del'>-      "Set max #conf-naks for IPXCP", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void ipxcp_init __P((int));</div><div class='del'>-static void ipxcp_open __P((int));</div><div class='del'>-static void ipxcp_close __P((int, char *));</div><div class='del'>-static void ipxcp_lowerup __P((int));</div><div class='del'>-static void ipxcp_lowerdown __P((int));</div><div class='del'>-static void ipxcp_input __P((int, u_char *, int));</div><div class='del'>-static void ipxcp_protrej __P((int));</div><div class='del'>-static int  ipxcp_printpkt __P((u_char *, int,</div><div class='del'>-				void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-</div><div class='del'>-struct protent ipxcp_protent = {</div><div class='del'>-    PPP_IPXCP,</div><div class='del'>-    ipxcp_init,</div><div class='del'>-    ipxcp_input,</div><div class='del'>-    ipxcp_protrej,</div><div class='del'>-    ipxcp_lowerup,</div><div class='del'>-    ipxcp_lowerdown,</div><div class='del'>-    ipxcp_open,</div><div class='del'>-    ipxcp_close,</div><div class='del'>-    ipxcp_printpkt,</div><div class='del'>-    NULL,</div><div class='del'>-    0,</div><div class='del'>-    "IPXCP",</div><div class='del'>-    "IPX",</div><div class='del'>-    ipxcp_option_list,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Lengths of configuration options.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define CILEN_VOID	2</div><div class='del'>-#define CILEN_COMPLETE	2	/* length of complete option */</div><div class='del'>-#define CILEN_NETN	6	/* network number length option */</div><div class='del'>-#define CILEN_NODEN	8	/* node number length option */</div><div class='del'>-#define CILEN_PROTOCOL	4	/* Minimum length of routing protocol */</div><div class='del'>-#define CILEN_NAME	3	/* Minimum length of router name */</div><div class='del'>-#define CILEN_COMPRESS	4	/* Minimum length of compression protocol */</div><div class='del'>-</div><div class='del'>-#define CODENAME(x)	((x) == CONFACK ? "ACK" : \</div><div class='del'>-			 (x) == CONFNAK ? "NAK" : "REJ")</div><div class='del'>-</div><div class='del'>-static int ipxcp_is_up;</div><div class='del'>-</div><div class='del'>-static char *ipx_ntoa __P((u_int32_t));</div><div class='del'>-</div><div class='del'>-/* Used in printing the node number */</div><div class='del'>-#define NODE(base) base[0], base[1], base[2], base[3], base[4], base[5]</div><div class='del'>-</div><div class='del'>-/* Used to generate the proper bit mask */</div><div class='del'>-#define BIT(num)   (1 &lt;&lt; (num))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Convert from internal to external notation</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static short int</div><div class='del'>-to_external(internal)</div><div class='del'>-short int internal;</div><div class='del'>-{</div><div class='del'>-    short int  external;</div><div class='del'>-</div><div class='del'>-    if (internal &amp; BIT(IPX_NONE) )</div><div class='del'>-        external = IPX_NONE;</div><div class='del'>-    else</div><div class='del'>-        external = RIP_SAP;</div><div class='del'>-</div><div class='del'>-    return external;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Make a string representation of a network IP address.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static char *</div><div class='del'>-ipx_ntoa(ipxaddr)</div><div class='del'>-u_int32_t ipxaddr;</div><div class='del'>-{</div><div class='del'>-    static char b[64];</div><div class='del'>-    slprintf(b, sizeof(b), "%x", ipxaddr);</div><div class='del'>-    return b;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static u_char *</div><div class='del'>-setipxnodevalue(src,dst)</div><div class='del'>-u_char *src, *dst;</div><div class='del'>-{</div><div class='del'>-    int indx;</div><div class='del'>-    int item;</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-        if (!isxdigit (*src))</div><div class='del'>-	    break;</div><div class='del'>-	</div><div class='del'>-	for (indx = 0; indx &lt; 5; ++indx) {</div><div class='del'>-	    dst[indx] &lt;&lt;= 4;</div><div class='del'>-	    dst[indx] |= (dst[indx + 1] &gt;&gt; 4) &amp; 0x0F;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	item = toupper (*src) - '0';</div><div class='del'>-	if (item &gt; 9)</div><div class='del'>-	    item -= 7;</div><div class='del'>-</div><div class='del'>-	dst[5] = (dst[5] &lt;&lt; 4) | item;</div><div class='del'>-	++src;</div><div class='del'>-    }</div><div class='del'>-    return src;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int ipx_prio_our, ipx_prio_his;</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-setipxnode(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *end;</div><div class='del'>-    int have_his = 0;</div><div class='del'>-    u_char our_node[6];</div><div class='del'>-    u_char his_node[6];</div><div class='del'>-</div><div class='del'>-    memset (our_node, 0, 6);</div><div class='del'>-    memset (his_node, 0, 6);</div><div class='del'>-</div><div class='del'>-    end = setipxnodevalue (*argv, our_node);</div><div class='del'>-    if (*end == ':') {</div><div class='del'>-	have_his = 1;</div><div class='del'>-	end = setipxnodevalue (++end, his_node);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (*end == '\0') {</div><div class='del'>-        ipxcp_wantoptions[0].neg_node = 1;</div><div class='del'>-	if (option_priority &gt;= ipx_prio_our) {</div><div class='del'>-	    memcpy(&amp;ipxcp_wantoptions[0].our_node[0], our_node, 6);</div><div class='del'>-	    ipx_prio_our = option_priority;</div><div class='del'>-	}</div><div class='del'>-	if (have_his &amp;&amp; option_priority &gt;= ipx_prio_his) {</div><div class='del'>-	    memcpy(&amp;ipxcp_wantoptions[0].his_node[0], his_node, 6);</div><div class='del'>-	    ipx_prio_his = option_priority;</div><div class='del'>-	}</div><div class='del'>-        return 1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    option_error("invalid parameter '%s' for ipx-node option", *argv);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-printipxnode(opt, printer, arg)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	unsigned char *p;</div><div class='del'>-</div><div class='del'>-	p = ipxcp_wantoptions[0].our_node;</div><div class='del'>-	if (ipx_prio_our)</div><div class='del'>-		printer(arg, "%.2x%.2x%.2x%.2x%.2x%.2x",</div><div class='del'>-			p[0], p[1], p[2], p[3], p[4], p[5]);</div><div class='del'>-	printer(arg, ":");</div><div class='del'>-	p = ipxcp_wantoptions[0].his_node;</div><div class='del'>-	if (ipx_prio_his)</div><div class='del'>-		printer(arg, "%.2x%.2x%.2x%.2x%.2x%.2x",</div><div class='del'>-			p[0], p[1], p[2], p[3], p[4], p[5]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-setipxname (argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *dest = ipxcp_wantoptions[0].name;</div><div class='del'>-    char *src  = *argv;</div><div class='del'>-    int  count;</div><div class='del'>-    char ch;</div><div class='del'>-</div><div class='del'>-    ipxcp_wantoptions[0].neg_name  = 1;</div><div class='del'>-    ipxcp_allowoptions[0].neg_name = 1;</div><div class='del'>-    memset (dest, '\0', sizeof (ipxcp_wantoptions[0].name));</div><div class='del'>-</div><div class='del'>-    count = 0;</div><div class='del'>-    while (*src) {</div><div class='del'>-        ch = *src++;</div><div class='del'>-	if (! isalnum (ch) &amp;&amp; ch != '_') {</div><div class='del'>-	    option_error("IPX router name must be alphanumeric or _");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (count &gt;= sizeof (ipxcp_wantoptions[0].name) - 1) {</div><div class='del'>-	    option_error("IPX router name is limited to %d characters",</div><div class='del'>-			 sizeof (ipxcp_wantoptions[0].name) - 1);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	dest[count++] = toupper (ch);</div><div class='del'>-    }</div><div class='del'>-    dest[count] = 0;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_init - Initialize IPXCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_init(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;ipxcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;unit	 = unit;</div><div class='del'>-    f-&gt;protocol	 = PPP_IPXCP;</div><div class='del'>-    f-&gt;callbacks = &amp;ipxcp_callbacks;</div><div class='del'>-    fsm_init(&amp;ipxcp_fsm[unit]);</div><div class='del'>-</div><div class='del'>-    memset (wo-&gt;name,	  0, sizeof (wo-&gt;name));</div><div class='del'>-    memset (wo-&gt;our_node, 0, sizeof (wo-&gt;our_node));</div><div class='del'>-    memset (wo-&gt;his_node, 0, sizeof (wo-&gt;his_node));</div><div class='del'>-</div><div class='del'>-    wo-&gt;neg_nn	       = 1;</div><div class='del'>-    wo-&gt;neg_complete   = 1;</div><div class='del'>-    wo-&gt;network	       = 0;</div><div class='del'>-</div><div class='del'>-    ao-&gt;neg_node       = 1;</div><div class='del'>-    ao-&gt;neg_nn	       = 1;</div><div class='del'>-    ao-&gt;neg_name       = 1;</div><div class='del'>-    ao-&gt;neg_complete   = 1;</div><div class='del'>-    ao-&gt;neg_router     = 1;</div><div class='del'>-</div><div class='del'>-    ao-&gt;accept_local   = 0;</div><div class='del'>-    ao-&gt;accept_remote  = 0;</div><div class='del'>-    ao-&gt;accept_network = 0;</div><div class='del'>-</div><div class='del'>-    wo-&gt;tried_rip      = 0;</div><div class='del'>-    wo-&gt;tried_nlsp     = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Copy the node number</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-copy_node (src, dst)</div><div class='del'>-u_char *src, *dst;</div><div class='del'>-{</div><div class='del'>-    memcpy (dst, src, sizeof (ipxcp_wantoptions[0].our_node));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Compare node numbers</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-compare_node (src, dst)</div><div class='del'>-u_char *src, *dst;</div><div class='del'>-{</div><div class='del'>-    return memcmp (dst, src, sizeof (ipxcp_wantoptions[0].our_node)) == 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Is the node number zero?</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-zero_node (node)</div><div class='del'>-u_char *node;</div><div class='del'>-{</div><div class='del'>-    int indx;</div><div class='del'>-    for (indx = 0; indx &lt; sizeof (ipxcp_wantoptions[0].our_node); ++indx)</div><div class='del'>-	if (node [indx] != 0)</div><div class='del'>-	    return 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Increment the node number</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-inc_node (node)</div><div class='del'>-u_char *node;</div><div class='del'>-{</div><div class='del'>-    u_char   *outp;</div><div class='del'>-    u_int32_t magic_num;</div><div class='del'>-</div><div class='del'>-    outp      = node;</div><div class='del'>-    magic_num = magic();</div><div class='del'>-    *outp++   = '\0';</div><div class='del'>-    *outp++   = '\0';</div><div class='del'>-    PUTLONG (magic_num, outp);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_open - IPXCP is allowed to come up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_open(&amp;ipxcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_close - Take IPXCP down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_close(unit, reason)</div><div class='del'>-    int unit;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    fsm_close(&amp;ipxcp_fsm[unit], reason);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_lowerup - The lower layer is up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_lowerup(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerup(&amp;ipxcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_lowerdown - The lower layer is down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_lowerdown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipxcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_input - Input IPXCP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_input(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm_input(&amp;ipxcp_fsm[unit], p, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_protrej - A Protocol-Reject was received for IPXCP.</div><div class='del'>- *</div><div class='del'>- * Pretend the lower layer went down, so we shut up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_protrej(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm_lowerdown(&amp;ipxcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_resetci - Reset our CI.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_resetci(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    wo-&gt;req_node = wo-&gt;neg_node &amp;&amp; ao-&gt;neg_node;</div><div class='del'>-    wo-&gt;req_nn	 = wo-&gt;neg_nn	&amp;&amp; ao-&gt;neg_nn;</div><div class='del'>-</div><div class='del'>-    if (wo-&gt;our_network == 0) {</div><div class='del'>-	wo-&gt;neg_node	   = 1;</div><div class='del'>-	ao-&gt;accept_network = 1;</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * If our node number is zero then change it.</div><div class='del'>- */</div><div class='del'>-    if (zero_node (wo-&gt;our_node)) {</div><div class='del'>-	inc_node (wo-&gt;our_node);</div><div class='del'>-	ao-&gt;accept_local = 1;</div><div class='del'>-	wo-&gt;neg_node	 = 1;</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * If his node number is zero then change it.</div><div class='del'>- */</div><div class='del'>-    if (zero_node (wo-&gt;his_node)) {</div><div class='del'>-	inc_node (wo-&gt;his_node);</div><div class='del'>-	ao-&gt;accept_remote = 1;</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * If no routing agent was specified then we do RIP/SAP according to the</div><div class='del'>- * RFC documents. If you have specified something then OK. Otherwise, we</div><div class='del'>- * do RIP/SAP.</div><div class='del'>- */</div><div class='del'>-    if (ao-&gt;router == 0) {</div><div class='del'>-	ao-&gt;router |= BIT(RIP_SAP);</div><div class='del'>-	wo-&gt;router |= BIT(RIP_SAP);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Always specify a routing protocol unless it was REJected. */</div><div class='del'>-    wo-&gt;neg_router = 1;</div><div class='del'>-/*</div><div class='del'>- * Start with these default values</div><div class='del'>- */</div><div class='del'>-    *go = *wo;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_cilen - Return length of our CI.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipxcp_cilen(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    int len;</div><div class='del'>-</div><div class='del'>-    len	 = go-&gt;neg_nn	    ? CILEN_NETN     : 0;</div><div class='del'>-    len += go-&gt;neg_node	    ? CILEN_NODEN    : 0;</div><div class='del'>-    len += go-&gt;neg_name	    ? CILEN_NAME + strlen (go-&gt;name) - 1 : 0;</div><div class='del'>-</div><div class='del'>-    /* RFC says that defaults should not be included. */</div><div class='del'>-    if (go-&gt;neg_router &amp;&amp; to_external(go-&gt;router) != RIP_SAP)</div><div class='del'>-        len += CILEN_PROTOCOL;</div><div class='del'>-</div><div class='del'>-    return (len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_addci - Add our desired CIs to a packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_addci(f, ucp, lenp)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *ucp;</div><div class='del'>-    int *lenp;</div><div class='del'>-{</div><div class='del'>-/*</div><div class='del'>- * Add the options to the record.</div><div class='del'>- */</div><div class='del'>-    if (go-&gt;neg_nn) {</div><div class='del'>-	PUTCHAR (IPX_NETWORK_NUMBER, ucp);</div><div class='del'>-	PUTCHAR (CILEN_NETN, ucp);</div><div class='del'>-	PUTLONG (go-&gt;our_network, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (go-&gt;neg_node) {</div><div class='del'>-	int indx;</div><div class='del'>-	PUTCHAR (IPX_NODE_NUMBER, ucp);</div><div class='del'>-	PUTCHAR (CILEN_NODEN, ucp);</div><div class='del'>-	for (indx = 0; indx &lt; sizeof (go-&gt;our_node); ++indx)</div><div class='del'>-	    PUTCHAR (go-&gt;our_node[indx], ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (go-&gt;neg_name) {</div><div class='del'>-	int cilen = strlen (go-&gt;name);</div><div class='del'>-	int indx;</div><div class='del'>-	PUTCHAR (IPX_ROUTER_NAME, ucp);</div><div class='del'>-	PUTCHAR (CILEN_NAME + cilen - 1, ucp);</div><div class='del'>-	for (indx = 0; indx &lt; cilen; ++indx)</div><div class='del'>-	    PUTCHAR (go-&gt;name [indx], ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (go-&gt;neg_router) {</div><div class='del'>-        short external = to_external (go-&gt;router);</div><div class='del'>-	if (external != RIP_SAP) {</div><div class='del'>-	    PUTCHAR  (IPX_ROUTER_PROTOCOL, ucp);</div><div class='del'>-	    PUTCHAR  (CILEN_PROTOCOL,      ucp);</div><div class='del'>-	    PUTSHORT (external,            ucp);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_ackci - Ack our CIs.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Ack was bad.</div><div class='del'>- *	1 - Ack was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipxcp_ackci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_short cilen, citype, cishort;</div><div class='del'>-    u_char cichar;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-</div><div class='del'>-#define ACKCIVOID(opt, neg) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_VOID) &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_VOID || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCICOMPLETE(opt,neg)	ACKCIVOID(opt, neg)</div><div class='del'>-</div><div class='del'>-#define ACKCICHARS(opt, neg, val, cnt) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int indx, count = cnt; \</div><div class='del'>-	len -= (count + 2); \</div><div class='del'>-	if (len &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != (count + 2) || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	for (indx = 0; indx &lt; count; ++indx) {\</div><div class='del'>-	    GETCHAR(cichar, p); \</div><div class='del'>-	    if (cichar != ((u_char *) &amp;val)[indx]) \</div><div class='del'>-	       break; \</div><div class='del'>-	}\</div><div class='del'>-	if (indx != count) \</div><div class='del'>-	    break; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCINODE(opt,neg,val) ACKCICHARS(opt,neg,val,sizeof(val))</div><div class='del'>-#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen(val))</div><div class='del'>-</div><div class='del'>-#define ACKCINETWORK(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_NETN) &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_NETN || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	if (cilong != val) \</div><div class='del'>-	    break; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define ACKCIPROTO(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if (len &lt; 2) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_PROTOCOL || citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	len -= cilen; \</div><div class='del'>-	if (len &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != to_external (val) || cishort == RIP_SAP) \</div><div class='del'>-	    break; \</div><div class='del'>-      }</div><div class='del'>-/*</div><div class='del'>- * Process the ACK frame in the order in which the frame was assembled</div><div class='del'>- */</div><div class='del'>-    do {</div><div class='del'>-	ACKCINETWORK  (IPX_NETWORK_NUMBER,  go-&gt;neg_nn,	    go-&gt;our_network);</div><div class='del'>-	ACKCINODE     (IPX_NODE_NUMBER,	    go-&gt;neg_node,   go-&gt;our_node);</div><div class='del'>-	ACKCINAME     (IPX_ROUTER_NAME,	    go-&gt;neg_name,   go-&gt;name);</div><div class='del'>-	if (len &gt; 0)</div><div class='del'>-		ACKCIPROTO    (IPX_ROUTER_PROTOCOL, go-&gt;neg_router, go-&gt;router);</div><div class='del'>-/*</div><div class='del'>- * This is the end of the record.</div><div class='del'>- */</div><div class='del'>-	if (len == 0)</div><div class='del'>-	    return (1);</div><div class='del'>-    } while (0);</div><div class='del'>-/*</div><div class='del'>- * The frame is invalid</div><div class='del'>- */</div><div class='del'>-    IPXCPDEBUG(("ipxcp_ackci: received bad Ack!"));</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_nakci - Peer has sent a NAK for some of our CIs.</div><div class='del'>- * This should not modify any state if the Nak is bad</div><div class='del'>- * or if IPXCP is in the OPENED state.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Nak was bad.</div><div class='del'>- *	1 - Nak was good.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipxcp_nakci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char citype, cilen, *next;</div><div class='del'>-    u_short s;</div><div class='del'>-    u_int32_t l;</div><div class='del'>-    ipxcp_options no;		/* options we've seen Naks for */</div><div class='del'>-    ipxcp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    BZERO(&amp;no, sizeof(no));</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    while (len &gt; CILEN_VOID) {</div><div class='del'>-	GETCHAR (citype, p);</div><div class='del'>-	GETCHAR (cilen,	 p);</div><div class='del'>-	len -= cilen;</div><div class='del'>-	if (len &lt; 0)</div><div class='del'>-	    goto bad;</div><div class='del'>-	next = &amp;p [cilen - CILEN_VOID];</div><div class='del'>-</div><div class='del'>-	switch (citype) {</div><div class='del'>-	case IPX_NETWORK_NUMBER:</div><div class='del'>-	    if (!go-&gt;neg_nn || no.neg_nn || (cilen != CILEN_NETN))</div><div class='del'>-		goto bad;</div><div class='del'>-	    no.neg_nn = 1;</div><div class='del'>-</div><div class='del'>-	    GETLONG(l, p);</div><div class='del'>-	    if (l &amp;&amp; ao-&gt;accept_network)</div><div class='del'>-		try.our_network = l;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case IPX_NODE_NUMBER:</div><div class='del'>-	    if (!go-&gt;neg_node || no.neg_node || (cilen != CILEN_NODEN))</div><div class='del'>-		goto bad;</div><div class='del'>-	    no.neg_node = 1;</div><div class='del'>-</div><div class='del'>-	    if (!zero_node (p) &amp;&amp; ao-&gt;accept_local &amp;&amp;</div><div class='del'>-		! compare_node (p, ho-&gt;his_node))</div><div class='del'>-		copy_node (p, try.our_node);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	    /* This has never been sent. Ignore the NAK frame */</div><div class='del'>-	case IPX_COMPRESSION_PROTOCOL:</div><div class='del'>-	    goto bad;</div><div class='del'>-</div><div class='del'>-	case IPX_ROUTER_PROTOCOL:</div><div class='del'>-	    if (!go-&gt;neg_router || (cilen &lt; CILEN_PROTOCOL))</div><div class='del'>-		goto bad;</div><div class='del'>-</div><div class='del'>-	    GETSHORT (s, p);</div><div class='del'>-	    if (s &gt; 15)         /* This is just bad, but ignore for now. */</div><div class='del'>-	        break;</div><div class='del'>-</div><div class='del'>-	    s = BIT(s);</div><div class='del'>-	    if (no.router &amp; s)  /* duplicate NAKs are always bad */</div><div class='del'>-		goto bad;</div><div class='del'>-</div><div class='del'>-	    if (no.router == 0) /* Reset on first NAK only */</div><div class='del'>-		try.router = 0;</div><div class='del'>-</div><div class='del'>-	    no.router      |= s;</div><div class='del'>-	    try.router     |= s;</div><div class='del'>-	    try.neg_router  = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	    /* These, according to the RFC, must never be NAKed. */</div><div class='del'>-	case IPX_ROUTER_NAME:</div><div class='del'>-	case IPX_COMPLETE:</div><div class='del'>-	    goto bad;</div><div class='del'>-</div><div class='del'>-	    /* These are for options which we have not seen. */</div><div class='del'>-	default:</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	p = next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Do not permit the peer to force a router protocol which we do not</div><div class='del'>-     * support. However, default to the condition that will accept "NONE".</div><div class='del'>-     */</div><div class='del'>-    try.router &amp;= (ao-&gt;router | BIT(IPX_NONE));</div><div class='del'>-    if (try.router == 0 &amp;&amp; ao-&gt;router != 0)</div><div class='del'>-	try.router = BIT(IPX_NONE);</div><div class='del'>-</div><div class='del'>-    if (try.router != 0)</div><div class='del'>-        try.neg_router = 1;</div><div class='del'>-    </div><div class='del'>-    /*</div><div class='del'>-     * OK, the Nak is good.  Now we can update state.</div><div class='del'>-     * If there are any options left, we ignore them.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    IPXCPDEBUG(("ipxcp_nakci: received bad Nak!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_rejci - Reject some of our CIs.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipxcp_rejci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_short cilen, citype, cishort;</div><div class='del'>-    u_char cichar;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-    ipxcp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-#define REJCINETWORK(opt, neg, val) \</div><div class='del'>-    if (neg &amp;&amp; p[0] == opt) { \</div><div class='del'>-	if ((len -= CILEN_NETN) &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_NETN || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	if (cilong != val) \</div><div class='del'>-	    break; \</div><div class='del'>-	neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define REJCICHARS(opt, neg, val, cnt) \</div><div class='del'>-    if (neg &amp;&amp; p[0] == opt) { \</div><div class='del'>-	int indx, count = cnt; \</div><div class='del'>-	len -= (count + 2); \</div><div class='del'>-	if (len &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != (count + 2) || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	for (indx = 0; indx &lt; count; ++indx) {\</div><div class='del'>-	    GETCHAR(cichar, p); \</div><div class='del'>-	    if (cichar != ((u_char *) &amp;val)[indx]) \</div><div class='del'>-	       break; \</div><div class='del'>-	}\</div><div class='del'>-	if (indx != count) \</div><div class='del'>-	    break; \</div><div class='del'>-	neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#define REJCINODE(opt,neg,val) REJCICHARS(opt,neg,val,sizeof(val))</div><div class='del'>-#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen(val))</div><div class='del'>-</div><div class='del'>-#define REJCIVOID(opt, neg) \</div><div class='del'>-    if (neg &amp;&amp; p[0] == opt) { \</div><div class='del'>-	if ((len -= CILEN_VOID) &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_VOID || citype != opt) \</div><div class='del'>-	    break; \</div><div class='del'>-	neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-/* a reject for RIP/SAP is invalid since we don't send it and you can't</div><div class='del'>-   reject something which is not sent. (You can NAK, but you can't REJ.) */</div><div class='del'>-#define REJCIPROTO(opt, neg, val, bit) \</div><div class='del'>-    if (neg &amp;&amp; p[0] == opt) { \</div><div class='del'>-	if ((len -= CILEN_PROTOCOL) &lt; 0) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_PROTOCOL) \</div><div class='del'>-	    break; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != to_external (val) || cishort == RIP_SAP) \</div><div class='del'>-	    break; \</div><div class='del'>-	neg = 0; \</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Any Rejected CIs must be in exactly the same order that we sent.</div><div class='del'>- * Check packet length and CI length at each step.</div><div class='del'>- * If we find any deviations, then this packet is bad.</div><div class='del'>- */</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    do {</div><div class='del'>-	REJCINETWORK (IPX_NETWORK_NUMBER,  try.neg_nn,	   try.our_network);</div><div class='del'>-	REJCINODE    (IPX_NODE_NUMBER,	   try.neg_node,   try.our_node);</div><div class='del'>-	REJCINAME    (IPX_ROUTER_NAME,	   try.neg_name,   try.name);</div><div class='del'>-	REJCIPROTO   (IPX_ROUTER_PROTOCOL, try.neg_router, try.router, 0);</div><div class='del'>-/*</div><div class='del'>- * This is the end of the record.</div><div class='del'>- */</div><div class='del'>-	if (len == 0) {</div><div class='del'>-	    if (f-&gt;state != OPENED)</div><div class='del'>-		*go = try;</div><div class='del'>-	    return (1);</div><div class='del'>-	}</div><div class='del'>-    } while (0);</div><div class='del'>-/*</div><div class='del'>- * The frame is invalid at this point.</div><div class='del'>- */</div><div class='del'>-    IPXCPDEBUG(("ipxcp_rejci: received bad Reject!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_reqci - Check the peer's requested CIs and send appropriate response.</div><div class='del'>- *</div><div class='del'>- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified</div><div class='del'>- * appropriately.  If reject_if_disagree is non-zero, doesn't return</div><div class='del'>- * CONFNAK; returns CONFREJ if it can't return CONFACK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-ipxcp_reqci(f, inp, len, reject_if_disagree)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;		/* Requested CIs */</div><div class='del'>-    int *len;			/* Length of requested CIs */</div><div class='del'>-    int reject_if_disagree;</div><div class='del'>-{</div><div class='del'>-    u_char *cip, *next;		/* Pointer to current and next CIs */</div><div class='del'>-    u_short cilen, citype;	/* Parsed len, type */</div><div class='del'>-    u_short cishort;		/* Parsed short value */</div><div class='del'>-    u_int32_t cinetwork;	/* Parsed address values */</div><div class='del'>-    int rc = CONFACK;		/* Final packet return code */</div><div class='del'>-    int orc;			/* Individual option return code */</div><div class='del'>-    u_char *p;			/* Pointer to next char to parse */</div><div class='del'>-    u_char *ucp = inp;		/* Pointer to current output char */</div><div class='del'>-    int l = *len;		/* Length left */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Reset all his options.</div><div class='del'>-     */</div><div class='del'>-    BZERO(ho, sizeof(*ho));</div><div class='del'>-    </div><div class='del'>-    /*</div><div class='del'>-     * Process all his options.</div><div class='del'>-     */</div><div class='del'>-    next = inp;</div><div class='del'>-    while (l) {</div><div class='del'>-	orc = CONFACK;			/* Assume success */</div><div class='del'>-	cip = p = next;			/* Remember begining of CI */</div><div class='del'>-	if (l &lt; 2 ||			/* Not enough data for CI header or */</div><div class='del'>-	    p[1] &lt; 2 ||			/*  CI length too small or */</div><div class='del'>-	    p[1] &gt; l) {			/*  CI length too big? */</div><div class='del'>-	    IPXCPDEBUG(("ipxcp_reqci: bad CI length!"));</div><div class='del'>-	    orc = CONFREJ;		/* Reject bad CI */</div><div class='del'>-	    cilen = l;			/* Reject till end of packet */</div><div class='del'>-	    l = 0;			/* Don't loop again */</div><div class='del'>-	    goto endswitch;</div><div class='del'>-	}</div><div class='del'>-	GETCHAR(citype, p);		/* Parse CI type */</div><div class='del'>-	GETCHAR(cilen, p);		/* Parse CI length */</div><div class='del'>-	l -= cilen;			/* Adjust remaining length */</div><div class='del'>-	next += cilen;			/* Step to next CI */</div><div class='del'>-</div><div class='del'>-	switch (citype) {		/* Check CI type */</div><div class='del'>-/*</div><div class='del'>- * The network number must match. Choose the larger of the two.</div><div class='del'>- */</div><div class='del'>-	case IPX_NETWORK_NUMBER:</div><div class='del'>-	    /* if we wont negotiate the network number or the length is wrong</div><div class='del'>-	       then reject the option */</div><div class='del'>-	    if ( !ao-&gt;neg_nn || cilen != CILEN_NETN ) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;		</div><div class='del'>-	    }</div><div class='del'>-	    GETLONG(cinetwork, p);</div><div class='del'>-</div><div class='del'>-	    /* If the network numbers match then acknowledge them. */</div><div class='del'>-	    if (cinetwork != 0) {</div><div class='del'>-		ho-&gt;his_network = cinetwork;</div><div class='del'>-		ho-&gt;neg_nn	= 1;</div><div class='del'>-		if (wo-&gt;our_network == cinetwork)</div><div class='del'>-		    break;</div><div class='del'>-/*</div><div class='del'>- * If the network number is not given or we don't accept their change or</div><div class='del'>- * the network number is too small then NAK it.</div><div class='del'>- */</div><div class='del'>-		if (! ao-&gt;accept_network || cinetwork &lt; wo-&gt;our_network) {</div><div class='del'>-		    DECPTR (sizeof (u_int32_t), p);</div><div class='del'>-		    PUTLONG (wo-&gt;our_network, p);</div><div class='del'>-		    orc = CONFNAK;</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-/*</div><div class='del'>- * The peer sent '0' for the network. Give it ours if we have one.</div><div class='del'>- */</div><div class='del'>-	    if (go-&gt;our_network != 0) {</div><div class='del'>-		DECPTR (sizeof (u_int32_t), p);</div><div class='del'>-		PUTLONG (wo-&gt;our_network, p);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-/*</div><div class='del'>- * We don't have one. Reject the value.</div><div class='del'>- */</div><div class='del'>-	    } else</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * The node number is required</div><div class='del'>- */</div><div class='del'>-	case IPX_NODE_NUMBER:</div><div class='del'>-	    /* if we wont negotiate the node number or the length is wrong</div><div class='del'>-	       then reject the option */</div><div class='del'>-	    if ( cilen != CILEN_NODEN ) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    copy_node (p, ho-&gt;his_node);</div><div class='del'>-	    ho-&gt;neg_node = 1;</div><div class='del'>-/*</div><div class='del'>- * If the remote does not have a number and we do then NAK it with the value</div><div class='del'>- * which we have for it. (We never have a default value of zero.)</div><div class='del'>- */</div><div class='del'>-	    if (zero_node (ho-&gt;his_node)) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		copy_node (wo-&gt;his_node, p);</div><div class='del'>-		INCPTR (sizeof (wo-&gt;his_node), p);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-/*</div><div class='del'>- * If you have given me the expected network node number then I'll accept</div><div class='del'>- * it now.</div><div class='del'>- */</div><div class='del'>-	    if (compare_node (wo-&gt;his_node, ho-&gt;his_node)) {</div><div class='del'>-		orc = CONFACK;</div><div class='del'>-		ho-&gt;neg_node = 1;</div><div class='del'>-		INCPTR (sizeof (wo-&gt;his_node), p);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-/*</div><div class='del'>- * If his node number is the same as ours then ask him to try the next</div><div class='del'>- * value.</div><div class='del'>- */</div><div class='del'>-	    if (compare_node (ho-&gt;his_node, go-&gt;our_node)) {</div><div class='del'>-		inc_node (ho-&gt;his_node);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		copy_node (ho-&gt;his_node, p);</div><div class='del'>-		INCPTR (sizeof (wo-&gt;his_node), p);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-/*</div><div class='del'>- * If we don't accept a new value then NAK it.</div><div class='del'>- */</div><div class='del'>-	    if (! ao-&gt;accept_remote) {</div><div class='del'>-		copy_node (wo-&gt;his_node, p);</div><div class='del'>-		INCPTR (sizeof (wo-&gt;his_node), p);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    orc = CONFACK;</div><div class='del'>-	    ho-&gt;neg_node = 1;</div><div class='del'>-	    INCPTR (sizeof (wo-&gt;his_node), p);</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * Compression is not desired at this time. It is always rejected.</div><div class='del'>- */</div><div class='del'>-	case IPX_COMPRESSION_PROTOCOL:</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * The routing protocol is a bitmask of various types. Any combination</div><div class='del'>- * of the values RIP_SAP and NLSP are permissible. 'IPX_NONE' for no</div><div class='del'>- * routing protocol must be specified only once.</div><div class='del'>- */</div><div class='del'>-	case IPX_ROUTER_PROTOCOL:</div><div class='del'>-	    if ( !ao-&gt;neg_router || cilen &lt; CILEN_PROTOCOL ) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;		</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    GETSHORT (cishort, p);</div><div class='del'>-</div><div class='del'>-	    if (wo-&gt;neg_router == 0) {</div><div class='del'>-	        wo-&gt;neg_router = 1;</div><div class='del'>-		wo-&gt;router     = BIT(IPX_NONE);</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    if ((cishort == IPX_NONE &amp;&amp; ho-&gt;router != 0) ||</div><div class='del'>-		(ho-&gt;router &amp; BIT(IPX_NONE))) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    cishort = BIT(cishort);</div><div class='del'>-	    if (ho-&gt;router &amp; cishort) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    ho-&gt;router	  |= cishort;</div><div class='del'>-	    ho-&gt;neg_router = 1;</div><div class='del'>-</div><div class='del'>-	    /* Finally do not allow a router protocol which we do not</div><div class='del'>-	       support. */</div><div class='del'>-</div><div class='del'>-	    if ((cishort &amp; (ao-&gt;router | BIT(IPX_NONE))) == 0) {</div><div class='del'>-	        int protocol;</div><div class='del'>-</div><div class='del'>-		if (cishort == BIT(NLSP) &amp;&amp;</div><div class='del'>-		    (ao-&gt;router &amp; BIT(RIP_SAP)) &amp;&amp;</div><div class='del'>-		    !wo-&gt;tried_rip) {</div><div class='del'>-		    protocol      = RIP_SAP;</div><div class='del'>-		    wo-&gt;tried_rip = 1;</div><div class='del'>-		} else</div><div class='del'>-		    protocol = IPX_NONE;</div><div class='del'>-</div><div class='del'>-		DECPTR (sizeof (u_int16_t), p);</div><div class='del'>-		PUTSHORT (protocol, p);</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * The router name is advisorary. Just accept it if it is not too large.</div><div class='del'>- */</div><div class='del'>-	case IPX_ROUTER_NAME:</div><div class='del'>-	    if (cilen &gt;= CILEN_NAME) {</div><div class='del'>-		int name_size = cilen - CILEN_NAME;</div><div class='del'>-		if (name_size &gt; sizeof (ho-&gt;name))</div><div class='del'>-		    name_size = sizeof (ho-&gt;name) - 1;</div><div class='del'>-		memset (ho-&gt;name, 0, sizeof (ho-&gt;name));</div><div class='del'>-		memcpy (ho-&gt;name, p, name_size);</div><div class='del'>-		ho-&gt;name [name_size] = '\0';</div><div class='del'>-		ho-&gt;neg_name = 1;</div><div class='del'>-		orc = CONFACK;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * This is advisorary.</div><div class='del'>- */</div><div class='del'>-	case IPX_COMPLETE:</div><div class='del'>-	    if (cilen != CILEN_COMPLETE)</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-	    else {</div><div class='del'>-		ho-&gt;neg_complete = 1;</div><div class='del'>-		orc = CONFACK;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-/*</div><div class='del'>- * All other entries are not known at this time.</div><div class='del'>- */</div><div class='del'>-	default:</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-endswitch:</div><div class='del'>-	if (orc == CONFACK &amp;&amp;		/* Good CI */</div><div class='del'>-	    rc != CONFACK)		/*  but prior CI wasnt? */</div><div class='del'>-	    continue;			/* Don't send this one */</div><div class='del'>-</div><div class='del'>-	if (orc == CONFNAK) {		/* Nak this CI? */</div><div class='del'>-	    if (reject_if_disagree)	/* Getting fed up with sending NAKs? */</div><div class='del'>-		orc = CONFREJ;		/* Get tough if so */</div><div class='del'>-	    if (rc == CONFREJ)		/* Rejecting prior CI? */</div><div class='del'>-		continue;		/* Don't send this one */</div><div class='del'>-	    if (rc == CONFACK) {	/* Ack'd all prior CIs? */</div><div class='del'>-		rc  = CONFNAK;		/* Not anymore... */</div><div class='del'>-		ucp = inp;		/* Backup */</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (orc == CONFREJ &amp;&amp;		/* Reject this CI */</div><div class='del'>-	    rc != CONFREJ) {		/*  but no prior ones? */</div><div class='del'>-	    rc = CONFREJ;</div><div class='del'>-	    ucp = inp;			/* Backup */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Need to move CI? */</div><div class='del'>-	if (ucp != cip)</div><div class='del'>-	    BCOPY(cip, ucp, cilen);	/* Move it */</div><div class='del'>-</div><div class='del'>-	/* Update output pointer */</div><div class='del'>-	INCPTR(cilen, ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we aren't rejecting this packet, and we want to negotiate</div><div class='del'>-     * their address, and they didn't send their address, then we</div><div class='del'>-     * send a NAK with a IPX_NODE_NUMBER option appended. We assume the</div><div class='del'>-     * input buffer is long enough that we can append the extra</div><div class='del'>-     * option safely.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    if (rc != CONFREJ &amp;&amp; !ho-&gt;neg_node &amp;&amp;</div><div class='del'>-	wo-&gt;req_nn &amp;&amp; !reject_if_disagree) {</div><div class='del'>-	if (rc == CONFACK) {</div><div class='del'>-	    rc = CONFNAK;</div><div class='del'>-	    wo-&gt;req_nn = 0;		/* don't ask again */</div><div class='del'>-	    ucp = inp;			/* reset pointer */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (zero_node (wo-&gt;his_node))</div><div class='del'>-	    inc_node (wo-&gt;his_node);</div><div class='del'>-</div><div class='del'>-	PUTCHAR (IPX_NODE_NUMBER, ucp);</div><div class='del'>-	PUTCHAR (CILEN_NODEN, ucp);</div><div class='del'>-	copy_node (wo-&gt;his_node, ucp);</div><div class='del'>-	INCPTR (sizeof (wo-&gt;his_node), ucp);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    *len = ucp - inp;			/* Compute output length */</div><div class='del'>-    IPXCPDEBUG(("ipxcp: returning Configure-%s", CODENAME(rc)));</div><div class='del'>-    return (rc);			/* Return final code */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_up - IPXCP has come UP.</div><div class='del'>- *</div><div class='del'>- * Configure the IP network interface appropriately and bring it up.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ipxcp_up(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    int unit = f-&gt;unit;</div><div class='del'>-</div><div class='del'>-    IPXCPDEBUG(("ipxcp: up"));</div><div class='del'>-</div><div class='del'>-    /* The default router protocol is RIP/SAP. */</div><div class='del'>-    if (ho-&gt;router == 0)</div><div class='del'>-        ho-&gt;router = BIT(RIP_SAP);</div><div class='del'>-</div><div class='del'>-    if (go-&gt;router == 0)</div><div class='del'>-        go-&gt;router = BIT(RIP_SAP);</div><div class='del'>-</div><div class='del'>-    /* Fetch the network number */</div><div class='del'>-    if (!ho-&gt;neg_nn)</div><div class='del'>-	ho-&gt;his_network = wo-&gt;his_network;</div><div class='del'>-</div><div class='del'>-    if (!ho-&gt;neg_node)</div><div class='del'>-	copy_node (wo-&gt;his_node, ho-&gt;his_node);</div><div class='del'>-</div><div class='del'>-    if (!wo-&gt;neg_node &amp;&amp; !go-&gt;neg_node)</div><div class='del'>-	copy_node (wo-&gt;our_node, go-&gt;our_node);</div><div class='del'>-</div><div class='del'>-    if (zero_node (go-&gt;our_node)) {</div><div class='del'>-        static char errmsg[] = "Could not determine local IPX node address";</div><div class='del'>-	if (debug)</div><div class='del'>-	    error(errmsg);</div><div class='del'>-	ipxcp_close(f-&gt;unit, errmsg);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    go-&gt;network = go-&gt;our_network;</div><div class='del'>-    if (ho-&gt;his_network != 0 &amp;&amp; ho-&gt;his_network &gt; go-&gt;network)</div><div class='del'>-	go-&gt;network = ho-&gt;his_network;</div><div class='del'>-</div><div class='del'>-    if (go-&gt;network == 0) {</div><div class='del'>-        static char errmsg[] = "Can not determine network number";</div><div class='del'>-	if (debug)</div><div class='del'>-	    error(errmsg);</div><div class='del'>-	ipxcp_close (unit, errmsg);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* bring the interface up */</div><div class='del'>-    if (!sifup(unit)) {</div><div class='del'>-	if (debug)</div><div class='del'>-	    warn("sifup failed (IPX)");</div><div class='del'>-	ipxcp_close(unit, "Interface configuration failed");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    ipxcp_is_up = 1;</div><div class='del'>-</div><div class='del'>-    /* set the network number for IPX */</div><div class='del'>-    if (!sipxfaddr(unit, go-&gt;network, go-&gt;our_node)) {</div><div class='del'>-	if (debug)</div><div class='del'>-	    warn("sipxfaddr failed");</div><div class='del'>-	ipxcp_close(unit, "Interface configuration failed");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    np_up(f-&gt;unit, PPP_IPX);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Execute the ipx-up script, like this:</div><div class='del'>-     *	/etc/ppp/ipx-up interface tty speed local-IPX remote-IPX</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    ipxcp_script (f, _PATH_IPXUP);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_down - IPXCP has gone DOWN.</div><div class='del'>- *</div><div class='del'>- * Take the IP network interface down, clear its addresses</div><div class='del'>- * and delete routes through it.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-ipxcp_down(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    IPXCPDEBUG(("ipxcp: down"));</div><div class='del'>-</div><div class='del'>-    if (!ipxcp_is_up)</div><div class='del'>-	return;</div><div class='del'>-    ipxcp_is_up = 0;</div><div class='del'>-    np_down(f-&gt;unit, PPP_IPX);</div><div class='del'>-    cipxfaddr(f-&gt;unit);</div><div class='del'>-    sifnpmode(f-&gt;unit, PPP_IPX, NPMODE_DROP);</div><div class='del'>-    sifdown(f-&gt;unit);</div><div class='del'>-    ipxcp_script (f, _PATH_IPXDOWN);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_finished - possibly shut down the lower layers.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_finished(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    np_finished(f-&gt;unit, PPP_IPX);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_script - Execute a script with arguments</div><div class='del'>- * interface-name tty-name speed local-IPX remote-IPX networks.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-ipxcp_script(f, script)</div><div class='del'>-    fsm *f;</div><div class='del'>-    char *script;</div><div class='del'>-{</div><div class='del'>-    char strspeed[32],	 strlocal[32],	   strremote[32];</div><div class='del'>-    char strnetwork[32], strpid[32];</div><div class='del'>-    char *argv[14],	 strproto_lcl[32], strproto_rmt[32];</div><div class='del'>-</div><div class='del'>-    slprintf(strpid, sizeof(strpid), "%d", getpid());</div><div class='del'>-    slprintf(strspeed, sizeof(strspeed),"%d", baud_rate);</div><div class='del'>-</div><div class='del'>-    strproto_lcl[0] = '\0';</div><div class='del'>-    if (go-&gt;neg_router &amp;&amp; ((go-&gt;router &amp; BIT(IPX_NONE)) == 0)) {</div><div class='del'>-	if (go-&gt;router &amp; BIT(RIP_SAP))</div><div class='del'>-	    strlcpy (strproto_lcl, "RIP ", sizeof(strproto_lcl));</div><div class='del'>-	if (go-&gt;router &amp; BIT(NLSP))</div><div class='del'>-	    strlcat (strproto_lcl, "NLSP ", sizeof(strproto_lcl));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strproto_lcl[0] == '\0')</div><div class='del'>-	strlcpy (strproto_lcl, "NONE ", sizeof(strproto_lcl));</div><div class='del'>-</div><div class='del'>-    strproto_lcl[strlen (strproto_lcl)-1] = '\0';</div><div class='del'>-</div><div class='del'>-    strproto_rmt[0] = '\0';</div><div class='del'>-    if (ho-&gt;neg_router &amp;&amp; ((ho-&gt;router &amp; BIT(IPX_NONE)) == 0)) {</div><div class='del'>-	if (ho-&gt;router &amp; BIT(RIP_SAP))</div><div class='del'>-	    strlcpy (strproto_rmt, "RIP ", sizeof(strproto_rmt));</div><div class='del'>-	if (ho-&gt;router &amp; BIT(NLSP))</div><div class='del'>-	    strlcat (strproto_rmt, "NLSP ", sizeof(strproto_rmt));</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (strproto_rmt[0] == '\0')</div><div class='del'>-	strlcpy (strproto_rmt, "NONE ", sizeof(strproto_rmt));</div><div class='del'>-</div><div class='del'>-    strproto_rmt[strlen (strproto_rmt)-1] = '\0';</div><div class='del'>-</div><div class='del'>-    strlcpy (strnetwork, ipx_ntoa (go-&gt;network), sizeof(strnetwork));</div><div class='del'>-</div><div class='del'>-    slprintf (strlocal, sizeof(strlocal), "%0.6B", go-&gt;our_node);</div><div class='del'>-</div><div class='del'>-    slprintf (strremote, sizeof(strremote), "%0.6B", ho-&gt;his_node);</div><div class='del'>-</div><div class='del'>-    argv[0]  = script;</div><div class='del'>-    argv[1]  = ifname;</div><div class='del'>-    argv[2]  = devnam;</div><div class='del'>-    argv[3]  = strspeed;</div><div class='del'>-    argv[4]  = strnetwork;</div><div class='del'>-    argv[5]  = strlocal;</div><div class='del'>-    argv[6]  = strremote;</div><div class='del'>-    argv[7]  = strproto_lcl;</div><div class='del'>-    argv[8]  = strproto_rmt;</div><div class='del'>-    argv[9]  = go-&gt;name;</div><div class='del'>-    argv[10] = ho-&gt;name;</div><div class='del'>-    argv[11] = ipparam;</div><div class='del'>-    argv[12] = strpid;</div><div class='del'>-    argv[13] = NULL;</div><div class='del'>-    run_program(script, argv, 0, NULL, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ipxcp_printpkt - print the contents of an IPXCP packet.</div><div class='del'>- */</div><div class='del'>-static char *ipxcp_codenames[] = {</div><div class='del'>-    "ConfReq", "ConfAck", "ConfNak", "ConfRej",</div><div class='del'>-    "TermReq", "TermAck", "CodeRej"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ipxcp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, id, len, olen;</div><div class='del'>-    u_char *pstart, *optend;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    pstart = p;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(ipxcp_codenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", ipxcp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-    case CONFACK:</div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	/* print option list */</div><div class='del'>-	while (len &gt;= 2) {</div><div class='del'>-	    GETCHAR(code, p);</div><div class='del'>-	    GETCHAR(olen, p);</div><div class='del'>-	    p -= 2;</div><div class='del'>-	    if (olen &lt; CILEN_VOID || olen &gt; len) {</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= olen;</div><div class='del'>-	    optend = p + olen;</div><div class='del'>-	    switch (code) {</div><div class='del'>-	    case IPX_NETWORK_NUMBER:</div><div class='del'>-		if (olen == CILEN_NETN) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer (arg, "network %s", ipx_ntoa (cilong));</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case IPX_NODE_NUMBER:</div><div class='del'>-		if (olen == CILEN_NODEN) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer (arg, "node ");</div><div class='del'>-		    while (p &lt; optend) {</div><div class='del'>-			GETCHAR(code, p);</div><div class='del'>-			printer(arg, "%.2x", (int) (unsigned int) (unsigned char) code);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case IPX_COMPRESSION_PROTOCOL:</div><div class='del'>-		if (olen == CILEN_COMPRESS) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT (cishort, p);</div><div class='del'>-		    printer (arg, "compression %d", (int) cishort);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case IPX_ROUTER_PROTOCOL:</div><div class='del'>-		if (olen == CILEN_PROTOCOL) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT (cishort, p);</div><div class='del'>-		    printer (arg, "router proto %d", (int) cishort);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case IPX_ROUTER_NAME:</div><div class='del'>-		if (olen &gt;= CILEN_NAME) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer (arg, "router name \"");</div><div class='del'>-		    while (p &lt; optend) {</div><div class='del'>-			GETCHAR(code, p);</div><div class='del'>-			if (code &gt;= 0x20 &amp;&amp; code &lt;= 0x7E)</div><div class='del'>-			    printer (arg, "%c", (int) (unsigned int) (unsigned char) code);</div><div class='del'>-			else</div><div class='del'>-			    printer (arg, " \\%.2x", (int) (unsigned int) (unsigned char) code);</div><div class='del'>-		    }</div><div class='del'>-		    printer (arg, "\"");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case IPX_COMPLETE:</div><div class='del'>-		if (olen == CILEN_COMPLETE) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer (arg, "complete");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    default:</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    while (p &lt; optend) {</div><div class='del'>-		GETCHAR(code, p);</div><div class='del'>-		printer(arg, " %.2x", (int) (unsigned int) (unsigned char) code);</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case TERMACK:</div><div class='del'>-    case TERMREQ:</div><div class='del'>-	if (len &gt; 0 &amp;&amp; *p &gt;= ' ' &amp;&amp; *p &lt; 0x7f) {</div><div class='del'>-	    printer(arg, " ");</div><div class='del'>-	    print_string(p, len, printer, arg);</div><div class='del'>-	    p += len;</div><div class='del'>-	    len = 0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* print the rest of the bytes in the packet */</div><div class='del'>-    for (; len &gt; 0; --len) {</div><div class='del'>-	GETCHAR(code, p);</div><div class='del'>-	printer(arg, " %.2x", (int) (unsigned int) (unsigned char) code);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return p - pstart;</div><div class='del'>-}</div><div class='del'>-#endif /* ifdef IPX_CHANGE */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ipxcp.h b/mdk-stage1/ppp/pppd/ipxcp.h<br/>deleted file mode 100644<br/>index 47f680d70..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ipxcp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ipxcp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,71 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * ipxcp.h - IPX Control Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Options.</div><div class='del'>- */</div><div class='del'>-#define IPX_NETWORK_NUMBER        1   /* IPX Network Number */</div><div class='del'>-#define IPX_NODE_NUMBER           2</div><div class='del'>-#define IPX_COMPRESSION_PROTOCOL  3</div><div class='del'>-#define IPX_ROUTER_PROTOCOL       4</div><div class='del'>-#define IPX_ROUTER_NAME           5</div><div class='del'>-#define IPX_COMPLETE              6</div><div class='del'>-</div><div class='del'>-/* Values for the router protocol */</div><div class='del'>-#define IPX_NONE		  0</div><div class='del'>-#define RIP_SAP			  2</div><div class='del'>-#define NLSP			  4</div><div class='del'>-</div><div class='del'>-typedef struct ipxcp_options {</div><div class='del'>-    bool neg_node;		/* Negotiate IPX node number? */</div><div class='del'>-    bool req_node;		/* Ask peer to send IPX node number? */</div><div class='del'>-</div><div class='del'>-    bool neg_nn;		/* Negotiate IPX network number? */</div><div class='del'>-    bool req_nn;		/* Ask peer to send IPX network number */</div><div class='del'>-</div><div class='del'>-    bool neg_name;		/* Negotiate IPX router name */</div><div class='del'>-    bool neg_complete;		/* Negotiate completion */</div><div class='del'>-    bool neg_router;		/* Negotiate IPX router number */</div><div class='del'>-</div><div class='del'>-    bool accept_local;		/* accept peer's value for ournode */</div><div class='del'>-    bool accept_remote;		/* accept peer's value for hisnode */</div><div class='del'>-    bool accept_network;	/* accept network number */</div><div class='del'>-</div><div class='del'>-    bool tried_nlsp;		/* I have suggested NLSP already */</div><div class='del'>-    bool tried_rip;		/* I have suggested RIP/SAP already */</div><div class='del'>-</div><div class='del'>-    u_int32_t his_network;	/* base network number */</div><div class='del'>-    u_int32_t our_network;	/* our value for network number */</div><div class='del'>-    u_int32_t network;		/* the final network number */</div><div class='del'>-</div><div class='del'>-    u_char his_node[6];		/* peer's node number */</div><div class='del'>-    u_char our_node[6];		/* our node number */</div><div class='del'>-    u_char name [48];		/* name of the router */</div><div class='del'>-    int    router;		/* routing protocol */</div><div class='del'>-} ipxcp_options;</div><div class='del'>-</div><div class='del'>-extern fsm ipxcp_fsm[];</div><div class='del'>-extern ipxcp_options ipxcp_wantoptions[];</div><div class='del'>-extern ipxcp_options ipxcp_gotoptions[];</div><div class='del'>-extern ipxcp_options ipxcp_allowoptions[];</div><div class='del'>-extern ipxcp_options ipxcp_hisoptions[];</div><div class='del'>-</div><div class='del'>-extern struct protent ipxcp_protent;</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/lcp.c b/mdk-stage1/ppp/pppd/lcp.c<br/>deleted file mode 100644<br/>index 41c58cad5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/lcp.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/lcp.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2224 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * lcp.c - PPP Link Control Protocol.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#include "magic.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * When the link comes up we want to be able to wait for a short while,</div><div class='del'>- * or until seeing some input from the peer, before starting to send</div><div class='del'>- * configure-requests.  We do this by delaying the fsm_lowerup call.</div><div class='del'>- */</div><div class='del'>-/* steal a bit in fsm flags word */</div><div class='del'>-#define DELAYED_UP	0x100</div><div class='del'>-</div><div class='del'>-static void lcp_delayed_up __P((void *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LCP-related command-line options.</div><div class='del'>- */</div><div class='del'>-int	lcp_echo_interval = 0; 	/* Interval between LCP echo-requests */</div><div class='del'>-int	lcp_echo_fails = 0;	/* Tolerance to unanswered echo-requests */</div><div class='del'>-bool	lax_recv = 0;		/* accept control chars in asyncmap */</div><div class='del'>-bool	noendpoint = 0;		/* don't send/accept endpoint discriminator */</div><div class='del'>-</div><div class='del'>-static int noopt __P((char **));</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-static int setendpoint __P((char **));</div><div class='del'>-static void printendpoint __P((option_t *, void (*)(void *, char *, ...),</div><div class='del'>-			       void *));</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-</div><div class='del'>-static option_t lcp_option_list[] = {</div><div class='del'>-    /* LCP options */</div><div class='del'>-    { "-all", o_special_noarg, (void *)noopt,</div><div class='del'>-      "Don't request/allow any LCP options" },</div><div class='del'>-</div><div class='del'>-    { "noaccomp", o_bool, &amp;lcp_wantoptions[0].neg_accompression,</div><div class='del'>-      "Disable address/control compression",</div><div class='del'>-      OPT_A2CLR, &amp;lcp_allowoptions[0].neg_accompression },</div><div class='del'>-    { "-ac", o_bool, &amp;lcp_wantoptions[0].neg_accompression,</div><div class='del'>-      "Disable address/control compression",</div><div class='del'>-      OPT_ALIAS | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_accompression },</div><div class='del'>-</div><div class='del'>-    { "asyncmap", o_uint32, &amp;lcp_wantoptions[0].asyncmap,</div><div class='del'>-      "Set asyncmap (for received packets)",</div><div class='del'>-      OPT_OR, &amp;lcp_wantoptions[0].neg_asyncmap },</div><div class='del'>-    { "-as", o_uint32, &amp;lcp_wantoptions[0].asyncmap,</div><div class='del'>-      "Set asyncmap (for received packets)",</div><div class='del'>-      OPT_ALIAS | OPT_OR, &amp;lcp_wantoptions[0].neg_asyncmap },</div><div class='del'>-    { "default-asyncmap", o_uint32, &amp;lcp_wantoptions[0].asyncmap,</div><div class='del'>-      "Disable asyncmap negotiation",</div><div class='del'>-      OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR,</div><div class='del'>-      &amp;lcp_allowoptions[0].neg_asyncmap },</div><div class='del'>-    { "-am", o_uint32, &amp;lcp_wantoptions[0].asyncmap,</div><div class='del'>-      "Disable asyncmap negotiation",</div><div class='del'>-      OPT_ALIAS | OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR,</div><div class='del'>-      &amp;lcp_allowoptions[0].neg_asyncmap },</div><div class='del'>-</div><div class='del'>-    { "nomagic", o_bool, &amp;lcp_wantoptions[0].neg_magicnumber,</div><div class='del'>-      "Disable magic number negotiation (looped-back line detection)",</div><div class='del'>-      OPT_A2CLR, &amp;lcp_allowoptions[0].neg_magicnumber },</div><div class='del'>-    { "-mn", o_bool, &amp;lcp_wantoptions[0].neg_magicnumber,</div><div class='del'>-      "Disable magic number negotiation (looped-back line detection)",</div><div class='del'>-      OPT_ALIAS | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_magicnumber },</div><div class='del'>-</div><div class='del'>-    { "mru", o_int, &amp;lcp_wantoptions[0].mru,</div><div class='del'>-      "Set MRU (maximum received packet size) for negotiation",</div><div class='del'>-      OPT_PRIO, &amp;lcp_wantoptions[0].neg_mru },</div><div class='del'>-    { "default-mru", o_bool, &amp;lcp_wantoptions[0].neg_mru,</div><div class='del'>-      "Disable MRU negotiation (use default 1500)",</div><div class='del'>-      OPT_PRIOSUB | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_mru },</div><div class='del'>-    { "-mru", o_bool, &amp;lcp_wantoptions[0].neg_mru,</div><div class='del'>-      "Disable MRU negotiation (use default 1500)",</div><div class='del'>-      OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_mru },</div><div class='del'>-</div><div class='del'>-    { "mtu", o_int, &amp;lcp_allowoptions[0].mru,</div><div class='del'>-      "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU },</div><div class='del'>-</div><div class='del'>-    { "nopcomp", o_bool, &amp;lcp_wantoptions[0].neg_pcompression,</div><div class='del'>-      "Disable protocol field compression",</div><div class='del'>-      OPT_A2CLR, &amp;lcp_allowoptions[0].neg_pcompression },</div><div class='del'>-    { "-pc", o_bool, &amp;lcp_wantoptions[0].neg_pcompression,</div><div class='del'>-      "Disable protocol field compression",</div><div class='del'>-      OPT_ALIAS | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_pcompression },</div><div class='del'>-</div><div class='del'>-    { "passive", o_bool, &amp;lcp_wantoptions[0].passive,</div><div class='del'>-      "Set passive mode", 1 },</div><div class='del'>-    { "-p", o_bool, &amp;lcp_wantoptions[0].passive,</div><div class='del'>-      "Set passive mode", OPT_ALIAS | 1 },</div><div class='del'>-</div><div class='del'>-    { "silent", o_bool, &amp;lcp_wantoptions[0].silent,</div><div class='del'>-      "Set silent mode", 1 },</div><div class='del'>-</div><div class='del'>-    { "lcp-echo-failure", o_int, &amp;lcp_echo_fails,</div><div class='del'>-      "Set number of consecutive echo failures to indicate link failure",</div><div class='del'>-      OPT_PRIO },</div><div class='del'>-    { "lcp-echo-interval", o_int, &amp;lcp_echo_interval,</div><div class='del'>-      "Set time in seconds between LCP echo requests", OPT_PRIO },</div><div class='del'>-    { "lcp-restart", o_int, &amp;lcp_fsm[0].timeouttime,</div><div class='del'>-      "Set time in seconds between LCP retransmissions", OPT_PRIO },</div><div class='del'>-    { "lcp-max-terminate", o_int, &amp;lcp_fsm[0].maxtermtransmits,</div><div class='del'>-      "Set maximum number of LCP terminate-request transmissions", OPT_PRIO },</div><div class='del'>-    { "lcp-max-configure", o_int, &amp;lcp_fsm[0].maxconfreqtransmits,</div><div class='del'>-      "Set maximum number of LCP configure-request transmissions", OPT_PRIO },</div><div class='del'>-    { "lcp-max-failure", o_int, &amp;lcp_fsm[0].maxnakloops,</div><div class='del'>-      "Set limit on number of LCP configure-naks", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "receive-all", o_bool, &amp;lax_recv,</div><div class='del'>-      "Accept all received control characters", 1 },</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-    { "mrru", o_int, &amp;lcp_wantoptions[0].mrru,</div><div class='del'>-      "Maximum received packet size for multilink bundle",</div><div class='del'>-      OPT_PRIO, &amp;lcp_wantoptions[0].neg_mrru },</div><div class='del'>-</div><div class='del'>-    { "mpshortseq", o_bool, &amp;lcp_wantoptions[0].neg_ssnhf,</div><div class='del'>-      "Use short sequence numbers in multilink headers",</div><div class='del'>-      OPT_PRIO | 1, &amp;lcp_allowoptions[0].neg_ssnhf },</div><div class='del'>-    { "nompshortseq", o_bool, &amp;lcp_wantoptions[0].neg_ssnhf,</div><div class='del'>-      "Don't use short sequence numbers in multilink headers",</div><div class='del'>-      OPT_PRIOSUB | OPT_A2CLR, &amp;lcp_allowoptions[0].neg_ssnhf },</div><div class='del'>-</div><div class='del'>-    { "endpoint", o_special, (void *) setendpoint,</div><div class='del'>-      "Endpoint discriminator for multilink",</div><div class='del'>-      OPT_PRIO | OPT_A2PRINTER, (void *) printendpoint },</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-</div><div class='del'>-    { "noendpoint", o_bool, &amp;noendpoint,</div><div class='del'>-      "Don't send or accept multilink endpoint discriminator", 1 },</div><div class='del'>-</div><div class='del'>-    {NULL}</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* global vars */</div><div class='del'>-fsm lcp_fsm[NUM_PPP];			/* LCP fsm structure (global)*/</div><div class='del'>-lcp_options lcp_wantoptions[NUM_PPP];	/* Options that we want to request */</div><div class='del'>-lcp_options lcp_gotoptions[NUM_PPP];	/* Options that peer ack'd */</div><div class='del'>-lcp_options lcp_allowoptions[NUM_PPP];	/* Options we allow peer to request */</div><div class='del'>-lcp_options lcp_hisoptions[NUM_PPP];	/* Options that we ack'd */</div><div class='del'>-</div><div class='del'>-static int lcp_echos_pending = 0;	/* Number of outstanding echo msgs */</div><div class='del'>-static int lcp_echo_number   = 0;	/* ID number of next echo frame */</div><div class='del'>-static int lcp_echo_timer_running = 0;  /* set if a timer is running */</div><div class='del'>-</div><div class='del'>-static u_char nak_buffer[PPP_MRU];	/* where we construct a nak packet */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Callbacks for fsm code.  (CI = Configuration Information)</div><div class='del'>- */</div><div class='del'>-static void lcp_resetci __P((fsm *));	/* Reset our CI */</div><div class='del'>-static int  lcp_cilen __P((fsm *));		/* Return length of our CI */</div><div class='del'>-static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */</div><div class='del'>-static int  lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */</div><div class='del'>-static int  lcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */</div><div class='del'>-static int  lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */</div><div class='del'>-static int  lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */</div><div class='del'>-static void lcp_up __P((fsm *));		/* We're UP */</div><div class='del'>-static void lcp_down __P((fsm *));		/* We're DOWN */</div><div class='del'>-static void lcp_starting __P((fsm *));	/* We need lower layer up */</div><div class='del'>-static void lcp_finished __P((fsm *));	/* We need lower layer down */</div><div class='del'>-static int  lcp_extcode __P((fsm *, int, int, u_char *, int));</div><div class='del'>-static void lcp_rprotrej __P((fsm *, u_char *, int));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * routines to send LCP echos to peer</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void lcp_echo_lowerup __P((int));</div><div class='del'>-static void lcp_echo_lowerdown __P((int));</div><div class='del'>-static void LcpEchoTimeout __P((void *));</div><div class='del'>-static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));</div><div class='del'>-static void LcpSendEchoRequest __P((fsm *));</div><div class='del'>-static void LcpLinkFailure __P((fsm *));</div><div class='del'>-static void LcpEchoCheck __P((fsm *));</div><div class='del'>-</div><div class='del'>-static fsm_callbacks lcp_callbacks = {	/* LCP callback routines */</div><div class='del'>-    lcp_resetci,		/* Reset our Configuration Information */</div><div class='del'>-    lcp_cilen,			/* Length of our Configuration Information */</div><div class='del'>-    lcp_addci,			/* Add our Configuration Information */</div><div class='del'>-    lcp_ackci,			/* ACK our Configuration Information */</div><div class='del'>-    lcp_nakci,			/* NAK our Configuration Information */</div><div class='del'>-    lcp_rejci,			/* Reject our Configuration Information */</div><div class='del'>-    lcp_reqci,			/* Request peer's Configuration Information */</div><div class='del'>-    lcp_up,			/* Called when fsm reaches OPENED state */</div><div class='del'>-    lcp_down,			/* Called when fsm leaves OPENED state */</div><div class='del'>-    lcp_starting,		/* Called when we want the lower layer up */</div><div class='del'>-    lcp_finished,		/* Called when we want the lower layer down */</div><div class='del'>-    NULL,			/* Called when Protocol-Reject received */</div><div class='del'>-    NULL,			/* Retransmission is necessary */</div><div class='del'>-    lcp_extcode,		/* Called to handle LCP-specific codes */</div><div class='del'>-    "LCP"			/* String name of protocol */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Protocol entry points.</div><div class='del'>- * Some of these are called directly.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void lcp_init __P((int));</div><div class='del'>-static void lcp_input __P((int, u_char *, int));</div><div class='del'>-static void lcp_protrej __P((int));</div><div class='del'>-static int  lcp_printpkt __P((u_char *, int,</div><div class='del'>-			      void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-</div><div class='del'>-struct protent lcp_protent = {</div><div class='del'>-    PPP_LCP,</div><div class='del'>-    lcp_init,</div><div class='del'>-    lcp_input,</div><div class='del'>-    lcp_protrej,</div><div class='del'>-    lcp_lowerup,</div><div class='del'>-    lcp_lowerdown,</div><div class='del'>-    lcp_open,</div><div class='del'>-    lcp_close,</div><div class='del'>-    lcp_printpkt,</div><div class='del'>-    NULL,</div><div class='del'>-    1,</div><div class='del'>-    "LCP",</div><div class='del'>-    NULL,</div><div class='del'>-    lcp_option_list,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL,</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-int lcp_loopbackfail = DEFLOOPBACKFAIL;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Length of each type of configuration option (in octets)</div><div class='del'>- */</div><div class='del'>-#define CILEN_VOID	2</div><div class='del'>-#define CILEN_CHAR	3</div><div class='del'>-#define CILEN_SHORT	4	/* CILEN_VOID + 2 */</div><div class='del'>-#define CILEN_CHAP	5	/* CILEN_VOID + 2 + 1 */</div><div class='del'>-#define CILEN_LONG	6	/* CILEN_VOID + 4 */</div><div class='del'>-#define CILEN_LQR	8	/* CILEN_VOID + 2 + 4 */</div><div class='del'>-#define CILEN_CBCP	3</div><div class='del'>-</div><div class='del'>-#define CODENAME(x)	((x) == CONFACK ? "ACK" : \</div><div class='del'>-			 (x) == CONFNAK ? "NAK" : "REJ")</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * noopt - Disable all options (why?).</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-noopt(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    BZERO((char *) &amp;lcp_wantoptions[0], sizeof (struct lcp_options));</div><div class='del'>-    BZERO((char *) &amp;lcp_allowoptions[0], sizeof (struct lcp_options));</div><div class='del'>-</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-static int</div><div class='del'>-setendpoint(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    if (str_to_epdisc(&amp;lcp_wantoptions[0].endpoint, *argv)) {</div><div class='del'>-	lcp_wantoptions[0].neg_endpoint = 1;</div><div class='del'>-	return 1;</div><div class='del'>-    }</div><div class='del'>-    option_error("Can't parse '%s' as an endpoint discriminator", *argv);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-printendpoint(opt, printer, arg)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	printer(arg, "%s", epdisc_to_str(&amp;lcp_wantoptions[0].endpoint));</div><div class='del'>-}</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_init - Initialize LCP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_init(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[unit];</div><div class='del'>-    lcp_options *ao = &amp;lcp_allowoptions[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;unit = unit;</div><div class='del'>-    f-&gt;protocol = PPP_LCP;</div><div class='del'>-    f-&gt;callbacks = &amp;lcp_callbacks;</div><div class='del'>-</div><div class='del'>-    fsm_init(f);</div><div class='del'>-</div><div class='del'>-    BZERO(wo, sizeof(*wo));</div><div class='del'>-    wo-&gt;neg_mru = 1;</div><div class='del'>-    wo-&gt;mru = DEFMRU;</div><div class='del'>-    wo-&gt;neg_asyncmap = 1;</div><div class='del'>-    wo-&gt;chap_mdtype = CHAP_DIGEST_MD5;</div><div class='del'>-    wo-&gt;neg_magicnumber = 1;</div><div class='del'>-    wo-&gt;neg_pcompression = 1;</div><div class='del'>-    wo-&gt;neg_accompression = 1;</div><div class='del'>-</div><div class='del'>-    BZERO(ao, sizeof(*ao));</div><div class='del'>-    ao-&gt;neg_mru = 1;</div><div class='del'>-    ao-&gt;mru = MAXMRU;</div><div class='del'>-    ao-&gt;neg_asyncmap = 1;</div><div class='del'>-    ao-&gt;neg_chap = 1;</div><div class='del'>-    ao-&gt;chap_mdtype = CHAP_DIGEST_MD5;</div><div class='del'>-    ao-&gt;neg_upap = 1;</div><div class='del'>-    ao-&gt;neg_magicnumber = 1;</div><div class='del'>-    ao-&gt;neg_pcompression = 1;</div><div class='del'>-    ao-&gt;neg_accompression = 1;</div><div class='del'>-#ifdef CBCP_SUPPORT</div><div class='del'>-    ao-&gt;neg_cbcp = 1;</div><div class='del'>-#endif</div><div class='del'>-    ao-&gt;neg_endpoint = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_open - LCP is allowed to come up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-lcp_open(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[unit];</div><div class='del'>-</div><div class='del'>-    f-&gt;flags &amp;= ~(OPT_PASSIVE | OPT_SILENT);</div><div class='del'>-    if (wo-&gt;passive)</div><div class='del'>-	f-&gt;flags |= OPT_PASSIVE;</div><div class='del'>-    if (wo-&gt;silent)</div><div class='del'>-	f-&gt;flags |= OPT_SILENT;</div><div class='del'>-    fsm_open(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_close - Take LCP down.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-lcp_close(unit, reason)</div><div class='del'>-    int unit;</div><div class='del'>-    char *reason;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    if (phase != PHASE_DEAD)</div><div class='del'>-	new_phase(PHASE_TERMINATE);</div><div class='del'>-    if (f-&gt;state == STOPPED &amp;&amp; f-&gt;flags &amp; (OPT_PASSIVE|OPT_SILENT)) {</div><div class='del'>-	/*</div><div class='del'>-	 * This action is not strictly according to the FSM in RFC1548,</div><div class='del'>-	 * but it does mean that the program terminates if you do a</div><div class='del'>-	 * lcp_close() in passive/silent mode when a connection hasn't</div><div class='del'>-	 * been established.</div><div class='del'>-	 */</div><div class='del'>-	f-&gt;state = CLOSED;</div><div class='del'>-	lcp_finished(f);</div><div class='del'>-</div><div class='del'>-    } else</div><div class='del'>-	fsm_close(&amp;lcp_fsm[unit], reason);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_lowerup - The lower layer is up.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-lcp_lowerup(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[unit];</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Don't use A/C or protocol compression on transmission,</div><div class='del'>-     * but accept A/C and protocol compressed packets</div><div class='del'>-     * if we are going to ask for A/C and protocol compression.</div><div class='del'>-     */</div><div class='del'>-    ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0);</div><div class='del'>-    ppp_recv_config(unit, PPP_MRU, (lax_recv? 0: 0xffffffff),</div><div class='del'>-		    wo-&gt;neg_pcompression, wo-&gt;neg_accompression);</div><div class='del'>-    peer_mru[unit] = PPP_MRU;</div><div class='del'>-</div><div class='del'>-    if (listen_time != 0) {</div><div class='del'>-	f-&gt;flags |= DELAYED_UP;</div><div class='del'>-	timeout(lcp_delayed_up, f, 0, listen_time * 1000);</div><div class='del'>-    } else</div><div class='del'>-	fsm_lowerup(f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_lowerdown - The lower layer is down.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-lcp_lowerdown(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    if (f-&gt;flags &amp; DELAYED_UP)</div><div class='del'>-	f-&gt;flags &amp;= ~DELAYED_UP;</div><div class='del'>-    else</div><div class='del'>-	fsm_lowerdown(&amp;lcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_delayed_up - Bring the lower layer up now.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_delayed_up(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    fsm *f = arg;</div><div class='del'>-</div><div class='del'>-    if (f-&gt;flags &amp; DELAYED_UP) {</div><div class='del'>-	f-&gt;flags &amp;= ~DELAYED_UP;</div><div class='del'>-	fsm_lowerup(f);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_input - Input LCP packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_input(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    if (f-&gt;flags &amp; DELAYED_UP) {</div><div class='del'>-	f-&gt;flags &amp;= ~DELAYED_UP;</div><div class='del'>-	fsm_lowerup(f);</div><div class='del'>-    }</div><div class='del'>-    fsm_input(f, p, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_extcode - Handle a LCP-specific code.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_extcode(f, code, id, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int code, id;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_char *magp;</div><div class='del'>-</div><div class='del'>-    switch( code ){</div><div class='del'>-    case PROTREJ:</div><div class='del'>-	lcp_rprotrej(f, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case ECHOREQ:</div><div class='del'>-	if (f-&gt;state != OPENED)</div><div class='del'>-	    break;</div><div class='del'>-	magp = inp;</div><div class='del'>-	PUTLONG(lcp_gotoptions[f-&gt;unit].magicnumber, magp);</div><div class='del'>-	fsm_sdata(f, ECHOREP, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-    </div><div class='del'>-    case ECHOREP:</div><div class='del'>-	lcp_received_echo_reply(f, id, inp, len);</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case DISCREQ:</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-    </div><div class='del'>-/*</div><div class='del'>- * lcp_rprotrej - Receive an Protocol-Reject.</div><div class='del'>- *</div><div class='del'>- * Figure out which protocol is rejected and inform it.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_rprotrej(f, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-    u_short prot;</div><div class='del'>-</div><div class='del'>-    if (len &lt; 2) {</div><div class='del'>-	LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!"));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    GETSHORT(prot, inp);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Protocol-Reject packets received in any state other than the LCP</div><div class='del'>-     * OPENED state SHOULD be silently discarded.</div><div class='del'>-     */</div><div class='del'>-    if( f-&gt;state != OPENED ){</div><div class='del'>-	LCPDEBUG(("Protocol-Reject discarded: LCP in state %d", f-&gt;state));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Upcall the proper Protocol-Reject routine.</div><div class='del'>-     */</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;protocol == prot &amp;&amp; protp-&gt;enabled_flag) {</div><div class='del'>-	    (*protp-&gt;protrej)(f-&gt;unit);</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    warn("Protocol-Reject for unsupported protocol 0x%x", prot);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_protrej - A Protocol-Reject was received.</div><div class='del'>- */</div><div class='del'>-/*ARGSUSED*/</div><div class='del'>-static void</div><div class='del'>-lcp_protrej(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    /*</div><div class='del'>-     * Can't reject LCP!</div><div class='del'>-     */</div><div class='del'>-    error("Received Protocol-Reject for LCP!");</div><div class='del'>-    fsm_protreject(&amp;lcp_fsm[unit]);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_sprotrej - Send a Protocol-Reject for some protocol.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-lcp_sprotrej(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    /*</div><div class='del'>-     * Send back the protocol and the information field of the</div><div class='del'>-     * rejected packet.  We only get here if LCP is in the OPENED state.</div><div class='del'>-     */</div><div class='del'>-    p += 2;</div><div class='del'>-    len -= 2;</div><div class='del'>-</div><div class='del'>-    fsm_sdata(&amp;lcp_fsm[unit], PROTREJ, ++lcp_fsm[unit].id,</div><div class='del'>-	      p, len);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_resetci - Reset our CI.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_resetci(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *ao = &amp;lcp_allowoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    wo-&gt;magicnumber = magic();</div><div class='del'>-    wo-&gt;numloops = 0;</div><div class='del'>-    *go = *wo;</div><div class='del'>-    if (!multilink) {</div><div class='del'>-	go-&gt;neg_mrru = 0;</div><div class='del'>-	go-&gt;neg_ssnhf = 0;</div><div class='del'>-	go-&gt;neg_endpoint = 0;</div><div class='del'>-    }</div><div class='del'>-    if (noendpoint)</div><div class='del'>-	ao-&gt;neg_endpoint = 0;</div><div class='del'>-    peer_mru[f-&gt;unit] = PPP_MRU;</div><div class='del'>-    auth_reset(f-&gt;unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_cilen - Return length of our CI.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_cilen(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-#define LENCIVOID(neg)	((neg) ? CILEN_VOID : 0)</div><div class='del'>-#define LENCICHAP(neg)	((neg) ? CILEN_CHAP : 0)</div><div class='del'>-#define LENCISHORT(neg)	((neg) ? CILEN_SHORT : 0)</div><div class='del'>-#define LENCILONG(neg)	((neg) ? CILEN_LONG : 0)</div><div class='del'>-#define LENCILQR(neg)	((neg) ? CILEN_LQR: 0)</div><div class='del'>-#define LENCICBCP(neg)	((neg) ? CILEN_CBCP: 0)</div><div class='del'>-    /*</div><div class='del'>-     * NB: we only ask for one of CHAP and UPAP, even if we will</div><div class='del'>-     * accept either.</div><div class='del'>-     */</div><div class='del'>-    return (LENCISHORT(go-&gt;neg_mru &amp;&amp; go-&gt;mru != DEFMRU) +</div><div class='del'>-	    LENCILONG(go-&gt;neg_asyncmap &amp;&amp; go-&gt;asyncmap != 0xFFFFFFFF) +</div><div class='del'>-	    LENCICHAP(go-&gt;neg_chap) +</div><div class='del'>-	    LENCISHORT(!go-&gt;neg_chap &amp;&amp; go-&gt;neg_upap) +</div><div class='del'>-	    LENCILQR(go-&gt;neg_lqr) +</div><div class='del'>-	    LENCICBCP(go-&gt;neg_cbcp) +</div><div class='del'>-	    LENCILONG(go-&gt;neg_magicnumber) +</div><div class='del'>-	    LENCIVOID(go-&gt;neg_pcompression) +</div><div class='del'>-	    LENCIVOID(go-&gt;neg_accompression) +</div><div class='del'>-	    LENCISHORT(go-&gt;neg_mrru) +</div><div class='del'>-	    LENCIVOID(go-&gt;neg_ssnhf) +</div><div class='del'>-	    (go-&gt;neg_endpoint? CILEN_CHAR + go-&gt;endpoint.length: 0));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_addci - Add our desired CIs to a packet.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_addci(f, ucp, lenp)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *ucp;</div><div class='del'>-    int *lenp;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char *start_ucp = ucp;</div><div class='del'>-</div><div class='del'>-#define ADDCIVOID(opt, neg) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_VOID, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCISHORT(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_SHORT, ucp); \</div><div class='del'>-	PUTSHORT(val, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCICHAP(opt, neg, val, digest) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_CHAP, ucp); \</div><div class='del'>-	PUTSHORT(val, ucp); \</div><div class='del'>-	PUTCHAR(digest, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCILONG(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_LONG, ucp); \</div><div class='del'>-	PUTLONG(val, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCILQR(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_LQR, ucp); \</div><div class='del'>-	PUTSHORT(PPP_LQR, ucp); \</div><div class='del'>-	PUTLONG(val, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCICHAR(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_CHAR, ucp); \</div><div class='del'>-	PUTCHAR(val, ucp); \</div><div class='del'>-    }</div><div class='del'>-#define ADDCIENDP(opt, neg, class, val, len) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int i; \</div><div class='del'>-	PUTCHAR(opt, ucp); \</div><div class='del'>-	PUTCHAR(CILEN_CHAR + len, ucp); \</div><div class='del'>-	PUTCHAR(class, ucp); \</div><div class='del'>-	for (i = 0; i &lt; len; ++i) \</div><div class='del'>-	    PUTCHAR(val[i], ucp); \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ADDCISHORT(CI_MRU, go-&gt;neg_mru &amp;&amp; go-&gt;mru != DEFMRU, go-&gt;mru);</div><div class='del'>-    ADDCILONG(CI_ASYNCMAP, go-&gt;neg_asyncmap &amp;&amp; go-&gt;asyncmap != 0xFFFFFFFF,</div><div class='del'>-	      go-&gt;asyncmap);</div><div class='del'>-    ADDCICHAP(CI_AUTHTYPE, go-&gt;neg_chap, PPP_CHAP, go-&gt;chap_mdtype);</div><div class='del'>-    ADDCISHORT(CI_AUTHTYPE, !go-&gt;neg_chap &amp;&amp; go-&gt;neg_upap, PPP_PAP);</div><div class='del'>-    ADDCILQR(CI_QUALITY, go-&gt;neg_lqr, go-&gt;lqr_period);</div><div class='del'>-    ADDCICHAR(CI_CALLBACK, go-&gt;neg_cbcp, CBCP_OPT);</div><div class='del'>-    ADDCILONG(CI_MAGICNUMBER, go-&gt;neg_magicnumber, go-&gt;magicnumber);</div><div class='del'>-    ADDCIVOID(CI_PCOMPRESSION, go-&gt;neg_pcompression);</div><div class='del'>-    ADDCIVOID(CI_ACCOMPRESSION, go-&gt;neg_accompression);</div><div class='del'>-    ADDCISHORT(CI_MRRU, go-&gt;neg_mrru, go-&gt;mrru);</div><div class='del'>-    ADDCIVOID(CI_SSNHF, go-&gt;neg_ssnhf);</div><div class='del'>-    ADDCIENDP(CI_EPDISC, go-&gt;neg_endpoint, go-&gt;endpoint.class,</div><div class='del'>-	      go-&gt;endpoint.value, go-&gt;endpoint.length);</div><div class='del'>-</div><div class='del'>-    if (ucp - start_ucp != *lenp) {</div><div class='del'>-	/* this should never happen, because peer_mtu should be 1500 */</div><div class='del'>-	error("Bug in lcp_addci: wrong length");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_ackci - Ack our CIs.</div><div class='del'>- * This should not modify any state if the Ack is bad.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Ack was bad.</div><div class='del'>- *	1 - Ack was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_ackci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char cilen, citype, cichar;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define ACKCIVOID(opt, neg) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_VOID) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_VOID || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCISHORT(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_SHORT) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_SHORT || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCICHAR(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_CHAR) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_CHAR || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	if (cichar != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCICHAP(opt, neg, val, digest) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_CHAP) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_CHAP || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	if (cichar != digest) \</div><div class='del'>-	  goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCILONG(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_LONG) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_LONG || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	if (cilong != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCILQR(opt, neg, val) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	if ((len -= CILEN_LQR) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_LQR || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	if (cishort != PPP_LQR) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	if (cilong != val) \</div><div class='del'>-	  goto bad; \</div><div class='del'>-    }</div><div class='del'>-#define ACKCIENDP(opt, neg, class, val, vlen) \</div><div class='del'>-    if (neg) { \</div><div class='del'>-	int i; \</div><div class='del'>-	if ((len -= CILEN_CHAR + vlen) &lt; 0) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(citype, p); \</div><div class='del'>-	GETCHAR(cilen, p); \</div><div class='del'>-	if (cilen != CILEN_CHAR + vlen || \</div><div class='del'>-	    citype != opt) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	if (cichar != class) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	for (i = 0; i &lt; vlen; ++i) { \</div><div class='del'>-	    GETCHAR(cichar, p); \</div><div class='del'>-	    if (cichar != val[i]) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	} \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ACKCISHORT(CI_MRU, go-&gt;neg_mru &amp;&amp; go-&gt;mru != DEFMRU, go-&gt;mru);</div><div class='del'>-    ACKCILONG(CI_ASYNCMAP, go-&gt;neg_asyncmap &amp;&amp; go-&gt;asyncmap != 0xFFFFFFFF,</div><div class='del'>-	      go-&gt;asyncmap);</div><div class='del'>-    ACKCICHAP(CI_AUTHTYPE, go-&gt;neg_chap, PPP_CHAP, go-&gt;chap_mdtype);</div><div class='del'>-    ACKCISHORT(CI_AUTHTYPE, !go-&gt;neg_chap &amp;&amp; go-&gt;neg_upap, PPP_PAP);</div><div class='del'>-    ACKCILQR(CI_QUALITY, go-&gt;neg_lqr, go-&gt;lqr_period);</div><div class='del'>-    ACKCICHAR(CI_CALLBACK, go-&gt;neg_cbcp, CBCP_OPT);</div><div class='del'>-    ACKCILONG(CI_MAGICNUMBER, go-&gt;neg_magicnumber, go-&gt;magicnumber);</div><div class='del'>-    ACKCIVOID(CI_PCOMPRESSION, go-&gt;neg_pcompression);</div><div class='del'>-    ACKCIVOID(CI_ACCOMPRESSION, go-&gt;neg_accompression);</div><div class='del'>-    ACKCISHORT(CI_MRRU, go-&gt;neg_mrru, go-&gt;mrru);</div><div class='del'>-    ACKCIVOID(CI_SSNHF, go-&gt;neg_ssnhf);</div><div class='del'>-    ACKCIENDP(CI_EPDISC, go-&gt;neg_endpoint, go-&gt;endpoint.class,</div><div class='del'>-	      go-&gt;endpoint.value, go-&gt;endpoint.length);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    return (1);</div><div class='del'>-bad:</div><div class='del'>-    LCPDEBUG(("lcp_acki: received bad Ack!"));</div><div class='del'>-    return (0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_nakci - Peer has sent a NAK for some of our CIs.</div><div class='del'>- * This should not modify any state if the Nak is bad</div><div class='del'>- * or if LCP is in the OPENED state.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Nak was bad.</div><div class='del'>- *	1 - Nak was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_nakci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[f-&gt;unit];</div><div class='del'>-    u_char citype, cichar, *next;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-    lcp_options no;		/* options we've seen Naks for */</div><div class='del'>-    lcp_options try;		/* options to request next time */</div><div class='del'>-    int looped_back = 0;</div><div class='del'>-    int cilen;</div><div class='del'>-</div><div class='del'>-    BZERO(&amp;no, sizeof(no));</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Any Nak'd CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define NAKCIVOID(opt, neg) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_VOID &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_VOID &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_VOID; \</div><div class='del'>-	INCPTR(CILEN_VOID, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define NAKCICHAP(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CHAP &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_CHAP &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_CHAP; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-#define NAKCICHAR(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CHAR &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_CHAR &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_CHAR; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-#define NAKCISHORT(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_SHORT &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_SHORT &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_SHORT; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-#define NAKCILONG(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_LONG &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_LONG &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_LONG; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-#define NAKCILQR(opt, neg, code) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_LQR &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_LQR &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_LQR; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	code \</div><div class='del'>-    }</div><div class='del'>-#define NAKCIENDP(opt, neg) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CHAR &amp;&amp; \</div><div class='del'>-	p[0] == opt &amp;&amp; \</div><div class='del'>-	p[1] &gt;= CILEN_CHAR &amp;&amp; \</div><div class='del'>-	p[1] &lt;= len) { \</div><div class='del'>-	len -= p[1]; \</div><div class='del'>-	INCPTR(p[1], p); \</div><div class='del'>-	no.neg = 1; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We don't care if they want to send us smaller packets than</div><div class='del'>-     * we want.  Therefore, accept any MRU less than what we asked for,</div><div class='del'>-     * but then ignore the new value when setting the MRU in the kernel.</div><div class='del'>-     * If they send us a bigger MRU than what we asked, accept it, up to</div><div class='del'>-     * the limit of the default MRU we'd get if we didn't negotiate.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;neg_mru &amp;&amp; go-&gt;mru != DEFMRU) {</div><div class='del'>-	NAKCISHORT(CI_MRU, neg_mru,</div><div class='del'>-		   if (cishort &lt;= wo-&gt;mru || cishort &lt;= DEFMRU)</div><div class='del'>-		       try.mru = cishort;</div><div class='del'>-		   );</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Add any characters they want to our (receive-side) asyncmap.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;neg_asyncmap &amp;&amp; go-&gt;asyncmap != 0xFFFFFFFF) {</div><div class='del'>-	NAKCILONG(CI_ASYNCMAP, neg_asyncmap,</div><div class='del'>-		  try.asyncmap = go-&gt;asyncmap | cilong;</div><div class='del'>-		  );</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If they've nak'd our authentication-protocol, check whether</div><div class='del'>-     * they are proposing a different protocol, or a different</div><div class='del'>-     * hash algorithm for CHAP.</div><div class='del'>-     */</div><div class='del'>-    if ((go-&gt;neg_chap || go-&gt;neg_upap)</div><div class='del'>-	&amp;&amp; len &gt;= CILEN_SHORT</div><div class='del'>-	&amp;&amp; p[0] == CI_AUTHTYPE &amp;&amp; p[1] &gt;= CILEN_SHORT &amp;&amp; p[1] &lt;= len) {</div><div class='del'>-	cilen = p[1];</div><div class='del'>-	len -= cilen;</div><div class='del'>-	no.neg_chap = go-&gt;neg_chap;</div><div class='del'>-	no.neg_upap = go-&gt;neg_upap;</div><div class='del'>-	INCPTR(2, p);</div><div class='del'>-        GETSHORT(cishort, p);</div><div class='del'>-	if (cishort == PPP_PAP &amp;&amp; cilen == CILEN_SHORT) {</div><div class='del'>-	    /*</div><div class='del'>-	     * If we were asking for CHAP, they obviously don't want to do it.</div><div class='del'>-	     * If we weren't asking for CHAP, then we were asking for PAP,</div><div class='del'>-	     * in which case this Nak is bad.</div><div class='del'>-	     */</div><div class='del'>-	    if (!go-&gt;neg_chap)</div><div class='del'>-		goto bad;</div><div class='del'>-	    try.neg_chap = 0;</div><div class='del'>-</div><div class='del'>-	} else if (cishort == PPP_CHAP &amp;&amp; cilen == CILEN_CHAP) {</div><div class='del'>-	    GETCHAR(cichar, p);</div><div class='del'>-	    if (go-&gt;neg_chap) {</div><div class='del'>-		/*</div><div class='del'>-		 * We were asking for CHAP/MD5; they must want a different</div><div class='del'>-		 * algorithm.  If they can't do MD5, we can ask for M$-CHAP</div><div class='del'>-		 * if we support it, otherwise we'll have to stop</div><div class='del'>-		 * asking for CHAP.</div><div class='del'>-		 */</div><div class='del'>-		if (cichar != go-&gt;chap_mdtype) {</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-		    if (cichar == CHAP_MICROSOFT)</div><div class='del'>-			go-&gt;chap_mdtype = CHAP_MICROSOFT;</div><div class='del'>-		    else</div><div class='del'>-#endif /* CHAPMS */</div><div class='del'>-			try.neg_chap = 0;</div><div class='del'>-		}</div><div class='del'>-	    } else {</div><div class='del'>-		/*</div><div class='del'>-		 * Stop asking for PAP if we were asking for it.</div><div class='del'>-		 */</div><div class='del'>-		try.neg_upap = 0;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	} else {</div><div class='del'>-	    /*</div><div class='del'>-	     * We don't recognize what they're suggesting.</div><div class='del'>-	     * Stop asking for what we were asking for.</div><div class='del'>-	     */</div><div class='del'>-	    if (go-&gt;neg_chap)</div><div class='del'>-		try.neg_chap = 0;</div><div class='del'>-	    else</div><div class='del'>-		try.neg_upap = 0;</div><div class='del'>-	    p += cilen - CILEN_SHORT;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If they can't cope with our link quality protocol, we'll have</div><div class='del'>-     * to stop asking for LQR.  We haven't got any other protocol.</div><div class='del'>-     * If they Nak the reporting period, take their value XXX ?</div><div class='del'>-     */</div><div class='del'>-    NAKCILQR(CI_QUALITY, neg_lqr,</div><div class='del'>-	     if (cishort != PPP_LQR)</div><div class='del'>-		 try.neg_lqr = 0;</div><div class='del'>-	     else</div><div class='del'>-		 try.lqr_period = cilong;</div><div class='del'>-	     );</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Only implementing CBCP...not the rest of the callback options</div><div class='del'>-     */</div><div class='del'>-    NAKCICHAR(CI_CALLBACK, neg_cbcp,</div><div class='del'>-              try.neg_cbcp = 0;</div><div class='del'>-              );</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check for a looped-back line.</div><div class='del'>-     */</div><div class='del'>-    NAKCILONG(CI_MAGICNUMBER, neg_magicnumber,</div><div class='del'>-	      try.magicnumber = magic();</div><div class='del'>-	      looped_back = 1;</div><div class='del'>-	      );</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Peer shouldn't send Nak for protocol compression or</div><div class='del'>-     * address/control compression requests; they should send</div><div class='del'>-     * a Reject instead.  If they send a Nak, treat it as a Reject.</div><div class='del'>-     */</div><div class='del'>-    NAKCIVOID(CI_PCOMPRESSION, neg_pcompression);</div><div class='del'>-    NAKCIVOID(CI_ACCOMPRESSION, neg_accompression);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Nak for MRRU option - accept their value if it is smaller</div><div class='del'>-     * than the one we want.</div><div class='del'>-     */</div><div class='del'>-    if (go-&gt;neg_mrru) {</div><div class='del'>-	NAKCISHORT(CI_MRRU, neg_mrru,</div><div class='del'>-		   if (cishort &lt;= wo-&gt;mrru)</div><div class='del'>-		       try.mrru = cishort;</div><div class='del'>-		   );</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Nak for short sequence numbers shouldn't be sent, treat it</div><div class='del'>-     * like a reject.</div><div class='del'>-     */</div><div class='del'>-    NAKCIVOID(CI_SSNHF, neg_ssnhf);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Nak of the endpoint discriminator option is not permitted,</div><div class='del'>-     * treat it like a reject.</div><div class='del'>-     */</div><div class='del'>-    NAKCIENDP(CI_EPDISC, neg_endpoint);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * There may be remaining CIs, if the peer is requesting negotiation</div><div class='del'>-     * on an option that we didn't include in our request packet.</div><div class='del'>-     * If we see an option that we requested, or one we've already seen</div><div class='del'>-     * in this packet, then this packet is bad.</div><div class='del'>-     * If we wanted to respond by starting to negotiate on the requested</div><div class='del'>-     * option(s), we could, but we don't, because except for the</div><div class='del'>-     * authentication type and quality protocol, if we are not negotiating</div><div class='del'>-     * an option, it is because we were told not to.</div><div class='del'>-     * For the authentication type, the Nak from the peer means</div><div class='del'>-     * `let me authenticate myself with you' which is a bit pointless.</div><div class='del'>-     * For the quality protocol, the Nak means `ask me to send you quality</div><div class='del'>-     * reports', but if we didn't ask for them, we don't want them.</div><div class='del'>-     * An option we don't recognize represents the peer asking to</div><div class='del'>-     * negotiate some option we don't support, so ignore it.</div><div class='del'>-     */</div><div class='del'>-    while (len &gt; CILEN_VOID) {</div><div class='del'>-	GETCHAR(citype, p);</div><div class='del'>-	GETCHAR(cilen, p);</div><div class='del'>-	if (cilen &lt; CILEN_VOID || (len -= cilen) &lt; 0)</div><div class='del'>-	    goto bad;</div><div class='del'>-	next = p + cilen - 2;</div><div class='del'>-</div><div class='del'>-	switch (citype) {</div><div class='del'>-	case CI_MRU:</div><div class='del'>-	    if ((go-&gt;neg_mru &amp;&amp; go-&gt;mru != DEFMRU)</div><div class='del'>-		|| no.neg_mru || cilen != CILEN_SHORT)</div><div class='del'>-		goto bad;</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-	    if (cishort &lt; DEFMRU) {</div><div class='del'>-		try.neg_mru = 1;</div><div class='del'>-		try.mru = cishort;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-	case CI_ASYNCMAP:</div><div class='del'>-	    if ((go-&gt;neg_asyncmap &amp;&amp; go-&gt;asyncmap != 0xFFFFFFFF)</div><div class='del'>-		|| no.neg_asyncmap || cilen != CILEN_LONG)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_AUTHTYPE:</div><div class='del'>-	    if (go-&gt;neg_chap || no.neg_chap || go-&gt;neg_upap || no.neg_upap)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_MAGICNUMBER:</div><div class='del'>-	    if (go-&gt;neg_magicnumber || no.neg_magicnumber ||</div><div class='del'>-		cilen != CILEN_LONG)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_PCOMPRESSION:</div><div class='del'>-	    if (go-&gt;neg_pcompression || no.neg_pcompression</div><div class='del'>-		|| cilen != CILEN_VOID)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_ACCOMPRESSION:</div><div class='del'>-	    if (go-&gt;neg_accompression || no.neg_accompression</div><div class='del'>-		|| cilen != CILEN_VOID)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_QUALITY:</div><div class='del'>-	    if (go-&gt;neg_lqr || no.neg_lqr || cilen != CILEN_LQR)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_MRRU:</div><div class='del'>-	    if (go-&gt;neg_mrru || no.neg_mrru || cilen != CILEN_SHORT)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_SSNHF:</div><div class='del'>-	    if (go-&gt;neg_ssnhf || no.neg_ssnhf || cilen != CILEN_VOID)</div><div class='del'>-		goto bad;</div><div class='del'>-	    try.neg_ssnhf = 1;</div><div class='del'>-	    break;</div><div class='del'>-	case CI_EPDISC:</div><div class='del'>-	    if (go-&gt;neg_endpoint || no.neg_endpoint || cilen &lt; CILEN_CHAR)</div><div class='del'>-		goto bad;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	p = next;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * OK, the Nak is good.  Now we can update state.</div><div class='del'>-     * If there are any options left we ignore them.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED) {</div><div class='del'>-	if (looped_back) {</div><div class='del'>-	    if (++try.numloops &gt;= lcp_loopbackfail) {</div><div class='del'>-		notice("Serial line is looped back.");</div><div class='del'>-		lcp_close(f-&gt;unit, "Loopback detected");</div><div class='del'>-		status = EXIT_LOOPBACK;</div><div class='del'>-	    }</div><div class='del'>-	} else</div><div class='del'>-	    try.numloops = 0;</div><div class='del'>-	*go = try;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    LCPDEBUG(("lcp_nakci: received bad Nak!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_rejci - Peer has Rejected some of our CIs.</div><div class='del'>- * This should not modify any state if the Reject is bad</div><div class='del'>- * or if LCP is in the OPENED state.</div><div class='del'>- *</div><div class='del'>- * Returns:</div><div class='del'>- *	0 - Reject was bad.</div><div class='del'>- *	1 - Reject was good.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_rejci(f, p, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    u_char cichar;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-    lcp_options try;		/* options to request next time */</div><div class='del'>-</div><div class='del'>-    try = *go;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Any Rejected CIs must be in exactly the same order that we sent.</div><div class='del'>-     * Check packet length and CI length at each step.</div><div class='del'>-     * If we find any deviations, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-#define REJCIVOID(opt, neg) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_VOID &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_VOID &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_VOID; \</div><div class='del'>-	INCPTR(CILEN_VOID, p); \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCISHORT(opt, neg, val) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_SHORT &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_SHORT &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_SHORT; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cishort != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCICHAP(opt, neg, val, digest) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CHAP &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_CHAP &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_CHAP; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cishort != val || cichar != digest) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-	try.neg_upap = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCILONG(opt, neg, val) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_LONG &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_LONG &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_LONG; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cilong != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCILQR(opt, neg, val) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_LQR &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_LQR &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_LQR; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETSHORT(cishort, p); \</div><div class='del'>-	GETLONG(cilong, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cishort != PPP_LQR || cilong != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCICBCP(opt, neg, val) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CBCP &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_CBCP &amp;&amp; \</div><div class='del'>-	p[0] == opt) { \</div><div class='del'>-	len -= CILEN_CBCP; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	/* Check rejected value. */ \</div><div class='del'>-	if (cichar != val) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-#define REJCIENDP(opt, neg, class, val, vlen) \</div><div class='del'>-    if (go-&gt;neg &amp;&amp; \</div><div class='del'>-	len &gt;= CILEN_CHAR + vlen &amp;&amp; \</div><div class='del'>-	p[0] == opt &amp;&amp; \</div><div class='del'>-	p[1] == CILEN_CHAR + vlen) { \</div><div class='del'>-	int i; \</div><div class='del'>-	len -= CILEN_CHAR + vlen; \</div><div class='del'>-	INCPTR(2, p); \</div><div class='del'>-	GETCHAR(cichar, p); \</div><div class='del'>-	if (cichar != class) \</div><div class='del'>-	    goto bad; \</div><div class='del'>-	for (i = 0; i &lt; vlen; ++i) { \</div><div class='del'>-	    GETCHAR(cichar, p); \</div><div class='del'>-	    if (cichar != val[i]) \</div><div class='del'>-		goto bad; \</div><div class='del'>-	} \</div><div class='del'>-	try.neg = 0; \</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    REJCISHORT(CI_MRU, neg_mru, go-&gt;mru);</div><div class='del'>-    REJCILONG(CI_ASYNCMAP, neg_asyncmap, go-&gt;asyncmap);</div><div class='del'>-    REJCICHAP(CI_AUTHTYPE, neg_chap, PPP_CHAP, go-&gt;chap_mdtype);</div><div class='del'>-    if (!go-&gt;neg_chap) {</div><div class='del'>-	REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP);</div><div class='del'>-    }</div><div class='del'>-    REJCILQR(CI_QUALITY, neg_lqr, go-&gt;lqr_period);</div><div class='del'>-    REJCICBCP(CI_CALLBACK, neg_cbcp, CBCP_OPT);</div><div class='del'>-    REJCILONG(CI_MAGICNUMBER, neg_magicnumber, go-&gt;magicnumber);</div><div class='del'>-    REJCIVOID(CI_PCOMPRESSION, neg_pcompression);</div><div class='del'>-    REJCIVOID(CI_ACCOMPRESSION, neg_accompression);</div><div class='del'>-    REJCISHORT(CI_MRRU, neg_mrru, go-&gt;mrru);</div><div class='del'>-    REJCIVOID(CI_SSNHF, neg_ssnhf);</div><div class='del'>-    REJCIENDP(CI_EPDISC, neg_endpoint, go-&gt;endpoint.class,</div><div class='del'>-	      go-&gt;endpoint.value, go-&gt;endpoint.length);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If there are any remaining CIs, then this packet is bad.</div><div class='del'>-     */</div><div class='del'>-    if (len != 0)</div><div class='del'>-	goto bad;</div><div class='del'>-    /*</div><div class='del'>-     * Now we can update state.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	*go = try;</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-bad:</div><div class='del'>-    LCPDEBUG(("lcp_rejci: received bad Reject!"));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_reqci - Check the peer's requested CIs and send appropriate response.</div><div class='del'>- *</div><div class='del'>- * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified</div><div class='del'>- * appropriately.  If reject_if_disagree is non-zero, doesn't return</div><div class='del'>- * CONFNAK; returns CONFREJ if it can't return CONFACK.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-lcp_reqci(f, inp, lenp, reject_if_disagree)</div><div class='del'>-    fsm *f;</div><div class='del'>-    u_char *inp;		/* Requested CIs */</div><div class='del'>-    int *lenp;			/* Length of requested CIs */</div><div class='del'>-    int reject_if_disagree;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *ho = &amp;lcp_hisoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *ao = &amp;lcp_allowoptions[f-&gt;unit];</div><div class='del'>-    u_char *cip, *next;		/* Pointer to current and next CIs */</div><div class='del'>-    int cilen, citype, cichar;	/* Parsed len, type, char value */</div><div class='del'>-    u_short cishort;		/* Parsed short value */</div><div class='del'>-    u_int32_t cilong;		/* Parse long value */</div><div class='del'>-    int rc = CONFACK;		/* Final packet return code */</div><div class='del'>-    int orc;			/* Individual option return code */</div><div class='del'>-    u_char *p;			/* Pointer to next char to parse */</div><div class='del'>-    u_char *rejp;		/* Pointer to next char in reject frame */</div><div class='del'>-    u_char *nakp;		/* Pointer to next char in Nak frame */</div><div class='del'>-    int l = *lenp;		/* Length left */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Reset all his options.</div><div class='del'>-     */</div><div class='del'>-    BZERO(ho, sizeof(*ho));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Process all his options.</div><div class='del'>-     */</div><div class='del'>-    next = inp;</div><div class='del'>-    nakp = nak_buffer;</div><div class='del'>-    rejp = inp;</div><div class='del'>-    while (l) {</div><div class='del'>-	orc = CONFACK;			/* Assume success */</div><div class='del'>-	cip = p = next;			/* Remember begining of CI */</div><div class='del'>-	if (l &lt; 2 ||			/* Not enough data for CI header or */</div><div class='del'>-	    p[1] &lt; 2 ||			/*  CI length too small or */</div><div class='del'>-	    p[1] &gt; l) {			/*  CI length too big? */</div><div class='del'>-	    LCPDEBUG(("lcp_reqci: bad CI length!"));</div><div class='del'>-	    orc = CONFREJ;		/* Reject bad CI */</div><div class='del'>-	    cilen = l;			/* Reject till end of packet */</div><div class='del'>-	    l = 0;			/* Don't loop again */</div><div class='del'>-	    citype = 0;</div><div class='del'>-	    goto endswitch;</div><div class='del'>-	}</div><div class='del'>-	GETCHAR(citype, p);		/* Parse CI type */</div><div class='del'>-	GETCHAR(cilen, p);		/* Parse CI length */</div><div class='del'>-	l -= cilen;			/* Adjust remaining length */</div><div class='del'>-	next += cilen;			/* Step to next CI */</div><div class='del'>-</div><div class='del'>-	switch (citype) {		/* Check CI type */</div><div class='del'>-	case CI_MRU:</div><div class='del'>-	    if (!ao-&gt;neg_mru ||		/* Allow option? */</div><div class='del'>-		cilen != CILEN_SHORT) {	/* Check CI length */</div><div class='del'>-		orc = CONFREJ;		/* Reject CI */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETSHORT(cishort, p);	/* Parse MRU */</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * He must be able to receive at least our minimum.</div><div class='del'>-	     * No need to check a maximum.  If he sends a large number,</div><div class='del'>-	     * we'll just ignore it.</div><div class='del'>-	     */</div><div class='del'>-	    if (cishort &lt; MINMRU) {</div><div class='del'>-		orc = CONFNAK;		/* Nak CI */</div><div class='del'>-		PUTCHAR(CI_MRU, nakp);</div><div class='del'>-		PUTCHAR(CILEN_SHORT, nakp);</div><div class='del'>-		PUTSHORT(MINMRU, nakp);	/* Give him a hint */</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_mru = 1;		/* Remember he sent MRU */</div><div class='del'>-	    ho-&gt;mru = cishort;		/* And remember value */</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_ASYNCMAP:</div><div class='del'>-	    if (!ao-&gt;neg_asyncmap ||</div><div class='del'>-		cilen != CILEN_LONG) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETLONG(cilong, p);</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Asyncmap must have set at least the bits</div><div class='del'>-	     * which are set in lcp_allowoptions[unit].asyncmap.</div><div class='del'>-	     */</div><div class='del'>-	    if ((ao-&gt;asyncmap &amp; ~cilong) != 0) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		PUTCHAR(CI_ASYNCMAP, nakp);</div><div class='del'>-		PUTCHAR(CILEN_LONG, nakp);</div><div class='del'>-		PUTLONG(ao-&gt;asyncmap | cilong, nakp);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_asyncmap = 1;</div><div class='del'>-	    ho-&gt;asyncmap = cilong;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_AUTHTYPE:</div><div class='del'>-	    if (cilen &lt; CILEN_SHORT ||</div><div class='del'>-		!(ao-&gt;neg_upap || ao-&gt;neg_chap)) {</div><div class='del'>-		/*</div><div class='del'>-		 * Reject the option if we're not willing to authenticate.</div><div class='del'>-		 */</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Authtype must be PAP or CHAP.</div><div class='del'>-	     *</div><div class='del'>-	     * Note: if both ao-&gt;neg_upap and ao-&gt;neg_chap are set,</div><div class='del'>-	     * and the peer sends a Configure-Request with two</div><div class='del'>-	     * authenticate-protocol requests, one for CHAP and one</div><div class='del'>-	     * for UPAP, then we will reject the second request.</div><div class='del'>-	     * Whether we end up doing CHAP or UPAP depends then on</div><div class='del'>-	     * the ordering of the CIs in the peer's Configure-Request.</div><div class='del'>-	     */</div><div class='del'>-</div><div class='del'>-	    if (cishort == PPP_PAP) {</div><div class='del'>-		if (ho-&gt;neg_chap ||	/* we've already accepted CHAP */</div><div class='del'>-		    cilen != CILEN_SHORT) {</div><div class='del'>-		    LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE PAP, rejecting..."));</div><div class='del'>-		    orc = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		if (!ao-&gt;neg_upap) {	/* we don't want to do PAP */</div><div class='del'>-		    orc = CONFNAK;	/* NAK it and suggest CHAP */</div><div class='del'>-		    PUTCHAR(CI_AUTHTYPE, nakp);</div><div class='del'>-		    PUTCHAR(CILEN_CHAP, nakp);</div><div class='del'>-		    PUTSHORT(PPP_CHAP, nakp);</div><div class='del'>-		    PUTCHAR(ao-&gt;chap_mdtype, nakp);</div><div class='del'>-		    /* XXX if we can do CHAP_MICROSOFT as well, we should</div><div class='del'>-		       probably put in another option saying so */</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		ho-&gt;neg_upap = 1;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    if (cishort == PPP_CHAP) {</div><div class='del'>-		if (ho-&gt;neg_upap ||	/* we've already accepted PAP */</div><div class='del'>-		    cilen != CILEN_CHAP) {</div><div class='del'>-		    LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE CHAP, rejecting..."));</div><div class='del'>-		    orc = CONFREJ;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		if (!ao-&gt;neg_chap) {	/* we don't want to do CHAP */</div><div class='del'>-		    orc = CONFNAK;	/* NAK it and suggest PAP */</div><div class='del'>-		    PUTCHAR(CI_AUTHTYPE, nakp);</div><div class='del'>-		    PUTCHAR(CILEN_SHORT, nakp);</div><div class='del'>-		    PUTSHORT(PPP_PAP, nakp);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		GETCHAR(cichar, p);	/* get digest type*/</div><div class='del'>-		if (cichar != CHAP_DIGEST_MD5</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-		    &amp;&amp; cichar != CHAP_MICROSOFT</div><div class='del'>-#endif</div><div class='del'>-		    ) {</div><div class='del'>-		    orc = CONFNAK;</div><div class='del'>-		    PUTCHAR(CI_AUTHTYPE, nakp);</div><div class='del'>-		    PUTCHAR(CILEN_CHAP, nakp);</div><div class='del'>-		    PUTSHORT(PPP_CHAP, nakp);</div><div class='del'>-		    PUTCHAR(ao-&gt;chap_mdtype, nakp);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		ho-&gt;chap_mdtype = cichar; /* save md type */</div><div class='del'>-		ho-&gt;neg_chap = 1;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * We don't recognize the protocol they're asking for.</div><div class='del'>-	     * Nak it with something we're willing to do.</div><div class='del'>-	     * (At this point we know ao-&gt;neg_upap || ao-&gt;neg_chap.)</div><div class='del'>-	     */</div><div class='del'>-	    orc = CONFNAK;</div><div class='del'>-	    PUTCHAR(CI_AUTHTYPE, nakp);</div><div class='del'>-	    if (ao-&gt;neg_chap) {</div><div class='del'>-		PUTCHAR(CILEN_CHAP, nakp);</div><div class='del'>-		PUTSHORT(PPP_CHAP, nakp);</div><div class='del'>-		PUTCHAR(ao-&gt;chap_mdtype, nakp);</div><div class='del'>-	    } else {</div><div class='del'>-		PUTCHAR(CILEN_SHORT, nakp);</div><div class='del'>-		PUTSHORT(PPP_PAP, nakp);</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_QUALITY:</div><div class='del'>-	    if (!ao-&gt;neg_lqr ||</div><div class='del'>-		cilen != CILEN_LQR) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-	    GETLONG(cilong, p);</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Check the protocol and the reporting period.</div><div class='del'>-	     * XXX When should we Nak this, and what with?</div><div class='del'>-	     */</div><div class='del'>-	    if (cishort != PPP_LQR) {</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		PUTCHAR(CI_QUALITY, nakp);</div><div class='del'>-		PUTCHAR(CILEN_LQR, nakp);</div><div class='del'>-		PUTSHORT(PPP_LQR, nakp);</div><div class='del'>-		PUTLONG(ao-&gt;lqr_period, nakp);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_MAGICNUMBER:</div><div class='del'>-	    if (!(ao-&gt;neg_magicnumber || go-&gt;neg_magicnumber) ||</div><div class='del'>-		cilen != CILEN_LONG) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETLONG(cilong, p);</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * He must have a different magic number.</div><div class='del'>-	     */</div><div class='del'>-	    if (go-&gt;neg_magicnumber &amp;&amp;</div><div class='del'>-		cilong == go-&gt;magicnumber) {</div><div class='del'>-		cilong = magic();	/* Don't put magic() inside macro! */</div><div class='del'>-		orc = CONFNAK;</div><div class='del'>-		PUTCHAR(CI_MAGICNUMBER, nakp);</div><div class='del'>-		PUTCHAR(CILEN_LONG, nakp);</div><div class='del'>-		PUTLONG(cilong, nakp);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_magicnumber = 1;</div><div class='del'>-	    ho-&gt;magicnumber = cilong;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-	case CI_PCOMPRESSION:</div><div class='del'>-	    if (!ao-&gt;neg_pcompression ||</div><div class='del'>-		cilen != CILEN_VOID) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_pcompression = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_ACCOMPRESSION:</div><div class='del'>-	    if (!ao-&gt;neg_accompression ||</div><div class='del'>-		cilen != CILEN_VOID) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_accompression = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_MRRU:</div><div class='del'>-	    if (!ao-&gt;neg_mrru || !multilink ||</div><div class='del'>-		cilen != CILEN_SHORT) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    GETSHORT(cishort, p);</div><div class='del'>-	    /* possibly should insist on a minimum/maximum MRRU here */</div><div class='del'>-	    ho-&gt;neg_mrru = 1;</div><div class='del'>-	    ho-&gt;mrru = cishort;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_SSNHF:</div><div class='del'>-	    if (!ao-&gt;neg_ssnhf || !multilink ||</div><div class='del'>-		cilen != CILEN_VOID) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    ho-&gt;neg_ssnhf = 1;</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	case CI_EPDISC:</div><div class='del'>-	    if (!ao-&gt;neg_endpoint ||</div><div class='del'>-		cilen &lt; CILEN_CHAR ||</div><div class='del'>-		cilen &gt; CILEN_CHAR + MAX_ENDP_LEN) {</div><div class='del'>-		orc = CONFREJ;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    GETCHAR(cichar, p);</div><div class='del'>-	    cilen -= CILEN_CHAR;</div><div class='del'>-	    ho-&gt;neg_endpoint = 1;</div><div class='del'>-	    ho-&gt;endpoint.class = cichar;</div><div class='del'>-	    ho-&gt;endpoint.length = cilen;</div><div class='del'>-	    BCOPY(p, ho-&gt;endpoint.value, cilen);</div><div class='del'>-	    INCPTR(cilen, p);</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-	    LCPDEBUG(("lcp_reqci: rcvd unknown option %d", citype));</div><div class='del'>-	    orc = CONFREJ;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-endswitch:</div><div class='del'>-	if (orc == CONFACK &amp;&amp;		/* Good CI */</div><div class='del'>-	    rc != CONFACK)		/*  but prior CI wasnt? */</div><div class='del'>-	    continue;			/* Don't send this one */</div><div class='del'>-</div><div class='del'>-	if (orc == CONFNAK) {		/* Nak this CI? */</div><div class='del'>-	    if (reject_if_disagree	/* Getting fed up with sending NAKs? */</div><div class='del'>-		&amp;&amp; citype != CI_MAGICNUMBER) {</div><div class='del'>-		orc = CONFREJ;		/* Get tough if so */</div><div class='del'>-	    } else {</div><div class='del'>-		if (rc == CONFREJ)	/* Rejecting prior CI? */</div><div class='del'>-		    continue;		/* Don't send this one */</div><div class='del'>-		rc = CONFNAK;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (orc == CONFREJ) {		/* Reject this CI */</div><div class='del'>-	    rc = CONFREJ;</div><div class='del'>-	    if (cip != rejp)		/* Need to move rejected CI? */</div><div class='del'>-		BCOPY(cip, rejp, cilen); /* Move it */</div><div class='del'>-	    INCPTR(cilen, rejp);	/* Update output pointer */</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we wanted to send additional NAKs (for unsent CIs), the</div><div class='del'>-     * code would go here.  The extra NAKs would go at *nakp.</div><div class='del'>-     * At present there are no cases where we want to ask the</div><div class='del'>-     * peer to negotiate an option.</div><div class='del'>-     */</div><div class='del'>-</div><div class='del'>-    switch (rc) {</div><div class='del'>-    case CONFACK:</div><div class='del'>-	*lenp = next - inp;</div><div class='del'>-	break;</div><div class='del'>-    case CONFNAK:</div><div class='del'>-	/*</div><div class='del'>-	 * Copy the Nak'd options from the nak_buffer to the caller's buffer.</div><div class='del'>-	 */</div><div class='del'>-	*lenp = nakp - nak_buffer;</div><div class='del'>-	BCOPY(nak_buffer, inp, *lenp);</div><div class='del'>-	break;</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	*lenp = rejp - inp;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    LCPDEBUG(("lcp_reqci: returning CONF%s.", CODENAME(rc)));</div><div class='del'>-    return (rc);			/* Return final code */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_up - LCP has come UP.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_up(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    lcp_options *wo = &amp;lcp_wantoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *ho = &amp;lcp_hisoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-    lcp_options *ao = &amp;lcp_allowoptions[f-&gt;unit];</div><div class='del'>-    int mtu;</div><div class='del'>-</div><div class='del'>-    if (!go-&gt;neg_magicnumber)</div><div class='del'>-	go-&gt;magicnumber = 0;</div><div class='del'>-    if (!ho-&gt;neg_magicnumber)</div><div class='del'>-	ho-&gt;magicnumber = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Set our MTU to the smaller of the MTU we wanted and</div><div class='del'>-     * the MRU our peer wanted.  If we negotiated an MRU,</div><div class='del'>-     * set our MRU to the larger of value we wanted and</div><div class='del'>-     * the value we got in the negotiation.</div><div class='del'>-     * Note on the MTU: the link MTU can be the MRU the peer wanted,</div><div class='del'>-     * the interface MTU is set to the lower of that and the</div><div class='del'>-     * MTU we want to use.</div><div class='del'>-     */</div><div class='del'>-    mtu = ho-&gt;neg_mru? ho-&gt;mru: PPP_MRU;</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-    if (!(multilink &amp;&amp; go-&gt;neg_mrru &amp;&amp; ho-&gt;neg_mrru))</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-	netif_set_mtu(f-&gt;unit, MIN(mtu, ao-&gt;mru));</div><div class='del'>-    ppp_send_config(f-&gt;unit, mtu,</div><div class='del'>-		    (ho-&gt;neg_asyncmap? ho-&gt;asyncmap: 0xffffffff),</div><div class='del'>-		    ho-&gt;neg_pcompression, ho-&gt;neg_accompression);</div><div class='del'>-    ppp_recv_config(f-&gt;unit, (go-&gt;neg_mru? MAX(wo-&gt;mru, go-&gt;mru): PPP_MRU),</div><div class='del'>-		    (lax_recv? 0: go-&gt;neg_asyncmap? go-&gt;asyncmap: 0xffffffff),</div><div class='del'>-		    go-&gt;neg_pcompression, go-&gt;neg_accompression);</div><div class='del'>-</div><div class='del'>-    if (ho-&gt;neg_mru)</div><div class='del'>-	peer_mru[f-&gt;unit] = ho-&gt;mru;</div><div class='del'>-</div><div class='del'>-    lcp_echo_lowerup(f-&gt;unit);  /* Enable echo messages */</div><div class='del'>-</div><div class='del'>-    link_established(f-&gt;unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_down - LCP has gone DOWN.</div><div class='del'>- *</div><div class='del'>- * Alert other protocols.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_down(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    lcp_options *go = &amp;lcp_gotoptions[f-&gt;unit];</div><div class='del'>-</div><div class='del'>-    lcp_echo_lowerdown(f-&gt;unit);</div><div class='del'>-</div><div class='del'>-    link_down(f-&gt;unit);</div><div class='del'>-</div><div class='del'>-    ppp_send_config(f-&gt;unit, PPP_MRU, 0xffffffff, 0, 0);</div><div class='del'>-    ppp_recv_config(f-&gt;unit, PPP_MRU,</div><div class='del'>-		    (go-&gt;neg_asyncmap? go-&gt;asyncmap: 0xffffffff),</div><div class='del'>-		    go-&gt;neg_pcompression, go-&gt;neg_accompression);</div><div class='del'>-    peer_mru[f-&gt;unit] = PPP_MRU;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_starting - LCP needs the lower layer up.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_starting(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    link_required(f-&gt;unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_finished - LCP has finished with the lower layer.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-lcp_finished(f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    link_terminated(f-&gt;unit);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_printpkt - print the contents of an LCP packet.</div><div class='del'>- */</div><div class='del'>-static char *lcp_codenames[] = {</div><div class='del'>-    "ConfReq", "ConfAck", "ConfNak", "ConfRej",</div><div class='del'>-    "TermReq", "TermAck", "CodeRej", "ProtRej",</div><div class='del'>-    "EchoReq", "EchoRep", "DiscReq"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-lcp_printpkt(p, plen, printer, arg)</div><div class='del'>-    u_char *p;</div><div class='del'>-    int plen;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int code, id, len, olen, i;</div><div class='del'>-    u_char *pstart, *optend;</div><div class='del'>-    u_short cishort;</div><div class='del'>-    u_int32_t cilong;</div><div class='del'>-</div><div class='del'>-    if (plen &lt; HEADERLEN)</div><div class='del'>-	return 0;</div><div class='del'>-    pstart = p;</div><div class='del'>-    GETCHAR(code, p);</div><div class='del'>-    GETCHAR(id, p);</div><div class='del'>-    GETSHORT(len, p);</div><div class='del'>-    if (len &lt; HEADERLEN || len &gt; plen)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (code &gt;= 1 &amp;&amp; code &lt;= sizeof(lcp_codenames) / sizeof(char *))</div><div class='del'>-	printer(arg, " %s", lcp_codenames[code-1]);</div><div class='del'>-    else</div><div class='del'>-	printer(arg, " code=0x%x", code);</div><div class='del'>-    printer(arg, " id=0x%x", id);</div><div class='del'>-    len -= HEADERLEN;</div><div class='del'>-    switch (code) {</div><div class='del'>-    case CONFREQ:</div><div class='del'>-    case CONFACK:</div><div class='del'>-    case CONFNAK:</div><div class='del'>-    case CONFREJ:</div><div class='del'>-	/* print option list */</div><div class='del'>-	while (len &gt;= 2) {</div><div class='del'>-	    GETCHAR(code, p);</div><div class='del'>-	    GETCHAR(olen, p);</div><div class='del'>-	    p -= 2;</div><div class='del'>-	    if (olen &lt; 2 || olen &gt; len) {</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, " &lt;");</div><div class='del'>-	    len -= olen;</div><div class='del'>-	    optend = p + olen;</div><div class='del'>-	    switch (code) {</div><div class='del'>-	    case CI_MRU:</div><div class='del'>-		if (olen == CILEN_SHORT) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    printer(arg, "mru %d", cishort);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_ASYNCMAP:</div><div class='del'>-		if (olen == CILEN_LONG) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer(arg, "asyncmap 0x%x", cilong);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_AUTHTYPE:</div><div class='del'>-		if (olen &gt;= CILEN_SHORT) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "auth ");</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    switch (cishort) {</div><div class='del'>-		    case PPP_PAP:</div><div class='del'>-			printer(arg, "pap");</div><div class='del'>-			break;</div><div class='del'>-		    case PPP_CHAP:</div><div class='del'>-			printer(arg, "chap");</div><div class='del'>-			if (p &lt; optend) {</div><div class='del'>-			    switch (*p) {</div><div class='del'>-			    case CHAP_DIGEST_MD5:</div><div class='del'>-				printer(arg, " MD5");</div><div class='del'>-				++p;</div><div class='del'>-				break;</div><div class='del'>-#ifdef CHAPMS</div><div class='del'>-			    case CHAP_MICROSOFT:</div><div class='del'>-				printer(arg, " m$oft");</div><div class='del'>-				++p;</div><div class='del'>-				break;</div><div class='del'>-#endif</div><div class='del'>-			    }</div><div class='del'>-			}</div><div class='del'>-			break;</div><div class='del'>-		    default:</div><div class='del'>-			printer(arg, "0x%x", cishort);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_QUALITY:</div><div class='del'>-		if (olen &gt;= CILEN_SHORT) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "quality ");</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    switch (cishort) {</div><div class='del'>-		    case PPP_LQR:</div><div class='del'>-			printer(arg, "lqr");</div><div class='del'>-			break;</div><div class='del'>-		    default:</div><div class='del'>-			printer(arg, "0x%x", cishort);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_CALLBACK:</div><div class='del'>-		if (olen &gt;= CILEN_CHAR) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "callback ");</div><div class='del'>-		    GETCHAR(cishort, p);</div><div class='del'>-		    switch (cishort) {</div><div class='del'>-		    case CBCP_OPT:</div><div class='del'>-			printer(arg, "CBCP");</div><div class='del'>-			break;</div><div class='del'>-		    default:</div><div class='del'>-			printer(arg, "0x%x", cishort);</div><div class='del'>-		    }</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_MAGICNUMBER:</div><div class='del'>-		if (olen == CILEN_LONG) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETLONG(cilong, p);</div><div class='del'>-		    printer(arg, "magic 0x%x", cilong);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_PCOMPRESSION:</div><div class='del'>-		if (olen == CILEN_VOID) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "pcomp");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_ACCOMPRESSION:</div><div class='del'>-		if (olen == CILEN_VOID) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "accomp");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_MRRU:</div><div class='del'>-		if (olen == CILEN_SHORT) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETSHORT(cishort, p);</div><div class='del'>-		    printer(arg, "mrru %d", cishort);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_SSNHF:</div><div class='del'>-		if (olen == CILEN_VOID) {</div><div class='del'>-		    p += 2;</div><div class='del'>-		    printer(arg, "ssnhf");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	    case CI_EPDISC:</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-		if (olen &gt;= CILEN_CHAR) {</div><div class='del'>-		    struct epdisc epd;</div><div class='del'>-		    p += 2;</div><div class='del'>-		    GETCHAR(epd.class, p);</div><div class='del'>-		    epd.length = olen - CILEN_CHAR;</div><div class='del'>-		    if (epd.length &gt; MAX_ENDP_LEN)</div><div class='del'>-			epd.length = MAX_ENDP_LEN;</div><div class='del'>-		    if (epd.length &gt; 0) {</div><div class='del'>-			BCOPY(p, epd.value, epd.length);</div><div class='del'>-			p += epd.length;</div><div class='del'>-		    }</div><div class='del'>-		    printer(arg, "endpoint [%s]", epdisc_to_str(&amp;epd));</div><div class='del'>-		}</div><div class='del'>-#else</div><div class='del'>-		printer(arg, "endpoint");</div><div class='del'>-#endif</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    while (p &lt; optend) {</div><div class='del'>-		GETCHAR(code, p);</div><div class='del'>-		printer(arg, " %.2x", code);</div><div class='del'>-	    }</div><div class='del'>-	    printer(arg, "&gt;");</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case TERMACK:</div><div class='del'>-    case TERMREQ:</div><div class='del'>-	if (len &gt; 0 &amp;&amp; *p &gt;= ' ' &amp;&amp; *p &lt; 0x7f) {</div><div class='del'>-	    printer(arg, " ");</div><div class='del'>-	    print_string((char *)p, len, printer, arg);</div><div class='del'>-	    p += len;</div><div class='del'>-	    len = 0;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case ECHOREQ:</div><div class='del'>-    case ECHOREP:</div><div class='del'>-    case DISCREQ:</div><div class='del'>-	if (len &gt;= 4) {</div><div class='del'>-	    GETLONG(cilong, p);</div><div class='del'>-	    printer(arg, " magic=0x%x", cilong);</div><div class='del'>-	    p += 4;</div><div class='del'>-	    len -= 4;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* print the rest of the bytes in the packet */</div><div class='del'>-    for (i = 0; i &lt; len &amp;&amp; i &lt; 32; ++i) {</div><div class='del'>-	GETCHAR(code, p);</div><div class='del'>-	printer(arg, " %.2x", code);</div><div class='del'>-    }</div><div class='del'>-    if (i &lt; len) {</div><div class='del'>-	printer(arg, " ...");</div><div class='del'>-	p += len - i;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return p - pstart;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Time to shut down the link because there is nothing out there.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static</div><div class='del'>-void LcpLinkFailure (f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    if (f-&gt;state == OPENED) {</div><div class='del'>-	info("No response to %d echo-requests", lcp_echos_pending);</div><div class='del'>-        notice("Serial link appears to be disconnected.");</div><div class='del'>-        lcp_close(f-&gt;unit, "Peer not responding");</div><div class='del'>-	status = EXIT_PEER_DEAD;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Timer expired for the LCP echo requests from this process.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-LcpEchoCheck (f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    LcpSendEchoRequest (f);</div><div class='del'>-    if (f-&gt;state != OPENED)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Start the timer for the next interval.</div><div class='del'>-     */</div><div class='del'>-    if (lcp_echo_timer_running)</div><div class='del'>-	warn("assertion lcp_echo_timer_running==0 failed");</div><div class='del'>-    TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);</div><div class='del'>-    lcp_echo_timer_running = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LcpEchoTimeout - Timer expired on the LCP echo</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-LcpEchoTimeout (arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    if (lcp_echo_timer_running != 0) {</div><div class='del'>-        lcp_echo_timer_running = 0;</div><div class='del'>-        LcpEchoCheck ((fsm *) arg);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LcpEchoReply - LCP has received a reply to the echo</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-lcp_received_echo_reply (f, id, inp, len)</div><div class='del'>-    fsm *f;</div><div class='del'>-    int id;</div><div class='del'>-    u_char *inp;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    u_int32_t magic;</div><div class='del'>-</div><div class='del'>-    /* Check the magic number - don't count replies from ourselves. */</div><div class='del'>-    if (len &lt; 4) {</div><div class='del'>-	dbglog("lcp: received short Echo-Reply, length %d", len);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    GETLONG(magic, inp);</div><div class='del'>-    if (lcp_gotoptions[f-&gt;unit].neg_magicnumber</div><div class='del'>-	&amp;&amp; magic == lcp_gotoptions[f-&gt;unit].magicnumber) {</div><div class='del'>-	warn("appear to have received our own echo-reply!");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Reset the number of outstanding echo frames */</div><div class='del'>-    lcp_echos_pending = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LcpSendEchoRequest - Send an echo request frame to the peer</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-LcpSendEchoRequest (f)</div><div class='del'>-    fsm *f;</div><div class='del'>-{</div><div class='del'>-    u_int32_t lcp_magic;</div><div class='del'>-    u_char pkt[4], *pktp;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Detect the failure of the peer at this point.</div><div class='del'>-     */</div><div class='del'>-    if (lcp_echo_fails != 0) {</div><div class='del'>-        if (lcp_echos_pending &gt;= lcp_echo_fails) {</div><div class='del'>-            LcpLinkFailure(f);</div><div class='del'>-	    lcp_echos_pending = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Make and send the echo request frame.</div><div class='del'>-     */</div><div class='del'>-    if (f-&gt;state == OPENED) {</div><div class='del'>-        lcp_magic = lcp_gotoptions[f-&gt;unit].magicnumber;</div><div class='del'>-	pktp = pkt;</div><div class='del'>-	PUTLONG(lcp_magic, pktp);</div><div class='del'>-        fsm_sdata(f, ECHOREQ, lcp_echo_number++ &amp; 0xFF, pkt, pktp - pkt);</div><div class='del'>-	++lcp_echos_pending;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_echo_lowerup - Start the timer for the LCP frame</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-lcp_echo_lowerup (unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    /* Clear the parameters for generating echo frames */</div><div class='del'>-    lcp_echos_pending      = 0;</div><div class='del'>-    lcp_echo_number        = 0;</div><div class='del'>-    lcp_echo_timer_running = 0;</div><div class='del'>-  </div><div class='del'>-    /* If a timeout interval is specified then start the timer */</div><div class='del'>-    if (lcp_echo_interval != 0)</div><div class='del'>-        LcpEchoCheck (f);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * lcp_echo_lowerdown - Stop the timer for the LCP frame</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-lcp_echo_lowerdown (unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    fsm *f = &amp;lcp_fsm[unit];</div><div class='del'>-</div><div class='del'>-    if (lcp_echo_timer_running != 0) {</div><div class='del'>-        UNTIMEOUT (LcpEchoTimeout, f);</div><div class='del'>-        lcp_echo_timer_running = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/lcp.h b/mdk-stage1/ppp/pppd/lcp.h<br/>deleted file mode 100644<br/>index b87a9295e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/lcp.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/lcp.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,95 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * lcp.h - Link Control Protocol definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Options.</div><div class='del'>- */</div><div class='del'>-#define CI_MRU		1	/* Maximum Receive Unit */</div><div class='del'>-#define CI_ASYNCMAP	2	/* Async Control Character Map */</div><div class='del'>-#define CI_AUTHTYPE	3	/* Authentication Type */</div><div class='del'>-#define CI_QUALITY	4	/* Quality Protocol */</div><div class='del'>-#define CI_MAGICNUMBER	5	/* Magic Number */</div><div class='del'>-#define CI_PCOMPRESSION	7	/* Protocol Field Compression */</div><div class='del'>-#define CI_ACCOMPRESSION 8	/* Address/Control Field Compression */</div><div class='del'>-#define CI_CALLBACK	13	/* callback */</div><div class='del'>-#define CI_MRRU		17	/* max reconstructed receive unit; multilink */</div><div class='del'>-#define CI_SSNHF	18	/* short sequence numbers for multilink */</div><div class='del'>-#define CI_EPDISC	19	/* endpoint discriminator */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * LCP-specific packet types.</div><div class='del'>- */</div><div class='del'>-#define PROTREJ		8	/* Protocol Reject */</div><div class='del'>-#define ECHOREQ		9	/* Echo Request */</div><div class='del'>-#define ECHOREP		10	/* Echo Reply */</div><div class='del'>-#define DISCREQ		11	/* Discard Request */</div><div class='del'>-#define CBCP_OPT	6	/* Use callback control protocol */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The state of options is described by an lcp_options structure.</div><div class='del'>- */</div><div class='del'>-typedef struct lcp_options {</div><div class='del'>-    bool passive;		/* Don't die if we don't get a response */</div><div class='del'>-    bool silent;		/* Wait for the other end to start first */</div><div class='del'>-    bool restart;		/* Restart vs. exit after close */</div><div class='del'>-    bool neg_mru;		/* Negotiate the MRU? */</div><div class='del'>-    bool neg_asyncmap;		/* Negotiate the async map? */</div><div class='del'>-    bool neg_upap;		/* Ask for UPAP authentication? */</div><div class='del'>-    bool neg_chap;		/* Ask for CHAP authentication? */</div><div class='del'>-    bool neg_magicnumber;	/* Ask for magic number? */</div><div class='del'>-    bool neg_pcompression;	/* HDLC Protocol Field Compression? */</div><div class='del'>-    bool neg_accompression;	/* HDLC Address/Control Field Compression? */</div><div class='del'>-    bool neg_lqr;		/* Negotiate use of Link Quality Reports */</div><div class='del'>-    bool neg_cbcp;		/* Negotiate use of CBCP */</div><div class='del'>-    bool neg_mrru;		/* negotiate multilink MRRU */</div><div class='del'>-    bool neg_ssnhf;		/* negotiate short sequence numbers */</div><div class='del'>-    bool neg_endpoint;		/* negotiate endpoint discriminator */</div><div class='del'>-    int  mru;			/* Value of MRU */</div><div class='del'>-    int	 mrru;			/* Value of MRRU, and multilink enable */</div><div class='del'>-    u_char chap_mdtype;		/* which MD type (hashing algorithm) */</div><div class='del'>-    u_int32_t asyncmap;		/* Value of async map */</div><div class='del'>-    u_int32_t magicnumber;</div><div class='del'>-    int  numloops;		/* Number of loops during magic number neg. */</div><div class='del'>-    u_int32_t lqr_period;	/* Reporting period for LQR 1/100ths second */</div><div class='del'>-    struct epdisc endpoint;	/* endpoint discriminator */</div><div class='del'>-} lcp_options;</div><div class='del'>-</div><div class='del'>-extern fsm lcp_fsm[];</div><div class='del'>-extern lcp_options lcp_wantoptions[];</div><div class='del'>-extern lcp_options lcp_gotoptions[];</div><div class='del'>-extern lcp_options lcp_allowoptions[];</div><div class='del'>-extern lcp_options lcp_hisoptions[];</div><div class='del'>-</div><div class='del'>-#define DEFMRU	1500		/* Try for this */</div><div class='del'>-#define MINMRU	128		/* No MRUs below this */</div><div class='del'>-#define MAXMRU	16384		/* Normally limit MRU to this */</div><div class='del'>-</div><div class='del'>-void lcp_open __P((int));</div><div class='del'>-void lcp_close __P((int, char *));</div><div class='del'>-void lcp_lowerup __P((int));</div><div class='del'>-void lcp_lowerdown __P((int));</div><div class='del'>-void lcp_sprotrej __P((int, u_char *, int));	/* send protocol reject */</div><div class='del'>-</div><div class='del'>-extern struct protent lcp_protent;</div><div class='del'>-</div><div class='del'>-/* Default number of times we receive our magic number from the peer</div><div class='del'>-   before deciding the link is looped-back. */</div><div class='del'>-#define DEFLOOPBACKFAIL	10</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/magic.c b/mdk-stage1/ppp/pppd/magic.c<br/>deleted file mode 100644<br/>index 1682dee03..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/magic.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/magic.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,88 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * magic.c - PPP Magic Number routines.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "magic.h"</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-extern long mrand48 __P((void));</div><div class='del'>-extern void srand48 __P((long));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * magic_init - Initialize the magic number generator.</div><div class='del'>- *</div><div class='del'>- * Attempts to compute a random number seed which will not repeat.</div><div class='del'>- * The current method uses the current hostid, current process ID</div><div class='del'>- * and current time, currently.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-magic_init()</div><div class='del'>-{</div><div class='del'>-    long seed;</div><div class='del'>-    struct timeval t;</div><div class='del'>-</div><div class='del'>-    gettimeofday(&amp;t, NULL);</div><div class='del'>-    seed = get_host_seed() ^ t.tv_sec ^ t.tv_usec ^ getpid();</div><div class='del'>-    srand48(seed);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * magic - Returns the next magic number.</div><div class='del'>- */</div><div class='del'>-u_int32_t</div><div class='del'>-magic()</div><div class='del'>-{</div><div class='del'>-    return (u_int32_t) mrand48();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef NO_DRAND48</div><div class='del'>-/*</div><div class='del'>- * Substitute procedures for those systems which don't have</div><div class='del'>- * drand48 et al.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-double</div><div class='del'>-drand48()</div><div class='del'>-{</div><div class='del'>-    return (double)random() / (double)0x7fffffffL; /* 2**31-1 */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-long</div><div class='del'>-mrand48()</div><div class='del'>-{</div><div class='del'>-    return random();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-srand48(seedval)</div><div class='del'>-long seedval;</div><div class='del'>-{</div><div class='del'>-    srandom((int)seedval);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/magic.h b/mdk-stage1/ppp/pppd/magic.h<br/>deleted file mode 100644<br/>index 1344626a3..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/magic.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/magic.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,23 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * magic.h - PPP Magic Number definitions.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void magic_init __P((void));	/* Initialize the magic number generator */</div><div class='del'>-u_int32_t magic __P((void));	/* Returns the next magic number */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/main.c b/mdk-stage1/ppp/pppd/main.c<br/>deleted file mode 100644<br/>index c074938cd..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/main.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/main.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1846 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * main.c - Point-to-Point Protocol main module</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;utmp.h&gt;</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-#include &lt;setjmp.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/resource.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "magic.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#ifdef INET6</div><div class='del'>-#include "ipv6cp.h"</div><div class='del'>-#endif</div><div class='del'>-#include "upap.h"</div><div class='del'>-#include "chap.h"</div><div class='del'>-#include "ccp.h"</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-#include "tdb.h"</div><div class='del'>-</div><div class='del'>-#ifdef CBCP_SUPPORT</div><div class='del'>-#include "cbcp.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-#include "ipxcp.h"</div><div class='del'>-#endif /* IPX_CHANGE */</div><div class='del'>-#ifdef AT_CHANGE</div><div class='del'>-#include "atcp.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-/* interface vars */</div><div class='del'>-char ifname[32];		/* Interface name */</div><div class='del'>-int ifunit;			/* Interface unit number */</div><div class='del'>-</div><div class='del'>-struct channel *the_channel;</div><div class='del'>-</div><div class='del'>-char *progname;			/* Name of this program */</div><div class='del'>-char hostname[MAXNAMELEN];	/* Our hostname */</div><div class='del'>-static char pidfilename[MAXPATHLEN];	/* name of pid file */</div><div class='del'>-static char linkpidfile[MAXPATHLEN];	/* name of linkname pid file */</div><div class='del'>-char ppp_devnam[MAXPATHLEN];	/* name of PPP tty (maybe ttypx) */</div><div class='del'>-uid_t uid;			/* Our real user-id */</div><div class='del'>-struct notifier *pidchange = NULL;</div><div class='del'>-struct notifier *phasechange = NULL;</div><div class='del'>-struct notifier *exitnotify = NULL;</div><div class='del'>-struct notifier *sigreceived = NULL;</div><div class='del'>-</div><div class='del'>-int hungup;			/* terminal has been hung up */</div><div class='del'>-int privileged;			/* we're running as real uid root */</div><div class='del'>-int need_holdoff;		/* need holdoff period before restarting */</div><div class='del'>-int detached;			/* have detached from terminal */</div><div class='del'>-volatile int status;		/* exit status for pppd */</div><div class='del'>-int unsuccess;			/* # unsuccessful connection attempts */</div><div class='del'>-int do_callback;		/* != 0 if we should do callback next */</div><div class='del'>-int doing_callback;		/* != 0 if we are doing callback */</div><div class='del'>-TDB_CONTEXT *pppdb;		/* database for storing status etc. */</div><div class='del'>-char db_key[32];</div><div class='del'>-</div><div class='del'>-int (*holdoff_hook) __P((void)) = NULL;</div><div class='del'>-int (*new_phase_hook) __P((int)) = NULL;</div><div class='del'>-</div><div class='del'>-static int conn_running;	/* we have a [dis]connector running */</div><div class='del'>-static int devfd;		/* fd of underlying device */</div><div class='del'>-static int fd_ppp = -1;		/* fd for talking PPP */</div><div class='del'>-static int fd_loop;		/* fd for getting demand-dial packets */</div><div class='del'>-</div><div class='del'>-int phase;			/* where the link is at */</div><div class='del'>-int kill_link;</div><div class='del'>-int open_ccp_flag;</div><div class='del'>-int listen_time;</div><div class='del'>-int got_sigusr2;</div><div class='del'>-int got_sigterm;</div><div class='del'>-int got_sighup;</div><div class='del'>-</div><div class='del'>-static int waiting;</div><div class='del'>-static sigjmp_buf sigjmp;</div><div class='del'>-</div><div class='del'>-char **script_env;		/* Env. variable values for scripts */</div><div class='del'>-int s_env_nalloc;		/* # words avail at script_env */</div><div class='del'>-</div><div class='del'>-u_char outpacket_buf[PPP_MRU+PPP_HDRLEN]; /* buffer for outgoing packet */</div><div class='del'>-u_char inpacket_buf[PPP_MRU+PPP_HDRLEN]; /* buffer for incoming packet */</div><div class='del'>-</div><div class='del'>-static int n_children;		/* # child processes still running */</div><div class='del'>-static int got_sigchld;		/* set if we have received a SIGCHLD */</div><div class='del'>-</div><div class='del'>-int privopen;			/* don't lock, open device as root */</div><div class='del'>-</div><div class='del'>-char *no_ppp_msg = "Sorry - this system lacks PPP kernel support\n";</div><div class='del'>-</div><div class='del'>-GIDSET_TYPE groups[NGROUPS_MAX];/* groups the user is in */</div><div class='del'>-int ngroups;			/* How many groups valid in groups */</div><div class='del'>-</div><div class='del'>-static struct timeval start_time;	/* Time when link was started. */</div><div class='del'>-</div><div class='del'>-struct pppd_stats link_stats;</div><div class='del'>-int link_connect_time;</div><div class='del'>-int link_stats_valid;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * We maintain a list of child process pids and</div><div class='del'>- * functions to call when they exit.</div><div class='del'>- */</div><div class='del'>-struct subprocess {</div><div class='del'>-    pid_t	pid;</div><div class='del'>-    char	*prog;</div><div class='del'>-    void	(*done) __P((void *));</div><div class='del'>-    void	*arg;</div><div class='del'>-    struct subprocess *next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct subprocess *children;</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-</div><div class='del'>-static void setup_signals __P((void));</div><div class='del'>-static void create_pidfile __P((void));</div><div class='del'>-static void create_linkpidfile __P((void));</div><div class='del'>-static void cleanup __P((void));</div><div class='del'>-static void get_input __P((void));</div><div class='del'>-static void calltimeout __P((void));</div><div class='del'>-static struct timeval *timeleft __P((struct timeval *));</div><div class='del'>-static void kill_my_pg __P((int));</div><div class='del'>-static void hup __P((int));</div><div class='del'>-static void term __P((int));</div><div class='del'>-static void chld __P((int));</div><div class='del'>-static void toggle_debug __P((int));</div><div class='del'>-static void open_ccp __P((int));</div><div class='del'>-static void bad_signal __P((int));</div><div class='del'>-static void holdoff_end __P((void *));</div><div class='del'>-static int reap_kids __P((int waitfor));</div><div class='del'>-static void update_db_entry __P((void));</div><div class='del'>-static void add_db_key __P((const char *));</div><div class='del'>-static void delete_db_key __P((const char *));</div><div class='del'>-static void cleanup_db __P((void));</div><div class='del'>-static void handle_events __P((void));</div><div class='del'>-</div><div class='del'>-extern	char	*ttyname __P((int));</div><div class='del'>-extern	char	*getlogin __P((void));</div><div class='del'>-int main __P((int, char *[]));</div><div class='del'>-</div><div class='del'>-#ifdef ultrix</div><div class='del'>-#undef	O_NONBLOCK</div><div class='del'>-#define	O_NONBLOCK	O_NDELAY</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef ULTRIX</div><div class='del'>-#define setlogmask(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * PPP Data Link Layer "protocol" table.</div><div class='del'>- * One entry per supported protocol.</div><div class='del'>- * The last entry must be NULL.</div><div class='del'>- */</div><div class='del'>-struct protent *protocols[] = {</div><div class='del'>-    &amp;lcp_protent,</div><div class='del'>-    &amp;pap_protent,</div><div class='del'>-    &amp;chap_protent,</div><div class='del'>-#ifdef CBCP_SUPPORT</div><div class='del'>-    &amp;cbcp_protent,</div><div class='del'>-#endif</div><div class='del'>-    &amp;ipcp_protent,</div><div class='del'>-#ifdef INET6</div><div class='del'>-    &amp;ipv6cp_protent,</div><div class='del'>-#endif</div><div class='del'>-    &amp;ccp_protent,</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-    &amp;ipxcp_protent,</div><div class='del'>-#endif</div><div class='del'>-#ifdef AT_CHANGE</div><div class='del'>-    &amp;atcp_protent,</div><div class='del'>-#endif</div><div class='del'>-    NULL</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * If PPP_DRV_NAME is not defined, use the default "ppp" as the device name.</div><div class='del'>- */</div><div class='del'>-#if !defined(PPP_DRV_NAME)</div><div class='del'>-#define PPP_DRV_NAME	"ppp"</div><div class='del'>-#endif /* !defined(PPP_DRV_NAME) */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-main(argc, argv)</div><div class='del'>-    int argc;</div><div class='del'>-    char *argv[];</div><div class='del'>-{</div><div class='del'>-    int i, t;</div><div class='del'>-    char *p;</div><div class='del'>-    struct passwd *pw;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-    char numbuf[16];</div><div class='del'>-</div><div class='del'>-    new_phase(PHASE_INITIALIZE);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Ensure that fds 0, 1, 2 are open, to /dev/null if nowhere else.</div><div class='del'>-     * This way we can close 0, 1, 2 in detach() without clobbering</div><div class='del'>-     * a fd that we are using.</div><div class='del'>-     */</div><div class='del'>-    if ((i = open("/dev/null", O_RDWR)) &gt;= 0) {</div><div class='del'>-	while (0 &lt;= i &amp;&amp; i &lt;= 2)</div><div class='del'>-	    i = dup(i);</div><div class='del'>-	if (i &gt;= 0)</div><div class='del'>-	    close(i);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    script_env = NULL;</div><div class='del'>-</div><div class='del'>-    /* Initialize syslog facilities */</div><div class='del'>-    reopen_log();</div><div class='del'>-</div><div class='del'>-    if (gethostname(hostname, MAXNAMELEN) &lt; 0 ) {</div><div class='del'>-	option_error("Couldn't get hostname: %m");</div><div class='del'>-	exit(1);</div><div class='del'>-    }</div><div class='del'>-    hostname[MAXNAMELEN-1] = 0;</div><div class='del'>-</div><div class='del'>-    /* make sure we don't create world or group writable files. */</div><div class='del'>-    umask(umask(0777) | 022);</div><div class='del'>-</div><div class='del'>-    uid = getuid();</div><div class='del'>-    privileged = uid == 0;</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", uid);</div><div class='del'>-    script_setenv("ORIG_UID", numbuf, 0);</div><div class='del'>-</div><div class='del'>-    ngroups = getgroups(NGROUPS_MAX, groups);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Initialize magic number generator now so that protocols may</div><div class='del'>-     * use magic numbers in initialization.</div><div class='del'>-     */</div><div class='del'>-    magic_init();</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Initialize each protocol.</div><div class='del'>-     */</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-        (*protp-&gt;init)(0);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Initialize the default channel.</div><div class='del'>-     */</div><div class='del'>-    tty_init();</div><div class='del'>-</div><div class='del'>-    progname = *argv;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Parse, in order, the system options file, the user's options file,</div><div class='del'>-     * and the command line arguments.</div><div class='del'>-     */</div><div class='del'>-    if (!options_from_file(_PATH_SYSOPTIONS, !privileged, 0, 1)</div><div class='del'>-	|| !options_from_user()</div><div class='del'>-	|| !parse_args(argc-1, argv+1))</div><div class='del'>-	exit(EXIT_OPTION_ERROR);</div><div class='del'>-    devnam_fixed = 1;		/* can no longer change device name */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Work out the device name, if it hasn't already been specified,</div><div class='del'>-     * and parse the tty's options file.</div><div class='del'>-     */</div><div class='del'>-    if (the_channel-&gt;process_extra_options)</div><div class='del'>-	(*the_channel-&gt;process_extra_options)();</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	setlogmask(LOG_UPTO(LOG_DEBUG));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that we are running as root.</div><div class='del'>-     */</div><div class='del'>-    if (geteuid() != 0) {</div><div class='del'>-	option_error("must be root to run %s, since it is not setuid-root",</div><div class='del'>-		     argv[0]);</div><div class='del'>-	exit(EXIT_NOT_ROOT);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!ppp_available()) {</div><div class='del'>-	option_error("%s", no_ppp_msg);</div><div class='del'>-	exit(EXIT_NO_KERNEL_SUPPORT);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Check that the options given are valid and consistent.</div><div class='del'>-     */</div><div class='del'>-    check_options();</div><div class='del'>-    if (!sys_check_options())</div><div class='del'>-	exit(EXIT_OPTION_ERROR);</div><div class='del'>-    auth_check_options();</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-    mp_check_options();</div><div class='del'>-#endif</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i)</div><div class='del'>-	if (protp-&gt;check_options != NULL)</div><div class='del'>-	    (*protp-&gt;check_options)();</div><div class='del'>-    if (the_channel-&gt;check_options)</div><div class='del'>-	(*the_channel-&gt;check_options)();</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-    if (dump_options || dryrun) {</div><div class='del'>-	init_pr_log(NULL, LOG_INFO);</div><div class='del'>-	print_options(pr_log, NULL);</div><div class='del'>-	end_pr_log();</div><div class='del'>-	if (dryrun)</div><div class='del'>-	    die(0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Initialize system-dependent stuff.</div><div class='del'>-     */</div><div class='del'>-    sys_init();</div><div class='del'>-</div><div class='del'>-    pppdb = tdb_open(_PATH_PPPDB, 0, 0, O_RDWR|O_CREAT, 0644);</div><div class='del'>-    if (pppdb != NULL) {</div><div class='del'>-	slprintf(db_key, sizeof(db_key), "pppd%d", getpid());</div><div class='del'>-	update_db_entry();</div><div class='del'>-    } else {</div><div class='del'>-	warn("Warning: couldn't open ppp database %s", _PATH_PPPDB);</div><div class='del'>-	if (multilink) {</div><div class='del'>-	    warn("Warning: disabling multilink");</div><div class='del'>-	    multilink = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Detach ourselves from the terminal, if required,</div><div class='del'>-     * and identify who is running us.</div><div class='del'>-     */</div><div class='del'>-    if (!nodetach &amp;&amp; !updetach)</div><div class='del'>-	detach();</div><div class='del'>-    p = getlogin();</div><div class='del'>-    if (p == NULL) {</div><div class='del'>-	pw = getpwuid(uid);</div><div class='del'>-	if (pw != NULL &amp;&amp; pw-&gt;pw_name != NULL)</div><div class='del'>-	    p = pw-&gt;pw_name;</div><div class='del'>-	else</div><div class='del'>-	    p = "(unknown)";</div><div class='del'>-    }</div><div class='del'>-    syslog(LOG_NOTICE, "pppd %s started by %s, uid %d", VERSION, p, uid);</div><div class='del'>-    script_setenv("PPPLOGNAME", p, 0);</div><div class='del'>-</div><div class='del'>-    if (devnam[0])</div><div class='del'>-	script_setenv("DEVICE", devnam, 1);</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", getpid());</div><div class='del'>-    script_setenv("PPPD_PID", numbuf, 1);</div><div class='del'>-</div><div class='del'>-    setup_signals();</div><div class='del'>-</div><div class='del'>-    waiting = 0;</div><div class='del'>-</div><div class='del'>-    create_linkpidfile();</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * If we're doing dial-on-demand, set up the interface now.</div><div class='del'>-     */</div><div class='del'>-    if (demand) {</div><div class='del'>-	/*</div><div class='del'>-	 * Open the loopback channel and set it up to be the ppp interface.</div><div class='del'>-	 */</div><div class='del'>-	tdb_writelock(pppdb);</div><div class='del'>-	fd_loop = open_ppp_loopback();</div><div class='del'>-	set_ifunit(1);</div><div class='del'>-	tdb_writeunlock(pppdb);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Configure the interface and mark it up, etc.</div><div class='del'>-	 */</div><div class='del'>-	demand_conf();</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    do_callback = 0;</div><div class='del'>-    for (;;) {</div><div class='del'>-</div><div class='del'>-	listen_time = 0;</div><div class='del'>-	need_holdoff = 1;</div><div class='del'>-	devfd = -1;</div><div class='del'>-	status = EXIT_OK;</div><div class='del'>-	++unsuccess;</div><div class='del'>-	doing_callback = do_callback;</div><div class='del'>-	do_callback = 0;</div><div class='del'>-</div><div class='del'>-	if (demand &amp;&amp; !doing_callback) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Don't do anything until we see some activity.</div><div class='del'>-	     */</div><div class='del'>-	    new_phase(PHASE_DORMANT);</div><div class='del'>-	    demand_unblock();</div><div class='del'>-	    add_fd(fd_loop);</div><div class='del'>-	    for (;;) {</div><div class='del'>-		handle_events();</div><div class='del'>-		if (kill_link &amp;&amp; !persist)</div><div class='del'>-		    break;</div><div class='del'>-		if (get_loop_output())</div><div class='del'>-		    break;</div><div class='del'>-	    }</div><div class='del'>-	    remove_fd(fd_loop);</div><div class='del'>-	    if (kill_link &amp;&amp; !persist)</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Now we want to bring up the link.</div><div class='del'>-	     */</div><div class='del'>-	    demand_block();</div><div class='del'>-	    info("Starting link");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	new_phase(PHASE_SERIALCONN);</div><div class='del'>-</div><div class='del'>-	devfd = the_channel-&gt;connect();</div><div class='del'>-	if (devfd &lt; 0)</div><div class='del'>-	    goto fail;</div><div class='del'>-</div><div class='del'>-	/* set up the serial device as a ppp interface */</div><div class='del'>-	tdb_writelock(pppdb);</div><div class='del'>-	fd_ppp = the_channel-&gt;establish_ppp(devfd);</div><div class='del'>-	if (fd_ppp &lt; 0) {</div><div class='del'>-	    tdb_writeunlock(pppdb);</div><div class='del'>-	    status = EXIT_FATAL_ERROR;</div><div class='del'>-	    goto disconnect;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!demand &amp;&amp; ifunit &gt;= 0)</div><div class='del'>-	    set_ifunit(1);</div><div class='del'>-	tdb_writeunlock(pppdb);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Start opening the connection and wait for</div><div class='del'>-	 * incoming events (reply, timeout, etc.).</div><div class='del'>-	 */</div><div class='del'>-	notice("Connect: %s &lt;--&gt; %s", ifname, ppp_devnam);</div><div class='del'>-	gettimeofday(&amp;start_time, NULL);</div><div class='del'>-	link_stats_valid = 0;</div><div class='del'>-	script_unsetenv("CONNECT_TIME");</div><div class='del'>-	script_unsetenv("BYTES_SENT");</div><div class='del'>-	script_unsetenv("BYTES_RCVD");</div><div class='del'>-	lcp_lowerup(0);</div><div class='del'>-</div><div class='del'>-	add_fd(fd_ppp);</div><div class='del'>-	lcp_open(0);		/* Start protocol */</div><div class='del'>-	status = EXIT_NEGOTIATION_FAILED;</div><div class='del'>-	new_phase(PHASE_ESTABLISH);</div><div class='del'>-	while (phase != PHASE_DEAD) {</div><div class='del'>-	    handle_events();</div><div class='del'>-	    get_input();</div><div class='del'>-	    if (kill_link)</div><div class='del'>-		lcp_close(0, "User request");</div><div class='del'>-	    if (open_ccp_flag) {</div><div class='del'>-		if (phase == PHASE_NETWORK || phase == PHASE_RUNNING) {</div><div class='del'>-		    ccp_fsm[0].flags = OPT_RESTART; /* clears OPT_SILENT */</div><div class='del'>-		    (*ccp_protent.open)(0);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Print connect time and statistics.</div><div class='del'>-	 */</div><div class='del'>-	if (link_stats_valid) {</div><div class='del'>-	    int t = (link_connect_time + 5) / 6;    /* 1/10ths of minutes */</div><div class='del'>-	    info("Connect time %d.%d minutes.", t/10, t%10);</div><div class='del'>-	    info("Sent %u bytes, received %u bytes.",</div><div class='del'>-		 link_stats.bytes_out, link_stats.bytes_in);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Delete pid file before disestablishing ppp.  Otherwise it</div><div class='del'>-	 * can happen that another pppd gets the same unit and then</div><div class='del'>-	 * we delete its pid file.</div><div class='del'>-	 */</div><div class='del'>-	if (!demand) {</div><div class='del'>-	    if (pidfilename[0] != 0</div><div class='del'>-		&amp;&amp; unlink(pidfilename) &lt; 0 &amp;&amp; errno != ENOENT) </div><div class='del'>-		warn("unable to delete pid file %s: %m", pidfilename);</div><div class='del'>-	    pidfilename[0] = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If we may want to bring the link up again, transfer</div><div class='del'>-	 * the ppp unit back to the loopback.  Set the</div><div class='del'>-	 * real serial device back to its normal mode of operation.</div><div class='del'>-	 */</div><div class='del'>-	remove_fd(fd_ppp);</div><div class='del'>-	clean_check();</div><div class='del'>-	the_channel-&gt;disestablish_ppp(devfd);</div><div class='del'>-	fd_ppp = -1;</div><div class='del'>-	if (!hungup)</div><div class='del'>-	    lcp_lowerdown(0);</div><div class='del'>-	if (!demand)</div><div class='del'>-	    script_unsetenv("IFNAME");</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Run disconnector script, if requested.</div><div class='del'>-	 * XXX we may not be able to do this if the line has hung up!</div><div class='del'>-	 */</div><div class='del'>-    disconnect:</div><div class='del'>-	new_phase(PHASE_DISCONNECT);</div><div class='del'>-	the_channel-&gt;disconnect();</div><div class='del'>-</div><div class='del'>-    fail:</div><div class='del'>-	if (the_channel-&gt;cleanup)</div><div class='del'>-	    (*the_channel-&gt;cleanup)();</div><div class='del'>-</div><div class='del'>-	if (!demand) {</div><div class='del'>-	    if (pidfilename[0] != 0</div><div class='del'>-		&amp;&amp; unlink(pidfilename) &lt; 0 &amp;&amp; errno != ENOENT) </div><div class='del'>-		warn("unable to delete pid file %s: %m", pidfilename);</div><div class='del'>-	    pidfilename[0] = 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (!persist || (maxfail &gt; 0 &amp;&amp; unsuccess &gt;= maxfail))</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	if (demand)</div><div class='del'>-	    demand_discard();</div><div class='del'>-	t = need_holdoff? holdoff: 0;</div><div class='del'>-	if (holdoff_hook)</div><div class='del'>-	    t = (*holdoff_hook)();</div><div class='del'>-	if (t &gt; 0) {</div><div class='del'>-	    new_phase(PHASE_HOLDOFF);</div><div class='del'>-	    TIMEOUT(holdoff_end, NULL, t);</div><div class='del'>-	    do {</div><div class='del'>-		handle_events();</div><div class='del'>-		if (kill_link)</div><div class='del'>-		    new_phase(PHASE_DORMANT); /* allow signal to end holdoff */</div><div class='del'>-	    } while (phase == PHASE_HOLDOFF);</div><div class='del'>-	    if (!persist)</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Wait for scripts to finish */</div><div class='del'>-    /* XXX should have a timeout here */</div><div class='del'>-    while (n_children &gt; 0) {</div><div class='del'>-	if (debug) {</div><div class='del'>-	    struct subprocess *chp;</div><div class='del'>-	    dbglog("Waiting for %d child processes...", n_children);</div><div class='del'>-	    for (chp = children; chp != NULL; chp = chp-&gt;next)</div><div class='del'>-		dbglog("  script %s, pid %d", chp-&gt;prog, chp-&gt;pid);</div><div class='del'>-	}</div><div class='del'>-	if (reap_kids(1) &lt; 0)</div><div class='del'>-	    break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    die(status);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * handle_events - wait for something to happen and respond to it.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-handle_events()</div><div class='del'>-{</div><div class='del'>-    struct timeval timo;</div><div class='del'>-    sigset_t mask;</div><div class='del'>-</div><div class='del'>-    kill_link = open_ccp_flag = 0;</div><div class='del'>-    if (sigsetjmp(sigjmp, 1) == 0) {</div><div class='del'>-	sigprocmask(SIG_BLOCK, &amp;mask, NULL);</div><div class='del'>-	if (got_sighup || got_sigterm || got_sigusr2 || got_sigchld) {</div><div class='del'>-	    sigprocmask(SIG_UNBLOCK, &amp;mask, NULL);</div><div class='del'>-	} else {</div><div class='del'>-	    waiting = 1;</div><div class='del'>-	    sigprocmask(SIG_UNBLOCK, &amp;mask, NULL);</div><div class='del'>-	    wait_input(timeleft(&amp;timo));</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    waiting = 0;</div><div class='del'>-    calltimeout();</div><div class='del'>-    if (got_sighup) {</div><div class='del'>-	kill_link = 1;</div><div class='del'>-	got_sighup = 0;</div><div class='del'>-	if (status != EXIT_HANGUP)</div><div class='del'>-	    status = EXIT_USER_REQUEST;</div><div class='del'>-    }</div><div class='del'>-    if (got_sigterm) {</div><div class='del'>-	kill_link = 1;</div><div class='del'>-	persist = 0;</div><div class='del'>-	status = EXIT_USER_REQUEST;</div><div class='del'>-	got_sigterm = 0;</div><div class='del'>-    }</div><div class='del'>-    if (got_sigchld) {</div><div class='del'>-	reap_kids(0);	/* Don't leave dead kids lying around */</div><div class='del'>-	got_sigchld = 0;</div><div class='del'>-    }</div><div class='del'>-    if (got_sigusr2) {</div><div class='del'>-	open_ccp_flag = 1;</div><div class='del'>-	got_sigusr2 = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setup_signals - initialize signal handling.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-setup_signals()</div><div class='del'>-{</div><div class='del'>-    struct sigaction sa;</div><div class='del'>-    sigset_t mask;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Compute mask of all interesting signals and install signal handlers</div><div class='del'>-     * for each.  Only one signal handler may be active at a time.  Therefore,</div><div class='del'>-     * all other signals should be masked when any handler is executing.</div><div class='del'>-     */</div><div class='del'>-    sigemptyset(&amp;mask);</div><div class='del'>-    sigaddset(&amp;mask, SIGHUP);</div><div class='del'>-    sigaddset(&amp;mask, SIGINT);</div><div class='del'>-    sigaddset(&amp;mask, SIGTERM);</div><div class='del'>-    sigaddset(&amp;mask, SIGCHLD);</div><div class='del'>-    sigaddset(&amp;mask, SIGUSR2);</div><div class='del'>-</div><div class='del'>-#define SIGNAL(s, handler)	do { \</div><div class='del'>-	sa.sa_handler = handler; \</div><div class='del'>-	if (sigaction(s, &amp;sa, NULL) &lt; 0) \</div><div class='del'>-	    fatal("Couldn't establish signal handler (%d): %m", s); \</div><div class='del'>-    } while (0)</div><div class='del'>-</div><div class='del'>-    sa.sa_mask = mask;</div><div class='del'>-    sa.sa_flags = 0;</div><div class='del'>-    SIGNAL(SIGHUP, hup);		/* Hangup */</div><div class='del'>-    SIGNAL(SIGINT, term);		/* Interrupt */</div><div class='del'>-    SIGNAL(SIGTERM, term);		/* Terminate */</div><div class='del'>-    SIGNAL(SIGCHLD, chld);</div><div class='del'>-</div><div class='del'>-    SIGNAL(SIGUSR1, toggle_debug);	/* Toggle debug flag */</div><div class='del'>-    SIGNAL(SIGUSR2, open_ccp);		/* Reopen CCP */</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Install a handler for other signals which would otherwise</div><div class='del'>-     * cause pppd to exit without cleaning up.</div><div class='del'>-     */</div><div class='del'>-    SIGNAL(SIGABRT, bad_signal);</div><div class='del'>-    SIGNAL(SIGALRM, bad_signal);</div><div class='del'>-    SIGNAL(SIGFPE, bad_signal);</div><div class='del'>-    SIGNAL(SIGILL, bad_signal);</div><div class='del'>-    SIGNAL(SIGPIPE, bad_signal);</div><div class='del'>-    SIGNAL(SIGQUIT, bad_signal);</div><div class='del'>-    SIGNAL(SIGSEGV, bad_signal);</div><div class='del'>-#ifdef SIGBUS</div><div class='del'>-    SIGNAL(SIGBUS, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGEMT</div><div class='del'>-    SIGNAL(SIGEMT, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGPOLL</div><div class='del'>-    SIGNAL(SIGPOLL, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGPROF</div><div class='del'>-    SIGNAL(SIGPROF, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGSYS</div><div class='del'>-    SIGNAL(SIGSYS, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGTRAP</div><div class='del'>-    SIGNAL(SIGTRAP, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGVTALRM</div><div class='del'>-    SIGNAL(SIGVTALRM, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGXCPU</div><div class='del'>-    SIGNAL(SIGXCPU, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-#ifdef SIGXFSZ</div><div class='del'>-    SIGNAL(SIGXFSZ, bad_signal);</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Apparently we can get a SIGPIPE when we call syslog, if</div><div class='del'>-     * syslogd has died and been restarted.  Ignoring it seems</div><div class='del'>-     * be sufficient.</div><div class='del'>-     */</div><div class='del'>-    signal(SIGPIPE, SIG_IGN);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * set_ifunit - do things we need to do once we know which ppp</div><div class='del'>- * unit we are using.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-set_ifunit(iskey)</div><div class='del'>-    int iskey;</div><div class='del'>-{</div><div class='del'>-    info("Using interface %s%d", PPP_DRV_NAME, ifunit);</div><div class='del'>-    slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit);</div><div class='del'>-    script_setenv("IFNAME", ifname, iskey);</div><div class='del'>-    if (iskey) {</div><div class='del'>-	create_pidfile();	/* write pid to file */</div><div class='del'>-	create_linkpidfile();</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * detach - detach us from the controlling terminal.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-detach()</div><div class='del'>-{</div><div class='del'>-    int pid;</div><div class='del'>-    char numbuf[16];</div><div class='del'>-</div><div class='del'>-    if (detached)</div><div class='del'>-	return;</div><div class='del'>-    if ((pid = fork()) &lt; 0) {</div><div class='del'>-	error("Couldn't detach (fork failed: %m)");</div><div class='del'>-	die(1);			/* or just return? */</div><div class='del'>-    }</div><div class='del'>-    if (pid != 0) {</div><div class='del'>-	/* parent */</div><div class='del'>-	notify(pidchange, pid);</div><div class='del'>-	exit(0);		/* parent dies */</div><div class='del'>-    }</div><div class='del'>-    setsid();</div><div class='del'>-    chdir("/");</div><div class='del'>-    close(0);</div><div class='del'>-    close(1);</div><div class='del'>-    close(2);</div><div class='del'>-    detached = 1;</div><div class='del'>-    if (log_default)</div><div class='del'>-	log_to_fd = -1;</div><div class='del'>-    /* update pid files if they have been written already */</div><div class='del'>-    if (pidfilename[0])</div><div class='del'>-	create_pidfile();</div><div class='del'>-    if (linkpidfile[0])</div><div class='del'>-	create_linkpidfile();</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", getpid());</div><div class='del'>-    script_setenv("PPPD_PID", numbuf, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * reopen_log - (re)open our connection to syslog.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-reopen_log()</div><div class='del'>-{</div><div class='del'>-#ifdef ULTRIX</div><div class='del'>-    openlog("pppd", LOG_PID);</div><div class='del'>-#else</div><div class='del'>-    openlog("pppd", LOG_PID | LOG_NDELAY, LOG_PPP);</div><div class='del'>-    setlogmask(LOG_UPTO(LOG_INFO));</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Create a file containing our process ID.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-create_pidfile()</div><div class='del'>-{</div><div class='del'>-    FILE *pidfile;</div><div class='del'>-</div><div class='del'>-    slprintf(pidfilename, sizeof(pidfilename), "%s%s.pid",</div><div class='del'>-	     _PATH_VARRUN, ifname);</div><div class='del'>-    if ((pidfile = fopen(pidfilename, "w")) != NULL) {</div><div class='del'>-	fprintf(pidfile, "%d\n", getpid());</div><div class='del'>-	(void) fclose(pidfile);</div><div class='del'>-    } else {</div><div class='del'>-	error("Failed to create pid file %s: %m", pidfilename);</div><div class='del'>-	pidfilename[0] = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-create_linkpidfile()</div><div class='del'>-{</div><div class='del'>-    FILE *pidfile;</div><div class='del'>-</div><div class='del'>-    if (linkname[0] == 0)</div><div class='del'>-	return;</div><div class='del'>-    script_setenv("LINKNAME", linkname, 1);</div><div class='del'>-    slprintf(linkpidfile, sizeof(linkpidfile), "%sppp-%s.pid",</div><div class='del'>-	     _PATH_VARRUN, linkname);</div><div class='del'>-    if ((pidfile = fopen(linkpidfile, "w")) != NULL) {</div><div class='del'>-	fprintf(pidfile, "%d\n", getpid());</div><div class='del'>-	if (ifname[0])</div><div class='del'>-	    fprintf(pidfile, "%s\n", ifname);</div><div class='del'>-	(void) fclose(pidfile);</div><div class='del'>-    } else {</div><div class='del'>-	error("Failed to create pid file %s: %m", linkpidfile);</div><div class='del'>-	linkpidfile[0] = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * holdoff_end - called via a timeout when the holdoff period ends.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-holdoff_end(arg)</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    new_phase(PHASE_DORMANT);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* List of protocol names, to make our messages a little more informative. */</div><div class='del'>-struct protocol_list {</div><div class='del'>-    u_short	proto;</div><div class='del'>-    const char	*name;</div><div class='del'>-} protocol_list[] = {</div><div class='del'>-    { 0x21,	"IP" },</div><div class='del'>-    { 0x23,	"OSI Network Layer" },</div><div class='del'>-    { 0x25,	"Xerox NS IDP" },</div><div class='del'>-    { 0x27,	"DECnet Phase IV" },</div><div class='del'>-    { 0x29,	"Appletalk" },</div><div class='del'>-    { 0x2b,	"Novell IPX" },</div><div class='del'>-    { 0x2d,	"VJ compressed TCP/IP" },</div><div class='del'>-    { 0x2f,	"VJ uncompressed TCP/IP" },</div><div class='del'>-    { 0x31,	"Bridging PDU" },</div><div class='del'>-    { 0x33,	"Stream Protocol ST-II" },</div><div class='del'>-    { 0x35,	"Banyan Vines" },</div><div class='del'>-    { 0x39,	"AppleTalk EDDP" },</div><div class='del'>-    { 0x3b,	"AppleTalk SmartBuffered" },</div><div class='del'>-    { 0x3d,	"Multi-Link" },</div><div class='del'>-    { 0x3f,	"NETBIOS Framing" },</div><div class='del'>-    { 0x41,	"Cisco Systems" },</div><div class='del'>-    { 0x43,	"Ascom Timeplex" },</div><div class='del'>-    { 0x45,	"Fujitsu Link Backup and Load Balancing (LBLB)" },</div><div class='del'>-    { 0x47,	"DCA Remote Lan" },</div><div class='del'>-    { 0x49,	"Serial Data Transport Protocol (PPP-SDTP)" },</div><div class='del'>-    { 0x4b,	"SNA over 802.2" },</div><div class='del'>-    { 0x4d,	"SNA" },</div><div class='del'>-    { 0x4f,	"IP6 Header Compression" },</div><div class='del'>-    { 0x6f,	"Stampede Bridging" },</div><div class='del'>-    { 0xfb,	"single-link compression" },</div><div class='del'>-    { 0xfd,	"1st choice compression" },</div><div class='del'>-    { 0x0201,	"802.1d Hello Packets" },</div><div class='del'>-    { 0x0203,	"IBM Source Routing BPDU" },</div><div class='del'>-    { 0x0205,	"DEC LANBridge100 Spanning Tree" },</div><div class='del'>-    { 0x0231,	"Luxcom" },</div><div class='del'>-    { 0x0233,	"Sigma Network Systems" },</div><div class='del'>-    { 0x8021,	"Internet Protocol Control Protocol" },</div><div class='del'>-    { 0x8023,	"OSI Network Layer Control Protocol" },</div><div class='del'>-    { 0x8025,	"Xerox NS IDP Control Protocol" },</div><div class='del'>-    { 0x8027,	"DECnet Phase IV Control Protocol" },</div><div class='del'>-    { 0x8029,	"Appletalk Control Protocol" },</div><div class='del'>-    { 0x802b,	"Novell IPX Control Protocol" },</div><div class='del'>-    { 0x8031,	"Bridging NCP" },</div><div class='del'>-    { 0x8033,	"Stream Protocol Control Protocol" },</div><div class='del'>-    { 0x8035,	"Banyan Vines Control Protocol" },</div><div class='del'>-    { 0x803d,	"Multi-Link Control Protocol" },</div><div class='del'>-    { 0x803f,	"NETBIOS Framing Control Protocol" },</div><div class='del'>-    { 0x8041,	"Cisco Systems Control Protocol" },</div><div class='del'>-    { 0x8043,	"Ascom Timeplex" },</div><div class='del'>-    { 0x8045,	"Fujitsu LBLB Control Protocol" },</div><div class='del'>-    { 0x8047,	"DCA Remote Lan Network Control Protocol (RLNCP)" },</div><div class='del'>-    { 0x8049,	"Serial Data Control Protocol (PPP-SDCP)" },</div><div class='del'>-    { 0x804b,	"SNA over 802.2 Control Protocol" },</div><div class='del'>-    { 0x804d,	"SNA Control Protocol" },</div><div class='del'>-    { 0x804f,	"IP6 Header Compression Control Protocol" },</div><div class='del'>-    { 0x006f,	"Stampede Bridging Control Protocol" },</div><div class='del'>-    { 0x80fb,	"Single Link Compression Control Protocol" },</div><div class='del'>-    { 0x80fd,	"Compression Control Protocol" },</div><div class='del'>-    { 0xc021,	"Link Control Protocol" },</div><div class='del'>-    { 0xc023,	"Password Authentication Protocol" },</div><div class='del'>-    { 0xc025,	"Link Quality Report" },</div><div class='del'>-    { 0xc027,	"Shiva Password Authentication Protocol" },</div><div class='del'>-    { 0xc029,	"CallBack Control Protocol (CBCP)" },</div><div class='del'>-    { 0xc081,	"Container Control Protocol" },</div><div class='del'>-    { 0xc223,	"Challenge Handshake Authentication Protocol" },</div><div class='del'>-    { 0xc281,	"Proprietary Authentication Protocol" },</div><div class='del'>-    { 0,	NULL },</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * protocol_name - find a name for a PPP protocol.</div><div class='del'>- */</div><div class='del'>-const char *</div><div class='del'>-protocol_name(proto)</div><div class='del'>-    int proto;</div><div class='del'>-{</div><div class='del'>-    struct protocol_list *lp;</div><div class='del'>-</div><div class='del'>-    for (lp = protocol_list; lp-&gt;proto != 0; ++lp)</div><div class='del'>-	if (proto == lp-&gt;proto)</div><div class='del'>-	    return lp-&gt;name;</div><div class='del'>-    return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_input - called when incoming data is available.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-get_input()</div><div class='del'>-{</div><div class='del'>-    int len, i;</div><div class='del'>-    u_char *p;</div><div class='del'>-    u_short protocol;</div><div class='del'>-    struct protent *protp;</div><div class='del'>-</div><div class='del'>-    p = inpacket_buf;	/* point to beginning of packet buffer */</div><div class='del'>-</div><div class='del'>-    len = read_packet(inpacket_buf);</div><div class='del'>-    if (len &lt; 0)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    if (len == 0) {</div><div class='del'>-	notice("Modem hangup");</div><div class='del'>-	hungup = 1;</div><div class='del'>-	status = EXIT_HANGUP;</div><div class='del'>-	lcp_lowerdown(0);	/* serial link is no longer available */</div><div class='del'>-	link_terminated(0);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (debug /*&amp;&amp; (debugflags &amp; DBG_INPACKET)*/)</div><div class='del'>-	dbglog("rcvd %P", p, len);</div><div class='del'>-</div><div class='del'>-    if (len &lt; PPP_HDRLEN) {</div><div class='del'>-	MAINDEBUG(("io(): Received short packet."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    p += 2;				/* Skip address and control */</div><div class='del'>-    GETSHORT(protocol, p);</div><div class='del'>-    len -= PPP_HDRLEN;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Toss all non-LCP packets unless LCP is OPEN.</div><div class='del'>-     */</div><div class='del'>-    if (protocol != PPP_LCP &amp;&amp; lcp_fsm[0].state != OPENED) {</div><div class='del'>-	MAINDEBUG(("get_input: Received non-LCP packet when LCP not open."));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Until we get past the authentication phase, toss all packets</div><div class='del'>-     * except LCP, LQR and authentication packets.</div><div class='del'>-     */</div><div class='del'>-    if (phase &lt;= PHASE_AUTHENTICATE</div><div class='del'>-	&amp;&amp; !(protocol == PPP_LCP || protocol == PPP_LQR</div><div class='del'>-	     || protocol == PPP_PAP || protocol == PPP_CHAP)) {</div><div class='del'>-	MAINDEBUG(("get_input: discarding proto 0x%x in phase %d",</div><div class='del'>-		   protocol, phase));</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Upcall the proper protocol input routine.</div><div class='del'>-     */</div><div class='del'>-    for (i = 0; (protp = protocols[i]) != NULL; ++i) {</div><div class='del'>-	if (protp-&gt;protocol == protocol &amp;&amp; protp-&gt;enabled_flag) {</div><div class='del'>-	    (*protp-&gt;input)(0, p, len);</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-        if (protocol == (protp-&gt;protocol &amp; ~0x8000) &amp;&amp; protp-&gt;enabled_flag</div><div class='del'>-	    &amp;&amp; protp-&gt;datainput != NULL) {</div><div class='del'>-	    (*protp-&gt;datainput)(0, p, len);</div><div class='del'>-	    return;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (debug) {</div><div class='del'>-	const char *pname = protocol_name(protocol);</div><div class='del'>-	if (pname != NULL)</div><div class='del'>-	    warn("Unsupported protocol '%s' (0x%x) received", pname, protocol);</div><div class='del'>-	else</div><div class='del'>-	    warn("Unsupported protocol 0x%x received", protocol);</div><div class='del'>-    }</div><div class='del'>-    lcp_sprotrej(0, p - PPP_HDRLEN, len + PPP_HDRLEN);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * new_phase - signal the start of a new phase of pppd's operation.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-new_phase(p)</div><div class='del'>-    int p;</div><div class='del'>-{</div><div class='del'>-    phase = p;</div><div class='del'>-    if (new_phase_hook)</div><div class='del'>-	(*new_phase_hook)(p);</div><div class='del'>-    notify(phasechange, p);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * die - clean up state and exit with the specified status.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-die(status)</div><div class='del'>-    int status;</div><div class='del'>-{</div><div class='del'>-    cleanup();</div><div class='del'>-    notify(exitnotify, status);</div><div class='del'>-    syslog(LOG_INFO, "Exit.");</div><div class='del'>-    exit(status);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cleanup - restore anything which needs to be restored before we exit</div><div class='del'>- */</div><div class='del'>-/* ARGSUSED */</div><div class='del'>-static void</div><div class='del'>-cleanup()</div><div class='del'>-{</div><div class='del'>-    sys_cleanup();</div><div class='del'>-</div><div class='del'>-    if (fd_ppp &gt;= 0)</div><div class='del'>-	the_channel-&gt;disestablish_ppp(devfd);</div><div class='del'>-    if (the_channel-&gt;cleanup)</div><div class='del'>-	(*the_channel-&gt;cleanup)();</div><div class='del'>-</div><div class='del'>-    if (pidfilename[0] != 0 &amp;&amp; unlink(pidfilename) &lt; 0 &amp;&amp; errno != ENOENT) </div><div class='del'>-	warn("unable to delete pid file %s: %m", pidfilename);</div><div class='del'>-    pidfilename[0] = 0;</div><div class='del'>-    if (linkpidfile[0] != 0 &amp;&amp; unlink(linkpidfile) &lt; 0 &amp;&amp; errno != ENOENT) </div><div class='del'>-	warn("unable to delete pid file %s: %m", linkpidfile);</div><div class='del'>-    linkpidfile[0] = 0;</div><div class='del'>-</div><div class='del'>-    if (pppdb != NULL)</div><div class='del'>-	cleanup_db();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * update_link_stats - get stats at link termination.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-update_link_stats(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct timeval now;</div><div class='del'>-    char numbuf[32];</div><div class='del'>-</div><div class='del'>-    if (!get_ppp_stats(u, &amp;link_stats)</div><div class='del'>-	|| gettimeofday(&amp;now, NULL) &lt; 0)</div><div class='del'>-	return;</div><div class='del'>-    link_connect_time = now.tv_sec - start_time.tv_sec;</div><div class='del'>-    link_stats_valid = 1;</div><div class='del'>-</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", link_connect_time);</div><div class='del'>-    script_setenv("CONNECT_TIME", numbuf, 0);</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_out);</div><div class='del'>-    script_setenv("BYTES_SENT", numbuf, 0);</div><div class='del'>-    slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_in);</div><div class='del'>-    script_setenv("BYTES_RCVD", numbuf, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-struct	callout {</div><div class='del'>-    struct timeval	c_time;		/* time at which to call routine */</div><div class='del'>-    void		*c_arg;		/* argument to routine */</div><div class='del'>-    void		(*c_func) __P((void *)); /* routine */</div><div class='del'>-    struct		callout *c_next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct callout *callout = NULL;	/* Callout list */</div><div class='del'>-static struct timeval timenow;		/* Current time */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * timeout - Schedule a timeout.</div><div class='del'>- *</div><div class='del'>- * Note that this timeout takes the number of milliseconds, NOT hz (as in</div><div class='del'>- * the kernel).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-timeout(func, arg, secs, usecs)</div><div class='del'>-    void (*func) __P((void *));</div><div class='del'>-    void *arg;</div><div class='del'>-    int secs, usecs;</div><div class='del'>-{</div><div class='del'>-    struct callout *newp, *p, **pp;</div><div class='del'>-  </div><div class='del'>-    MAINDEBUG(("Timeout %p:%p in %d.%03d seconds.", func, arg,</div><div class='del'>-	       time / 1000, time % 1000));</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * Allocate timeout.</div><div class='del'>-     */</div><div class='del'>-    if ((newp = (struct callout *) malloc(sizeof(struct callout))) == NULL)</div><div class='del'>-	fatal("Out of memory in timeout()!");</div><div class='del'>-    newp-&gt;c_arg = arg;</div><div class='del'>-    newp-&gt;c_func = func;</div><div class='del'>-    gettimeofday(&amp;timenow, NULL);</div><div class='del'>-    newp-&gt;c_time.tv_sec = timenow.tv_sec + secs;</div><div class='del'>-    newp-&gt;c_time.tv_usec = timenow.tv_usec + usecs;</div><div class='del'>-    if (newp-&gt;c_time.tv_usec &gt;= 1000000) {</div><div class='del'>-	newp-&gt;c_time.tv_sec += newp-&gt;c_time.tv_usec / 1000000;</div><div class='del'>-	newp-&gt;c_time.tv_usec %= 1000000;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Find correct place and link it in.</div><div class='del'>-     */</div><div class='del'>-    for (pp = &amp;callout; (p = *pp); pp = &amp;p-&gt;c_next)</div><div class='del'>-	if (newp-&gt;c_time.tv_sec &lt; p-&gt;c_time.tv_sec</div><div class='del'>-	    || (newp-&gt;c_time.tv_sec == p-&gt;c_time.tv_sec</div><div class='del'>-		&amp;&amp; newp-&gt;c_time.tv_usec &lt; p-&gt;c_time.tv_usec))</div><div class='del'>-	    break;</div><div class='del'>-    newp-&gt;c_next = p;</div><div class='del'>-    *pp = newp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * untimeout - Unschedule a timeout.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-untimeout(func, arg)</div><div class='del'>-    void (*func) __P((void *));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct callout **copp, *freep;</div><div class='del'>-  </div><div class='del'>-    MAINDEBUG(("Untimeout %p:%p.", func, arg));</div><div class='del'>-  </div><div class='del'>-    /*</div><div class='del'>-     * Find first matching timeout and remove it from the list.</div><div class='del'>-     */</div><div class='del'>-    for (copp = &amp;callout; (freep = *copp); copp = &amp;freep-&gt;c_next)</div><div class='del'>-	if (freep-&gt;c_func == func &amp;&amp; freep-&gt;c_arg == arg) {</div><div class='del'>-	    *copp = freep-&gt;c_next;</div><div class='del'>-	    free((char *) freep);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * calltimeout - Call any timeout routines which are now due.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-calltimeout()</div><div class='del'>-{</div><div class='del'>-    struct callout *p;</div><div class='del'>-</div><div class='del'>-    while (callout != NULL) {</div><div class='del'>-	p = callout;</div><div class='del'>-</div><div class='del'>-	if (gettimeofday(&amp;timenow, NULL) &lt; 0)</div><div class='del'>-	    fatal("Failed to get time of day: %m");</div><div class='del'>-	if (!(p-&gt;c_time.tv_sec &lt; timenow.tv_sec</div><div class='del'>-	      || (p-&gt;c_time.tv_sec == timenow.tv_sec</div><div class='del'>-		  &amp;&amp; p-&gt;c_time.tv_usec &lt;= timenow.tv_usec)))</div><div class='del'>-	    break;		/* no, it's not time yet */</div><div class='del'>-</div><div class='del'>-	callout = p-&gt;c_next;</div><div class='del'>-	(*p-&gt;c_func)(p-&gt;c_arg);</div><div class='del'>-</div><div class='del'>-	free((char *) p);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * timeleft - return the length of time until the next timeout is due.</div><div class='del'>- */</div><div class='del'>-static struct timeval *</div><div class='del'>-timeleft(tvp)</div><div class='del'>-    struct timeval *tvp;</div><div class='del'>-{</div><div class='del'>-    if (callout == NULL)</div><div class='del'>-	return NULL;</div><div class='del'>-</div><div class='del'>-    gettimeofday(&amp;timenow, NULL);</div><div class='del'>-    tvp-&gt;tv_sec = callout-&gt;c_time.tv_sec - timenow.tv_sec;</div><div class='del'>-    tvp-&gt;tv_usec = callout-&gt;c_time.tv_usec - timenow.tv_usec;</div><div class='del'>-    if (tvp-&gt;tv_usec &lt; 0) {</div><div class='del'>-	tvp-&gt;tv_usec += 1000000;</div><div class='del'>-	tvp-&gt;tv_sec -= 1;</div><div class='del'>-    }</div><div class='del'>-    if (tvp-&gt;tv_sec &lt; 0)</div><div class='del'>-	tvp-&gt;tv_sec = tvp-&gt;tv_usec = 0;</div><div class='del'>-</div><div class='del'>-    return tvp;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * kill_my_pg - send a signal to our process group, and ignore it ourselves.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-kill_my_pg(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    struct sigaction act, oldact;</div><div class='del'>-</div><div class='del'>-    act.sa_handler = SIG_IGN;</div><div class='del'>-    act.sa_flags = 0;</div><div class='del'>-    kill(0, sig);</div><div class='del'>-    sigaction(sig, &amp;act, &amp;oldact);</div><div class='del'>-    sigaction(sig, &amp;oldact, NULL);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * hup - Catch SIGHUP signal.</div><div class='del'>- *</div><div class='del'>- * Indicates that the physical layer has been disconnected.</div><div class='del'>- * We don't rely on this indication; if the user has sent this</div><div class='del'>- * signal, we just take the link down.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-hup(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    info("Hangup (SIGHUP)");</div><div class='del'>-    got_sighup = 1;</div><div class='del'>-    if (conn_running)</div><div class='del'>-	/* Send the signal to the [dis]connector process(es) also */</div><div class='del'>-	kill_my_pg(sig);</div><div class='del'>-    notify(sigreceived, sig);</div><div class='del'>-    if (waiting)</div><div class='del'>-	siglongjmp(sigjmp, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * term - Catch SIGTERM signal and SIGINT signal (^C/del).</div><div class='del'>- *</div><div class='del'>- * Indicates that we should initiate a graceful disconnect and exit.</div><div class='del'>- */</div><div class='del'>-/*ARGSUSED*/</div><div class='del'>-static void</div><div class='del'>-term(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    info("Terminating on signal %d.", sig);</div><div class='del'>-    got_sigterm = 1;</div><div class='del'>-    if (conn_running)</div><div class='del'>-	/* Send the signal to the [dis]connector process(es) also */</div><div class='del'>-	kill_my_pg(sig);</div><div class='del'>-    notify(sigreceived, sig);</div><div class='del'>-    if (waiting)</div><div class='del'>-	siglongjmp(sigjmp, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * chld - Catch SIGCHLD signal.</div><div class='del'>- * Sets a flag so we will call reap_kids in the mainline.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-chld(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    got_sigchld = 1;</div><div class='del'>-    if (waiting)</div><div class='del'>-	siglongjmp(sigjmp, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * toggle_debug - Catch SIGUSR1 signal.</div><div class='del'>- *</div><div class='del'>- * Toggle debug flag.</div><div class='del'>- */</div><div class='del'>-/*ARGSUSED*/</div><div class='del'>-static void</div><div class='del'>-toggle_debug(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    debug = !debug;</div><div class='del'>-    if (debug) {</div><div class='del'>-	setlogmask(LOG_UPTO(LOG_DEBUG));</div><div class='del'>-    } else {</div><div class='del'>-	setlogmask(LOG_UPTO(LOG_WARNING));</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * open_ccp - Catch SIGUSR2 signal.</div><div class='del'>- *</div><div class='del'>- * Try to (re)negotiate compression.</div><div class='del'>- */</div><div class='del'>-/*ARGSUSED*/</div><div class='del'>-static void</div><div class='del'>-open_ccp(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    got_sigusr2 = 1;</div><div class='del'>-    if (waiting)</div><div class='del'>-	siglongjmp(sigjmp, 1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bad_signal - We've caught a fatal signal.  Clean up state and exit.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-bad_signal(sig)</div><div class='del'>-    int sig;</div><div class='del'>-{</div><div class='del'>-    static int crashed = 0;</div><div class='del'>-</div><div class='del'>-    if (crashed)</div><div class='del'>-	_exit(127);</div><div class='del'>-    crashed = 1;</div><div class='del'>-    error("Fatal signal %d", sig);</div><div class='del'>-    if (conn_running)</div><div class='del'>-	kill_my_pg(SIGTERM);</div><div class='del'>-    notify(sigreceived, sig);</div><div class='del'>-    die(127);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * device_script - run a program to talk to the specified fds</div><div class='del'>- * (e.g. to run the connector or disconnector script).</div><div class='del'>- * stderr gets connected to the log fd or to the _PATH_CONNERRS file.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-device_script(program, in, out, dont_wait)</div><div class='del'>-    char *program;</div><div class='del'>-    int in, out;</div><div class='del'>-    int dont_wait;</div><div class='del'>-{</div><div class='del'>-    int pid, fd;</div><div class='del'>-    int status = -1;</div><div class='del'>-    int errfd;</div><div class='del'>-</div><div class='del'>-    ++conn_running;</div><div class='del'>-    pid = fork();</div><div class='del'>-</div><div class='del'>-    if (pid &lt; 0) {</div><div class='del'>-	--conn_running;</div><div class='del'>-	error("Failed to create child process: %m");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (pid != 0) {</div><div class='del'>-	if (dont_wait) {</div><div class='del'>-	    record_child(pid, program, NULL, NULL);</div><div class='del'>-	    status = 0;</div><div class='del'>-	} else {</div><div class='del'>-	    while (waitpid(pid, &amp;status, 0) &lt; 0) {</div><div class='del'>-		if (errno == EINTR)</div><div class='del'>-		    continue;</div><div class='del'>-		fatal("error waiting for (dis)connection process: %m");</div><div class='del'>-	    }</div><div class='del'>-	    --conn_running;</div><div class='del'>-	}</div><div class='del'>-	return (status == 0 ? 0 : -1);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* here we are executing in the child */</div><div class='del'>-    /* make sure fds 0, 1, 2 are occupied */</div><div class='del'>-    while ((fd = dup(in)) &gt;= 0) {</div><div class='del'>-	if (fd &gt; 2) {</div><div class='del'>-	    close(fd);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* dup in and out to fds &gt; 2 */</div><div class='del'>-    in = dup(in);</div><div class='del'>-    out = dup(out);</div><div class='del'>-    if (log_to_fd &gt;= 0) {</div><div class='del'>-	errfd = dup(log_to_fd);</div><div class='del'>-    } else {</div><div class='del'>-	errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* close fds 0 - 2 and any others we can think of */</div><div class='del'>-    close(0);</div><div class='del'>-    close(1);</div><div class='del'>-    close(2);</div><div class='del'>-    sys_close();</div><div class='del'>-    if (the_channel-&gt;close)</div><div class='del'>-	(*the_channel-&gt;close)();</div><div class='del'>-    closelog();</div><div class='del'>-</div><div class='del'>-    /* dup the in, out, err fds to 0, 1, 2 */</div><div class='del'>-    dup2(in, 0);</div><div class='del'>-    close(in);</div><div class='del'>-    dup2(out, 1);</div><div class='del'>-    close(out);</div><div class='del'>-    if (errfd &gt;= 0) {</div><div class='del'>-	dup2(errfd, 2);</div><div class='del'>-	close(errfd);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    setuid(uid);</div><div class='del'>-    if (getuid() != uid) {</div><div class='del'>-	error("setuid failed");</div><div class='del'>-	exit(1);</div><div class='del'>-    }</div><div class='del'>-    setgid(getgid());</div><div class='del'>-    {</div><div class='del'>-	    int argc = 0;</div><div class='del'>-	    char * argv[500];</div><div class='del'>-	    char * ptr = program;</div><div class='del'>-	    while (ptr != NULL) {</div><div class='del'>-		    argv[argc] = ptr;</div><div class='del'>-		    argc++;</div><div class='del'>-		    ptr = strchr(ptr, ' ');</div><div class='del'>-		    if (ptr) {</div><div class='del'>-			    ptr[0] = '\0';</div><div class='del'>-			    ptr++;</div><div class='del'>-		    }</div><div class='del'>-	    }</div><div class='del'>-	    argv[argc] = NULL;</div><div class='del'>-	    execv(argv[0], argv);</div><div class='del'>-	    error("could not exec %s: %m", program);</div><div class='del'>-	    exit(99);</div><div class='del'>-    }</div><div class='del'>-    /* NOTREACHED */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * run-program - execute a program with given arguments,</div><div class='del'>- * but don't wait for it.</div><div class='del'>- * If the program can't be executed, logs an error unless</div><div class='del'>- * must_exist is 0 and the program file doesn't exist.</div><div class='del'>- * Returns -1 if it couldn't fork, 0 if the file doesn't exist</div><div class='del'>- * or isn't an executable plain file, or the process ID of the child.</div><div class='del'>- * If done != NULL, (*done)(arg) will be called later (within</div><div class='del'>- * reap_kids) iff the return value is &gt; 0.</div><div class='del'>- */</div><div class='del'>-pid_t</div><div class='del'>-run_program(prog, args, must_exist, done, arg)</div><div class='del'>-    char *prog;</div><div class='del'>-    char **args;</div><div class='del'>-    int must_exist;</div><div class='del'>-    void (*done) __P((void *));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    int pid;</div><div class='del'>-    struct stat sbuf;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * First check if the file exists and is executable.</div><div class='del'>-     * We don't use access() because that would use the</div><div class='del'>-     * real user-id, which might not be root, and the script</div><div class='del'>-     * might be accessible only to root.</div><div class='del'>-     */</div><div class='del'>-    errno = EINVAL;</div><div class='del'>-    if (stat(prog, &amp;sbuf) &lt; 0 || !S_ISREG(sbuf.st_mode)</div><div class='del'>-	|| (sbuf.st_mode &amp; (S_IXUSR|S_IXGRP|S_IXOTH)) == 0) {</div><div class='del'>-	if (must_exist || errno != ENOENT)</div><div class='del'>-	    warn("Can't execute %s: %m", prog);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    pid = fork();</div><div class='del'>-    if (pid == -1) {</div><div class='del'>-	error("Failed to create child process for %s: %m", prog);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    if (pid == 0) {</div><div class='del'>-	int new_fd;</div><div class='del'>-</div><div class='del'>-	/* Leave the current location */</div><div class='del'>-	(void) setsid();	/* No controlling tty. */</div><div class='del'>-	(void) umask (S_IRWXG|S_IRWXO);</div><div class='del'>-	(void) chdir ("/");	/* no current directory. */</div><div class='del'>-	setuid(0);		/* set real UID = root */</div><div class='del'>-	setgid(getegid());</div><div class='del'>-</div><div class='del'>-	/* Ensure that nothing of our device environment is inherited. */</div><div class='del'>-	sys_close();</div><div class='del'>-	closelog();</div><div class='del'>-	close (0);</div><div class='del'>-	close (1);</div><div class='del'>-	close (2);</div><div class='del'>-	if (the_channel-&gt;close)</div><div class='del'>-	    (*the_channel-&gt;close)();</div><div class='del'>-</div><div class='del'>-        /* Don't pass handles to the PPP device, even by accident. */</div><div class='del'>-	new_fd = open (_PATH_DEVNULL, O_RDWR);</div><div class='del'>-	if (new_fd &gt;= 0) {</div><div class='del'>-	    if (new_fd != 0) {</div><div class='del'>-	        dup2  (new_fd, 0); /* stdin &lt;- /dev/null */</div><div class='del'>-		close (new_fd);</div><div class='del'>-	    }</div><div class='del'>-	    dup2 (0, 1); /* stdout -&gt; /dev/null */</div><div class='del'>-	    dup2 (0, 2); /* stderr -&gt; /dev/null */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-#ifdef BSD</div><div class='del'>-	/* Force the priority back to zero if pppd is running higher. */</div><div class='del'>-	if (setpriority (PRIO_PROCESS, 0, 0) &lt; 0)</div><div class='del'>-	    warn("can't reset priority to 0: %m"); </div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-	/* SysV recommends a second fork at this point. */</div><div class='del'>-</div><div class='del'>-	/* run the program */</div><div class='del'>-	execve(prog, args, script_env);</div><div class='del'>-	if (must_exist || errno != ENOENT) {</div><div class='del'>-	    /* have to reopen the log, there's nowhere else</div><div class='del'>-	       for the message to go. */</div><div class='del'>-	    reopen_log();</div><div class='del'>-	    syslog(LOG_ERR, "Can't execute %s: %m", prog);</div><div class='del'>-	    closelog();</div><div class='del'>-	}</div><div class='del'>-	_exit(-1);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	dbglog("Script %s started (pid %d)", prog, pid);</div><div class='del'>-    record_child(pid, prog, done, arg);</div><div class='del'>-</div><div class='del'>-    return pid;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * record_child - add a child process to the list for reap_kids</div><div class='del'>- * to use.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-record_child(pid, prog, done, arg)</div><div class='del'>-    int pid;</div><div class='del'>-    char *prog;</div><div class='del'>-    void (*done) __P((void *));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct subprocess *chp;</div><div class='del'>-</div><div class='del'>-    ++n_children;</div><div class='del'>-</div><div class='del'>-    chp = (struct subprocess *) malloc(sizeof(struct subprocess));</div><div class='del'>-    if (chp == NULL) {</div><div class='del'>-	warn("losing track of %s process", prog);</div><div class='del'>-    } else {</div><div class='del'>-	chp-&gt;pid = pid;</div><div class='del'>-	chp-&gt;prog = prog;</div><div class='del'>-	chp-&gt;done = done;</div><div class='del'>-	chp-&gt;arg = arg;</div><div class='del'>-	chp-&gt;next = children;</div><div class='del'>-	children = chp;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * reap_kids - get status from any dead child processes,</div><div class='del'>- * and log a message for abnormal terminations.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-reap_kids(waitfor)</div><div class='del'>-    int waitfor;</div><div class='del'>-{</div><div class='del'>-    int pid, status;</div><div class='del'>-    struct subprocess *chp, **prevp;</div><div class='del'>-</div><div class='del'>-    if (n_children == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    while ((pid = waitpid(-1, &amp;status, (waitfor? 0: WNOHANG))) != -1</div><div class='del'>-	   &amp;&amp; pid != 0) {</div><div class='del'>-	for (prevp = &amp;children; (chp = *prevp) != NULL; prevp = &amp;chp-&gt;next) {</div><div class='del'>-	    if (chp-&gt;pid == pid) {</div><div class='del'>-		--n_children;</div><div class='del'>-		*prevp = chp-&gt;next;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	if (WIFSIGNALED(status)) {</div><div class='del'>-	    warn("Child process %s (pid %d) terminated with signal %d",</div><div class='del'>-		 (chp? chp-&gt;prog: "??"), pid, WTERMSIG(status));</div><div class='del'>-	} else if (debug)</div><div class='del'>-	    dbglog("Script %s finished (pid %d), status = 0x%x",</div><div class='del'>-		   (chp? chp-&gt;prog: "??"), pid, status);</div><div class='del'>-	if (chp &amp;&amp; chp-&gt;done)</div><div class='del'>-	    (*chp-&gt;done)(chp-&gt;arg);</div><div class='del'>-	if (chp)</div><div class='del'>-	    free(chp);</div><div class='del'>-    }</div><div class='del'>-    if (pid == -1) {</div><div class='del'>-	if (errno == ECHILD)</div><div class='del'>-	    return -1;</div><div class='del'>-	if (errno != EINTR)</div><div class='del'>-	    error("Error waiting for child process: %m");</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_notifier - add a new function to be called when something happens.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-add_notifier(notif, func, arg)</div><div class='del'>-    struct notifier **notif;</div><div class='del'>-    notify_func func;</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct notifier *np;</div><div class='del'>-</div><div class='del'>-    np = malloc(sizeof(struct notifier));</div><div class='del'>-    if (np == 0)</div><div class='del'>-	novm("notifier struct");</div><div class='del'>-    np-&gt;next = *notif;</div><div class='del'>-    np-&gt;func = func;</div><div class='del'>-    np-&gt;arg = arg;</div><div class='del'>-    *notif = np;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * remove_notifier - remove a function from the list of things to</div><div class='del'>- * be called when something happens.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-remove_notifier(notif, func, arg)</div><div class='del'>-    struct notifier **notif;</div><div class='del'>-    notify_func func;</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-    struct notifier *np;</div><div class='del'>-</div><div class='del'>-    for (; (np = *notif) != 0; notif = &amp;np-&gt;next) {</div><div class='del'>-	if (np-&gt;func == func &amp;&amp; np-&gt;arg == arg) {</div><div class='del'>-	    *notif = np-&gt;next;</div><div class='del'>-	    free(np);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * notify - call a set of functions registered with add_notify.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-notify(notif, val)</div><div class='del'>-    struct notifier *notif;</div><div class='del'>-    int val;</div><div class='del'>-{</div><div class='del'>-    struct notifier *np;</div><div class='del'>-</div><div class='del'>-    while ((np = notif) != 0) {</div><div class='del'>-	notif = np-&gt;next;</div><div class='del'>-	(*np-&gt;func)(np-&gt;arg, val);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * novm - log an error message saying we ran out of memory, and die.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-novm(msg)</div><div class='del'>-    char *msg;</div><div class='del'>-{</div><div class='del'>-    fatal("Virtual memory exhausted allocating %s\n", msg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * script_setenv - set an environment variable value to be used</div><div class='del'>- * for scripts that we run (e.g. ip-up, auth-up, etc.)</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-script_setenv(var, value, iskey)</div><div class='del'>-    char *var, *value;</div><div class='del'>-    int iskey;</div><div class='del'>-{</div><div class='del'>-    size_t varl = strlen(var);</div><div class='del'>-    size_t vl = varl + strlen(value) + 2;</div><div class='del'>-    int i;</div><div class='del'>-    char *p, *newstring;</div><div class='del'>-</div><div class='del'>-    newstring = (char *) malloc(vl+1);</div><div class='del'>-    if (newstring == 0)</div><div class='del'>-	return;</div><div class='del'>-    *newstring++ = iskey;</div><div class='del'>-    slprintf(newstring, vl, "%s=%s", var, value);</div><div class='del'>-</div><div class='del'>-    /* check if this variable is already set */</div><div class='del'>-    if (script_env != 0) {</div><div class='del'>-	for (i = 0; (p = script_env[i]) != 0; ++i) {</div><div class='del'>-	    if (strncmp(p, var, varl) == 0 &amp;&amp; p[varl] == '=') {</div><div class='del'>-		if (p[-1] &amp;&amp; pppdb != NULL)</div><div class='del'>-		    delete_db_key(p);</div><div class='del'>-		free(p-1);</div><div class='del'>-		script_env[i] = newstring;</div><div class='del'>-		if (iskey &amp;&amp; pppdb != NULL)</div><div class='del'>-		    add_db_key(newstring);</div><div class='del'>-		update_db_entry();</div><div class='del'>-		return;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    } else {</div><div class='del'>-	/* no space allocated for script env. ptrs. yet */</div><div class='del'>-	i = 0;</div><div class='del'>-	script_env = (char **) malloc(16 * sizeof(char *));</div><div class='del'>-	if (script_env == 0)</div><div class='del'>-	    return;</div><div class='del'>-	s_env_nalloc = 16;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* reallocate script_env with more space if needed */</div><div class='del'>-    if (i + 1 &gt;= s_env_nalloc) {</div><div class='del'>-	int new_n = i + 17;</div><div class='del'>-	char **newenv = (char **) realloc((void *)script_env,</div><div class='del'>-					  new_n * sizeof(char *));</div><div class='del'>-	if (newenv == 0)</div><div class='del'>-	    return;</div><div class='del'>-	script_env = newenv;</div><div class='del'>-	s_env_nalloc = new_n;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    script_env[i] = newstring;</div><div class='del'>-    script_env[i+1] = 0;</div><div class='del'>-</div><div class='del'>-    if (pppdb != NULL) {</div><div class='del'>-	if (iskey)</div><div class='del'>-	    add_db_key(newstring);</div><div class='del'>-	update_db_entry();</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * script_unsetenv - remove a variable from the environment</div><div class='del'>- * for scripts.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-script_unsetenv(var)</div><div class='del'>-    char *var;</div><div class='del'>-{</div><div class='del'>-    int vl = strlen(var);</div><div class='del'>-    int i;</div><div class='del'>-    char *p;</div><div class='del'>-</div><div class='del'>-    if (script_env == 0)</div><div class='del'>-	return;</div><div class='del'>-    for (i = 0; (p = script_env[i]) != 0; ++i) {</div><div class='del'>-	if (strncmp(p, var, vl) == 0 &amp;&amp; p[vl] == '=') {</div><div class='del'>-	    if (p[-1] &amp;&amp; pppdb != NULL)</div><div class='del'>-		delete_db_key(p);</div><div class='del'>-	    free(p-1);</div><div class='del'>-	    while ((script_env[i] = script_env[i+1]) != 0)</div><div class='del'>-		++i;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (pppdb != NULL)</div><div class='del'>-	update_db_entry();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * update_db_entry - update our entry in the database.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-update_db_entry()</div><div class='del'>-{</div><div class='del'>-    TDB_DATA key, dbuf;</div><div class='del'>-    int vlen, i;</div><div class='del'>-    char *p, *q, *vbuf;</div><div class='del'>-</div><div class='del'>-    if (script_env == NULL)</div><div class='del'>-	return;</div><div class='del'>-    vlen = 0;</div><div class='del'>-    for (i = 0; (p = script_env[i]) != 0; ++i)</div><div class='del'>-	vlen += strlen(p) + 1;</div><div class='del'>-    vbuf = malloc(vlen);</div><div class='del'>-    if (vbuf == 0)</div><div class='del'>-	novm("database entry");</div><div class='del'>-    q = vbuf;</div><div class='del'>-    for (i = 0; (p = script_env[i]) != 0; ++i)</div><div class='del'>-	q += slprintf(q, vbuf + vlen - q, "%s;", p);</div><div class='del'>-</div><div class='del'>-    key.dptr = db_key;</div><div class='del'>-    key.dsize = strlen(db_key);</div><div class='del'>-    dbuf.dptr = vbuf;</div><div class='del'>-    dbuf.dsize = vlen;</div><div class='del'>-    if (tdb_store(pppdb, key, dbuf, TDB_REPLACE))</div><div class='del'>-	error("tdb_store failed: %s", tdb_error(pppdb));</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_db_key - add a key that we can use to look up our database entry.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-add_db_key(str)</div><div class='del'>-    const char *str;</div><div class='del'>-{</div><div class='del'>-    TDB_DATA key, dbuf;</div><div class='del'>-</div><div class='del'>-    key.dptr = (char *) str;</div><div class='del'>-    key.dsize = strlen(str);</div><div class='del'>-    dbuf.dptr = db_key;</div><div class='del'>-    dbuf.dsize = strlen(db_key);</div><div class='del'>-    if (tdb_store(pppdb, key, dbuf, TDB_REPLACE))</div><div class='del'>-	error("tdb_store key failed: %s", tdb_error(pppdb));</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * delete_db_key - delete a key for looking up our database entry.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-delete_db_key(str)</div><div class='del'>-    const char *str;</div><div class='del'>-{</div><div class='del'>-    TDB_DATA key;</div><div class='del'>-</div><div class='del'>-    key.dptr = (char *) str;</div><div class='del'>-    key.dsize = strlen(str);</div><div class='del'>-    tdb_delete(pppdb, key);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cleanup_db - delete all the entries we put in the database.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-cleanup_db()</div><div class='del'>-{</div><div class='del'>-    TDB_DATA key;</div><div class='del'>-    int i;</div><div class='del'>-    char *p;</div><div class='del'>-</div><div class='del'>-    key.dptr = db_key;</div><div class='del'>-    key.dsize = strlen(db_key);</div><div class='del'>-    tdb_delete(pppdb, key);</div><div class='del'>-    for (i = 0; (p = script_env[i]) != 0; ++i)</div><div class='del'>-	if (p[-1])</div><div class='del'>-	    delete_db_key(p);</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/md4.c b/mdk-stage1/ppp/pppd/md4.c<br/>deleted file mode 100644<br/>index cda9f943d..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/md4.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/md4.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,298 +0,0 @@</div><div class='del'>-/*</div><div class='del'>-** ********************************************************************</div><div class='del'>-** md4.c -- Implementation of MD4 Message Digest Algorithm           **</div><div class='del'>-** Updated: 2/16/90 by Ronald L. Rivest                              **</div><div class='del'>-** (C) 1990 RSA Data Security, Inc.                                  **</div><div class='del'>-** ********************************************************************</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-** To use MD4:</div><div class='del'>-**   -- Include md4.h in your program</div><div class='del'>-**   -- Declare an MDstruct MD to hold the state of the digest</div><div class='del'>-**          computation.</div><div class='del'>-**   -- Initialize MD using MDbegin(&amp;MD)</div><div class='del'>-**   -- For each full block (64 bytes) X you wish to process, call</div><div class='del'>-**          MD4Update(&amp;MD,X,512)</div><div class='del'>-**      (512 is the number of bits in a full block.)</div><div class='del'>-**   -- For the last block (less than 64 bytes) you wish to process,</div><div class='del'>-**          MD4Update(&amp;MD,X,n)</div><div class='del'>-**      where n is the number of bits in the partial block. A partial</div><div class='del'>-**      block terminates the computation, so every MD computation</div><div class='del'>-**      should terminate by processing a partial block, even if it</div><div class='del'>-**      has n = 0.</div><div class='del'>-**   -- The message digest is available in MD.buffer[0] ...</div><div class='del'>-**      MD.buffer[3].  (Least-significant byte of each word</div><div class='del'>-**      should be output first.)</div><div class='del'>-**   -- You can print out the digest using MDprint(&amp;MD)</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-/* Implementation notes:</div><div class='del'>-** This implementation assumes that ints are 32-bit quantities.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#define TRUE  1</div><div class='del'>-#define FALSE 0</div><div class='del'>-</div><div class='del'>-/* Compile-time includes</div><div class='del'>-*/</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include "md4.h"</div><div class='del'>-#include "pppd.h"</div><div class='del'>-</div><div class='del'>-/* Compile-time declarations of MD4 "magic constants".</div><div class='del'>-*/</div><div class='del'>-#define I0  0x67452301       /* Initial values for MD buffer */</div><div class='del'>-#define I1  0xefcdab89</div><div class='del'>-#define I2  0x98badcfe</div><div class='del'>-#define I3  0x10325476</div><div class='del'>-#define C2  013240474631     /* round 2 constant = sqrt(2) in octal */</div><div class='del'>-#define C3  015666365641     /* round 3 constant = sqrt(3) in octal */</div><div class='del'>-/* C2 and C3 are from Knuth, The Art of Programming, Volume 2</div><div class='del'>-** (Seminumerical Algorithms), Second Edition (1981), Addison-Wesley.</div><div class='del'>-** Table 2, page 660.</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#define fs1  3               /* round 1 shift amounts */</div><div class='del'>-#define fs2  7</div><div class='del'>-#define fs3 11</div><div class='del'>-#define fs4 19</div><div class='del'>-#define gs1  3               /* round 2 shift amounts */</div><div class='del'>-#define gs2  5</div><div class='del'>-#define gs3  9</div><div class='del'>-#define gs4 13</div><div class='del'>-#define hs1  3               /* round 3 shift amounts */</div><div class='del'>-#define hs2  9</div><div class='del'>-#define hs3 11</div><div class='del'>-#define hs4 15</div><div class='del'>-</div><div class='del'>-/* Compile-time macro declarations for MD4.</div><div class='del'>-** Note: The "rot" operator uses the variable "tmp".</div><div class='del'>-** It assumes tmp is declared as unsigned int, so that the &gt;&gt;</div><div class='del'>-** operator will shift in zeros rather than extending the sign bit.</div><div class='del'>-*/</div><div class='del'>-#define f(X,Y,Z)             ((X&amp;Y) | ((~X)&amp;Z))</div><div class='del'>-#define g(X,Y,Z)             ((X&amp;Y) | (X&amp;Z) | (Y&amp;Z))</div><div class='del'>-#define h(X,Y,Z)             (X^Y^Z)</div><div class='del'>-#define rot(X,S)             (tmp=X,(tmp&lt;&lt;S) | (tmp&gt;&gt;(32-S)))</div><div class='del'>-#define ff(A,B,C,D,i,s)      A = rot((A + f(B,C,D) + X[i]),s)</div><div class='del'>-#define gg(A,B,C,D,i,s)      A = rot((A + g(B,C,D) + X[i] + C2),s)</div><div class='del'>-#define hh(A,B,C,D,i,s)      A = rot((A + h(B,C,D) + X[i] + C3),s)</div><div class='del'>-</div><div class='del'>-/* MD4print(MDp)</div><div class='del'>-** Print message digest buffer MDp as 32 hexadecimal digits.</div><div class='del'>-** Order is from low-order byte of buffer[0] to high-order byte of</div><div class='del'>-** buffer[3].</div><div class='del'>-** Each byte is printed with high-order hexadecimal digit first.</div><div class='del'>-** This is a user-callable routine.</div><div class='del'>-*/</div><div class='del'>-void</div><div class='del'>-MD4Print(MDp)</div><div class='del'>-MD4_CTX *MDp;</div><div class='del'>-{</div><div class='del'>-  int i,j;</div><div class='del'>-  for (i=0;i&lt;4;i++)</div><div class='del'>-    for (j=0;j&lt;32;j=j+8)</div><div class='del'>-      printf("%02x",(MDp-&gt;buffer[i]&gt;&gt;j) &amp; 0xFF);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* MD4Init(MDp)</div><div class='del'>-** Initialize message digest buffer MDp.</div><div class='del'>-** This is a user-callable routine.</div><div class='del'>-*/</div><div class='del'>-void</div><div class='del'>-MD4Init(MDp)</div><div class='del'>-MD4_CTX *MDp;</div><div class='del'>-{</div><div class='del'>-  int i;</div><div class='del'>-  MDp-&gt;buffer[0] = I0;</div><div class='del'>-  MDp-&gt;buffer[1] = I1;</div><div class='del'>-  MDp-&gt;buffer[2] = I2;</div><div class='del'>-  MDp-&gt;buffer[3] = I3;</div><div class='del'>-  for (i=0;i&lt;8;i++) MDp-&gt;count[i] = 0;</div><div class='del'>-  MDp-&gt;done = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* MDblock(MDp,X)</div><div class='del'>-** Update message digest buffer MDp-&gt;buffer using 16-word data block X.</div><div class='del'>-** Assumes all 16 words of X are full of data.</div><div class='del'>-** Does not update MDp-&gt;count.</div><div class='del'>-** This routine is not user-callable.</div><div class='del'>-*/</div><div class='del'>-static void</div><div class='del'>-MDblock(MDp,Xb)</div><div class='del'>-MD4_CTX *MDp;</div><div class='del'>-unsigned char *Xb;</div><div class='del'>-{</div><div class='del'>-  register unsigned int tmp, A, B, C, D;</div><div class='del'>-  unsigned int X[16];</div><div class='del'>-  int i;</div><div class='del'>-</div><div class='del'>-  for (i = 0; i &lt; 16; ++i) {</div><div class='del'>-    X[i] = Xb[0] + (Xb[1] &lt;&lt; 8) + (Xb[2] &lt;&lt; 16) + (Xb[3] &lt;&lt; 24);</div><div class='del'>-    Xb += 4;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  A = MDp-&gt;buffer[0];</div><div class='del'>-  B = MDp-&gt;buffer[1];</div><div class='del'>-  C = MDp-&gt;buffer[2];</div><div class='del'>-  D = MDp-&gt;buffer[3];</div><div class='del'>-  /* Update the message digest buffer */</div><div class='del'>-  ff(A , B , C , D ,  0 , fs1); /* Round 1 */</div><div class='del'>-  ff(D , A , B , C ,  1 , fs2);</div><div class='del'>-  ff(C , D , A , B ,  2 , fs3);</div><div class='del'>-  ff(B , C , D , A ,  3 , fs4);</div><div class='del'>-  ff(A , B , C , D ,  4 , fs1);</div><div class='del'>-  ff(D , A , B , C ,  5 , fs2);</div><div class='del'>-  ff(C , D , A , B ,  6 , fs3);</div><div class='del'>-  ff(B , C , D , A ,  7 , fs4);</div><div class='del'>-  ff(A , B , C , D ,  8 , fs1);</div><div class='del'>-  ff(D , A , B , C ,  9 , fs2);</div><div class='del'>-  ff(C , D , A , B , 10 , fs3);</div><div class='del'>-  ff(B , C , D , A , 11 , fs4);</div><div class='del'>-  ff(A , B , C , D , 12 , fs1);</div><div class='del'>-  ff(D , A , B , C , 13 , fs2);</div><div class='del'>-  ff(C , D , A , B , 14 , fs3);</div><div class='del'>-  ff(B , C , D , A , 15 , fs4);</div><div class='del'>-  gg(A , B , C , D ,  0 , gs1); /* Round 2 */</div><div class='del'>-  gg(D , A , B , C ,  4 , gs2);</div><div class='del'>-  gg(C , D , A , B ,  8 , gs3);</div><div class='del'>-  gg(B , C , D , A , 12 , gs4);</div><div class='del'>-  gg(A , B , C , D ,  1 , gs1);</div><div class='del'>-  gg(D , A , B , C ,  5 , gs2);</div><div class='del'>-  gg(C , D , A , B ,  9 , gs3);</div><div class='del'>-  gg(B , C , D , A , 13 , gs4);</div><div class='del'>-  gg(A , B , C , D ,  2 , gs1);</div><div class='del'>-  gg(D , A , B , C ,  6 , gs2);</div><div class='del'>-  gg(C , D , A , B , 10 , gs3);</div><div class='del'>-  gg(B , C , D , A , 14 , gs4);</div><div class='del'>-  gg(A , B , C , D ,  3 , gs1);</div><div class='del'>-  gg(D , A , B , C ,  7 , gs2);</div><div class='del'>-  gg(C , D , A , B , 11 , gs3);</div><div class='del'>-  gg(B , C , D , A , 15 , gs4);</div><div class='del'>-  hh(A , B , C , D ,  0 , hs1); /* Round 3 */</div><div class='del'>-  hh(D , A , B , C ,  8 , hs2);</div><div class='del'>-  hh(C , D , A , B ,  4 , hs3);</div><div class='del'>-  hh(B , C , D , A , 12 , hs4);</div><div class='del'>-  hh(A , B , C , D ,  2 , hs1);</div><div class='del'>-  hh(D , A , B , C , 10 , hs2);</div><div class='del'>-  hh(C , D , A , B ,  6 , hs3);</div><div class='del'>-  hh(B , C , D , A , 14 , hs4);</div><div class='del'>-  hh(A , B , C , D ,  1 , hs1);</div><div class='del'>-  hh(D , A , B , C ,  9 , hs2);</div><div class='del'>-  hh(C , D , A , B ,  5 , hs3);</div><div class='del'>-  hh(B , C , D , A , 13 , hs4);</div><div class='del'>-  hh(A , B , C , D ,  3 , hs1);</div><div class='del'>-  hh(D , A , B , C , 11 , hs2);</div><div class='del'>-  hh(C , D , A , B ,  7 , hs3);</div><div class='del'>-  hh(B , C , D , A , 15 , hs4);</div><div class='del'>-  MDp-&gt;buffer[0] += A;</div><div class='del'>-  MDp-&gt;buffer[1] += B;</div><div class='del'>-  MDp-&gt;buffer[2] += C;</div><div class='del'>-  MDp-&gt;buffer[3] += D;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* MD4Update(MDp,X,count)</div><div class='del'>-** Input: X -- a pointer to an array of unsigned characters.</div><div class='del'>-**        count -- the number of bits of X to use.</div><div class='del'>-**          (if not a multiple of 8, uses high bits of last byte.)</div><div class='del'>-** Update MDp using the number of bits of X given by count.</div><div class='del'>-** This is the basic input routine for an MD4 user.</div><div class='del'>-** The routine completes the MD computation when count &lt; 512, so</div><div class='del'>-** every MD computation should end with one call to MD4Update with a</div><div class='del'>-** count less than 512.  A call with count 0 will be ignored if the</div><div class='del'>-** MD has already been terminated (done != 0), so an extra call with</div><div class='del'>-** count 0 can be given as a "courtesy close" to force termination</div><div class='del'>-** if desired.</div><div class='del'>-*/</div><div class='del'>-void</div><div class='del'>-MD4Update(MDp,X,count)</div><div class='del'>-MD4_CTX *MDp;</div><div class='del'>-unsigned char *X;</div><div class='del'>-unsigned int count;</div><div class='del'>-{</div><div class='del'>-  unsigned int i, tmp, bit, byte, mask;</div><div class='del'>-  unsigned char XX[64];</div><div class='del'>-  unsigned char *p;</div><div class='del'>-</div><div class='del'>-  /* return with no error if this is a courtesy close with count</div><div class='del'>-  ** zero and MDp-&gt;done is true.</div><div class='del'>-  */</div><div class='del'>-  if (count == 0 &amp;&amp; MDp-&gt;done) return;</div><div class='del'>-  /* check to see if MD is already done and report error */</div><div class='del'>-  if (MDp-&gt;done)</div><div class='del'>-  { printf("\nError: MD4Update MD already done."); return; }</div><div class='del'>-</div><div class='del'>-  /* Add count to MDp-&gt;count */</div><div class='del'>-  tmp = count;</div><div class='del'>-  p = MDp-&gt;count;</div><div class='del'>-  while (tmp)</div><div class='del'>-  { tmp += *p;</div><div class='del'>-  *p++ = tmp;</div><div class='del'>-  tmp = tmp &gt;&gt; 8;</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-  /* Process data */</div><div class='del'>-  if (count == 512)</div><div class='del'>-  { /* Full block of data to handle */</div><div class='del'>-    MDblock(MDp,X);</div><div class='del'>-  }</div><div class='del'>-  else if (count &gt; 512) /* Check for count too large */</div><div class='del'>-  {</div><div class='del'>-    printf("\nError: MD4Update called with illegal count value %d.",</div><div class='del'>-	   count);</div><div class='del'>-    return;</div><div class='del'>-  }</div><div class='del'>-  else /* partial block -- must be last block so finish up */</div><div class='del'>-  {</div><div class='del'>-    /* Find out how many bytes and residual bits there are */</div><div class='del'>-    byte = count &gt;&gt; 3;</div><div class='del'>-    bit =  count &amp; 7;</div><div class='del'>-    /* Copy X into XX since we need to modify it */</div><div class='del'>-    for (i=0;i&lt;=byte;i++)   XX[i] = X[i];</div><div class='del'>-    for (i=byte+1;i&lt;64;i++) XX[i] = 0;</div><div class='del'>-    /* Add padding '1' bit and low-order zeros in last byte */</div><div class='del'>-    mask = 1 &lt;&lt; (7 - bit);</div><div class='del'>-    XX[byte] = (XX[byte] | mask) &amp; ~( mask - 1);</div><div class='del'>-    /* If room for bit count, finish up with this block */</div><div class='del'>-    if (byte &lt;= 55)</div><div class='del'>-    {</div><div class='del'>-      for (i=0;i&lt;8;i++) XX[56+i] = MDp-&gt;count[i];</div><div class='del'>-      MDblock(MDp,XX);</div><div class='del'>-    }</div><div class='del'>-    else /* need to do two blocks to finish up */</div><div class='del'>-    {</div><div class='del'>-      MDblock(MDp,XX);</div><div class='del'>-      for (i=0;i&lt;56;i++) XX[i] = 0;</div><div class='del'>-      for (i=0;i&lt;8;i++)  XX[56+i] = MDp-&gt;count[i];</div><div class='del'>-      MDblock(MDp,XX);</div><div class='del'>-    }</div><div class='del'>-    /* Set flag saying we're done with MD computation */</div><div class='del'>-    MDp-&gt;done = 1;</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-** Finish up MD4 computation and return message digest.</div><div class='del'>-*/</div><div class='del'>-void</div><div class='del'>-MD4Final(buf, MD)</div><div class='del'>-unsigned char *buf;</div><div class='del'>-MD4_CTX *MD;</div><div class='del'>-{</div><div class='del'>-  int i, j;</div><div class='del'>-  unsigned int w;</div><div class='del'>-</div><div class='del'>-  MD4Update(MD, NULL, 0);</div><div class='del'>-  for (i = 0; i &lt; 4; ++i) {</div><div class='del'>-    w = MD-&gt;buffer[i];</div><div class='del'>-    for (j = 0; j &lt; 4; ++j) {</div><div class='del'>-      *buf++ = w;</div><div class='del'>-      w &gt;&gt;= 8;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-** End of md4.c</div><div class='del'>-****************************(cut)***********************************/</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/md4.h b/mdk-stage1/ppp/pppd/md4.h<br/>deleted file mode 100644<br/>index 80e8f9a2a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/md4.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/md4.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,64 +0,0 @@</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-** ********************************************************************</div><div class='del'>-** md4.h -- Header file for implementation of                        **</div><div class='del'>-** MD4 Message Digest Algorithm                                      **</div><div class='del'>-** Updated: 2/13/90 by Ronald L. Rivest                              **</div><div class='del'>-** (C) 1990 RSA Data Security, Inc.                                  **</div><div class='del'>-** ********************************************************************</div><div class='del'>-*/</div><div class='del'>-</div><div class='del'>-#ifndef __P</div><div class='del'>-# if defined(__STDC__) || defined(__GNUC__)</div><div class='del'>-#  define __P(x) x</div><div class='del'>-# else</div><div class='del'>-#  define __P(x) ()</div><div class='del'>-# endif</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/* MDstruct is the data structure for a message digest computation.</div><div class='del'>-*/</div><div class='del'>-typedef struct {</div><div class='del'>-	unsigned int buffer[4]; /* Holds 4-word result of MD computation */</div><div class='del'>-	unsigned char count[8]; /* Number of bits processed so far */</div><div class='del'>-	unsigned int done;      /* Nonzero means MD computation finished */</div><div class='del'>-} MD4_CTX;</div><div class='del'>-</div><div class='del'>-/* MD4Init(MD4_CTX *)</div><div class='del'>-** Initialize the MD4_CTX prepatory to doing a message digest</div><div class='del'>-** computation.</div><div class='del'>-*/</div><div class='del'>-extern void MD4Init __P((MD4_CTX *MD));</div><div class='del'>-</div><div class='del'>-/* MD4Update(MD,X,count)</div><div class='del'>-** Input: X -- a pointer to an array of unsigned characters.</div><div class='del'>-**        count -- the number of bits of X to use (an unsigned int).</div><div class='del'>-** Updates MD using the first "count" bits of X.</div><div class='del'>-** The array pointed to by X is not modified.</div><div class='del'>-** If count is not a multiple of 8, MD4Update uses high bits of</div><div class='del'>-** last byte.</div><div class='del'>-** This is the basic input routine for a user.</div><div class='del'>-** The routine terminates the MD computation when count &lt; 512, so</div><div class='del'>-** every MD computation should end with one call to MD4Update with a</div><div class='del'>-** count less than 512.  Zero is OK for a count.</div><div class='del'>-*/</div><div class='del'>-extern void MD4Update __P((MD4_CTX *MD, unsigned char *X, unsigned int count));</div><div class='del'>-</div><div class='del'>-/* MD4Print(MD)</div><div class='del'>-** Prints message digest buffer MD as 32 hexadecimal digits.</div><div class='del'>-** Order is from low-order byte of buffer[0] to high-order byte</div><div class='del'>-** of buffer[3].</div><div class='del'>-** Each byte is printed with high-order hexadecimal digit first.</div><div class='del'>-*/</div><div class='del'>-extern void MD4Print __P((MD4_CTX *));</div><div class='del'>-</div><div class='del'>-/* MD4Final(buf, MD)</div><div class='del'>-** Returns message digest from MD and terminates the message</div><div class='del'>-** digest computation.</div><div class='del'>-*/</div><div class='del'>-extern void MD4Final __P((unsigned char *, MD4_CTX *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>-** End of md4.h</div><div class='del'>-****************************(cut)***********************************/</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/md5.c b/mdk-stage1/ppp/pppd/md5.c<br/>deleted file mode 100644<br/>index 0b8de3aae..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/md5.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/md5.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,309 +0,0 @@</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- ** md5.c -- the source code for MD5 routines                         **</div><div class='del'>- ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **</div><div class='del'>- ** Created: 2/17/90 RLR                                              **</div><div class='del'>- ** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. **</div><div class='del'>- ***********************************************************************</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** License to copy and use this software is granted provided that    **</div><div class='del'>- ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **</div><div class='del'>- ** Digest Algorithm" in all material mentioning or referencing this  **</div><div class='del'>- ** software or this function.                                        **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** License is also granted to make and use derivative works          **</div><div class='del'>- ** provided that such works are identified as "derived from the RSA  **</div><div class='del'>- ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **</div><div class='del'>- ** material mentioning or referencing the derived work.              **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** RSA Data Security, Inc. makes no representations concerning       **</div><div class='del'>- ** either the merchantability of this software or the suitability    **</div><div class='del'>- ** of this software for any particular purpose.  It is provided "as  **</div><div class='del'>- ** is" without express or implied warranty of any kind.              **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** These notices must be retained in any copies of any part of this  **</div><div class='del'>- ** documentation and/or software.                                    **</div><div class='del'>- ***********************************************************************</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-</div><div class='del'>-#include "md5.h"</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- **  Message-digest routines:                                         **</div><div class='del'>- **  To form the message digest for a message M                       **</div><div class='del'>- **    (1) Initialize a context buffer mdContext using MD5Init        **</div><div class='del'>- **    (2) Call MD5Update on mdContext and M                          **</div><div class='del'>- **    (3) Call MD5Final on mdContext                                 **</div><div class='del'>- **  The message digest is now in mdContext-&gt;digest[0...15]           **</div><div class='del'>- ***********************************************************************</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* forward declaration */</div><div class='del'>-static void Transform ();</div><div class='del'>-</div><div class='del'>-static unsigned char PADDING[64] = {</div><div class='del'>-  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</div><div class='del'>-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* F, G, H and I are basic MD5 functions */</div><div class='del'>-#define F(x, y, z) (((x) &amp; (y)) | ((~x) &amp; (z)))</div><div class='del'>-#define G(x, y, z) (((x) &amp; (z)) | ((y) &amp; (~z)))</div><div class='del'>-#define H(x, y, z) ((x) ^ (y) ^ (z))</div><div class='del'>-#define I(x, y, z) ((y) ^ ((x) | (~z)))</div><div class='del'>-</div><div class='del'>-/* ROTATE_LEFT rotates x left n bits */</div><div class='del'>-#define ROTATE_LEFT(x, n) (((x) &lt;&lt; (n)) | ((x) &gt;&gt; (32-(n))))</div><div class='del'>-</div><div class='del'>-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */</div><div class='del'>-/* Rotation is separate from addition to prevent recomputation */</div><div class='del'>-#define FF(a, b, c, d, x, s, ac) \</div><div class='del'>-  {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \</div><div class='del'>-   (a) = ROTATE_LEFT ((a), (s)); \</div><div class='del'>-   (a) += (b); \</div><div class='del'>-  }</div><div class='del'>-#define GG(a, b, c, d, x, s, ac) \</div><div class='del'>-  {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \</div><div class='del'>-   (a) = ROTATE_LEFT ((a), (s)); \</div><div class='del'>-   (a) += (b); \</div><div class='del'>-  }</div><div class='del'>-#define HH(a, b, c, d, x, s, ac) \</div><div class='del'>-  {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \</div><div class='del'>-   (a) = ROTATE_LEFT ((a), (s)); \</div><div class='del'>-   (a) += (b); \</div><div class='del'>-  }</div><div class='del'>-#define II(a, b, c, d, x, s, ac) \</div><div class='del'>-  {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \</div><div class='del'>-   (a) = ROTATE_LEFT ((a), (s)); \</div><div class='del'>-   (a) += (b); \</div><div class='del'>-  }</div><div class='del'>-</div><div class='del'>-#ifdef __STDC__</div><div class='del'>-#define UL(x)	x##U</div><div class='del'>-#else</div><div class='del'>-#define UL(x)	x</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* The routine MD5Init initializes the message-digest context</div><div class='del'>-   mdContext. All fields are set to zero.</div><div class='del'>- */</div><div class='del'>-void MD5Init (mdContext)</div><div class='del'>-MD5_CTX *mdContext;</div><div class='del'>-{</div><div class='del'>-  mdContext-&gt;i[0] = mdContext-&gt;i[1] = (UINT4)0;</div><div class='del'>-</div><div class='del'>-  /* Load magic initialization constants.</div><div class='del'>-   */</div><div class='del'>-  mdContext-&gt;buf[0] = (UINT4)0x67452301;</div><div class='del'>-  mdContext-&gt;buf[1] = (UINT4)0xefcdab89;</div><div class='del'>-  mdContext-&gt;buf[2] = (UINT4)0x98badcfe;</div><div class='del'>-  mdContext-&gt;buf[3] = (UINT4)0x10325476;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* The routine MD5Update updates the message-digest context to</div><div class='del'>-   account for the presence of each of the characters inBuf[0..inLen-1]</div><div class='del'>-   in the message whose digest is being computed.</div><div class='del'>- */</div><div class='del'>-void MD5Update (mdContext, inBuf, inLen)</div><div class='del'>-MD5_CTX *mdContext;</div><div class='del'>-unsigned char *inBuf;</div><div class='del'>-unsigned int inLen;</div><div class='del'>-{</div><div class='del'>-  UINT4 in[16];</div><div class='del'>-  int mdi;</div><div class='del'>-  unsigned int i, ii;</div><div class='del'>-</div><div class='del'>-  /* compute number of bytes mod 64 */</div><div class='del'>-  mdi = (int)((mdContext-&gt;i[0] &gt;&gt; 3) &amp; 0x3F);</div><div class='del'>-</div><div class='del'>-  /* update number of bits */</div><div class='del'>-  if ((mdContext-&gt;i[0] + ((UINT4)inLen &lt;&lt; 3)) &lt; mdContext-&gt;i[0])</div><div class='del'>-    mdContext-&gt;i[1]++;</div><div class='del'>-  mdContext-&gt;i[0] += ((UINT4)inLen &lt;&lt; 3);</div><div class='del'>-  mdContext-&gt;i[1] += ((UINT4)inLen &gt;&gt; 29);</div><div class='del'>-</div><div class='del'>-  while (inLen--) {</div><div class='del'>-    /* add new character to buffer, increment mdi */</div><div class='del'>-    mdContext-&gt;in[mdi++] = *inBuf++;</div><div class='del'>-</div><div class='del'>-    /* transform if necessary */</div><div class='del'>-    if (mdi == 0x40) {</div><div class='del'>-      for (i = 0, ii = 0; i &lt; 16; i++, ii += 4)</div><div class='del'>-        in[i] = (((UINT4)mdContext-&gt;in[ii+3]) &lt;&lt; 24) |</div><div class='del'>-                (((UINT4)mdContext-&gt;in[ii+2]) &lt;&lt; 16) |</div><div class='del'>-                (((UINT4)mdContext-&gt;in[ii+1]) &lt;&lt; 8) |</div><div class='del'>-                ((UINT4)mdContext-&gt;in[ii]);</div><div class='del'>-      Transform (mdContext-&gt;buf, in);</div><div class='del'>-      mdi = 0;</div><div class='del'>-    }</div><div class='del'>-  }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* The routine MD5Final terminates the message-digest computation and</div><div class='del'>-   ends with the desired message digest in mdContext-&gt;digest[0...15].</div><div class='del'>- */</div><div class='del'>-void MD5Final (hash, mdContext)</div><div class='del'>-unsigned char hash[];</div><div class='del'>-MD5_CTX *mdContext;</div><div class='del'>-{</div><div class='del'>-  UINT4 in[16];</div><div class='del'>-  int mdi;</div><div class='del'>-  unsigned int i, ii;</div><div class='del'>-  unsigned int padLen;</div><div class='del'>-</div><div class='del'>-  /* save number of bits */</div><div class='del'>-  in[14] = mdContext-&gt;i[0];</div><div class='del'>-  in[15] = mdContext-&gt;i[1];</div><div class='del'>-</div><div class='del'>-  /* compute number of bytes mod 64 */</div><div class='del'>-  mdi = (int)((mdContext-&gt;i[0] &gt;&gt; 3) &amp; 0x3F);</div><div class='del'>-</div><div class='del'>-  /* pad out to 56 mod 64 */</div><div class='del'>-  padLen = (mdi &lt; 56) ? (56 - mdi) : (120 - mdi);</div><div class='del'>-  MD5Update (mdContext, PADDING, padLen);</div><div class='del'>-</div><div class='del'>-  /* append length in bits and transform */</div><div class='del'>-  for (i = 0, ii = 0; i &lt; 14; i++, ii += 4)</div><div class='del'>-    in[i] = (((UINT4)mdContext-&gt;in[ii+3]) &lt;&lt; 24) |</div><div class='del'>-            (((UINT4)mdContext-&gt;in[ii+2]) &lt;&lt; 16) |</div><div class='del'>-            (((UINT4)mdContext-&gt;in[ii+1]) &lt;&lt; 8) |</div><div class='del'>-            ((UINT4)mdContext-&gt;in[ii]);</div><div class='del'>-  Transform (mdContext-&gt;buf, in);</div><div class='del'>-</div><div class='del'>-  /* store buffer in digest */</div><div class='del'>-  for (i = 0, ii = 0; i &lt; 4; i++, ii += 4) {</div><div class='del'>-    mdContext-&gt;digest[ii] = (unsigned char)(mdContext-&gt;buf[i] &amp; 0xFF);</div><div class='del'>-    mdContext-&gt;digest[ii+1] =</div><div class='del'>-      (unsigned char)((mdContext-&gt;buf[i] &gt;&gt; 8) &amp; 0xFF);</div><div class='del'>-    mdContext-&gt;digest[ii+2] =</div><div class='del'>-      (unsigned char)((mdContext-&gt;buf[i] &gt;&gt; 16) &amp; 0xFF);</div><div class='del'>-    mdContext-&gt;digest[ii+3] =</div><div class='del'>-      (unsigned char)((mdContext-&gt;buf[i] &gt;&gt; 24) &amp; 0xFF);</div><div class='del'>-  }</div><div class='del'>-  memcpy(hash, mdContext-&gt;digest, 16);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/* Basic MD5 step. Transforms buf based on in.</div><div class='del'>- */</div><div class='del'>-static void Transform (buf, in)</div><div class='del'>-UINT4 *buf;</div><div class='del'>-UINT4 *in;</div><div class='del'>-{</div><div class='del'>-  UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];</div><div class='del'>-</div><div class='del'>-  /* Round 1 */</div><div class='del'>-#define S11 7</div><div class='del'>-#define S12 12</div><div class='del'>-#define S13 17</div><div class='del'>-#define S14 22</div><div class='del'>-  FF ( a, b, c, d, in[ 0], S11, UL(3614090360)); /* 1 */</div><div class='del'>-  FF ( d, a, b, c, in[ 1], S12, UL(3905402710)); /* 2 */</div><div class='del'>-  FF ( c, d, a, b, in[ 2], S13, UL( 606105819)); /* 3 */</div><div class='del'>-  FF ( b, c, d, a, in[ 3], S14, UL(3250441966)); /* 4 */</div><div class='del'>-  FF ( a, b, c, d, in[ 4], S11, UL(4118548399)); /* 5 */</div><div class='del'>-  FF ( d, a, b, c, in[ 5], S12, UL(1200080426)); /* 6 */</div><div class='del'>-  FF ( c, d, a, b, in[ 6], S13, UL(2821735955)); /* 7 */</div><div class='del'>-  FF ( b, c, d, a, in[ 7], S14, UL(4249261313)); /* 8 */</div><div class='del'>-  FF ( a, b, c, d, in[ 8], S11, UL(1770035416)); /* 9 */</div><div class='del'>-  FF ( d, a, b, c, in[ 9], S12, UL(2336552879)); /* 10 */</div><div class='del'>-  FF ( c, d, a, b, in[10], S13, UL(4294925233)); /* 11 */</div><div class='del'>-  FF ( b, c, d, a, in[11], S14, UL(2304563134)); /* 12 */</div><div class='del'>-  FF ( a, b, c, d, in[12], S11, UL(1804603682)); /* 13 */</div><div class='del'>-  FF ( d, a, b, c, in[13], S12, UL(4254626195)); /* 14 */</div><div class='del'>-  FF ( c, d, a, b, in[14], S13, UL(2792965006)); /* 15 */</div><div class='del'>-  FF ( b, c, d, a, in[15], S14, UL(1236535329)); /* 16 */</div><div class='del'>-</div><div class='del'>-  /* Round 2 */</div><div class='del'>-#define S21 5</div><div class='del'>-#define S22 9</div><div class='del'>-#define S23 14</div><div class='del'>-#define S24 20</div><div class='del'>-  GG ( a, b, c, d, in[ 1], S21, UL(4129170786)); /* 17 */</div><div class='del'>-  GG ( d, a, b, c, in[ 6], S22, UL(3225465664)); /* 18 */</div><div class='del'>-  GG ( c, d, a, b, in[11], S23, UL( 643717713)); /* 19 */</div><div class='del'>-  GG ( b, c, d, a, in[ 0], S24, UL(3921069994)); /* 20 */</div><div class='del'>-  GG ( a, b, c, d, in[ 5], S21, UL(3593408605)); /* 21 */</div><div class='del'>-  GG ( d, a, b, c, in[10], S22, UL(  38016083)); /* 22 */</div><div class='del'>-  GG ( c, d, a, b, in[15], S23, UL(3634488961)); /* 23 */</div><div class='del'>-  GG ( b, c, d, a, in[ 4], S24, UL(3889429448)); /* 24 */</div><div class='del'>-  GG ( a, b, c, d, in[ 9], S21, UL( 568446438)); /* 25 */</div><div class='del'>-  GG ( d, a, b, c, in[14], S22, UL(3275163606)); /* 26 */</div><div class='del'>-  GG ( c, d, a, b, in[ 3], S23, UL(4107603335)); /* 27 */</div><div class='del'>-  GG ( b, c, d, a, in[ 8], S24, UL(1163531501)); /* 28 */</div><div class='del'>-  GG ( a, b, c, d, in[13], S21, UL(2850285829)); /* 29 */</div><div class='del'>-  GG ( d, a, b, c, in[ 2], S22, UL(4243563512)); /* 30 */</div><div class='del'>-  GG ( c, d, a, b, in[ 7], S23, UL(1735328473)); /* 31 */</div><div class='del'>-  GG ( b, c, d, a, in[12], S24, UL(2368359562)); /* 32 */</div><div class='del'>-</div><div class='del'>-  /* Round 3 */</div><div class='del'>-#define S31 4</div><div class='del'>-#define S32 11</div><div class='del'>-#define S33 16</div><div class='del'>-#define S34 23</div><div class='del'>-  HH ( a, b, c, d, in[ 5], S31, UL(4294588738)); /* 33 */</div><div class='del'>-  HH ( d, a, b, c, in[ 8], S32, UL(2272392833)); /* 34 */</div><div class='del'>-  HH ( c, d, a, b, in[11], S33, UL(1839030562)); /* 35 */</div><div class='del'>-  HH ( b, c, d, a, in[14], S34, UL(4259657740)); /* 36 */</div><div class='del'>-  HH ( a, b, c, d, in[ 1], S31, UL(2763975236)); /* 37 */</div><div class='del'>-  HH ( d, a, b, c, in[ 4], S32, UL(1272893353)); /* 38 */</div><div class='del'>-  HH ( c, d, a, b, in[ 7], S33, UL(4139469664)); /* 39 */</div><div class='del'>-  HH ( b, c, d, a, in[10], S34, UL(3200236656)); /* 40 */</div><div class='del'>-  HH ( a, b, c, d, in[13], S31, UL( 681279174)); /* 41 */</div><div class='del'>-  HH ( d, a, b, c, in[ 0], S32, UL(3936430074)); /* 42 */</div><div class='del'>-  HH ( c, d, a, b, in[ 3], S33, UL(3572445317)); /* 43 */</div><div class='del'>-  HH ( b, c, d, a, in[ 6], S34, UL(  76029189)); /* 44 */</div><div class='del'>-  HH ( a, b, c, d, in[ 9], S31, UL(3654602809)); /* 45 */</div><div class='del'>-  HH ( d, a, b, c, in[12], S32, UL(3873151461)); /* 46 */</div><div class='del'>-  HH ( c, d, a, b, in[15], S33, UL( 530742520)); /* 47 */</div><div class='del'>-  HH ( b, c, d, a, in[ 2], S34, UL(3299628645)); /* 48 */</div><div class='del'>-</div><div class='del'>-  /* Round 4 */</div><div class='del'>-#define S41 6</div><div class='del'>-#define S42 10</div><div class='del'>-#define S43 15</div><div class='del'>-#define S44 21</div><div class='del'>-  II ( a, b, c, d, in[ 0], S41, UL(4096336452)); /* 49 */</div><div class='del'>-  II ( d, a, b, c, in[ 7], S42, UL(1126891415)); /* 50 */</div><div class='del'>-  II ( c, d, a, b, in[14], S43, UL(2878612391)); /* 51 */</div><div class='del'>-  II ( b, c, d, a, in[ 5], S44, UL(4237533241)); /* 52 */</div><div class='del'>-  II ( a, b, c, d, in[12], S41, UL(1700485571)); /* 53 */</div><div class='del'>-  II ( d, a, b, c, in[ 3], S42, UL(2399980690)); /* 54 */</div><div class='del'>-  II ( c, d, a, b, in[10], S43, UL(4293915773)); /* 55 */</div><div class='del'>-  II ( b, c, d, a, in[ 1], S44, UL(2240044497)); /* 56 */</div><div class='del'>-  II ( a, b, c, d, in[ 8], S41, UL(1873313359)); /* 57 */</div><div class='del'>-  II ( d, a, b, c, in[15], S42, UL(4264355552)); /* 58 */</div><div class='del'>-  II ( c, d, a, b, in[ 6], S43, UL(2734768916)); /* 59 */</div><div class='del'>-  II ( b, c, d, a, in[13], S44, UL(1309151649)); /* 60 */</div><div class='del'>-  II ( a, b, c, d, in[ 4], S41, UL(4149444226)); /* 61 */</div><div class='del'>-  II ( d, a, b, c, in[11], S42, UL(3174756917)); /* 62 */</div><div class='del'>-  II ( c, d, a, b, in[ 2], S43, UL( 718787259)); /* 63 */</div><div class='del'>-  II ( b, c, d, a, in[ 9], S44, UL(3951481745)); /* 64 */</div><div class='del'>-</div><div class='del'>-  buf[0] += a;</div><div class='del'>-  buf[1] += b;</div><div class='del'>-  buf[2] += c;</div><div class='del'>-  buf[3] += d;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- ** End of md5.c                                                      **</div><div class='del'>- ******************************** (cut) ********************************</div><div class='del'>- */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/md5.h b/mdk-stage1/ppp/pppd/md5.h<br/>deleted file mode 100644<br/>index 7492b2228..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/md5.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/md5.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,58 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- ** md5.h -- header file for implementation of MD5                    **</div><div class='del'>- ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **</div><div class='del'>- ** Created: 2/17/90 RLR                                              **</div><div class='del'>- ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **</div><div class='del'>- ** Revised (for MD5): RLR 4/27/91                                    **</div><div class='del'>- **   -- G modified to have y&amp;~z instead of y&amp;z                       **</div><div class='del'>- **   -- FF, GG, HH modified to add in last register done             **</div><div class='del'>- **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **</div><div class='del'>- **   -- distinct additive constant for each step                     **</div><div class='del'>- **   -- round 4 added, working mod 7                                 **</div><div class='del'>- ***********************************************************************</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- ***********************************************************************</div><div class='del'>- ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** License to copy and use this software is granted provided that    **</div><div class='del'>- ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **</div><div class='del'>- ** Digest Algorithm" in all material mentioning or referencing this  **</div><div class='del'>- ** software or this function.                                        **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** License is also granted to make and use derivative works          **</div><div class='del'>- ** provided that such works are identified as "derived from the RSA  **</div><div class='del'>- ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **</div><div class='del'>- ** material mentioning or referencing the derived work.              **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** RSA Data Security, Inc. makes no representations concerning       **</div><div class='del'>- ** either the merchantability of this software or the suitability    **</div><div class='del'>- ** of this software for any particular purpose.  It is provided "as  **</div><div class='del'>- ** is" without express or implied warranty of any kind.              **</div><div class='del'>- **                                                                   **</div><div class='del'>- ** These notices must be retained in any copies of any part of this  **</div><div class='del'>- ** documentation and/or software.                                    **</div><div class='del'>- ***********************************************************************</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __MD5_INCLUDE__</div><div class='del'>-</div><div class='del'>-/* typedef a 32-bit type */</div><div class='del'>-typedef unsigned int UINT4;</div><div class='del'>-</div><div class='del'>-/* Data structure for MD5 (Message-Digest) computation */</div><div class='del'>-typedef struct {</div><div class='del'>-  UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */</div><div class='del'>-  UINT4 buf[4];                                    /* scratch buffer */</div><div class='del'>-  unsigned char in[64];                              /* input buffer */</div><div class='del'>-  unsigned char digest[16];     /* actual digest after MD5Final call */</div><div class='del'>-} MD5_CTX;</div><div class='del'>-</div><div class='del'>-void MD5Init ();</div><div class='del'>-void MD5Update ();</div><div class='del'>-void MD5Final ();</div><div class='del'>-</div><div class='del'>-#define __MD5_INCLUDE__</div><div class='del'>-#endif /* __MD5_INCLUDE__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/multilink.c b/mdk-stage1/ppp/pppd/multilink.c<br/>deleted file mode 100644<br/>index c30b07e0a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/multilink.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/multilink.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,397 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * multilink.c - support routines for multilink.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 2000 Paul Mackerras.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms.  The name of the author may not be</div><div class='del'>- * used to endorse or promote products derived from this software</div><div class='del'>- * without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;netdb.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-#include "tdb.h"</div><div class='del'>-</div><div class='del'>-bool endpoint_specified;	/* user gave explicit endpoint discriminator */</div><div class='del'>-char *bundle_id;		/* identifier for our bundle */</div><div class='del'>-</div><div class='del'>-extern TDB_CONTEXT *pppdb;</div><div class='del'>-extern char db_key[];</div><div class='del'>-</div><div class='del'>-static int get_default_epdisc __P((struct epdisc *));</div><div class='del'>-static int parse_num __P((char *str, const char *key, int *valp));</div><div class='del'>-static int owns_unit __P((TDB_DATA pid, int unit));</div><div class='del'>-</div><div class='del'>-#define set_ip_epdisc(ep, addr) do {	\</div><div class='del'>-	ep-&gt;length = 4;			\</div><div class='del'>-	ep-&gt;value[0] = addr &gt;&gt; 24;	\</div><div class='del'>-	ep-&gt;value[1] = addr &gt;&gt; 16;	\</div><div class='del'>-	ep-&gt;value[2] = addr &gt;&gt; 8;	\</div><div class='del'>-	ep-&gt;value[3] = addr;		\</div><div class='del'>-} while (0)</div><div class='del'>-</div><div class='del'>-#define LOCAL_IP_ADDR(addr)						  \</div><div class='del'>-	(((addr) &amp; 0xff000000) == 0x0a000000		/* 10.x.x.x */	  \</div><div class='del'>-	 || ((addr) &amp; 0xfff00000) == 0xac100000		/* 172.16.x.x */  \</div><div class='del'>-	 || ((addr) &amp; 0xffff0000) == 0xc0a80000)	/* 192.168.x.x */</div><div class='del'>-</div><div class='del'>-#define process_exists(n)	(kill((n), 0) == 0 || errno != ESRCH)</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-mp_check_options()</div><div class='del'>-{</div><div class='del'>-	lcp_options *wo = &amp;lcp_wantoptions[0];</div><div class='del'>-	lcp_options *ao = &amp;lcp_allowoptions[0];</div><div class='del'>-</div><div class='del'>-	if (!multilink)</div><div class='del'>-		return;</div><div class='del'>-	/* if we're doing multilink, we have to negotiate MRRU */</div><div class='del'>-	if (!wo-&gt;neg_mrru) {</div><div class='del'>-		/* mrru not specified, default to mru */</div><div class='del'>-		wo-&gt;mrru = wo-&gt;mru;</div><div class='del'>-		wo-&gt;neg_mrru = 1;</div><div class='del'>-	}</div><div class='del'>-	ao-&gt;mrru = ao-&gt;mru;</div><div class='del'>-	ao-&gt;neg_mrru = 1;</div><div class='del'>-</div><div class='del'>-	if (!wo-&gt;neg_endpoint &amp;&amp; !noendpoint) {</div><div class='del'>-		/* get a default endpoint value */</div><div class='del'>-		wo-&gt;neg_endpoint = get_default_epdisc(&amp;wo-&gt;endpoint);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Make a new bundle or join us to an existing bundle</div><div class='del'>- * if we are doing multilink.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-mp_join_bundle()</div><div class='del'>-{</div><div class='del'>-	lcp_options *go = &amp;lcp_gotoptions[0];</div><div class='del'>-	lcp_options *ho = &amp;lcp_hisoptions[0];</div><div class='del'>-	lcp_options *ao = &amp;lcp_allowoptions[0];</div><div class='del'>-	int unit, pppd_pid;</div><div class='del'>-	int l, mtu;</div><div class='del'>-	char *p;</div><div class='del'>-	TDB_DATA key, pid, rec;</div><div class='del'>-</div><div class='del'>-	if (!go-&gt;neg_mrru || !ho-&gt;neg_mrru) {</div><div class='del'>-		/* not doing multilink */</div><div class='del'>-		if (go-&gt;neg_mrru)</div><div class='del'>-			notice("oops, multilink negotiated only for receive");</div><div class='del'>-		mtu = ho-&gt;neg_mru? ho-&gt;mru: PPP_MRU;</div><div class='del'>-		if (mtu &gt; ao-&gt;mru)</div><div class='del'>-			mtu = ao-&gt;mru;</div><div class='del'>-		if (demand) {</div><div class='del'>-			/* already have a bundle */</div><div class='del'>-			cfg_bundle(0, 0, 0, 0);</div><div class='del'>-			netif_set_mtu(0, mtu);</div><div class='del'>-			return 0;</div><div class='del'>-		}</div><div class='del'>-		make_new_bundle(0, 0, 0, 0);</div><div class='del'>-		set_ifunit(1);</div><div class='del'>-		netif_set_mtu(0, mtu);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Find the appropriate bundle or join a new one.</div><div class='del'>-	 * First we make up a name for the bundle.</div><div class='del'>-	 * The length estimate is worst-case assuming every</div><div class='del'>-	 * character has to be quoted.</div><div class='del'>-	 */</div><div class='del'>-	l = 4 * strlen(peer_authname) + 10;</div><div class='del'>-	if (ho-&gt;neg_endpoint)</div><div class='del'>-		l += 3 * ho-&gt;endpoint.length + 8;</div><div class='del'>-	if (bundle_name)</div><div class='del'>-		l += 3 * strlen(bundle_name) + 2;</div><div class='del'>-	bundle_id = malloc(l);</div><div class='del'>-	if (bundle_id == 0)</div><div class='del'>-		novm("bundle identifier");</div><div class='del'>-</div><div class='del'>-	p = bundle_id;</div><div class='del'>-	p += slprintf(p, l-1, "BUNDLE=\"%q\"", peer_authname);</div><div class='del'>-	if (ho-&gt;neg_endpoint || bundle_name)</div><div class='del'>-		*p++ = '/';</div><div class='del'>-	if (ho-&gt;neg_endpoint)</div><div class='del'>-		p += slprintf(p, bundle_id+l-p, "%s",</div><div class='del'>-			      epdisc_to_str(&amp;ho-&gt;endpoint));</div><div class='del'>-	if (bundle_name)</div><div class='del'>-		p += slprintf(p, bundle_id+l-p, "/%v", bundle_name);</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * For demand mode, we only need to configure the bundle</div><div class='del'>-	 * and attach the link.</div><div class='del'>-	 */</div><div class='del'>-	mtu = MIN(ho-&gt;mrru, ao-&gt;mru);</div><div class='del'>-	if (demand) {</div><div class='del'>-		cfg_bundle(go-&gt;mrru, ho-&gt;mrru, go-&gt;neg_ssnhf, ho-&gt;neg_ssnhf);</div><div class='del'>-		netif_set_mtu(0, mtu);</div><div class='del'>-		script_setenv("BUNDLE", bundle_id + 7, 1);</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Check if the bundle ID is already in the database.</div><div class='del'>-	 */</div><div class='del'>-	unit = -1;</div><div class='del'>-	tdb_writelock(pppdb);</div><div class='del'>-	key.dptr = bundle_id;</div><div class='del'>-	key.dsize = p - bundle_id;</div><div class='del'>-	pid = tdb_fetch(pppdb, key);</div><div class='del'>-	if (pid.dptr != NULL) {</div><div class='del'>-		/* bundle ID exists, see if the pppd record exists */</div><div class='del'>-		rec = tdb_fetch(pppdb, pid);</div><div class='del'>-		if (rec.dptr != NULL) {</div><div class='del'>-			/* it is, parse the interface number */</div><div class='del'>-			parse_num(rec.dptr, "IFNAME=ppp", &amp;unit);</div><div class='del'>-			/* check the pid value */</div><div class='del'>-			if (!parse_num(rec.dptr, "PPPD_PID=", &amp;pppd_pid)</div><div class='del'>-			    || !process_exists(pppd_pid)</div><div class='del'>-			    || !owns_unit(pid, unit))</div><div class='del'>-				unit = -1;</div><div class='del'>-			free(rec.dptr);</div><div class='del'>-		}</div><div class='del'>-		free(pid.dptr);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (unit &gt;= 0) {</div><div class='del'>-		/* attach to existing unit */</div><div class='del'>-		if (bundle_attach(unit)) {</div><div class='del'>-			set_ifunit(0);</div><div class='del'>-			script_setenv("BUNDLE", bundle_id + 7, 0);</div><div class='del'>-			tdb_writeunlock(pppdb);</div><div class='del'>-			info("Link attached to %s", ifname);</div><div class='del'>-			return 1;</div><div class='del'>-		}</div><div class='del'>-		/* attach failed because bundle doesn't exist */</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* we have to make a new bundle */</div><div class='del'>-	make_new_bundle(go-&gt;mrru, ho-&gt;mrru, go-&gt;neg_ssnhf, ho-&gt;neg_ssnhf);</div><div class='del'>-	set_ifunit(1);</div><div class='del'>-	netif_set_mtu(0, mtu);</div><div class='del'>-	script_setenv("BUNDLE", bundle_id + 7, 1);</div><div class='del'>-	tdb_writeunlock(pppdb);</div><div class='del'>-	info("New bundle %s created", ifname);</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-parse_num(str, key, valp)</div><div class='del'>-     char *str;</div><div class='del'>-     const char *key;</div><div class='del'>-     int *valp;</div><div class='del'>-{</div><div class='del'>-	char *p, *endp;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	p = strstr(str, key);</div><div class='del'>-	if (p != 0) {</div><div class='del'>-		p += strlen(key);</div><div class='del'>-		i = strtol(p, &amp;endp, 10);</div><div class='del'>-		if (endp != p &amp;&amp; (*endp == 0 || *endp == ';')) {</div><div class='del'>-			*valp = i;</div><div class='del'>-			return 1;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Check whether the pppd identified by `key' still owns ppp unit `unit'.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-owns_unit(key, unit)</div><div class='del'>-     TDB_DATA key;</div><div class='del'>-     int unit;</div><div class='del'>-{</div><div class='del'>-	char ifkey[32];</div><div class='del'>-	TDB_DATA kd, vd;</div><div class='del'>-	int ret = 0;</div><div class='del'>-</div><div class='del'>-	slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit);</div><div class='del'>-	kd.dptr = ifkey;</div><div class='del'>-	kd.dsize = strlen(ifkey);</div><div class='del'>-	vd = tdb_fetch(pppdb, kd);</div><div class='del'>-	if (vd.dptr != NULL) {</div><div class='del'>-		ret = vd.dsize == key.dsize</div><div class='del'>-			&amp;&amp; memcmp(vd.dptr, key.dptr, vd.dsize) == 0;</div><div class='del'>-		free(vd.dptr);</div><div class='del'>-	}</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-get_default_epdisc(ep)</div><div class='del'>-     struct epdisc *ep;</div><div class='del'>-{</div><div class='del'>-	char *p;</div><div class='del'>-	struct hostent *hp;</div><div class='del'>-	u_int32_t addr;</div><div class='del'>-</div><div class='del'>-	/* First try for an ethernet MAC address */</div><div class='del'>-	p = get_first_ethernet();</div><div class='del'>-	if (p != 0 &amp;&amp; get_if_hwaddr(ep-&gt;value, p) &gt;= 0) {</div><div class='del'>-		ep-&gt;class = EPD_MAC;</div><div class='del'>-		ep-&gt;length = 6;</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* see if our hostname corresponds to a reasonable IP address */</div><div class='del'>-	hp = gethostbyname(hostname);</div><div class='del'>-	if (hp != NULL) {</div><div class='del'>-		addr = *(u_int32_t *)hp-&gt;h_addr;</div><div class='del'>-		if (!bad_ip_adrs(addr)) {</div><div class='del'>-			addr = ntohl(addr);</div><div class='del'>-			if (!LOCAL_IP_ADDR(addr)) {</div><div class='del'>-				ep-&gt;class = EPD_IP;</div><div class='del'>-				set_ip_epdisc(ep, addr);</div><div class='del'>-				return 1;</div><div class='del'>-			}</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * epdisc_to_str - make a printable string from an endpoint discriminator.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static char *endp_class_names[] = {</div><div class='del'>-    "null", "local", "IP", "MAC", "magic", "phone"</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-char *</div><div class='del'>-epdisc_to_str(ep)</div><div class='del'>-     struct epdisc *ep;</div><div class='del'>-{</div><div class='del'>-	static char str[MAX_ENDP_LEN*3+8];</div><div class='del'>-	u_char *p = ep-&gt;value;</div><div class='del'>-	int i, mask = 0;</div><div class='del'>-	char *q, c, c2;</div><div class='del'>-</div><div class='del'>-	if (ep-&gt;class == EPD_NULL &amp;&amp; ep-&gt;length == 0)</div><div class='del'>-		return "null";</div><div class='del'>-	if (ep-&gt;class == EPD_IP &amp;&amp; ep-&gt;length == 4) {</div><div class='del'>-		u_int32_t addr;</div><div class='del'>-</div><div class='del'>-		GETLONG(addr, p);</div><div class='del'>-		slprintf(str, sizeof(str), "IP:%I", htonl(addr));</div><div class='del'>-		return str;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	c = ':';</div><div class='del'>-	c2 = '.';</div><div class='del'>-	if (ep-&gt;class == EPD_MAC &amp;&amp; ep-&gt;length == 6)</div><div class='del'>-		c2 = ':';</div><div class='del'>-	else if (ep-&gt;class == EPD_MAGIC &amp;&amp; (ep-&gt;length % 4) == 0)</div><div class='del'>-		mask = 3;</div><div class='del'>-	q = str;</div><div class='del'>-	if (ep-&gt;class &lt;= EPD_PHONENUM)</div><div class='del'>-		q += slprintf(q, sizeof(str)-1, "%s",</div><div class='del'>-			      endp_class_names[ep-&gt;class]);</div><div class='del'>-	else</div><div class='del'>-		q += slprintf(q, sizeof(str)-1, "%d", ep-&gt;class);</div><div class='del'>-	c = ':';</div><div class='del'>-	for (i = 0; i &lt; ep-&gt;length &amp;&amp; i &lt; MAX_ENDP_LEN; ++i) {</div><div class='del'>-		if ((i &amp; mask) == 0) {</div><div class='del'>-			*q++ = c;</div><div class='del'>-			c = c2;</div><div class='del'>-		}</div><div class='del'>-		q += slprintf(q, str + sizeof(str) - q, "%.2x", ep-&gt;value[i]);</div><div class='del'>-	}</div><div class='del'>-	return str;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int hexc_val(int c)</div><div class='del'>-{</div><div class='del'>-	if (c &gt;= 'a')</div><div class='del'>-		return c - 'a' + 10;</div><div class='del'>-	if (c &gt;= 'A')</div><div class='del'>-		return c - 'A' + 10;</div><div class='del'>-	return c - '0';</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-str_to_epdisc(ep, str)</div><div class='del'>-     struct epdisc *ep;</div><div class='del'>-     char *str;</div><div class='del'>-{</div><div class='del'>-	int i, l;</div><div class='del'>-	char *p, *endp;</div><div class='del'>-</div><div class='del'>-	for (i = EPD_NULL; i &lt;= EPD_PHONENUM; ++i) {</div><div class='del'>-		int sl = strlen(endp_class_names[i]);</div><div class='del'>-		if (strncasecmp(str, endp_class_names[i], sl) == 0) {</div><div class='del'>-			str += sl;</div><div class='del'>-			break;</div><div class='del'>-		}</div><div class='del'>-	}</div><div class='del'>-	if (i &gt; EPD_PHONENUM) {</div><div class='del'>-		/* not a class name, try a decimal class number */</div><div class='del'>-		i = strtol(str, &amp;endp, 10);</div><div class='del'>-		if (endp == str)</div><div class='del'>-			return 0;	/* can't parse class number */</div><div class='del'>-		str = endp;</div><div class='del'>-	}</div><div class='del'>-	ep-&gt;class = i;</div><div class='del'>-	if (*str == 0) {</div><div class='del'>-		ep-&gt;length = 0;</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	if (*str != ':' &amp;&amp; *str != '.')</div><div class='del'>-		return 0;</div><div class='del'>-	++str;</div><div class='del'>-</div><div class='del'>-	if (i == EPD_IP) {</div><div class='del'>-		u_int32_t addr;</div><div class='del'>-		i = parse_dotted_ip(str, &amp;addr);</div><div class='del'>-		if (i == 0 || str[i] != 0)</div><div class='del'>-			return 0;</div><div class='del'>-		set_ip_epdisc(ep, addr);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	if (i == EPD_MAC &amp;&amp; get_if_hwaddr(ep-&gt;value, str) &gt;= 0) {</div><div class='del'>-		ep-&gt;length = 6;</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	p = str;</div><div class='del'>-	for (l = 0; l &lt; MAX_ENDP_LEN; ++l) {</div><div class='del'>-		if (*str == 0)</div><div class='del'>-			break;</div><div class='del'>-		if (p &lt;= str)</div><div class='del'>-			for (p = str; isxdigit(*p); ++p)</div><div class='del'>-				;</div><div class='del'>-		i = p - str;</div><div class='del'>-		if (i == 0)</div><div class='del'>-			return 0;</div><div class='del'>-		ep-&gt;value[l] = hexc_val(*str++);</div><div class='del'>-		if ((i &amp; 1) == 0)</div><div class='del'>-			ep-&gt;value[l] = (ep-&gt;value[l] &lt;&lt; 4) + hexc_val(*str++);</div><div class='del'>-		if (*str == ':' || *str == '.')</div><div class='del'>-			++str;</div><div class='del'>-	}</div><div class='del'>-	if (*str != 0 || (ep-&gt;class == EPD_MAC &amp;&amp; l != 6))</div><div class='del'>-		return 0;</div><div class='del'>-	ep-&gt;length = l;</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/options.c b/mdk-stage1/ppp/pppd/options.c<br/>deleted file mode 100644<br/>index 1921d9ec5..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/options.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/options.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1513 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * options.c - handles option processing for PPP.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;pwd.h&gt;</div><div class='del'>-#ifdef PLUGIN</div><div class='del'>-#include &lt;dlfcn.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-#include &lt;pcap.h&gt;</div><div class='del'>-#include &lt;pcap-int.h&gt;	/* XXX: To get struct pcap */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "pathnames.h"</div><div class='del'>-</div><div class='del'>-#if defined(ultrix) || defined(NeXT)</div><div class='del'>-char *strdup __P((char *));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-struct option_value {</div><div class='del'>-    struct option_value *next;</div><div class='del'>-    const char *source;</div><div class='del'>-    char value[1];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option variables and default values.</div><div class='del'>- */</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-int	dflag = 0;		/* Tell libpcap we want debugging */</div><div class='del'>-#endif</div><div class='del'>-int	debug = 0;		/* Debug flag */</div><div class='del'>-int	kdebugflag = 0;		/* Tell kernel to print debug messages */</div><div class='del'>-int	default_device = 1;	/* Using /dev/tty or equivalent */</div><div class='del'>-char	devnam[MAXPATHLEN];	/* Device name */</div><div class='del'>-bool	nodetach = 0;		/* Don't detach from controlling tty */</div><div class='del'>-bool	updetach = 0;		/* Detach once link is up */</div><div class='del'>-int	maxconnect = 0;		/* Maximum connect time */</div><div class='del'>-char	user[MAXNAMELEN];	/* Username for PAP */</div><div class='del'>-char	passwd[MAXSECRETLEN];	/* Password for PAP */</div><div class='del'>-bool	persist = 0;		/* Reopen link after it goes down */</div><div class='del'>-char	our_name[MAXNAMELEN];	/* Our name for authentication purposes */</div><div class='del'>-bool	demand = 0;		/* do dial-on-demand */</div><div class='del'>-char	*ipparam = NULL;	/* Extra parameter for ip up/down scripts */</div><div class='del'>-int	idle_time_limit = 0;	/* Disconnect if idle for this many seconds */</div><div class='del'>-int	holdoff = 30;		/* # seconds to pause before reconnecting */</div><div class='del'>-bool	holdoff_specified;	/* true if a holdoff value has been given */</div><div class='del'>-int	log_to_fd = 1;		/* send log messages to this fd too */</div><div class='del'>-bool	log_default = 1;	/* log_to_fd is default (stdout) */</div><div class='del'>-int	maxfail = 10;		/* max # of unsuccessful connection attempts */</div><div class='del'>-char	linkname[MAXPATHLEN];	/* logical name for link */</div><div class='del'>-bool	tune_kernel;		/* may alter kernel settings */</div><div class='del'>-int	connect_delay = 1000;	/* wait this many ms after connect script */</div><div class='del'>-int	req_unit = -1;		/* requested interface unit */</div><div class='del'>-bool	multilink = 0;		/* Enable multilink operation */</div><div class='del'>-char	*bundle_name = NULL;	/* bundle name for multilink */</div><div class='del'>-bool	dump_options;		/* print out option values */</div><div class='del'>-bool	dryrun;			/* print out option values and exit */</div><div class='del'>-char	*domain;		/* domain name set by domain option */</div><div class='del'>-</div><div class='del'>-extern option_t auth_options[];</div><div class='del'>-extern struct stat devstat;</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-struct	bpf_program pass_filter;/* Filter program for packets to pass */</div><div class='del'>-struct	bpf_program active_filter; /* Filter program for link-active pkts */</div><div class='del'>-pcap_t  pc;			/* Fake struct pcap so we can compile expr */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-char *current_option;		/* the name of the option being parsed */</div><div class='del'>-int  privileged_option;		/* set iff the current option came from root */</div><div class='del'>-char *option_source;		/* string saying where the option came from */</div><div class='del'>-int  option_priority = OPRIO_CFGFILE; /* priority of the current options */</div><div class='del'>-bool devnam_fixed;		/* can no longer change device name */</div><div class='del'>-</div><div class='del'>-static int logfile_fd = -1;	/* fd opened for log file */</div><div class='del'>-static char logfile_name[MAXPATHLEN];	/* name of log file */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prototypes</div><div class='del'>- */</div><div class='del'>-static int setdomain __P((char **));</div><div class='del'>-static int readfile __P((char **));</div><div class='del'>-static int callfile __P((char **));</div><div class='del'>-static int showversion __P((char **));</div><div class='del'>-static int showhelp __P((char **));</div><div class='del'>-static void usage __P((void));</div><div class='del'>-static int setlogfile __P((char **));</div><div class='del'>-#ifdef PLUGIN</div><div class='del'>-static int loadplugin __P((char **));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-static int setpassfilter __P((char **));</div><div class='del'>-static int setactivefilter __P((char **));</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static option_t *find_option __P((const char *name));</div><div class='del'>-static int process_option __P((option_t *, char *, char **));</div><div class='del'>-static int n_arguments __P((option_t *));</div><div class='del'>-static int number_option __P((char *, u_int32_t *, int));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Structure to store extra lists of options.</div><div class='del'>- */</div><div class='del'>-struct option_list {</div><div class='del'>-    option_t *options;</div><div class='del'>-    struct option_list *next;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static struct option_list *extra_options = NULL;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Valid arguments.</div><div class='del'>- */</div><div class='del'>-option_t general_options[] = {</div><div class='del'>-    { "debug", o_int, &amp;debug,</div><div class='del'>-      "Increase debugging level", OPT_INC | OPT_NOARG | 1 },</div><div class='del'>-    { "-d", o_int, &amp;debug,</div><div class='del'>-      "Increase debugging level",</div><div class='del'>-      OPT_ALIAS | OPT_INC | OPT_NOARG | 1 },</div><div class='del'>-</div><div class='del'>-    { "kdebug", o_int, &amp;kdebugflag,</div><div class='del'>-      "Set kernel driver debug level", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "nodetach", o_bool, &amp;nodetach,</div><div class='del'>-      "Don't detach from controlling tty", OPT_PRIO | 1 },</div><div class='del'>-    { "-detach", o_bool, &amp;nodetach,</div><div class='del'>-      "Don't detach from controlling tty", OPT_ALIAS | OPT_PRIOSUB | 1 },</div><div class='del'>-    { "updetach", o_bool, &amp;updetach,</div><div class='del'>-      "Detach from controlling tty once link is up",</div><div class='del'>-      OPT_PRIOSUB | OPT_A2CLR | 1, &amp;nodetach },</div><div class='del'>-</div><div class='del'>-    { "holdoff", o_int, &amp;holdoff,</div><div class='del'>-      "Set time in seconds before retrying connection", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "idle", o_int, &amp;idle_time_limit,</div><div class='del'>-      "Set time in seconds before disconnecting idle link", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "maxconnect", o_int, &amp;maxconnect,</div><div class='del'>-      "Set connection time limit",</div><div class='del'>-      OPT_PRIO | OPT_LLIMIT | OPT_NOINCR | OPT_ZEROINF },</div><div class='del'>-</div><div class='del'>-    { "domain", o_special, (void *)setdomain,</div><div class='del'>-      "Add given domain name to hostname",</div><div class='del'>-      OPT_PRIO | OPT_PRIV | OPT_A2STRVAL, &amp;domain },</div><div class='del'>-</div><div class='del'>-    { "file", o_special, (void *)readfile,</div><div class='del'>-      "Take options from a file", OPT_NOPRINT },</div><div class='del'>-    { "call", o_special, (void *)callfile,</div><div class='del'>-      "Take options from a privileged file", OPT_NOPRINT },</div><div class='del'>-</div><div class='del'>-    { "persist", o_bool, &amp;persist,</div><div class='del'>-      "Keep on reopening connection after close", OPT_PRIO | 1 },</div><div class='del'>-    { "nopersist", o_bool, &amp;persist,</div><div class='del'>-      "Turn off persist option", OPT_PRIOSUB },</div><div class='del'>-</div><div class='del'>-    { "demand", o_bool, &amp;demand,</div><div class='del'>-      "Dial on demand", OPT_INITONLY | 1, &amp;persist },</div><div class='del'>-</div><div class='del'>-    { "--version", o_special_noarg, (void *)showversion,</div><div class='del'>-      "Show version number" },</div><div class='del'>-    { "--help", o_special_noarg, (void *)showhelp,</div><div class='del'>-      "Show brief listing of options" },</div><div class='del'>-    { "-h", o_special_noarg, (void *)showhelp,</div><div class='del'>-      "Show brief listing of options", OPT_ALIAS },</div><div class='del'>-</div><div class='del'>-    { "logfile", o_special, (void *)setlogfile,</div><div class='del'>-      "Append log messages to this file",</div><div class='del'>-      OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, &amp;logfile_name },</div><div class='del'>-    { "logfd", o_int, &amp;log_to_fd,</div><div class='del'>-      "Send log messages to this file descriptor",</div><div class='del'>-      OPT_PRIOSUB | OPT_A2CLR, &amp;log_default },</div><div class='del'>-    { "nolog", o_int, &amp;log_to_fd,</div><div class='del'>-      "Don't send log messages to any file",</div><div class='del'>-      OPT_PRIOSUB | OPT_NOARG | OPT_VAL(-1) },</div><div class='del'>-    { "nologfd", o_int, &amp;log_to_fd,</div><div class='del'>-      "Don't send log messages to any file descriptor",</div><div class='del'>-      OPT_PRIOSUB | OPT_ALIAS | OPT_NOARG | OPT_VAL(-1) },</div><div class='del'>-</div><div class='del'>-    { "linkname", o_string, linkname,</div><div class='del'>-      "Set logical name for link",</div><div class='del'>-      OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXPATHLEN },</div><div class='del'>-</div><div class='del'>-    { "maxfail", o_int, &amp;maxfail,</div><div class='del'>-      "Maximum number of unsuccessful connection attempts to allow",</div><div class='del'>-      OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "ktune", o_bool, &amp;tune_kernel,</div><div class='del'>-      "Alter kernel settings as necessary", OPT_PRIO | 1 },</div><div class='del'>-    { "noktune", o_bool, &amp;tune_kernel,</div><div class='del'>-      "Don't alter kernel settings", OPT_PRIOSUB },</div><div class='del'>-</div><div class='del'>-    { "connect-delay", o_int, &amp;connect_delay,</div><div class='del'>-      "Maximum time (in ms) to wait after connect script finishes",</div><div class='del'>-      OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "unit", o_int, &amp;req_unit,</div><div class='del'>-      "PPP interface unit number to use if possible",</div><div class='del'>-      OPT_PRIO | OPT_LLIMIT, 0, 0 },</div><div class='del'>-</div><div class='del'>-    { "dump", o_bool, &amp;dump_options,</div><div class='del'>-      "Print out option values after parsing all options", 1 },</div><div class='del'>-    { "dryrun", o_bool, &amp;dryrun,</div><div class='del'>-      "Stop after parsing, printing, and checking options", 1 },</div><div class='del'>-</div><div class='del'>-#ifdef HAVE_MULTILINK</div><div class='del'>-    { "multilink", o_bool, &amp;multilink,</div><div class='del'>-      "Enable multilink operation", OPT_PRIO | 1 },</div><div class='del'>-    { "mp", o_bool, &amp;multilink,</div><div class='del'>-      "Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 },</div><div class='del'>-    { "nomultilink", o_bool, &amp;multilink,</div><div class='del'>-      "Disable multilink operation", OPT_PRIOSUB | 0 },</div><div class='del'>-    { "nomp", o_bool, &amp;multilink,</div><div class='del'>-      "Disable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 0 },</div><div class='del'>-</div><div class='del'>-    { "bundle", o_string, &amp;bundle_name,</div><div class='del'>-      "Bundle name for multilink", OPT_PRIO },</div><div class='del'>-#endif /* HAVE_MULTILINK */</div><div class='del'>-</div><div class='del'>-#ifdef PLUGIN</div><div class='del'>-    { "plugin", o_special, (void *)loadplugin,</div><div class='del'>-      "Load a plug-in module into pppd", OPT_PRIV | OPT_A2LIST },</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-    { "pdebug", o_int, &amp;dflag,</div><div class='del'>-      "libpcap debugging", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "pass-filter", 1, setpassfilter,</div><div class='del'>-      "set filter for packets to pass", OPT_PRIO },</div><div class='del'>-</div><div class='del'>-    { "active-filter", 1, setactivefilter,</div><div class='del'>-      "set filter for active pkts", OPT_PRIO },</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-#ifndef IMPLEMENTATION</div><div class='del'>-#define IMPLEMENTATION ""</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-static char *usage_string = "\</div><div class='del'>-pppd version %s\n\</div><div class='del'>-Usage: %s [ options ], where options are:\n\</div><div class='del'>-	&lt;device&gt;	Communicate over the named device\n\</div><div class='del'>-	&lt;speed&gt;		Set the baud rate to &lt;speed&gt;\n\</div><div class='del'>-	&lt;loc&gt;:&lt;rem&gt;	Set the local and/or remote interface IP\n\</div><div class='del'>-			addresses.  Either one may be omitted.\n\</div><div class='del'>-	asyncmap &lt;n&gt;	Set the desired async map to hex &lt;n&gt;\n\</div><div class='del'>-	auth		Require authentication from peer\n\</div><div class='del'>-        connect &lt;p&gt;     Invoke shell command &lt;p&gt; to set up the serial line\n\</div><div class='del'>-	crtscts		Use hardware RTS/CTS flow control\n\</div><div class='del'>-	defaultroute	Add default route through interface\n\</div><div class='del'>-	file &lt;f&gt;	Take options from file &lt;f&gt;\n\</div><div class='del'>-	modem		Use modem control lines\n\</div><div class='del'>-	mru &lt;n&gt;		Set MRU value to &lt;n&gt; for negotiation\n\</div><div class='del'>-See pppd(8) for more options.\n\</div><div class='del'>-";</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * parse_args - parse a string of arguments from the command line.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-parse_args(argc, argv)</div><div class='del'>-    int argc;</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *arg;</div><div class='del'>-    option_t *opt;</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    privileged_option = privileged;</div><div class='del'>-    option_source = "command line";</div><div class='del'>-    option_priority = OPRIO_CMDLINE;</div><div class='del'>-    while (argc &gt; 0) {</div><div class='del'>-	arg = *argv++;</div><div class='del'>-	--argc;</div><div class='del'>-	opt = find_option(arg);</div><div class='del'>-	if (opt == NULL) {</div><div class='del'>-	    option_error("unrecognized option '%s'", arg);</div><div class='del'>-	    usage();</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	n = n_arguments(opt);</div><div class='del'>-	if (argc &lt; n) {</div><div class='del'>-	    option_error("too few parameters for option %s", arg);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	if (!process_option(opt, arg, argv))</div><div class='del'>-	    return 0;</div><div class='del'>-	argc -= n;</div><div class='del'>-	argv += n;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * options_from_file - Read a string of options from a file,</div><div class='del'>- * and interpret them.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-options_from_file(filename, must_exist, check_prot, priv)</div><div class='del'>-    char *filename;</div><div class='del'>-    int must_exist;</div><div class='del'>-    int check_prot;</div><div class='del'>-    int priv;</div><div class='del'>-{</div><div class='del'>-    FILE *f;</div><div class='del'>-    int i, newline, ret, err;</div><div class='del'>-    option_t *opt;</div><div class='del'>-    int oldpriv, n;</div><div class='del'>-    char *oldsource;</div><div class='del'>-    char *argv[MAXARGS];</div><div class='del'>-    char args[MAXARGS][MAXWORDLEN];</div><div class='del'>-    char cmd[MAXWORDLEN];</div><div class='del'>-</div><div class='del'>-    if (check_prot)</div><div class='del'>-	seteuid(getuid());</div><div class='del'>-    f = fopen(filename, "r");</div><div class='del'>-    err = errno;</div><div class='del'>-    if (check_prot)</div><div class='del'>-	seteuid(0);</div><div class='del'>-    if (f == NULL) {</div><div class='del'>-	errno = err;</div><div class='del'>-	if (!must_exist) {</div><div class='del'>-	    if (err != ENOENT &amp;&amp; err != ENOTDIR)</div><div class='del'>-		warn("Warning: can't open options file %s: %m", filename);</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-	option_error("Can't open options file %s: %m", filename);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    oldpriv = privileged_option;</div><div class='del'>-    privileged_option = priv;</div><div class='del'>-    oldsource = option_source;</div><div class='del'>-    option_source = strdup(filename);</div><div class='del'>-    if (option_source == NULL)</div><div class='del'>-	option_source = "file";</div><div class='del'>-    ret = 0;</div><div class='del'>-    while (getword(f, cmd, &amp;newline, filename)) {</div><div class='del'>-	opt = find_option(cmd);</div><div class='del'>-	if (opt == NULL) {</div><div class='del'>-	    option_error("In file %s: unrecognized option '%s'",</div><div class='del'>-			 filename, cmd);</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	n = n_arguments(opt);</div><div class='del'>-	for (i = 0; i &lt; n; ++i) {</div><div class='del'>-	    if (!getword(f, args[i], &amp;newline, filename)) {</div><div class='del'>-		option_error(</div><div class='del'>-			"In file %s: too few parameters for option '%s'",</div><div class='del'>-			filename, cmd);</div><div class='del'>-		goto err;</div><div class='del'>-	    }</div><div class='del'>-	    argv[i] = args[i];</div><div class='del'>-	}</div><div class='del'>-	if (!process_option(opt, cmd, argv))</div><div class='del'>-	    goto err;</div><div class='del'>-    }</div><div class='del'>-    ret = 1;</div><div class='del'>-</div><div class='del'>-err:</div><div class='del'>-    fclose(f);</div><div class='del'>-    privileged_option = oldpriv;</div><div class='del'>-    option_source = oldsource;</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * options_from_user - See if the use has a ~/.ppprc file,</div><div class='del'>- * and if so, interpret options from it.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-options_from_user()</div><div class='del'>-{</div><div class='del'>-    char *user, *path, *file;</div><div class='del'>-    int ret;</div><div class='del'>-    struct passwd *pw;</div><div class='del'>-    size_t pl;</div><div class='del'>-</div><div class='del'>-    pw = getpwuid(getuid());</div><div class='del'>-    if (pw == NULL || (user = pw-&gt;pw_dir) == NULL || user[0] == 0)</div><div class='del'>-	return 1;</div><div class='del'>-    file = _PATH_USEROPT;</div><div class='del'>-    pl = strlen(user) + strlen(file) + 2;</div><div class='del'>-    path = malloc(pl);</div><div class='del'>-    if (path == NULL)</div><div class='del'>-	novm("init file name");</div><div class='del'>-    slprintf(path, pl, "%s/%s", user, file);</div><div class='del'>-    option_priority = OPRIO_CFGFILE;</div><div class='del'>-    ret = options_from_file(path, 0, 1, privileged);</div><div class='del'>-    free(path);</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * options_for_tty - See if an options file exists for the serial</div><div class='del'>- * device, and if so, interpret options from it.</div><div class='del'>- * We only allow the per-tty options file to override anything from</div><div class='del'>- * the command line if it is something that the user can't override</div><div class='del'>- * once it has been set by root; this is done by giving configuration</div><div class='del'>- * files a lower priority than the command line.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-options_for_tty()</div><div class='del'>-{</div><div class='del'>-    char *dev, *path, *p;</div><div class='del'>-    int ret;</div><div class='del'>-    size_t pl;</div><div class='del'>-</div><div class='del'>-    dev = devnam;</div><div class='del'>-    if (strncmp(dev, "/dev/", 5) == 0)</div><div class='del'>-	dev += 5;</div><div class='del'>-    if (dev[0] == 0 || strcmp(dev, "tty") == 0)</div><div class='del'>-	return 1;		/* don't look for /etc/ppp/options.tty */</div><div class='del'>-    pl = strlen(_PATH_TTYOPT) + strlen(dev) + 1;</div><div class='del'>-    path = malloc(pl);</div><div class='del'>-    if (path == NULL)</div><div class='del'>-	novm("tty init file name");</div><div class='del'>-    slprintf(path, pl, "%s%s", _PATH_TTYOPT, dev);</div><div class='del'>-    /* Turn slashes into dots, for Solaris case (e.g. /dev/term/a) */</div><div class='del'>-    for (p = path + strlen(_PATH_TTYOPT); *p != 0; ++p)</div><div class='del'>-	if (*p == '/')</div><div class='del'>-	    *p = '.';</div><div class='del'>-    option_priority = OPRIO_CFGFILE;</div><div class='del'>-    ret = options_from_file(path, 0, 0, 1);</div><div class='del'>-    free(path);</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * options_from_list - process a string of options in a wordlist.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-options_from_list(w, priv)</div><div class='del'>-    struct wordlist *w;</div><div class='del'>-    int priv;</div><div class='del'>-{</div><div class='del'>-    char *argv[MAXARGS];</div><div class='del'>-    option_t *opt;</div><div class='del'>-    int i, n, ret = 0;</div><div class='del'>-    struct wordlist *w0;</div><div class='del'>-</div><div class='del'>-    privileged_option = priv;</div><div class='del'>-    option_source = "secrets file";</div><div class='del'>-    option_priority = OPRIO_SECFILE;</div><div class='del'>-</div><div class='del'>-    while (w != NULL) {</div><div class='del'>-	opt = find_option(w-&gt;word);</div><div class='del'>-	if (opt == NULL) {</div><div class='del'>-	    option_error("In secrets file: unrecognized option '%s'",</div><div class='del'>-			 w-&gt;word);</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	n = n_arguments(opt);</div><div class='del'>-	w0 = w;</div><div class='del'>-	for (i = 0; i &lt; n; ++i) {</div><div class='del'>-	    w = w-&gt;next;</div><div class='del'>-	    if (w == NULL) {</div><div class='del'>-		option_error(</div><div class='del'>-			"In secrets file: too few parameters for option '%s'",</div><div class='del'>-			w0-&gt;word);</div><div class='del'>-		goto err;</div><div class='del'>-	    }</div><div class='del'>-	    argv[i] = w-&gt;word;</div><div class='del'>-	}</div><div class='del'>-	if (!process_option(opt, w0-&gt;word, argv))</div><div class='del'>-	    goto err;</div><div class='del'>-	w = w-&gt;next;</div><div class='del'>-    }</div><div class='del'>-    ret = 1;</div><div class='del'>-</div><div class='del'>-err:</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * match_option - see if this option matches an option_t structure.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-match_option(name, opt, dowild)</div><div class='del'>-    char *name;</div><div class='del'>-    option_t *opt;</div><div class='del'>-    int dowild;</div><div class='del'>-{</div><div class='del'>-	int (*match) __P((char *, char **, int));</div><div class='del'>-</div><div class='del'>-	if (dowild != (opt-&gt;type == o_wild))</div><div class='del'>-		return 0;</div><div class='del'>-	if (!dowild)</div><div class='del'>-		return strcmp(name, opt-&gt;name) == 0;</div><div class='del'>-	match = (int (*) __P((char *, char **, int))) opt-&gt;addr;</div><div class='del'>-	return (*match)(name, NULL, 0);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * find_option - scan the option lists for the various protocols</div><div class='del'>- * looking for an entry with the given name.</div><div class='del'>- * This could be optimized by using a hash table.</div><div class='del'>- */</div><div class='del'>-static option_t *</div><div class='del'>-find_option(name)</div><div class='del'>-    const char *name;</div><div class='del'>-{</div><div class='del'>-	option_t *opt;</div><div class='del'>-	struct option_list *list;</div><div class='del'>-	int i, dowild;</div><div class='del'>-</div><div class='del'>-	for (dowild = 0; dowild &lt;= 1; ++dowild) {</div><div class='del'>-		for (opt = general_options; opt-&gt;name != NULL; ++opt)</div><div class='del'>-			if (match_option(name, opt, dowild))</div><div class='del'>-				return opt;</div><div class='del'>-		for (opt = auth_options; opt-&gt;name != NULL; ++opt)</div><div class='del'>-			if (match_option(name, opt, dowild))</div><div class='del'>-				return opt;</div><div class='del'>-		for (list = extra_options; list != NULL; list = list-&gt;next)</div><div class='del'>-			for (opt = list-&gt;options; opt-&gt;name != NULL; ++opt)</div><div class='del'>-				if (match_option(name, opt, dowild))</div><div class='del'>-					return opt;</div><div class='del'>-		for (opt = the_channel-&gt;options; opt-&gt;name != NULL; ++opt)</div><div class='del'>-			if (match_option(name, opt, dowild))</div><div class='del'>-				return opt;</div><div class='del'>-		for (i = 0; protocols[i] != NULL; ++i)</div><div class='del'>-			if ((opt = protocols[i]-&gt;options) != NULL)</div><div class='del'>-				for (; opt-&gt;name != NULL; ++opt)</div><div class='del'>-					if (match_option(name, opt, dowild))</div><div class='del'>-						return opt;</div><div class='del'>-	}</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * process_option - process one new-style option.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-process_option(opt, cmd, argv)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    char *cmd;</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    u_int32_t v;</div><div class='del'>-    int iv, a;</div><div class='del'>-    char *sv;</div><div class='del'>-    int (*parser) __P((char **));</div><div class='del'>-    int (*wildp) __P((char *, char **, int));</div><div class='del'>-    char *optopt = (opt-&gt;type == o_wild)? "": " option";</div><div class='del'>-    int prio = option_priority;</div><div class='del'>-    option_t *mainopt = opt;</div><div class='del'>-</div><div class='del'>-    if ((opt-&gt;flags &amp; OPT_PRIVFIX) &amp;&amp; privileged_option)</div><div class='del'>-	prio += OPRIO_ROOT;</div><div class='del'>-    while (mainopt-&gt;flags &amp; OPT_PRIOSUB)</div><div class='del'>-	--mainopt;</div><div class='del'>-    if (mainopt-&gt;flags &amp; OPT_PRIO) {</div><div class='del'>-	if (prio &lt; mainopt-&gt;priority) {</div><div class='del'>-	    /* new value doesn't override old */</div><div class='del'>-	    if (prio == OPRIO_CMDLINE &amp;&amp; mainopt-&gt;priority &gt; OPRIO_ROOT) {</div><div class='del'>-		option_error("%s%s set in %s cannot be overridden\n",</div><div class='del'>-			     opt-&gt;name, optopt, mainopt-&gt;source);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	    return 1;</div><div class='del'>-	}</div><div class='del'>-	if (prio &gt; OPRIO_ROOT &amp;&amp; mainopt-&gt;priority == OPRIO_CMDLINE)</div><div class='del'>-	    warn("%s%s from %s overrides command line",</div><div class='del'>-		 opt-&gt;name, optopt, option_source);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if ((opt-&gt;flags &amp; OPT_INITONLY) &amp;&amp; phase != PHASE_INITIALIZE) {</div><div class='del'>-	option_error("%s%s cannot be changed after initialization",</div><div class='del'>-		     opt-&gt;name, optopt);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((opt-&gt;flags &amp; OPT_PRIV) &amp;&amp; !privileged_option) {</div><div class='del'>-	option_error("using the %s%s requires root privilege",</div><div class='del'>-		     opt-&gt;name, optopt);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((opt-&gt;flags &amp; OPT_ENABLE) &amp;&amp; *(bool *)(opt-&gt;addr2) == 0) {</div><div class='del'>-	option_error("%s%s is disabled", opt-&gt;name, optopt);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((opt-&gt;flags &amp; OPT_DEVEQUIV) &amp;&amp; devnam_fixed) {</div><div class='del'>-	option_error("the %s%s may not be changed in %s",</div><div class='del'>-		     opt-&gt;name, optopt, option_source);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    switch (opt-&gt;type) {</div><div class='del'>-    case o_bool:</div><div class='del'>-	v = opt-&gt;flags &amp; OPT_VALUE;</div><div class='del'>-	*(bool *)(opt-&gt;addr) = v;</div><div class='del'>-	if (opt-&gt;addr2 &amp;&amp; (opt-&gt;flags &amp; OPT_A2COPY))</div><div class='del'>-	    *(bool *)(opt-&gt;addr2) = v;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case o_int:</div><div class='del'>-	iv = 0;</div><div class='del'>-	if ((opt-&gt;flags &amp; OPT_NOARG) == 0) {</div><div class='del'>-	    if (!int_option(*argv, &amp;iv))</div><div class='del'>-		return 0;</div><div class='del'>-	    if ((((opt-&gt;flags &amp; OPT_LLIMIT) &amp;&amp; iv &lt; opt-&gt;lower_limit)</div><div class='del'>-		 || ((opt-&gt;flags &amp; OPT_ULIMIT) &amp;&amp; iv &gt; opt-&gt;upper_limit))</div><div class='del'>-		&amp;&amp; !((opt-&gt;flags &amp; OPT_ZEROOK &amp;&amp; iv == 0))) {</div><div class='del'>-		char *zok = (opt-&gt;flags &amp; OPT_ZEROOK)? " zero or": "";</div><div class='del'>-		switch (opt-&gt;flags &amp; OPT_LIMITS) {</div><div class='del'>-		case OPT_LLIMIT:</div><div class='del'>-		    option_error("%s value must be%s &gt;= %d",</div><div class='del'>-				 opt-&gt;name, zok, opt-&gt;lower_limit);</div><div class='del'>-		    break;</div><div class='del'>-		case OPT_ULIMIT:</div><div class='del'>-		    option_error("%s value must be%s &lt;= %d",</div><div class='del'>-				 opt-&gt;name, zok, opt-&gt;upper_limit);</div><div class='del'>-		    break;</div><div class='del'>-		case OPT_LIMITS:</div><div class='del'>-		    option_error("%s value must be%s between %d and %d",</div><div class='del'>-				opt-&gt;name, opt-&gt;lower_limit, opt-&gt;upper_limit);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	a = opt-&gt;flags &amp; OPT_VALUE;</div><div class='del'>-	if (a &gt;= 128)</div><div class='del'>-	    a -= 256;		/* sign extend */</div><div class='del'>-	iv += a;</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_INC)</div><div class='del'>-	    iv += *(int *)(opt-&gt;addr);</div><div class='del'>-	if ((opt-&gt;flags &amp; OPT_NOINCR) &amp;&amp; !privileged_option) {</div><div class='del'>-	    int oldv = *(int *)(opt-&gt;addr);</div><div class='del'>-	    if ((opt-&gt;flags &amp; OPT_ZEROINF) ?</div><div class='del'>-		(oldv != 0 &amp;&amp; (iv == 0 || iv &gt; oldv)) : (iv &gt; oldv)) {</div><div class='del'>-		option_error("%s value cannot be increased", opt-&gt;name);</div><div class='del'>-		return 0;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	*(int *)(opt-&gt;addr) = iv;</div><div class='del'>-	if (opt-&gt;addr2 &amp;&amp; (opt-&gt;flags &amp; OPT_A2COPY))</div><div class='del'>-	    *(int *)(opt-&gt;addr2) = iv;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case o_uint32:</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_NOARG) {</div><div class='del'>-	    v = opt-&gt;flags &amp; OPT_VALUE;</div><div class='del'>-	    if (v &amp; 0x80)</div><div class='del'>-		    v |= 0xffffff00U;</div><div class='del'>-	} else if (!number_option(*argv, &amp;v, 16))</div><div class='del'>-	    return 0;</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_OR)</div><div class='del'>-	    v |= *(u_int32_t *)(opt-&gt;addr);</div><div class='del'>-	*(u_int32_t *)(opt-&gt;addr) = v;</div><div class='del'>-	if (opt-&gt;addr2 &amp;&amp; (opt-&gt;flags &amp; OPT_A2COPY))</div><div class='del'>-	    *(u_int32_t *)(opt-&gt;addr2) = v;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case o_string:</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_STATIC) {</div><div class='del'>-	    strlcpy((char *)(opt-&gt;addr), *argv, opt-&gt;upper_limit);</div><div class='del'>-	} else {</div><div class='del'>-	    sv = strdup(*argv);</div><div class='del'>-	    if (sv == NULL)</div><div class='del'>-		novm("option argument");</div><div class='del'>-	    *(char **)(opt-&gt;addr) = sv;</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case o_special_noarg:</div><div class='del'>-    case o_special:</div><div class='del'>-	parser = (int (*) __P((char **))) opt-&gt;addr;</div><div class='del'>-	if (!(*parser)(argv))</div><div class='del'>-	    return 0;</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_A2LIST) {</div><div class='del'>-	    struct option_value *ovp, **pp;</div><div class='del'>-</div><div class='del'>-	    ovp = malloc(sizeof(*ovp) + strlen(*argv));</div><div class='del'>-	    if (ovp != 0) {</div><div class='del'>-		strcpy(ovp-&gt;value, *argv);</div><div class='del'>-		ovp-&gt;source = option_source;</div><div class='del'>-		ovp-&gt;next = NULL;</div><div class='del'>-		pp = (struct option_value **) &amp;opt-&gt;addr2;</div><div class='del'>-		while (*pp != 0)</div><div class='del'>-		    pp = &amp;(*pp)-&gt;next;</div><div class='del'>-		*pp = ovp;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case o_wild:</div><div class='del'>-	wildp = (int (*) __P((char *, char **, int))) opt-&gt;addr;</div><div class='del'>-	if (!(*wildp)(cmd, argv, 1))</div><div class='del'>-	    return 0;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (opt-&gt;addr2 &amp;&amp; (opt-&gt;flags &amp; (OPT_A2COPY|OPT_ENABLE</div><div class='del'>-		|OPT_A2PRINTER|OPT_A2STRVAL|OPT_A2LIST)) == 0)</div><div class='del'>-	*(bool *)(opt-&gt;addr2) = !(opt-&gt;flags &amp; OPT_A2CLR);</div><div class='del'>-</div><div class='del'>-    mainopt-&gt;source = option_source;</div><div class='del'>-    mainopt-&gt;priority = prio;</div><div class='del'>-    mainopt-&gt;winner = opt - mainopt;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * override_value - if the option priorities would permit us to</div><div class='del'>- * override the value of option, return 1 and update the priority</div><div class='del'>- * and source of the option value.  Otherwise returns 0.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-override_value(option, priority, source)</div><div class='del'>-    const char *option;</div><div class='del'>-    int priority;</div><div class='del'>-    const char *source;</div><div class='del'>-{</div><div class='del'>-	option_t *opt;</div><div class='del'>-</div><div class='del'>-	opt = find_option(option);</div><div class='del'>-	if (opt == NULL)</div><div class='del'>-		return 0;</div><div class='del'>-	while (opt-&gt;flags &amp; OPT_PRIOSUB)</div><div class='del'>-		--opt;</div><div class='del'>-	if ((opt-&gt;flags &amp; OPT_PRIO) &amp;&amp; priority &lt; opt-&gt;priority)</div><div class='del'>-		return 0;</div><div class='del'>-	opt-&gt;priority = priority;</div><div class='del'>-	opt-&gt;source = source;</div><div class='del'>-	opt-&gt;winner = -1;</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * n_arguments - tell how many arguments an option takes</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-n_arguments(opt)</div><div class='del'>-    option_t *opt;</div><div class='del'>-{</div><div class='del'>-	return (opt-&gt;type == o_bool || opt-&gt;type == o_special_noarg</div><div class='del'>-		|| (opt-&gt;flags &amp; OPT_NOARG))? 0: 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_options - add a list of options to the set we grok.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-add_options(opt)</div><div class='del'>-    option_t *opt;</div><div class='del'>-{</div><div class='del'>-    struct option_list *list;</div><div class='del'>-</div><div class='del'>-    list = malloc(sizeof(*list));</div><div class='del'>-    if (list == 0)</div><div class='del'>-	novm("option list entry");</div><div class='del'>-    list-&gt;options = opt;</div><div class='del'>-    list-&gt;next = extra_options;</div><div class='del'>-    extra_options = list;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * check_options - check that options are valid and consistent.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-check_options()</div><div class='del'>-{</div><div class='del'>-	if (logfile_fd &gt;= 0 &amp;&amp; logfile_fd != log_to_fd)</div><div class='del'>-		close(logfile_fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * print_option - print out an option and its value</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-print_option(opt, mainopt, printer, arg)</div><div class='del'>-    option_t *opt, *mainopt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	int i, v;</div><div class='del'>-	char *p;</div><div class='del'>-</div><div class='del'>-	if (opt-&gt;flags &amp; OPT_NOPRINT)</div><div class='del'>-		return;</div><div class='del'>-	switch (opt-&gt;type) {</div><div class='del'>-	case o_bool:</div><div class='del'>-		v = opt-&gt;flags &amp; OPT_VALUE;</div><div class='del'>-		if (*(bool *)opt-&gt;addr != v)</div><div class='del'>-			/* this can happen legitimately, e.g. lock</div><div class='del'>-			   option turned off for default device */</div><div class='del'>-			break;</div><div class='del'>-		printer(arg, "%s", opt-&gt;name);</div><div class='del'>-		break;</div><div class='del'>-	case o_int:</div><div class='del'>-		v = opt-&gt;flags &amp; OPT_VALUE;</div><div class='del'>-		if (v &gt;= 128)</div><div class='del'>-			v -= 256;</div><div class='del'>-		i = *(int *)opt-&gt;addr;</div><div class='del'>-		if (opt-&gt;flags &amp; OPT_NOARG) {</div><div class='del'>-			printer(arg, "%s", opt-&gt;name);</div><div class='del'>-			if (i != v) {</div><div class='del'>-				if (opt-&gt;flags &amp; OPT_INC) {</div><div class='del'>-					for (; i &gt; v; i -= v)</div><div class='del'>-						printer(arg, " %s", opt-&gt;name);</div><div class='del'>-				} else</div><div class='del'>-					printer(arg, " # oops: %d not %d\n",</div><div class='del'>-						i, v);</div><div class='del'>-			}</div><div class='del'>-		} else {</div><div class='del'>-			printer(arg, "%s %d", opt-&gt;name, i);</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-	case o_uint32:</div><div class='del'>-		printer(arg, "%s", opt-&gt;name);</div><div class='del'>-		if ((opt-&gt;flags &amp; OPT_NOARG) == 0)</div><div class='del'>-			printer(arg, " %x", *(u_int32_t *)opt-&gt;addr);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case o_string:</div><div class='del'>-		if (opt-&gt;flags &amp; OPT_HIDE) {</div><div class='del'>-			p = "??????";</div><div class='del'>-		} else {</div><div class='del'>-			p = (char *) opt-&gt;addr;</div><div class='del'>-			if ((opt-&gt;flags &amp; OPT_STATIC) == 0)</div><div class='del'>-				p = *(char **)p;</div><div class='del'>-		}</div><div class='del'>-		printer(arg, "%s %q", opt-&gt;name, p);</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	case o_special:</div><div class='del'>-	case o_special_noarg:</div><div class='del'>-	case o_wild:</div><div class='del'>-		if (opt-&gt;type != o_wild) {</div><div class='del'>-			printer(arg, "%s", opt-&gt;name);</div><div class='del'>-			if (n_arguments(opt) == 0)</div><div class='del'>-				break;</div><div class='del'>-			printer(arg, " ");</div><div class='del'>-		}</div><div class='del'>-		if (opt-&gt;flags &amp; OPT_A2PRINTER) {</div><div class='del'>-			void (*oprt) __P((option_t *,</div><div class='del'>-					  void ((*)__P((void *, char *, ...))),</div><div class='del'>-					  void *));</div><div class='del'>-			oprt = opt-&gt;addr2;</div><div class='del'>-			(*oprt)(opt, printer, arg);</div><div class='del'>-		} else if (opt-&gt;flags &amp; OPT_A2STRVAL) {</div><div class='del'>-			p = (char *) opt-&gt;addr2;</div><div class='del'>-			if ((opt-&gt;flags &amp; OPT_STATIC) == 0)</div><div class='del'>-				p = *(char **)p;</div><div class='del'>-			printer("%q", p);</div><div class='del'>-		} else if (opt-&gt;flags &amp; OPT_A2LIST) {</div><div class='del'>-			struct option_value *ovp;</div><div class='del'>-</div><div class='del'>-			ovp = (struct option_value *) opt-&gt;addr2;</div><div class='del'>-			for (;;) {</div><div class='del'>-				printer(arg, "%q", ovp-&gt;value);</div><div class='del'>-				if ((ovp = ovp-&gt;next) == NULL)</div><div class='del'>-					break;</div><div class='del'>-				printer(arg, "\t\t# (from %s)\n%s ",</div><div class='del'>-					ovp-&gt;source, opt-&gt;name);</div><div class='del'>-			}</div><div class='del'>-		} else {</div><div class='del'>-			printer(arg, "xxx # [don't know how to print value]");</div><div class='del'>-		}</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	default:</div><div class='del'>-		printer(arg, "# %s value (type %d)", opt-&gt;name, opt-&gt;type);</div><div class='del'>-		break;</div><div class='del'>-	}</div><div class='del'>-	printer(arg, "\t\t# (from %s)\n", mainopt-&gt;source);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * print_option_list - print out options in effect from an</div><div class='del'>- * array of options.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-print_option_list(opt, printer, arg)</div><div class='del'>-    option_t *opt;</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	while (opt-&gt;name != NULL) {</div><div class='del'>-		if (opt-&gt;priority != OPRIO_DEFAULT</div><div class='del'>-		    &amp;&amp; opt-&gt;winner != (short int) -1)</div><div class='del'>-			print_option(opt + opt-&gt;winner, opt, printer, arg);</div><div class='del'>-		do {</div><div class='del'>-			++opt;</div><div class='del'>-		} while (opt-&gt;flags &amp; OPT_PRIOSUB);</div><div class='del'>-	}</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * print_options - print out what options are in effect.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-print_options(printer, arg)</div><div class='del'>-    void (*printer) __P((void *, char *, ...));</div><div class='del'>-    void *arg;</div><div class='del'>-{</div><div class='del'>-	struct option_list *list;</div><div class='del'>-	int i;</div><div class='del'>-</div><div class='del'>-	printer(arg, "pppd options in effect:\n");</div><div class='del'>-	print_option_list(general_options, printer, arg);</div><div class='del'>-	print_option_list(auth_options, printer, arg);</div><div class='del'>-	for (list = extra_options; list != NULL; list = list-&gt;next)</div><div class='del'>-		print_option_list(list-&gt;options, printer, arg);</div><div class='del'>-	print_option_list(the_channel-&gt;options, printer, arg);</div><div class='del'>-	for (i = 0; protocols[i] != NULL; ++i)</div><div class='del'>-		print_option_list(protocols[i]-&gt;options, printer, arg);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * usage - print out a message telling how to use the program.</div><div class='del'>- */</div><div class='del'>-static void</div><div class='del'>-usage()</div><div class='del'>-{</div><div class='del'>-    if (phase == PHASE_INITIALIZE)</div><div class='del'>-	fprintf(stderr, usage_string, VERSION, progname);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * showhelp - print out usage message and exit.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-showhelp(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    if (phase == PHASE_INITIALIZE) {</div><div class='del'>-	usage();</div><div class='del'>-	exit(0);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * showversion - print out the version number and exit.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-showversion(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    if (phase == PHASE_INITIALIZE) {</div><div class='del'>-	fprintf(stderr, "pppd version %s\n", VERSION);</div><div class='del'>-	exit(0);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * option_error - print a message about an error in an option.</div><div class='del'>- * The message is logged, and also sent to</div><div class='del'>- * stderr if phase == PHASE_INITIALIZE.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-option_error __V((char *fmt, ...))</div><div class='del'>-{</div><div class='del'>-    va_list args;</div><div class='del'>-    char buf[1024];</div><div class='del'>-</div><div class='del'>-#if defined(__STDC__)</div><div class='del'>-    va_start(args, fmt);</div><div class='del'>-#else</div><div class='del'>-    char *fmt;</div><div class='del'>-    va_start(args);</div><div class='del'>-    fmt = va_arg(args, char *);</div><div class='del'>-#endif</div><div class='del'>-    vslprintf(buf, sizeof(buf), fmt, args);</div><div class='del'>-    va_end(args);</div><div class='del'>-    if (phase == PHASE_INITIALIZE)</div><div class='del'>-	fprintf(stderr, "%s: %s\n", progname, buf);</div><div class='del'>-    syslog(LOG_ERR, "%s", buf);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * readable - check if a file is readable by the real user.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-readable(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    uid_t uid;</div><div class='del'>-    int i;</div><div class='del'>-    struct stat sbuf;</div><div class='del'>-</div><div class='del'>-    uid = getuid();</div><div class='del'>-    if (uid == 0)</div><div class='del'>-	return 1;</div><div class='del'>-    if (fstat(fd, &amp;sbuf) != 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (sbuf.st_uid == uid)</div><div class='del'>-	return sbuf.st_mode &amp; S_IRUSR;</div><div class='del'>-    if (sbuf.st_gid == getgid())</div><div class='del'>-	return sbuf.st_mode &amp; S_IRGRP;</div><div class='del'>-    for (i = 0; i &lt; ngroups; ++i)</div><div class='del'>-	if (sbuf.st_gid == groups[i])</div><div class='del'>-	    return sbuf.st_mode &amp; S_IRGRP;</div><div class='del'>-    return sbuf.st_mode &amp; S_IROTH;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Read a word from a file.</div><div class='del'>- * Words are delimited by white-space or by quotes (" or ').</div><div class='del'>- * Quotes, white-space and \ may be escaped with \.</div><div class='del'>- * \&lt;newline&gt; is ignored.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-getword(f, word, newlinep, filename)</div><div class='del'>-    FILE *f;</div><div class='del'>-    char *word;</div><div class='del'>-    int *newlinep;</div><div class='del'>-    char *filename;</div><div class='del'>-{</div><div class='del'>-    int c, len, escape;</div><div class='del'>-    int quoted, comment;</div><div class='del'>-    int value, digit, got, n;</div><div class='del'>-</div><div class='del'>-#define isoctal(c) ((c) &gt;= '0' &amp;&amp; (c) &lt; '8')</div><div class='del'>-</div><div class='del'>-    *newlinep = 0;</div><div class='del'>-    len = 0;</div><div class='del'>-    escape = 0;</div><div class='del'>-    comment = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * First skip white-space and comments.</div><div class='del'>-     */</div><div class='del'>-    for (;;) {</div><div class='del'>-	c = getc(f);</div><div class='del'>-	if (c == EOF)</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * A newline means the end of a comment; backslash-newline</div><div class='del'>-	 * is ignored.  Note that we cannot have escape &amp;&amp; comment.</div><div class='del'>-	 */</div><div class='del'>-	if (c == '\n') {</div><div class='del'>-	    if (!escape) {</div><div class='del'>-		*newlinep = 1;</div><div class='del'>-		comment = 0;</div><div class='del'>-	    } else</div><div class='del'>-		escape = 0;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Ignore characters other than newline in a comment.</div><div class='del'>-	 */</div><div class='del'>-	if (comment)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If this character is escaped, we have a word start.</div><div class='del'>-	 */</div><div class='del'>-	if (escape)</div><div class='del'>-	    break;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If this is the escape character, look at the next character.</div><div class='del'>-	 */</div><div class='del'>-	if (c == '\\') {</div><div class='del'>-	    escape = 1;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * If this is the start of a comment, ignore the rest of the line.</div><div class='del'>-	 */</div><div class='del'>-	if (c == '#') {</div><div class='del'>-	    comment = 1;</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * A non-whitespace character is the start of a word.</div><div class='del'>-	 */</div><div class='del'>-	if (!isspace(c))</div><div class='del'>-	    break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Save the delimiter for quoted strings.</div><div class='del'>-     */</div><div class='del'>-    if (!escape &amp;&amp; (c == '"' || c == '\'')) {</div><div class='del'>-        quoted = c;</div><div class='del'>-	c = getc(f);</div><div class='del'>-    } else</div><div class='del'>-        quoted = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Process characters until the end of the word.</div><div class='del'>-     */</div><div class='del'>-    while (c != EOF) {</div><div class='del'>-	if (escape) {</div><div class='del'>-	    /*</div><div class='del'>-	     * This character is escaped: backslash-newline is ignored,</div><div class='del'>-	     * various other characters indicate particular values</div><div class='del'>-	     * as for C backslash-escapes.</div><div class='del'>-	     */</div><div class='del'>-	    escape = 0;</div><div class='del'>-	    if (c == '\n') {</div><div class='del'>-	        c = getc(f);</div><div class='del'>-		continue;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    got = 0;</div><div class='del'>-	    switch (c) {</div><div class='del'>-	    case 'a':</div><div class='del'>-		value = '\a';</div><div class='del'>-		break;</div><div class='del'>-	    case 'b':</div><div class='del'>-		value = '\b';</div><div class='del'>-		break;</div><div class='del'>-	    case 'f':</div><div class='del'>-		value = '\f';</div><div class='del'>-		break;</div><div class='del'>-	    case 'n':</div><div class='del'>-		value = '\n';</div><div class='del'>-		break;</div><div class='del'>-	    case 'r':</div><div class='del'>-		value = '\r';</div><div class='del'>-		break;</div><div class='del'>-	    case 's':</div><div class='del'>-		value = ' ';</div><div class='del'>-		break;</div><div class='del'>-	    case 't':</div><div class='del'>-		value = '\t';</div><div class='del'>-		break;</div><div class='del'>-</div><div class='del'>-	    default:</div><div class='del'>-		if (isoctal(c)) {</div><div class='del'>-		    /*</div><div class='del'>-		     * \ddd octal sequence</div><div class='del'>-		     */</div><div class='del'>-		    value = 0;</div><div class='del'>-		    for (n = 0; n &lt; 3 &amp;&amp; isoctal(c); ++n) {</div><div class='del'>-			value = (value &lt;&lt; 3) + (c &amp; 07);</div><div class='del'>-			c = getc(f);</div><div class='del'>-		    }</div><div class='del'>-		    got = 1;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		if (c == 'x') {</div><div class='del'>-		    /*</div><div class='del'>-		     * \x&lt;hex_string&gt; sequence</div><div class='del'>-		     */</div><div class='del'>-		    value = 0;</div><div class='del'>-		    c = getc(f);</div><div class='del'>-		    for (n = 0; n &lt; 2 &amp;&amp; isxdigit(c); ++n) {</div><div class='del'>-			digit = toupper(c) - '0';</div><div class='del'>-			if (digit &gt; 10)</div><div class='del'>-			    digit += '0' + 10 - 'A';</div><div class='del'>-			value = (value &lt;&lt; 4) + digit;</div><div class='del'>-			c = getc (f);</div><div class='del'>-		    }</div><div class='del'>-		    got = 1;</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-</div><div class='del'>-		/*</div><div class='del'>-		 * Otherwise the character stands for itself.</div><div class='del'>-		 */</div><div class='del'>-		value = c;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    /*</div><div class='del'>-	     * Store the resulting character for the escape sequence.</div><div class='del'>-	     */</div><div class='del'>-	    if (len &lt; MAXWORDLEN-1)</div><div class='del'>-		word[len] = value;</div><div class='del'>-	    ++len;</div><div class='del'>-</div><div class='del'>-	    if (!got)</div><div class='del'>-		c = getc(f);</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Not escaped: see if we've reached the end of the word.</div><div class='del'>-	 */</div><div class='del'>-	if (quoted) {</div><div class='del'>-	    if (c == quoted)</div><div class='del'>-		break;</div><div class='del'>-	} else {</div><div class='del'>-	    if (isspace(c) || c == '#') {</div><div class='del'>-		ungetc (c, f);</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Backslash starts an escape sequence.</div><div class='del'>-	 */</div><div class='del'>-	if (c == '\\') {</div><div class='del'>-	    escape = 1;</div><div class='del'>-	    c = getc(f);</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * An ordinary character: store it in the word and get another.</div><div class='del'>-	 */</div><div class='del'>-	if (len &lt; MAXWORDLEN-1)</div><div class='del'>-	    word[len] = c;</div><div class='del'>-	++len;</div><div class='del'>-</div><div class='del'>-	c = getc(f);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * End of the word: check for errors.</div><div class='del'>-     */</div><div class='del'>-    if (c == EOF) {</div><div class='del'>-	if (ferror(f)) {</div><div class='del'>-	    if (errno == 0)</div><div class='del'>-		errno = EIO;</div><div class='del'>-	    option_error("Error reading %s: %m", filename);</div><div class='del'>-	    die(1);</div><div class='del'>-	}</div><div class='del'>-	/*</div><div class='del'>-	 * If len is zero, then we didn't find a word before the</div><div class='del'>-	 * end of the file.</div><div class='del'>-	 */</div><div class='del'>-	if (len == 0)</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Warn if the word was too long, and append a terminating null.</div><div class='del'>-     */</div><div class='del'>-    if (len &gt;= MAXWORDLEN) {</div><div class='del'>-	option_error("warning: word in file %s too long (%.20s...)",</div><div class='del'>-		     filename, word);</div><div class='del'>-	len = MAXWORDLEN - 1;</div><div class='del'>-    }</div><div class='del'>-    word[len] = 0;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>-#undef isoctal</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * number_option - parse an unsigned numeric parameter for an option.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-number_option(str, valp, base)</div><div class='del'>-    char *str;</div><div class='del'>-    u_int32_t *valp;</div><div class='del'>-    int base;</div><div class='del'>-{</div><div class='del'>-    char *ptr;</div><div class='del'>-</div><div class='del'>-    *valp = strtoul(str, &amp;ptr, base);</div><div class='del'>-    if (ptr == str) {</div><div class='del'>-	option_error("invalid numeric parameter '%s' for %s option",</div><div class='del'>-		     str, current_option);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * int_option - like number_option, but valp is int *,</div><div class='del'>- * the base is assumed to be 0, and *valp is not changed</div><div class='del'>- * if there is an error.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-int_option(str, valp)</div><div class='del'>-    char *str;</div><div class='del'>-    int *valp;</div><div class='del'>-{</div><div class='del'>-    u_int32_t v;</div><div class='del'>-</div><div class='del'>-    if (!number_option(str, &amp;v, 0))</div><div class='del'>-	return 0;</div><div class='del'>-    *valp = (int) v;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following procedures parse options.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * readfile - take commands from a file.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-readfile(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    return options_from_file(*argv, 1, 1, privileged_option);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * callfile - take commands from /etc/ppp/peers/&lt;name&gt;.</div><div class='del'>- * Name may not contain /../, start with / or ../, or end in /..</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-callfile(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *fname, *arg, *p;</div><div class='del'>-    int l, ok;</div><div class='del'>-</div><div class='del'>-    arg = *argv;</div><div class='del'>-    ok = 1;</div><div class='del'>-    if (arg[0] == '/' || arg[0] == 0)</div><div class='del'>-	ok = 0;</div><div class='del'>-    else {</div><div class='del'>-	for (p = arg; *p != 0; ) {</div><div class='del'>-	    if (p[0] == '.' &amp;&amp; p[1] == '.' &amp;&amp; (p[2] == '/' || p[2] == 0)) {</div><div class='del'>-		ok = 0;</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    while (*p != '/' &amp;&amp; *p != 0)</div><div class='del'>-		++p;</div><div class='del'>-	    if (*p == '/')</div><div class='del'>-		++p;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (!ok) {</div><div class='del'>-	option_error("call option value may not contain .. or start with /");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    l = strlen(arg) + strlen(_PATH_PEERFILES) + 1;</div><div class='del'>-    if ((fname = (char *) malloc(l)) == NULL)</div><div class='del'>-	novm("call file name");</div><div class='del'>-    slprintf(fname, l, "%s%s", _PATH_PEERFILES, arg);</div><div class='del'>-</div><div class='del'>-    ok = options_from_file(fname, 1, 1, 1);</div><div class='del'>-</div><div class='del'>-    free(fname);</div><div class='del'>-    return ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-/*</div><div class='del'>- * setpassfilter - Set the pass filter for packets</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setpassfilter(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    pc.linktype = DLT_PPP;</div><div class='del'>-    pc.snapshot = PPP_HDRLEN;</div><div class='del'>- </div><div class='del'>-    if (pcap_compile(&amp;pc, &amp;pass_filter, *argv, 1, netmask) == 0)</div><div class='del'>-	return 1;</div><div class='del'>-    option_error("error in pass-filter expression: %s\n", pcap_geterr(&amp;pc));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setactivefilter - Set the active filter for packets</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setactivefilter(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    pc.linktype = DLT_PPP;</div><div class='del'>-    pc.snapshot = PPP_HDRLEN;</div><div class='del'>- </div><div class='del'>-    if (pcap_compile(&amp;pc, &amp;active_filter, *argv, 1, netmask) == 0)</div><div class='del'>-	return 1;</div><div class='del'>-    option_error("error in active-filter expression: %s\n", pcap_geterr(&amp;pc));</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setdomain - Set domain name to append to hostname </div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-setdomain(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    gethostname(hostname, MAXNAMELEN);</div><div class='del'>-    if (**argv != 0) {</div><div class='del'>-	if (**argv != '.')</div><div class='del'>-	    strncat(hostname, ".", MAXNAMELEN - strlen(hostname));</div><div class='del'>-	domain = hostname + strlen(hostname);</div><div class='del'>-	strncat(hostname, *argv, MAXNAMELEN - strlen(hostname));</div><div class='del'>-    }</div><div class='del'>-    hostname[MAXNAMELEN-1] = 0;</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-setlogfile(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    int fd, err;</div><div class='del'>-</div><div class='del'>-    if (!privileged_option)</div><div class='del'>-	seteuid(getuid());</div><div class='del'>-    fd = open(*argv, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0644);</div><div class='del'>-    if (fd &lt; 0 &amp;&amp; errno == EEXIST)</div><div class='del'>-	fd = open(*argv, O_WRONLY | O_APPEND);</div><div class='del'>-    err = errno;</div><div class='del'>-    if (!privileged_option)</div><div class='del'>-	seteuid(0);</div><div class='del'>-    if (fd &lt; 0) {</div><div class='del'>-	errno = err;</div><div class='del'>-	option_error("Can't open log file %s: %m", *argv);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    strlcpy(logfile_name, *argv, sizeof(logfile_name));</div><div class='del'>-    if (logfile_fd &gt;= 0)</div><div class='del'>-	close(logfile_fd);</div><div class='del'>-    logfile_fd = fd;</div><div class='del'>-    log_to_fd = fd;</div><div class='del'>-    log_default = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef PLUGIN</div><div class='del'>-static int</div><div class='del'>-loadplugin(argv)</div><div class='del'>-    char **argv;</div><div class='del'>-{</div><div class='del'>-    char *arg = *argv;</div><div class='del'>-    void *handle;</div><div class='del'>-    const char *err;</div><div class='del'>-    void (*init) __P((void));</div><div class='del'>-    char *path = arg;</div><div class='del'>-    const char *vers;</div><div class='del'>-</div><div class='del'>-    if (strchr(arg, '/') == 0) {</div><div class='del'>-	const char *base = _PATH_PLUGIN;</div><div class='del'>-	int l = strlen(base) + strlen(arg) + 2;</div><div class='del'>-	path = malloc(l);</div><div class='del'>-	if (path == 0)</div><div class='del'>-	    novm("plugin file path");</div><div class='del'>-	strlcpy(path, base, l);</div><div class='del'>-	strlcat(path, "/", l);</div><div class='del'>-	strlcat(path, arg, l);</div><div class='del'>-    }</div><div class='del'>-    handle = dlopen(path, RTLD_GLOBAL | RTLD_NOW);</div><div class='del'>-    if (handle == 0) {</div><div class='del'>-	err = dlerror();</div><div class='del'>-	if (err != 0)</div><div class='del'>-	    option_error("%s", err);</div><div class='del'>-	option_error("Couldn't load plugin %s", arg);</div><div class='del'>-	goto err;</div><div class='del'>-    }</div><div class='del'>-    init = (void (*)(void))dlsym(handle, "plugin_init");</div><div class='del'>-    if (init == 0) {</div><div class='del'>-	option_error("%s has no initialization entry point", arg);</div><div class='del'>-	goto errclose;</div><div class='del'>-    }</div><div class='del'>-    vers = (const char *) dlsym(handle, "pppd_version");</div><div class='del'>-    if (vers == 0) {</div><div class='del'>-	warn("Warning: plugin %s has no version information", arg);</div><div class='del'>-    } else if (strcmp(vers, VERSION) != 0) {</div><div class='del'>-	option_error("Plugin %s is for pppd version %s, this is %s",</div><div class='del'>-		     vers, VERSION);</div><div class='del'>-	goto errclose;</div><div class='del'>-    }</div><div class='del'>-    info("Plugin %s loaded.", arg);</div><div class='del'>-    (*init)();</div><div class='del'>-    return 1;</div><div class='del'>-</div><div class='del'>- errclose:</div><div class='del'>-    dlclose(handle);</div><div class='del'>- err:</div><div class='del'>-    if (path != arg)</div><div class='del'>-	free(path);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-#endif /* PLUGIN */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/patchlevel.h b/mdk-stage1/ppp/pppd/patchlevel.h<br/>deleted file mode 100644<br/>index 2a2d816f1..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/patchlevel.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/patchlevel.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,4 +0,0 @@</div><div class='del'>-/* $Id$ */</div><div class='del'>-</div><div class='del'>-#define VERSION		"2.4.1"</div><div class='del'>-#define DATE		"25 March 2001"</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/pathnames.h b/mdk-stage1/ppp/pppd/pathnames.h<br/>deleted file mode 100644<br/>index e80784567..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/pathnames.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/pathnames.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,25 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * define path names</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define _PATH_VARRUN 	"/var/run/"</div><div class='del'>-#define _PATH_DEVNULL	"/dev/null"</div><div class='del'>-#define _ROOT_PATH</div><div class='del'>-</div><div class='del'>-#define _PATH_UPAPFILE 	 _ROOT_PATH "/etc/ppp/pap-secrets"</div><div class='del'>-#define _PATH_CHAPFILE 	 _ROOT_PATH "/etc/ppp/chap-secrets"</div><div class='del'>-#define _PATH_SYSOPTIONS _ROOT_PATH "/etc/ppp/options"</div><div class='del'>-#define _PATH_IPUP	 _ROOT_PATH "/etc/ppp/ip-up"</div><div class='del'>-#define _PATH_IPDOWN	 _ROOT_PATH "/etc/ppp/ip-down"</div><div class='del'>-#define _PATH_AUTHUP	 _ROOT_PATH "/etc/ppp/auth-up"</div><div class='del'>-#define _PATH_AUTHDOWN	 _ROOT_PATH "/etc/ppp/auth-down"</div><div class='del'>-#define _PATH_TTYOPT	 _ROOT_PATH "/etc/ppp/options."</div><div class='del'>-#define _PATH_CONNERRS	 _ROOT_PATH "/etc/ppp/connect-errors"</div><div class='del'>-#define _PATH_PEERFILES	 _ROOT_PATH "/etc/ppp/peers/"</div><div class='del'>-#define _PATH_RESOLV	 _ROOT_PATH "/etc/resolv.conf"</div><div class='del'>-</div><div class='del'>-#define _PATH_USEROPT	 ".ppprc"</div><div class='del'>-</div><div class='del'>-#define _PATH_PPPDB	_ROOT_PATH _PATH_VARRUN "pppd.tdb"</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/plugins/Makefile.linux b/mdk-stage1/ppp/pppd/plugins/Makefile.linux<br/>deleted file mode 100644<br/>index a64256461..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/plugins/Makefile.linux?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/plugins/Makefile.linux</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,19 +0,0 @@</div><div class='del'>-CC	= gcc</div><div class='del'>-CFLAGS	= -g -O2 -I.. -I../../include -fPIC</div><div class='del'>-LDFLAGS	= -shared</div><div class='del'>-INSTALL	= install</div><div class='del'>-</div><div class='del'>-all:	minconn.so passprompt.so</div><div class='del'>-</div><div class='del'>-minconn.so: minconn.c</div><div class='del'>-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) minconn.c</div><div class='del'>-</div><div class='del'>-passprompt.so: passprompt.c</div><div class='del'>-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) passprompt.c</div><div class='del'>-</div><div class='del'>-LIBDIR	= /usr/lib/pppd</div><div class='del'>-</div><div class='del'>-install: minconn.so passprompt.so</div><div class='del'>-	version=`awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h`; \</div><div class='del'>-	$(INSTALL) -d $(LIBDIR)/$$version; \</div><div class='del'>-	$(INSTALL) $? $(LIBDIR)/$$version
\ No newline at end of file</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/plugins/Makefile.sol2 b/mdk-stage1/ppp/pppd/plugins/Makefile.sol2<br/>deleted file mode 100644<br/>index 8f4398258..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/plugins/Makefile.sol2?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/plugins/Makefile.sol2</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,27 +0,0 @@</div><div class='del'>-#</div><div class='del'>-# Makefile for plugins on Solaris 2</div><div class='del'>-#</div><div class='del'>-# $Id$</div><div class='del'>-#</div><div class='del'>-</div><div class='del'>-include ../../svr4/Makedefs</div><div class='del'>-</div><div class='del'>-CFLAGS	= -c -O -I.. -I../../include $(COPTS)</div><div class='del'>-LDFLAGS	= -G </div><div class='del'>-</div><div class='del'>-all:	minconn.so</div><div class='del'>-</div><div class='del'>-minconn.so: minconn.o</div><div class='del'>-	ld -o $@ $(LDFLAGS) -h $@ minconn.o</div><div class='del'>-</div><div class='del'>-minconn.o: minconn.c</div><div class='del'>-	$(CC) $(CFLAGS) -c $? </div><div class='del'>-</div><div class='del'>-passprompt.so: passprompt.o</div><div class='del'>-	ld -o $@ $(LDFLAGS) -h $@ passprompt.o</div><div class='del'>-</div><div class='del'>-passprompt.o: passprompt.c</div><div class='del'>-	$(CC) $(CFLAGS) -c $?</div><div class='del'>-</div><div class='del'>-clean:</div><div class='del'>-	rm -f *.o *.so</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/plugins/minconn.c b/mdk-stage1/ppp/pppd/plugins/minconn.c<br/>deleted file mode 100644<br/>index 02ea34bf6..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/plugins/minconn.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/plugins/minconn.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,46 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * minconn.c - pppd plugin to implement a `minconnect' option.</div><div class='del'>- *</div><div class='del'>- * Copyright 1999 Paul Mackerras.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms.  The name of the author</div><div class='del'>- * may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include "pppd.h"</div><div class='del'>-</div><div class='del'>-char pppd_version[] = VERSION;</div><div class='del'>-</div><div class='del'>-static int minconnect = 0;</div><div class='del'>-</div><div class='del'>-static option_t my_options[] = {</div><div class='del'>-	{ "minconnect", o_int, &amp;minconnect,</div><div class='del'>-	  "Set minimum connect time before idle timeout applies" },</div><div class='del'>-	{ NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int my_get_idle(struct ppp_idle *idle)</div><div class='del'>-{</div><div class='del'>-	time_t t;</div><div class='del'>-</div><div class='del'>-	if (idle == NULL)</div><div class='del'>-		return minconnect? minconnect: idle_time_limit;</div><div class='del'>-	t = idle-&gt;xmit_idle;</div><div class='del'>-	if (idle-&gt;recv_idle &lt; t)</div><div class='del'>-		t = idle-&gt;recv_idle;</div><div class='del'>-	return idle_time_limit - t;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void plugin_init(void)</div><div class='del'>-{</div><div class='del'>-	info("plugin_init");</div><div class='del'>-	add_options(my_options);</div><div class='del'>-	idle_time_hook = my_get_idle;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/plugins/passprompt.c b/mdk-stage1/ppp/pppd/plugins/passprompt.c<br/>deleted file mode 100644<br/>index 5e6a7f90b..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/plugins/passprompt.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/plugins/passprompt.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,108 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * passprompt.c - pppd plugin to invoke an external PAP password prompter</div><div class='del'>- *</div><div class='del'>- * Copyright 1999 Paul Mackerras, Alan Curry.</div><div class='del'>- *</div><div class='del'>- *  This program is free software; you can redistribute it and/or</div><div class='del'>- *  modify it under the terms of the GNU General Public License</div><div class='del'>- *  as published by the Free Software Foundation; either version</div><div class='del'>- *  2 of the License, or (at your option) any later version.</div><div class='del'>- */</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;sys/wait.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include "pppd.h"</div><div class='del'>-</div><div class='del'>-char pppd_version[] = VERSION;</div><div class='del'>-</div><div class='del'>-static char promptprog[PATH_MAX+1];</div><div class='del'>-</div><div class='del'>-static option_t options[] = {</div><div class='del'>-    { "promptprog", o_string, promptprog,</div><div class='del'>-      "External PAP password prompting program",</div><div class='del'>-      OPT_STATIC, NULL, PATH_MAX },</div><div class='del'>-    { NULL }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-static int promptpass(char *user, char *passwd)</div><div class='del'>-{</div><div class='del'>-    int p[2];</div><div class='del'>-    pid_t kid;</div><div class='del'>-    int readgood, wstat;</div><div class='del'>-    size_t red;</div><div class='del'>-</div><div class='del'>-    if (promptprog[0] == 0 || access(promptprog, X_OK) &lt; 0)</div><div class='del'>-	return -1;	/* sorry, can't help */</div><div class='del'>-</div><div class='del'>-    if (!passwd)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-    if (pipe(p)) {</div><div class='del'>-	warn("Can't make a pipe for %s", promptprog);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((kid = fork()) == (pid_t) -1) {</div><div class='del'>-	warn("Can't fork to run %s", promptprog);</div><div class='del'>-	close(p[0]);</div><div class='del'>-	close(p[1]);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (!kid) {</div><div class='del'>-	/* we are the child, exec the program */</div><div class='del'>-	char *argv[4], fdstr[32];</div><div class='del'>-	sys_close();</div><div class='del'>-	closelog();</div><div class='del'>-	close(p[0]);</div><div class='del'>-	seteuid(getuid());</div><div class='del'>-	setegid(getgid());</div><div class='del'>-	argv[0] = promptprog;</div><div class='del'>-	argv[1] = user;</div><div class='del'>-	argv[2] = remote_name;</div><div class='del'>-	sprintf(fdstr, "%d", p[1]);</div><div class='del'>-	argv[3] = fdstr;</div><div class='del'>-	argv[4] = 0;</div><div class='del'>-	execv(*argv, argv);</div><div class='del'>-	_exit(127);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* we are the parent, read the password from the pipe */</div><div class='del'>-    close(p[1]);</div><div class='del'>-    readgood = 0;</div><div class='del'>-    do {</div><div class='del'>-	red = read(p[0], passwd + readgood, MAXSECRETLEN-1 - readgood);</div><div class='del'>-	if (red == 0)</div><div class='del'>-	    break;</div><div class='del'>-	if (red &lt; 0) {</div><div class='del'>-	    error("Can't read secret from %s: %m", promptprog);</div><div class='del'>-	    readgood = -1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	readgood += red;</div><div class='del'>-    } while (readgood &lt; MAXSECRETLEN - 1);</div><div class='del'>-    passwd[readgood] = 0;</div><div class='del'>-    close(p[0]);</div><div class='del'>-</div><div class='del'>-    /* now wait for child to exit */</div><div class='del'>-    while (waitpid(kid, &amp;wstat, 0) &lt; 0) {</div><div class='del'>-	if (errno != EINTR) {</div><div class='del'>-	    warn("error waiting for %s: %m", promptprog);</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (readgood &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (!WIFEXITED(wstat))</div><div class='del'>-	warn("%s terminated abnormally", promptprog);</div><div class='del'>-    if (WEXITSTATUS(wstat))</div><div class='del'>-	warn("%s exited with code %d", promptprog, WEXITSTATUS(status));</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-void plugin_init(void)</div><div class='del'>-{</div><div class='del'>-    add_options(options);</div><div class='del'>-    pap_passwd_hook = promptpass;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/ppp.pam b/mdk-stage1/ppp/pppd/ppp.pam<br/>deleted file mode 100644<br/>index 475a4bc88..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/ppp.pam?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/ppp.pam</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,6 +0,0 @@</div><div class='del'>-#%PAM-1.0</div><div class='del'>-# Information for the PPPD process with the 'login' option.</div><div class='del'>-auth	required	pam_nologin.so</div><div class='del'>-auth	required	pam_unix.so</div><div class='del'>-account	required	pam_unix.so</div><div class='del'>-session	required	pam_unix.so
\ No newline at end of file</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/pppd.8 b/mdk-stage1/ppp/pppd/pppd.8<br/>deleted file mode 100644<br/>index ab091cd83..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/pppd.8?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/pppd.8</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1591 +0,0 @@</div><div class='del'>-.\" manual page [] for pppd 2.4</div><div class='del'>-.\" $Id$</div><div class='del'>-.\" SH section heading</div><div class='del'>-.\" SS subsection heading</div><div class='del'>-.\" LP paragraph</div><div class='del'>-.\" IP indented paragraph</div><div class='del'>-.\" TP hanging label</div><div class='del'>-.TH PPPD 8</div><div class='del'>-.SH NAME</div><div class='del'>-pppd \- Point to Point Protocol daemon</div><div class='del'>-.SH SYNOPSIS</div><div class='del'>-.B pppd</div><div class='del'>-[</div><div class='del'>-.I tty_name</div><div class='del'>-] [</div><div class='del'>-.I speed</div><div class='del'>-] [</div><div class='del'>-.I options</div><div class='del'>-]</div><div class='del'>-.SH DESCRIPTION</div><div class='del'>-.LP</div><div class='del'>-The Point-to-Point Protocol (PPP) provides a method for transmitting</div><div class='del'>-datagrams over serial point-to-point links.  PPP</div><div class='del'>-is composed of three parts: a method for encapsulating datagrams over</div><div class='del'>-serial links, an extensible Link Control Protocol (LCP), and</div><div class='del'>-a family of Network Control Protocols (NCP) for establishing</div><div class='del'>-and configuring different network-layer protocols.</div><div class='del'>-.LP</div><div class='del'>-The encapsulation scheme is provided by driver code in the kernel.</div><div class='del'>-Pppd provides the basic LCP, authentication support, and an NCP for</div><div class='del'>-establishing and configuring the Internet Protocol (IP) (called the IP</div><div class='del'>-Control Protocol, IPCP).</div><div class='del'>-.SH FREQUENTLY USED OPTIONS</div><div class='del'>-.TP</div><div class='del'>-.I &lt;tty_name&gt;</div><div class='del'>-Communicate over the named device.  The string "/dev/" is prepended if</div><div class='del'>-necessary.  If no device name is given, or if the name of the terminal</div><div class='del'>-connected to the standard input is given, pppd will use that terminal,</div><div class='del'>-and will not fork to put itself in the background.  A value for this</div><div class='del'>-option from a privileged source cannot be overridden by a</div><div class='del'>-non-privileged user.</div><div class='del'>-.TP</div><div class='del'>-.I &lt;speed&gt;</div><div class='del'>-Set the baud rate to &lt;speed&gt; (a decimal number).  On systems such as</div><div class='del'>-4.4BSD and NetBSD, any speed can be specified.  Other systems</div><div class='del'>-(e.g. SunOS) allow only a limited set of speeds.</div><div class='del'>-.TP</div><div class='del'>-.B asyncmap \fI&lt;map&gt;</div><div class='del'>-Set the async character map to &lt;map&gt;.  This map describes which</div><div class='del'>-control characters cannot be successfully received over the serial</div><div class='del'>-line.  Pppd will ask the peer to send these characters as a 2-byte</div><div class='del'>-escape sequence.  The argument is a 32 bit hex number with each bit</div><div class='del'>-representing a character to escape.  Bit 0 (00000001) represents the</div><div class='del'>-character 0x00; bit 31 (80000000) represents the character 0x1f or ^_.</div><div class='del'>-If multiple \fIasyncmap\fR options are given, the values are ORed</div><div class='del'>-together.  If no \fIasyncmap\fR option is given, no async character</div><div class='del'>-map will be negotiated for the receive direction; the peer should then</div><div class='del'>-escape \fIall\fR control characters.  To escape transmitted</div><div class='del'>-characters, use the \fIescape\fR option.</div><div class='del'>-.TP</div><div class='del'>-.B auth</div><div class='del'>-Require the peer to authenticate itself before allowing network</div><div class='del'>-packets to be sent or received.  This option is the default if the</div><div class='del'>-system has a default route.  If neither this option nor the</div><div class='del'>-\fInoauth\fR option is specified, pppd will only allow the peer to use</div><div class='del'>-IP addresses to which the system does not already have a route.</div><div class='del'>-.TP</div><div class='del'>-.B call \fIname</div><div class='del'>-Read options from the file /etc/ppp/peers/\fIname\fR.  This file may</div><div class='del'>-contain privileged options, such as \fInoauth\fR, even if pppd</div><div class='del'>-is not being run by root.  The \fIname\fR string may not begin with /</div><div class='del'>-or include .. as a pathname component.  The format of the options file</div><div class='del'>-is described below.</div><div class='del'>-.TP</div><div class='del'>-.B connect \fIscript</div><div class='del'>-Use the executable or shell command specified by \fIscript\fR to set</div><div class='del'>-up the serial line.  This script would typically use the chat(8)</div><div class='del'>-program to dial the modem and start the remote ppp session.  A value</div><div class='del'>-for this option from a privileged source cannot be overridden by a</div><div class='del'>-non-privileged user.</div><div class='del'>-.TP</div><div class='del'>-.B crtscts</div><div class='del'>-Use hardware flow control (i.e. RTS/CTS) to control the flow of</div><div class='del'>-data on the serial port.  If neither the \fIcrtscts\fR, the</div><div class='del'>-\fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR option</div><div class='del'>-is given, the hardware flow control setting for the serial port is</div><div class='del'>-left unchanged.</div><div class='del'>-Some serial ports (such as Macintosh serial ports) lack a true</div><div class='del'>-RTS output. Such serial ports use this mode to implement</div><div class='del'>-unidirectional flow control. The serial port will</div><div class='del'>-suspend transmission when requested by the modem (via CTS)</div><div class='del'>-but will be unable to request the modem stop sending to the</div><div class='del'>-computer. This mode retains the ability to use DTR as</div><div class='del'>-a modem control line.</div><div class='del'>-.TP</div><div class='del'>-.B defaultroute</div><div class='del'>-Add a default route to the system routing tables, using the peer as</div><div class='del'>-the gateway, when IPCP negotiation is successfully completed.</div><div class='del'>-This entry is removed when the PPP connection is broken.  This option</div><div class='del'>-is privileged if the \fInodefaultroute\fR option has been specified.</div><div class='del'>-.TP</div><div class='del'>-.B disconnect \fIscript</div><div class='del'>-Run the executable or shell command specified by \fIscript\fR after</div><div class='del'>-pppd has terminated the link.  This script could, for example, issue</div><div class='del'>-commands to the modem to cause it to hang up if hardware modem control</div><div class='del'>-signals were not available.  The disconnect script is not run if the</div><div class='del'>-modem has already hung up.  A value for this option from a privileged</div><div class='del'>-source cannot be overridden by a non-privileged user.</div><div class='del'>-.TP</div><div class='del'>-.B escape \fIxx,yy,...</div><div class='del'>-Specifies that certain characters should be escaped on transmission</div><div class='del'>-(regardless of whether the peer requests them to be escaped with its</div><div class='del'>-async control character map).  The characters to be escaped are</div><div class='del'>-specified as a list of hex numbers separated by commas.  Note that</div><div class='del'>-almost any character can be specified for the \fIescape\fR option,</div><div class='del'>-unlike the \fIasyncmap\fR option which only allows control characters</div><div class='del'>-to be specified.  The characters which may not be escaped are those</div><div class='del'>-with hex values 0x20 - 0x3f or 0x5e.</div><div class='del'>-.TP</div><div class='del'>-.B file \fIname</div><div class='del'>-Read options from file \fIname\fR (the format is described below).</div><div class='del'>-The file must be readable by the user who has invoked pppd.</div><div class='del'>-.TP</div><div class='del'>-.B init \fIscript</div><div class='del'>-Run the executable or shell command specified by \fIscript\fR to</div><div class='del'>-initialize the serial line.  This script would typically use the</div><div class='del'>-chat(8) program to configure the modem to enable auto answer.  A value</div><div class='del'>-for this option from a privileged source cannot be overridden by a</div><div class='del'>-non-privileged user.</div><div class='del'>-.TP</div><div class='del'>-.B lock</div><div class='del'>-Specifies that pppd should create a UUCP-style lock file for the</div><div class='del'>-serial device to ensure exclusive access to the device.</div><div class='del'>-.TP</div><div class='del'>-.B mru \fIn</div><div class='del'>-Set the MRU [Maximum Receive Unit] value to \fIn\fR. Pppd</div><div class='del'>-will ask the peer to send packets of no more than \fIn\fR bytes.  The</div><div class='del'>-minimum MRU value is 128.  The default MRU value is 1500.  A value of</div><div class='del'>-296 is recommended for slow links (40 bytes for TCP/IP header + 256</div><div class='del'>-bytes of data).  (Note that for IPv6 MRU must be at least 1280)</div><div class='del'>-.TP</div><div class='del'>-.B mtu \fIn</div><div class='del'>-Set the MTU [Maximum Transmit Unit] value to \fIn\fR.  Unless the</div><div class='del'>-peer requests a smaller value via MRU negotiation, pppd will</div><div class='del'>-request that the kernel networking code send data packets of no more</div><div class='del'>-than \fIn\fR bytes through the PPP network interface.  (Note that for </div><div class='del'>-IPv6 MTU must be at least 1280)</div><div class='del'>-.TP</div><div class='del'>-.B passive</div><div class='del'>-Enables the "passive" option in the LCP.  With this option, pppd will</div><div class='del'>-attempt to initiate a connection; if no reply is received from the</div><div class='del'>-peer, pppd will then just wait passively for a valid LCP packet from</div><div class='del'>-the peer, instead of exiting, as it would without this option.</div><div class='del'>-.SH OPTIONS</div><div class='del'>-.TP</div><div class='del'>-.I &lt;local_IP_address&gt;\fB:\fI&lt;remote_IP_address&gt;</div><div class='del'>-Set the local and/or remote interface IP addresses.  Either one may be</div><div class='del'>-omitted.  The IP addresses can be specified with a host name or in</div><div class='del'>-decimal dot notation (e.g. 150.234.56.78).  The default local</div><div class='del'>-address is the (first) IP address of the system (unless the</div><div class='del'>-\fInoipdefault\fR</div><div class='del'>-option is given).  The remote address will be obtained from the peer</div><div class='del'>-if not specified in any option.  Thus, in simple cases, this option is</div><div class='del'>-not required.  If a local and/or remote IP address is specified with</div><div class='del'>-this option, pppd</div><div class='del'>-will not accept a different value from the peer in the IPCP</div><div class='del'>-negotiation, unless the \fIipcp-accept-local\fR and/or</div><div class='del'>-\fIipcp-accept-remote\fR options are given, respectively.</div><div class='del'>-.TP</div><div class='del'>-.B ipv6 \fI&lt;local_interface_identifier&gt;\fR,\fI&lt;remote_interface_identifier&gt;</div><div class='del'>-Set the local and/or remote 64-bit interface identifier. Either one may be</div><div class='del'>-omitted. The identifier must be specified in standard ascii notation of</div><div class='del'>-IPv6 addresses (e.g. ::dead:beef). If the</div><div class='del'>-\fIipv6cp-use-ipaddr\fR</div><div class='del'>-option is given, the local identifier is the local IPv4 address (see above).</div><div class='del'>-On systems which supports a unique persistent id, such as EUI-48 derived</div><div class='del'>-from the Ethernet MAC address, \fIipv6cp-use-persistent\fR option can be</div><div class='del'>-used to replace the \fIipv6 &lt;local&gt;,&lt;remote&gt;\fR option. Otherwise the </div><div class='del'>-identifier is randomized.</div><div class='del'>-.TP</div><div class='del'>-.B active-filter \fIfilter-expression</div><div class='del'>-Specifies a packet filter to be applied to data packets to determine</div><div class='del'>-which packets are to be regarded as link activity, and therefore reset</div><div class='del'>-the idle timer, or cause the link to be brought up in demand-dialling</div><div class='del'>-mode.  This option is useful in conjunction with the</div><div class='del'>-\fBidle\fR option if there are packets being sent or received</div><div class='del'>-regularly over the link (for example, routing information packets)</div><div class='del'>-which would otherwise prevent the link from ever appearing to be idle.</div><div class='del'>-The \fIfilter-expression\fR syntax is as described for tcpdump(1),</div><div class='del'>-except that qualifiers which are inappropriate for a PPP link, such as</div><div class='del'>-\fBether\fR and \fBarp\fR, are not permitted.  Generally the filter</div><div class='del'>-expression should be enclosed in single-quotes to prevent whitespace</div><div class='del'>-in the expression from being interpreted by the shell. This option</div><div class='del'>-is currently only available under NetBSD, and then only</div><div class='del'>-if both the kernel and pppd were compiled with PPP_FILTER defined.</div><div class='del'>-.TP</div><div class='del'>-.B allow-ip \fIaddress(es)</div><div class='del'>-Allow peers to use the given IP address or subnet without</div><div class='del'>-authenticating themselves.  The parameter is parsed as for each</div><div class='del'>-element of the list of allowed IP addresses in the secrets files (see</div><div class='del'>-the AUTHENTICATION section below).</div><div class='del'>-.TP</div><div class='del'>-.B bsdcomp \fInr,nt</div><div class='del'>-Request that the peer compress packets that it sends, using the</div><div class='del'>-BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and</div><div class='del'>-agree to compress packets sent to the peer with a maximum code size of</div><div class='del'>-\fInt\fR bits.  If \fInt\fR is not specified, it defaults to the value</div><div class='del'>-given for \fInr\fR.  Values in the range 9 to 15 may be used for</div><div class='del'>-\fInr\fR and \fInt\fR; larger values give better compression but</div><div class='del'>-consume more kernel memory for compression dictionaries.</div><div class='del'>-Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables</div><div class='del'>-compression in the corresponding direction.  Use \fInobsdcomp\fR or</div><div class='del'>-\fIbsdcomp 0\fR to disable BSD-Compress compression entirely.</div><div class='del'>-.TP</div><div class='del'>-.B cdtrcts</div><div class='del'>-Use a non-standard hardware flow control (i.e. DTR/CTS) to control</div><div class='del'>-the flow of data on the serial port.  If neither the \fIcrtscts\fR,</div><div class='del'>-the \fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR</div><div class='del'>-option is given, the hardware flow control setting for the serial</div><div class='del'>-port is left unchanged.</div><div class='del'>-Some serial ports (such as Macintosh serial ports) lack a true</div><div class='del'>-RTS output. Such serial ports use this mode to implement true</div><div class='del'>-bi-directional flow control. The sacrifice is that this flow</div><div class='del'>-control mode does not permit using DTR as a modem control line.</div><div class='del'>-.TP</div><div class='del'>-.B chap-interval \fIn</div><div class='del'>-If this option is given, pppd will rechallenge the peer every \fIn\fR</div><div class='del'>-seconds.</div><div class='del'>-.TP</div><div class='del'>-.B chap-max-challenge \fIn</div><div class='del'>-Set the maximum number of CHAP challenge transmissions to \fIn\fR</div><div class='del'>-(default 10).</div><div class='del'>-.TP</div><div class='del'>-.B chap-restart \fIn</div><div class='del'>-Set the CHAP restart interval (retransmission timeout for challenges)</div><div class='del'>-to \fIn\fR seconds (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B connect-delay \fIn</div><div class='del'>-Wait for up \fIn\fR milliseconds after the connect script finishes for</div><div class='del'>-a valid PPP packet from the peer.  At the end of this time, or when a</div><div class='del'>-valid PPP packet is received from the peer, pppd will commence</div><div class='del'>-negotiation by sending its first LCP packet.  The default value is</div><div class='del'>-1000 (1 second).  This wait period only applies if the \fBconnect\fR</div><div class='del'>-or \fBpty\fR option is used.</div><div class='del'>-.TP</div><div class='del'>-.B debug</div><div class='del'>-Enables connection debugging facilities.</div><div class='del'>-If this option is given, pppd will log the contents of all</div><div class='del'>-control packets sent or received in a readable form.  The packets are</div><div class='del'>-logged through syslog with facility \fIdaemon\fR and level</div><div class='del'>-\fIdebug\fR.  This information can be directed to a file by setting up</div><div class='del'>-/etc/syslog.conf appropriately (see syslog.conf(5)).</div><div class='del'>-.TP</div><div class='del'>-.B default-asyncmap</div><div class='del'>-Disable asyncmap negotiation, forcing all control characters to be</div><div class='del'>-escaped for both the transmit and the receive direction.</div><div class='del'>-.TP</div><div class='del'>-.B default-mru</div><div class='del'>-Disable MRU [Maximum Receive Unit] negotiation.  With this option,</div><div class='del'>-pppd will use the default MRU value of 1500 bytes for both the</div><div class='del'>-transmit and receive direction.</div><div class='del'>-.TP</div><div class='del'>-.B deflate \fInr,nt</div><div class='del'>-Request that the peer compress packets that it sends, using the</div><div class='del'>-Deflate scheme, with a maximum window size of \fI2**nr\fR bytes, and</div><div class='del'>-agree to compress packets sent to the peer with a maximum window size</div><div class='del'>-of \fI2**nt\fR bytes.  If \fInt\fR is not specified, it defaults to</div><div class='del'>-the value given for \fInr\fR.  Values in the range 9 to 15 may be used</div><div class='del'>-for \fInr\fR and \fInt\fR; larger values give better compression but</div><div class='del'>-consume more kernel memory for compression dictionaries.</div><div class='del'>-Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables</div><div class='del'>-compression in the corresponding direction.  Use \fInodeflate\fR or</div><div class='del'>-\fIdeflate 0\fR to disable Deflate compression entirely.  (Note: pppd</div><div class='del'>-requests Deflate compression in preference to BSD-Compress if the peer</div><div class='del'>-can do either.)</div><div class='del'>-.TP</div><div class='del'>-.B demand</div><div class='del'>-Initiate the link only on demand, i.e. when data traffic is present.</div><div class='del'>-With this option, the remote IP address must be specified by the user</div><div class='del'>-on the command line or in an options file.  Pppd will initially</div><div class='del'>-configure the interface and enable it for IP traffic without</div><div class='del'>-connecting to the peer.  When traffic is available, pppd will</div><div class='del'>-connect to the peer and perform negotiation, authentication, etc.</div><div class='del'>-When this is completed, pppd will commence passing data packets</div><div class='del'>-(i.e., IP packets) across the link.</div><div class='del'>-</div><div class='del'>-The \fIdemand\fR option implies the \fIpersist\fR option.  If this</div><div class='del'>-behaviour is not desired, use the \fInopersist\fR option after the</div><div class='del'>-\fIdemand\fR option.  The \fIidle\fR and \fIholdoff\fR</div><div class='del'>-options are also useful in conjuction with the \fIdemand\fR option.</div><div class='del'>-.TP</div><div class='del'>-.B domain \fId</div><div class='del'>-Append the domain name \fId\fR to the local host name for authentication</div><div class='del'>-purposes.  For example, if gethostname() returns the name porsche, but</div><div class='del'>-the fully qualified domain name is porsche.Quotron.COM, you could</div><div class='del'>-specify \fIdomain Quotron.COM\fR.  Pppd would then use the name</div><div class='del'>-\fIporsche.Quotron.COM\fR for looking up secrets in the secrets file,</div><div class='del'>-and as the default name to send to the peer when authenticating itself</div><div class='del'>-to the peer.  This option is privileged.</div><div class='del'>-.TP</div><div class='del'>-.B dryrun</div><div class='del'>-With the \fBdryrun\fR option, pppd will print out all the option</div><div class='del'>-values which have been set and then exit, after parsing the command</div><div class='del'>-line and options files and checking the option values, but before</div><div class='del'>-initiating the link.  The option values are logged at level info, and</div><div class='del'>-also printed to standard output unless the device on standard output</div><div class='del'>-is the device that pppd would be using to communicate with the peer.</div><div class='del'>-.TP</div><div class='del'>-.B dump</div><div class='del'>-With the \fBdump\fR option, pppd will print out all the option values</div><div class='del'>-which have been set.  This option is like the \fBdryrun\fR option</div><div class='del'>-except that pppd proceeds as normal rather than exiting.</div><div class='del'>-.TP</div><div class='del'>-.B endpoint \fI&lt;epdisc&gt;</div><div class='del'>-Sets the endpoint discriminator sent by the local machine to the peer</div><div class='del'>-during multilink negotiation to \fI&lt;epdisc&gt;\fR.  The default is to use</div><div class='del'>-the MAC address of the first ethernet interface on the system, if any,</div><div class='del'>-otherwise the IPv4 address corresponding to the hostname, if any,</div><div class='del'>-provided it is not in the multicast or locally-assigned IP address</div><div class='del'>-ranges, or the localhost address.  The endpoint discriminator can be</div><div class='del'>-the string \fBnull\fR or of the form \fItype\fR:\fIvalue\fR, where</div><div class='del'>-type is a decimal number or one of the strings \fBlocal\fR, \fBIP\fR,</div><div class='del'>-\fBMAC\fR, \fBmagic\fR, or \fBphone\fR.  The value is an IP address in</div><div class='del'>-dotted-decimal notation for the \fBIP\fR type, or a string of bytes in</div><div class='del'>-hexadecimal, separated by periods or colons for the other types.  For</div><div class='del'>-the MAC type, the value may also be the name of an ethernet or similar</div><div class='del'>-network interface.  This option is currently only available under</div><div class='del'>-Linux.</div><div class='del'>-.TP</div><div class='del'>-.B hide-password</div><div class='del'>-When logging the contents of PAP packets, this option causes pppd to</div><div class='del'>-exclude the password string from the log.  This is the default.</div><div class='del'>-.TP</div><div class='del'>-.B holdoff \fIn</div><div class='del'>-Specifies how many seconds to wait before re-initiating the link after</div><div class='del'>-it terminates.  This option only has any effect if the \fIpersist\fR</div><div class='del'>-or \fIdemand\fR option is used.  The holdoff period is not applied if</div><div class='del'>-the link was terminated because it was idle.</div><div class='del'>-.TP</div><div class='del'>-.B idle \fIn</div><div class='del'>-Specifies that pppd should disconnect if the link is idle for \fIn\fR</div><div class='del'>-seconds.  The link is idle when no data packets (i.e. IP packets) are</div><div class='del'>-being sent or received.  Note: it is not advisable to use this option</div><div class='del'>-with the \fIpersist\fR option without the \fIdemand\fR option.</div><div class='del'>-If the \fBactive-filter\fR</div><div class='del'>-option is given, data packets which are rejected by the specified</div><div class='del'>-activity filter also count as the link being idle.</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-accept-local</div><div class='del'>-With this option, pppd will accept the peer's idea of our local IP</div><div class='del'>-address, even if the local IP address was specified in an option.</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-accept-remote</div><div class='del'>-With this option, pppd will accept the peer's idea of its (remote) IP</div><div class='del'>-address, even if the remote IP address was specified in an option.</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-max-configure \fIn</div><div class='del'>-Set the maximum number of IPCP configure-request transmissions to</div><div class='del'>-\fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-max-failure \fIn</div><div class='del'>-Set the maximum number of IPCP configure-NAKs returned before starting</div><div class='del'>-to send configure-Rejects instead to \fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-max-terminate \fIn</div><div class='del'>-Set the maximum number of IPCP terminate-request transmissions to</div><div class='del'>-\fIn\fR (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B ipcp-restart \fIn</div><div class='del'>-Set the IPCP restart interval (retransmission timeout) to \fIn\fR</div><div class='del'>-seconds (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B ipparam \fIstring</div><div class='del'>-Provides an extra parameter to the ip-up and ip-down scripts.  If this</div><div class='del'>-option is given, the \fIstring\fR supplied is given as the 6th</div><div class='del'>-parameter to those scripts.</div><div class='del'>-.TP</div><div class='del'>-.B ipv6cp-max-configure \fIn</div><div class='del'>-Set the maximum number of IPv6CP configure-request transmissions to</div><div class='del'>-\fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B ipv6cp-max-failure \fIn</div><div class='del'>-Set the maximum number of IPv6CP configure-NAKs returned before starting</div><div class='del'>-to send configure-Rejects instead to \fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B ipv6cp-max-terminate \fIn</div><div class='del'>-Set the maximum number of IPv6CP terminate-request transmissions to</div><div class='del'>-\fIn\fR (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B ipv6cp-restart \fIn</div><div class='del'>-Set the IPv6CP restart interval (retransmission timeout) to \fIn\fR</div><div class='del'>-seconds (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B ipx</div><div class='del'>-Enable the IPXCP and IPX protocols.  This option is presently only</div><div class='del'>-supported under Linux, and only if your kernel has been configured to</div><div class='del'>-include IPX support.</div><div class='del'>-.TP</div><div class='del'>-.B ipx-network \fIn</div><div class='del'>-Set the IPX network number in the IPXCP configure request frame to</div><div class='del'>-\fIn\fR, a hexadecimal number (without a leading 0x).  There is no</div><div class='del'>-valid default.  If this option is not specified, the network number is</div><div class='del'>-obtained from the peer.  If the peer does not have the network number,</div><div class='del'>-the IPX protocol will not be started.</div><div class='del'>-.TP</div><div class='del'>-.B ipx-node \fIn\fB:\fIm</div><div class='del'>-Set the IPX node numbers. The two node numbers are separated from each</div><div class='del'>-other with a colon character. The first number \fIn\fR is the local</div><div class='del'>-node number. The second number \fIm\fR is the peer's node number. Each</div><div class='del'>-node number is a hexadecimal number, at most 10 digits long. The node</div><div class='del'>-numbers on the ipx-network must be unique. There is no valid</div><div class='del'>-default. If this option is not specified then the node numbers are</div><div class='del'>-obtained from the peer.</div><div class='del'>-.TP</div><div class='del'>-.B ipx-router-name \fI&lt;string&gt;</div><div class='del'>-Set the name of the router. This is a string and is sent to the peer</div><div class='del'>-as information data.</div><div class='del'>-.TP</div><div class='del'>-.B ipx-routing \fIn</div><div class='del'>-Set the routing protocol to be received by this option. More than one</div><div class='del'>-instance of \fIipx-routing\fR may be specified. The '\fInone\fR'</div><div class='del'>-option (0) may be specified as the only instance of ipx-routing. The</div><div class='del'>-values may be \fI0\fR for \fINONE\fR, \fI2\fR for \fIRIP/SAP\fR, and</div><div class='del'>-\fI4\fR for \fINLSP\fR.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-accept-local</div><div class='del'>-Accept the peer's NAK for the node number specified in the ipx-node</div><div class='del'>-option. If a node number was specified, and non-zero, the default is</div><div class='del'>-to insist that the value be used. If you include this option then you</div><div class='del'>-will permit the peer to override the entry of the node number.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-accept-network</div><div class='del'>-Accept the peer's NAK for the network number specified in the</div><div class='del'>-ipx-network option. If a network number was specified, and non-zero, the</div><div class='del'>-default is to insist that the value be used. If you include this</div><div class='del'>-option then you will permit the peer to override the entry of the node</div><div class='del'>-number.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-accept-remote</div><div class='del'>-Use the peer's network number specified in the configure request</div><div class='del'>-frame. If a node number was specified for the peer and this option was</div><div class='del'>-not specified, the peer will be forced to use the value which you have</div><div class='del'>-specified.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-max-configure \fIn</div><div class='del'>-Set the maximum number of IPXCP configure request frames which the</div><div class='del'>-system will send to \fIn\fR. The default is 10.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-max-failure \fIn</div><div class='del'>-Set the maximum number of IPXCP NAK frames which the local system will</div><div class='del'>-send before it rejects the options. The default value is 3.</div><div class='del'>-.TP</div><div class='del'>-.B ipxcp-max-terminate \fIn</div><div class='del'>-Set the maximum nuber of IPXCP terminate request frames before the</div><div class='del'>-local system considers that the peer is not listening to them. The</div><div class='del'>-default value is 3.</div><div class='del'>-.TP</div><div class='del'>-.B kdebug \fIn</div><div class='del'>-Enable debugging code in the kernel-level PPP driver.  The argument</div><div class='del'>-values depend on the specific kernel driver, but in general a value of</div><div class='del'>-1 will enable general kernel debug messages.  (Note that these</div><div class='del'>-messages are usually only useful for debugging the kernel driver</div><div class='del'>-itself.)  For the Linux 2.2.x kernel driver, the value is a sum of</div><div class='del'>-bits: 1 to</div><div class='del'>-enable general debug messages, 2 to request that the contents of</div><div class='del'>-received packets be printed, and 4 to request that the contents of</div><div class='del'>-transmitted packets be printed.  On most systems, messages printed by</div><div class='del'>-the kernel are logged by syslog(1) to a file as directed in the</div><div class='del'>-/etc/syslog.conf configuration file.</div><div class='del'>-.TP</div><div class='del'>-.B ktune</div><div class='del'>-Enables pppd to alter kernel settings as appropriate.  Under Linux,</div><div class='del'>-pppd will enable IP forwarding (i.e. set /proc/sys/net/ipv4/ip_forward</div><div class='del'>-to 1) if the \fIproxyarp\fR option is used, and will enable the</div><div class='del'>-dynamic IP address option (i.e. set /proc/sys/net/ipv4/ip_dynaddr to</div><div class='del'>-1) in demand mode if the local address changes.</div><div class='del'>-.TP</div><div class='del'>-.B lcp-echo-failure \fIn</div><div class='del'>-If this option is given, pppd will presume the peer to be dead</div><div class='del'>-if \fIn\fR LCP echo-requests are sent without receiving a valid LCP</div><div class='del'>-echo-reply.  If this happens, pppd will terminate the</div><div class='del'>-connection.  Use of this option requires a non-zero value for the</div><div class='del'>-\fIlcp-echo-interval\fR parameter.  This option can be used to enable</div><div class='del'>-pppd to terminate after the physical connection has been broken</div><div class='del'>-(e.g., the modem has hung up) in situations where no hardware modem</div><div class='del'>-control lines are available.</div><div class='del'>-.TP</div><div class='del'>-.B lcp-echo-interval \fIn</div><div class='del'>-If this option is given, pppd will send an LCP echo-request frame to</div><div class='del'>-the peer every \fIn\fR seconds.  Normally the peer should respond to</div><div class='del'>-the echo-request by sending an echo-reply.  This option can be used</div><div class='del'>-with the \fIlcp-echo-failure\fR option to detect that the peer is no</div><div class='del'>-longer connected.</div><div class='del'>-.TP</div><div class='del'>-.B lcp-max-configure \fIn</div><div class='del'>-Set the maximum number of LCP configure-request transmissions to</div><div class='del'>-\fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B lcp-max-failure \fIn</div><div class='del'>-Set the maximum number of LCP configure-NAKs returned before starting</div><div class='del'>-to send configure-Rejects instead to \fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B lcp-max-terminate \fIn</div><div class='del'>-Set the maximum number of LCP terminate-request transmissions to</div><div class='del'>-\fIn\fR (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B lcp-restart \fIn</div><div class='del'>-Set the LCP restart interval (retransmission timeout) to \fIn\fR</div><div class='del'>-seconds (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B linkname \fIname\fR</div><div class='del'>-Sets the logical name of the link to \fIname\fR.  Pppd will create a</div><div class='del'>-file named \fBppp-\fIname\fB.pid\fR in /var/run (or /etc/ppp on some</div><div class='del'>-systems) containing its process ID.  This can be useful in determining</div><div class='del'>-which instance of pppd is responsible for the link to a given peer</div><div class='del'>-system.  This is a privileged option.</div><div class='del'>-.TP</div><div class='del'>-.B local</div><div class='del'>-Don't use the modem control lines.  With this option, pppd will ignore</div><div class='del'>-the state of the CD (Carrier Detect) signal from the modem and will</div><div class='del'>-not change the state of the DTR (Data Terminal Ready) signal.</div><div class='del'>-.TP</div><div class='del'>-.B logfd \fIn</div><div class='del'>-Send log messages to file descriptor \fIn\fR.  Pppd will send log</div><div class='del'>-messages to at most one file or file descriptor (as well as sending</div><div class='del'>-the log messages to syslog), so this option and the \fBlogfile\fR</div><div class='del'>-option are mutually exclusive.  The default is for pppd to send log</div><div class='del'>-messages to stdout (file descriptor 1), unless the serial port is</div><div class='del'>-already open on stdout.</div><div class='del'>-.TP</div><div class='del'>-.B logfile \fIfilename</div><div class='del'>-Append log messages to the file \fIfilename\fR (as well as sending the</div><div class='del'>-log messages to syslog).  The file is opened with the privileges of</div><div class='del'>-the user who invoked pppd, in append mode.</div><div class='del'>-.TP</div><div class='del'>-.B login</div><div class='del'>-Use the system password database for authenticating the peer using</div><div class='del'>-PAP, and record the user in the system wtmp file.  Note that the peer</div><div class='del'>-must have an entry in the /etc/ppp/pap-secrets file as well as the</div><div class='del'>-system password database to be allowed access.</div><div class='del'>-.TP</div><div class='del'>-.B maxconnect \fIn</div><div class='del'>-Terminate the connection when it has been available for network</div><div class='del'>-traffic for \fIn\fR seconds (i.e. \fIn\fR seconds after the first</div><div class='del'>-network control protocol comes up).</div><div class='del'>-.TP</div><div class='del'>-.B maxfail \fIn</div><div class='del'>-Terminate after \fIn\fR consecutive failed connection attempts.  A</div><div class='del'>-value of 0 means no limit.  The default value is 10.</div><div class='del'>-.TP</div><div class='del'>-.B modem</div><div class='del'>-Use the modem control lines.  This option is the default.  With this</div><div class='del'>-option, pppd will wait for the CD (Carrier Detect) signal from the</div><div class='del'>-modem to be asserted when opening the serial device (unless a connect</div><div class='del'>-script is specified), and it will drop the DTR (Data Terminal Ready)</div><div class='del'>-signal briefly when the connection is terminated and before executing</div><div class='del'>-the connect script.  On Ultrix, this option implies hardware flow</div><div class='del'>-control, as for the \fIcrtscts\fR option.</div><div class='del'>-.TP</div><div class='del'>-.B mp</div><div class='del'>-Enables the use of PPP multilink; this is an alias for the `multilink'</div><div class='del'>-option.  This option is currently only available under Linux.</div><div class='del'>-.TP</div><div class='del'>-.B mpshortseq</div><div class='del'>-Enables the use of short (12-bit) sequence numbers in multilink</div><div class='del'>-headers, as opposed to 24-bit sequence numbers.  This option is only</div><div class='del'>-available under Linux, and only has any effect if multilink is</div><div class='del'>-enabled (see the multilink option).</div><div class='del'>-.TP</div><div class='del'>-.B mrru \fIn</div><div class='del'>-Sets the Maximum Reconstructed Receive Unit to \fIn\fR.  The MRRU is</div><div class='del'>-the maximum size for a received packet on a multilink bundle, and is</div><div class='del'>-analogous to the MRU for the individual links.  This option is</div><div class='del'>-currently only available under Linux, and only has any effect if</div><div class='del'>-multilink is enabled (see the multilink option).</div><div class='del'>-.TP</div><div class='del'>-.B ms-dns \fI&lt;addr&gt;</div><div class='del'>-If pppd is acting as a server for Microsoft Windows clients, this</div><div class='del'>-option allows pppd to supply one or two DNS (Domain Name Server)</div><div class='del'>-addresses to the clients.  The first instance of this option specifies</div><div class='del'>-the primary DNS address; the second instance (if given) specifies the</div><div class='del'>-secondary DNS address.  (This option was present in some older</div><div class='del'>-versions of pppd under the name \fBdns-addr\fR.)</div><div class='del'>-.TP</div><div class='del'>-.B ms-wins \fI&lt;addr&gt;</div><div class='del'>-If pppd is acting as a server for Microsoft Windows or "Samba"</div><div class='del'>-clients, this option allows pppd to supply one or two WINS (Windows</div><div class='del'>-Internet Name Services) server addresses to the clients.  The first</div><div class='del'>-instance of this option specifies the primary WINS address; the second</div><div class='del'>-instance (if given) specifies the secondary WINS address.</div><div class='del'>-.TP</div><div class='del'>-.B multilink</div><div class='del'>-Enables the use of the PPP multilink protocol.  If the peer also</div><div class='del'>-supports multilink, then this link can become part of a bundle between</div><div class='del'>-the local system and the peer.  If there is an existing bundle to the</div><div class='del'>-peer, pppd will join this link to that bundle, otherwise pppd will</div><div class='del'>-create a new bundle.  See the MULTILINK section below.  This option is</div><div class='del'>-currently only available under Linux.</div><div class='del'>-.TP</div><div class='del'>-.B name \fIname</div><div class='del'>-Set the name of the local system for authentication purposes to</div><div class='del'>-\fIname\fR.  This is a privileged option.  With this option, pppd will</div><div class='del'>-use lines in the secrets files which have \fIname\fR as the second</div><div class='del'>-field when looking for a secret to use in authenticating the peer.  In</div><div class='del'>-addition, unless overridden with the \fIuser\fR option, \fIname\fR</div><div class='del'>-will be used as the name to send to the peer when authenticating the</div><div class='del'>-local system to the peer.  (Note that pppd does not append the domain</div><div class='del'>-name to \fIname\fR.)</div><div class='del'>-.TP</div><div class='del'>-.B netmask \fIn</div><div class='del'>-Set the interface netmask to \fIn\fR, a 32 bit netmask in "decimal dot"</div><div class='del'>-notation (e.g. 255.255.255.0).  If this option is given, the value</div><div class='del'>-specified is ORed with the default netmask.  The default netmask is</div><div class='del'>-chosen based on the negotiated remote IP address; it is the</div><div class='del'>-appropriate network mask for the class of the remote IP address, ORed</div><div class='del'>-with the netmasks for any non point-to-point network interfaces in the</div><div class='del'>-system which are on the same network.  (Note: on some platforms, pppd</div><div class='del'>-will always use 255.255.255.255 for the netmask, if that is the only</div><div class='del'>-appropriate value for a point-to-point interface.)</div><div class='del'>-.TP</div><div class='del'>-.B noaccomp</div><div class='del'>-Disable Address/Control compression in both directions (send and</div><div class='del'>-receive).</div><div class='del'>-.TP</div><div class='del'>-.B noauth</div><div class='del'>-Do not require the peer to authenticate itself.  This option is</div><div class='del'>-privileged.</div><div class='del'>-.TP</div><div class='del'>-.B nobsdcomp</div><div class='del'>-Disables BSD-Compress compression; \fBpppd\fR will not request or</div><div class='del'>-agree to compress packets using the BSD-Compress scheme.</div><div class='del'>-.TP</div><div class='del'>-.B noccp</div><div class='del'>-Disable CCP (Compression Control Protocol) negotiation.  This option</div><div class='del'>-should only be required if the peer is buggy and gets confused by</div><div class='del'>-requests from pppd for CCP negotiation.</div><div class='del'>-.TP</div><div class='del'>-.B nocrtscts</div><div class='del'>-Disable hardware flow control (i.e. RTS/CTS) on the serial port.</div><div class='del'>-If neither the \fIcrtscts\fR nor the \fInocrtscts\fR nor the</div><div class='del'>-\fIcdtrcts\fR nor the \fInocdtrcts\fR option is given, the hardware</div><div class='del'>-flow control setting for the serial port is left unchanged.</div><div class='del'>-.TP</div><div class='del'>-.B nocdtrcts</div><div class='del'>-This option is a synonym for \fInocrtscts\fR. Either of these options will</div><div class='del'>-disable both forms of hardware flow control.</div><div class='del'>-.TP</div><div class='del'>-.B nodefaultroute</div><div class='del'>-Disable the \fIdefaultroute\fR option.  The system administrator who</div><div class='del'>-wishes to prevent users from creating default routes with pppd</div><div class='del'>-can do so by placing this option in the /etc/ppp/options file.</div><div class='del'>-.TP</div><div class='del'>-.B nodeflate</div><div class='del'>-Disables Deflate compression; pppd will not request or agree to</div><div class='del'>-compress packets using the Deflate scheme.</div><div class='del'>-.TP</div><div class='del'>-.B nodetach</div><div class='del'>-Don't detach from the controlling terminal.  Without this option, if a</div><div class='del'>-serial device other than the terminal on the standard input is</div><div class='del'>-specified, pppd will fork to become a background process.</div><div class='del'>-.TP</div><div class='del'>-.B noendpoint</div><div class='del'>-Disables pppd from sending an endpoint discriminator to the peer or</div><div class='del'>-accepting one from the peer (see the MULTILINK section below).  This</div><div class='del'>-option should only be required if the peer is buggy.</div><div class='del'>-.TP</div><div class='del'>-.B noip</div><div class='del'>-Disable IPCP negotiation and IP communication.  This option should</div><div class='del'>-only be required if the peer is buggy and gets confused by requests</div><div class='del'>-from pppd for IPCP negotiation.</div><div class='del'>-.TP</div><div class='del'>-.B noipv6</div><div class='del'>-Disable IPv6CP negotiation and IPv6 communication. This option should</div><div class='del'>-only be required if the peer is buggy and gets confused by requests</div><div class='del'>-from pppd for IPv6CP negotiation.</div><div class='del'>-.TP</div><div class='del'>-.B noipdefault</div><div class='del'>-Disables the default behaviour when no local IP address is specified,</div><div class='del'>-which is to determine (if possible) the local IP address from the</div><div class='del'>-hostname.  With this option, the peer will have to supply the local IP</div><div class='del'>-address during IPCP negotiation (unless it specified explicitly on the</div><div class='del'>-command line or in an options file).</div><div class='del'>-.TP</div><div class='del'>-.B noipx</div><div class='del'>-Disable the IPXCP and IPX protocols.  This option should only be</div><div class='del'>-required if the peer is buggy and gets confused by requests from pppd</div><div class='del'>-for IPXCP negotiation.</div><div class='del'>-.TP</div><div class='del'>-.B noktune</div><div class='del'>-Opposite of the \fIktune\fR option; disables pppd from changing system</div><div class='del'>-settings.</div><div class='del'>-.TP</div><div class='del'>-.B nolog</div><div class='del'>-Do not send log messages to a file or file descriptor.  This option</div><div class='del'>-cancels the \fBlogfd\fR and \fBlogfile\fR options.</div><div class='del'>-.TP</div><div class='del'>-.B nomagic</div><div class='del'>-Disable magic number negotiation.  With this option, pppd cannot</div><div class='del'>-detect a looped-back line.  This option should only be needed if the</div><div class='del'>-peer is buggy.</div><div class='del'>-.TP</div><div class='del'>-.B nomp</div><div class='del'>-Disables the use of PPP multilink.  This option is currently only</div><div class='del'>-available under Linux.</div><div class='del'>-.TP</div><div class='del'>-.B nompshortseq</div><div class='del'>-Disables the use of short (12-bit) sequence numbers in the PPP</div><div class='del'>-multilink protocol, forcing the use of 24-bit sequence numbers.  This</div><div class='del'>-option is currently only available under Linux, and only has any</div><div class='del'>-effect if multilink is enabled.</div><div class='del'>-.TP</div><div class='del'>-.B nomultilink</div><div class='del'>-Disables the use of PPP multilink.  This option is currently only</div><div class='del'>-available under Linux.</div><div class='del'>-.TP</div><div class='del'>-.B nopcomp</div><div class='del'>-Disable protocol field compression negotiation in both the receive and</div><div class='del'>-the transmit direction.</div><div class='del'>-.TP</div><div class='del'>-.B nopersist</div><div class='del'>-Exit once a connection has been made and terminated.  This is the</div><div class='del'>-default unless the \fIpersist\fR or \fIdemand\fR option has been</div><div class='del'>-specified.</div><div class='del'>-.TP</div><div class='del'>-.B nopredictor1</div><div class='del'>-Do not accept or agree to Predictor-1 compression.</div><div class='del'>-.TP</div><div class='del'>-.B noproxyarp</div><div class='del'>-Disable the \fIproxyarp\fR option.  The system administrator who</div><div class='del'>-wishes to prevent users from creating proxy ARP entries with pppd can</div><div class='del'>-do so by placing this option in the /etc/ppp/options file.</div><div class='del'>-.TP</div><div class='del'>-.B notty</div><div class='del'>-Normally, pppd requires a terminal device.  With this option, pppd</div><div class='del'>-will allocate itself a pseudo-tty master/slave pair and use the slave</div><div class='del'>-as its terminal device.  Pppd will create a child process to act as a</div><div class='del'>-`character shunt' to transfer characters between the pseudo-tty master</div><div class='del'>-and its standard input and output.  Thus pppd will transmit characters</div><div class='del'>-on its standard output and receive characters on its standard input</div><div class='del'>-even if they are not terminal devices.  This option increases the</div><div class='del'>-latency and CPU overhead of transferring data over the ppp interface</div><div class='del'>-as all of the characters sent and received must flow through the</div><div class='del'>-character shunt process.  An explicit device name may not be given if</div><div class='del'>-this option is used.</div><div class='del'>-.TP</div><div class='del'>-.B novj</div><div class='del'>-Disable Van Jacobson style TCP/IP header compression in both the</div><div class='del'>-transmit and the receive direction.</div><div class='del'>-.TP</div><div class='del'>-.B novjccomp</div><div class='del'>-Disable the connection-ID compression option in Van Jacobson style</div><div class='del'>-TCP/IP header compression.  With this option, pppd will not omit the</div><div class='del'>-connection-ID byte from Van Jacobson compressed TCP/IP headers, nor</div><div class='del'>-ask the peer to do so.</div><div class='del'>-.TP</div><div class='del'>-.B papcrypt</div><div class='del'>-Indicates that all secrets in the /etc/ppp/pap-secrets file which are</div><div class='del'>-used for checking the identity of the peer are encrypted, and thus</div><div class='del'>-pppd should not accept a password which, before encryption, is</div><div class='del'>-identical to the secret from the /etc/ppp/pap-secrets file.</div><div class='del'>-.TP</div><div class='del'>-.B pap-max-authreq \fIn</div><div class='del'>-Set the maximum number of PAP authenticate-request transmissions to</div><div class='del'>-\fIn\fR (default 10).</div><div class='del'>-.TP</div><div class='del'>-.B pap-restart \fIn</div><div class='del'>-Set the PAP restart interval (retransmission timeout) to \fIn\fR</div><div class='del'>-seconds (default 3).</div><div class='del'>-.TP</div><div class='del'>-.B pap-timeout \fIn</div><div class='del'>-Set the maximum time that pppd will wait for the peer to authenticate</div><div class='del'>-itself with PAP to \fIn\fR seconds (0 means no limit).</div><div class='del'>-.TP</div><div class='del'>-.B pass-filter \fIfilter-expression</div><div class='del'>-Specifies a packet filter to applied to data packets being sent or</div><div class='del'>-received to determine which packets should be allowed to pass.</div><div class='del'>-Packets which are rejected by the filter are silently discarded.  This</div><div class='del'>-option can be used to prevent specific network daemons (such as</div><div class='del'>-routed) using up link bandwidth, or to provide a basic firewall</div><div class='del'>-capability.</div><div class='del'>-The \fIfilter-expression\fR syntax is as described for tcpdump(1),</div><div class='del'>-except that qualifiers which are inappropriate for a PPP link, such as</div><div class='del'>-\fBether\fR and \fBarp\fR, are not permitted.  Generally the filter</div><div class='del'>-expression should be enclosed in single-quotes to prevent whitespace</div><div class='del'>-in the expression from being interpreted by the shell.  Note that it</div><div class='del'>-is possible to apply different constraints to incoming and outgoing</div><div class='del'>-packets using the \fBinbound\fR and \fBoutbound\fR qualifiers. This</div><div class='del'>-option is currently only available under NetBSD, and then only if both</div><div class='del'>-the kernel and pppd were compiled with PPP_FILTER defined.</div><div class='del'>-.TP</div><div class='del'>-.B persist</div><div class='del'>-Do not exit after a connection is terminated; instead try to reopen</div><div class='del'>-the connection.</div><div class='del'>-.TP</div><div class='del'>-.B plugin \fIfilename</div><div class='del'>-Load the shared library object file \fIfilename\fR as a plugin.  This</div><div class='del'>-is a privileged option.</div><div class='del'>-.TP</div><div class='del'>-.B predictor1</div><div class='del'>-Request that the peer compress frames that it sends using Predictor-1</div><div class='del'>-compression, and agree to compress transmitted frames with Predictor-1</div><div class='del'>-if requested.  This option has no effect unless the kernel driver</div><div class='del'>-supports Predictor-1 compression.</div><div class='del'>-.TP</div><div class='del'>-.B privgroup \fIgroup-name</div><div class='del'>-Allows members of group \fIgroup-name\fR to use privileged options.</div><div class='del'>-This is a privileged option.  Use of this option requires care as</div><div class='del'>-there is no guarantee that members of \fIgroup-name\fR cannot use pppd</div><div class='del'>-to become root themselves.  Consider it equivalent to putting the</div><div class='del'>-members of \fIgroup-name\fR in the kmem or disk group.</div><div class='del'>-.TP</div><div class='del'>-.B proxyarp</div><div class='del'>-Add an entry to this system's ARP [Address Resolution Protocol] table</div><div class='del'>-with the IP address of the peer and the Ethernet address of this</div><div class='del'>-system.  This will have the effect of making the peer appear to other</div><div class='del'>-systems to be on the local ethernet.</div><div class='del'>-.TP</div><div class='del'>-.B pty \fIscript</div><div class='del'>-Specifies that the command \fIscript\fR is to be used to communicate</div><div class='del'>-rather than a specific terminal device.  Pppd will allocate itself a</div><div class='del'>-pseudo-tty master/slave pair and use the slave as its terminal</div><div class='del'>-device.  The \fIscript\fR will be run in a child process with the</div><div class='del'>-pseudo-tty master as its standard input and output.  An explicit</div><div class='del'>-device name may not be given if this option is used.  (Note: if the</div><div class='del'>-\fIrecord\fR option is used in conjuction with the \fIpty\fR option,</div><div class='del'>-the child process will have pipes on its standard input and output.)</div><div class='del'>-.TP</div><div class='del'>-.B receive-all</div><div class='del'>-With this option, pppd will accept all control characters from the</div><div class='del'>-peer, including those marked in the receive asyncmap.  Without this</div><div class='del'>-option, pppd will discard those characters as specified in RFC1662.</div><div class='del'>-This option should only be needed if the peer is buggy.</div><div class='del'>-.TP</div><div class='del'>-.B record \fIfilename</div><div class='del'>-Specifies that pppd should record all characters sent and received to</div><div class='del'>-a file named \fIfilename\fR.  This file is opened in append mode,</div><div class='del'>-using the user's user-ID and permissions.  This option is implemented</div><div class='del'>-using a pseudo-tty and a process to transfer characters between the</div><div class='del'>-pseudo-tty and the real serial device, so it will increase the latency</div><div class='del'>-and CPU overhead of transferring data over the ppp interface.  The</div><div class='del'>-characters are stored in a tagged format with timestamps, which can be</div><div class='del'>-displayed in readable form using the pppdump(8) program.</div><div class='del'>-.TP</div><div class='del'>-.B remotename \fIname</div><div class='del'>-Set the assumed name of the remote system for authentication purposes</div><div class='del'>-to \fIname\fR.</div><div class='del'>-.TP</div><div class='del'>-.B refuse-chap</div><div class='del'>-With this option, pppd will not agree to authenticate itself to the</div><div class='del'>-peer using CHAP.</div><div class='del'>-.TP</div><div class='del'>-.B refuse-pap</div><div class='del'>-With this option, pppd will not agree to authenticate itself to the</div><div class='del'>-peer using PAP.</div><div class='del'>-.TP</div><div class='del'>-.B require-chap</div><div class='del'>-Require the peer to authenticate itself using CHAP [Challenge</div><div class='del'>-Handshake Authentication Protocol] authentication.</div><div class='del'>-.TP</div><div class='del'>-.B require-pap</div><div class='del'>-Require the peer to authenticate itself using PAP [Password</div><div class='del'>-Authentication Protocol] authentication.</div><div class='del'>-.TP</div><div class='del'>-.B show-password</div><div class='del'>-When logging the contents of PAP packets, this option causes pppd to</div><div class='del'>-show the password string in the log message.</div><div class='del'>-.TP</div><div class='del'>-.B silent</div><div class='del'>-With this option, pppd will not transmit LCP packets to initiate a</div><div class='del'>-connection until a valid LCP packet is received from the peer (as for</div><div class='del'>-the `passive' option with ancient versions of pppd).</div><div class='del'>-.TP</div><div class='del'>-.B sync</div><div class='del'>-Use synchronous HDLC serial encoding instead of asynchronous.</div><div class='del'>-The device used by pppd with this option must have sync support.</div><div class='del'>-Currently supports Microgate SyncLink adapters</div><div class='del'>-under Linux and FreeBSD 2.2.8 and later.</div><div class='del'>-.TP</div><div class='del'>-.B updetach</div><div class='del'>-With this option, pppd will detach from its controlling terminal once</div><div class='del'>-it has successfully established the ppp connection (to the point where</div><div class='del'>-the first network control protocol, usually the IP control protocol,</div><div class='del'>-has come up).</div><div class='del'>-.TP</div><div class='del'>-.B usehostname</div><div class='del'>-Enforce the use of the hostname (with domain name appended, if given)</div><div class='del'>-as the name of the local system for authentication purposes (overrides</div><div class='del'>-the \fIname\fR option).  This option is not normally needed since the</div><div class='del'>-\fIname\fR option is privileged.</div><div class='del'>-.TP</div><div class='del'>-.B usepeerdns</div><div class='del'>-Ask the peer for up to 2 DNS server addresses.  The addresses supplied</div><div class='del'>-by the peer (if any) are passed to the /etc/ppp/ip-up script in the</div><div class='del'>-environment variables DNS1 and DNS2.  In addition, pppd will create an</div><div class='del'>-/etc/ppp/resolv.conf file containing one or two nameserver lines with</div><div class='del'>-the address(es) supplied by the peer.</div><div class='del'>-.TP</div><div class='del'>-.B user \fIname</div><div class='del'>-Sets the name used for authenticating the local system to the peer to</div><div class='del'>-\fIname\fR.</div><div class='del'>-.TP</div><div class='del'>-.B vj-max-slots \fIn</div><div class='del'>-Sets the number of connection slots to be used by the Van Jacobson</div><div class='del'>-TCP/IP header compression and decompression code to \fIn\fR, which</div><div class='del'>-must be between 2 and 16 (inclusive).</div><div class='del'>-.TP</div><div class='del'>-.B welcome \fIscript</div><div class='del'>-Run the executable or shell command specified by \fIscript\fR before</div><div class='del'>-initiating PPP negotiation, after the connect script (if any) has</div><div class='del'>-completed.  A value for this option from a privileged source cannot be</div><div class='del'>-overridden by a non-privileged user.</div><div class='del'>-.TP</div><div class='del'>-.B xonxoff</div><div class='del'>-Use software flow control (i.e. XON/XOFF) to control the flow of data on</div><div class='del'>-the serial port.</div><div class='del'>-.SH OPTIONS FILES</div><div class='del'>-Options can be taken from files as well as the command line.  Pppd</div><div class='del'>-reads options from the files /etc/ppp/options, ~/.ppprc and</div><div class='del'>-/etc/ppp/options.\fIttyname\fR (in that order) before processing the</div><div class='del'>-options on the command line.  (In fact, the command-line options are</div><div class='del'>-scanned to find the terminal name before the options.\fIttyname\fR</div><div class='del'>-file is read.)  In forming the name of the options.\fIttyname\fR file,</div><div class='del'>-the initial /dev/ is removed from the terminal name, and any remaining</div><div class='del'>-/ characters are replaced with dots.</div><div class='del'>-.PP</div><div class='del'>-An options file is parsed into a series of words, delimited by</div><div class='del'>-whitespace.  Whitespace can be included in a word by enclosing the</div><div class='del'>-word in double-quotes (").  A backslash (\\) quotes the following character.</div><div class='del'>-A hash (#) starts a comment, which continues until the end of the</div><div class='del'>-line.  There is no restriction on using the \fIfile\fR or \fIcall\fR</div><div class='del'>-options within an options file.</div><div class='del'>-.SH SECURITY</div><div class='del'>-.I pppd</div><div class='del'>-provides system administrators with sufficient access control that PPP</div><div class='del'>-access to a server machine can be provided to legitimate users without</div><div class='del'>-fear of compromising the security of the server or the network it's</div><div class='del'>-on.  This control is provided through restrictions on which IP</div><div class='del'>-addresses the peer may use, based on its authenticated identity (if</div><div class='del'>-any), and through restrictions on which options a non-privileged user</div><div class='del'>-may use.  Several of pppd's options are privileged, in particular</div><div class='del'>-those which permit potentially insecure configurations; these options</div><div class='del'>-are only accepted in files which are under the control of the system</div><div class='del'>-administrator, or if pppd is being run by root.</div><div class='del'>-.PP</div><div class='del'>-The default behaviour of pppd is to allow an unauthenticated peer to</div><div class='del'>-use a given IP address only if the system does not already have a</div><div class='del'>-route to that IP address.  For example, a system with a</div><div class='del'>-permanent connection to the wider internet will normally have a</div><div class='del'>-default route, and thus all peers will have to authenticate themselves</div><div class='del'>-in order to set up a connection.  On such a system, the \fIauth\fR</div><div class='del'>-option is the default.  On the other hand, a system where the</div><div class='del'>-PPP link is the only connection to the internet will not normally have</div><div class='del'>-a default route, so the peer will be able to use almost any IP address</div><div class='del'>-without authenticating itself.</div><div class='del'>-.PP</div><div class='del'>-As indicated above, some security-sensitive options are privileged,</div><div class='del'>-which means that they may not be used by an ordinary non-privileged</div><div class='del'>-user running a setuid-root pppd, either on the command line, in the</div><div class='del'>-user's ~/.ppprc file, or in an options file read using the \fIfile\fR</div><div class='del'>-option.  Privileged options may be used in /etc/ppp/options file or in</div><div class='del'>-an options file read using the \fIcall\fR option.  If pppd is being</div><div class='del'>-run by the root user, privileged options can be used without</div><div class='del'>-restriction.</div><div class='del'>-.PP</div><div class='del'>-When opening the device, pppd uses either the invoking user's user ID</div><div class='del'>-or the root UID (that is, 0), depending on whether the device name was</div><div class='del'>-specified by the user or the system administrator.  If the device name</div><div class='del'>-comes from a privileged source, that is, /etc/ppp/options or an</div><div class='del'>-options file read using the \fIcall\fR option, pppd uses full root</div><div class='del'>-privileges when opening the device.  Thus, by creating an appropriate</div><div class='del'>-file under /etc/ppp/peers, the system administrator can allow users to</div><div class='del'>-establish a ppp connection via a device which they would not normally</div><div class='del'>-have permission to access.  Otherwise pppd uses the invoking user's</div><div class='del'>-real UID when opening the device.</div><div class='del'>-.SH AUTHENTICATION</div><div class='del'>-Authentication is the process whereby one peer convinces the other of</div><div class='del'>-its identity.  This involves the first peer sending its name to the</div><div class='del'>-other, together with some kind of secret information which could only</div><div class='del'>-come from the genuine authorized user of that name.  In such an</div><div class='del'>-exchange, we will call the first peer the "client" and the other the</div><div class='del'>-"server".  The client has a name by which it identifies itself to the</div><div class='del'>-server, and the server also has a name by which it identifies itself</div><div class='del'>-to the client.  Generally the genuine client shares some secret (or</div><div class='del'>-password) with the server, and authenticates itself by proving that it</div><div class='del'>-knows that secret.  Very often, the names used for authentication</div><div class='del'>-correspond to the internet hostnames of the peers, but this is not</div><div class='del'>-essential.</div><div class='del'>-.LP</div><div class='del'>-At present, pppd supports two authentication protocols: the Password</div><div class='del'>-Authentication Protocol (PAP) and the Challenge Handshake</div><div class='del'>-Authentication Protocol (CHAP).  PAP involves the client sending its</div><div class='del'>-name and a cleartext password to the server to authenticate itself.</div><div class='del'>-In contrast, the server initiates the CHAP authentication exchange by</div><div class='del'>-sending a challenge to the client (the challenge packet includes the</div><div class='del'>-server's name).  The client must respond with a response which</div><div class='del'>-includes its name plus a hash value derived from the shared secret and</div><div class='del'>-the challenge, in order to prove that it knows the secret.</div><div class='del'>-.LP</div><div class='del'>-The PPP protocol, being symmetrical, allows both peers to require the</div><div class='del'>-other to authenticate itself.  In that case, two separate and</div><div class='del'>-independent authentication exchanges will occur.  The two exchanges</div><div class='del'>-could use different authentication protocols, and in principle,</div><div class='del'>-different names could be used in the two exchanges.</div><div class='del'>-.LP</div><div class='del'>-The default behaviour of pppd is to agree to authenticate if</div><div class='del'>-requested, and to not require authentication from the peer.  However,</div><div class='del'>-pppd will not agree to authenticate itself with a particular protocol</div><div class='del'>-if it has no secrets which could be used to do so.</div><div class='del'>-.LP</div><div class='del'>-Pppd stores secrets for use in authentication in secrets</div><div class='del'>-files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).</div><div class='del'>-Both secrets files have the same format.  The secrets files can</div><div class='del'>-contain secrets for pppd to use in authenticating itself to other</div><div class='del'>-systems, as well as secrets for pppd to use when authenticating other</div><div class='del'>-systems to itself.</div><div class='del'>-.LP</div><div class='del'>-Each line in a secrets file contains one secret.  A given secret is</div><div class='del'>-specific to a particular combination of client and server - it can</div><div class='del'>-only be used by that client to authenticate itself to that server.</div><div class='del'>-Thus each line in a secrets file has at least 3 fields: the name of</div><div class='del'>-the client, the name of the server, and the secret.  These fields may</div><div class='del'>-be followed by a list of the IP addresses that the specified client</div><div class='del'>-may use when connecting to the specified server.</div><div class='del'>-.LP</div><div class='del'>-A secrets file is parsed into words as for a options file, so the</div><div class='del'>-client name, server name and secrets fields must each be one word,</div><div class='del'>-with any embedded spaces or other special characters quoted or</div><div class='del'>-escaped.  Note that case is significant in the client and server names</div><div class='del'>-and in the secret.</div><div class='del'>-.LP</div><div class='del'>-If the secret starts with an `@', what follows is assumed to be the</div><div class='del'>-name of a file from which to read the secret.  A "*" as the client or</div><div class='del'>-server name matches any name.  When selecting a secret, pppd takes the</div><div class='del'>-best match, i.e.  the match with the fewest wildcards.</div><div class='del'>-.LP</div><div class='del'>-Any following words on the same line are taken to be a list of</div><div class='del'>-acceptable IP addresses for that client.  If there are only 3 words on</div><div class='del'>-the line, or if the first word is "-", then all IP addresses are</div><div class='del'>-disallowed.  To allow any address, use "*".  A word starting with "!"</div><div class='del'>-indicates that the specified address is \fInot\fR acceptable.  An</div><div class='del'>-address may be followed by "/" and a number \fIn\fR, to indicate a</div><div class='del'>-whole subnet, i.e. all addresses which have the same value in the most</div><div class='del'>-significant \fIn\fR bits.  In this form, the address may be followed</div><div class='del'>-by a plus sign ("+") to indicate that one address from the subnet is</div><div class='del'>-authorized, based on the ppp network interface unit number in use.</div><div class='del'>-In this case, the host part of the address will be set to the unit</div><div class='del'>-number plus one.</div><div class='del'>-.LP</div><div class='del'>-Thus a secrets file contains both secrets for use in authenticating</div><div class='del'>-other hosts, plus secrets which we use for authenticating ourselves to</div><div class='del'>-others.  When pppd is authenticating the peer (checking the peer's</div><div class='del'>-identity), it chooses a secret with the peer's name in the first</div><div class='del'>-field and the name of the local system in the second field.  The</div><div class='del'>-name of the local system defaults to the hostname, with the domain</div><div class='del'>-name appended if the \fIdomain\fR option is used.  This default can be</div><div class='del'>-overridden with the \fIname\fR option, except when the</div><div class='del'>-\fIusehostname\fR option is used.</div><div class='del'>-.LP</div><div class='del'>-When pppd is choosing a secret to use in authenticating itself to the</div><div class='del'>-peer, it first determines what name it is going to use to identify</div><div class='del'>-itself to the peer.  This name can be specified by the user with the</div><div class='del'>-\fIuser\fR option.  If this option is not used, the name defaults to</div><div class='del'>-the name of the local system, determined as described in the previous</div><div class='del'>-paragraph.  Then pppd looks for a secret with this name in the first</div><div class='del'>-field and the peer's name in the second field.  Pppd will know the</div><div class='del'>-name of the peer if CHAP authentication is being used, because the</div><div class='del'>-peer will have sent it in the challenge packet.  However, if PAP is being</div><div class='del'>-used, pppd will have to determine the peer's name from the options</div><div class='del'>-specified by the user.  The user can specify the peer's name directly</div><div class='del'>-with the \fIremotename\fR option.  Otherwise, if the remote IP address</div><div class='del'>-was specified by a name (rather than in numeric form), that name will</div><div class='del'>-be used as the peer's name.  Failing that, pppd will use the null</div><div class='del'>-string as the peer's name.</div><div class='del'>-.LP</div><div class='del'>-When authenticating the peer with PAP, the supplied password is first</div><div class='del'>-compared with the secret from the secrets file.  If the password</div><div class='del'>-doesn't match the secret, the password is encrypted using crypt() and</div><div class='del'>-checked against the secret again.  Thus secrets for authenticating the</div><div class='del'>-peer can be stored in encrypted form if desired.  If the</div><div class='del'>-\fIpapcrypt\fR option is given, the first (unencrypted) comparison is</div><div class='del'>-omitted, for better security.</div><div class='del'>-.LP</div><div class='del'>-Furthermore, if the \fIlogin\fR option was specified, the username and</div><div class='del'>-password are also checked against the system password database.  Thus,</div><div class='del'>-the system administrator can set up the pap-secrets file to allow PPP</div><div class='del'>-access only to certain users, and to restrict the set of IP addresses</div><div class='del'>-that each user can use.  Typically, when using the \fIlogin\fR option,</div><div class='del'>-the secret in /etc/ppp/pap-secrets would be "", which will match any</div><div class='del'>-password supplied by the peer.  This avoids the need to have the same</div><div class='del'>-secret in two places.</div><div class='del'>-.LP</div><div class='del'>-Authentication must be satisfactorily completed before IPCP (or any</div><div class='del'>-other Network Control Protocol) can be started.  If the peer is</div><div class='del'>-required to authenticate itself, and fails to do so, pppd will</div><div class='del'>-terminated the link (by closing LCP).  If IPCP negotiates an</div><div class='del'>-unacceptable IP address for the remote host, IPCP will be closed.  IP</div><div class='del'>-packets can only be sent or received when IPCP is open.</div><div class='del'>-.LP</div><div class='del'>-In some cases it is desirable to allow some hosts which can't</div><div class='del'>-authenticate themselves to connect and use one of a restricted set of</div><div class='del'>-IP addresses, even when the local host generally requires</div><div class='del'>-authentication.  If the peer refuses to authenticate itself when</div><div class='del'>-requested, pppd takes that as equivalent to authenticating with PAP</div><div class='del'>-using the empty string for the username and password.  Thus, by adding</div><div class='del'>-a line to the pap-secrets file which specifies the empty string for</div><div class='del'>-the client and password, it is possible to allow restricted access to</div><div class='del'>-hosts which refuse to authenticate themselves.</div><div class='del'>-.SH ROUTING</div><div class='del'>-.LP</div><div class='del'>-When IPCP negotiation is completed successfully, pppd will inform the</div><div class='del'>-kernel of the local and remote IP addresses for the ppp interface.</div><div class='del'>-This is sufficient to create a host route to the remote end of the</div><div class='del'>-link, which will enable the peers to exchange IP packets.</div><div class='del'>-Communication with other machines generally requires further</div><div class='del'>-modification to routing tables and/or ARP (Address Resolution</div><div class='del'>-Protocol) tables.  In most cases the \fIdefaultroute\fR and/or</div><div class='del'>-\fIproxyarp\fR options are sufficient for this, but in some cases</div><div class='del'>-further intervention is required.  The /etc/ppp/ip-up script can be</div><div class='del'>-used for this.</div><div class='del'>-.LP</div><div class='del'>-Sometimes it is desirable to add a default route through the remote</div><div class='del'>-host, as in the case of a machine whose only connection to the</div><div class='del'>-Internet is through the ppp interface.  The \fIdefaultroute\fR option</div><div class='del'>-causes pppd to create such a default route when IPCP comes up, and</div><div class='del'>-delete it when the link is terminated.</div><div class='del'>-.LP</div><div class='del'>-In some cases it is desirable to use proxy ARP, for example on a</div><div class='del'>-server machine connected to a LAN, in order to allow other hosts to</div><div class='del'>-communicate with the remote host.  The \fIproxyarp\fR option causes</div><div class='del'>-pppd to look for a network interface on the same subnet as the remote</div><div class='del'>-host (an interface supporting broadcast and ARP, which is up and not a</div><div class='del'>-point-to-point or loopback interface).  If found, pppd creates a</div><div class='del'>-permanent, published ARP entry with the IP address of the remote host</div><div class='del'>-and the hardware address of the network interface found.</div><div class='del'>-.LP</div><div class='del'>-When the \fIdemand\fR option is used, the interface IP addresses have</div><div class='del'>-already been set at the point when IPCP comes up.  If pppd has not</div><div class='del'>-been able to negotiate the same addresses that it used to configure</div><div class='del'>-the interface (for example when the peer is an ISP that uses dynamic</div><div class='del'>-IP address assignment), pppd has to change the interface IP addresses</div><div class='del'>-to the negotiated addresses.  This may disrupt existing connections,</div><div class='del'>-and the use of demand dialling with peers that do dynamic IP address</div><div class='del'>-assignment is not recommended.</div><div class='del'>-.SH MULTILINK</div><div class='del'>-Multilink PPP provides the capability to combine two or more PPP links</div><div class='del'>-between a pair of machines into a single `bundle', which appears as a</div><div class='del'>-single virtual PPP link which has the combined bandwidth of the</div><div class='del'>-individual links.  Currently, multilink PPP is only supported under</div><div class='del'>-Linux.</div><div class='del'>-.LP</div><div class='del'>-Pppd detects that the link it is controlling is connected to the same</div><div class='del'>-peer as another link using the peer's endpoint discriminator and the</div><div class='del'>-authenticated identity of the peer (if it authenticates itself).  The</div><div class='del'>-endpoint discriminator is a block of data which is hopefully unique</div><div class='del'>-for each peer.  Several types of data can be used, including</div><div class='del'>-locally-assigned strings of bytes, IP addresses, MAC addresses,</div><div class='del'>-randomly strings of bytes, or E-164 phone numbers.  The endpoint</div><div class='del'>-discriminator sent to the peer by pppd can be set using the endpoint</div><div class='del'>-option.</div><div class='del'>-.LP</div><div class='del'>-In circumstances the peer may send no endpoint discriminator or a</div><div class='del'>-non-unique value.  The optional bundle option adds an extra string</div><div class='del'>-which is added to the peer's endpoint discriminator and authenticated</div><div class='del'>-identity when matching up links to be joined together in a bundle.</div><div class='del'>-The bundle option can also be used to allow the establishment of</div><div class='del'>-multiple bundles between the local system and the peer.  Pppd uses a</div><div class='del'>-TDB database in /var/run/pppd.tdb to match up links.</div><div class='del'>-.LP</div><div class='del'>-Assuming that multilink is enabled and the peer is willing to</div><div class='del'>-negotiate multilink, then when pppd is invoked to bring up the first</div><div class='del'>-link to the peer, it will detect that no other link is connected to</div><div class='del'>-the peer and create a new bundle, that is, another ppp network</div><div class='del'>-interface unit.  When another pppd is invoked to bring up another link</div><div class='del'>-to the peer, it will detect the existing bundle and join its link to</div><div class='del'>-it.  Currently, if the first pppd terminates (for example, because of</div><div class='del'>-a hangup or a received signal) the bundle is destroyed.</div><div class='del'>-.SH EXAMPLES</div><div class='del'>-.LP</div><div class='del'>-The following examples assume that the /etc/ppp/options file contains</div><div class='del'>-the \fIauth\fR option (as in the default /etc/ppp/options file in the</div><div class='del'>-ppp distribution).</div><div class='del'>-.LP</div><div class='del'>-Probably the most common use of pppd is to dial out to an ISP.  This</div><div class='del'>-can be done with a command such as</div><div class='del'>-.IP</div><div class='del'>-pppd call isp</div><div class='del'>-.LP</div><div class='del'>-where the /etc/ppp/peers/isp file is set up by the system</div><div class='del'>-administrator to contain something like this:</div><div class='del'>-.IP</div><div class='del'>-ttyS0 19200 crtscts</div><div class='del'>-.br</div><div class='del'>-connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'</div><div class='del'>-.br</div><div class='del'>-noauth</div><div class='del'>-.LP</div><div class='del'>-In this example, we are using chat to dial the ISP's modem and go</div><div class='del'>-through any logon sequence required.  The /etc/ppp/chat-isp file</div><div class='del'>-contains the script used by chat; it could for example contain</div><div class='del'>-something like this:</div><div class='del'>-.IP</div><div class='del'>-ABORT "NO CARRIER"</div><div class='del'>-.br</div><div class='del'>-ABORT "NO DIALTONE"</div><div class='del'>-.br</div><div class='del'>-ABORT "ERROR"</div><div class='del'>-.br</div><div class='del'>-ABORT "NO ANSWER"</div><div class='del'>-.br</div><div class='del'>-ABORT "BUSY"</div><div class='del'>-.br</div><div class='del'>-ABORT "Username/Password Incorrect"</div><div class='del'>-.br</div><div class='del'>-"" "at"</div><div class='del'>-.br</div><div class='del'>-OK "at&amp;d0&amp;c1"</div><div class='del'>-.br</div><div class='del'>-OK "atdt2468135"</div><div class='del'>-.br</div><div class='del'>-"name:" "^Umyuserid"</div><div class='del'>-.br</div><div class='del'>-"word:" "\\qmypassword"</div><div class='del'>-.br</div><div class='del'>-"ispts" "\\q^Uppp"</div><div class='del'>-.br</div><div class='del'>-"~-^Uppp-~"</div><div class='del'>-.LP</div><div class='del'>-See the chat(8) man page for details of chat scripts.</div><div class='del'>-.LP</div><div class='del'>-Pppd can also be used to provide a dial-in ppp service for users.  If</div><div class='del'>-the users already have login accounts, the simplest way to set up the</div><div class='del'>-ppp service is to let the users log in to their accounts and run pppd</div><div class='del'>-(installed setuid-root) with a command such as</div><div class='del'>-.IP</div><div class='del'>-pppd proxyarp</div><div class='del'>-.LP</div><div class='del'>-To allow a user to use the PPP facilities, you need to allocate an IP</div><div class='del'>-address for that user's machine and create an entry in</div><div class='del'>-/etc/ppp/pap-secrets or /etc/ppp/chap-secrets (depending on which</div><div class='del'>-authentication method the PPP implementation on the user's machine</div><div class='del'>-supports), so that the user's</div><div class='del'>-machine can authenticate itself.  For example, if Joe has a machine</div><div class='del'>-called "joespc" which is to be allowed to dial in to the machine</div><div class='del'>-called "server" and use the IP address joespc.my.net, you would add an</div><div class='del'>-entry like this to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets:</div><div class='del'>-.IP</div><div class='del'>-joespc	server	"joe's secret"	joespc.my.net</div><div class='del'>-.LP</div><div class='del'>-Alternatively, you can create a username called (for example) "ppp",</div><div class='del'>-whose login shell is pppd and whose home directory is /etc/ppp.</div><div class='del'>-Options to be used when pppd is run this way can be put in</div><div class='del'>-/etc/ppp/.ppprc.</div><div class='del'>-.LP</div><div class='del'>-If your serial connection is any more complicated than a piece of</div><div class='del'>-wire, you may need to arrange for some control characters to be</div><div class='del'>-escaped.  In particular, it is often useful to escape XON (^Q) and</div><div class='del'>-XOFF (^S), using \fIasyncmap a0000\fR.  If the path includes a telnet,</div><div class='del'>-you probably should escape ^] as well (\fIasyncmap 200a0000\fR).  If</div><div class='del'>-the path includes an rlogin, you will need to use the \fIescape ff\fR</div><div class='del'>-option on the end which is running the rlogin client, since many</div><div class='del'>-rlogin implementations are not transparent; they will remove the</div><div class='del'>-sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the</div><div class='del'>-stream.</div><div class='del'>-.SH DIAGNOSTICS</div><div class='del'>-.LP</div><div class='del'>-Messages are sent to the syslog daemon using facility LOG_DAEMON.</div><div class='del'>-(This can be overriden by recompiling pppd with the macro</div><div class='del'>-LOG_PPP defined as the desired facility.)  In order to see the error</div><div class='del'>-and debug messages, you will need to edit your /etc/syslog.conf file</div><div class='del'>-to direct the messages to the desired output device or file.</div><div class='del'>-.LP</div><div class='del'>-The \fIdebug\fR option causes the contents of all control packets sent</div><div class='del'>-or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.</div><div class='del'>-This can be useful if the PPP negotiation does not succeed or if</div><div class='del'>-authentication fails.</div><div class='del'>-If debugging is enabled at compile time, the \fIdebug\fR option also</div><div class='del'>-causes other debugging messages to be logged.</div><div class='del'>-.LP</div><div class='del'>-Debugging can also be enabled or disabled by sending a SIGUSR1 signal</div><div class='del'>-to the pppd process.  This signal acts as a toggle.</div><div class='del'>-.SH EXIT STATUS</div><div class='del'>-The exit status of pppd is set to indicate whether any error was</div><div class='del'>-detected, or the reason for the link being terminated.  The values</div><div class='del'>-used are:</div><div class='del'>-.TP</div><div class='del'>-.B 0</div><div class='del'>-Pppd has detached, or otherwise the connection was successfully</div><div class='del'>-established and terminated at the peer's request.</div><div class='del'>-.TP</div><div class='del'>-.B 1</div><div class='del'>-An immediately fatal error of some kind occurred, such as an essential</div><div class='del'>-system call failing, or running out of virtual memory.</div><div class='del'>-.TP</div><div class='del'>-.B 2</div><div class='del'>-An error was detected in processing the options given, such as two</div><div class='del'>-mutually exclusive options being used.</div><div class='del'>-.TP</div><div class='del'>-.B 3</div><div class='del'>-Pppd is not setuid-root and the invoking user is not root.</div><div class='del'>-.TP</div><div class='del'>-.B 4</div><div class='del'>-The kernel does not support PPP, for example, the PPP kernel driver is</div><div class='del'>-not included or cannot be loaded.</div><div class='del'>-.TP</div><div class='del'>-.B 5</div><div class='del'>-Pppd terminated because it was sent a SIGINT, SIGTERM or SIGHUP</div><div class='del'>-signal.</div><div class='del'>-.TP</div><div class='del'>-.B 6</div><div class='del'>-The serial port could not be locked.</div><div class='del'>-.TP</div><div class='del'>-.B 7</div><div class='del'>-The serial port could not be opened.</div><div class='del'>-.TP</div><div class='del'>-.B 8</div><div class='del'>-The connect script failed (returned a non-zero exit status).</div><div class='del'>-.TP</div><div class='del'>-.B 9</div><div class='del'>-The command specified as the argument to the \fIpty\fR option could</div><div class='del'>-not be run.</div><div class='del'>-.TP</div><div class='del'>-.B 10</div><div class='del'>-The PPP negotiation failed, that is, it didn't reach the point where</div><div class='del'>-at least one network protocol (e.g. IP) was running.</div><div class='del'>-.TP</div><div class='del'>-.B 11</div><div class='del'>-The peer system failed (or refused) to authenticate itself.</div><div class='del'>-.TP</div><div class='del'>-.B 12</div><div class='del'>-The link was established successfully and terminated because it was</div><div class='del'>-idle.</div><div class='del'>-.TP</div><div class='del'>-.B 13</div><div class='del'>-The link was established successfully and terminated because the</div><div class='del'>-connect time limit was reached.</div><div class='del'>-.TP</div><div class='del'>-.B 14</div><div class='del'>-Callback was negotiated and an incoming call should arrive shortly.</div><div class='del'>-.TP</div><div class='del'>-.B 15</div><div class='del'>-The link was terminated because the peer is not responding to echo</div><div class='del'>-requests.</div><div class='del'>-.TP</div><div class='del'>-.B 16</div><div class='del'>-The link was terminated by the modem hanging up.</div><div class='del'>-.TP</div><div class='del'>-.B 17</div><div class='del'>-The PPP negotiation failed because serial loopback was detected.</div><div class='del'>-.TP</div><div class='del'>-.B 18</div><div class='del'>-The init script failed (returned a non-zero exit status).</div><div class='del'>-.TP</div><div class='del'>-.B 19</div><div class='del'>-We failed to authenticate ourselves to the peer.</div><div class='del'>-.SH SCRIPTS</div><div class='del'>-Pppd invokes scripts at various stages in its processing which can be</div><div class='del'>-used to perform site-specific ancillary processing.  These scripts are</div><div class='del'>-usually shell scripts, but could be executable code files instead.</div><div class='del'>-Pppd does not wait for the scripts to finish.  The scripts are</div><div class='del'>-executed as root (with the real and effective user-id set to 0), so</div><div class='del'>-that they can do things such as update routing tables or run</div><div class='del'>-privileged daemons.  Be careful that the contents of these scripts do</div><div class='del'>-not compromise your system's security.  Pppd runs the scripts with</div><div class='del'>-standard input, output and error redirected to /dev/null, and with an</div><div class='del'>-environment that is empty except for some environment variables that</div><div class='del'>-give information about the link.  The environment variables that pppd</div><div class='del'>-sets are:</div><div class='del'>-.TP</div><div class='del'>-.B DEVICE</div><div class='del'>-The name of the serial tty device being used.</div><div class='del'>-.TP</div><div class='del'>-.B IFNAME</div><div class='del'>-The name of the network interface being used.</div><div class='del'>-.TP</div><div class='del'>-.B IPLOCAL</div><div class='del'>-The IP address for the local end of the link.  This is only set when</div><div class='del'>-IPCP has come up.</div><div class='del'>-.TP</div><div class='del'>-.B IPREMOTE</div><div class='del'>-The IP address for the remote end of the link.  This is only set when</div><div class='del'>-IPCP has come up.</div><div class='del'>-.TP</div><div class='del'>-.B PEERNAME</div><div class='del'>-The authenticated name of the peer.  This is only set if the peer</div><div class='del'>-authenticates itself.</div><div class='del'>-.TP</div><div class='del'>-.B SPEED</div><div class='del'>-The baud rate of the tty device.</div><div class='del'>-.TP</div><div class='del'>-.B ORIG_UID</div><div class='del'>-The real user-id of the user who invoked pppd.</div><div class='del'>-.TP</div><div class='del'>-.B PPPLOGNAME</div><div class='del'>-The username of the real user-id that invoked pppd. This is always set.</div><div class='del'>-.P</div><div class='del'>-For the ip-down and auth-down scripts, pppd also sets the following</div><div class='del'>-variables giving statistics for the connection:</div><div class='del'>-.TP</div><div class='del'>-.B CONNECT_TIME</div><div class='del'>-The number of seconds from when the PPP negotiation started until the</div><div class='del'>-connection was terminated.</div><div class='del'>-.TP</div><div class='del'>-.B BYTES_SENT</div><div class='del'>-The number of bytes sent (at the level of the serial port) during the</div><div class='del'>-connection.</div><div class='del'>-.TP</div><div class='del'>-.B BYTES_RCVD</div><div class='del'>-The number of bytes received (at the level of the serial port) during</div><div class='del'>-the connection.</div><div class='del'>-.TP</div><div class='del'>-.B LINKNAME</div><div class='del'>-The logical name of the link, set with the \fIlinkname\fR option.</div><div class='del'>-.P</div><div class='del'>-Pppd invokes the following scripts, if they exist.  It is not an error</div><div class='del'>-if they don't exist.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/auth-up</div><div class='del'>-A program or script which is executed after the remote system</div><div class='del'>-successfully authenticates itself.  It is executed with the parameters</div><div class='del'>-.IP</div><div class='del'>-\fIinterface-name peer-name user-name tty-device speed\fR</div><div class='del'>-.IP</div><div class='del'>-Note that this script is not executed if the peer doesn't authenticate</div><div class='del'>-itself, for example when the \fInoauth\fR option is used.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/auth-down</div><div class='del'>-A program or script which is executed when the link goes down, if</div><div class='del'>-/etc/ppp/auth-up was previously executed.  It is executed in the same</div><div class='del'>-manner with the same parameters as /etc/ppp/auth-up.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ip-up</div><div class='del'>-A program or script which is executed when the link is available for</div><div class='del'>-sending and receiving IP packets (that is, IPCP has come up).  It is</div><div class='del'>-executed with the parameters</div><div class='del'>-.IP</div><div class='del'>-\fIinterface-name tty-device speed local-IP-address</div><div class='del'>-remote-IP-address ipparam\fR</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ip-down</div><div class='del'>-A program or script which is executed when the link is no longer</div><div class='del'>-available for sending and receiving IP packets.  This script can be</div><div class='del'>-used for undoing the effects of the /etc/ppp/ip-up script.  It is</div><div class='del'>-invoked in the same manner and with the same parameters as the ip-up</div><div class='del'>-script.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ipv6-up</div><div class='del'>-Like /etc/ppp/ip-up, except that it is executed when the link is available </div><div class='del'>-for sending and receiving IPv6 packets. It is executed with the parameters</div><div class='del'>-.IP</div><div class='del'>-\fIinterface-name tty-device speed local-link-local-address</div><div class='del'>-remote-link-local-address ipparam\fR</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ipv6-down</div><div class='del'>-Similar to /etc/ppp/ip-down, but it is executed when IPv6 packets can no</div><div class='del'>-longer be transmitted on the link. It is executed with the same parameters </div><div class='del'>-as the ipv6-up script.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ipx-up</div><div class='del'>-A program or script which is executed when the link is available for</div><div class='del'>-sending and receiving IPX packets (that is, IPXCP has come up).  It is</div><div class='del'>-executed with the parameters</div><div class='del'>-.IP</div><div class='del'>-\fIinterface-name tty-device speed network-number local-IPX-node-address</div><div class='del'>-remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol</div><div class='del'>-local-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR </div><div class='del'>-.IP</div><div class='del'>-The local-IPX-routing-protocol and remote-IPX-routing-protocol field</div><div class='del'>-may be one of the following:</div><div class='del'>-.IP</div><div class='del'>-NONE      to indicate that there is no routing protocol</div><div class='del'>-.br</div><div class='del'>-RIP       to indicate that RIP/SAP should be used</div><div class='del'>-.br</div><div class='del'>-NLSP      to indicate that Novell NLSP should be used</div><div class='del'>-.br</div><div class='del'>-RIP NLSP  to indicate that both RIP/SAP and NLSP should be used</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/ipx-down</div><div class='del'>-A program or script which is executed when the link is no longer</div><div class='del'>-available for sending and receiving IPX packets.  This script can be</div><div class='del'>-used for undoing the effects of the /etc/ppp/ipx-up script.  It is</div><div class='del'>-invoked in the same manner and with the same parameters as the ipx-up</div><div class='del'>-script.</div><div class='del'>-.SH FILES</div><div class='del'>-.TP</div><div class='del'>-.B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)</div><div class='del'>-Process-ID for pppd process on ppp interface unit \fIn\fR.</div><div class='del'>-.TP</div><div class='del'>-.B /var/run/ppp-\fIname\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp-\fIname\fB.pid \fR(others)</div><div class='del'>-Process-ID for pppd process for logical link \fIname\fR (see the</div><div class='del'>-\fIlinkname\fR option).</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/pap-secrets</div><div class='del'>-Usernames, passwords and IP addresses for PAP authentication.  This</div><div class='del'>-file should be owned by root and not readable or writable by any other</div><div class='del'>-user.  Pppd will log a warning if this is not the case.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/chap-secrets</div><div class='del'>-Names, secrets and IP addresses for CHAP authentication.  As for</div><div class='del'>-/etc/ppp/pap-secrets, this file should be owned by root and not</div><div class='del'>-readable or writable by any other user.  Pppd will log a warning if</div><div class='del'>-this is not the case.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/options</div><div class='del'>-System default options for pppd, read before user default options or</div><div class='del'>-command-line options.</div><div class='del'>-.TP</div><div class='del'>-.B ~/.ppprc</div><div class='del'>-User default options, read before /etc/ppp/options.\fIttyname\fR.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/options.\fIttyname</div><div class='del'>-System default options for the serial port being used, read after</div><div class='del'>-~/.ppprc.  In forming the \fIttyname\fR part of this</div><div class='del'>-filename, an initial /dev/ is stripped from the port name (if</div><div class='del'>-present), and any slashes in the remaining part are converted to</div><div class='del'>-dots.</div><div class='del'>-.TP</div><div class='del'>-.B /etc/ppp/peers</div><div class='del'>-A directory containing options files which may contain privileged</div><div class='del'>-options, even if pppd was invoked by a user other than root.  The</div><div class='del'>-system administrator can create options files in this directory to</div><div class='del'>-permit non-privileged users to dial out without requiring the peer to</div><div class='del'>-authenticate, but only to certain trusted peers.</div><div class='del'>-.SH SEE ALSO</div><div class='del'>-.TP</div><div class='del'>-.B RFC1144</div><div class='del'>-Jacobson, V.</div><div class='del'>-\fICompressing TCP/IP headers for low-speed serial links.\fR</div><div class='del'>-February 1990.</div><div class='del'>-.TP</div><div class='del'>-.B RFC1321</div><div class='del'>-Rivest, R.</div><div class='del'>-.I The MD5 Message-Digest Algorithm.</div><div class='del'>-April 1992.</div><div class='del'>-.TP</div><div class='del'>-.B RFC1332</div><div class='del'>-McGregor, G.</div><div class='del'>-.I PPP Internet Protocol Control Protocol (IPCP).</div><div class='del'>-May 1992.</div><div class='del'>-.TP</div><div class='del'>-.B RFC1334</div><div class='del'>-Lloyd, B.; Simpson, W.A.</div><div class='del'>-.I PPP authentication protocols.</div><div class='del'>-October 1992.</div><div class='del'>-.TP</div><div class='del'>-.B RFC1661</div><div class='del'>-Simpson, W.A.</div><div class='del'>-.I The Point\-to\-Point Protocol (PPP).</div><div class='del'>-July 1994.</div><div class='del'>-.TP</div><div class='del'>-.B RFC1662</div><div class='del'>-Simpson, W.A.</div><div class='del'>-.I PPP in HDLC-like Framing.</div><div class='del'>-July 1994.</div><div class='del'>-.TP</div><div class='del'>-.B RFC2472</div><div class='del'>-Haskin, D.</div><div class='del'>-.I IP Version 6 over PPP</div><div class='del'>-December 1998.</div><div class='del'>-.SH NOTES</div><div class='del'>-The following signals have the specified effect when sent to pppd.</div><div class='del'>-.TP</div><div class='del'>-.B SIGINT, SIGTERM</div><div class='del'>-These signals cause pppd to terminate the link (by closing LCP),</div><div class='del'>-restore the serial device settings, and exit.</div><div class='del'>-.TP</div><div class='del'>-.B SIGHUP</div><div class='del'>-This signal causes pppd to terminate the link, restore the serial</div><div class='del'>-device settings, and close the serial device.  If the \fIpersist\fR or</div><div class='del'>-\fIdemand\fR option has been specified, pppd will try to reopen the</div><div class='del'>-serial device and start another connection (after the holdoff period).</div><div class='del'>-Otherwise pppd will exit.  If this signal is received during the</div><div class='del'>-holdoff period, it causes pppd to end the holdoff period immediately.</div><div class='del'>-.TP</div><div class='del'>-.B SIGUSR1</div><div class='del'>-This signal toggles the state of the \fIdebug\fR option.</div><div class='del'>-.TP</div><div class='del'>-.B SIGUSR2</div><div class='del'>-This signal causes pppd to renegotiate compression.  This can be</div><div class='del'>-useful to re-enable compression after it has been disabled as a result</div><div class='del'>-of a fatal decompression error.  (Fatal decompression errors generally</div><div class='del'>-indicate a bug in one or other implementation.)</div><div class='del'>-</div><div class='del'>-.SH AUTHORS</div><div class='del'>-Paul Mackerras (Paul.Mackerras@cs.anu.edu.au), based on earlier work by</div><div class='del'>-Drew Perkins,</div><div class='del'>-Brad Clements,</div><div class='del'>-Karl Fox,</div><div class='del'>-Greg Christy,</div><div class='del'>-and</div><div class='del'>-Brad Parker.</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/pppd.h b/mdk-stage1/ppp/pppd/pppd.h<br/>deleted file mode 100644<br/>index 02f6dfcef..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/pppd.h?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/pppd.h</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,787 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * pppd.h - PPP daemon global declarations.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __PPPD_H__</div><div class='del'>-#define __PPPD_H__</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;		/* for FILE */</div><div class='del'>-#include &lt;limits.h&gt;		/* for NGROUPS_MAX */</div><div class='del'>-#include &lt;sys/param.h&gt;		/* for MAXPATHLEN and BSD4_4, if defined */</div><div class='del'>-#include &lt;sys/types.h&gt;		/* for u_int32_t, if defined */</div><div class='del'>-#include &lt;sys/time.h&gt;		/* for struct timeval */</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include "patchlevel.h"</div><div class='del'>-</div><div class='del'>-#if defined(__STDC__)</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#define __V(x)	x</div><div class='del'>-#else</div><div class='del'>-#include &lt;varargs.h&gt;</div><div class='del'>-#define __V(x)	(va_alist) va_dcl</div><div class='del'>-#define const</div><div class='del'>-#define volatile</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-#include "eui64.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Limits.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NUM_PPP		1	/* One PPP interface supported (per process) */</div><div class='del'>-#define MAXWORDLEN	1024	/* max length of word in file (incl null) */</div><div class='del'>-#define MAXARGS		1	/* max # args to a command */</div><div class='del'>-#define MAXNAMELEN	256	/* max length of hostname or name for auth */</div><div class='del'>-#define MAXSECRETLEN	256	/* max length of password or secret */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option descriptor structure.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef unsigned char	bool;</div><div class='del'>-</div><div class='del'>-enum opt_type {</div><div class='del'>-	o_special_noarg = 0,</div><div class='del'>-	o_special = 1,</div><div class='del'>-	o_bool,</div><div class='del'>-	o_int,</div><div class='del'>-	o_uint32,</div><div class='del'>-	o_string,</div><div class='del'>-	o_wild,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-	char	*name;		/* name of the option */</div><div class='del'>-	enum opt_type type;</div><div class='del'>-	void	*addr;</div><div class='del'>-	char	*description;</div><div class='del'>-	int	flags;</div><div class='del'>-	void	*addr2;</div><div class='del'>-	int	upper_limit;</div><div class='del'>-	int	lower_limit;</div><div class='del'>-	const char *source;</div><div class='del'>-	short int priority;</div><div class='del'>-	short int winner;</div><div class='del'>-} option_t;</div><div class='del'>-</div><div class='del'>-/* Values for flags */</div><div class='del'>-#define OPT_VALUE	0xff	/* mask for presupplied value */</div><div class='del'>-#define OPT_HEX		0x100	/* int option is in hex */</div><div class='del'>-#define OPT_NOARG	0x200	/* option doesn't take argument */</div><div class='del'>-#define OPT_OR		0x400	/* OR in argument to value */</div><div class='del'>-#define OPT_INC		0x800	/* increment value */</div><div class='del'>-#define OPT_PRIV	0x1000	/* privileged option */</div><div class='del'>-#define OPT_STATIC	0x2000	/* string option goes into static array */</div><div class='del'>-#define OPT_LLIMIT	0x4000	/* check value against lower limit */</div><div class='del'>-#define OPT_ULIMIT	0x8000	/* check value against upper limit */</div><div class='del'>-#define OPT_LIMITS	(OPT_LLIMIT|OPT_ULIMIT)</div><div class='del'>-#define OPT_ZEROOK	0x10000	/* 0 value is OK even if not within limits */</div><div class='del'>-#define OPT_HIDE	0x10000	/* for o_string, print value as ?????? */</div><div class='del'>-#define OPT_A2LIST	0x10000 /* for o_special, keep list of values */</div><div class='del'>-#define OPT_NOINCR	0x20000	/* value mustn't be increased */</div><div class='del'>-#define OPT_ZEROINF	0x40000	/* with OPT_NOINCR, 0 == infinity */</div><div class='del'>-#define OPT_PRIO	0x80000	/* process option priorities for this option */</div><div class='del'>-#define OPT_PRIOSUB	0x100000 /* subsidiary member of priority group */</div><div class='del'>-#define OPT_ALIAS	0x200000 /* option is alias for previous option */</div><div class='del'>-#define OPT_A2COPY	0x400000 /* addr2 -&gt; second location to rcv value */</div><div class='del'>-#define OPT_ENABLE	0x800000 /* use *addr2 as enable for option */</div><div class='del'>-#define OPT_A2CLR	0x1000000 /* clear *(bool *)addr2 */</div><div class='del'>-#define OPT_PRIVFIX	0x2000000 /* user can't override if set by root */</div><div class='del'>-#define OPT_INITONLY	0x4000000 /* option can only be set in init phase */</div><div class='del'>-#define OPT_DEVEQUIV	0x8000000 /* equiv to device name */</div><div class='del'>-#define OPT_DEVNAM	(OPT_INITONLY | OPT_DEVEQUIV)</div><div class='del'>-#define OPT_A2PRINTER	0x10000000 /* *addr2 is a fn for printing option */</div><div class='del'>-#define OPT_A2STRVAL	0x20000000 /* *addr2 points to current string value */</div><div class='del'>-#define OPT_NOPRINT	0x40000000 /* don't print this option at all */</div><div class='del'>-</div><div class='del'>-#define OPT_VAL(x)	((x) &amp; OPT_VALUE)</div><div class='del'>-</div><div class='del'>-/* Values for priority */</div><div class='del'>-#define OPRIO_DEFAULT	0	/* a default value */</div><div class='del'>-#define OPRIO_CFGFILE	1	/* value from a configuration file */</div><div class='del'>-#define OPRIO_CMDLINE	2	/* value from the command line */</div><div class='del'>-#define OPRIO_SECFILE	3	/* value from options in a secrets file */</div><div class='del'>-#define OPRIO_ROOT	100	/* added to priority if OPT_PRIVFIX &amp;&amp; root */</div><div class='del'>-</div><div class='del'>-#ifndef GIDSET_TYPE</div><div class='del'>-#define GIDSET_TYPE	gid_t</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Structure representing a list of permitted IP addresses. */</div><div class='del'>-struct permitted_ip {</div><div class='del'>-    int		permit;		/* 1 = permit, 0 = forbid */</div><div class='del'>-    u_int32_t	base;		/* match if (addr &amp; mask) == base */</div><div class='del'>-    u_int32_t	mask;		/* base and mask are in network byte order */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unfortunately, the linux kernel driver uses a different structure</div><div class='del'>- * for statistics from the rest of the ports.</div><div class='del'>- * This structure serves as a common representation for the bits</div><div class='del'>- * pppd needs.</div><div class='del'>- */</div><div class='del'>-struct pppd_stats {</div><div class='del'>-    unsigned int	bytes_in;</div><div class='del'>-    unsigned int	bytes_out;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Used for storing a sequence of words.  Usually malloced. */</div><div class='del'>-struct wordlist {</div><div class='del'>-    struct wordlist	*next;</div><div class='del'>-    char		*word;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* An endpoint discriminator, used with multilink. */</div><div class='del'>-#define MAX_ENDP_LEN	20	/* maximum length of discriminator value */</div><div class='del'>-struct epdisc {</div><div class='del'>-    unsigned char	class;</div><div class='del'>-    unsigned char	length;</div><div class='del'>-    unsigned char	value[MAX_ENDP_LEN];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* values for epdisc.class */</div><div class='del'>-#define EPD_NULL	0	/* null discriminator, no data */</div><div class='del'>-#define EPD_LOCAL	1</div><div class='del'>-#define EPD_IP		2</div><div class='del'>-#define EPD_MAC		3</div><div class='del'>-#define EPD_MAGIC	4</div><div class='del'>-#define EPD_PHONENUM	5</div><div class='del'>-</div><div class='del'>-typedef void (*notify_func) __P((void *, int));</div><div class='del'>-</div><div class='del'>-struct notifier {</div><div class='del'>-    struct notifier *next;</div><div class='del'>-    notify_func	    func;</div><div class='del'>-    void	    *arg;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Global variables.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int	hungup;		/* Physical layer has disconnected */</div><div class='del'>-extern int	ifunit;		/* Interface unit number */</div><div class='del'>-extern char	ifname[];	/* Interface name */</div><div class='del'>-extern char	hostname[];	/* Our hostname */</div><div class='del'>-extern u_char	outpacket_buf[]; /* Buffer for outgoing packets */</div><div class='del'>-extern int	phase;		/* Current state of link - see values below */</div><div class='del'>-extern int	baud_rate;	/* Current link speed in bits/sec */</div><div class='del'>-extern char	*progname;	/* Name of this program */</div><div class='del'>-extern int	redirect_stderr;/* Connector's stderr should go to file */</div><div class='del'>-extern char	peer_authname[];/* Authenticated name of peer */</div><div class='del'>-extern int	privileged;	/* We were run by real-uid root */</div><div class='del'>-extern int	need_holdoff;	/* Need holdoff period after link terminates */</div><div class='del'>-extern char	**script_env;	/* Environment variables for scripts */</div><div class='del'>-extern int	detached;	/* Have detached from controlling tty */</div><div class='del'>-extern GIDSET_TYPE groups[NGROUPS_MAX];	/* groups the user is in */</div><div class='del'>-extern int	ngroups;	/* How many groups valid in groups */</div><div class='del'>-extern struct pppd_stats link_stats; /* byte/packet counts etc. for link */</div><div class='del'>-extern int	link_stats_valid; /* set if link_stats is valid */</div><div class='del'>-extern int	link_connect_time; /* time the link was up for */</div><div class='del'>-extern int	using_pty;	/* using pty as device (notty or pty opt.) */</div><div class='del'>-extern int	log_to_fd;	/* logging to this fd as well as syslog */</div><div class='del'>-extern bool	log_default;	/* log_to_fd is default (stdout) */</div><div class='del'>-extern char	*no_ppp_msg;	/* message to print if ppp not in kernel */</div><div class='del'>-extern volatile int status;	/* exit status for pppd */</div><div class='del'>-extern bool	devnam_fixed;	/* can no longer change devnam */</div><div class='del'>-extern int	unsuccess;	/* # unsuccessful connection attempts */</div><div class='del'>-extern int	do_callback;	/* set if we want to do callback next */</div><div class='del'>-extern int	doing_callback;	/* set if this is a callback */</div><div class='del'>-extern char	ppp_devnam[MAXPATHLEN];</div><div class='del'>-extern struct notifier *pidchange;   /* for notifications of pid changing */</div><div class='del'>-extern struct notifier *phasechange; /* for notifications of phase changes */</div><div class='del'>-extern struct notifier *exitnotify;  /* for notification that we're exiting */</div><div class='del'>-extern struct notifier *sigreceived; /* notification of received signal */</div><div class='del'>-extern int	listen_time;	/* time to listen first (ms) */</div><div class='del'>-</div><div class='del'>-/* Values for do_callback and doing_callback */</div><div class='del'>-#define CALLBACK_DIALIN		1	/* we are expecting the call back */</div><div class='del'>-#define CALLBACK_DIALOUT	2	/* we are dialling out to call back */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Variables set by command-line options.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int	debug;		/* Debug flag */</div><div class='del'>-extern int	kdebugflag;	/* Tell kernel to print debug messages */</div><div class='del'>-extern int	default_device;	/* Using /dev/tty or equivalent */</div><div class='del'>-extern char	devnam[MAXPATHLEN];	/* Device name */</div><div class='del'>-extern int	crtscts;	/* Use hardware flow control */</div><div class='del'>-extern bool	modem;		/* Use modem control lines */</div><div class='del'>-extern int	inspeed;	/* Input/Output speed requested */</div><div class='del'>-extern u_int32_t netmask;	/* IP netmask to set on interface */</div><div class='del'>-extern bool	lockflag;	/* Create lock file to lock the serial dev */</div><div class='del'>-extern bool	nodetach;	/* Don't detach from controlling tty */</div><div class='del'>-extern bool	updetach;	/* Detach from controlling tty when link up */</div><div class='del'>-extern char	*initializer;	/* Script to initialize physical link */</div><div class='del'>-extern char	*connect_script; /* Script to establish physical link */</div><div class='del'>-extern char	*disconnect_script; /* Script to disestablish physical link */</div><div class='del'>-extern char	*welcomer;	/* Script to welcome client after connection */</div><div class='del'>-extern char	*ptycommand;	/* Command to run on other side of pty */</div><div class='del'>-extern int	maxconnect;	/* Maximum connect time (seconds) */</div><div class='del'>-extern char	user[MAXNAMELEN];/* Our name for authenticating ourselves */</div><div class='del'>-extern char	passwd[MAXSECRETLEN];	/* Password for PAP or CHAP */</div><div class='del'>-extern bool	auth_required;	/* Peer is required to authenticate */</div><div class='del'>-extern bool	persist;	/* Reopen link after it goes down */</div><div class='del'>-extern bool	uselogin;	/* Use /etc/passwd for checking PAP */</div><div class='del'>-extern char	our_name[MAXNAMELEN];/* Our name for authentication purposes */</div><div class='del'>-extern char	remote_name[MAXNAMELEN]; /* Peer's name for authentication */</div><div class='del'>-extern bool	explicit_remote;/* remote_name specified with remotename opt */</div><div class='del'>-extern bool	demand;		/* Do dial-on-demand */</div><div class='del'>-extern char	*ipparam;	/* Extra parameter for ip up/down scripts */</div><div class='del'>-extern bool	cryptpap;	/* Others' PAP passwords are encrypted */</div><div class='del'>-extern int	idle_time_limit;/* Shut down link if idle for this long */</div><div class='del'>-extern int	holdoff;	/* Dead time before restarting */</div><div class='del'>-extern bool	holdoff_specified; /* true if user gave a holdoff value */</div><div class='del'>-extern bool	notty;		/* Stdin/out is not a tty */</div><div class='del'>-extern char	*pty_socket;	/* Socket to connect to pty */</div><div class='del'>-extern char	*record_file;	/* File to record chars sent/received */</div><div class='del'>-extern bool	sync_serial;	/* Device is synchronous serial device */</div><div class='del'>-extern int	maxfail;	/* Max # of unsuccessful connection attempts */</div><div class='del'>-extern char	linkname[MAXPATHLEN]; /* logical name for link */</div><div class='del'>-extern bool	tune_kernel;	/* May alter kernel settings as necessary */</div><div class='del'>-extern int	connect_delay;	/* Time to delay after connect script */</div><div class='del'>-extern int	max_data_rate;	/* max bytes/sec through charshunt */</div><div class='del'>-extern int	req_unit;	/* interface unit number to use */</div><div class='del'>-extern bool	multilink;	/* enable multilink operation */</div><div class='del'>-extern bool	noendpoint;	/* don't send or accept endpt. discrim. */</div><div class='del'>-extern char	*bundle_name;	/* bundle name for multilink */</div><div class='del'>-extern bool	dump_options;	/* print out option values */</div><div class='del'>-extern bool	dryrun;		/* check everything, print options, exit */</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-extern struct	bpf_program pass_filter;   /* Filter for pkts to pass */</div><div class='del'>-extern struct	bpf_program active_filter; /* Filter for link-active pkts */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-extern bool	ms_lanman;	/* Use LanMan password instead of NT */</div><div class='del'>-				/* Has meaning only with MS-CHAP challenges */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern char *current_option;	/* the name of the option being parsed */</div><div class='del'>-extern int  privileged_option;	/* set iff the current option came from root */</div><div class='del'>-extern char *option_source;	/* string saying where the option came from */</div><div class='del'>-extern int  option_priority;	/* priority of current options */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for phase.</div><div class='del'>- */</div><div class='del'>-#define PHASE_DEAD		0</div><div class='del'>-#define PHASE_INITIALIZE	1</div><div class='del'>-#define PHASE_SERIALCONN	2</div><div class='del'>-#define PHASE_DORMANT		3</div><div class='del'>-#define PHASE_ESTABLISH		4</div><div class='del'>-#define PHASE_AUTHENTICATE	5</div><div class='del'>-#define PHASE_CALLBACK		6</div><div class='del'>-#define PHASE_NETWORK		7</div><div class='del'>-#define PHASE_RUNNING		8</div><div class='del'>-#define PHASE_TERMINATE		9</div><div class='del'>-#define PHASE_DISCONNECT	10</div><div class='del'>-#define PHASE_HOLDOFF		11</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following struct gives the addresses of procedures to call</div><div class='del'>- * for a particular protocol.</div><div class='del'>- */</div><div class='del'>-struct protent {</div><div class='del'>-    u_short protocol;		/* PPP protocol number */</div><div class='del'>-    /* Initialization procedure */</div><div class='del'>-    void (*init) __P((int unit));</div><div class='del'>-    /* Process a received packet */</div><div class='del'>-    void (*input) __P((int unit, u_char *pkt, int len));</div><div class='del'>-    /* Process a received protocol-reject */</div><div class='del'>-    void (*protrej) __P((int unit));</div><div class='del'>-    /* Lower layer has come up */</div><div class='del'>-    void (*lowerup) __P((int unit));</div><div class='del'>-    /* Lower layer has gone down */</div><div class='del'>-    void (*lowerdown) __P((int unit));</div><div class='del'>-    /* Open the protocol */</div><div class='del'>-    void (*open) __P((int unit));</div><div class='del'>-    /* Close the protocol */</div><div class='del'>-    void (*close) __P((int unit, char *reason));</div><div class='del'>-    /* Print a packet in readable form */</div><div class='del'>-    int  (*printpkt) __P((u_char *pkt, int len,</div><div class='del'>-			  void (*printer) __P((void *, char *, ...)),</div><div class='del'>-			  void *arg));</div><div class='del'>-    /* Process a received data packet */</div><div class='del'>-    void (*datainput) __P((int unit, u_char *pkt, int len));</div><div class='del'>-    bool enabled_flag;		/* 0 iff protocol is disabled */</div><div class='del'>-    char *name;			/* Text name of protocol */</div><div class='del'>-    char *data_name;		/* Text name of corresponding data protocol */</div><div class='del'>-    option_t *options;		/* List of command-line options */</div><div class='del'>-    /* Check requested options, assign defaults */</div><div class='del'>-    void (*check_options) __P((void));</div><div class='del'>-    /* Configure interface for demand-dial */</div><div class='del'>-    int  (*demand_conf) __P((int unit));</div><div class='del'>-    /* Say whether to bring up link for this pkt */</div><div class='del'>-    int  (*active_pkt) __P((u_char *pkt, int len));</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Table of pointers to supported protocols */</div><div class='del'>-extern struct protent *protocols[];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This struct contains pointers to a set of procedures for</div><div class='del'>- * doing operations on a "channel".  A channel provides a way</div><div class='del'>- * to send and receive PPP packets - the canonical example is</div><div class='del'>- * a serial port device in PPP line discipline (or equivalently</div><div class='del'>- * with PPP STREAMS modules pushed onto it).</div><div class='del'>- */</div><div class='del'>-struct channel {</div><div class='del'>-	/* set of options for this channel */</div><div class='del'>-	option_t *options;</div><div class='del'>-	/* find and process a per-channel options file */</div><div class='del'>-	void (*process_extra_options) __P((void));</div><div class='del'>-	/* check all the options that have been given */</div><div class='del'>-	void (*check_options) __P((void));</div><div class='del'>-	/* get the channel ready to do PPP, return a file descriptor */</div><div class='del'>-	int  (*connect) __P((void));</div><div class='del'>-	/* we're finished with the channel */</div><div class='del'>-	void (*disconnect) __P((void));</div><div class='del'>-	/* put the channel into PPP `mode' */</div><div class='del'>-	int  (*establish_ppp) __P((int));</div><div class='del'>-	/* take the channel out of PPP `mode', restore loopback if demand */</div><div class='del'>-	void (*disestablish_ppp) __P((int));</div><div class='del'>-	/* set the transmit-side PPP parameters of the channel */</div><div class='del'>-	void (*send_config) __P((int, u_int32_t, int, int));</div><div class='del'>-	/* set the receive-side PPP parameters of the channel */</div><div class='del'>-	void (*recv_config) __P((int, u_int32_t, int, int));</div><div class='del'>-	/* cleanup on error or normal exit */</div><div class='del'>-	void (*cleanup) __P((void));</div><div class='del'>-	/* close the device, called in children after fork */</div><div class='del'>-	void (*close) __P((void));</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct channel *the_channel;</div><div class='del'>-</div><div class='del'>-#define ppp_send_config(unit, mtu, accm, pc, acc)			 \</div><div class='del'>-do {									 \</div><div class='del'>-	if (the_channel-&gt;send_config)					 \</div><div class='del'>-		(*the_channel-&gt;send_config)((mtu), (accm), (pc), (acc)); \</div><div class='del'>-} while (0)</div><div class='del'>-</div><div class='del'>-#define ppp_recv_config(unit, mtu, accm, pc, acc)			 \</div><div class='del'>-do {									 \</div><div class='del'>-	if (the_channel-&gt;send_config)					 \</div><div class='del'>-		(*the_channel-&gt;recv_config)((mtu), (accm), (pc), (acc)); \</div><div class='del'>-} while (0)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prototypes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from main.c. */</div><div class='del'>-void set_ifunit __P((int));	/* set stuff that depends on ifunit */</div><div class='del'>-void detach __P((void));	/* Detach from controlling tty */</div><div class='del'>-void die __P((int));		/* Cleanup and exit */</div><div class='del'>-void quit __P((void));		/* like die(1) */</div><div class='del'>-void novm __P((char *));	/* Say we ran out of memory, and die */</div><div class='del'>-void timeout __P((void (*func)(void *), void *arg, int s, int us));</div><div class='del'>-				/* Call func(arg) after s.us seconds */</div><div class='del'>-void untimeout __P((void (*func)(void *), void *arg));</div><div class='del'>-				/* Cancel call to func(arg) */</div><div class='del'>-void record_child __P((int, char *, void (*) (void *), void *));</div><div class='del'>-int  device_script __P((char *cmd, int in, int out, int dont_wait));</div><div class='del'>-				/* Run `cmd' with given stdin and stdout */</div><div class='del'>-pid_t run_program __P((char *prog, char **args, int must_exist,</div><div class='del'>-		       void (*done)(void *), void *arg));</div><div class='del'>-				/* Run program prog with args in child */</div><div class='del'>-void reopen_log __P((void));	/* (re)open the connection to syslog */</div><div class='del'>-void update_link_stats __P((int)); /* Get stats at link termination */</div><div class='del'>-void script_setenv __P((char *, char *, int));	/* set script env var */</div><div class='del'>-void script_unsetenv __P((char *));		/* unset script env var */</div><div class='del'>-void new_phase __P((int));	/* signal start of new phase */</div><div class='del'>-void add_notifier __P((struct notifier **, notify_func, void *));</div><div class='del'>-void remove_notifier __P((struct notifier **, notify_func, void *));</div><div class='del'>-void notify __P((struct notifier *, int));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from tty.c. */</div><div class='del'>-void tty_init __P((void));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from utils.c. */</div><div class='del'>-void log_packet __P((u_char *, int, char *, int));</div><div class='del'>-				/* Format a packet and log it with syslog */</div><div class='del'>-void print_string __P((char *, int,  void (*) (void *, char *, ...),</div><div class='del'>-		void *));	/* Format a string for output */</div><div class='del'>-int slprintf __P((char *, int, char *, ...));		/* sprintf++ */</div><div class='del'>-int vslprintf __P((char *, int, char *, va_list));	/* vsprintf++ */</div><div class='del'>-size_t strlcpy __P((char *, const char *, size_t));	/* safe strcpy */</div><div class='del'>-size_t strlcat __P((char *, const char *, size_t));	/* safe strncpy */</div><div class='del'>-void dbglog __P((char *, ...));	/* log a debug message */</div><div class='del'>-void info __P((char *, ...));	/* log an informational message */</div><div class='del'>-void notice __P((char *, ...));	/* log a notice-level message */</div><div class='del'>-void warn __P((char *, ...));	/* log a warning message */</div><div class='del'>-void error __P((char *, ...));	/* log an error message */</div><div class='del'>-void fatal __P((char *, ...));	/* log an error message and die(1) */</div><div class='del'>-void init_pr_log __P((char *, int));	/* initialize for using pr_log */</div><div class='del'>-void pr_log __P((void *, char *, ...));	/* printer fn, output to syslog */</div><div class='del'>-void end_pr_log __P((void));	/* finish up after using pr_log */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from auth.c */</div><div class='del'>-void link_required __P((int));	  /* we are starting to use the link */</div><div class='del'>-void link_terminated __P((int));  /* we are finished with the link */</div><div class='del'>-void link_down __P((int));	  /* the LCP layer has left the Opened state */</div><div class='del'>-void link_established __P((int)); /* the link is up; authenticate now */</div><div class='del'>-void start_networks __P((void));  /* start all the network control protos */</div><div class='del'>-void np_up __P((int, int));	  /* a network protocol has come up */</div><div class='del'>-void np_down __P((int, int));	  /* a network protocol has gone down */</div><div class='del'>-void np_finished __P((int, int)); /* a network protocol no longer needs link */</div><div class='del'>-void auth_peer_fail __P((int, int));</div><div class='del'>-				/* peer failed to authenticate itself */</div><div class='del'>-void auth_peer_success __P((int, int, char *, int));</div><div class='del'>-				/* peer successfully authenticated itself */</div><div class='del'>-void auth_withpeer_fail __P((int, int));</div><div class='del'>-				/* we failed to authenticate ourselves */</div><div class='del'>-void auth_withpeer_success __P((int, int));</div><div class='del'>-				/* we successfully authenticated ourselves */</div><div class='del'>-void auth_check_options __P((void));</div><div class='del'>-				/* check authentication options supplied */</div><div class='del'>-void auth_reset __P((int));	/* check what secrets we have */</div><div class='del'>-int  check_passwd __P((int, char *, int, char *, int, char **));</div><div class='del'>-				/* Check peer-supplied username/password */</div><div class='del'>-int  get_secret __P((int, char *, char *, char *, int *, int));</div><div class='del'>-				/* get "secret" for chap */</div><div class='del'>-int  auth_ip_addr __P((int, u_int32_t));</div><div class='del'>-				/* check if IP address is authorized */</div><div class='del'>-int  bad_ip_adrs __P((u_int32_t));</div><div class='del'>-				/* check if IP address is unreasonable */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from demand.c */</div><div class='del'>-void demand_conf __P((void));	/* config interface(s) for demand-dial */</div><div class='del'>-void demand_block __P((void));	/* set all NPs to queue up packets */</div><div class='del'>-void demand_unblock __P((void)); /* set all NPs to pass packets */</div><div class='del'>-void demand_discard __P((void)); /* set all NPs to discard packets */</div><div class='del'>-void demand_rexmit __P((int));	/* retransmit saved frames for an NP */</div><div class='del'>-int  loop_chars __P((unsigned char *, int)); /* process chars from loopback */</div><div class='del'>-int  loop_frame __P((unsigned char *, int)); /* should we bring link up? */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from multilink.c */</div><div class='del'>-void mp_check_options __P((void)); /* Check multilink-related options */</div><div class='del'>-int  mp_join_bundle __P((void));  /* join our link to an appropriate bundle */</div><div class='del'>-char *epdisc_to_str __P((struct epdisc *)); /* string from endpoint discrim. */</div><div class='del'>-int  str_to_epdisc __P((struct epdisc *, char *)); /* endpt disc. from str */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from sys-*.c */</div><div class='del'>-void sys_init __P((void));	/* Do system-dependent initialization */</div><div class='del'>-void sys_cleanup __P((void));	/* Restore system state before exiting */</div><div class='del'>-int  sys_check_options __P((void)); /* Check options specified */</div><div class='del'>-void sys_close __P((void));	/* Clean up in a child before execing */</div><div class='del'>-int  ppp_available __P((void));	/* Test whether ppp kernel support exists */</div><div class='del'>-int  get_pty __P((int *, int *, char *, int));	/* Get pty master/slave */</div><div class='del'>-int  open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */</div><div class='del'>-int  tty_establish_ppp __P((int));  /* Turn serial port into a ppp interface */</div><div class='del'>-void tty_disestablish_ppp __P((int)); /* Restore port to normal operation */</div><div class='del'>-void make_new_bundle __P((int, int, int, int)); /* Create new bundle */</div><div class='del'>-int  bundle_attach __P((int));	/* Attach link to existing bundle */</div><div class='del'>-void cfg_bundle __P((int, int, int, int)); /* Configure existing bundle */</div><div class='del'>-void clean_check __P((void));	/* Check if line was 8-bit clean */</div><div class='del'>-void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */</div><div class='del'>-void restore_tty __P((int));	/* Restore port's original parameters */</div><div class='del'>-void setdtr __P((int, int));	/* Raise or lower port's DTR line */</div><div class='del'>-void output __P((int, u_char *, int)); /* Output a PPP packet */</div><div class='del'>-void wait_input __P((struct timeval *));</div><div class='del'>-				/* Wait for input, with timeout */</div><div class='del'>-void add_fd __P((int));		/* Add fd to set to wait for */</div><div class='del'>-void remove_fd __P((int));	/* Remove fd from set to wait for */</div><div class='del'>-int  read_packet __P((u_char *)); /* Read PPP packet */</div><div class='del'>-int  get_loop_output __P((void)); /* Read pkts from loopback */</div><div class='del'>-void tty_send_config __P((int, u_int32_t, int, int));</div><div class='del'>-				/* Configure i/f transmit parameters */</div><div class='del'>-void tty_set_xaccm __P((ext_accm));</div><div class='del'>-				/* Set extended transmit ACCM */</div><div class='del'>-void tty_recv_config __P((int, u_int32_t, int, int));</div><div class='del'>-				/* Configure i/f receive parameters */</div><div class='del'>-int  ccp_test __P((int, u_char *, int, int));</div><div class='del'>-				/* Test support for compression scheme */</div><div class='del'>-void ccp_flags_set __P((int, int, int));</div><div class='del'>-				/* Set kernel CCP state */</div><div class='del'>-int  ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */</div><div class='del'>-int  get_idle_time __P((int, struct ppp_idle *));</div><div class='del'>-				/* Find out how long link has been idle */</div><div class='del'>-int  get_ppp_stats __P((int, struct pppd_stats *));</div><div class='del'>-				/* Return link statistics */</div><div class='del'>-void netif_set_mtu __P((int, int)); /* Set PPP interface MTU */</div><div class='del'>-int  sifvjcomp __P((int, int, int, int));</div><div class='del'>-				/* Configure VJ TCP header compression */</div><div class='del'>-int  sifup __P((int));		/* Configure i/f up for one protocol */</div><div class='del'>-int  sifnpmode __P((int u, int proto, enum NPmode mode));</div><div class='del'>-				/* Set mode for handling packets for proto */</div><div class='del'>-int  sifdown __P((int));	/* Configure i/f down for one protocol */</div><div class='del'>-int  sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));</div><div class='del'>-				/* Configure IPv4 addresses for i/f */</div><div class='del'>-int  cifaddr __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Reset i/f IP addresses */</div><div class='del'>-#ifdef INET6</div><div class='del'>-int  sif6addr __P((int, eui64_t, eui64_t));</div><div class='del'>-				/* Configure IPv6 addresses for i/f */</div><div class='del'>-int  cif6addr __P((int, eui64_t, eui64_t));</div><div class='del'>-				/* Remove an IPv6 address from i/f */</div><div class='del'>-#endif</div><div class='del'>-int  sifdefaultroute __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Create default route through i/f */</div><div class='del'>-int  cifdefaultroute __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Delete default route through i/f */</div><div class='del'>-int  sifproxyarp __P((int, u_int32_t));</div><div class='del'>-				/* Add proxy ARP entry for peer */</div><div class='del'>-int  cifproxyarp __P((int, u_int32_t));</div><div class='del'>-				/* Delete proxy ARP entry for peer */</div><div class='del'>-u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */</div><div class='del'>-int  lock __P((char *));	/* Create lock file for device */</div><div class='del'>-int  relock __P((int));		/* Rewrite lock file with new pid */</div><div class='del'>-void unlock __P((void));	/* Delete previously-created lock file */</div><div class='del'>-int  get_host_seed __P((void));	/* Get host-dependent random number seed */</div><div class='del'>-int  have_route_to __P((u_int32_t)); /* Check if route to addr exists */</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-int  set_filters __P((struct bpf_program *pass, struct bpf_program *active));</div><div class='del'>-				/* Set filter programs in kernel */</div><div class='del'>-#endif</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-int  sipxfaddr __P((int, unsigned long, unsigned char *));</div><div class='del'>-int  cipxfaddr __P((int));</div><div class='del'>-#endif</div><div class='del'>-int  get_if_hwaddr __P((u_char *addr, char *name));</div><div class='del'>-char *get_first_ethernet __P((void));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from options.c */</div><div class='del'>-int  parse_args __P((int argc, char **argv));</div><div class='del'>-				/* Parse options from arguments given */</div><div class='del'>-int  options_from_file __P((char *filename, int must_exist, int check_prot,</div><div class='del'>-			    int privileged));</div><div class='del'>-				/* Parse options from an options file */</div><div class='del'>-int  options_from_user __P((void)); /* Parse options from user's .ppprc */</div><div class='del'>-int  options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */</div><div class='del'>-int  options_from_list __P((struct wordlist *, int privileged));</div><div class='del'>-				/* Parse options from a wordlist */</div><div class='del'>-int  getword __P((FILE *f, char *word, int *newlinep, char *filename));</div><div class='del'>-				/* Read a word from a file */</div><div class='del'>-void option_error __P((char *fmt, ...));</div><div class='del'>-				/* Print an error message about an option */</div><div class='del'>-int int_option __P((char *, int *));</div><div class='del'>-				/* Simplified number_option for decimal ints */</div><div class='del'>-void add_options __P((option_t *)); /* Add extra options */</div><div class='del'>-void check_options __P((void));	/* check values after all options parsed */</div><div class='del'>-int  override_value __P((const char *, int, const char *));</div><div class='del'>-				/* override value if permitted by priority */</div><div class='del'>-void print_options __P((void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-				/* print out values of all options */</div><div class='del'>-</div><div class='del'>-int parse_dotted_ip __P((char *, u_int32_t *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Hooks to enable plugins to change various things.</div><div class='del'>- */</div><div class='del'>-extern int (*new_phase_hook) __P((int));</div><div class='del'>-extern int (*idle_time_hook) __P((struct ppp_idle *));</div><div class='del'>-extern int (*holdoff_hook) __P((void));</div><div class='del'>-extern int (*pap_check_hook) __P((void));</div><div class='del'>-extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,</div><div class='del'>-				 struct wordlist **paddrs,</div><div class='del'>-				 struct wordlist **popts));</div><div class='del'>-extern void (*pap_logout_hook) __P((void));</div><div class='del'>-extern int (*pap_passwd_hook) __P((char *user, char *passwd));</div><div class='del'>-extern void (*ip_up_hook) __P((void));</div><div class='del'>-extern void (*ip_down_hook) __P((void));</div><div class='del'>-extern void (*ip_choose_hook) __P((u_int32_t *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Inline versions of get/put char/short/long.</div><div class='del'>- * Pointer is advanced; we assume that both arguments</div><div class='del'>- * are lvalues and will already be in registers.</div><div class='del'>- * cp MUST be u_char *.</div><div class='del'>- */</div><div class='del'>-#define GETCHAR(c, cp) { \</div><div class='del'>-	(c) = *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTCHAR(c, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) (c); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define GETSHORT(s, cp) { \</div><div class='del'>-	(s) = *(cp)++ &lt;&lt; 8; \</div><div class='del'>-	(s) |= *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTSHORT(s, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) ((s) &gt;&gt; 8); \</div><div class='del'>-	*(cp)++ = (u_char) (s); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define GETLONG(l, cp) { \</div><div class='del'>-	(l) = *(cp)++ &lt;&lt; 8; \</div><div class='del'>-	(l) |= *(cp)++; (l) &lt;&lt;= 8; \</div><div class='del'>-	(l) |= *(cp)++; (l) &lt;&lt;= 8; \</div><div class='del'>-	(l) |= *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTLONG(l, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 24); \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 16); \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 8); \</div><div class='del'>-	*(cp)++ = (u_char) (l); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define INCPTR(n, cp)	((cp) += (n))</div><div class='del'>-#define DECPTR(n, cp)	((cp) -= (n))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * System dependent definitions for user-level 4.3BSD UNIX implementation.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define TIMEOUT(r, f, t)	timeout((r), (f), (t), 0)</div><div class='del'>-#define UNTIMEOUT(r, f)		untimeout((r), (f))</div><div class='del'>-</div><div class='del'>-#define BCOPY(s, d, l)		memcpy(d, s, l)</div><div class='del'>-#define BZERO(s, n)		memset(s, 0, n)</div><div class='del'>-</div><div class='del'>-#define PRINTMSG(m, l)		{ info("Remote message: %0.*v", l, m); }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * MAKEHEADER - Add Header fields to a packet.</div><div class='del'>- */</div><div class='del'>-#define MAKEHEADER(p, t) { \</div><div class='del'>-    PUTCHAR(PPP_ALLSTATIONS, p); \</div><div class='del'>-    PUTCHAR(PPP_UI, p); \</div><div class='del'>-    PUTSHORT(t, p); }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Exit status values.</div><div class='del'>- */</div><div class='del'>-#define EXIT_OK			0</div><div class='del'>-#define EXIT_FATAL_ERROR	1</div><div class='del'>-#define EXIT_OPTION_ERROR	2</div><div class='del'>-#define EXIT_NOT_ROOT		3</div><div class='del'>-#define EXIT_NO_KERNEL_SUPPORT	4</div><div class='del'>-#define EXIT_USER_REQUEST	5</div><div class='del'>-#define EXIT_LOCK_FAILED	6</div><div class='del'>-#define EXIT_OPEN_FAILED	7</div><div class='del'>-#define EXIT_CONNECT_FAILED	8</div><div class='del'>-#define EXIT_PTYCMD_FAILED	9</div><div class='del'>-#define EXIT_NEGOTIATION_FAILED	10</div><div class='del'>-#define EXIT_PEER_AUTH_FAILED	11</div><div class='del'>-#define EXIT_IDLE_TIMEOUT	12</div><div class='del'>-#define EXIT_CONNECT_TIME	13</div><div class='del'>-#define EXIT_CALLBACK		14</div><div class='del'>-#define EXIT_PEER_DEAD		15</div><div class='del'>-#define EXIT_HANGUP		16</div><div class='del'>-#define EXIT_LOOPBACK		17</div><div class='del'>-#define EXIT_INIT_FAILED	18</div><div class='del'>-#define EXIT_AUTH_TOPEER_FAILED	19</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Debug macros.  Slightly useful for finding bugs in pppd, not particularly</div><div class='del'>- * useful for finding out why your connection isn't being established.</div><div class='del'>- */</div><div class='del'>-#ifdef DEBUGALL</div><div class='del'>-#define DEBUGMAIN	1</div><div class='del'>-#define DEBUGFSM	1</div><div class='del'>-#define DEBUGLCP	1</div><div class='del'>-#define DEBUGIPCP	1</div><div class='del'>-#define DEBUGIPV6CP	1</div><div class='del'>-#define DEBUGUPAP	1</div><div class='del'>-#define DEBUGCHAP	1</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef LOG_PPP			/* we use LOG_LOCAL2 for syslog by default */</div><div class='del'>-#if defined(DEBUGMAIN) || defined(DEBUGFSM) || defined(DEBUGSYS) \</div><div class='del'>-  || defined(DEBUGLCP) || defined(DEBUGIPCP) || defined(DEBUGUPAP) \</div><div class='del'>-  || defined(DEBUGCHAP) || defined(DEBUG) || defined(DEBUGIPV6CP)</div><div class='del'>-#define LOG_PPP LOG_LOCAL2</div><div class='del'>-#else</div><div class='del'>-#define LOG_PPP LOG_DAEMON</div><div class='del'>-#endif</div><div class='del'>-#endif /* LOG_PPP */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGMAIN</div><div class='del'>-#define MAINDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define MAINDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGSYS</div><div class='del'>-#define SYSDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define SYSDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGFSM</div><div class='del'>-#define FSMDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define FSMDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGLCP</div><div class='del'>-#define LCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define LCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPCP</div><div class='del'>-#define IPCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPV6CP</div><div class='del'>-#define IPV6CPDEBUG(x)  if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPV6CPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGUPAP</div><div class='del'>-#define UPAPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define UPAPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGCHAP</div><div class='del'>-#define CHAPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define CHAPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPXCP</div><div class='del'>-#define IPXCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPXCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef SIGTYPE</div><div class='del'>-#if defined(sun) || defined(SYSV) || defined(POSIX_SOURCE)</div><div class='del'>-#define SIGTYPE void</div><div class='del'>-#else</div><div class='del'>-#define SIGTYPE int</div><div class='del'>-#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */</div><div class='del'>-#endif /* SIGTYPE */</div><div class='del'>-</div><div class='del'>-#ifndef MIN</div><div class='del'>-#define MIN(a, b)	((a) &lt; (b)? (a): (b))</div><div class='del'>-#endif</div><div class='del'>-#ifndef MAX</div><div class='del'>-#define MAX(a, b)	((a) &gt; (b)? (a): (b))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* __PPP_H__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/pppd.h.wtmp b/mdk-stage1/ppp/pppd/pppd.h.wtmp<br/>deleted file mode 100644<br/>index 4d440be06..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/pppd.h.wtmp?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/pppd.h.wtmp</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,789 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * pppd.h - PPP daemon global declarations.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- *</div><div class='del'>- * $Id$</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * TODO:</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef __PPPD_H__</div><div class='del'>-#define __PPPD_H__</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;		/* for FILE */</div><div class='del'>-#include &lt;limits.h&gt;		/* for NGROUPS_MAX */</div><div class='del'>-#include &lt;sys/param.h&gt;		/* for MAXPATHLEN and BSD4_4, if defined */</div><div class='del'>-#include &lt;sys/types.h&gt;		/* for u_int32_t, if defined */</div><div class='del'>-#include &lt;sys/time.h&gt;		/* for struct timeval */</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include "patchlevel.h"</div><div class='del'>-</div><div class='del'>-#if defined(__STDC__)</div><div class='del'>-#include &lt;stdarg.h&gt;</div><div class='del'>-#define __V(x)	x</div><div class='del'>-#else</div><div class='del'>-#include &lt;varargs.h&gt;</div><div class='del'>-#define __V(x)	(va_alist) va_dcl</div><div class='del'>-#define const</div><div class='del'>-#define volatile</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-#include "eui64.h"</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Limits.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define NUM_PPP		1	/* One PPP interface supported (per process) */</div><div class='del'>-#define MAXWORDLEN	1024	/* max length of word in file (incl null) */</div><div class='del'>-#define MAXARGS		1	/* max # args to a command */</div><div class='del'>-#define MAXNAMELEN	256	/* max length of hostname or name for auth */</div><div class='del'>-#define MAXSECRETLEN	256	/* max length of password or secret */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Option descriptor structure.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-typedef unsigned char	bool;</div><div class='del'>-</div><div class='del'>-enum opt_type {</div><div class='del'>-	o_special_noarg = 0,</div><div class='del'>-	o_special = 1,</div><div class='del'>-	o_bool,</div><div class='del'>-	o_int,</div><div class='del'>-	o_uint32,</div><div class='del'>-	o_string,</div><div class='del'>-	o_wild,</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-typedef struct {</div><div class='del'>-	char	*name;		/* name of the option */</div><div class='del'>-	enum opt_type type;</div><div class='del'>-	void	*addr;</div><div class='del'>-	char	*description;</div><div class='del'>-	int	flags;</div><div class='del'>-	void	*addr2;</div><div class='del'>-	int	upper_limit;</div><div class='del'>-	int	lower_limit;</div><div class='del'>-	const char *source;</div><div class='del'>-	short int priority;</div><div class='del'>-	short int winner;</div><div class='del'>-} option_t;</div><div class='del'>-</div><div class='del'>-/* Values for flags */</div><div class='del'>-#define OPT_VALUE	0xff	/* mask for presupplied value */</div><div class='del'>-#define OPT_HEX		0x100	/* int option is in hex */</div><div class='del'>-#define OPT_NOARG	0x200	/* option doesn't take argument */</div><div class='del'>-#define OPT_OR		0x400	/* OR in argument to value */</div><div class='del'>-#define OPT_INC		0x800	/* increment value */</div><div class='del'>-#define OPT_PRIV	0x1000	/* privileged option */</div><div class='del'>-#define OPT_STATIC	0x2000	/* string option goes into static array */</div><div class='del'>-#define OPT_LLIMIT	0x4000	/* check value against lower limit */</div><div class='del'>-#define OPT_ULIMIT	0x8000	/* check value against upper limit */</div><div class='del'>-#define OPT_LIMITS	(OPT_LLIMIT|OPT_ULIMIT)</div><div class='del'>-#define OPT_ZEROOK	0x10000	/* 0 value is OK even if not within limits */</div><div class='del'>-#define OPT_HIDE	0x10000	/* for o_string, print value as ?????? */</div><div class='del'>-#define OPT_A2LIST	0x10000 /* for o_special, keep list of values */</div><div class='del'>-#define OPT_NOINCR	0x20000	/* value mustn't be increased */</div><div class='del'>-#define OPT_ZEROINF	0x40000	/* with OPT_NOINCR, 0 == infinity */</div><div class='del'>-#define OPT_PRIO	0x80000	/* process option priorities for this option */</div><div class='del'>-#define OPT_PRIOSUB	0x100000 /* subsidiary member of priority group */</div><div class='del'>-#define OPT_ALIAS	0x200000 /* option is alias for previous option */</div><div class='del'>-#define OPT_A2COPY	0x400000 /* addr2 -&gt; second location to rcv value */</div><div class='del'>-#define OPT_ENABLE	0x800000 /* use *addr2 as enable for option */</div><div class='del'>-#define OPT_A2CLR	0x1000000 /* clear *(bool *)addr2 */</div><div class='del'>-#define OPT_PRIVFIX	0x2000000 /* user can't override if set by root */</div><div class='del'>-#define OPT_INITONLY	0x4000000 /* option can only be set in init phase */</div><div class='del'>-#define OPT_DEVEQUIV	0x8000000 /* equiv to device name */</div><div class='del'>-#define OPT_DEVNAM	(OPT_INITONLY | OPT_DEVEQUIV)</div><div class='del'>-#define OPT_A2PRINTER	0x10000000 /* *addr2 is a fn for printing option */</div><div class='del'>-#define OPT_A2STRVAL	0x20000000 /* *addr2 points to current string value */</div><div class='del'>-#define OPT_NOPRINT	0x40000000 /* don't print this option at all */</div><div class='del'>-</div><div class='del'>-#define OPT_VAL(x)	((x) &amp; OPT_VALUE)</div><div class='del'>-</div><div class='del'>-/* Values for priority */</div><div class='del'>-#define OPRIO_DEFAULT	0	/* a default value */</div><div class='del'>-#define OPRIO_CFGFILE	1	/* value from a configuration file */</div><div class='del'>-#define OPRIO_CMDLINE	2	/* value from the command line */</div><div class='del'>-#define OPRIO_SECFILE	3	/* value from options in a secrets file */</div><div class='del'>-#define OPRIO_ROOT	100	/* added to priority if OPT_PRIVFIX &amp;&amp; root */</div><div class='del'>-</div><div class='del'>-#ifndef GIDSET_TYPE</div><div class='del'>-#define GIDSET_TYPE	gid_t</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/* Structure representing a list of permitted IP addresses. */</div><div class='del'>-struct permitted_ip {</div><div class='del'>-    int		permit;		/* 1 = permit, 0 = forbid */</div><div class='del'>-    u_int32_t	base;		/* match if (addr &amp; mask) == base */</div><div class='del'>-    u_int32_t	mask;		/* base and mask are in network byte order */</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Unfortunately, the linux kernel driver uses a different structure</div><div class='del'>- * for statistics from the rest of the ports.</div><div class='del'>- * This structure serves as a common representation for the bits</div><div class='del'>- * pppd needs.</div><div class='del'>- */</div><div class='del'>-struct pppd_stats {</div><div class='del'>-    unsigned int	bytes_in;</div><div class='del'>-    unsigned int	bytes_out;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Used for storing a sequence of words.  Usually malloced. */</div><div class='del'>-struct wordlist {</div><div class='del'>-    struct wordlist	*next;</div><div class='del'>-    char		*word;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* An endpoint discriminator, used with multilink. */</div><div class='del'>-#define MAX_ENDP_LEN	20	/* maximum length of discriminator value */</div><div class='del'>-struct epdisc {</div><div class='del'>-    unsigned char	class;</div><div class='del'>-    unsigned char	length;</div><div class='del'>-    unsigned char	value[MAX_ENDP_LEN];</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* values for epdisc.class */</div><div class='del'>-#define EPD_NULL	0	/* null discriminator, no data */</div><div class='del'>-#define EPD_LOCAL	1</div><div class='del'>-#define EPD_IP		2</div><div class='del'>-#define EPD_MAC		3</div><div class='del'>-#define EPD_MAGIC	4</div><div class='del'>-#define EPD_PHONENUM	5</div><div class='del'>-</div><div class='del'>-typedef void (*notify_func) __P((void *, int));</div><div class='del'>-</div><div class='del'>-struct notifier {</div><div class='del'>-    struct notifier *next;</div><div class='del'>-    notify_func	    func;</div><div class='del'>-    void	    *arg;</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Global variables.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int	hungup;		/* Physical layer has disconnected */</div><div class='del'>-extern int	ifunit;		/* Interface unit number */</div><div class='del'>-extern char	ifname[];	/* Interface name */</div><div class='del'>-extern char	hostname[];	/* Our hostname */</div><div class='del'>-extern u_char	outpacket_buf[]; /* Buffer for outgoing packets */</div><div class='del'>-extern int	phase;		/* Current state of link - see values below */</div><div class='del'>-extern int	baud_rate;	/* Current link speed in bits/sec */</div><div class='del'>-extern char	*progname;	/* Name of this program */</div><div class='del'>-extern int	redirect_stderr;/* Connector's stderr should go to file */</div><div class='del'>-extern char	peer_authname[];/* Authenticated name of peer */</div><div class='del'>-extern int	privileged;	/* We were run by real-uid root */</div><div class='del'>-extern int	need_holdoff;	/* Need holdoff period after link terminates */</div><div class='del'>-extern char	**script_env;	/* Environment variables for scripts */</div><div class='del'>-extern int	detached;	/* Have detached from controlling tty */</div><div class='del'>-extern GIDSET_TYPE groups[NGROUPS_MAX];	/* groups the user is in */</div><div class='del'>-extern int	ngroups;	/* How many groups valid in groups */</div><div class='del'>-extern struct pppd_stats link_stats; /* byte/packet counts etc. for link */</div><div class='del'>-extern int	link_stats_valid; /* set if link_stats is valid */</div><div class='del'>-extern int	link_connect_time; /* time the link was up for */</div><div class='del'>-extern int	using_pty;	/* using pty as device (notty or pty opt.) */</div><div class='del'>-extern int	log_to_fd;	/* logging to this fd as well as syslog */</div><div class='del'>-extern bool	log_default;	/* log_to_fd is default (stdout) */</div><div class='del'>-extern char	*no_ppp_msg;	/* message to print if ppp not in kernel */</div><div class='del'>-extern volatile int status;	/* exit status for pppd */</div><div class='del'>-extern bool	devnam_fixed;	/* can no longer change devnam */</div><div class='del'>-extern int	unsuccess;	/* # unsuccessful connection attempts */</div><div class='del'>-extern int	do_callback;	/* set if we want to do callback next */</div><div class='del'>-extern int	doing_callback;	/* set if this is a callback */</div><div class='del'>-extern char	ppp_devnam[MAXPATHLEN];</div><div class='del'>-extern struct notifier *pidchange;   /* for notifications of pid changing */</div><div class='del'>-extern struct notifier *phasechange; /* for notifications of phase changes */</div><div class='del'>-extern struct notifier *exitnotify;  /* for notification that we're exiting */</div><div class='del'>-extern struct notifier *sigreceived; /* notification of received signal */</div><div class='del'>-extern int	listen_time;	/* time to listen first (ms) */</div><div class='del'>-</div><div class='del'>-/* Values for do_callback and doing_callback */</div><div class='del'>-#define CALLBACK_DIALIN		1	/* we are expecting the call back */</div><div class='del'>-#define CALLBACK_DIALOUT	2	/* we are dialling out to call back */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Variables set by command-line options.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int	debug;		/* Debug flag */</div><div class='del'>-extern int	kdebugflag;	/* Tell kernel to print debug messages */</div><div class='del'>-extern int	default_device;	/* Using /dev/tty or equivalent */</div><div class='del'>-extern char	devnam[MAXPATHLEN];	/* Device name */</div><div class='del'>-extern int	crtscts;	/* Use hardware flow control */</div><div class='del'>-extern bool	modem;		/* Use modem control lines */</div><div class='del'>-extern int	inspeed;	/* Input/Output speed requested */</div><div class='del'>-extern u_int32_t netmask;	/* IP netmask to set on interface */</div><div class='del'>-extern bool	lockflag;	/* Create lock file to lock the serial dev */</div><div class='del'>-extern bool	nodetach;	/* Don't detach from controlling tty */</div><div class='del'>-extern bool	updetach;	/* Detach from controlling tty when link up */</div><div class='del'>-extern char	*initializer;	/* Script to initialize physical link */</div><div class='del'>-extern char	*connect_script; /* Script to establish physical link */</div><div class='del'>-extern char	*disconnect_script; /* Script to disestablish physical link */</div><div class='del'>-extern char	*welcomer;	/* Script to welcome client after connection */</div><div class='del'>-extern char	*ptycommand;	/* Command to run on other side of pty */</div><div class='del'>-extern int	maxconnect;	/* Maximum connect time (seconds) */</div><div class='del'>-extern char	user[MAXNAMELEN];/* Our name for authenticating ourselves */</div><div class='del'>-extern char	passwd[MAXSECRETLEN];	/* Password for PAP or CHAP */</div><div class='del'>-extern bool	auth_required;	/* Peer is required to authenticate */</div><div class='del'>-extern bool	persist;	/* Reopen link after it goes down */</div><div class='del'>-extern bool	uselogin;	/* Use /etc/passwd for checking PAP */</div><div class='del'>-extern char	our_name[MAXNAMELEN];/* Our name for authentication purposes */</div><div class='del'>-extern char	remote_name[MAXNAMELEN]; /* Peer's name for authentication */</div><div class='del'>-extern bool	explicit_remote;/* remote_name specified with remotename opt */</div><div class='del'>-extern bool	demand;		/* Do dial-on-demand */</div><div class='del'>-extern char	*ipparam;	/* Extra parameter for ip up/down scripts */</div><div class='del'>-extern bool	cryptpap;	/* Others' PAP passwords are encrypted */</div><div class='del'>-extern int	idle_time_limit;/* Shut down link if idle for this long */</div><div class='del'>-extern int	holdoff;	/* Dead time before restarting */</div><div class='del'>-extern bool	holdoff_specified; /* true if user gave a holdoff value */</div><div class='del'>-extern bool	notty;		/* Stdin/out is not a tty */</div><div class='del'>-extern char	*pty_socket;	/* Socket to connect to pty */</div><div class='del'>-extern char	*record_file;	/* File to record chars sent/received */</div><div class='del'>-extern bool	sync_serial;	/* Device is synchronous serial device */</div><div class='del'>-extern int	maxfail;	/* Max # of unsuccessful connection attempts */</div><div class='del'>-extern char	linkname[MAXPATHLEN]; /* logical name for link */</div><div class='del'>-extern bool	tune_kernel;	/* May alter kernel settings as necessary */</div><div class='del'>-extern int	connect_delay;	/* Time to delay after connect script */</div><div class='del'>-extern int	max_data_rate;	/* max bytes/sec through charshunt */</div><div class='del'>-extern int	req_unit;	/* interface unit number to use */</div><div class='del'>-extern bool	multilink;	/* enable multilink operation */</div><div class='del'>-extern bool	noendpoint;	/* don't send or accept endpt. discrim. */</div><div class='del'>-extern char	*bundle_name;	/* bundle name for multilink */</div><div class='del'>-extern bool	dump_options;	/* print out option values */</div><div class='del'>-extern bool	dryrun;		/* check everything, print options, exit */</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-extern struct	bpf_program pass_filter;   /* Filter for pkts to pass */</div><div class='del'>-extern struct	bpf_program active_filter; /* Filter for link-active pkts */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef MSLANMAN</div><div class='del'>-extern bool	ms_lanman;	/* Use LanMan password instead of NT */</div><div class='del'>-				/* Has meaning only with MS-CHAP challenges */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-extern char *current_option;	/* the name of the option being parsed */</div><div class='del'>-extern int  privileged_option;	/* set iff the current option came from root */</div><div class='del'>-extern char *option_source;	/* string saying where the option came from */</div><div class='del'>-extern int  option_priority;	/* priority of current options */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Values for phase.</div><div class='del'>- */</div><div class='del'>-#define PHASE_DEAD		0</div><div class='del'>-#define PHASE_INITIALIZE	1</div><div class='del'>-#define PHASE_SERIALCONN	2</div><div class='del'>-#define PHASE_DORMANT		3</div><div class='del'>-#define PHASE_ESTABLISH		4</div><div class='del'>-#define PHASE_AUTHENTICATE	5</div><div class='del'>-#define PHASE_CALLBACK		6</div><div class='del'>-#define PHASE_NETWORK		7</div><div class='del'>-#define PHASE_RUNNING		8</div><div class='del'>-#define PHASE_TERMINATE		9</div><div class='del'>-#define PHASE_DISCONNECT	10</div><div class='del'>-#define PHASE_HOLDOFF		11</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * The following struct gives the addresses of procedures to call</div><div class='del'>- * for a particular protocol.</div><div class='del'>- */</div><div class='del'>-struct protent {</div><div class='del'>-    u_short protocol;		/* PPP protocol number */</div><div class='del'>-    /* Initialization procedure */</div><div class='del'>-    void (*init) __P((int unit));</div><div class='del'>-    /* Process a received packet */</div><div class='del'>-    void (*input) __P((int unit, u_char *pkt, int len));</div><div class='del'>-    /* Process a received protocol-reject */</div><div class='del'>-    void (*protrej) __P((int unit));</div><div class='del'>-    /* Lower layer has come up */</div><div class='del'>-    void (*lowerup) __P((int unit));</div><div class='del'>-    /* Lower layer has gone down */</div><div class='del'>-    void (*lowerdown) __P((int unit));</div><div class='del'>-    /* Open the protocol */</div><div class='del'>-    void (*open) __P((int unit));</div><div class='del'>-    /* Close the protocol */</div><div class='del'>-    void (*close) __P((int unit, char *reason));</div><div class='del'>-    /* Print a packet in readable form */</div><div class='del'>-    int  (*printpkt) __P((u_char *pkt, int len,</div><div class='del'>-			  void (*printer) __P((void *, char *, ...)),</div><div class='del'>-			  void *arg));</div><div class='del'>-    /* Process a received data packet */</div><div class='del'>-    void (*datainput) __P((int unit, u_char *pkt, int len));</div><div class='del'>-    bool enabled_flag;		/* 0 iff protocol is disabled */</div><div class='del'>-    char *name;			/* Text name of protocol */</div><div class='del'>-    char *data_name;		/* Text name of corresponding data protocol */</div><div class='del'>-    option_t *options;		/* List of command-line options */</div><div class='del'>-    /* Check requested options, assign defaults */</div><div class='del'>-    void (*check_options) __P((void));</div><div class='del'>-    /* Configure interface for demand-dial */</div><div class='del'>-    int  (*demand_conf) __P((int unit));</div><div class='del'>-    /* Say whether to bring up link for this pkt */</div><div class='del'>-    int  (*active_pkt) __P((u_char *pkt, int len));</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/* Table of pointers to supported protocols */</div><div class='del'>-extern struct protent *protocols[];</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * This struct contains pointers to a set of procedures for</div><div class='del'>- * doing operations on a "channel".  A channel provides a way</div><div class='del'>- * to send and receive PPP packets - the canonical example is</div><div class='del'>- * a serial port device in PPP line discipline (or equivalently</div><div class='del'>- * with PPP STREAMS modules pushed onto it).</div><div class='del'>- */</div><div class='del'>-struct channel {</div><div class='del'>-	/* set of options for this channel */</div><div class='del'>-	option_t *options;</div><div class='del'>-	/* find and process a per-channel options file */</div><div class='del'>-	void (*process_extra_options) __P((void));</div><div class='del'>-	/* check all the options that have been given */</div><div class='del'>-	void (*check_options) __P((void));</div><div class='del'>-	/* get the channel ready to do PPP, return a file descriptor */</div><div class='del'>-	int  (*connect) __P((void));</div><div class='del'>-	/* we're finished with the channel */</div><div class='del'>-	void (*disconnect) __P((void));</div><div class='del'>-	/* put the channel into PPP `mode' */</div><div class='del'>-	int  (*establish_ppp) __P((int));</div><div class='del'>-	/* take the channel out of PPP `mode', restore loopback if demand */</div><div class='del'>-	void (*disestablish_ppp) __P((int));</div><div class='del'>-	/* set the transmit-side PPP parameters of the channel */</div><div class='del'>-	void (*send_config) __P((int, u_int32_t, int, int));</div><div class='del'>-	/* set the receive-side PPP parameters of the channel */</div><div class='del'>-	void (*recv_config) __P((int, u_int32_t, int, int));</div><div class='del'>-	/* cleanup on error or normal exit */</div><div class='del'>-	void (*cleanup) __P((void));</div><div class='del'>-	/* close the device, called in children after fork */</div><div class='del'>-	void (*close) __P((void));</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-extern struct channel *the_channel;</div><div class='del'>-</div><div class='del'>-#define ppp_send_config(unit, mtu, accm, pc, acc)			 \</div><div class='del'>-do {									 \</div><div class='del'>-	if (the_channel-&gt;send_config)					 \</div><div class='del'>-		(*the_channel-&gt;send_config)((mtu), (accm), (pc), (acc)); \</div><div class='del'>-} while (0)</div><div class='del'>-</div><div class='del'>-#define ppp_recv_config(unit, mtu, accm, pc, acc)			 \</div><div class='del'>-do {									 \</div><div class='del'>-	if (the_channel-&gt;send_config)					 \</div><div class='del'>-		(*the_channel-&gt;recv_config)((mtu), (accm), (pc), (acc)); \</div><div class='del'>-} while (0)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Prototypes.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from main.c. */</div><div class='del'>-void set_ifunit __P((int));	/* set stuff that depends on ifunit */</div><div class='del'>-void detach __P((void));	/* Detach from controlling tty */</div><div class='del'>-void die __P((int));		/* Cleanup and exit */</div><div class='del'>-void quit __P((void));		/* like die(1) */</div><div class='del'>-void novm __P((char *));	/* Say we ran out of memory, and die */</div><div class='del'>-void timeout __P((void (*func)(void *), void *arg, int s, int us));</div><div class='del'>-				/* Call func(arg) after s.us seconds */</div><div class='del'>-void untimeout __P((void (*func)(void *), void *arg));</div><div class='del'>-				/* Cancel call to func(arg) */</div><div class='del'>-void record_child __P((int, char *, void (*) (void *), void *));</div><div class='del'>-int  device_script __P((char *cmd, int in, int out, int dont_wait));</div><div class='del'>-				/* Run `cmd' with given stdin and stdout */</div><div class='del'>-pid_t run_program __P((char *prog, char **args, int must_exist,</div><div class='del'>-		       void (*done)(void *), void *arg));</div><div class='del'>-				/* Run program prog with args in child */</div><div class='del'>-void reopen_log __P((void));	/* (re)open the connection to syslog */</div><div class='del'>-void update_link_stats __P((int)); /* Get stats at link termination */</div><div class='del'>-void script_setenv __P((char *, char *, int));	/* set script env var */</div><div class='del'>-void script_unsetenv __P((char *));		/* unset script env var */</div><div class='del'>-void new_phase __P((int));	/* signal start of new phase */</div><div class='del'>-void add_notifier __P((struct notifier **, notify_func, void *));</div><div class='del'>-void remove_notifier __P((struct notifier **, notify_func, void *));</div><div class='del'>-void notify __P((struct notifier *, int));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from tty.c. */</div><div class='del'>-void tty_init __P((void));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from utils.c. */</div><div class='del'>-void log_packet __P((u_char *, int, char *, int));</div><div class='del'>-				/* Format a packet and log it with syslog */</div><div class='del'>-void print_string __P((char *, int,  void (*) (void *, char *, ...),</div><div class='del'>-		void *));	/* Format a string for output */</div><div class='del'>-int slprintf __P((char *, int, char *, ...));		/* sprintf++ */</div><div class='del'>-int vslprintf __P((char *, int, char *, va_list));	/* vsprintf++ */</div><div class='del'>-size_t strlcpy __P((char *, const char *, size_t));	/* safe strcpy */</div><div class='del'>-size_t strlcat __P((char *, const char *, size_t));	/* safe strncpy */</div><div class='del'>-void dbglog __P((char *, ...));	/* log a debug message */</div><div class='del'>-void info __P((char *, ...));	/* log an informational message */</div><div class='del'>-void notice __P((char *, ...));	/* log a notice-level message */</div><div class='del'>-void warn __P((char *, ...));	/* log a warning message */</div><div class='del'>-void error __P((char *, ...));	/* log an error message */</div><div class='del'>-void fatal __P((char *, ...));	/* log an error message and die(1) */</div><div class='del'>-void init_pr_log __P((char *, int));	/* initialize for using pr_log */</div><div class='del'>-void pr_log __P((void *, char *, ...));	/* printer fn, output to syslog */</div><div class='del'>-void end_pr_log __P((void));	/* finish up after using pr_log */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from auth.c */</div><div class='del'>-void link_required __P((int));	  /* we are starting to use the link */</div><div class='del'>-void link_terminated __P((int));  /* we are finished with the link */</div><div class='del'>-void link_down __P((int));	  /* the LCP layer has left the Opened state */</div><div class='del'>-void link_established __P((int)); /* the link is up; authenticate now */</div><div class='del'>-void start_networks __P((void));  /* start all the network control protos */</div><div class='del'>-void np_up __P((int, int));	  /* a network protocol has come up */</div><div class='del'>-void np_down __P((int, int));	  /* a network protocol has gone down */</div><div class='del'>-void np_finished __P((int, int)); /* a network protocol no longer needs link */</div><div class='del'>-void auth_peer_fail __P((int, int));</div><div class='del'>-				/* peer failed to authenticate itself */</div><div class='del'>-void auth_peer_success __P((int, int, char *, int));</div><div class='del'>-				/* peer successfully authenticated itself */</div><div class='del'>-void auth_withpeer_fail __P((int, int));</div><div class='del'>-				/* we failed to authenticate ourselves */</div><div class='del'>-void auth_withpeer_success __P((int, int));</div><div class='del'>-				/* we successfully authenticated ourselves */</div><div class='del'>-void auth_check_options __P((void));</div><div class='del'>-				/* check authentication options supplied */</div><div class='del'>-void auth_reset __P((int));	/* check what secrets we have */</div><div class='del'>-int  check_passwd __P((int, char *, int, char *, int, char **));</div><div class='del'>-				/* Check peer-supplied username/password */</div><div class='del'>-int  get_secret __P((int, char *, char *, char *, int *, int));</div><div class='del'>-				/* get "secret" for chap */</div><div class='del'>-int  auth_ip_addr __P((int, u_int32_t));</div><div class='del'>-				/* check if IP address is authorized */</div><div class='del'>-int  bad_ip_adrs __P((u_int32_t));</div><div class='del'>-				/* check if IP address is unreasonable */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from demand.c */</div><div class='del'>-void demand_conf __P((void));	/* config interface(s) for demand-dial */</div><div class='del'>-void demand_block __P((void));	/* set all NPs to queue up packets */</div><div class='del'>-void demand_unblock __P((void)); /* set all NPs to pass packets */</div><div class='del'>-void demand_discard __P((void)); /* set all NPs to discard packets */</div><div class='del'>-void demand_rexmit __P((int));	/* retransmit saved frames for an NP */</div><div class='del'>-int  loop_chars __P((unsigned char *, int)); /* process chars from loopback */</div><div class='del'>-int  loop_frame __P((unsigned char *, int)); /* should we bring link up? */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from multilink.c */</div><div class='del'>-void mp_check_options __P((void)); /* Check multilink-related options */</div><div class='del'>-int  mp_join_bundle __P((void));  /* join our link to an appropriate bundle */</div><div class='del'>-char *epdisc_to_str __P((struct epdisc *)); /* string from endpoint discrim. */</div><div class='del'>-int  str_to_epdisc __P((struct epdisc *, char *)); /* endpt disc. from str */</div><div class='del'>-</div><div class='del'>-/* Procedures exported from sys-*.c */</div><div class='del'>-void sys_init __P((void));	/* Do system-dependent initialization */</div><div class='del'>-void sys_cleanup __P((void));	/* Restore system state before exiting */</div><div class='del'>-int  sys_check_options __P((void)); /* Check options specified */</div><div class='del'>-void sys_close __P((void));	/* Clean up in a child before execing */</div><div class='del'>-int  ppp_available __P((void));	/* Test whether ppp kernel support exists */</div><div class='del'>-int  get_pty __P((int *, int *, char *, int));	/* Get pty master/slave */</div><div class='del'>-int  open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */</div><div class='del'>-int  tty_establish_ppp __P((int));  /* Turn serial port into a ppp interface */</div><div class='del'>-void tty_disestablish_ppp __P((int)); /* Restore port to normal operation */</div><div class='del'>-void make_new_bundle __P((int, int, int, int)); /* Create new bundle */</div><div class='del'>-int  bundle_attach __P((int));	/* Attach link to existing bundle */</div><div class='del'>-void cfg_bundle __P((int, int, int, int)); /* Configure existing bundle */</div><div class='del'>-void clean_check __P((void));	/* Check if line was 8-bit clean */</div><div class='del'>-void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */</div><div class='del'>-void restore_tty __P((int));	/* Restore port's original parameters */</div><div class='del'>-void setdtr __P((int, int));	/* Raise or lower port's DTR line */</div><div class='del'>-void output __P((int, u_char *, int)); /* Output a PPP packet */</div><div class='del'>-void wait_input __P((struct timeval *));</div><div class='del'>-				/* Wait for input, with timeout */</div><div class='del'>-void add_fd __P((int));		/* Add fd to set to wait for */</div><div class='del'>-void remove_fd __P((int));	/* Remove fd from set to wait for */</div><div class='del'>-int  read_packet __P((u_char *)); /* Read PPP packet */</div><div class='del'>-int  get_loop_output __P((void)); /* Read pkts from loopback */</div><div class='del'>-void tty_send_config __P((int, u_int32_t, int, int));</div><div class='del'>-				/* Configure i/f transmit parameters */</div><div class='del'>-void tty_set_xaccm __P((ext_accm));</div><div class='del'>-				/* Set extended transmit ACCM */</div><div class='del'>-void tty_recv_config __P((int, u_int32_t, int, int));</div><div class='del'>-				/* Configure i/f receive parameters */</div><div class='del'>-int  ccp_test __P((int, u_char *, int, int));</div><div class='del'>-				/* Test support for compression scheme */</div><div class='del'>-void ccp_flags_set __P((int, int, int));</div><div class='del'>-				/* Set kernel CCP state */</div><div class='del'>-int  ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */</div><div class='del'>-int  get_idle_time __P((int, struct ppp_idle *));</div><div class='del'>-				/* Find out how long link has been idle */</div><div class='del'>-int  get_ppp_stats __P((int, struct pppd_stats *));</div><div class='del'>-				/* Return link statistics */</div><div class='del'>-void netif_set_mtu __P((int, int)); /* Set PPP interface MTU */</div><div class='del'>-int  sifvjcomp __P((int, int, int, int));</div><div class='del'>-				/* Configure VJ TCP header compression */</div><div class='del'>-int  sifup __P((int));		/* Configure i/f up for one protocol */</div><div class='del'>-int  sifnpmode __P((int u, int proto, enum NPmode mode));</div><div class='del'>-				/* Set mode for handling packets for proto */</div><div class='del'>-int  sifdown __P((int));	/* Configure i/f down for one protocol */</div><div class='del'>-int  sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));</div><div class='del'>-				/* Configure IPv4 addresses for i/f */</div><div class='del'>-int  cifaddr __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Reset i/f IP addresses */</div><div class='del'>-#ifdef INET6</div><div class='del'>-int  sif6addr __P((int, eui64_t, eui64_t));</div><div class='del'>-				/* Configure IPv6 addresses for i/f */</div><div class='del'>-int  cif6addr __P((int, eui64_t, eui64_t));</div><div class='del'>-				/* Remove an IPv6 address from i/f */</div><div class='del'>-#endif</div><div class='del'>-int  sifdefaultroute __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Create default route through i/f */</div><div class='del'>-int  cifdefaultroute __P((int, u_int32_t, u_int32_t));</div><div class='del'>-				/* Delete default route through i/f */</div><div class='del'>-int  sifproxyarp __P((int, u_int32_t));</div><div class='del'>-				/* Add proxy ARP entry for peer */</div><div class='del'>-int  cifproxyarp __P((int, u_int32_t));</div><div class='del'>-				/* Delete proxy ARP entry for peer */</div><div class='del'>-u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */</div><div class='del'>-int  lock __P((char *));	/* Create lock file for device */</div><div class='del'>-int  relock __P((int));		/* Rewrite lock file with new pid */</div><div class='del'>-void unlock __P((void));	/* Delete previously-created lock file */</div><div class='del'>-void logwtmp __P((const char *, const char *, const char *));</div><div class='del'>-				/* Write entry to wtmp file */</div><div class='del'>-int  get_host_seed __P((void));	/* Get host-dependent random number seed */</div><div class='del'>-int  have_route_to __P((u_int32_t)); /* Check if route to addr exists */</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-int  set_filters __P((struct bpf_program *pass, struct bpf_program *active));</div><div class='del'>-				/* Set filter programs in kernel */</div><div class='del'>-#endif</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-int  sipxfaddr __P((int, unsigned long, unsigned char *));</div><div class='del'>-int  cipxfaddr __P((int));</div><div class='del'>-#endif</div><div class='del'>-int  get_if_hwaddr __P((u_char *addr, char *name));</div><div class='del'>-char *get_first_ethernet __P((void));</div><div class='del'>-</div><div class='del'>-/* Procedures exported from options.c */</div><div class='del'>-int  parse_args __P((int argc, char **argv));</div><div class='del'>-				/* Parse options from arguments given */</div><div class='del'>-int  options_from_file __P((char *filename, int must_exist, int check_prot,</div><div class='del'>-			    int privileged));</div><div class='del'>-				/* Parse options from an options file */</div><div class='del'>-int  options_from_user __P((void)); /* Parse options from user's .ppprc */</div><div class='del'>-int  options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */</div><div class='del'>-int  options_from_list __P((struct wordlist *, int privileged));</div><div class='del'>-				/* Parse options from a wordlist */</div><div class='del'>-int  getword __P((FILE *f, char *word, int *newlinep, char *filename));</div><div class='del'>-				/* Read a word from a file */</div><div class='del'>-void option_error __P((char *fmt, ...));</div><div class='del'>-				/* Print an error message about an option */</div><div class='del'>-int int_option __P((char *, int *));</div><div class='del'>-				/* Simplified number_option for decimal ints */</div><div class='del'>-void add_options __P((option_t *)); /* Add extra options */</div><div class='del'>-void check_options __P((void));	/* check values after all options parsed */</div><div class='del'>-int  override_value __P((const char *, int, const char *));</div><div class='del'>-				/* override value if permitted by priority */</div><div class='del'>-void print_options __P((void (*) __P((void *, char *, ...)), void *));</div><div class='del'>-				/* print out values of all options */</div><div class='del'>-</div><div class='del'>-int parse_dotted_ip __P((char *, u_int32_t *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Hooks to enable plugins to change various things.</div><div class='del'>- */</div><div class='del'>-extern int (*new_phase_hook) __P((int));</div><div class='del'>-extern int (*idle_time_hook) __P((struct ppp_idle *));</div><div class='del'>-extern int (*holdoff_hook) __P((void));</div><div class='del'>-extern int (*pap_check_hook) __P((void));</div><div class='del'>-extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,</div><div class='del'>-				 struct wordlist **paddrs,</div><div class='del'>-				 struct wordlist **popts));</div><div class='del'>-extern void (*pap_logout_hook) __P((void));</div><div class='del'>-extern int (*pap_passwd_hook) __P((char *user, char *passwd));</div><div class='del'>-extern void (*ip_up_hook) __P((void));</div><div class='del'>-extern void (*ip_down_hook) __P((void));</div><div class='del'>-extern void (*ip_choose_hook) __P((u_int32_t *));</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Inline versions of get/put char/short/long.</div><div class='del'>- * Pointer is advanced; we assume that both arguments</div><div class='del'>- * are lvalues and will already be in registers.</div><div class='del'>- * cp MUST be u_char *.</div><div class='del'>- */</div><div class='del'>-#define GETCHAR(c, cp) { \</div><div class='del'>-	(c) = *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTCHAR(c, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) (c); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define GETSHORT(s, cp) { \</div><div class='del'>-	(s) = *(cp)++ &lt;&lt; 8; \</div><div class='del'>-	(s) |= *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTSHORT(s, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) ((s) &gt;&gt; 8); \</div><div class='del'>-	*(cp)++ = (u_char) (s); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define GETLONG(l, cp) { \</div><div class='del'>-	(l) = *(cp)++ &lt;&lt; 8; \</div><div class='del'>-	(l) |= *(cp)++; (l) &lt;&lt;= 8; \</div><div class='del'>-	(l) |= *(cp)++; (l) &lt;&lt;= 8; \</div><div class='del'>-	(l) |= *(cp)++; \</div><div class='del'>-}</div><div class='del'>-#define PUTLONG(l, cp) { \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 24); \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 16); \</div><div class='del'>-	*(cp)++ = (u_char) ((l) &gt;&gt; 8); \</div><div class='del'>-	*(cp)++ = (u_char) (l); \</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define INCPTR(n, cp)	((cp) += (n))</div><div class='del'>-#define DECPTR(n, cp)	((cp) -= (n))</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * System dependent definitions for user-level 4.3BSD UNIX implementation.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define TIMEOUT(r, f, t)	timeout((r), (f), (t), 0)</div><div class='del'>-#define UNTIMEOUT(r, f)		untimeout((r), (f))</div><div class='del'>-</div><div class='del'>-#define BCOPY(s, d, l)		memcpy(d, s, l)</div><div class='del'>-#define BZERO(s, n)		memset(s, 0, n)</div><div class='del'>-</div><div class='del'>-#define PRINTMSG(m, l)		{ info("Remote message: %0.*v", l, m); }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * MAKEHEADER - Add Header fields to a packet.</div><div class='del'>- */</div><div class='del'>-#define MAKEHEADER(p, t) { \</div><div class='del'>-    PUTCHAR(PPP_ALLSTATIONS, p); \</div><div class='del'>-    PUTCHAR(PPP_UI, p); \</div><div class='del'>-    PUTSHORT(t, p); }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Exit status values.</div><div class='del'>- */</div><div class='del'>-#define EXIT_OK			0</div><div class='del'>-#define EXIT_FATAL_ERROR	1</div><div class='del'>-#define EXIT_OPTION_ERROR	2</div><div class='del'>-#define EXIT_NOT_ROOT		3</div><div class='del'>-#define EXIT_NO_KERNEL_SUPPORT	4</div><div class='del'>-#define EXIT_USER_REQUEST	5</div><div class='del'>-#define EXIT_LOCK_FAILED	6</div><div class='del'>-#define EXIT_OPEN_FAILED	7</div><div class='del'>-#define EXIT_CONNECT_FAILED	8</div><div class='del'>-#define EXIT_PTYCMD_FAILED	9</div><div class='del'>-#define EXIT_NEGOTIATION_FAILED	10</div><div class='del'>-#define EXIT_PEER_AUTH_FAILED	11</div><div class='del'>-#define EXIT_IDLE_TIMEOUT	12</div><div class='del'>-#define EXIT_CONNECT_TIME	13</div><div class='del'>-#define EXIT_CALLBACK		14</div><div class='del'>-#define EXIT_PEER_DEAD		15</div><div class='del'>-#define EXIT_HANGUP		16</div><div class='del'>-#define EXIT_LOOPBACK		17</div><div class='del'>-#define EXIT_INIT_FAILED	18</div><div class='del'>-#define EXIT_AUTH_TOPEER_FAILED	19</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Debug macros.  Slightly useful for finding bugs in pppd, not particularly</div><div class='del'>- * useful for finding out why your connection isn't being established.</div><div class='del'>- */</div><div class='del'>-#ifdef DEBUGALL</div><div class='del'>-#define DEBUGMAIN	1</div><div class='del'>-#define DEBUGFSM	1</div><div class='del'>-#define DEBUGLCP	1</div><div class='del'>-#define DEBUGIPCP	1</div><div class='del'>-#define DEBUGIPV6CP	1</div><div class='del'>-#define DEBUGUPAP	1</div><div class='del'>-#define DEBUGCHAP	1</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef LOG_PPP			/* we use LOG_LOCAL2 for syslog by default */</div><div class='del'>-#if defined(DEBUGMAIN) || defined(DEBUGFSM) || defined(DEBUGSYS) \</div><div class='del'>-  || defined(DEBUGLCP) || defined(DEBUGIPCP) || defined(DEBUGUPAP) \</div><div class='del'>-  || defined(DEBUGCHAP) || defined(DEBUG) || defined(DEBUGIPV6CP)</div><div class='del'>-#define LOG_PPP LOG_LOCAL2</div><div class='del'>-#else</div><div class='del'>-#define LOG_PPP LOG_DAEMON</div><div class='del'>-#endif</div><div class='del'>-#endif /* LOG_PPP */</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGMAIN</div><div class='del'>-#define MAINDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define MAINDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGSYS</div><div class='del'>-#define SYSDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define SYSDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGFSM</div><div class='del'>-#define FSMDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define FSMDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGLCP</div><div class='del'>-#define LCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define LCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPCP</div><div class='del'>-#define IPCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPV6CP</div><div class='del'>-#define IPV6CPDEBUG(x)  if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPV6CPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGUPAP</div><div class='del'>-#define UPAPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define UPAPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGCHAP</div><div class='del'>-#define CHAPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define CHAPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef DEBUGIPXCP</div><div class='del'>-#define IPXCPDEBUG(x)	if (debug) dbglog x</div><div class='del'>-#else</div><div class='del'>-#define IPXCPDEBUG(x)</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifndef SIGTYPE</div><div class='del'>-#if defined(sun) || defined(SYSV) || defined(POSIX_SOURCE)</div><div class='del'>-#define SIGTYPE void</div><div class='del'>-#else</div><div class='del'>-#define SIGTYPE int</div><div class='del'>-#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */</div><div class='del'>-#endif /* SIGTYPE */</div><div class='del'>-</div><div class='del'>-#ifndef MIN</div><div class='del'>-#define MIN(a, b)	((a) &lt; (b)? (a): (b))</div><div class='del'>-#endif</div><div class='del'>-#ifndef MAX</div><div class='del'>-#define MAX(a, b)	((a) &gt; (b)? (a): (b))</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#endif /* __PPP_H__ */</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/sys-linux.c b/mdk-stage1/ppp/pppd/sys-linux.c<br/>deleted file mode 100644<br/>index d341bb3de..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/sys-linux.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/sys-linux.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2672 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * sys-linux.c - System-dependent procedures for setting up</div><div class='del'>- * PPP interfaces on Linux systems</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-#include &lt;sys/file.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-#include &lt;sys/sysmacros.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;memory.h&gt;</div><div class='del'>-#include &lt;utmp.h&gt;</div><div class='del'>-#include &lt;mntent.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/* This is in netdevice.h. However, this compile will fail miserably if</div><div class='del'>-   you attempt to include netdevice.h because it has so many references</div><div class='del'>-   to __memcpy functions which it should not attempt to do. So, since I</div><div class='del'>-   really don't use it, but it must be defined, define it now. */</div><div class='del'>-</div><div class='del'>-#ifndef MAX_ADDR_LEN</div><div class='del'>-#define MAX_ADDR_LEN 7</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if __GLIBC__ &gt;= 2</div><div class='del'>-#include &lt;asm/types.h&gt;		/* glibc 2 conflicts with linux/types.h */</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/if_arp.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;netinet/if_ether.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-#include &lt;linux/if_arp.h&gt;</div><div class='del'>-#include &lt;linux/route.h&gt;</div><div class='del'>-#include &lt;linux/if_ether.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/ppp_defs.h&gt;</div><div class='del'>-#include &lt;linux/if_ppp.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-#include "ipxcp.h"</div><div class='del'>-#if __GLIBC__ &gt;= 2 &amp;&amp; \</div><div class='del'>-    !(defined(__powerpc__) &amp;&amp; __GLIBC__ == 2 &amp;&amp; __GLIBC_MINOR__ == 0)</div><div class='del'>-#include &lt;netipx/ipx.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;linux/ipx.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif /* IPX_CHANGE */</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-#include &lt;net/bpf.h&gt;</div><div class='del'>-#include &lt;linux/filter.h&gt;</div><div class='del'>-#endif /* PPP_FILTER */</div><div class='del'>-</div><div class='del'>-#ifdef LOCKLIB</div><div class='del'>-#include &lt;sys/locks.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-#ifndef _LINUX_IN6_H</div><div class='del'>-/*</div><div class='del'>- *    This is in linux/include/net/ipv6.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct in6_ifreq {</div><div class='del'>-    struct in6_addr ifr6_addr;</div><div class='del'>-    __u32 ifr6_prefixlen;</div><div class='del'>-    unsigned int ifr6_ifindex;</div><div class='del'>-};</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define IN6_LLADDR_FROM_EUI64(sin6, eui64) do {			\</div><div class='del'>-	memset(&amp;sin6.s6_addr, 0, sizeof(struct in6_addr));	\</div><div class='del'>-	sin6.s6_addr16[0] = htons(0xfe80); 			\</div><div class='del'>-	eui64_copy(eui64, sin6.s6_addr32[2]);			\</div><div class='del'>-	} while (0)</div><div class='del'>-</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-</div><div class='del'>-/* We can get an EIO error on an ioctl if the modem has hung up */</div><div class='del'>-#define ok_error(num) ((num)==EIO)</div><div class='del'>-</div><div class='del'>-static int tty_disc = N_TTY;	/* The TTY discipline */</div><div class='del'>-static int ppp_disc = N_PPP;	/* The PPP discpline */</div><div class='del'>-static int initfdflags = -1;	/* Initial file descriptor flags for fd */</div><div class='del'>-static int ppp_fd = -1;		/* fd which is set to PPP discipline */</div><div class='del'>-static int sock_fd = -1;	/* socket for doing interface ioctls */</div><div class='del'>-static int slave_fd = -1;</div><div class='del'>-static int master_fd = -1;</div><div class='del'>-#ifdef INET6</div><div class='del'>-static int sock6_fd = -1;</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-static int ppp_dev_fd = -1;	/* fd for /dev/ppp (new style driver) */</div><div class='del'>-static int chindex;		/* channel index (new style driver) */</div><div class='del'>-</div><div class='del'>-static fd_set in_fds;		/* set of fds that wait_input waits for */</div><div class='del'>-static int max_in_fd;		/* highest fd set in in_fds */</div><div class='del'>-</div><div class='del'>-static int has_proxy_arp       = 0;</div><div class='del'>-static int driver_version      = 0;</div><div class='del'>-static int driver_modification = 0;</div><div class='del'>-static int driver_patch        = 0;</div><div class='del'>-static int driver_is_old       = 0;</div><div class='del'>-static int restore_term        = 0;	/* 1 =&gt; we've munged the terminal */</div><div class='del'>-static struct termios inittermios;	/* Initial TTY termios */</div><div class='del'>-</div><div class='del'>-static int new_style_driver = 0;</div><div class='del'>-</div><div class='del'>-static char loop_name[20];</div><div class='del'>-static unsigned char inbuf[512]; /* buffer for chars read from loopback */</div><div class='del'>-</div><div class='del'>-static int	if_is_up;	/* Interface has been marked up */</div><div class='del'>-static u_int32_t default_route_gateway;	/* Gateway for default route added */</div><div class='del'>-static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */</div><div class='del'>-static char proxy_arp_dev[16];		/* Device for proxy arp entry */</div><div class='del'>-static u_int32_t our_old_addr;		/* for detecting address changes */</div><div class='del'>-static int	dynaddr_set;		/* 1 if ip_dynaddr set */</div><div class='del'>-static int	looped;			/* 1 if using loop */</div><div class='del'>-static int	link_mtu;		/* mtu for the link (not bundle) */</div><div class='del'>-</div><div class='del'>-static struct utsname utsname;	/* for the kernel version */</div><div class='del'>-static int kernel_version;</div><div class='del'>-#define KVERSION(j,n,p)	((j)*1000000 + (n)*1000 + (p))</div><div class='del'>-</div><div class='del'>-#define MAX_IFS		100</div><div class='del'>-</div><div class='del'>-#define FLAGS_GOOD (IFF_UP          | IFF_BROADCAST)</div><div class='del'>-#define FLAGS_MASK (IFF_UP          | IFF_BROADCAST | \</div><div class='del'>-		    IFF_POINTOPOINT | IFF_LOOPBACK  | IFF_NOARP)</div><div class='del'>-</div><div class='del'>-#define SIN_ADDR(x)	(((struct sockaddr_in *) (&amp;(x)))-&gt;sin_addr.s_addr)</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-static int get_flags (int fd);</div><div class='del'>-static void set_flags (int fd, int flags);</div><div class='del'>-static int translate_speed (int bps);</div><div class='del'>-static int baud_rate_of (int speed);</div><div class='del'>-static void close_route_table (void);</div><div class='del'>-static int open_route_table (void);</div><div class='del'>-static int read_route_table (struct rtentry *rt);</div><div class='del'>-static int defaultroute_exists (struct rtentry *rt);</div><div class='del'>-static int get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr,</div><div class='del'>-			   char *name, int namelen);</div><div class='del'>-static void decode_version (char *buf, int *version, int *mod, int *patch);</div><div class='del'>-static int set_kdebugflag(int level);</div><div class='del'>-static int ppp_registered(void);</div><div class='del'>-static int make_ppp_unit(void);</div><div class='del'>-static void restore_loop(void);	/* Transfer ppp unit back to loopback */</div><div class='del'>-</div><div class='del'>-extern u_char	inpacket_buf[];	/* borrowed from main.c */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * SET_SA_FAMILY - set the sa_family field of a struct sockaddr,</div><div class='del'>- * if it exists.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define SET_SA_FAMILY(addr, family)			\</div><div class='del'>-    memset ((char *) &amp;(addr), '\0', sizeof(addr));	\</div><div class='del'>-    addr.sa_family = (family);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Determine if the PPP connection should still be present.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int hungup;</div><div class='del'>-</div><div class='del'>-/* new_fd is the fd of a tty */</div><div class='del'>-static void set_ppp_fd (int new_fd)</div><div class='del'>-{</div><div class='del'>-	SYSDEBUG ((LOG_DEBUG, "setting ppp_fd to %d\n", new_fd));</div><div class='del'>-	ppp_fd = new_fd;</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		ppp_dev_fd = new_fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int still_ppp(void)</div><div class='del'>-{</div><div class='del'>-	if (new_style_driver)</div><div class='del'>-		return !hungup &amp;&amp; ppp_fd &gt;= 0;</div><div class='del'>-	if (!hungup || ppp_fd == slave_fd)</div><div class='del'>-		return 1;</div><div class='del'>-	if (slave_fd &gt;= 0) {</div><div class='del'>-		set_ppp_fd(slave_fd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Functions to read and set the flags value in the device driver</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int get_flags (int fd)</div><div class='del'>-{    </div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    if (ioctl(fd, PPPIOCGFLAGS, (caddr_t) &amp;flags) &lt; 0) {</div><div class='del'>-	if ( ok_error (errno) )</div><div class='del'>-	    flags = 0;</div><div class='del'>-	else</div><div class='del'>-	    fatal("ioctl(PPPIOCGFLAGS): %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "get flags = %x\n", flags));</div><div class='del'>-    return flags;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************/</div><div class='del'>-</div><div class='del'>-static void set_flags (int fd, int flags)</div><div class='del'>-{    </div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "set flags = %x\n", flags));</div><div class='del'>-</div><div class='del'>-    if (ioctl(fd, PPPIOCSFLAGS, (caddr_t) &amp;flags) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno) )</div><div class='del'>-	    fatal("ioctl(PPPIOCSFLAGS, %x): %m", flags, errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_init - System-dependent initialization.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void sys_init(void)</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	ppp_dev_fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	if (ppp_dev_fd &lt; 0)</div><div class='del'>-	    fatal("Couldn't open /dev/ppp: %m");</div><div class='del'>-	flags = fcntl(ppp_dev_fd, F_GETFL);</div><div class='del'>-	if (flags == -1</div><div class='del'>-	    || fcntl(ppp_dev_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	    warn("Couldn't set /dev/ppp to nonblock: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Get an internet socket for doing socket ioctls. */</div><div class='del'>-    sock_fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (sock_fd &lt; 0)</div><div class='del'>-	fatal("Couldn't create IP socket: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-    sock6_fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (sock6_fd &lt; 0)</div><div class='del'>-	sock6_fd = -errno;	/* save errno for later */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    FD_ZERO(&amp;in_fds);</div><div class='del'>-    max_in_fd = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_cleanup - restore any system state we modified before exiting:</div><div class='del'>- * mark the interface down, delete default route and/or proxy arp entry.</div><div class='del'>- * This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void sys_cleanup(void)</div><div class='del'>-{</div><div class='del'>-/*</div><div class='del'>- * Take down the device</div><div class='del'>- */</div><div class='del'>-    if (if_is_up) {</div><div class='del'>-	if_is_up = 0;</div><div class='del'>-	sifdown(0);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Delete any routes through the device.</div><div class='del'>- */</div><div class='del'>-    if (default_route_gateway != 0)</div><div class='del'>-	cifdefaultroute(0, 0, default_route_gateway);</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp)</div><div class='del'>-	cifproxyarp(0, proxy_arp_addr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_close - Clean up in a child process before execing.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_close(void)</div><div class='del'>-{</div><div class='del'>-    if (new_style_driver)</div><div class='del'>-	close(ppp_dev_fd);</div><div class='del'>-    if (sock_fd &gt;= 0)</div><div class='del'>-	close(sock_fd);</div><div class='del'>-    if (slave_fd &gt;= 0)</div><div class='del'>-	close(slave_fd);</div><div class='del'>-    if (master_fd &gt;= 0)</div><div class='del'>-	close(master_fd);</div><div class='del'>-    closelog();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * set_kdebugflag - Define the debugging level for the kernel</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int set_kdebugflag (int requested_level)</div><div class='del'>-{</div><div class='del'>-    if (new_style_driver &amp;&amp; ifunit &lt; 0)</div><div class='del'>-	return 1;</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSDEBUG, &amp;requested_level) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno) )</div><div class='del'>-	    error("ioctl(PPPIOCSDEBUG): %m");</div><div class='del'>-	return (0);</div><div class='del'>-    }</div><div class='del'>-    SYSDEBUG ((LOG_INFO, "set kernel debugging level to %d",</div><div class='del'>-		requested_level));</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_establish_ppp - Turn the serial port into a ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int tty_establish_ppp (int tty_fd)</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    int fd = -1;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ensure that the tty device is in exclusive mode.</div><div class='del'>- */</div><div class='del'>-    if (ioctl(tty_fd, TIOCEXCL, 0) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    warn("Couldn't make tty exclusive: %m");</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Demand mode - prime the old ppp device to relinquish the unit.</div><div class='del'>- */</div><div class='del'>-    if (!new_style_driver &amp;&amp; looped</div><div class='del'>-	&amp;&amp; ioctl(slave_fd, PPPIOCXFERUNIT, 0) &lt; 0) {</div><div class='del'>-	error("ioctl(transfer ppp unit): %m");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Set the current tty to the PPP discpline</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef N_SYNC_PPP</div><div class='del'>-#define N_SYNC_PPP 14</div><div class='del'>-#endif</div><div class='del'>-    ppp_disc = (new_style_driver &amp;&amp; sync_serial)? N_SYNC_PPP: N_PPP;</div><div class='del'>-    if (ioctl(tty_fd, TIOCSETD, &amp;ppp_disc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno) ) {</div><div class='del'>-	    error("Couldn't set tty to PPP discipline: %m");</div><div class='del'>-	    return -1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	/* Open another instance of /dev/ppp and connect the channel to it */</div><div class='del'>-	int flags;</div><div class='del'>-</div><div class='del'>-	if (ioctl(tty_fd, PPPIOCGCHAN, &amp;chindex) == -1) {</div><div class='del'>-	    error("Couldn't get channel number: %m");</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	dbglog("using channel %d", chindex);</div><div class='del'>-	fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	if (fd &lt; 0) {</div><div class='del'>-	    error("Couldn't reopen /dev/ppp: %m");</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(fd, PPPIOCATTCHAN, &amp;chindex) &lt; 0) {</div><div class='del'>-	    error("Couldn't attach to channel %d: %m", chindex);</div><div class='del'>-	    goto err_close;</div><div class='del'>-	}</div><div class='del'>-	flags = fcntl(fd, F_GETFL);</div><div class='del'>-	if (flags == -1 || fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	    warn("Couldn't set /dev/ppp (channel) to nonblock: %m");</div><div class='del'>-	set_ppp_fd(fd);</div><div class='del'>-</div><div class='del'>-	if (!looped)</div><div class='del'>-	    ifunit = -1;</div><div class='del'>-	if (!looped &amp;&amp; !multilink) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Create a new PPP unit.</div><div class='del'>-	     */</div><div class='del'>-	    if (make_ppp_unit() &lt; 0)</div><div class='del'>-		goto err_close;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (looped)</div><div class='del'>-	    set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) &amp; ~SC_LOOP_TRAFFIC);</div><div class='del'>-</div><div class='del'>-	if (!multilink) {</div><div class='del'>-	    add_fd(ppp_dev_fd);</div><div class='del'>-	    if (ioctl(fd, PPPIOCCONNECT, &amp;ifunit) &lt; 0) {</div><div class='del'>-		error("Couldn't attach to PPP unit %d: %m", ifunit);</div><div class='del'>-		goto err_close;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * Old-style driver: find out which interface we were given.</div><div class='del'>-	 */</div><div class='del'>-	set_ppp_fd (tty_fd);</div><div class='del'>-	if (ioctl(tty_fd, PPPIOCGUNIT, &amp;x) &lt; 0) {	</div><div class='del'>-	    if (ok_error (errno))</div><div class='del'>-		goto err;</div><div class='del'>-	    fatal("ioctl(PPPIOCGUNIT): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-	/* Check that we got the same unit again. */</div><div class='del'>-	if (looped &amp;&amp; x != ifunit)</div><div class='del'>-	    fatal("transfer_ppp failed: wanted unit %d, got %d", ifunit, x);</div><div class='del'>-	ifunit = x;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Fetch the initial file flags and reset blocking mode on the file.</div><div class='del'>-	 */</div><div class='del'>-	initfdflags = fcntl(tty_fd, F_GETFL);</div><div class='del'>-	if (initfdflags == -1 ||</div><div class='del'>-	    fcntl(tty_fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("Couldn't set device to non-blocking mode: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    looped = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Enable debug in the driver if requested.</div><div class='del'>-     */</div><div class='del'>-    if (!looped)</div><div class='del'>-	set_kdebugflag (kdebugflag);</div><div class='del'>-</div><div class='del'>-#define SC_RCVB	(SC_RCV_B7_0 | SC_RCV_B7_1 | SC_RCV_EVNP | SC_RCV_ODDP)</div><div class='del'>-#define SC_LOGB	(SC_DEBUG | SC_LOG_INPKT | SC_LOG_OUTPKT | SC_LOG_RAWIN \</div><div class='del'>-		 | SC_LOG_FLUSH)</div><div class='del'>-</div><div class='del'>-    set_flags(ppp_fd, ((get_flags(ppp_fd) &amp; ~(SC_RCVB | SC_LOGB))</div><div class='del'>-		       | ((kdebugflag * SC_DEBUG) &amp; SC_LOGB)));</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_NOTICE, "Using version %d.%d.%d of PPP driver",</div><div class='del'>-	    driver_version, driver_modification, driver_patch));</div><div class='del'>-</div><div class='del'>-    return ppp_fd;</div><div class='del'>-</div><div class='del'>- err_close:</div><div class='del'>-    close(fd);</div><div class='del'>- err:</div><div class='del'>-    if (ioctl(tty_fd, TIOCSETD, &amp;tty_disc) &lt; 0 &amp;&amp; !ok_error(errno))</div><div class='del'>-	warn("Couldn't reset tty to normal line discipline: %m");</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_disestablish_ppp - Restore the serial port to normal operation,</div><div class='del'>- * and reconnect the ppp unit to the loopback if in demand mode.</div><div class='del'>- * This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_disestablish_ppp(int tty_fd)</div><div class='del'>-{</div><div class='del'>-    if (demand)</div><div class='del'>-	restore_loop();</div><div class='del'>-    if (!hungup) {</div><div class='del'>-/*</div><div class='del'>- * Flush the tty output buffer so that the TIOCSETD doesn't hang.</div><div class='del'>- */</div><div class='del'>-	if (tcflush(tty_fd, TCIOFLUSH) &lt; 0)</div><div class='del'>-	    warn("tcflush failed: %m");</div><div class='del'>-/*</div><div class='del'>- * Restore the previous line discipline</div><div class='del'>- */</div><div class='del'>-	if (ioctl(tty_fd, TIOCSETD, &amp;tty_disc) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		error("ioctl(TIOCSETD, N_TTY): %m");</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (ioctl(tty_fd, TIOCNXCL, 0) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("ioctl(TIOCNXCL): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Reset non-blocking mode on fd. */</div><div class='del'>-	if (initfdflags != -1 &amp;&amp; fcntl(tty_fd, F_SETFL, initfdflags) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("Couldn't restore device fd flags: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    initfdflags = -1;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	close(ppp_fd);</div><div class='del'>-	ppp_fd = -1;</div><div class='del'>-	if (!looped &amp;&amp; ifunit &gt;= 0 &amp;&amp; ioctl(ppp_dev_fd, PPPIOCDETACH) &lt; 0)</div><div class='del'>-	    error("Couldn't release PPP unit: %m");</div><div class='del'>-	if (!multilink)</div><div class='del'>-	    remove_fd(ppp_dev_fd);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * make_ppp_unit - make a new ppp unit for ppp_dev_fd.</div><div class='del'>- * Assumes new_style_driver.</div><div class='del'>- */</div><div class='del'>-static int make_ppp_unit()</div><div class='del'>-{</div><div class='del'>-	int x;</div><div class='del'>-</div><div class='del'>-	ifunit = req_unit;</div><div class='del'>-	x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &amp;ifunit);</div><div class='del'>-	if (x &lt; 0 &amp;&amp; req_unit &gt;= 0 &amp;&amp; errno == EEXIST) {</div><div class='del'>-		warn("Couldn't allocate PPP unit %d as it is already in use");</div><div class='del'>-		ifunit = -1;</div><div class='del'>-		x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &amp;ifunit);</div><div class='del'>-	}</div><div class='del'>-	if (x &lt; 0)</div><div class='del'>-		error("Couldn't create new ppp unit: %m");</div><div class='del'>-	return x;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cfg_bundle - configure the existing bundle.</div><div class='del'>- * Used in demand mode.</div><div class='del'>- */</div><div class='del'>-void cfg_bundle(int mrru, int mtru, int rssn, int tssn)</div><div class='del'>-{</div><div class='del'>-	int flags;</div><div class='del'>-</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	/* set the mrru, mtu and flags */</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSMRRU, &amp;mrru) &lt; 0)</div><div class='del'>-		error("Couldn't set MRRU: %m");</div><div class='del'>-	flags = get_flags(ppp_dev_fd);</div><div class='del'>-	flags &amp;= ~(SC_MP_SHORTSEQ | SC_MP_XSHORTSEQ);</div><div class='del'>-	flags |= (rssn? SC_MP_SHORTSEQ: 0) | (tssn? SC_MP_XSHORTSEQ: 0)</div><div class='del'>-		| (mrru? SC_MULTILINK: 0);</div><div class='del'>-</div><div class='del'>-	set_flags(ppp_dev_fd, flags);</div><div class='del'>-</div><div class='del'>-	/* connect up the channel */</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCCONNECT, &amp;ifunit) &lt; 0)</div><div class='del'>-		fatal("Couldn't attach to PPP unit %d: %m", ifunit);</div><div class='del'>-	add_fd(ppp_dev_fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * make_new_bundle - create a new PPP unit (i.e. a bundle)</div><div class='del'>- * and connect our channel to it.  This should only get called</div><div class='del'>- * if `multilink' was set at the time establish_ppp was called.</div><div class='del'>- * In demand mode this uses our existing bundle instead of making</div><div class='del'>- * a new one.</div><div class='del'>- */</div><div class='del'>-void make_new_bundle(int mrru, int mtru, int rssn, int tssn)</div><div class='del'>-{</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	/* make us a ppp unit */</div><div class='del'>-	if (make_ppp_unit() &lt; 0)</div><div class='del'>-		die(1);</div><div class='del'>-</div><div class='del'>-	/* set the mrru and flags */</div><div class='del'>-	cfg_bundle(mrru, mtru, rssn, tssn);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bundle_attach - attach our link to a given PPP unit.</div><div class='del'>- * We assume the unit is controlled by another pppd.</div><div class='del'>- */</div><div class='del'>-int bundle_attach(int ifnum)</div><div class='del'>-{</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCATTACH, &amp;ifnum) &lt; 0) {</div><div class='del'>-		if (errno == ENXIO)</div><div class='del'>-			return 0;	/* doesn't still exist */</div><div class='del'>-		fatal("Couldn't attach to interface unit %d: %m\n", ifnum);</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCCONNECT, &amp;ifnum) &lt; 0)</div><div class='del'>-		fatal("Couldn't connect to interface unit %d: %m", ifnum);</div><div class='del'>-	set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) | SC_MULTILINK);</div><div class='del'>-</div><div class='del'>-	ifunit = ifnum;</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * clean_check - Fetch the flags for the device and generate</div><div class='del'>- * appropriate error messages.</div><div class='del'>- */</div><div class='del'>-void clean_check(void)</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    char *s;</div><div class='del'>-</div><div class='del'>-    if (still_ppp()) {</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &amp;x) == 0) {</div><div class='del'>-	    s = NULL;</div><div class='del'>-	    switch (~x &amp; (SC_RCV_B7_0|SC_RCV_B7_1|SC_RCV_EVNP|SC_RCV_ODDP)) {</div><div class='del'>-	    case SC_RCV_B7_0:</div><div class='del'>-		s = "all had bit 7 set to 1";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_B7_1:</div><div class='del'>-		s = "all had bit 7 set to 0";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_EVNP:</div><div class='del'>-		s = "all had odd parity";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_ODDP:</div><div class='del'>-		s = "all had even parity";</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    </div><div class='del'>-	    if (s != NULL) {</div><div class='del'>-		warn("Receive serial link is not 8-bit clean:");</div><div class='del'>-		warn("Problem: %s", s);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-	</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * List of valid speeds.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct speed {</div><div class='del'>-    int speed_int, speed_val;</div><div class='del'>-} speeds[] = {</div><div class='del'>-#ifdef B50</div><div class='del'>-    { 50, B50 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B75</div><div class='del'>-    { 75, B75 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B110</div><div class='del'>-    { 110, B110 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B134</div><div class='del'>-    { 134, B134 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B150</div><div class='del'>-    { 150, B150 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B200</div><div class='del'>-    { 200, B200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B300</div><div class='del'>-    { 300, B300 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B600</div><div class='del'>-    { 600, B600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1200</div><div class='del'>-    { 1200, B1200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1800</div><div class='del'>-    { 1800, B1800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2000</div><div class='del'>-    { 2000, B2000 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2400</div><div class='del'>-    { 2400, B2400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B3600</div><div class='del'>-    { 3600, B3600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B4800</div><div class='del'>-    { 4800, B4800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B7200</div><div class='del'>-    { 7200, B7200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B9600</div><div class='del'>-    { 9600, B9600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B19200</div><div class='del'>-    { 19200, B19200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B38400</div><div class='del'>-    { 38400, B38400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B57600</div><div class='del'>-    { 57600, B57600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B76800</div><div class='del'>-    { 76800, B76800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B115200</div><div class='del'>-    { 115200, B115200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTA</div><div class='del'>-    { 19200, EXTA },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTB</div><div class='del'>-    { 38400, EXTB },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B230400</div><div class='del'>-    { 230400, B230400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B460800</div><div class='del'>-    { 460800, B460800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B921600</div><div class='del'>-    { 921600, B921600 },</div><div class='del'>-#endif</div><div class='del'>-    { 0, 0 }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Translate from bits/second to a speed_t.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int translate_speed (int bps)</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (bps != 0) {</div><div class='del'>-	for (speedp = speeds; speedp-&gt;speed_int; speedp++) {</div><div class='del'>-	    if (bps == speedp-&gt;speed_int)</div><div class='del'>-		return speedp-&gt;speed_val;</div><div class='del'>-	}</div><div class='del'>-	warn("speed %d not supported", bps);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Translate from a speed_t to bits/second.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int baud_rate_of (int speed)</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-    </div><div class='del'>-    if (speed != 0) {</div><div class='del'>-	for (speedp = speeds; speedp-&gt;speed_int; speedp++) {</div><div class='del'>-	    if (speed == speedp-&gt;speed_val)</div><div class='del'>-		return speedp-&gt;speed_int;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,</div><div class='del'>- * at the requested speed, etc.  If `local' is true, set CLOCAL</div><div class='del'>- * regardless of whether the modem option was specified.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void set_up_tty(int tty_fd, int local)</div><div class='del'>-{</div><div class='del'>-    int speed;</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-    setdtr(tty_fd, 1);</div><div class='del'>-    if (tcgetattr(tty_fd, &amp;tios) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("tcgetattr: %m(%d)", errno);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    if (!restore_term)</div><div class='del'>-	inittermios = tios;</div><div class='del'>-    </div><div class='del'>-    tios.c_cflag     &amp;= ~(CSIZE | CSTOPB | PARENB | CLOCAL);</div><div class='del'>-    tios.c_cflag     |= CS8 | CREAD | HUPCL;</div><div class='del'>-</div><div class='del'>-    tios.c_iflag      = IGNBRK | IGNPAR;</div><div class='del'>-    tios.c_oflag      = 0;</div><div class='del'>-    tios.c_lflag      = 0;</div><div class='del'>-    tios.c_cc[VMIN]   = 1;</div><div class='del'>-    tios.c_cc[VTIME]  = 0;</div><div class='del'>-    </div><div class='del'>-    if (local || !modem)</div><div class='del'>-	tios.c_cflag ^= (CLOCAL | HUPCL);</div><div class='del'>-</div><div class='del'>-    switch (crtscts) {</div><div class='del'>-    case 1:</div><div class='del'>-	tios.c_cflag |= CRTSCTS;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case -2:</div><div class='del'>-	tios.c_iflag     |= IXON | IXOFF;</div><div class='del'>-	tios.c_cc[VSTOP]  = 0x13;	/* DC3 = XOFF = ^S */</div><div class='del'>-	tios.c_cc[VSTART] = 0x11;	/* DC1 = XON  = ^Q */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case -1:</div><div class='del'>-	tios.c_cflag &amp;= ~CRTSCTS;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    speed = translate_speed(inspeed);</div><div class='del'>-    if (speed) {</div><div class='del'>-	cfsetospeed (&amp;tios, speed);</div><div class='del'>-	cfsetispeed (&amp;tios, speed);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * We can't proceed if the serial port speed is B0,</div><div class='del'>- * since that implies that the serial port is disabled.</div><div class='del'>- */</div><div class='del'>-    else {</div><div class='del'>-	speed = cfgetospeed(&amp;tios);</div><div class='del'>-	if (speed == B0)</div><div class='del'>-	    fatal("Baud rate for %s is 0; need explicit baud rate", devnam);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (tcsetattr(tty_fd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("tcsetattr: %m");</div><div class='del'>-    </div><div class='del'>-    baud_rate    = baud_rate_of(speed);</div><div class='del'>-    restore_term = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * setdtr - control the DTR line on the serial port.</div><div class='del'>- * This is called from die(), so it shouldn't call die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void setdtr (int tty_fd, int on)</div><div class='del'>-{</div><div class='del'>-    int modembits = TIOCM_DTR;</div><div class='del'>-</div><div class='del'>-    ioctl(tty_fd, (on ? TIOCMBIS : TIOCMBIC), &amp;modembits);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * restore_tty - restore the terminal to the saved settings.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void restore_tty (int tty_fd)</div><div class='del'>-{</div><div class='del'>-    if (restore_term) {</div><div class='del'>-	restore_term = 0;</div><div class='del'>-/*</div><div class='del'>- * Turn off echoing, because otherwise we can get into</div><div class='del'>- * a loop with the tty and the modem echoing to each other.</div><div class='del'>- * We presume we are the sole user of this tty device, so</div><div class='del'>- * when we close it, it will revert to its defaults anyway.</div><div class='del'>- */</div><div class='del'>-	if (!default_device)</div><div class='del'>-	    inittermios.c_lflag &amp;= ~(ECHO | ECHONL);</div><div class='del'>-	</div><div class='del'>-	if (tcsetattr(tty_fd, TCSAFLUSH, &amp;inittermios) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		warn("tcsetattr: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * output - Output PPP packet.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void output (int unit, unsigned char *p, int len)</div><div class='del'>-{</div><div class='del'>-    int fd = ppp_fd;</div><div class='del'>-    int proto;</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	dbglog("sent %P", p, len);</div><div class='del'>-</div><div class='del'>-    if (len &lt; PPP_HDRLEN)</div><div class='del'>-	return;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	p += 2;</div><div class='del'>-	len -= 2;</div><div class='del'>-	proto = (p[0] &lt;&lt; 8) + p[1];</div><div class='del'>-	if (ifunit &gt;= 0 &amp;&amp; !(proto &gt;= 0xc000 || proto == PPP_CCPFRAG))</div><div class='del'>-	    fd = ppp_dev_fd;</div><div class='del'>-    }</div><div class='del'>-    if (write(fd, p, len) &lt; 0) {</div><div class='del'>-	if (errno == EWOULDBLOCK || errno == ENOBUFS</div><div class='del'>-	    || errno == ENXIO || errno == EIO || errno == EINTR)</div><div class='del'>-	    warn("write: warning: %m (%d)", errno);</div><div class='del'>-	else</div><div class='del'>-	    error("write: %m (%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * wait_input - wait until there is data available,</div><div class='del'>- * for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void wait_input(struct timeval *timo)</div><div class='del'>-{</div><div class='del'>-    fd_set ready, exc;</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    ready = in_fds;</div><div class='del'>-    exc = in_fds;</div><div class='del'>-    n = select(max_in_fd + 1, &amp;ready, NULL, &amp;exc, timo);</div><div class='del'>-    if (n &lt; 0 &amp;&amp; errno != EINTR)</div><div class='del'>-	fatal("select: %m(%d)", errno);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_fd - add an fd to the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void add_fd(int fd)</div><div class='del'>-{</div><div class='del'>-    FD_SET(fd, &amp;in_fds);</div><div class='del'>-    if (fd &gt; max_in_fd)</div><div class='del'>-	max_in_fd = fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * remove_fd - remove an fd from the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void remove_fd(int fd)</div><div class='del'>-{</div><div class='del'>-    FD_CLR(fd, &amp;in_fds);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * read_packet - get a PPP packet from the serial device.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int read_packet (unsigned char *buf)</div><div class='del'>-{</div><div class='del'>-    int len, nr;</div><div class='del'>-</div><div class='del'>-    len = PPP_MRU + PPP_HDRLEN;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	*buf++ = PPP_ALLSTATIONS;</div><div class='del'>-	*buf++ = PPP_UI;</div><div class='del'>-	len -= 2;</div><div class='del'>-    }</div><div class='del'>-    nr = -1;</div><div class='del'>-    if (ppp_fd &gt;= 0) {</div><div class='del'>-	nr = read(ppp_fd, buf, len);</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno != EWOULDBLOCK &amp;&amp; errno != EIO &amp;&amp; errno != EINTR)</div><div class='del'>-	    error("read: %m");</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-    if (nr &lt; 0 &amp;&amp; new_style_driver &amp;&amp; ifunit &gt;= 0) {</div><div class='del'>-	/* N.B. we read ppp_fd first since LCP packets come in there. */</div><div class='del'>-	nr = read(ppp_dev_fd, buf, len);</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno != EWOULDBLOCK &amp;&amp; errno != EIO &amp;&amp; errno != EINTR)</div><div class='del'>-	    error("read /dev/ppp: %m");</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-    return (new_style_driver &amp;&amp; nr &gt; 0)? nr+2: nr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_loop_output - get outgoing packets from the ppp device,</div><div class='del'>- * and detect when we want to bring the real link up.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_loop_output(void)</div><div class='del'>-{</div><div class='del'>-    int rv = 0;</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	while ((n = read_packet(inpacket_buf)) &gt; 0)</div><div class='del'>-	    if (loop_frame(inpacket_buf, n))</div><div class='del'>-		rv = 1;</div><div class='del'>-	return rv;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    while ((n = read(master_fd, inbuf, sizeof(inbuf))) &gt; 0)</div><div class='del'>-	if (loop_chars(inbuf, n))</div><div class='del'>-	    rv = 1;</div><div class='del'>-</div><div class='del'>-    if (n == 0)</div><div class='del'>-	fatal("eof on loopback");</div><div class='del'>-</div><div class='del'>-    if (errno != EWOULDBLOCK)</div><div class='del'>-	fatal("read from loopback: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    return rv;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * netif_set_mtu - set the MTU on the PPP network interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-netif_set_mtu(int unit, int mtu)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "netif_set_mtu: mtu = %d\n", mtu));</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    ifr.ifr_mtu = mtu;</div><div class='del'>-	</div><div class='del'>-    if (ifunit &gt;= 0 &amp;&amp; ioctl(sock_fd, SIOCSIFMTU, (caddr_t) &amp;ifr) &lt; 0)</div><div class='del'>-	fatal("ioctl(SIOCSIFMTU): %m");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_send_config - configure the transmit characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_send_config (int mtu,u_int32_t asyncmap,int pcomp,int accomp)</div><div class='del'>-{</div><div class='del'>-    u_int x;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Set the asyncmap and other parameters for the ppp device</div><div class='del'>- */</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-    link_mtu = mtu;</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "send_config: asyncmap = %lx\n", asyncmap));</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSASYNCMAP, (caddr_t) &amp;asyncmap) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("ioctl(PPPIOCSASYNCMAP): %m(%d)", errno);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    x = get_flags(ppp_fd);</div><div class='del'>-    x = pcomp  ? x | SC_COMP_PROT : x &amp; ~SC_COMP_PROT;</div><div class='del'>-    x = accomp ? x | SC_COMP_AC   : x &amp; ~SC_COMP_AC;</div><div class='del'>-    x = sync_serial ? x | SC_SYNC : x &amp; ~SC_SYNC;</div><div class='del'>-    set_flags(ppp_fd, x);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_set_xaccm - set the extended transmit ACCM for the interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_set_xaccm (ext_accm accm)</div><div class='del'>-{</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "set_xaccm: %08lx %08lx %08lx %08lx\n",</div><div class='del'>-		accm[0], accm[1], accm[2], accm[3]));</div><div class='del'>-</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) &lt; 0 &amp;&amp; errno != ENOTTY) {</div><div class='del'>-	if ( ! ok_error (errno))</div><div class='del'>-	    warn("ioctl(set extended ACCM): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_recv_config - configure the receive-side characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_recv_config (int mru,u_int32_t asyncmap,int pcomp,int accomp)</div><div class='del'>-{</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "recv_config: mru = %d\n", mru));</div><div class='del'>-/*</div><div class='del'>- * If we were called because the link has gone down then there is nothing</div><div class='del'>- * which may be done. Just return without incident.</div><div class='del'>- */</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-/*</div><div class='del'>- * Set the receiver parameters</div><div class='del'>- */</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &amp;mru) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno))</div><div class='del'>-	    error("ioctl(PPPIOCSMRU): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-    if (new_style_driver &amp;&amp; ifunit &gt;= 0</div><div class='del'>-	&amp;&amp; ioctl(ppp_dev_fd, PPPIOCSMRU, (caddr_t) &amp;mru) &lt; 0)</div><div class='del'>-	error("Couldn't set MRU in generic PPP layer: %m");</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "recv_config: asyncmap = %lx\n", asyncmap));</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSRASYNCMAP, (caddr_t) &amp;asyncmap) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    error("ioctl(PPPIOCSRASYNCMAP): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_test - ask kernel whether a given compression method</div><div class='del'>- * is acceptable for use.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ccp_test (int unit, u_char *opt_ptr, int opt_len, int for_transmit)</div><div class='del'>-{</div><div class='del'>-    struct ppp_option_data data;</div><div class='del'>-</div><div class='del'>-    memset (&amp;data, '\0', sizeof (data));</div><div class='del'>-    data.ptr      = opt_ptr;</div><div class='del'>-    data.length   = opt_len;</div><div class='del'>-    data.transmit = for_transmit;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &amp;data) &gt;= 0)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-    return (errno == ENOBUFS)? 0: -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_flags_set - inform kernel about the current state of CCP.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void ccp_flags_set (int unit, int isopen, int isup)</div><div class='del'>-{</div><div class='del'>-    if (still_ppp()) {</div><div class='del'>-	int x = get_flags(ppp_dev_fd);</div><div class='del'>-	x = isopen? x | SC_CCP_OPEN : x &amp;~ SC_CCP_OPEN;</div><div class='del'>-	x = isup?   x | SC_CCP_UP   : x &amp;~ SC_CCP_UP;</div><div class='del'>-	set_flags (ppp_dev_fd, x);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-/*</div><div class='del'>- * set_filters - set the active and pass filters in the kernel driver.</div><div class='del'>- */</div><div class='del'>-int set_filters(struct bpf_program *pass, struct bpf_program *active)</div><div class='del'>-{</div><div class='del'>-	struct sock_fprog fp;</div><div class='del'>-</div><div class='del'>-	fp.len = pass-&gt;bf_len;</div><div class='del'>-	fp.filter = (struct sock_filter *) pass-&gt;bf_insns;</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSPASS, &amp;fp) &lt; 0) {</div><div class='del'>-		if (errno == ENOTTY)</div><div class='del'>-			warn("kernel does not support PPP filtering");</div><div class='del'>-		else</div><div class='del'>-			error("Couldn't set pass-filter in kernel: %m");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	fp.len = active-&gt;bf_len;</div><div class='del'>-	fp.filter = (struct sock_filter *) active-&gt;bf_insns;</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSACTIVE, &amp;fp) &lt; 0) {</div><div class='del'>-		error("Couldn't set active-filter in kernel: %m");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* PPP_FILTER */</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_idle_time - return how long the link has been idle.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_idle_time(u, ip)</div><div class='del'>-    int u;</div><div class='del'>-    struct ppp_idle *ip;</div><div class='del'>-{</div><div class='del'>-    return ioctl(ppp_dev_fd, PPPIOCGIDLE, ip) &gt;= 0;</div><div class='del'>-} </div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_ppp_stats - return statistics for the link.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_ppp_stats(u, stats)</div><div class='del'>-    int u;</div><div class='del'>-    struct pppd_stats *stats;</div><div class='del'>-{</div><div class='del'>-    struct ifpppstatsreq req;</div><div class='del'>-</div><div class='del'>-    memset (&amp;req, 0, sizeof (req));</div><div class='del'>-</div><div class='del'>-    req.stats_ptr = (caddr_t) &amp;req.stats;</div><div class='del'>-    strlcpy(req.ifr__name, ifname, sizeof(req.ifr__name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGPPPSTATS, &amp;req) &lt; 0) {</div><div class='del'>-	error("Couldn't get PPP statistics: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    stats-&gt;bytes_in = req.stats.p.ppp_ibytes;</div><div class='del'>-    stats-&gt;bytes_out = req.stats.p.ppp_obytes;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_fatal_error - returns 1 if decompression was disabled as a</div><div class='del'>- * result of an error detected after decompression of a packet,</div><div class='del'>- * 0 otherwise.  This is necessary because of patent nonsense.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ccp_fatal_error (int unit)</div><div class='del'>-{</div><div class='del'>-    int x = get_flags(ppp_dev_fd);</div><div class='del'>-</div><div class='del'>-    return x &amp; SC_DC_FERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * path_to_procfs - find the path to the proc file system mount point</div><div class='del'>- */</div><div class='del'>-static char proc_path[MAXPATHLEN];</div><div class='del'>-static int proc_path_len;</div><div class='del'>-</div><div class='del'>-static char *path_to_procfs(const char *tail)</div><div class='del'>-{</div><div class='del'>-    struct mntent *mntent;</div><div class='del'>-    FILE *fp;</div><div class='del'>-</div><div class='del'>-    if (proc_path_len == 0) {</div><div class='del'>-	/* Default the mount location of /proc */</div><div class='del'>-	strlcpy (proc_path, "/proc", sizeof(proc_path));</div><div class='del'>-	proc_path_len = 5;</div><div class='del'>-	fp = fopen(MOUNTED, "r");</div><div class='del'>-	if (fp != NULL) {</div><div class='del'>-	    while ((mntent = getmntent(fp)) != NULL) {</div><div class='del'>-		if (strcmp(mntent-&gt;mnt_type, MNTTYPE_IGNORE) == 0)</div><div class='del'>-		    continue;</div><div class='del'>-		if (strcmp(mntent-&gt;mnt_type, "proc") == 0) {</div><div class='del'>-		    strlcpy(proc_path, mntent-&gt;mnt_dir, sizeof(proc_path));</div><div class='del'>-		    proc_path_len = strlen(proc_path);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    fclose (fp);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    strlcpy(proc_path + proc_path_len, tail,</div><div class='del'>-	    sizeof(proc_path) - proc_path_len);</div><div class='del'>-    return proc_path;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * /proc/net/route parsing stuff.</div><div class='del'>- */</div><div class='del'>-#define ROUTE_MAX_COLS	12</div><div class='del'>-FILE *route_fd = (FILE *) 0;</div><div class='del'>-static char route_buffer[512];</div><div class='del'>-static int route_dev_col, route_dest_col, route_gw_col;</div><div class='del'>-static int route_flags_col, route_mask_col;</div><div class='del'>-static int route_num_cols;</div><div class='del'>-</div><div class='del'>-static int open_route_table (void);</div><div class='del'>-static void close_route_table (void);</div><div class='del'>-static int read_route_table (struct rtentry *rt);</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * close_route_table - close the interface to the route table</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void close_route_table (void)</div><div class='del'>-{</div><div class='del'>-    if (route_fd != (FILE *) 0) {</div><div class='del'>-        fclose (route_fd);</div><div class='del'>-        route_fd = (FILE *) 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * open_route_table - open the interface to the route table</div><div class='del'>- */</div><div class='del'>-static char route_delims[] = " \t\n";</div><div class='del'>-</div><div class='del'>-static int open_route_table (void)</div><div class='del'>-{</div><div class='del'>-    char *path;</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-</div><div class='del'>-    path = path_to_procfs("/net/route");</div><div class='del'>-    route_fd = fopen (path, "r");</div><div class='del'>-    if (route_fd == NULL) {</div><div class='del'>-        error("can't open routing table %s: %m", path);</div><div class='del'>-        return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    route_dev_col = 0;		/* default to usual columns */</div><div class='del'>-    route_dest_col = 1;</div><div class='del'>-    route_gw_col = 2;</div><div class='del'>-    route_flags_col = 3;</div><div class='del'>-    route_mask_col = 7;</div><div class='del'>-    route_num_cols = 8;</div><div class='del'>-</div><div class='del'>-    /* parse header line */</div><div class='del'>-    if (fgets(route_buffer, sizeof(route_buffer), route_fd) != 0) {</div><div class='del'>-	char *p = route_buffer, *q;</div><div class='del'>-	int col;</div><div class='del'>-	for (col = 0; col &lt; ROUTE_MAX_COLS; ++col) {</div><div class='del'>-	    int used = 1;</div><div class='del'>-	    if ((q = strtok(p, route_delims)) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (strcasecmp(q, "iface") == 0)</div><div class='del'>-		route_dev_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "destination") == 0)</div><div class='del'>-		route_dest_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "gateway") == 0)</div><div class='del'>-		route_gw_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "flags") == 0)</div><div class='del'>-		route_flags_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "mask") == 0)</div><div class='del'>-		route_mask_col = col;</div><div class='del'>-	    else</div><div class='del'>-		used = 0;</div><div class='del'>-	    if (used &amp;&amp; col &gt;= route_num_cols)</div><div class='del'>-		route_num_cols = col + 1;</div><div class='del'>-	    p = NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * read_route_table - read the next entry from the route table</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int read_route_table(struct rtentry *rt)</div><div class='del'>-{</div><div class='del'>-    char *cols[ROUTE_MAX_COLS], *p;</div><div class='del'>-    int col;</div><div class='del'>-	</div><div class='del'>-    memset (rt, '\0', sizeof (struct rtentry));</div><div class='del'>-</div><div class='del'>-    if (fgets (route_buffer, sizeof (route_buffer), route_fd) == (char *) 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    p = route_buffer;</div><div class='del'>-    for (col = 0; col &lt; route_num_cols; ++col) {</div><div class='del'>-	cols[col] = strtok(p, route_delims);</div><div class='del'>-	if (cols[col] == NULL)</div><div class='del'>-	    return 0;		/* didn't get enough columns */</div><div class='del'>-	p = NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_dst) = strtoul(cols[route_dest_col], NULL, 16);</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);</div><div class='del'>-</div><div class='del'>-    rt-&gt;rt_flags = (short) strtoul(cols[route_flags_col], NULL, 16);</div><div class='del'>-    rt-&gt;rt_dev   = cols[route_dev_col];</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * defaultroute_exists - determine if there is a default route</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int defaultroute_exists (struct rtentry *rt)</div><div class='del'>-{</div><div class='del'>-    int result = 0;</div><div class='del'>-</div><div class='del'>-    if (!open_route_table())</div><div class='del'>-        return 0;</div><div class='del'>-</div><div class='del'>-    while (read_route_table(rt) != 0) {</div><div class='del'>-        if ((rt-&gt;rt_flags &amp; RTF_UP) == 0)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0) &amp;&amp; SIN_ADDR(rt-&gt;rt_genmask) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-        if (SIN_ADDR(rt-&gt;rt_dst) == 0L) {</div><div class='del'>-	    result = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_route_to - determine if the system has any route to</div><div class='del'>- * a given IP address.  `addr' is in network byte order.</div><div class='del'>- * Return value is 1 if yes, 0 if no, -1 if don't know.</div><div class='del'>- * For demand mode to work properly, we have to ignore routes</div><div class='del'>- * through our own interface.</div><div class='del'>- */</div><div class='del'>-int have_route_to(u_int32_t addr)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-    int result = 0;</div><div class='del'>-</div><div class='del'>-    if (!open_route_table())</div><div class='del'>-	return -1;		/* don't know */</div><div class='del'>-</div><div class='del'>-    while (read_route_table(&amp;rt)) {</div><div class='del'>-	if ((rt.rt_flags &amp; RTF_UP) == 0 || strcmp(rt.rt_dev, ifname) == 0)</div><div class='del'>-	    continue;</div><div class='del'>-	if ((addr &amp; SIN_ADDR(rt.rt_genmask)) == SIN_ADDR(rt.rt_dst)) {</div><div class='del'>-	    result = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifdefaultroute - assign a default route through the address given.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    if (defaultroute_exists(&amp;rt) &amp;&amp; strcmp(rt.rt_dev, ifname) != 0) {</div><div class='del'>-	u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);</div><div class='del'>-</div><div class='del'>-	if (old_gateway != gateway)</div><div class='del'>-	    error("not replacing existing default route to %s [%I]",</div><div class='del'>-		  rt.rt_dev, old_gateway);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-    SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-    SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-</div><div class='del'>-    if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	SIN_ADDR(rt.rt_genmask) = 0L;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt.rt_gateway) = gateway;</div><div class='del'>-    </div><div class='del'>-    rt.rt_flags = RTF_UP | RTF_GATEWAY;</div><div class='del'>-    if (ioctl(sock_fd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    error("default route ioctl(SIOCADDRT): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = gateway;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifdefaultroute - delete a default route through the address given.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    default_route_gateway = 0;</div><div class='del'>-</div><div class='del'>-    memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-    SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-    SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-</div><div class='del'>-    if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	SIN_ADDR(rt.rt_genmask) = 0L;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt.rt_gateway) = gateway;</div><div class='del'>-    </div><div class='del'>-    rt.rt_flags = RTF_UP | RTF_GATEWAY;</div><div class='del'>-    if (ioctl(sock_fd, SIOCDELRT, &amp;rt) &lt; 0 &amp;&amp; errno != ESRCH) {</div><div class='del'>-	if (still_ppp()) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		error("default route ioctl(SIOCDELRT): %m (%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifproxyarp - Make a proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifproxyarp (int unit, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-    char *forw_path;</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp == 0) {</div><div class='del'>-	memset (&amp;arpreq, '\0', sizeof(arpreq));</div><div class='del'>-    </div><div class='del'>-	SET_SA_FAMILY(arpreq.arp_pa, AF_INET);</div><div class='del'>-	SIN_ADDR(arpreq.arp_pa) = his_adr;</div><div class='del'>-	arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-/*</div><div class='del'>- * Get the hardware address of an interface on the same subnet</div><div class='del'>- * as our local address.</div><div class='del'>- */</div><div class='del'>-	if (!get_ether_addr(his_adr, &amp;arpreq.arp_ha, proxy_arp_dev,</div><div class='del'>-			    sizeof(proxy_arp_dev))) {</div><div class='del'>-	    error("Cannot determine ethernet address for proxy ARP");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	strlcpy(arpreq.arp_dev, proxy_arp_dev, sizeof(arpreq.arp_dev));</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCSARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		error("ioctl(SIOCSARP): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	proxy_arp_addr = his_adr;</div><div class='del'>-	has_proxy_arp = 1;</div><div class='del'>-</div><div class='del'>-	if (tune_kernel) {</div><div class='del'>-	    forw_path = path_to_procfs("/sys/net/ipv4/ip_forward");</div><div class='del'>-	    if (forw_path != 0) {</div><div class='del'>-		int fd = open(forw_path, O_WRONLY);</div><div class='del'>-		if (fd &gt;= 0) {</div><div class='del'>-		    if (write(fd, "1", 1) != 1)</div><div class='del'>-			error("Couldn't enable IP forwarding: %m");</div><div class='del'>-		    close(fd);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifproxyarp - Delete the proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifproxyarp (int unit, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp) {</div><div class='del'>-	has_proxy_arp = 0;</div><div class='del'>-	memset (&amp;arpreq, '\0', sizeof(arpreq));</div><div class='del'>-	SET_SA_FAMILY(arpreq.arp_pa, AF_INET);</div><div class='del'>-	SIN_ADDR(arpreq.arp_pa) = his_adr;</div><div class='del'>-	arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-	strlcpy(arpreq.arp_dev, proxy_arp_dev, sizeof(arpreq.arp_dev));</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCDARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		warn("ioctl(SIOCDARP): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-     </div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_ether_addr - get the hardware address of an interface on the</div><div class='del'>- * the same subnet as ipaddr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int get_ether_addr (u_int32_t ipaddr,</div><div class='del'>-			   struct sockaddr *hwaddr,</div><div class='del'>-			   char *name, int namelen)</div><div class='del'>-{</div><div class='del'>-    struct ifreq *ifr, *ifend;</div><div class='del'>-    u_int32_t ina, mask;</div><div class='del'>-    char *aliasp;</div><div class='del'>-    struct ifreq ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq ifs[MAX_IFS];</div><div class='del'>-    </div><div class='del'>-    ifc.ifc_len = sizeof(ifs);</div><div class='del'>-    ifc.ifc_req = ifs;</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    error("ioctl(SIOCGIFCONF): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "proxy arp: scanning %d interfaces for IP %s",</div><div class='del'>-		ifc.ifc_len / sizeof(struct ifreq), ip_ntoa(ipaddr)));</div><div class='del'>-/*</div><div class='del'>- * Scan through looking for an interface with an Internet</div><div class='del'>- * address on the same subnet as `ipaddr'.</div><div class='del'>- */</div><div class='del'>-    ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ifr++) {</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family == AF_INET) {</div><div class='del'>-	    ina = SIN_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	    strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-            SYSDEBUG ((LOG_DEBUG, "proxy arp: examining interface %s",</div><div class='del'>-			ifreq.ifr_name));</div><div class='del'>-/*</div><div class='del'>- * Check that the interface is up, and not point-to-point</div><div class='del'>- * nor loopback.</div><div class='del'>- */</div><div class='del'>-	    if (ioctl(sock_fd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-		continue;</div><div class='del'>-</div><div class='del'>-	    if (((ifreq.ifr_flags ^ FLAGS_GOOD) &amp; FLAGS_MASK) != 0)</div><div class='del'>-		continue;</div><div class='del'>-/*</div><div class='del'>- * Get its netmask and check that it's on the right subnet.</div><div class='del'>- */</div><div class='del'>-	    if (ioctl(sock_fd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	        continue;</div><div class='del'>-</div><div class='del'>-	    mask = SIN_ADDR(ifreq.ifr_addr);</div><div class='del'>-	    SYSDEBUG ((LOG_DEBUG, "proxy arp: interface addr %s mask %lx",</div><div class='del'>-			ip_ntoa(ina), ntohl(mask)));</div><div class='del'>-</div><div class='del'>-	    if (((ipaddr ^ ina) &amp; mask) != 0)</div><div class='del'>-	        continue;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    if (ifr &gt;= ifend)</div><div class='del'>-        return 0;</div><div class='del'>-</div><div class='del'>-    strlcpy(name, ifreq.ifr_name, namelen);</div><div class='del'>-</div><div class='del'>-    /* trim off the :1 in eth0:1 */</div><div class='del'>-    aliasp = strchr(name, ':');</div><div class='del'>-    if (aliasp != 0)</div><div class='del'>-	*aliasp = 0;</div><div class='del'>-</div><div class='del'>-    info("found interface %s for proxy arp", name);</div><div class='del'>-/*</div><div class='del'>- * Now get the hardware address.</div><div class='del'>- */</div><div class='del'>-    memset (&amp;ifreq.ifr_hwaddr, 0, sizeof (struct sockaddr));</div><div class='del'>-    if (ioctl (sock_fd, SIOCGIFHWADDR, &amp;ifreq) &lt; 0) {</div><div class='del'>-        error("SIOCGIFHWADDR(%s): %m(%d)", ifreq.ifr_name, errno);</div><div class='del'>-        return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memcpy (hwaddr,</div><div class='del'>-	    &amp;ifreq.ifr_hwaddr,</div><div class='del'>-	    sizeof (struct sockaddr));</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG,</div><div class='del'>-	   "proxy arp: found hwaddr %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[0],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[1],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[2],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[3],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[4],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[5],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[6],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[7]));</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_if_hwaddr - get the hardware address for the specified</div><div class='del'>- * network interface device.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_if_hwaddr(u_char *addr, char *name)</div><div class='del'>-{</div><div class='del'>-	struct ifreq ifreq;</div><div class='del'>-	int ret, sock_fd;</div><div class='del'>-</div><div class='del'>-	sock_fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-	if (sock_fd &lt; 0)</div><div class='del'>-		return 0;</div><div class='del'>-	memset(&amp;ifreq.ifr_hwaddr, 0, sizeof(struct sockaddr));</div><div class='del'>-	strlcpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name));</div><div class='del'>-	ret = ioctl(sock_fd, SIOCGIFHWADDR, &amp;ifreq);</div><div class='del'>-	close(sock_fd);</div><div class='del'>-	if (ret &gt;= 0)</div><div class='del'>-		memcpy(addr, ifreq.ifr_hwaddr.sa_data, 6);</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_first_ethernet - return the name of the first ethernet-style</div><div class='del'>- * interface on this system.</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-get_first_ethernet()</div><div class='del'>-{</div><div class='del'>-	return "eth0";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Return user specified netmask, modified by any mask we might determine</div><div class='del'>- * for address `addr' (in network byte order).</div><div class='del'>- * Here we scan through the system's list of interfaces, looking for</div><div class='del'>- * any non-point-to-point interfaces which might appear to be on the same</div><div class='del'>- * network as `addr'.  If we find any, we OR in their netmask to the</div><div class='del'>- * user-specified netmask.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-u_int32_t GetMask (u_int32_t addr)</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask, nmask, ina;</div><div class='del'>-    struct ifreq *ifr, *ifend, ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq ifs[MAX_IFS];</div><div class='del'>-</div><div class='del'>-    addr = ntohl(addr);</div><div class='del'>-    </div><div class='del'>-    if (IN_CLASSA(addr))	/* determine network mask for address class */</div><div class='del'>-	nmask = IN_CLASSA_NET;</div><div class='del'>-    else if (IN_CLASSB(addr))</div><div class='del'>-	    nmask = IN_CLASSB_NET;</div><div class='del'>-    else</div><div class='del'>-	    nmask = IN_CLASSC_NET;</div><div class='del'>-    </div><div class='del'>-    /* class D nets are disallowed by bad_ip_adrs */</div><div class='del'>-    mask = netmask | htonl(nmask);</div><div class='del'>-/*</div><div class='del'>- * Scan through the system's network interfaces.</div><div class='del'>- */</div><div class='del'>-    ifc.ifc_len = sizeof(ifs);</div><div class='del'>-    ifc.ifc_req = ifs;</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    warn("ioctl(SIOCGIFCONF): %m(%d)", errno);</div><div class='del'>-	return mask;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ifr++) {</div><div class='del'>-/*</div><div class='del'>- * Check the interface's internet address.</div><div class='del'>- */</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family != AF_INET)</div><div class='del'>-	    continue;</div><div class='del'>-	ina = SIN_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	if (((ntohl(ina) ^ addr) &amp; nmask) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-/*</div><div class='del'>- * Check that the interface is up, and not point-to-point nor loopback.</div><div class='del'>- */</div><div class='del'>-	strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-	if (ioctl(sock_fd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	</div><div class='del'>-	if (((ifreq.ifr_flags ^ FLAGS_GOOD) &amp; FLAGS_MASK) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-/*</div><div class='del'>- * Get its netmask and OR it into our mask.</div><div class='del'>- */</div><div class='del'>-	if (ioctl(sock_fd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	mask |= SIN_ADDR(ifreq.ifr_addr);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return mask;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Internal routine to decode the version.modification.patch level</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void decode_version (char *buf, int *version,</div><div class='del'>-			    int *modification, int *patch)</div><div class='del'>-{</div><div class='del'>-    char *endp;</div><div class='del'>-</div><div class='del'>-    *version      = (int) strtoul (buf, &amp;endp, 10);</div><div class='del'>-    *modification = 0;</div><div class='del'>-    *patch        = 0;</div><div class='del'>-    </div><div class='del'>-    if (endp != buf &amp;&amp; *endp == '.') {</div><div class='del'>-	buf = endp + 1;</div><div class='del'>-	*modification = (int) strtoul (buf, &amp;endp, 10);</div><div class='del'>-	if (endp != buf &amp;&amp; *endp == '.') {</div><div class='del'>-	    buf = endp + 1;</div><div class='del'>-	    *patch = (int) strtoul (buf, &amp;buf, 10);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Procedure to determine if the PPP line discipline is registered.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppp_registered(void)</div><div class='del'>-{</div><div class='del'>-    int local_fd;</div><div class='del'>-    int mfd = -1;</div><div class='del'>-    int ret = 0;</div><div class='del'>-    char slave[16];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We used to open the serial device and set it to the ppp line</div><div class='del'>-     * discipline here, in order to create a ppp unit.  But that is</div><div class='del'>-     * not a good idea - the user might have specified a device that</div><div class='del'>-     * they can't open (permission, or maybe it doesn't really exist).</div><div class='del'>-     * So we grab a pty master/slave pair and use that.</div><div class='del'>-     */</div><div class='del'>-    if (!get_pty(&amp;mfd, &amp;local_fd, slave, 0)) {</div><div class='del'>-	no_ppp_msg = "Couldn't determine if PPP is supported (no free ptys)";</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Try to put the device into the PPP discipline.</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(local_fd, TIOCSETD, &amp;ppp_disc) &lt; 0) {</div><div class='del'>-	error("ioctl(TIOCSETD(PPP)): %m(%d)", errno);</div><div class='del'>-    } else</div><div class='del'>-	ret = 1;</div><div class='del'>-    </div><div class='del'>-    close(local_fd);</div><div class='del'>-    close(mfd);</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ppp_available - check whether the system has any ppp interfaces</div><div class='del'>- * (in fact we check whether we can do an ioctl on ppp0).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ppp_available(void)</div><div class='del'>-{</div><div class='del'>-    int s, ok, fd;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    int    size;</div><div class='del'>-    int    my_version, my_modification, my_patch;</div><div class='del'>-    int osmaj, osmin, ospatch;</div><div class='del'>-</div><div class='del'>-    no_ppp_msg = </div><div class='del'>-	"This system lacks kernel support for PPP.  This could be because\n"</div><div class='del'>-	"the PPP kernel module could not be loaded, or because PPP was not\n"</div><div class='del'>-	"included in the kernel configuration.  If PPP was included as a\n"</div><div class='del'>-	"module, try `/sbin/modprobe -v ppp'.  If that fails, check that\n"</div><div class='del'>-	"ppp.o exists in /lib/modules/`uname -r`/net.\n"</div><div class='del'>-	"See README.linux file in the ppp distribution for more details.\n";</div><div class='del'>-</div><div class='del'>-    /* get the kernel version now, since we are called before sys_init */</div><div class='del'>-    uname(&amp;utsname);</div><div class='del'>-    osmaj = osmin = ospatch = 0;</div><div class='del'>-    sscanf(utsname.release, "%d.%d.%d", &amp;osmaj, &amp;osmin, &amp;ospatch);</div><div class='del'>-    kernel_version = KVERSION(osmaj, osmin, ospatch);</div><div class='del'>-</div><div class='del'>-    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-#if 0</div><div class='del'>-    if (fd &lt; 0 &amp;&amp; errno == ENOENT) {</div><div class='del'>-	/* try making it and see if that helps. */</div><div class='del'>-	if (mknod("/dev/ppp", S_IFCHR | S_IRUSR | S_IWUSR,</div><div class='del'>-		  makedev(108, 0)) &gt;= 0) {</div><div class='del'>-	    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	    if (fd &gt;= 0)</div><div class='del'>-		info("Created /dev/ppp device node");</div><div class='del'>-	    else</div><div class='del'>-		unlink("/dev/ppp");	/* didn't work, undo the mknod */</div><div class='del'>-	} else if (errno == EEXIST) {</div><div class='del'>-	    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* 0 */</div><div class='del'>-    if (fd &gt;= 0) {</div><div class='del'>-	new_style_driver = 1;</div><div class='del'>-</div><div class='del'>-	/* XXX should get from driver */</div><div class='del'>-	driver_version = 2;</div><div class='del'>-	driver_modification = 4;</div><div class='del'>-	driver_patch = 0;</div><div class='del'>-	close(fd);</div><div class='del'>-	return 1;</div><div class='del'>-    }</div><div class='del'>-    if (kernel_version &gt;= KVERSION(2,3,13)) {</div><div class='del'>-	if (errno == ENOENT)</div><div class='del'>-	    no_ppp_msg =</div><div class='del'>-		"pppd is unable to open the /dev/ppp device.\n"</div><div class='del'>-		"You need to create the /dev/ppp device node by\n"</div><div class='del'>-		"executing the following command as root:\n"</div><div class='del'>-		"	mknod /dev/ppp c 108 0\n";</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Open a socket for doing the ioctl operations.</div><div class='del'>- */    </div><div class='del'>-    s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (s &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-    </div><div class='del'>-    strlcpy (ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));</div><div class='del'>-    ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-/*</div><div class='del'>- * If the device did not exist then attempt to create one by putting the</div><div class='del'>- * current tty into the PPP discipline. If this works then obtain the</div><div class='del'>- * flags for the device again.</div><div class='del'>- */</div><div class='del'>-    if (!ok) {</div><div class='del'>-	if (ppp_registered()) {</div><div class='del'>-	    strlcpy (ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));</div><div class='del'>-	    ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Ensure that the hardware address is for PPP and not something else</div><div class='del'>- */</div><div class='del'>-    if (ok)</div><div class='del'>-        ok = ioctl (s, SIOCGIFHWADDR, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-</div><div class='del'>-    if (ok &amp;&amp; ((ifr.ifr_hwaddr.sa_family &amp; ~0xFF) != ARPHRD_PPP))</div><div class='del'>-        ok = 0;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  This is the PPP device. Validate the version of the driver at this</div><div class='del'>- *  point to ensure that this program will work with the driver.</div><div class='del'>- */</div><div class='del'>-    if (ok) {</div><div class='del'>-	char   abBuffer [1024];</div><div class='del'>-</div><div class='del'>-	ifr.ifr_data = abBuffer;</div><div class='del'>-	size = ioctl (s, SIOCGPPPVER, (caddr_t) &amp;ifr);</div><div class='del'>-	if (size &lt; 0) {</div><div class='del'>-	    error("Couldn't read driver version: %m");</div><div class='del'>-	    ok = 0;</div><div class='del'>-	    no_ppp_msg = "Sorry, couldn't verify kernel driver version\n";</div><div class='del'>-</div><div class='del'>-	} else {</div><div class='del'>-	    decode_version(abBuffer,</div><div class='del'>-			   &amp;driver_version,</div><div class='del'>-			   &amp;driver_modification,</div><div class='del'>-			   &amp;driver_patch);</div><div class='del'>-/*</div><div class='del'>- * Validate the version of the driver against the version that we used.</div><div class='del'>- */</div><div class='del'>-	    decode_version(VERSION,</div><div class='del'>-			   &amp;my_version,</div><div class='del'>-			   &amp;my_modification,</div><div class='del'>-			   &amp;my_patch);</div><div class='del'>-</div><div class='del'>-	    /* The version numbers must match */</div><div class='del'>-	    if (driver_version != my_version)</div><div class='del'>-		ok = 0;</div><div class='del'>-      </div><div class='del'>-	    /* The modification levels must be legal */</div><div class='del'>-	    if (driver_modification &lt; 3) {</div><div class='del'>-		if (driver_modification &gt;= 2) {</div><div class='del'>-		    /* we can cope with 2.2.0 and above */</div><div class='del'>-		    driver_is_old = 1;</div><div class='del'>-		} else {</div><div class='del'>-		    ok = 0;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    close (s);</div><div class='del'>-	    if (!ok) {</div><div class='del'>-		slprintf(route_buffer, sizeof(route_buffer),</div><div class='del'>-			 "Sorry - PPP driver version %d.%d.%d is out of date\n",</div><div class='del'>-			 driver_version, driver_modification, driver_patch);</div><div class='del'>-</div><div class='del'>-		no_ppp_msg = route_buffer;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifvjcomp - config tcp header compression</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifvjcomp (int u, int vjcomp, int cidcomp, int maxcid)</div><div class='del'>-{</div><div class='del'>-    u_int x = get_flags(ppp_dev_fd);</div><div class='del'>-</div><div class='del'>-    if (vjcomp) {</div><div class='del'>-        if (ioctl (ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &amp;maxcid) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(PPPIOCSMAXCID): %m(%d)", errno);</div><div class='del'>-	    vjcomp = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    x = vjcomp  ? x | SC_COMP_TCP     : x &amp;~ SC_COMP_TCP;</div><div class='del'>-    x = cidcomp ? x &amp; ~SC_NO_TCP_CCID : x | SC_NO_TCP_CCID;</div><div class='del'>-    set_flags (ppp_dev_fd, x);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifup - Config the interface up and enable IP packets to pass.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifup(int u)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl (SIOCGIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ifr.ifr_flags |= (IFF_UP | IFF_POINTOPOINT);</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if_is_up++;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifdown - Disable the indicated protocol and config the interface</div><div class='del'>- *	     down if there are no remaining protocols.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifdown (int u)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    if (if_is_up &amp;&amp; --if_is_up &gt; 0)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl (SIOCGIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ifr.ifr_flags &amp;= ~IFF_UP;</div><div class='del'>-    ifr.ifr_flags |= IFF_POINTOPOINT;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifaddr - Config the interface IP addresses and netmask.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr,</div><div class='del'>-	     u_int32_t net_mask)</div><div class='del'>-{</div><div class='del'>-    struct ifreq   ifr; </div><div class='del'>-    struct rtentry rt;</div><div class='del'>-    </div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    memset (&amp;rt,  '\0', sizeof (rt));</div><div class='del'>-    </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_addr,    AF_INET); </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_dstaddr, AF_INET); </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_netmask, AF_INET); </div><div class='del'>-</div><div class='del'>-    strlcpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-/*</div><div class='del'>- *  Set our IP address</div><div class='del'>- */</div><div class='del'>-    SIN_ADDR(ifr.ifr_addr) = our_adr;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (errno != EEXIST) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCSIFADDR): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-        else {</div><div class='del'>-	    warn("ioctl(SIOCSIFADDR): Address already exists");</div><div class='del'>-	}</div><div class='del'>-        return (0);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- *  Set the gateway address</div><div class='del'>- */</div><div class='del'>-    SIN_ADDR(ifr.ifr_dstaddr) = his_adr;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFDSTADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFDSTADDR): %m(%d)", errno); </div><div class='del'>-	return (0);</div><div class='del'>-    } </div><div class='del'>-/*</div><div class='del'>- *  Set the netmask.</div><div class='del'>- *  For recent kernels, force the netmask to 255.255.255.255.</div><div class='del'>- */</div><div class='del'>-    if (kernel_version &gt;= KVERSION(2,1,16))</div><div class='del'>-	net_mask = ~0L;</div><div class='del'>-    if (net_mask != 0) {</div><div class='del'>-	SIN_ADDR(ifr.ifr_netmask) = net_mask;</div><div class='del'>-	if (ioctl(sock_fd, SIOCSIFNETMASK, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCSIFNETMASK): %m(%d)", errno); </div><div class='del'>-	    return (0);</div><div class='del'>-	} </div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- *  Add the device route</div><div class='del'>- */</div><div class='del'>-    if (kernel_version &lt; KVERSION(2,1,16)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-	SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-	rt.rt_dev = ifname;</div><div class='del'>-</div><div class='del'>-	SIN_ADDR(rt.rt_gateway) = 0L;</div><div class='del'>-	SIN_ADDR(rt.rt_dst)     = his_adr;</div><div class='del'>-	rt.rt_flags = RTF_UP | RTF_HOST;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	    SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	    SIN_ADDR(rt.rt_genmask) = -1L;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCADDRT) device route: %m(%d)", errno);</div><div class='del'>-	    return (0);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* set ip_dynaddr in demand mode if address changes */</div><div class='del'>-    if (demand &amp;&amp; tune_kernel &amp;&amp; !dynaddr_set</div><div class='del'>-	&amp;&amp; our_old_addr &amp;&amp; our_old_addr != our_adr) {</div><div class='del'>-	/* set ip_dynaddr if possible */</div><div class='del'>-	char *path;</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	path = path_to_procfs("/sys/net/ipv4/ip_dynaddr");</div><div class='del'>-	if (path != 0 &amp;&amp; (fd = open(path, O_WRONLY)) &gt;= 0) {</div><div class='del'>-	    if (write(fd, "1", 1) != 1)</div><div class='del'>-		error("Couldn't enable dynamic IP addressing: %m");</div><div class='del'>-	    close(fd);</div><div class='del'>-	}</div><div class='del'>-	dynaddr_set = 1;	/* only 1 attempt */</div><div class='del'>-    }</div><div class='del'>-    our_old_addr = 0;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifaddr - Clear the interface IP addresses, and delete routes</div><div class='del'>- * through the interface if possible.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    if (kernel_version &lt; KVERSION(2,1,16)) {</div><div class='del'>-/*</div><div class='del'>- *  Delete the route through the device</div><div class='del'>- */</div><div class='del'>-	struct rtentry rt;</div><div class='del'>-	memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-</div><div class='del'>-	SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-	SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-	rt.rt_dev = ifname;</div><div class='del'>-</div><div class='del'>-	SIN_ADDR(rt.rt_gateway) = 0;</div><div class='del'>-	SIN_ADDR(rt.rt_dst)     = his_adr;</div><div class='del'>-	rt.rt_flags = RTF_UP | RTF_HOST;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	    SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	    SIN_ADDR(rt.rt_genmask) = -1L;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCDELRT, &amp;rt) &lt; 0 &amp;&amp; errno != ESRCH) {</div><div class='del'>-	    if (still_ppp() &amp;&amp; ! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCDELRT) device route: %m(%d)", errno);</div><div class='del'>-	    return (0);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* This way it is possible to have an IPX-only or IPv6-only interface */</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    SET_SA_FAMILY(ifr.ifr_addr, AF_INET);</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    </div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno)) {</div><div class='del'>-	    error("ioctl(SIOCSIFADDR): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    our_old_addr = our_adr;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-/********************************************************************</div><div class='del'>- * </div><div class='del'>- * sif6addr - Config the interface with an IPv6 link-local address</div><div class='del'>- */</div><div class='del'>-int sif6addr (int unit, eui64_t our_eui64, eui64_t his_eui64)</div><div class='del'>-{</div><div class='del'>-    struct in6_ifreq ifr6;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    struct in6_rtmsg rt6;</div><div class='del'>-</div><div class='del'>-    if (sock6_fd &lt; 0) {</div><div class='del'>-	errno = -sock6_fd;</div><div class='del'>-	error("IPv6 socket creation failed: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    memset(&amp;ifr, 0, sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock6_fd, SIOCGIFINDEX, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCGIFINDEX): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /* Local interface */</div><div class='del'>-    memset(&amp;ifr6, 0, sizeof(ifr6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(ifr6.ifr6_addr, our_eui64);</div><div class='del'>-    ifr6.ifr6_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    ifr6.ifr6_prefixlen = 10;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sock6_fd, SIOCSIFADDR, &amp;ifr6) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCSIFADDR): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /* Route to remote host */</div><div class='del'>-    memset(&amp;rt6, 0, sizeof(rt6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(rt6.rtmsg_dst, his_eui64);</div><div class='del'>-    rt6.rtmsg_flags = RTF_UP;</div><div class='del'>-    rt6.rtmsg_dst_len = 10;</div><div class='del'>-    rt6.rtmsg_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    rt6.rtmsg_metric = 1;</div><div class='del'>-    </div><div class='del'>-    if (ioctl(sock6_fd, SIOCADDRT, &amp;rt6) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCADDRT): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cif6addr - Remove IPv6 address from interface</div><div class='del'>- */</div><div class='del'>-int cif6addr (int unit, eui64_t our_eui64, eui64_t his_eui64)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    struct in6_ifreq ifr6;</div><div class='del'>-</div><div class='del'>-    if (sock6_fd &lt; 0) {</div><div class='del'>-	errno = -sock6_fd;</div><div class='del'>-	error("IPv6 socket creation failed: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock6_fd, SIOCGIFINDEX, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	error("cif6addr: ioctl(SIOCGIFINDEX): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    memset(&amp;ifr6, 0, sizeof(ifr6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(ifr6.ifr6_addr, our_eui64);</div><div class='del'>-    ifr6.ifr6_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    ifr6.ifr6_prefixlen = 10;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sock6_fd, SIOCDIFADDR, &amp;ifr6) &lt; 0) {</div><div class='del'>-	if (errno != EADDRNOTAVAIL) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("cif6addr: ioctl(SIOCDIFADDR): %m (%d)", errno);</div><div class='del'>-	}</div><div class='del'>-        else {</div><div class='del'>-	    warn("cif6addr: ioctl(SIOCDIFADDR): No such address");</div><div class='del'>-	}</div><div class='del'>-        return (0);</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_pty - get a pty master/slave pair and chown the slave side</div><div class='del'>- * to the uid given.  Assumes slave_name points to &gt;= 16 bytes of space.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_pty(master_fdp, slave_fdp, slave_name, uid)</div><div class='del'>-    int *master_fdp;</div><div class='del'>-    int *slave_fdp;</div><div class='del'>-    char *slave_name;</div><div class='del'>-    int uid;</div><div class='del'>-{</div><div class='del'>-    int i, mfd, sfd = -1;</div><div class='del'>-    char pty_name[16];</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-#ifdef TIOCGPTN</div><div class='del'>-    /*</div><div class='del'>-     * Try the unix98 way first.</div><div class='del'>-     */</div><div class='del'>-    mfd = open("/dev/ptmx", O_RDWR);</div><div class='del'>-    if (mfd &gt;= 0) {</div><div class='del'>-	int ptn;</div><div class='del'>-	if (ioctl(mfd, TIOCGPTN, &amp;ptn) &gt;= 0) {</div><div class='del'>-	    slprintf(pty_name, sizeof(pty_name), "/dev/pts/%d", ptn);</div><div class='del'>-	    chmod(pty_name, S_IRUSR | S_IWUSR);</div><div class='del'>-#ifdef TIOCSPTLCK</div><div class='del'>-	    ptn = 0;</div><div class='del'>-	    if (ioctl(mfd, TIOCSPTLCK, &amp;ptn) &lt; 0)</div><div class='del'>-		warn("Couldn't unlock pty slave %s: %m", pty_name);</div><div class='del'>-#endif</div><div class='del'>-	    if ((sfd = open(pty_name, O_RDWR | O_NOCTTY)) &lt; 0)</div><div class='del'>-		warn("Couldn't open pty slave %s: %m", pty_name);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* TIOCGPTN */</div><div class='del'>-</div><div class='del'>-    if (sfd &lt; 0) {</div><div class='del'>-	/* the old way - scan through the pty name space */</div><div class='del'>-	for (i = 0; i &lt; 64; ++i) {</div><div class='del'>-	    slprintf(pty_name, sizeof(pty_name), "/dev/pty%c%x",</div><div class='del'>-		     'p' + i / 16, i % 16);</div><div class='del'>-	    mfd = open(pty_name, O_RDWR, 0);</div><div class='del'>-	    if (mfd &gt;= 0) {</div><div class='del'>-		pty_name[5] = 't';</div><div class='del'>-		sfd = open(pty_name, O_RDWR | O_NOCTTY, 0);</div><div class='del'>-		if (sfd &gt;= 0) {</div><div class='del'>-		    fchown(sfd, uid, -1);</div><div class='del'>-		    fchmod(sfd, S_IRUSR | S_IWUSR);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		close(mfd);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (sfd &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    strlcpy(slave_name, pty_name, 16);</div><div class='del'>-    *master_fdp = mfd;</div><div class='del'>-    *slave_fdp = sfd;</div><div class='del'>-    if (tcgetattr(sfd, &amp;tios) == 0) {</div><div class='del'>-	tios.c_cflag &amp;= ~(CSIZE | CSTOPB | PARENB);</div><div class='del'>-	tios.c_cflag |= CS8 | CREAD | CLOCAL;</div><div class='del'>-	tios.c_iflag  = IGNPAR;</div><div class='del'>-	tios.c_oflag  = 0;</div><div class='del'>-	tios.c_lflag  = 0;</div><div class='del'>-	if (tcsetattr(sfd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	    warn("couldn't set attributes on pty: %m");</div><div class='del'>-    } else</div><div class='del'>-	warn("couldn't get attributes on pty: %m");</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * open_loopback - open the device we use for getting packets</div><div class='del'>- * in demand mode.  Under Linux, we use a pty master/slave pair.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-open_ppp_loopback(void)</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    looped = 1;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	/* allocate ourselves a ppp unit */</div><div class='del'>-	if (make_ppp_unit() &lt; 0)</div><div class='del'>-	    die(1);</div><div class='del'>-	set_flags(ppp_dev_fd, SC_LOOP_TRAFFIC);</div><div class='del'>-	set_kdebugflag(kdebugflag);</div><div class='del'>-	ppp_fd = -1;</div><div class='del'>-	return ppp_dev_fd;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!get_pty(&amp;master_fd, &amp;slave_fd, loop_name, 0))</div><div class='del'>-	fatal("No free pty for loopback");</div><div class='del'>-    SYSDEBUG(("using %s for loopback", loop_name));</div><div class='del'>-</div><div class='del'>-    set_ppp_fd(slave_fd);</div><div class='del'>-</div><div class='del'>-    flags = fcntl(master_fd, F_GETFL);</div><div class='del'>-    if (flags == -1 ||</div><div class='del'>-	fcntl(master_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	warn("couldn't set master loopback to nonblock: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    flags = fcntl(ppp_fd, F_GETFL);</div><div class='del'>-    if (flags == -1 ||</div><div class='del'>-	fcntl(ppp_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	warn("couldn't set slave loopback to nonblock: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    if (ioctl(ppp_fd, TIOCSETD, &amp;ppp_disc) &lt; 0)</div><div class='del'>-	fatal("ioctl(TIOCSETD): %m(%d)", errno);</div><div class='del'>-/*</div><div class='del'>- * Find out which interface we were given.</div><div class='del'>- */</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCGUNIT, &amp;ifunit) &lt; 0)</div><div class='del'>-	fatal("ioctl(PPPIOCGUNIT): %m(%d)", errno);</div><div class='del'>-/*</div><div class='del'>- * Enable debug in the driver if requested.</div><div class='del'>- */</div><div class='del'>-    set_kdebugflag (kdebugflag);</div><div class='del'>-</div><div class='del'>-    return master_fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * restore_loop - reattach the ppp unit to the loopback.</div><div class='del'>- *</div><div class='del'>- * The kernel ppp driver automatically reattaches the ppp unit to</div><div class='del'>- * the loopback if the serial port is set to a line discipline other</div><div class='del'>- * than ppp, or if it detects a modem hangup.  The former will happen</div><div class='del'>- * in disestablish_ppp if the latter hasn't already happened, so we</div><div class='del'>- * shouldn't need to do anything.</div><div class='del'>- *</div><div class='del'>- * Just to be sure, set the real serial port to the normal discipline.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-restore_loop(void)</div><div class='del'>-{</div><div class='del'>-    looped = 1;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) | SC_LOOP_TRAFFIC);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (ppp_fd != slave_fd) {</div><div class='del'>-	(void) ioctl(ppp_fd, TIOCSETD, &amp;tty_disc);</div><div class='del'>-	set_ppp_fd(slave_fd);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifnpmode - Set the mode for handling packets for a given NP.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-sifnpmode(u, proto, mode)</div><div class='del'>-    int u;</div><div class='del'>-    int proto;</div><div class='del'>-    enum NPmode mode;</div><div class='del'>-{</div><div class='del'>-    struct npioctl npi;</div><div class='del'>-</div><div class='del'>-    npi.protocol = proto;</div><div class='del'>-    npi.mode     = mode;</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSNPMODE, (caddr_t) &amp;npi) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(PPPIOCSNPMODE, %d, %d): %m (%d)",</div><div class='del'>-		   proto, mode, errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sipxfaddr - Config the interface IPX networknumber</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sipxfaddr (int unit, unsigned long int network, unsigned char * node )</div><div class='del'>-{</div><div class='del'>-    int    result = 1;</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-    int    skfd; </div><div class='del'>-    struct ifreq         ifr;</div><div class='del'>-    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &amp;ifr.ifr_addr;</div><div class='del'>-</div><div class='del'>-    skfd = socket (AF_IPX, SOCK_DGRAM, 0);</div><div class='del'>-    if (skfd &lt; 0) { </div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    dbglog("socket(AF_IPX): %m (%d)", errno);</div><div class='del'>-	result = 0;</div><div class='del'>-    }</div><div class='del'>-    else {</div><div class='del'>-	memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-	strlcpy (ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-</div><div class='del'>-	memcpy (sipx-&gt;sipx_node, node, IPX_NODE_LEN);</div><div class='del'>-	sipx-&gt;sipx_family  = AF_IPX;</div><div class='del'>-	sipx-&gt;sipx_port    = 0;</div><div class='del'>-	sipx-&gt;sipx_network = htonl (network);</div><div class='del'>-	sipx-&gt;sipx_type    = IPX_FRAME_ETHERII;</div><div class='del'>-	sipx-&gt;sipx_action  = IPX_CRTITF;</div><div class='del'>-/*</div><div class='del'>- *  Set the IPX device</div><div class='del'>- */</div><div class='del'>-	if (ioctl(skfd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    result = 0;</div><div class='del'>-	    if (errno != EEXIST) {</div><div class='del'>-		if (! ok_error (errno))</div><div class='del'>-		    dbglog("ioctl(SIOCSIFADDR, CRTITF): %m (%d)", errno);</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		warn("ioctl(SIOCSIFADDR, CRTITF): Address already exists");</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	close (skfd);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cipxfaddr - Clear the information for the IPX network. The IPX routes</div><div class='del'>- *	       are removed and the device is no longer able to pass IPX</div><div class='del'>- *	       frames.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cipxfaddr (int unit)</div><div class='del'>-{</div><div class='del'>-    int    result = 1;</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-    int    skfd; </div><div class='del'>-    struct ifreq         ifr;</div><div class='del'>-    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &amp;ifr.ifr_addr;</div><div class='del'>-</div><div class='del'>-    skfd = socket (AF_IPX, SOCK_DGRAM, 0);</div><div class='del'>-    if (skfd &lt; 0) { </div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    dbglog("socket(AF_IPX): %m (%d)", errno);</div><div class='del'>-	result = 0;</div><div class='del'>-    }</div><div class='del'>-    else {</div><div class='del'>-	memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-	strlcpy (ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-</div><div class='del'>-	sipx-&gt;sipx_type    = IPX_FRAME_ETHERII;</div><div class='del'>-	sipx-&gt;sipx_action  = IPX_DLTITF;</div><div class='del'>-	sipx-&gt;sipx_family  = AF_IPX;</div><div class='del'>-/*</div><div class='del'>- *  Set the IPX device</div><div class='del'>- */</div><div class='del'>-	if (ioctl(skfd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		info("ioctl(SIOCSIFADDR, IPX_DLTITF): %m (%d)", errno);</div><div class='del'>-	    result = 0;</div><div class='del'>-	}</div><div class='del'>-	close (skfd);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Use the hostname as part of the random number seed.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_host_seed()</div><div class='del'>-{</div><div class='del'>-    int h;</div><div class='del'>-    char *p = hostname;</div><div class='del'>-</div><div class='del'>-    h = 407;</div><div class='del'>-    for (p = hostname; *p != 0; ++p)</div><div class='del'>-	h = h * 37 + *p;</div><div class='del'>-    return h;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_check_options - check the options that the user specified</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-sys_check_options(void)</div><div class='del'>-{</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-/*</div><div class='del'>- * Disable the IPX protocol if the support is not present in the kernel.</div><div class='del'>- */</div><div class='del'>-    char *path;</div><div class='del'>-</div><div class='del'>-    if (ipxcp_protent.enabled_flag) {</div><div class='del'>-	struct stat stat_buf;</div><div class='del'>-        if ((path = path_to_procfs("/net/ipx_interface")) == 0</div><div class='del'>-	    || lstat(path, &amp;stat_buf) &lt; 0) {</div><div class='del'>-	    error("IPX support is not present in the kernel\n");</div><div class='del'>-	    ipxcp_protent.enabled_flag = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    if (demand &amp;&amp; driver_is_old) {</div><div class='del'>-	option_error("demand dialling is not supported by kernel driver "</div><div class='del'>-		     "version %d.%d.%d", driver_version, driver_modification,</div><div class='del'>-		     driver_patch);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (multilink &amp;&amp; !new_style_driver) {</div><div class='del'>-	warn("Warning: multilink is not supported by the kernel driver");</div><div class='del'>-	multilink = 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/sys-linux.c.wtmp b/mdk-stage1/ppp/pppd/sys-linux.c.wtmp<br/>deleted file mode 100644<br/>index f1b48423e..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/sys-linux.c.wtmp?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/sys-linux.c.wtmp</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2750 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * sys-linux.c - System-dependent procedures for setting up</div><div class='del'>- * PPP interfaces on Linux systems</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1989 Carnegie Mellon University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Redistribution and use in source and binary forms are permitted</div><div class='del'>- * provided that the above copyright notice and this paragraph are</div><div class='del'>- * duplicated in all such forms and that any documentation,</div><div class='del'>- * advertising materials, and other materials related to such</div><div class='del'>- * distribution and use acknowledge that the software was developed</div><div class='del'>- * by Carnegie Mellon University.  The name of the</div><div class='del'>- * University may not be used to endorse or promote products derived</div><div class='del'>- * from this software without specific prior written permission.</div><div class='del'>- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR</div><div class='del'>- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED</div><div class='del'>- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#include &lt;sys/ioctl.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/errno.h&gt;</div><div class='del'>-#include &lt;sys/file.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/utsname.h&gt;</div><div class='del'>-#include &lt;sys/sysmacros.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;syslog.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;time.h&gt;</div><div class='del'>-#include &lt;memory.h&gt;</div><div class='del'>-#include &lt;utmp.h&gt;</div><div class='del'>-#include &lt;mntent.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-</div><div class='del'>-/* This is in netdevice.h. However, this compile will fail miserably if</div><div class='del'>-   you attempt to include netdevice.h because it has so many references</div><div class='del'>-   to __memcpy functions which it should not attempt to do. So, since I</div><div class='del'>-   really don't use it, but it must be defined, define it now. */</div><div class='del'>-</div><div class='del'>-#ifndef MAX_ADDR_LEN</div><div class='del'>-#define MAX_ADDR_LEN 7</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#if __GLIBC__ &gt;= 2</div><div class='del'>-#include &lt;asm/types.h&gt;		/* glibc 2 conflicts with linux/types.h */</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/if_arp.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;netinet/if_ether.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;linux/types.h&gt;</div><div class='del'>-#include &lt;linux/if.h&gt;</div><div class='del'>-#include &lt;linux/if_arp.h&gt;</div><div class='del'>-#include &lt;linux/route.h&gt;</div><div class='del'>-#include &lt;linux/if_ether.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#include &lt;arpa/inet.h&gt;</div><div class='del'>-</div><div class='del'>-#include &lt;linux/ppp_defs.h&gt;</div><div class='del'>-#include &lt;linux/if_ppp.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-#include "ipxcp.h"</div><div class='del'>-#if __GLIBC__ &gt;= 2 &amp;&amp; \</div><div class='del'>-    !(defined(__powerpc__) &amp;&amp; __GLIBC__ == 2 &amp;&amp; __GLIBC_MINOR__ == 0)</div><div class='del'>-#include &lt;netipx/ipx.h&gt;</div><div class='del'>-#else</div><div class='del'>-#include &lt;linux/ipx.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#endif /* IPX_CHANGE */</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-#include &lt;net/bpf.h&gt;</div><div class='del'>-#include &lt;linux/filter.h&gt;</div><div class='del'>-#endif /* PPP_FILTER */</div><div class='del'>-</div><div class='del'>-#ifdef LOCKLIB</div><div class='del'>-#include &lt;sys/locks.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-#ifndef _LINUX_IN6_H</div><div class='del'>-/*</div><div class='del'>- *    This is in linux/include/net/ipv6.h.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct in6_ifreq {</div><div class='del'>-    struct in6_addr ifr6_addr;</div><div class='del'>-    __u32 ifr6_prefixlen;</div><div class='del'>-    unsigned int ifr6_ifindex;</div><div class='del'>-};</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#define IN6_LLADDR_FROM_EUI64(sin6, eui64) do {			\</div><div class='del'>-	memset(&amp;sin6.s6_addr, 0, sizeof(struct in6_addr));	\</div><div class='del'>-	sin6.s6_addr16[0] = htons(0xfe80); 			\</div><div class='del'>-	eui64_copy(eui64, sin6.s6_addr32[2]);			\</div><div class='del'>-	} while (0)</div><div class='del'>-</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-</div><div class='del'>-/* We can get an EIO error on an ioctl if the modem has hung up */</div><div class='del'>-#define ok_error(num) ((num)==EIO)</div><div class='del'>-</div><div class='del'>-static int tty_disc = N_TTY;	/* The TTY discipline */</div><div class='del'>-static int ppp_disc = N_PPP;	/* The PPP discpline */</div><div class='del'>-static int initfdflags = -1;	/* Initial file descriptor flags for fd */</div><div class='del'>-static int ppp_fd = -1;		/* fd which is set to PPP discipline */</div><div class='del'>-static int sock_fd = -1;	/* socket for doing interface ioctls */</div><div class='del'>-static int slave_fd = -1;</div><div class='del'>-static int master_fd = -1;</div><div class='del'>-#ifdef INET6</div><div class='del'>-static int sock6_fd = -1;</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-static int ppp_dev_fd = -1;	/* fd for /dev/ppp (new style driver) */</div><div class='del'>-static int chindex;		/* channel index (new style driver) */</div><div class='del'>-</div><div class='del'>-static fd_set in_fds;		/* set of fds that wait_input waits for */</div><div class='del'>-static int max_in_fd;		/* highest fd set in in_fds */</div><div class='del'>-</div><div class='del'>-static int has_proxy_arp       = 0;</div><div class='del'>-static int driver_version      = 0;</div><div class='del'>-static int driver_modification = 0;</div><div class='del'>-static int driver_patch        = 0;</div><div class='del'>-static int driver_is_old       = 0;</div><div class='del'>-static int restore_term        = 0;	/* 1 =&gt; we've munged the terminal */</div><div class='del'>-static struct termios inittermios;	/* Initial TTY termios */</div><div class='del'>-</div><div class='del'>-static int new_style_driver = 0;</div><div class='del'>-</div><div class='del'>-static char loop_name[20];</div><div class='del'>-static unsigned char inbuf[512]; /* buffer for chars read from loopback */</div><div class='del'>-</div><div class='del'>-static int	if_is_up;	/* Interface has been marked up */</div><div class='del'>-static u_int32_t default_route_gateway;	/* Gateway for default route added */</div><div class='del'>-static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */</div><div class='del'>-static char proxy_arp_dev[16];		/* Device for proxy arp entry */</div><div class='del'>-static u_int32_t our_old_addr;		/* for detecting address changes */</div><div class='del'>-static int	dynaddr_set;		/* 1 if ip_dynaddr set */</div><div class='del'>-static int	looped;			/* 1 if using loop */</div><div class='del'>-static int	link_mtu;		/* mtu for the link (not bundle) */</div><div class='del'>-</div><div class='del'>-static struct utsname utsname;	/* for the kernel version */</div><div class='del'>-static int kernel_version;</div><div class='del'>-#define KVERSION(j,n,p)	((j)*1000000 + (n)*1000 + (p))</div><div class='del'>-</div><div class='del'>-#define MAX_IFS		100</div><div class='del'>-</div><div class='del'>-#define FLAGS_GOOD (IFF_UP          | IFF_BROADCAST)</div><div class='del'>-#define FLAGS_MASK (IFF_UP          | IFF_BROADCAST | \</div><div class='del'>-		    IFF_POINTOPOINT | IFF_LOOPBACK  | IFF_NOARP)</div><div class='del'>-</div><div class='del'>-#define SIN_ADDR(x)	(((struct sockaddr_in *) (&amp;(x)))-&gt;sin_addr.s_addr)</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-static int get_flags (int fd);</div><div class='del'>-static void set_flags (int fd, int flags);</div><div class='del'>-static int translate_speed (int bps);</div><div class='del'>-static int baud_rate_of (int speed);</div><div class='del'>-static void close_route_table (void);</div><div class='del'>-static int open_route_table (void);</div><div class='del'>-static int read_route_table (struct rtentry *rt);</div><div class='del'>-static int defaultroute_exists (struct rtentry *rt);</div><div class='del'>-static int get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr,</div><div class='del'>-			   char *name, int namelen);</div><div class='del'>-static void decode_version (char *buf, int *version, int *mod, int *patch);</div><div class='del'>-static int set_kdebugflag(int level);</div><div class='del'>-static int ppp_registered(void);</div><div class='del'>-static int make_ppp_unit(void);</div><div class='del'>-static void restore_loop(void);	/* Transfer ppp unit back to loopback */</div><div class='del'>-</div><div class='del'>-extern u_char	inpacket_buf[];	/* borrowed from main.c */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * SET_SA_FAMILY - set the sa_family field of a struct sockaddr,</div><div class='del'>- * if it exists.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define SET_SA_FAMILY(addr, family)			\</div><div class='del'>-    memset ((char *) &amp;(addr), '\0', sizeof(addr));	\</div><div class='del'>-    addr.sa_family = (family);</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Determine if the PPP connection should still be present.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-extern int hungup;</div><div class='del'>-</div><div class='del'>-/* new_fd is the fd of a tty */</div><div class='del'>-static void set_ppp_fd (int new_fd)</div><div class='del'>-{</div><div class='del'>-	SYSDEBUG ((LOG_DEBUG, "setting ppp_fd to %d\n", new_fd));</div><div class='del'>-	ppp_fd = new_fd;</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		ppp_dev_fd = new_fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int still_ppp(void)</div><div class='del'>-{</div><div class='del'>-	if (new_style_driver)</div><div class='del'>-		return !hungup &amp;&amp; ppp_fd &gt;= 0;</div><div class='del'>-	if (!hungup || ppp_fd == slave_fd)</div><div class='del'>-		return 1;</div><div class='del'>-	if (slave_fd &gt;= 0) {</div><div class='del'>-		set_ppp_fd(slave_fd);</div><div class='del'>-		return 1;</div><div class='del'>-	}</div><div class='del'>-	return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Functions to read and set the flags value in the device driver</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int get_flags (int fd)</div><div class='del'>-{    </div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    if (ioctl(fd, PPPIOCGFLAGS, (caddr_t) &amp;flags) &lt; 0) {</div><div class='del'>-	if ( ok_error (errno) )</div><div class='del'>-	    flags = 0;</div><div class='del'>-	else</div><div class='del'>-	    fatal("ioctl(PPPIOCGFLAGS): %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "get flags = %x\n", flags));</div><div class='del'>-    return flags;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************/</div><div class='del'>-</div><div class='del'>-static void set_flags (int fd, int flags)</div><div class='del'>-{    </div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "set flags = %x\n", flags));</div><div class='del'>-</div><div class='del'>-    if (ioctl(fd, PPPIOCSFLAGS, (caddr_t) &amp;flags) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno) )</div><div class='del'>-	    fatal("ioctl(PPPIOCSFLAGS, %x): %m", flags, errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_init - System-dependent initialization.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void sys_init(void)</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	ppp_dev_fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	if (ppp_dev_fd &lt; 0)</div><div class='del'>-	    fatal("Couldn't open /dev/ppp: %m");</div><div class='del'>-	flags = fcntl(ppp_dev_fd, F_GETFL);</div><div class='del'>-	if (flags == -1</div><div class='del'>-	    || fcntl(ppp_dev_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	    warn("Couldn't set /dev/ppp to nonblock: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Get an internet socket for doing socket ioctls. */</div><div class='del'>-    sock_fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (sock_fd &lt; 0)</div><div class='del'>-	fatal("Couldn't create IP socket: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-    sock6_fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (sock6_fd &lt; 0)</div><div class='del'>-	sock6_fd = -errno;	/* save errno for later */</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    FD_ZERO(&amp;in_fds);</div><div class='del'>-    max_in_fd = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_cleanup - restore any system state we modified before exiting:</div><div class='del'>- * mark the interface down, delete default route and/or proxy arp entry.</div><div class='del'>- * This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void sys_cleanup(void)</div><div class='del'>-{</div><div class='del'>-/*</div><div class='del'>- * Take down the device</div><div class='del'>- */</div><div class='del'>-    if (if_is_up) {</div><div class='del'>-	if_is_up = 0;</div><div class='del'>-	sifdown(0);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Delete any routes through the device.</div><div class='del'>- */</div><div class='del'>-    if (default_route_gateway != 0)</div><div class='del'>-	cifdefaultroute(0, 0, default_route_gateway);</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp)</div><div class='del'>-	cifproxyarp(0, proxy_arp_addr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_close - Clean up in a child process before execing.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_close(void)</div><div class='del'>-{</div><div class='del'>-    if (new_style_driver)</div><div class='del'>-	close(ppp_dev_fd);</div><div class='del'>-    if (sock_fd &gt;= 0)</div><div class='del'>-	close(sock_fd);</div><div class='del'>-    if (slave_fd &gt;= 0)</div><div class='del'>-	close(slave_fd);</div><div class='del'>-    if (master_fd &gt;= 0)</div><div class='del'>-	close(master_fd);</div><div class='del'>-    closelog();</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * set_kdebugflag - Define the debugging level for the kernel</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int set_kdebugflag (int requested_level)</div><div class='del'>-{</div><div class='del'>-    if (new_style_driver &amp;&amp; ifunit &lt; 0)</div><div class='del'>-	return 1;</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSDEBUG, &amp;requested_level) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno) )</div><div class='del'>-	    error("ioctl(PPPIOCSDEBUG): %m");</div><div class='del'>-	return (0);</div><div class='del'>-    }</div><div class='del'>-    SYSDEBUG ((LOG_INFO, "set kernel debugging level to %d",</div><div class='del'>-		requested_level));</div><div class='del'>-    return (1);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_establish_ppp - Turn the serial port into a ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int tty_establish_ppp (int tty_fd)</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    int fd = -1;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Ensure that the tty device is in exclusive mode.</div><div class='del'>- */</div><div class='del'>-    if (ioctl(tty_fd, TIOCEXCL, 0) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    warn("Couldn't make tty exclusive: %m");</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Demand mode - prime the old ppp device to relinquish the unit.</div><div class='del'>- */</div><div class='del'>-    if (!new_style_driver &amp;&amp; looped</div><div class='del'>-	&amp;&amp; ioctl(slave_fd, PPPIOCXFERUNIT, 0) &lt; 0) {</div><div class='del'>-	error("ioctl(transfer ppp unit): %m");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Set the current tty to the PPP discpline</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#ifndef N_SYNC_PPP</div><div class='del'>-#define N_SYNC_PPP 14</div><div class='del'>-#endif</div><div class='del'>-    ppp_disc = (new_style_driver &amp;&amp; sync_serial)? N_SYNC_PPP: N_PPP;</div><div class='del'>-    if (ioctl(tty_fd, TIOCSETD, &amp;ppp_disc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno) ) {</div><div class='del'>-	    error("Couldn't set tty to PPP discipline: %m");</div><div class='del'>-	    return -1;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	/* Open another instance of /dev/ppp and connect the channel to it */</div><div class='del'>-	int flags;</div><div class='del'>-</div><div class='del'>-	if (ioctl(tty_fd, PPPIOCGCHAN, &amp;chindex) == -1) {</div><div class='del'>-	    error("Couldn't get channel number: %m");</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	dbglog("using channel %d", chindex);</div><div class='del'>-	fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	if (fd &lt; 0) {</div><div class='del'>-	    error("Couldn't reopen /dev/ppp: %m");</div><div class='del'>-	    goto err;</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(fd, PPPIOCATTCHAN, &amp;chindex) &lt; 0) {</div><div class='del'>-	    error("Couldn't attach to channel %d: %m", chindex);</div><div class='del'>-	    goto err_close;</div><div class='del'>-	}</div><div class='del'>-	flags = fcntl(fd, F_GETFL);</div><div class='del'>-	if (flags == -1 || fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	    warn("Couldn't set /dev/ppp (channel) to nonblock: %m");</div><div class='del'>-	set_ppp_fd(fd);</div><div class='del'>-</div><div class='del'>-	if (!looped)</div><div class='del'>-	    ifunit = -1;</div><div class='del'>-	if (!looped &amp;&amp; !multilink) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Create a new PPP unit.</div><div class='del'>-	     */</div><div class='del'>-	    if (make_ppp_unit() &lt; 0)</div><div class='del'>-		goto err_close;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (looped)</div><div class='del'>-	    set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) &amp; ~SC_LOOP_TRAFFIC);</div><div class='del'>-</div><div class='del'>-	if (!multilink) {</div><div class='del'>-	    add_fd(ppp_dev_fd);</div><div class='del'>-	    if (ioctl(fd, PPPIOCCONNECT, &amp;ifunit) &lt; 0) {</div><div class='del'>-		error("Couldn't attach to PPP unit %d: %m", ifunit);</div><div class='del'>-		goto err_close;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-    } else {</div><div class='del'>-	/*</div><div class='del'>-	 * Old-style driver: find out which interface we were given.</div><div class='del'>-	 */</div><div class='del'>-	set_ppp_fd (tty_fd);</div><div class='del'>-	if (ioctl(tty_fd, PPPIOCGUNIT, &amp;x) &lt; 0) {	</div><div class='del'>-	    if (ok_error (errno))</div><div class='del'>-		goto err;</div><div class='del'>-	    fatal("ioctl(PPPIOCGUNIT): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-	/* Check that we got the same unit again. */</div><div class='del'>-	if (looped &amp;&amp; x != ifunit)</div><div class='del'>-	    fatal("transfer_ppp failed: wanted unit %d, got %d", ifunit, x);</div><div class='del'>-	ifunit = x;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Fetch the initial file flags and reset blocking mode on the file.</div><div class='del'>-	 */</div><div class='del'>-	initfdflags = fcntl(tty_fd, F_GETFL);</div><div class='del'>-	if (initfdflags == -1 ||</div><div class='del'>-	    fcntl(tty_fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("Couldn't set device to non-blocking mode: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    looped = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Enable debug in the driver if requested.</div><div class='del'>-     */</div><div class='del'>-    if (!looped)</div><div class='del'>-	set_kdebugflag (kdebugflag);</div><div class='del'>-</div><div class='del'>-#define SC_RCVB	(SC_RCV_B7_0 | SC_RCV_B7_1 | SC_RCV_EVNP | SC_RCV_ODDP)</div><div class='del'>-#define SC_LOGB	(SC_DEBUG | SC_LOG_INPKT | SC_LOG_OUTPKT | SC_LOG_RAWIN \</div><div class='del'>-		 | SC_LOG_FLUSH)</div><div class='del'>-</div><div class='del'>-    set_flags(ppp_fd, ((get_flags(ppp_fd) &amp; ~(SC_RCVB | SC_LOGB))</div><div class='del'>-		       | ((kdebugflag * SC_DEBUG) &amp; SC_LOGB)));</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_NOTICE, "Using version %d.%d.%d of PPP driver",</div><div class='del'>-	    driver_version, driver_modification, driver_patch));</div><div class='del'>-</div><div class='del'>-    return ppp_fd;</div><div class='del'>-</div><div class='del'>- err_close:</div><div class='del'>-    close(fd);</div><div class='del'>- err:</div><div class='del'>-    if (ioctl(tty_fd, TIOCSETD, &amp;tty_disc) &lt; 0 &amp;&amp; !ok_error(errno))</div><div class='del'>-	warn("Couldn't reset tty to normal line discipline: %m");</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_disestablish_ppp - Restore the serial port to normal operation,</div><div class='del'>- * and reconnect the ppp unit to the loopback if in demand mode.</div><div class='del'>- * This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_disestablish_ppp(int tty_fd)</div><div class='del'>-{</div><div class='del'>-    if (demand)</div><div class='del'>-	restore_loop();</div><div class='del'>-    if (!hungup) {</div><div class='del'>-/*</div><div class='del'>- * Flush the tty output buffer so that the TIOCSETD doesn't hang.</div><div class='del'>- */</div><div class='del'>-	if (tcflush(tty_fd, TCIOFLUSH) &lt; 0)</div><div class='del'>-	    warn("tcflush failed: %m");</div><div class='del'>-/*</div><div class='del'>- * Restore the previous line discipline</div><div class='del'>- */</div><div class='del'>-	if (ioctl(tty_fd, TIOCSETD, &amp;tty_disc) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		error("ioctl(TIOCSETD, N_TTY): %m");</div><div class='del'>-	}</div><div class='del'>-	</div><div class='del'>-	if (ioctl(tty_fd, TIOCNXCL, 0) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("ioctl(TIOCNXCL): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	/* Reset non-blocking mode on fd. */</div><div class='del'>-	if (initfdflags != -1 &amp;&amp; fcntl(tty_fd, F_SETFL, initfdflags) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error (errno))</div><div class='del'>-		warn("Couldn't restore device fd flags: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    initfdflags = -1;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	close(ppp_fd);</div><div class='del'>-	ppp_fd = -1;</div><div class='del'>-	if (!looped &amp;&amp; ifunit &gt;= 0 &amp;&amp; ioctl(ppp_dev_fd, PPPIOCDETACH) &lt; 0)</div><div class='del'>-	    error("Couldn't release PPP unit: %m");</div><div class='del'>-	if (!multilink)</div><div class='del'>-	    remove_fd(ppp_dev_fd);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * make_ppp_unit - make a new ppp unit for ppp_dev_fd.</div><div class='del'>- * Assumes new_style_driver.</div><div class='del'>- */</div><div class='del'>-static int make_ppp_unit()</div><div class='del'>-{</div><div class='del'>-	int x;</div><div class='del'>-</div><div class='del'>-	ifunit = req_unit;</div><div class='del'>-	x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &amp;ifunit);</div><div class='del'>-	if (x &lt; 0 &amp;&amp; req_unit &gt;= 0 &amp;&amp; errno == EEXIST) {</div><div class='del'>-		warn("Couldn't allocate PPP unit %d as it is already in use");</div><div class='del'>-		ifunit = -1;</div><div class='del'>-		x = ioctl(ppp_dev_fd, PPPIOCNEWUNIT, &amp;ifunit);</div><div class='del'>-	}</div><div class='del'>-	if (x &lt; 0)</div><div class='del'>-		error("Couldn't create new ppp unit: %m");</div><div class='del'>-	return x;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cfg_bundle - configure the existing bundle.</div><div class='del'>- * Used in demand mode.</div><div class='del'>- */</div><div class='del'>-void cfg_bundle(int mrru, int mtru, int rssn, int tssn)</div><div class='del'>-{</div><div class='del'>-	int flags;</div><div class='del'>-</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	/* set the mrru, mtu and flags */</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSMRRU, &amp;mrru) &lt; 0)</div><div class='del'>-		error("Couldn't set MRRU: %m");</div><div class='del'>-	flags = get_flags(ppp_dev_fd);</div><div class='del'>-	flags &amp;= ~(SC_MP_SHORTSEQ | SC_MP_XSHORTSEQ);</div><div class='del'>-	flags |= (rssn? SC_MP_SHORTSEQ: 0) | (tssn? SC_MP_XSHORTSEQ: 0)</div><div class='del'>-		| (mrru? SC_MULTILINK: 0);</div><div class='del'>-</div><div class='del'>-	set_flags(ppp_dev_fd, flags);</div><div class='del'>-</div><div class='del'>-	/* connect up the channel */</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCCONNECT, &amp;ifunit) &lt; 0)</div><div class='del'>-		fatal("Couldn't attach to PPP unit %d: %m", ifunit);</div><div class='del'>-	add_fd(ppp_dev_fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * make_new_bundle - create a new PPP unit (i.e. a bundle)</div><div class='del'>- * and connect our channel to it.  This should only get called</div><div class='del'>- * if `multilink' was set at the time establish_ppp was called.</div><div class='del'>- * In demand mode this uses our existing bundle instead of making</div><div class='del'>- * a new one.</div><div class='del'>- */</div><div class='del'>-void make_new_bundle(int mrru, int mtru, int rssn, int tssn)</div><div class='del'>-{</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return;</div><div class='del'>-</div><div class='del'>-	/* make us a ppp unit */</div><div class='del'>-	if (make_ppp_unit() &lt; 0)</div><div class='del'>-		die(1);</div><div class='del'>-</div><div class='del'>-	/* set the mrru and flags */</div><div class='del'>-	cfg_bundle(mrru, mtru, rssn, tssn);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * bundle_attach - attach our link to a given PPP unit.</div><div class='del'>- * We assume the unit is controlled by another pppd.</div><div class='del'>- */</div><div class='del'>-int bundle_attach(int ifnum)</div><div class='del'>-{</div><div class='del'>-	if (!new_style_driver)</div><div class='del'>-		return -1;</div><div class='del'>-</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCATTACH, &amp;ifnum) &lt; 0) {</div><div class='del'>-		if (errno == ENXIO)</div><div class='del'>-			return 0;	/* doesn't still exist */</div><div class='del'>-		fatal("Couldn't attach to interface unit %d: %m\n", ifnum);</div><div class='del'>-	}</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCCONNECT, &amp;ifnum) &lt; 0)</div><div class='del'>-		fatal("Couldn't connect to interface unit %d: %m", ifnum);</div><div class='del'>-	set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) | SC_MULTILINK);</div><div class='del'>-</div><div class='del'>-	ifunit = ifnum;</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * clean_check - Fetch the flags for the device and generate</div><div class='del'>- * appropriate error messages.</div><div class='del'>- */</div><div class='del'>-void clean_check(void)</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    char *s;</div><div class='del'>-</div><div class='del'>-    if (still_ppp()) {</div><div class='del'>-	if (ioctl(ppp_fd, PPPIOCGFLAGS, (caddr_t) &amp;x) == 0) {</div><div class='del'>-	    s = NULL;</div><div class='del'>-	    switch (~x &amp; (SC_RCV_B7_0|SC_RCV_B7_1|SC_RCV_EVNP|SC_RCV_ODDP)) {</div><div class='del'>-	    case SC_RCV_B7_0:</div><div class='del'>-		s = "all had bit 7 set to 1";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_B7_1:</div><div class='del'>-		s = "all had bit 7 set to 0";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_EVNP:</div><div class='del'>-		s = "all had odd parity";</div><div class='del'>-		break;</div><div class='del'>-		</div><div class='del'>-	    case SC_RCV_ODDP:</div><div class='del'>-		s = "all had even parity";</div><div class='del'>-		break;</div><div class='del'>-	    }</div><div class='del'>-	    </div><div class='del'>-	    if (s != NULL) {</div><div class='del'>-		warn("Receive serial link is not 8-bit clean:");</div><div class='del'>-		warn("Problem: %s", s);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-	</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * List of valid speeds.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-struct speed {</div><div class='del'>-    int speed_int, speed_val;</div><div class='del'>-} speeds[] = {</div><div class='del'>-#ifdef B50</div><div class='del'>-    { 50, B50 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B75</div><div class='del'>-    { 75, B75 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B110</div><div class='del'>-    { 110, B110 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B134</div><div class='del'>-    { 134, B134 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B150</div><div class='del'>-    { 150, B150 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B200</div><div class='del'>-    { 200, B200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B300</div><div class='del'>-    { 300, B300 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B600</div><div class='del'>-    { 600, B600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1200</div><div class='del'>-    { 1200, B1200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1800</div><div class='del'>-    { 1800, B1800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2000</div><div class='del'>-    { 2000, B2000 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2400</div><div class='del'>-    { 2400, B2400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B3600</div><div class='del'>-    { 3600, B3600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B4800</div><div class='del'>-    { 4800, B4800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B7200</div><div class='del'>-    { 7200, B7200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B9600</div><div class='del'>-    { 9600, B9600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B19200</div><div class='del'>-    { 19200, B19200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B38400</div><div class='del'>-    { 38400, B38400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B57600</div><div class='del'>-    { 57600, B57600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B76800</div><div class='del'>-    { 76800, B76800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B115200</div><div class='del'>-    { 115200, B115200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTA</div><div class='del'>-    { 19200, EXTA },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTB</div><div class='del'>-    { 38400, EXTB },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B230400</div><div class='del'>-    { 230400, B230400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B460800</div><div class='del'>-    { 460800, B460800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B921600</div><div class='del'>-    { 921600, B921600 },</div><div class='del'>-#endif</div><div class='del'>-    { 0, 0 }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Translate from bits/second to a speed_t.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int translate_speed (int bps)</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (bps != 0) {</div><div class='del'>-	for (speedp = speeds; speedp-&gt;speed_int; speedp++) {</div><div class='del'>-	    if (bps == speedp-&gt;speed_int)</div><div class='del'>-		return speedp-&gt;speed_val;</div><div class='del'>-	}</div><div class='del'>-	warn("speed %d not supported", bps);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Translate from a speed_t to bits/second.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int baud_rate_of (int speed)</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-    </div><div class='del'>-    if (speed != 0) {</div><div class='del'>-	for (speedp = speeds; speedp-&gt;speed_int; speedp++) {</div><div class='del'>-	    if (speed == speedp-&gt;speed_val)</div><div class='del'>-		return speedp-&gt;speed_int;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,</div><div class='del'>- * at the requested speed, etc.  If `local' is true, set CLOCAL</div><div class='del'>- * regardless of whether the modem option was specified.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void set_up_tty(int tty_fd, int local)</div><div class='del'>-{</div><div class='del'>-    int speed;</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-    setdtr(tty_fd, 1);</div><div class='del'>-    if (tcgetattr(tty_fd, &amp;tios) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("tcgetattr: %m(%d)", errno);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    if (!restore_term)</div><div class='del'>-	inittermios = tios;</div><div class='del'>-    </div><div class='del'>-    tios.c_cflag     &amp;= ~(CSIZE | CSTOPB | PARENB | CLOCAL);</div><div class='del'>-    tios.c_cflag     |= CS8 | CREAD | HUPCL;</div><div class='del'>-</div><div class='del'>-    tios.c_iflag      = IGNBRK | IGNPAR;</div><div class='del'>-    tios.c_oflag      = 0;</div><div class='del'>-    tios.c_lflag      = 0;</div><div class='del'>-    tios.c_cc[VMIN]   = 1;</div><div class='del'>-    tios.c_cc[VTIME]  = 0;</div><div class='del'>-    </div><div class='del'>-    if (local || !modem)</div><div class='del'>-	tios.c_cflag ^= (CLOCAL | HUPCL);</div><div class='del'>-</div><div class='del'>-    switch (crtscts) {</div><div class='del'>-    case 1:</div><div class='del'>-	tios.c_cflag |= CRTSCTS;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case -2:</div><div class='del'>-	tios.c_iflag     |= IXON | IXOFF;</div><div class='del'>-	tios.c_cc[VSTOP]  = 0x13;	/* DC3 = XOFF = ^S */</div><div class='del'>-	tios.c_cc[VSTART] = 0x11;	/* DC1 = XON  = ^Q */</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    case -1:</div><div class='del'>-	tios.c_cflag &amp;= ~CRTSCTS;</div><div class='del'>-	break;</div><div class='del'>-</div><div class='del'>-    default:</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    speed = translate_speed(inspeed);</div><div class='del'>-    if (speed) {</div><div class='del'>-	cfsetospeed (&amp;tios, speed);</div><div class='del'>-	cfsetispeed (&amp;tios, speed);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * We can't proceed if the serial port speed is B0,</div><div class='del'>- * since that implies that the serial port is disabled.</div><div class='del'>- */</div><div class='del'>-    else {</div><div class='del'>-	speed = cfgetospeed(&amp;tios);</div><div class='del'>-	if (speed == B0)</div><div class='del'>-	    fatal("Baud rate for %s is 0; need explicit baud rate", devnam);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (tcsetattr(tty_fd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("tcsetattr: %m");</div><div class='del'>-    </div><div class='del'>-    baud_rate    = baud_rate_of(speed);</div><div class='del'>-    restore_term = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * setdtr - control the DTR line on the serial port.</div><div class='del'>- * This is called from die(), so it shouldn't call die().</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void setdtr (int tty_fd, int on)</div><div class='del'>-{</div><div class='del'>-    int modembits = TIOCM_DTR;</div><div class='del'>-</div><div class='del'>-    ioctl(tty_fd, (on ? TIOCMBIS : TIOCMBIC), &amp;modembits);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * restore_tty - restore the terminal to the saved settings.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void restore_tty (int tty_fd)</div><div class='del'>-{</div><div class='del'>-    if (restore_term) {</div><div class='del'>-	restore_term = 0;</div><div class='del'>-/*</div><div class='del'>- * Turn off echoing, because otherwise we can get into</div><div class='del'>- * a loop with the tty and the modem echoing to each other.</div><div class='del'>- * We presume we are the sole user of this tty device, so</div><div class='del'>- * when we close it, it will revert to its defaults anyway.</div><div class='del'>- */</div><div class='del'>-	if (!default_device)</div><div class='del'>-	    inittermios.c_lflag &amp;= ~(ECHO | ECHONL);</div><div class='del'>-	</div><div class='del'>-	if (tcsetattr(tty_fd, TCSAFLUSH, &amp;inittermios) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		warn("tcsetattr: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * output - Output PPP packet.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void output (int unit, unsigned char *p, int len)</div><div class='del'>-{</div><div class='del'>-    int fd = ppp_fd;</div><div class='del'>-    int proto;</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	dbglog("sent %P", p, len);</div><div class='del'>-</div><div class='del'>-    if (len &lt; PPP_HDRLEN)</div><div class='del'>-	return;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	p += 2;</div><div class='del'>-	len -= 2;</div><div class='del'>-	proto = (p[0] &lt;&lt; 8) + p[1];</div><div class='del'>-	if (ifunit &gt;= 0 &amp;&amp; !(proto &gt;= 0xc000 || proto == PPP_CCPFRAG))</div><div class='del'>-	    fd = ppp_dev_fd;</div><div class='del'>-    }</div><div class='del'>-    if (write(fd, p, len) &lt; 0) {</div><div class='del'>-	if (errno == EWOULDBLOCK || errno == ENOBUFS</div><div class='del'>-	    || errno == ENXIO || errno == EIO || errno == EINTR)</div><div class='del'>-	    warn("write: warning: %m (%d)", errno);</div><div class='del'>-	else</div><div class='del'>-	    error("write: %m (%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * wait_input - wait until there is data available,</div><div class='del'>- * for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void wait_input(struct timeval *timo)</div><div class='del'>-{</div><div class='del'>-    fd_set ready, exc;</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    ready = in_fds;</div><div class='del'>-    exc = in_fds;</div><div class='del'>-    n = select(max_in_fd + 1, &amp;ready, NULL, &amp;exc, timo);</div><div class='del'>-    if (n &lt; 0 &amp;&amp; errno != EINTR)</div><div class='del'>-	fatal("select: %m(%d)", errno);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_fd - add an fd to the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void add_fd(int fd)</div><div class='del'>-{</div><div class='del'>-    FD_SET(fd, &amp;in_fds);</div><div class='del'>-    if (fd &gt; max_in_fd)</div><div class='del'>-	max_in_fd = fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * remove_fd - remove an fd from the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void remove_fd(int fd)</div><div class='del'>-{</div><div class='del'>-    FD_CLR(fd, &amp;in_fds);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * read_packet - get a PPP packet from the serial device.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int read_packet (unsigned char *buf)</div><div class='del'>-{</div><div class='del'>-    int len, nr;</div><div class='del'>-</div><div class='del'>-    len = PPP_MRU + PPP_HDRLEN;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	*buf++ = PPP_ALLSTATIONS;</div><div class='del'>-	*buf++ = PPP_UI;</div><div class='del'>-	len -= 2;</div><div class='del'>-    }</div><div class='del'>-    nr = -1;</div><div class='del'>-    if (ppp_fd &gt;= 0) {</div><div class='del'>-	nr = read(ppp_fd, buf, len);</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno != EWOULDBLOCK &amp;&amp; errno != EIO &amp;&amp; errno != EINTR)</div><div class='del'>-	    error("read: %m");</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-    if (nr &lt; 0 &amp;&amp; new_style_driver &amp;&amp; ifunit &gt;= 0) {</div><div class='del'>-	/* N.B. we read ppp_fd first since LCP packets come in there. */</div><div class='del'>-	nr = read(ppp_dev_fd, buf, len);</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno != EWOULDBLOCK &amp;&amp; errno != EIO &amp;&amp; errno != EINTR)</div><div class='del'>-	    error("read /dev/ppp: %m");</div><div class='del'>-	if (nr &lt; 0 &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-    return (new_style_driver &amp;&amp; nr &gt; 0)? nr+2: nr;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_loop_output - get outgoing packets from the ppp device,</div><div class='del'>- * and detect when we want to bring the real link up.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_loop_output(void)</div><div class='del'>-{</div><div class='del'>-    int rv = 0;</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	while ((n = read_packet(inpacket_buf)) &gt; 0)</div><div class='del'>-	    if (loop_frame(inpacket_buf, n))</div><div class='del'>-		rv = 1;</div><div class='del'>-	return rv;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    while ((n = read(master_fd, inbuf, sizeof(inbuf))) &gt; 0)</div><div class='del'>-	if (loop_chars(inbuf, n))</div><div class='del'>-	    rv = 1;</div><div class='del'>-</div><div class='del'>-    if (n == 0)</div><div class='del'>-	fatal("eof on loopback");</div><div class='del'>-</div><div class='del'>-    if (errno != EWOULDBLOCK)</div><div class='del'>-	fatal("read from loopback: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    return rv;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * netif_set_mtu - set the MTU on the PPP network interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-netif_set_mtu(int unit, int mtu)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "netif_set_mtu: mtu = %d\n", mtu));</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    ifr.ifr_mtu = mtu;</div><div class='del'>-	</div><div class='del'>-    if (ifunit &gt;= 0 &amp;&amp; ioctl(sock_fd, SIOCSIFMTU, (caddr_t) &amp;ifr) &lt; 0)</div><div class='del'>-	fatal("ioctl(SIOCSIFMTU): %m");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_send_config - configure the transmit characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_send_config (int mtu,u_int32_t asyncmap,int pcomp,int accomp)</div><div class='del'>-{</div><div class='del'>-    u_int x;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Set the asyncmap and other parameters for the ppp device</div><div class='del'>- */</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-    link_mtu = mtu;</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "send_config: asyncmap = %lx\n", asyncmap));</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSASYNCMAP, (caddr_t) &amp;asyncmap) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    fatal("ioctl(PPPIOCSASYNCMAP): %m(%d)", errno);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    x = get_flags(ppp_fd);</div><div class='del'>-    x = pcomp  ? x | SC_COMP_PROT : x &amp; ~SC_COMP_PROT;</div><div class='del'>-    x = accomp ? x | SC_COMP_AC   : x &amp; ~SC_COMP_AC;</div><div class='del'>-    x = sync_serial ? x | SC_SYNC : x &amp; ~SC_SYNC;</div><div class='del'>-    set_flags(ppp_fd, x);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_set_xaccm - set the extended transmit ACCM for the interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_set_xaccm (ext_accm accm)</div><div class='del'>-{</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "set_xaccm: %08lx %08lx %08lx %08lx\n",</div><div class='del'>-		accm[0], accm[1], accm[2], accm[3]));</div><div class='del'>-</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) &lt; 0 &amp;&amp; errno != ENOTTY) {</div><div class='del'>-	if ( ! ok_error (errno))</div><div class='del'>-	    warn("ioctl(set extended ACCM): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * tty_recv_config - configure the receive-side characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void tty_recv_config (int mru,u_int32_t asyncmap,int pcomp,int accomp)</div><div class='del'>-{</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "recv_config: mru = %d\n", mru));</div><div class='del'>-/*</div><div class='del'>- * If we were called because the link has gone down then there is nothing</div><div class='del'>- * which may be done. Just return without incident.</div><div class='del'>- */</div><div class='del'>-    if (!still_ppp())</div><div class='del'>-	return;</div><div class='del'>-/*</div><div class='del'>- * Set the receiver parameters</div><div class='del'>- */</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSMRU, (caddr_t) &amp;mru) &lt; 0) {</div><div class='del'>-	if ( ! ok_error (errno))</div><div class='del'>-	    error("ioctl(PPPIOCSMRU): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-    if (new_style_driver &amp;&amp; ifunit &gt;= 0</div><div class='del'>-	&amp;&amp; ioctl(ppp_dev_fd, PPPIOCSMRU, (caddr_t) &amp;mru) &lt; 0)</div><div class='del'>-	error("Couldn't set MRU in generic PPP layer: %m");</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "recv_config: asyncmap = %lx\n", asyncmap));</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCSRASYNCMAP, (caddr_t) &amp;asyncmap) &lt; 0) {</div><div class='del'>-	if (!ok_error(errno))</div><div class='del'>-	    error("ioctl(PPPIOCSRASYNCMAP): %m(%d)", errno);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_test - ask kernel whether a given compression method</div><div class='del'>- * is acceptable for use.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ccp_test (int unit, u_char *opt_ptr, int opt_len, int for_transmit)</div><div class='del'>-{</div><div class='del'>-    struct ppp_option_data data;</div><div class='del'>-</div><div class='del'>-    memset (&amp;data, '\0', sizeof (data));</div><div class='del'>-    data.ptr      = opt_ptr;</div><div class='del'>-    data.length   = opt_len;</div><div class='del'>-    data.transmit = for_transmit;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &amp;data) &gt;= 0)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-    return (errno == ENOBUFS)? 0: -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_flags_set - inform kernel about the current state of CCP.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void ccp_flags_set (int unit, int isopen, int isup)</div><div class='del'>-{</div><div class='del'>-    if (still_ppp()) {</div><div class='del'>-	int x = get_flags(ppp_dev_fd);</div><div class='del'>-	x = isopen? x | SC_CCP_OPEN : x &amp;~ SC_CCP_OPEN;</div><div class='del'>-	x = isup?   x | SC_CCP_UP   : x &amp;~ SC_CCP_UP;</div><div class='del'>-	set_flags (ppp_dev_fd, x);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef PPP_FILTER</div><div class='del'>-/*</div><div class='del'>- * set_filters - set the active and pass filters in the kernel driver.</div><div class='del'>- */</div><div class='del'>-int set_filters(struct bpf_program *pass, struct bpf_program *active)</div><div class='del'>-{</div><div class='del'>-	struct sock_fprog fp;</div><div class='del'>-</div><div class='del'>-	fp.len = pass-&gt;bf_len;</div><div class='del'>-	fp.filter = (struct sock_filter *) pass-&gt;bf_insns;</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSPASS, &amp;fp) &lt; 0) {</div><div class='del'>-		if (errno == ENOTTY)</div><div class='del'>-			warn("kernel does not support PPP filtering");</div><div class='del'>-		else</div><div class='del'>-			error("Couldn't set pass-filter in kernel: %m");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	fp.len = active-&gt;bf_len;</div><div class='del'>-	fp.filter = (struct sock_filter *) active-&gt;bf_insns;</div><div class='del'>-	if (ioctl(ppp_dev_fd, PPPIOCSACTIVE, &amp;fp) &lt; 0) {</div><div class='del'>-		error("Couldn't set active-filter in kernel: %m");</div><div class='del'>-		return 0;</div><div class='del'>-	}</div><div class='del'>-	return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* PPP_FILTER */</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_idle_time - return how long the link has been idle.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_idle_time(u, ip)</div><div class='del'>-    int u;</div><div class='del'>-    struct ppp_idle *ip;</div><div class='del'>-{</div><div class='del'>-    return ioctl(ppp_dev_fd, PPPIOCGIDLE, ip) &gt;= 0;</div><div class='del'>-} </div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_ppp_stats - return statistics for the link.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_ppp_stats(u, stats)</div><div class='del'>-    int u;</div><div class='del'>-    struct pppd_stats *stats;</div><div class='del'>-{</div><div class='del'>-    struct ifpppstatsreq req;</div><div class='del'>-</div><div class='del'>-    memset (&amp;req, 0, sizeof (req));</div><div class='del'>-</div><div class='del'>-    req.stats_ptr = (caddr_t) &amp;req.stats;</div><div class='del'>-    strlcpy(req.ifr__name, ifname, sizeof(req.ifr__name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGPPPSTATS, &amp;req) &lt; 0) {</div><div class='del'>-	error("Couldn't get PPP statistics: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    stats-&gt;bytes_in = req.stats.p.ppp_ibytes;</div><div class='del'>-    stats-&gt;bytes_out = req.stats.p.ppp_obytes;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ccp_fatal_error - returns 1 if decompression was disabled as a</div><div class='del'>- * result of an error detected after decompression of a packet,</div><div class='del'>- * 0 otherwise.  This is necessary because of patent nonsense.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ccp_fatal_error (int unit)</div><div class='del'>-{</div><div class='del'>-    int x = get_flags(ppp_dev_fd);</div><div class='del'>-</div><div class='del'>-    return x &amp; SC_DC_FERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * path_to_procfs - find the path to the proc file system mount point</div><div class='del'>- */</div><div class='del'>-static char proc_path[MAXPATHLEN];</div><div class='del'>-static int proc_path_len;</div><div class='del'>-</div><div class='del'>-static char *path_to_procfs(const char *tail)</div><div class='del'>-{</div><div class='del'>-    struct mntent *mntent;</div><div class='del'>-    FILE *fp;</div><div class='del'>-</div><div class='del'>-    if (proc_path_len == 0) {</div><div class='del'>-	/* Default the mount location of /proc */</div><div class='del'>-	strlcpy (proc_path, "/proc", sizeof(proc_path));</div><div class='del'>-	proc_path_len = 5;</div><div class='del'>-	fp = fopen(MOUNTED, "r");</div><div class='del'>-	if (fp != NULL) {</div><div class='del'>-	    while ((mntent = getmntent(fp)) != NULL) {</div><div class='del'>-		if (strcmp(mntent-&gt;mnt_type, MNTTYPE_IGNORE) == 0)</div><div class='del'>-		    continue;</div><div class='del'>-		if (strcmp(mntent-&gt;mnt_type, "proc") == 0) {</div><div class='del'>-		    strlcpy(proc_path, mntent-&gt;mnt_dir, sizeof(proc_path));</div><div class='del'>-		    proc_path_len = strlen(proc_path);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    fclose (fp);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    strlcpy(proc_path + proc_path_len, tail,</div><div class='del'>-	    sizeof(proc_path) - proc_path_len);</div><div class='del'>-    return proc_path;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * /proc/net/route parsing stuff.</div><div class='del'>- */</div><div class='del'>-#define ROUTE_MAX_COLS	12</div><div class='del'>-FILE *route_fd = (FILE *) 0;</div><div class='del'>-static char route_buffer[512];</div><div class='del'>-static int route_dev_col, route_dest_col, route_gw_col;</div><div class='del'>-static int route_flags_col, route_mask_col;</div><div class='del'>-static int route_num_cols;</div><div class='del'>-</div><div class='del'>-static int open_route_table (void);</div><div class='del'>-static void close_route_table (void);</div><div class='del'>-static int read_route_table (struct rtentry *rt);</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * close_route_table - close the interface to the route table</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void close_route_table (void)</div><div class='del'>-{</div><div class='del'>-    if (route_fd != (FILE *) 0) {</div><div class='del'>-        fclose (route_fd);</div><div class='del'>-        route_fd = (FILE *) 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * open_route_table - open the interface to the route table</div><div class='del'>- */</div><div class='del'>-static char route_delims[] = " \t\n";</div><div class='del'>-</div><div class='del'>-static int open_route_table (void)</div><div class='del'>-{</div><div class='del'>-    char *path;</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-</div><div class='del'>-    path = path_to_procfs("/net/route");</div><div class='del'>-    route_fd = fopen (path, "r");</div><div class='del'>-    if (route_fd == NULL) {</div><div class='del'>-        error("can't open routing table %s: %m", path);</div><div class='del'>-        return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    route_dev_col = 0;		/* default to usual columns */</div><div class='del'>-    route_dest_col = 1;</div><div class='del'>-    route_gw_col = 2;</div><div class='del'>-    route_flags_col = 3;</div><div class='del'>-    route_mask_col = 7;</div><div class='del'>-    route_num_cols = 8;</div><div class='del'>-</div><div class='del'>-    /* parse header line */</div><div class='del'>-    if (fgets(route_buffer, sizeof(route_buffer), route_fd) != 0) {</div><div class='del'>-	char *p = route_buffer, *q;</div><div class='del'>-	int col;</div><div class='del'>-	for (col = 0; col &lt; ROUTE_MAX_COLS; ++col) {</div><div class='del'>-	    int used = 1;</div><div class='del'>-	    if ((q = strtok(p, route_delims)) == 0)</div><div class='del'>-		break;</div><div class='del'>-	    if (strcasecmp(q, "iface") == 0)</div><div class='del'>-		route_dev_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "destination") == 0)</div><div class='del'>-		route_dest_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "gateway") == 0)</div><div class='del'>-		route_gw_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "flags") == 0)</div><div class='del'>-		route_flags_col = col;</div><div class='del'>-	    else if (strcasecmp(q, "mask") == 0)</div><div class='del'>-		route_mask_col = col;</div><div class='del'>-	    else</div><div class='del'>-		used = 0;</div><div class='del'>-	    if (used &amp;&amp; col &gt;= route_num_cols)</div><div class='del'>-		route_num_cols = col + 1;</div><div class='del'>-	    p = NULL;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * read_route_table - read the next entry from the route table</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int read_route_table(struct rtentry *rt)</div><div class='del'>-{</div><div class='del'>-    char *cols[ROUTE_MAX_COLS], *p;</div><div class='del'>-    int col;</div><div class='del'>-	</div><div class='del'>-    memset (rt, '\0', sizeof (struct rtentry));</div><div class='del'>-</div><div class='del'>-    if (fgets (route_buffer, sizeof (route_buffer), route_fd) == (char *) 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    p = route_buffer;</div><div class='del'>-    for (col = 0; col &lt; route_num_cols; ++col) {</div><div class='del'>-	cols[col] = strtok(p, route_delims);</div><div class='del'>-	if (cols[col] == NULL)</div><div class='del'>-	    return 0;		/* didn't get enough columns */</div><div class='del'>-	p = NULL;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_dst) = strtoul(cols[route_dest_col], NULL, 16);</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);</div><div class='del'>-    SIN_ADDR(rt-&gt;rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);</div><div class='del'>-</div><div class='del'>-    rt-&gt;rt_flags = (short) strtoul(cols[route_flags_col], NULL, 16);</div><div class='del'>-    rt-&gt;rt_dev   = cols[route_dev_col];</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * defaultroute_exists - determine if there is a default route</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int defaultroute_exists (struct rtentry *rt)</div><div class='del'>-{</div><div class='del'>-    int result = 0;</div><div class='del'>-</div><div class='del'>-    if (!open_route_table())</div><div class='del'>-        return 0;</div><div class='del'>-</div><div class='del'>-    while (read_route_table(rt) != 0) {</div><div class='del'>-        if ((rt-&gt;rt_flags &amp; RTF_UP) == 0)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0) &amp;&amp; SIN_ADDR(rt-&gt;rt_genmask) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-        if (SIN_ADDR(rt-&gt;rt_dst) == 0L) {</div><div class='del'>-	    result = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_route_to - determine if the system has any route to</div><div class='del'>- * a given IP address.  `addr' is in network byte order.</div><div class='del'>- * Return value is 1 if yes, 0 if no, -1 if don't know.</div><div class='del'>- * For demand mode to work properly, we have to ignore routes</div><div class='del'>- * through our own interface.</div><div class='del'>- */</div><div class='del'>-int have_route_to(u_int32_t addr)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-    int result = 0;</div><div class='del'>-</div><div class='del'>-    if (!open_route_table())</div><div class='del'>-	return -1;		/* don't know */</div><div class='del'>-</div><div class='del'>-    while (read_route_table(&amp;rt)) {</div><div class='del'>-	if ((rt.rt_flags &amp; RTF_UP) == 0 || strcmp(rt.rt_dev, ifname) == 0)</div><div class='del'>-	    continue;</div><div class='del'>-	if ((addr &amp; SIN_ADDR(rt.rt_genmask)) == SIN_ADDR(rt.rt_dst)) {</div><div class='del'>-	    result = 1;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    close_route_table();</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifdefaultroute - assign a default route through the address given.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    if (defaultroute_exists(&amp;rt) &amp;&amp; strcmp(rt.rt_dev, ifname) != 0) {</div><div class='del'>-	u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);</div><div class='del'>-</div><div class='del'>-	if (old_gateway != gateway)</div><div class='del'>-	    error("not replacing existing default route to %s [%I]",</div><div class='del'>-		  rt.rt_dev, old_gateway);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-    SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-    SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-</div><div class='del'>-    if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	SIN_ADDR(rt.rt_genmask) = 0L;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt.rt_gateway) = gateway;</div><div class='del'>-    </div><div class='del'>-    rt.rt_flags = RTF_UP | RTF_GATEWAY;</div><div class='del'>-    if (ioctl(sock_fd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    error("default route ioctl(SIOCADDRT): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = gateway;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifdefaultroute - delete a default route through the address given.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    default_route_gateway = 0;</div><div class='del'>-</div><div class='del'>-    memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-    SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-    SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-</div><div class='del'>-    if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	SIN_ADDR(rt.rt_genmask) = 0L;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SIN_ADDR(rt.rt_gateway) = gateway;</div><div class='del'>-    </div><div class='del'>-    rt.rt_flags = RTF_UP | RTF_GATEWAY;</div><div class='del'>-    if (ioctl(sock_fd, SIOCDELRT, &amp;rt) &lt; 0 &amp;&amp; errno != ESRCH) {</div><div class='del'>-	if (still_ppp()) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		error("default route ioctl(SIOCDELRT): %m (%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifproxyarp - Make a proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifproxyarp (int unit, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-    char *forw_path;</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp == 0) {</div><div class='del'>-	memset (&amp;arpreq, '\0', sizeof(arpreq));</div><div class='del'>-    </div><div class='del'>-	SET_SA_FAMILY(arpreq.arp_pa, AF_INET);</div><div class='del'>-	SIN_ADDR(arpreq.arp_pa) = his_adr;</div><div class='del'>-	arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-/*</div><div class='del'>- * Get the hardware address of an interface on the same subnet</div><div class='del'>- * as our local address.</div><div class='del'>- */</div><div class='del'>-	if (!get_ether_addr(his_adr, &amp;arpreq.arp_ha, proxy_arp_dev,</div><div class='del'>-			    sizeof(proxy_arp_dev))) {</div><div class='del'>-	    error("Cannot determine ethernet address for proxy ARP");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	strlcpy(arpreq.arp_dev, proxy_arp_dev, sizeof(arpreq.arp_dev));</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCSARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		error("ioctl(SIOCSARP): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	proxy_arp_addr = his_adr;</div><div class='del'>-	has_proxy_arp = 1;</div><div class='del'>-</div><div class='del'>-	if (tune_kernel) {</div><div class='del'>-	    forw_path = path_to_procfs("/sys/net/ipv4/ip_forward");</div><div class='del'>-	    if (forw_path != 0) {</div><div class='del'>-		int fd = open(forw_path, O_WRONLY);</div><div class='del'>-		if (fd &gt;= 0) {</div><div class='del'>-		    if (write(fd, "1", 1) != 1)</div><div class='del'>-			error("Couldn't enable IP forwarding: %m");</div><div class='del'>-		    close(fd);</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifproxyarp - Delete the proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifproxyarp (int unit, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    if (has_proxy_arp) {</div><div class='del'>-	has_proxy_arp = 0;</div><div class='del'>-	memset (&amp;arpreq, '\0', sizeof(arpreq));</div><div class='del'>-	SET_SA_FAMILY(arpreq.arp_pa, AF_INET);</div><div class='del'>-	SIN_ADDR(arpreq.arp_pa) = his_adr;</div><div class='del'>-	arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-	strlcpy(arpreq.arp_dev, proxy_arp_dev, sizeof(arpreq.arp_dev));</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCDARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	    if ( ! ok_error ( errno ))</div><div class='del'>-		warn("ioctl(SIOCDARP): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-     </div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * get_ether_addr - get the hardware address of an interface on the</div><div class='del'>- * the same subnet as ipaddr.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int get_ether_addr (u_int32_t ipaddr,</div><div class='del'>-			   struct sockaddr *hwaddr,</div><div class='del'>-			   char *name, int namelen)</div><div class='del'>-{</div><div class='del'>-    struct ifreq *ifr, *ifend;</div><div class='del'>-    u_int32_t ina, mask;</div><div class='del'>-    char *aliasp;</div><div class='del'>-    struct ifreq ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq ifs[MAX_IFS];</div><div class='del'>-    </div><div class='del'>-    ifc.ifc_len = sizeof(ifs);</div><div class='del'>-    ifc.ifc_req = ifs;</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    error("ioctl(SIOCGIFCONF): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG, "proxy arp: scanning %d interfaces for IP %s",</div><div class='del'>-		ifc.ifc_len / sizeof(struct ifreq), ip_ntoa(ipaddr)));</div><div class='del'>-/*</div><div class='del'>- * Scan through looking for an interface with an Internet</div><div class='del'>- * address on the same subnet as `ipaddr'.</div><div class='del'>- */</div><div class='del'>-    ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ifr++) {</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family == AF_INET) {</div><div class='del'>-	    ina = SIN_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	    strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-            SYSDEBUG ((LOG_DEBUG, "proxy arp: examining interface %s",</div><div class='del'>-			ifreq.ifr_name));</div><div class='del'>-/*</div><div class='del'>- * Check that the interface is up, and not point-to-point</div><div class='del'>- * nor loopback.</div><div class='del'>- */</div><div class='del'>-	    if (ioctl(sock_fd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-		continue;</div><div class='del'>-</div><div class='del'>-	    if (((ifreq.ifr_flags ^ FLAGS_GOOD) &amp; FLAGS_MASK) != 0)</div><div class='del'>-		continue;</div><div class='del'>-/*</div><div class='del'>- * Get its netmask and check that it's on the right subnet.</div><div class='del'>- */</div><div class='del'>-	    if (ioctl(sock_fd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	        continue;</div><div class='del'>-</div><div class='del'>-	    mask = SIN_ADDR(ifreq.ifr_addr);</div><div class='del'>-	    SYSDEBUG ((LOG_DEBUG, "proxy arp: interface addr %s mask %lx",</div><div class='del'>-			ip_ntoa(ina), ntohl(mask)));</div><div class='del'>-</div><div class='del'>-	    if (((ipaddr ^ ina) &amp; mask) != 0)</div><div class='del'>-	        continue;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    if (ifr &gt;= ifend)</div><div class='del'>-        return 0;</div><div class='del'>-</div><div class='del'>-    strlcpy(name, ifreq.ifr_name, namelen);</div><div class='del'>-</div><div class='del'>-    /* trim off the :1 in eth0:1 */</div><div class='del'>-    aliasp = strchr(name, ':');</div><div class='del'>-    if (aliasp != 0)</div><div class='del'>-	*aliasp = 0;</div><div class='del'>-</div><div class='del'>-    info("found interface %s for proxy arp", name);</div><div class='del'>-/*</div><div class='del'>- * Now get the hardware address.</div><div class='del'>- */</div><div class='del'>-    memset (&amp;ifreq.ifr_hwaddr, 0, sizeof (struct sockaddr));</div><div class='del'>-    if (ioctl (sock_fd, SIOCGIFHWADDR, &amp;ifreq) &lt; 0) {</div><div class='del'>-        error("SIOCGIFHWADDR(%s): %m(%d)", ifreq.ifr_name, errno);</div><div class='del'>-        return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memcpy (hwaddr,</div><div class='del'>-	    &amp;ifreq.ifr_hwaddr,</div><div class='del'>-	    sizeof (struct sockaddr));</div><div class='del'>-</div><div class='del'>-    SYSDEBUG ((LOG_DEBUG,</div><div class='del'>-	   "proxy arp: found hwaddr %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[0],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[1],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[2],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[3],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[4],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[5],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[6],</div><div class='del'>-		(int) ((unsigned char *) &amp;hwaddr-&gt;sa_data)[7]));</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_if_hwaddr - get the hardware address for the specified</div><div class='del'>- * network interface device.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_if_hwaddr(u_char *addr, char *name)</div><div class='del'>-{</div><div class='del'>-	struct ifreq ifreq;</div><div class='del'>-	int ret, sock_fd;</div><div class='del'>-</div><div class='del'>-	sock_fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-	if (sock_fd &lt; 0)</div><div class='del'>-		return 0;</div><div class='del'>-	memset(&amp;ifreq.ifr_hwaddr, 0, sizeof(struct sockaddr));</div><div class='del'>-	strlcpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name));</div><div class='del'>-	ret = ioctl(sock_fd, SIOCGIFHWADDR, &amp;ifreq);</div><div class='del'>-	close(sock_fd);</div><div class='del'>-	if (ret &gt;= 0)</div><div class='del'>-		memcpy(addr, ifreq.ifr_hwaddr.sa_data, 6);</div><div class='del'>-	return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_first_ethernet - return the name of the first ethernet-style</div><div class='del'>- * interface on this system.</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-get_first_ethernet()</div><div class='del'>-{</div><div class='del'>-	return "eth0";</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Return user specified netmask, modified by any mask we might determine</div><div class='del'>- * for address `addr' (in network byte order).</div><div class='del'>- * Here we scan through the system's list of interfaces, looking for</div><div class='del'>- * any non-point-to-point interfaces which might appear to be on the same</div><div class='del'>- * network as `addr'.  If we find any, we OR in their netmask to the</div><div class='del'>- * user-specified netmask.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-u_int32_t GetMask (u_int32_t addr)</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask, nmask, ina;</div><div class='del'>-    struct ifreq *ifr, *ifend, ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq ifs[MAX_IFS];</div><div class='del'>-</div><div class='del'>-    addr = ntohl(addr);</div><div class='del'>-    </div><div class='del'>-    if (IN_CLASSA(addr))	/* determine network mask for address class */</div><div class='del'>-	nmask = IN_CLASSA_NET;</div><div class='del'>-    else if (IN_CLASSB(addr))</div><div class='del'>-	    nmask = IN_CLASSB_NET;</div><div class='del'>-    else</div><div class='del'>-	    nmask = IN_CLASSC_NET;</div><div class='del'>-    </div><div class='del'>-    /* class D nets are disallowed by bad_ip_adrs */</div><div class='del'>-    mask = netmask | htonl(nmask);</div><div class='del'>-/*</div><div class='del'>- * Scan through the system's network interfaces.</div><div class='del'>- */</div><div class='del'>-    ifc.ifc_len = sizeof(ifs);</div><div class='del'>-    ifc.ifc_req = ifs;</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	if ( ! ok_error ( errno ))</div><div class='del'>-	    warn("ioctl(SIOCGIFCONF): %m(%d)", errno);</div><div class='del'>-	return mask;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ifr++) {</div><div class='del'>-/*</div><div class='del'>- * Check the interface's internet address.</div><div class='del'>- */</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family != AF_INET)</div><div class='del'>-	    continue;</div><div class='del'>-	ina = SIN_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	if (((ntohl(ina) ^ addr) &amp; nmask) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-/*</div><div class='del'>- * Check that the interface is up, and not point-to-point nor loopback.</div><div class='del'>- */</div><div class='del'>-	strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-	if (ioctl(sock_fd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	</div><div class='del'>-	if (((ifreq.ifr_flags ^ FLAGS_GOOD) &amp; FLAGS_MASK) != 0)</div><div class='del'>-	    continue;</div><div class='del'>-/*</div><div class='del'>- * Get its netmask and OR it into our mask.</div><div class='del'>- */</div><div class='del'>-	if (ioctl(sock_fd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	mask |= SIN_ADDR(ifreq.ifr_addr);</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    return mask;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Internal routine to decode the version.modification.patch level</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void decode_version (char *buf, int *version,</div><div class='del'>-			    int *modification, int *patch)</div><div class='del'>-{</div><div class='del'>-    char *endp;</div><div class='del'>-</div><div class='del'>-    *version      = (int) strtoul (buf, &amp;endp, 10);</div><div class='del'>-    *modification = 0;</div><div class='del'>-    *patch        = 0;</div><div class='del'>-    </div><div class='del'>-    if (endp != buf &amp;&amp; *endp == '.') {</div><div class='del'>-	buf = endp + 1;</div><div class='del'>-	*modification = (int) strtoul (buf, &amp;endp, 10);</div><div class='del'>-	if (endp != buf &amp;&amp; *endp == '.') {</div><div class='del'>-	    buf = endp + 1;</div><div class='del'>-	    *patch = (int) strtoul (buf, &amp;buf, 10);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Procedure to determine if the PPP line discipline is registered.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-ppp_registered(void)</div><div class='del'>-{</div><div class='del'>-    int local_fd;</div><div class='del'>-    int mfd = -1;</div><div class='del'>-    int ret = 0;</div><div class='del'>-    char slave[16];</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We used to open the serial device and set it to the ppp line</div><div class='del'>-     * discipline here, in order to create a ppp unit.  But that is</div><div class='del'>-     * not a good idea - the user might have specified a device that</div><div class='del'>-     * they can't open (permission, or maybe it doesn't really exist).</div><div class='del'>-     * So we grab a pty master/slave pair and use that.</div><div class='del'>-     */</div><div class='del'>-    if (!get_pty(&amp;mfd, &amp;local_fd, slave, 0)) {</div><div class='del'>-	no_ppp_msg = "Couldn't determine if PPP is supported (no free ptys)";</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Try to put the device into the PPP discipline.</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(local_fd, TIOCSETD, &amp;ppp_disc) &lt; 0) {</div><div class='del'>-	error("ioctl(TIOCSETD(PPP)): %m(%d)", errno);</div><div class='del'>-    } else</div><div class='del'>-	ret = 1;</div><div class='del'>-    </div><div class='del'>-    close(local_fd);</div><div class='del'>-    close(mfd);</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * ppp_available - check whether the system has any ppp interfaces</div><div class='del'>- * (in fact we check whether we can do an ioctl on ppp0).</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int ppp_available(void)</div><div class='del'>-{</div><div class='del'>-    int s, ok, fd;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    int    size;</div><div class='del'>-    int    my_version, my_modification, my_patch;</div><div class='del'>-    int osmaj, osmin, ospatch;</div><div class='del'>-</div><div class='del'>-    no_ppp_msg = </div><div class='del'>-	"This system lacks kernel support for PPP.  This could be because\n"</div><div class='del'>-	"the PPP kernel module could not be loaded, or because PPP was not\n"</div><div class='del'>-	"included in the kernel configuration.  If PPP was included as a\n"</div><div class='del'>-	"module, try `/sbin/modprobe -v ppp'.  If that fails, check that\n"</div><div class='del'>-	"ppp.o exists in /lib/modules/`uname -r`/net.\n"</div><div class='del'>-	"See README.linux file in the ppp distribution for more details.\n";</div><div class='del'>-</div><div class='del'>-    /* get the kernel version now, since we are called before sys_init */</div><div class='del'>-    uname(&amp;utsname);</div><div class='del'>-    osmaj = osmin = ospatch = 0;</div><div class='del'>-    sscanf(utsname.release, "%d.%d.%d", &amp;osmaj, &amp;osmin, &amp;ospatch);</div><div class='del'>-    kernel_version = KVERSION(osmaj, osmin, ospatch);</div><div class='del'>-</div><div class='del'>-    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-#if 0</div><div class='del'>-    if (fd &lt; 0 &amp;&amp; errno == ENOENT) {</div><div class='del'>-	/* try making it and see if that helps. */</div><div class='del'>-	if (mknod("/dev/ppp", S_IFCHR | S_IRUSR | S_IWUSR,</div><div class='del'>-		  makedev(108, 0)) &gt;= 0) {</div><div class='del'>-	    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	    if (fd &gt;= 0)</div><div class='del'>-		info("Created /dev/ppp device node");</div><div class='del'>-	    else</div><div class='del'>-		unlink("/dev/ppp");	/* didn't work, undo the mknod */</div><div class='del'>-	} else if (errno == EEXIST) {</div><div class='del'>-	    fd = open("/dev/ppp", O_RDWR);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* 0 */</div><div class='del'>-    if (fd &gt;= 0) {</div><div class='del'>-	new_style_driver = 1;</div><div class='del'>-</div><div class='del'>-	/* XXX should get from driver */</div><div class='del'>-	driver_version = 2;</div><div class='del'>-	driver_modification = 4;</div><div class='del'>-	driver_patch = 0;</div><div class='del'>-	close(fd);</div><div class='del'>-	return 1;</div><div class='del'>-    }</div><div class='del'>-    if (kernel_version &gt;= KVERSION(2,3,13)) {</div><div class='del'>-	if (errno == ENOENT)</div><div class='del'>-	    no_ppp_msg =</div><div class='del'>-		"pppd is unable to open the /dev/ppp device.\n"</div><div class='del'>-		"You need to create the /dev/ppp device node by\n"</div><div class='del'>-		"executing the following command as root:\n"</div><div class='del'>-		"	mknod /dev/ppp c 108 0\n";</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Open a socket for doing the ioctl operations.</div><div class='del'>- */    </div><div class='del'>-    s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (s &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-    </div><div class='del'>-    strlcpy (ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));</div><div class='del'>-    ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-/*</div><div class='del'>- * If the device did not exist then attempt to create one by putting the</div><div class='del'>- * current tty into the PPP discipline. If this works then obtain the</div><div class='del'>- * flags for the device again.</div><div class='del'>- */</div><div class='del'>-    if (!ok) {</div><div class='del'>-	if (ppp_registered()) {</div><div class='del'>-	    strlcpy (ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));</div><div class='del'>-	    ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- * Ensure that the hardware address is for PPP and not something else</div><div class='del'>- */</div><div class='del'>-    if (ok)</div><div class='del'>-        ok = ioctl (s, SIOCGIFHWADDR, (caddr_t) &amp;ifr) &gt;= 0;</div><div class='del'>-</div><div class='del'>-    if (ok &amp;&amp; ((ifr.ifr_hwaddr.sa_family &amp; ~0xFF) != ARPHRD_PPP))</div><div class='del'>-        ok = 0;</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- *  This is the PPP device. Validate the version of the driver at this</div><div class='del'>- *  point to ensure that this program will work with the driver.</div><div class='del'>- */</div><div class='del'>-    if (ok) {</div><div class='del'>-	char   abBuffer [1024];</div><div class='del'>-</div><div class='del'>-	ifr.ifr_data = abBuffer;</div><div class='del'>-	size = ioctl (s, SIOCGPPPVER, (caddr_t) &amp;ifr);</div><div class='del'>-	if (size &lt; 0) {</div><div class='del'>-	    error("Couldn't read driver version: %m");</div><div class='del'>-	    ok = 0;</div><div class='del'>-	    no_ppp_msg = "Sorry, couldn't verify kernel driver version\n";</div><div class='del'>-</div><div class='del'>-	} else {</div><div class='del'>-	    decode_version(abBuffer,</div><div class='del'>-			   &amp;driver_version,</div><div class='del'>-			   &amp;driver_modification,</div><div class='del'>-			   &amp;driver_patch);</div><div class='del'>-/*</div><div class='del'>- * Validate the version of the driver against the version that we used.</div><div class='del'>- */</div><div class='del'>-	    decode_version(VERSION,</div><div class='del'>-			   &amp;my_version,</div><div class='del'>-			   &amp;my_modification,</div><div class='del'>-			   &amp;my_patch);</div><div class='del'>-</div><div class='del'>-	    /* The version numbers must match */</div><div class='del'>-	    if (driver_version != my_version)</div><div class='del'>-		ok = 0;</div><div class='del'>-      </div><div class='del'>-	    /* The modification levels must be legal */</div><div class='del'>-	    if (driver_modification &lt; 3) {</div><div class='del'>-		if (driver_modification &gt;= 2) {</div><div class='del'>-		    /* we can cope with 2.2.0 and above */</div><div class='del'>-		    driver_is_old = 1;</div><div class='del'>-		} else {</div><div class='del'>-		    ok = 0;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-</div><div class='del'>-	    close (s);</div><div class='del'>-	    if (!ok) {</div><div class='del'>-		slprintf(route_buffer, sizeof(route_buffer),</div><div class='del'>-			 "Sorry - PPP driver version %d.%d.%d is out of date\n",</div><div class='del'>-			 driver_version, driver_modification, driver_patch);</div><div class='del'>-</div><div class='del'>-		no_ppp_msg = route_buffer;</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return ok;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * Update the wtmp file with the appropriate user name and tty device.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-void logwtmp (const char *line, const char *name, const char *host)</div><div class='del'>-{</div><div class='del'>-    struct utmp ut, *utp;</div><div class='del'>-    pid_t  mypid = getpid();</div><div class='del'>-#if __GLIBC__ &lt; 2</div><div class='del'>-    int    wtmp;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Update the signon database for users.</div><div class='del'>- * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996</div><div class='del'>- */</div><div class='del'>-    utmpname(_PATH_UTMP);</div><div class='del'>-    setutent();</div><div class='del'>-    while ((utp = getutent()) &amp;&amp; (utp-&gt;ut_pid != mypid))</div><div class='del'>-        /* nothing */;</div><div class='del'>-</div><div class='del'>-    /* Is this call really necessary? There is another one after the 'put' */</div><div class='del'>-    endutent();</div><div class='del'>-    </div><div class='del'>-    if (utp)</div><div class='del'>-	memcpy(&amp;ut, utp, sizeof(ut));</div><div class='del'>-    else</div><div class='del'>-	/* some gettys/telnetds don't initialize utmp... */</div><div class='del'>-	memset(&amp;ut, 0, sizeof(ut));</div><div class='del'>-</div><div class='del'>-    if (ut.ut_id[0] == 0)</div><div class='del'>-	strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));</div><div class='del'>-	</div><div class='del'>-    strncpy(ut.ut_user, name, sizeof(ut.ut_user));</div><div class='del'>-    strncpy(ut.ut_line, line, sizeof(ut.ut_line));</div><div class='del'>-</div><div class='del'>-    time(&amp;ut.ut_time);</div><div class='del'>-</div><div class='del'>-    ut.ut_type = USER_PROCESS;</div><div class='del'>-    ut.ut_pid  = mypid;</div><div class='del'>-</div><div class='del'>-    /* Insert the host name if one is supplied */</div><div class='del'>-    if (*host)</div><div class='del'>-	strncpy (ut.ut_host, host, sizeof(ut.ut_host));</div><div class='del'>-</div><div class='del'>-    /* Insert the IP address of the remote system if IP is enabled */</div><div class='del'>-    if (ipcp_protent.enabled_flag &amp;&amp; ipcp_hisoptions[0].neg_addr)</div><div class='del'>-	memcpy(&amp;ut.ut_addr, (char *) &amp;ipcp_hisoptions[0].hisaddr,</div><div class='del'>-		 sizeof(ut.ut_addr));</div><div class='del'>-	</div><div class='del'>-    /* CL: Makes sure that the logout works */</div><div class='del'>-    if (*host == 0 &amp;&amp; *name==0)</div><div class='del'>-	ut.ut_host[0]=0;</div><div class='del'>-</div><div class='del'>-    pututline(&amp;ut);</div><div class='del'>-    endutent();</div><div class='del'>-/*</div><div class='del'>- * Update the wtmp file.</div><div class='del'>- */</div><div class='del'>-#if __GLIBC__ &gt;= 2</div><div class='del'>-    updwtmp(_PATH_WTMP, &amp;ut);</div><div class='del'>-#else</div><div class='del'>-    wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY);</div><div class='del'>-    if (wtmp &gt;= 0) {</div><div class='del'>-	flock(wtmp, LOCK_EX);</div><div class='del'>-</div><div class='del'>-	if (write (wtmp, (char *)&amp;ut, sizeof(ut)) != sizeof(ut))</div><div class='del'>-	    warn("error writing %s: %m", _PATH_WTMP);</div><div class='del'>-</div><div class='del'>-	flock(wtmp, LOCK_UN);</div><div class='del'>-</div><div class='del'>-	close (wtmp);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifvjcomp - config tcp header compression</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifvjcomp (int u, int vjcomp, int cidcomp, int maxcid)</div><div class='del'>-{</div><div class='del'>-    u_int x = get_flags(ppp_dev_fd);</div><div class='del'>-</div><div class='del'>-    if (vjcomp) {</div><div class='del'>-        if (ioctl (ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &amp;maxcid) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(PPPIOCSMAXCID): %m(%d)", errno);</div><div class='del'>-	    vjcomp = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    x = vjcomp  ? x | SC_COMP_TCP     : x &amp;~ SC_COMP_TCP;</div><div class='del'>-    x = cidcomp ? x &amp; ~SC_NO_TCP_CCID : x | SC_NO_TCP_CCID;</div><div class='del'>-    set_flags (ppp_dev_fd, x);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifup - Config the interface up and enable IP packets to pass.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifup(int u)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl (SIOCGIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ifr.ifr_flags |= (IFF_UP | IFF_POINTOPOINT);</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if_is_up++;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifdown - Disable the indicated protocol and config the interface</div><div class='del'>- *	     down if there are no remaining protocols.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifdown (int u)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    if (if_is_up &amp;&amp; --if_is_up &gt; 0)</div><div class='del'>-	return 1;</div><div class='del'>-</div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl (SIOCGIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ifr.ifr_flags &amp;= ~IFF_UP;</div><div class='del'>-    ifr.ifr_flags |= IFF_POINTOPOINT;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFFLAGS): %m(%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifaddr - Config the interface IP addresses and netmask.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr,</div><div class='del'>-	     u_int32_t net_mask)</div><div class='del'>-{</div><div class='del'>-    struct ifreq   ifr; </div><div class='del'>-    struct rtentry rt;</div><div class='del'>-    </div><div class='del'>-    memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-    memset (&amp;rt,  '\0', sizeof (rt));</div><div class='del'>-    </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_addr,    AF_INET); </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_dstaddr, AF_INET); </div><div class='del'>-    SET_SA_FAMILY (ifr.ifr_netmask, AF_INET); </div><div class='del'>-</div><div class='del'>-    strlcpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));</div><div class='del'>-/*</div><div class='del'>- *  Set our IP address</div><div class='del'>- */</div><div class='del'>-    SIN_ADDR(ifr.ifr_addr) = our_adr;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (errno != EEXIST) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCSIFADDR): %m(%d)", errno);</div><div class='del'>-	}</div><div class='del'>-        else {</div><div class='del'>-	    warn("ioctl(SIOCSIFADDR): Address already exists");</div><div class='del'>-	}</div><div class='del'>-        return (0);</div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- *  Set the gateway address</div><div class='del'>- */</div><div class='del'>-    SIN_ADDR(ifr.ifr_dstaddr) = his_adr;</div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFDSTADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(SIOCSIFDSTADDR): %m(%d)", errno); </div><div class='del'>-	return (0);</div><div class='del'>-    } </div><div class='del'>-/*</div><div class='del'>- *  Set the netmask.</div><div class='del'>- *  For recent kernels, force the netmask to 255.255.255.255.</div><div class='del'>- */</div><div class='del'>-    if (kernel_version &gt;= KVERSION(2,1,16))</div><div class='del'>-	net_mask = ~0L;</div><div class='del'>-    if (net_mask != 0) {</div><div class='del'>-	SIN_ADDR(ifr.ifr_netmask) = net_mask;</div><div class='del'>-	if (ioctl(sock_fd, SIOCSIFNETMASK, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCSIFNETMASK): %m(%d)", errno); </div><div class='del'>-	    return (0);</div><div class='del'>-	} </div><div class='del'>-    }</div><div class='del'>-/*</div><div class='del'>- *  Add the device route</div><div class='del'>- */</div><div class='del'>-    if (kernel_version &lt; KVERSION(2,1,16)) {</div><div class='del'>-	SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-	SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-	rt.rt_dev = ifname;</div><div class='del'>-</div><div class='del'>-	SIN_ADDR(rt.rt_gateway) = 0L;</div><div class='del'>-	SIN_ADDR(rt.rt_dst)     = his_adr;</div><div class='del'>-	rt.rt_flags = RTF_UP | RTF_HOST;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	    SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	    SIN_ADDR(rt.rt_genmask) = -1L;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCADDRT) device route: %m(%d)", errno);</div><div class='del'>-	    return (0);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* set ip_dynaddr in demand mode if address changes */</div><div class='del'>-    if (demand &amp;&amp; tune_kernel &amp;&amp; !dynaddr_set</div><div class='del'>-	&amp;&amp; our_old_addr &amp;&amp; our_old_addr != our_adr) {</div><div class='del'>-	/* set ip_dynaddr if possible */</div><div class='del'>-	char *path;</div><div class='del'>-	int fd;</div><div class='del'>-</div><div class='del'>-	path = path_to_procfs("/sys/net/ipv4/ip_dynaddr");</div><div class='del'>-	if (path != 0 &amp;&amp; (fd = open(path, O_WRONLY)) &gt;= 0) {</div><div class='del'>-	    if (write(fd, "1", 1) != 1)</div><div class='del'>-		error("Couldn't enable dynamic IP addressing: %m");</div><div class='del'>-	    close(fd);</div><div class='del'>-	}</div><div class='del'>-	dynaddr_set = 1;	/* only 1 attempt */</div><div class='del'>-    }</div><div class='del'>-    our_old_addr = 0;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cifaddr - Clear the interface IP addresses, and delete routes</div><div class='del'>- * through the interface if possible.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    if (kernel_version &lt; KVERSION(2,1,16)) {</div><div class='del'>-/*</div><div class='del'>- *  Delete the route through the device</div><div class='del'>- */</div><div class='del'>-	struct rtentry rt;</div><div class='del'>-	memset (&amp;rt, '\0', sizeof (rt));</div><div class='del'>-</div><div class='del'>-	SET_SA_FAMILY (rt.rt_dst,     AF_INET);</div><div class='del'>-	SET_SA_FAMILY (rt.rt_gateway, AF_INET);</div><div class='del'>-	rt.rt_dev = ifname;</div><div class='del'>-</div><div class='del'>-	SIN_ADDR(rt.rt_gateway) = 0;</div><div class='del'>-	SIN_ADDR(rt.rt_dst)     = his_adr;</div><div class='del'>-	rt.rt_flags = RTF_UP | RTF_HOST;</div><div class='del'>-</div><div class='del'>-	if (kernel_version &gt; KVERSION(2,1,0)) {</div><div class='del'>-	    SET_SA_FAMILY (rt.rt_genmask, AF_INET);</div><div class='del'>-	    SIN_ADDR(rt.rt_genmask) = -1L;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ioctl(sock_fd, SIOCDELRT, &amp;rt) &lt; 0 &amp;&amp; errno != ESRCH) {</div><div class='del'>-	    if (still_ppp() &amp;&amp; ! ok_error (errno))</div><div class='del'>-		error("ioctl(SIOCDELRT) device route: %m(%d)", errno);</div><div class='del'>-	    return (0);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* This way it is possible to have an IPX-only or IPv6-only interface */</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    SET_SA_FAMILY(ifr.ifr_addr, AF_INET);</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    </div><div class='del'>-    if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno)) {</div><div class='del'>-	    error("ioctl(SIOCSIFADDR): %m(%d)", errno);</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    our_old_addr = our_adr;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#ifdef INET6</div><div class='del'>-/********************************************************************</div><div class='del'>- * </div><div class='del'>- * sif6addr - Config the interface with an IPv6 link-local address</div><div class='del'>- */</div><div class='del'>-int sif6addr (int unit, eui64_t our_eui64, eui64_t his_eui64)</div><div class='del'>-{</div><div class='del'>-    struct in6_ifreq ifr6;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    struct in6_rtmsg rt6;</div><div class='del'>-</div><div class='del'>-    if (sock6_fd &lt; 0) {</div><div class='del'>-	errno = -sock6_fd;</div><div class='del'>-	error("IPv6 socket creation failed: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    memset(&amp;ifr, 0, sizeof (ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock6_fd, SIOCGIFINDEX, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCGIFINDEX): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /* Local interface */</div><div class='del'>-    memset(&amp;ifr6, 0, sizeof(ifr6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(ifr6.ifr6_addr, our_eui64);</div><div class='del'>-    ifr6.ifr6_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    ifr6.ifr6_prefixlen = 10;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sock6_fd, SIOCSIFADDR, &amp;ifr6) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCSIFADDR): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    /* Route to remote host */</div><div class='del'>-    memset(&amp;rt6, 0, sizeof(rt6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(rt6.rtmsg_dst, his_eui64);</div><div class='del'>-    rt6.rtmsg_flags = RTF_UP;</div><div class='del'>-    rt6.rtmsg_dst_len = 10;</div><div class='del'>-    rt6.rtmsg_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    rt6.rtmsg_metric = 1;</div><div class='del'>-    </div><div class='del'>-    if (ioctl(sock6_fd, SIOCADDRT, &amp;rt6) &lt; 0) {</div><div class='del'>-	error("sif6addr: ioctl(SIOCADDRT): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cif6addr - Remove IPv6 address from interface</div><div class='del'>- */</div><div class='del'>-int cif6addr (int unit, eui64_t our_eui64, eui64_t his_eui64)</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    struct in6_ifreq ifr6;</div><div class='del'>-</div><div class='del'>-    if (sock6_fd &lt; 0) {</div><div class='del'>-	errno = -sock6_fd;</div><div class='del'>-	error("IPv6 socket creation failed: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sock6_fd, SIOCGIFINDEX, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	error("cif6addr: ioctl(SIOCGIFINDEX): %m (%d)", errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    </div><div class='del'>-    memset(&amp;ifr6, 0, sizeof(ifr6));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(ifr6.ifr6_addr, our_eui64);</div><div class='del'>-    ifr6.ifr6_ifindex = ifr.ifr_ifindex;</div><div class='del'>-    ifr6.ifr6_prefixlen = 10;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sock6_fd, SIOCDIFADDR, &amp;ifr6) &lt; 0) {</div><div class='del'>-	if (errno != EADDRNOTAVAIL) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		error("cif6addr: ioctl(SIOCDIFADDR): %m (%d)", errno);</div><div class='del'>-	}</div><div class='del'>-        else {</div><div class='del'>-	    warn("cif6addr: ioctl(SIOCDIFADDR): No such address");</div><div class='del'>-	}</div><div class='del'>-        return (0);</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* INET6 */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_pty - get a pty master/slave pair and chown the slave side</div><div class='del'>- * to the uid given.  Assumes slave_name points to &gt;= 16 bytes of space.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_pty(master_fdp, slave_fdp, slave_name, uid)</div><div class='del'>-    int *master_fdp;</div><div class='del'>-    int *slave_fdp;</div><div class='del'>-    char *slave_name;</div><div class='del'>-    int uid;</div><div class='del'>-{</div><div class='del'>-    int i, mfd, sfd = -1;</div><div class='del'>-    char pty_name[16];</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-#ifdef TIOCGPTN</div><div class='del'>-    /*</div><div class='del'>-     * Try the unix98 way first.</div><div class='del'>-     */</div><div class='del'>-    mfd = open("/dev/ptmx", O_RDWR);</div><div class='del'>-    if (mfd &gt;= 0) {</div><div class='del'>-	int ptn;</div><div class='del'>-	if (ioctl(mfd, TIOCGPTN, &amp;ptn) &gt;= 0) {</div><div class='del'>-	    slprintf(pty_name, sizeof(pty_name), "/dev/pts/%d", ptn);</div><div class='del'>-	    chmod(pty_name, S_IRUSR | S_IWUSR);</div><div class='del'>-#ifdef TIOCSPTLCK</div><div class='del'>-	    ptn = 0;</div><div class='del'>-	    if (ioctl(mfd, TIOCSPTLCK, &amp;ptn) &lt; 0)</div><div class='del'>-		warn("Couldn't unlock pty slave %s: %m", pty_name);</div><div class='del'>-#endif</div><div class='del'>-	    if ((sfd = open(pty_name, O_RDWR | O_NOCTTY)) &lt; 0)</div><div class='del'>-		warn("Couldn't open pty slave %s: %m", pty_name);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif /* TIOCGPTN */</div><div class='del'>-</div><div class='del'>-    if (sfd &lt; 0) {</div><div class='del'>-	/* the old way - scan through the pty name space */</div><div class='del'>-	for (i = 0; i &lt; 64; ++i) {</div><div class='del'>-	    slprintf(pty_name, sizeof(pty_name), "/dev/pty%c%x",</div><div class='del'>-		     'p' + i / 16, i % 16);</div><div class='del'>-	    mfd = open(pty_name, O_RDWR, 0);</div><div class='del'>-	    if (mfd &gt;= 0) {</div><div class='del'>-		pty_name[5] = 't';</div><div class='del'>-		sfd = open(pty_name, O_RDWR | O_NOCTTY, 0);</div><div class='del'>-		if (sfd &gt;= 0) {</div><div class='del'>-		    fchown(sfd, uid, -1);</div><div class='del'>-		    fchmod(sfd, S_IRUSR | S_IWUSR);</div><div class='del'>-		    break;</div><div class='del'>-		}</div><div class='del'>-		close(mfd);</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (sfd &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    strlcpy(slave_name, pty_name, 16);</div><div class='del'>-    *master_fdp = mfd;</div><div class='del'>-    *slave_fdp = sfd;</div><div class='del'>-    if (tcgetattr(sfd, &amp;tios) == 0) {</div><div class='del'>-	tios.c_cflag &amp;= ~(CSIZE | CSTOPB | PARENB);</div><div class='del'>-	tios.c_cflag |= CS8 | CREAD | CLOCAL;</div><div class='del'>-	tios.c_iflag  = IGNPAR;</div><div class='del'>-	tios.c_oflag  = 0;</div><div class='del'>-	tios.c_lflag  = 0;</div><div class='del'>-	if (tcsetattr(sfd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	    warn("couldn't set attributes on pty: %m");</div><div class='del'>-    } else</div><div class='del'>-	warn("couldn't get attributes on pty: %m");</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * open_loopback - open the device we use for getting packets</div><div class='del'>- * in demand mode.  Under Linux, we use a pty master/slave pair.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-open_ppp_loopback(void)</div><div class='del'>-{</div><div class='del'>-    int flags;</div><div class='del'>-</div><div class='del'>-    looped = 1;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	/* allocate ourselves a ppp unit */</div><div class='del'>-	if (make_ppp_unit() &lt; 0)</div><div class='del'>-	    die(1);</div><div class='del'>-	set_flags(ppp_dev_fd, SC_LOOP_TRAFFIC);</div><div class='del'>-	set_kdebugflag(kdebugflag);</div><div class='del'>-	ppp_fd = -1;</div><div class='del'>-	return ppp_dev_fd;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!get_pty(&amp;master_fd, &amp;slave_fd, loop_name, 0))</div><div class='del'>-	fatal("No free pty for loopback");</div><div class='del'>-    SYSDEBUG(("using %s for loopback", loop_name));</div><div class='del'>-</div><div class='del'>-    set_ppp_fd(slave_fd);</div><div class='del'>-</div><div class='del'>-    flags = fcntl(master_fd, F_GETFL);</div><div class='del'>-    if (flags == -1 ||</div><div class='del'>-	fcntl(master_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	warn("couldn't set master loopback to nonblock: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    flags = fcntl(ppp_fd, F_GETFL);</div><div class='del'>-    if (flags == -1 ||</div><div class='del'>-	fcntl(ppp_fd, F_SETFL, flags | O_NONBLOCK) == -1)</div><div class='del'>-	warn("couldn't set slave loopback to nonblock: %m(%d)", errno);</div><div class='del'>-</div><div class='del'>-    if (ioctl(ppp_fd, TIOCSETD, &amp;ppp_disc) &lt; 0)</div><div class='del'>-	fatal("ioctl(TIOCSETD): %m(%d)", errno);</div><div class='del'>-/*</div><div class='del'>- * Find out which interface we were given.</div><div class='del'>- */</div><div class='del'>-    if (ioctl(ppp_fd, PPPIOCGUNIT, &amp;ifunit) &lt; 0)</div><div class='del'>-	fatal("ioctl(PPPIOCGUNIT): %m(%d)", errno);</div><div class='del'>-/*</div><div class='del'>- * Enable debug in the driver if requested.</div><div class='del'>- */</div><div class='del'>-    set_kdebugflag (kdebugflag);</div><div class='del'>-</div><div class='del'>-    return master_fd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * restore_loop - reattach the ppp unit to the loopback.</div><div class='del'>- *</div><div class='del'>- * The kernel ppp driver automatically reattaches the ppp unit to</div><div class='del'>- * the loopback if the serial port is set to a line discipline other</div><div class='del'>- * than ppp, or if it detects a modem hangup.  The former will happen</div><div class='del'>- * in disestablish_ppp if the latter hasn't already happened, so we</div><div class='del'>- * shouldn't need to do anything.</div><div class='del'>- *</div><div class='del'>- * Just to be sure, set the real serial port to the normal discipline.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-static void</div><div class='del'>-restore_loop(void)</div><div class='del'>-{</div><div class='del'>-    looped = 1;</div><div class='del'>-    if (new_style_driver) {</div><div class='del'>-	set_flags(ppp_dev_fd, get_flags(ppp_dev_fd) | SC_LOOP_TRAFFIC);</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-    if (ppp_fd != slave_fd) {</div><div class='del'>-	(void) ioctl(ppp_fd, TIOCSETD, &amp;tty_disc);</div><div class='del'>-	set_ppp_fd(slave_fd);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sifnpmode - Set the mode for handling packets for a given NP.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-sifnpmode(u, proto, mode)</div><div class='del'>-    int u;</div><div class='del'>-    int proto;</div><div class='del'>-    enum NPmode mode;</div><div class='del'>-{</div><div class='del'>-    struct npioctl npi;</div><div class='del'>-</div><div class='del'>-    npi.protocol = proto;</div><div class='del'>-    npi.mode     = mode;</div><div class='del'>-    if (ioctl(ppp_dev_fd, PPPIOCSNPMODE, (caddr_t) &amp;npi) &lt; 0) {</div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    error("ioctl(PPPIOCSNPMODE, %d, %d): %m (%d)",</div><div class='del'>-		   proto, mode, errno);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sipxfaddr - Config the interface IPX networknumber</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int sipxfaddr (int unit, unsigned long int network, unsigned char * node )</div><div class='del'>-{</div><div class='del'>-    int    result = 1;</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-    int    skfd; </div><div class='del'>-    struct ifreq         ifr;</div><div class='del'>-    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &amp;ifr.ifr_addr;</div><div class='del'>-</div><div class='del'>-    skfd = socket (AF_IPX, SOCK_DGRAM, 0);</div><div class='del'>-    if (skfd &lt; 0) { </div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    dbglog("socket(AF_IPX): %m (%d)", errno);</div><div class='del'>-	result = 0;</div><div class='del'>-    }</div><div class='del'>-    else {</div><div class='del'>-	memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-	strlcpy (ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-</div><div class='del'>-	memcpy (sipx-&gt;sipx_node, node, IPX_NODE_LEN);</div><div class='del'>-	sipx-&gt;sipx_family  = AF_IPX;</div><div class='del'>-	sipx-&gt;sipx_port    = 0;</div><div class='del'>-	sipx-&gt;sipx_network = htonl (network);</div><div class='del'>-	sipx-&gt;sipx_type    = IPX_FRAME_ETHERII;</div><div class='del'>-	sipx-&gt;sipx_action  = IPX_CRTITF;</div><div class='del'>-/*</div><div class='del'>- *  Set the IPX device</div><div class='del'>- */</div><div class='del'>-	if (ioctl(skfd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    result = 0;</div><div class='del'>-	    if (errno != EEXIST) {</div><div class='del'>-		if (! ok_error (errno))</div><div class='del'>-		    dbglog("ioctl(SIOCSIFADDR, CRTITF): %m (%d)", errno);</div><div class='del'>-	    }</div><div class='del'>-	    else {</div><div class='del'>-		warn("ioctl(SIOCSIFADDR, CRTITF): Address already exists");</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	close (skfd);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * cipxfaddr - Clear the information for the IPX network. The IPX routes</div><div class='del'>- *	       are removed and the device is no longer able to pass IPX</div><div class='del'>- *	       frames.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int cipxfaddr (int unit)</div><div class='del'>-{</div><div class='del'>-    int    result = 1;</div><div class='del'>-</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-    int    skfd; </div><div class='del'>-    struct ifreq         ifr;</div><div class='del'>-    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &amp;ifr.ifr_addr;</div><div class='del'>-</div><div class='del'>-    skfd = socket (AF_IPX, SOCK_DGRAM, 0);</div><div class='del'>-    if (skfd &lt; 0) { </div><div class='del'>-	if (! ok_error (errno))</div><div class='del'>-	    dbglog("socket(AF_IPX): %m (%d)", errno);</div><div class='del'>-	result = 0;</div><div class='del'>-    }</div><div class='del'>-    else {</div><div class='del'>-	memset (&amp;ifr, '\0', sizeof (ifr));</div><div class='del'>-	strlcpy (ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-</div><div class='del'>-	sipx-&gt;sipx_type    = IPX_FRAME_ETHERII;</div><div class='del'>-	sipx-&gt;sipx_action  = IPX_DLTITF;</div><div class='del'>-	sipx-&gt;sipx_family  = AF_IPX;</div><div class='del'>-/*</div><div class='del'>- *  Set the IPX device</div><div class='del'>- */</div><div class='del'>-	if (ioctl(skfd, SIOCSIFADDR, (caddr_t) &amp;ifr) &lt; 0) {</div><div class='del'>-	    if (! ok_error (errno))</div><div class='del'>-		info("ioctl(SIOCSIFADDR, IPX_DLTITF): %m (%d)", errno);</div><div class='del'>-	    result = 0;</div><div class='del'>-	}</div><div class='del'>-	close (skfd);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    return result;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Use the hostname as part of the random number seed.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_host_seed()</div><div class='del'>-{</div><div class='del'>-    int h;</div><div class='del'>-    char *p = hostname;</div><div class='del'>-</div><div class='del'>-    h = 407;</div><div class='del'>-    for (p = hostname; *p != 0; ++p)</div><div class='del'>-	h = h * 37 + *p;</div><div class='del'>-    return h;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/********************************************************************</div><div class='del'>- *</div><div class='del'>- * sys_check_options - check the options that the user specified</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-sys_check_options(void)</div><div class='del'>-{</div><div class='del'>-#ifdef IPX_CHANGE</div><div class='del'>-/*</div><div class='del'>- * Disable the IPX protocol if the support is not present in the kernel.</div><div class='del'>- */</div><div class='del'>-    char *path;</div><div class='del'>-</div><div class='del'>-    if (ipxcp_protent.enabled_flag) {</div><div class='del'>-	struct stat stat_buf;</div><div class='del'>-        if ((path = path_to_procfs("/net/ipx_interface")) == 0</div><div class='del'>-	    || lstat(path, &amp;stat_buf) &lt; 0) {</div><div class='del'>-	    error("IPX support is not present in the kernel\n");</div><div class='del'>-	    ipxcp_protent.enabled_flag = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    if (demand &amp;&amp; driver_is_old) {</div><div class='del'>-	option_error("demand dialling is not supported by kernel driver "</div><div class='del'>-		     "version %d.%d.%d", driver_version, driver_modification,</div><div class='del'>-		     driver_patch);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (multilink &amp;&amp; !new_style_driver) {</div><div class='del'>-	warn("Warning: multilink is not supported by the kernel driver");</div><div class='del'>-	multilink = 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/sys-solaris.c b/mdk-stage1/ppp/pppd/sys-solaris.c<br/>deleted file mode 100644<br/>index da5f9c45a..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/sys-solaris.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/sys-solaris.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,2737 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * System-dependent procedures for pppd under Solaris 2.</div><div class='del'>- *</div><div class='del'>- * Parts re-written by Adi Masputra &lt;adi.masputra@sun.com&gt;, based on </div><div class='del'>- * the original sys-svr4.c</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 2000 by Sun Microsystems, Inc.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  </div><div class='del'>- *</div><div class='del'>- * SUN MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY OF</div><div class='del'>- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED</div><div class='del'>- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A</div><div class='del'>- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  SUN SHALL NOT BE LIABLE FOR</div><div class='del'>- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR</div><div class='del'>- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;limits.h&gt;</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-#include &lt;sys/termiox.h&gt;</div><div class='del'>-#endif</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;utmpx.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/ioccom.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;sys/stropts.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/sockio.h&gt;</div><div class='del'>-#include &lt;sys/sysmacros.h&gt;</div><div class='del'>-#include &lt;sys/systeminfo.h&gt;</div><div class='del'>-#include &lt;sys/dlpi.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/mkdev.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/if_arp.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-#ifdef SOL2</div><div class='del'>-#include &lt;sys/tihdr.h&gt;</div><div class='del'>-#include &lt;sys/tiuser.h&gt;</div><div class='del'>-#include &lt;inet/common.h&gt;</div><div class='del'>-#include &lt;inet/mib2.h&gt;</div><div class='del'>-#include &lt;sys/ethernet.h&gt;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-#include "fsm.h"</div><div class='del'>-#include "lcp.h"</div><div class='del'>-#include "ipcp.h"</div><div class='del'>-#include "ccp.h"</div><div class='del'>-</div><div class='del'>-#if !defined(PPP_DRV_NAME)</div><div class='del'>-#define PPP_DRV_NAME	"ppp"</div><div class='del'>-#endif /* !defined(PPP_DRV_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(PPP_DEV_NAME)</div><div class='del'>-#define PPP_DEV_NAME	"/dev/" PPP_DRV_NAME</div><div class='del'>-#endif /* !defined(PPP_DEV_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(AHDLC_MOD_NAME)</div><div class='del'>-#define AHDLC_MOD_NAME	"ppp_ahdl"</div><div class='del'>-#endif /* !defined(AHDLC_MOD_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(COMP_MOD_NAME)</div><div class='del'>-#define COMP_MOD_NAME	"ppp_comp"</div><div class='del'>-#endif /* !defined(COMP_MOD_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(IP_DEV_NAME)</div><div class='del'>-#define	IP_DEV_NAME	"/dev/ip"</div><div class='del'>-#endif /* !defined(IP_DEV_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(IP_MOD_NAME)</div><div class='del'>-#define	IP_MOD_NAME	"ip"</div><div class='del'>-#endif /* !defined(IP_MOD_NAME) */</div><div class='del'>-</div><div class='del'>-#if !defined(UDP_DEV_NAME) &amp;&amp; defined(SOL2)</div><div class='del'>-#define	UDP_DEV_NAME	"/dev/udp"</div><div class='del'>-#endif /* !defined(UDP_DEV_NAME) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if !defined(UDP6_DEV_NAME) &amp;&amp; defined(SOL2)</div><div class='del'>-#define	UDP6_DEV_NAME	"/dev/udp6"</div><div class='del'>-#endif /* !defined(UDP6_DEV_NAME) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-/*</div><div class='del'>- * "/dev/udp" is used as a multiplexor to PLINK the interface stream</div><div class='del'>- * under. It is used in place of "/dev/ip" since STREAMS will not let</div><div class='del'>- * a driver be PLINK'ed under itself, and "/dev/ip" is typically the</div><div class='del'>- * driver at the bottom of the tunneling interfaces stream.</div><div class='del'>- */</div><div class='del'>-static char *mux_dev_name = UDP_DEV_NAME;</div><div class='del'>-#else</div><div class='del'>-static char *mux_dev_name = IP_DEV_NAME;</div><div class='del'>-#endif</div><div class='del'>-static int	pppfd;</div><div class='del'>-static int	fdmuxid = -1;</div><div class='del'>-static int	ipfd;</div><div class='del'>-static int	ipmuxid = -1;</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-static int	ip6fd;		/* IP file descriptor */</div><div class='del'>-static int	ip6muxid = -1;	/* Multiplexer file descriptor */</div><div class='del'>-static int	if6_is_up = 0;	/* IPv6 interface has been marked up */</div><div class='del'>-</div><div class='del'>-#define _IN6_LLX_FROM_EUI64(l, s, eui64, as) do {	\</div><div class='del'>-	s-&gt;sin6_addr.s6_addr32[0] = htonl(as); 	\</div><div class='del'>-	eui64_copy(eui64, s-&gt;sin6_addr.s6_addr32[2]);	\</div><div class='del'>-	s-&gt;sin6_family = AF_INET6;		\</div><div class='del'>-	l.lifr_addr.ss_family = AF_INET6;	\</div><div class='del'>-	l.lifr_addrlen = 10;			\</div><div class='del'>-	l.lifr_addr = laddr;			\</div><div class='del'>-	} while (0)</div><div class='del'>-</div><div class='del'>-#define IN6_LLADDR_FROM_EUI64(l, s, eui64)  \</div><div class='del'>-    _IN6_LLX_FROM_EUI64(l, s, eui64, 0xfe800000)</div><div class='del'>-</div><div class='del'>-#define IN6_LLTOKEN_FROM_EUI64(l, s, eui64) \</div><div class='del'>-    _IN6_LLX_FROM_EUI64(l, s, eui64, 0)</div><div class='del'>-</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-static char	first_ether_name[LIFNAMSIZ];	/* Solaris 8 and above */</div><div class='del'>-#else</div><div class='del'>-static char	first_ether_name[IFNAMSIZ];	/* Before Solaris 8 */</div><div class='del'>-#define MAXIFS		256			/* Max # of interfaces */</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-static int	restore_term;</div><div class='del'>-static struct termios inittermios;</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-static struct termiox inittermiox;</div><div class='del'>-static int	termiox_ok;</div><div class='del'>-#endif</div><div class='del'>-static struct winsize wsinfo;	/* Initial window size info */</div><div class='del'>-static pid_t	tty_sid;	/* original session ID for terminal */</div><div class='del'>-</div><div class='del'>-extern u_char	inpacket_buf[];	/* borrowed from main.c */</div><div class='del'>-</div><div class='del'>-#define MAX_POLLFDS	32</div><div class='del'>-static struct pollfd pollfds[MAX_POLLFDS];</div><div class='del'>-static int n_pollfds;</div><div class='del'>-</div><div class='del'>-static int	link_mtu, link_mru;</div><div class='del'>-</div><div class='del'>-#define NMODULES	32</div><div class='del'>-static int	tty_nmodules;</div><div class='del'>-static char	tty_modules[NMODULES][FMNAMESZ+1];</div><div class='del'>-static int	tty_npushed;</div><div class='del'>-</div><div class='del'>-static int	if_is_up;	/* Interface has been marked up */</div><div class='del'>-static u_int32_t remote_addr;		/* IP address of peer */</div><div class='del'>-static u_int32_t default_route_gateway;	/* Gateway for default route added */</div><div class='del'>-static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-static int translate_speed __P((int));</div><div class='del'>-static int baud_rate_of __P((int));</div><div class='del'>-static int get_ether_addr __P((u_int32_t, struct sockaddr *));</div><div class='del'>-static int get_hw_addr __P((char *, u_int32_t, struct sockaddr *));</div><div class='del'>-static int get_hw_addr_dlpi __P((char *, struct sockaddr *));</div><div class='del'>-static int dlpi_attach __P((int, int));</div><div class='del'>-static int dlpi_info_req __P((int));</div><div class='del'>-static int dlpi_get_reply __P((int, union DL_primitives *, int, int));</div><div class='del'>-static int strioctl __P((int, int, void *, int, int));</div><div class='del'>-</div><div class='del'>-#ifdef SOL2</div><div class='del'>-/*</div><div class='del'>- * sifppa - Sets interface ppa</div><div class='del'>- *</div><div class='del'>- * without setting the ppa, ip module will return EINVAL upon setting the</div><div class='del'>- * interface UP (SIOCSxIFFLAGS). This is because ip module in 2.8 expects</div><div class='del'>- * two DLPI_INFO_REQ to be sent down to the driver (below ip) before</div><div class='del'>- * IFF_UP can be set. Plumbing the device causes one DLPI_INFO_REQ to</div><div class='del'>- * be sent down, and the second DLPI_INFO_REQ is sent upon receiving</div><div class='del'>- * IF_UNITSEL (old) or SIOCSLIFNAME (new) ioctls. Such setting of the ppa</div><div class='del'>- * is required because the ppp DLPI provider advertises itself as</div><div class='del'>- * a DLPI style 2 type, which requires a point of attachment to be</div><div class='del'>- * specified. The only way the user can specify a point of attachment</div><div class='del'>- * is via SIOCSLIFNAME or IF_UNITSEL.</div><div class='del'>- *</div><div class='del'>- * Such changes in the behavior of ip module was made to meet new or</div><div class='del'>- * evolving standards requirements.</div><div class='del'>- *</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-sifppa(fd, ppa)</div><div class='del'>-    int fd;</div><div class='del'>-    int ppa;</div><div class='del'>-{</div><div class='del'>-    return (int)ioctl(fd, IF_UNITSEL, (char *)&amp;ppa);</div><div class='del'>-}</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2) &amp;&amp; defined(INET6)</div><div class='del'>-/*</div><div class='del'>- * get_first_ethernet - returns the first Ethernet interface name found in </div><div class='del'>- * the system, or NULL if none is found</div><div class='del'>- *</div><div class='del'>- * NOTE: This is the lifreq version (Solaris 8 and above)</div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-get_first_ethernet()</div><div class='del'>-{</div><div class='del'>-    struct lifnum lifn;</div><div class='del'>-    struct lifconf lifc;</div><div class='del'>-    struct lifreq *plifreq;</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-    int	fd, num_ifs, i, found;</div><div class='del'>-    uint_t fl, req_size;</div><div class='del'>-    char *req;</div><div class='del'>-</div><div class='del'>-    fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0) {</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Find out how many interfaces are running</div><div class='del'>-     */</div><div class='del'>-    lifn.lifn_family = AF_UNSPEC;</div><div class='del'>-    lifn.lifn_flags = LIFC_NOXMIT;</div><div class='del'>-    if (ioctl(fd, SIOCGLIFNUM, &amp;lifn) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	error("could not determine number of interfaces: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    num_ifs = lifn.lifn_count;</div><div class='del'>-    req_size = num_ifs * sizeof(struct lifreq);</div><div class='del'>-    req = malloc(req_size);</div><div class='del'>-    if (req == NULL) {</div><div class='del'>-	close(fd);</div><div class='del'>-	error("out of memory");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Get interface configuration info for all interfaces</div><div class='del'>-     */</div><div class='del'>-    lifc.lifc_family = AF_UNSPEC;</div><div class='del'>-    lifc.lifc_flags = LIFC_NOXMIT;</div><div class='del'>-    lifc.lifc_len = req_size;</div><div class='del'>-    lifc.lifc_buf = req;</div><div class='del'>-    if (ioctl(fd, SIOCGLIFCONF, &amp;lifc) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	free(req);</div><div class='del'>-	error("SIOCGLIFCONF: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * And traverse each interface to look specifically for the first</div><div class='del'>-     * occurence of an Ethernet interface which has been marked up</div><div class='del'>-     */</div><div class='del'>-    plifreq = lifc.lifc_req;</div><div class='del'>-    found = 0;</div><div class='del'>-    for (i = lifc.lifc_len / sizeof(struct lifreq); i &gt; 0; i--, plifreq++) {</div><div class='del'>-</div><div class='del'>-	if (strchr(plifreq-&gt;lifr_name, ':') != NULL)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-	strncpy(lifr.lifr_name, plifreq-&gt;lifr_name, sizeof(lifr.lifr_name));</div><div class='del'>-	if (ioctl(fd, SIOCGLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	    close(fd);</div><div class='del'>-	    free(req);</div><div class='del'>-	    error("SIOCGLIFFLAGS: %m");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	fl = lifr.lifr_flags;</div><div class='del'>-</div><div class='del'>-	if ((fl &amp; (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT|IFF_LOOPBACK|IFF_NOARP))</div><div class='del'>-		!= (IFF_UP | IFF_BROADCAST))</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	found = 1;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    free(req);</div><div class='del'>-    close(fd);</div><div class='del'>-</div><div class='del'>-    if (found) {</div><div class='del'>-	strncpy(first_ether_name, lifr.lifr_name, sizeof(first_ether_name));</div><div class='del'>-	return (char *)first_ether_name;</div><div class='del'>-    } else</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-#else</div><div class='del'>-/*</div><div class='del'>- * get_first_ethernet - returns the first Ethernet interface name found in </div><div class='del'>- * the system, or NULL if none is found</div><div class='del'>- *</div><div class='del'>- * NOTE: This is the ifreq version (before Solaris 8). </div><div class='del'>- */</div><div class='del'>-char *</div><div class='del'>-get_first_ethernet()</div><div class='del'>-{</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq *pifreq;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    int	fd, num_ifs, i, found;</div><div class='del'>-    uint_t fl, req_size;</div><div class='del'>-    char *req;</div><div class='del'>-</div><div class='del'>-    fd = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0) {</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Find out how many interfaces are running</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(fd, SIOCGIFNUM, (char *)&amp;num_ifs) &lt; 0) {</div><div class='del'>-	num_ifs = MAXIFS;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    req_size = num_ifs * sizeof(struct ifreq);</div><div class='del'>-    req = malloc(req_size);</div><div class='del'>-    if (req == NULL) {</div><div class='del'>-	close(fd);</div><div class='del'>-	error("out of memory");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Get interface configuration info for all interfaces</div><div class='del'>-     */</div><div class='del'>-    ifc.ifc_len = req_size;</div><div class='del'>-    ifc.ifc_buf = req;</div><div class='del'>-    if (ioctl(fd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	free(req);</div><div class='del'>-	error("SIOCGIFCONF: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * And traverse each interface to look specifically for the first</div><div class='del'>-     * occurence of an Ethernet interface which has been marked up</div><div class='del'>-     */</div><div class='del'>-    pifreq = ifc.ifc_req;</div><div class='del'>-    found = 0;</div><div class='del'>-    for (i = ifc.ifc_len / sizeof(struct ifreq); i &gt; 0; i--, pifreq++) {</div><div class='del'>-</div><div class='del'>-	if (strchr(pifreq-&gt;ifr_name, ':') != NULL)</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-	strncpy(ifr.ifr_name, pifreq-&gt;ifr_name, sizeof(ifr.ifr_name));</div><div class='del'>-	if (ioctl(fd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	    close(fd);</div><div class='del'>-	    free(req);</div><div class='del'>-	    error("SIOCGIFFLAGS: %m");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	fl = ifr.ifr_flags;</div><div class='del'>-</div><div class='del'>-	if ((fl &amp; (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT|IFF_LOOPBACK|IFF_NOARP))</div><div class='del'>-		!= (IFF_UP | IFF_BROADCAST))</div><div class='del'>-	    continue;</div><div class='del'>-</div><div class='del'>-	found = 1;</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    free(req);</div><div class='del'>-    close(fd);</div><div class='del'>-</div><div class='del'>-    if (found) {</div><div class='del'>-	strncpy(first_ether_name, ifr.ifr_name, sizeof(first_ether_name));</div><div class='del'>-	return (char *)first_ether_name;</div><div class='del'>-    } else</div><div class='del'>-	return NULL;</div><div class='del'>-}</div><div class='del'>-#endif /* defined(SOL2) &amp;&amp; defined(INET6) */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-/*</div><div class='del'>- * get_if_hwaddr - get the hardware address for the specified</div><div class='del'>- * network interface device.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_if_hwaddr(u_char *addr, char *if_name)</div><div class='del'>-{</div><div class='del'>-    struct sockaddr s_eth_addr;</div><div class='del'>-    struct ether_addr *eth_addr = (struct ether_addr *)&amp;s_eth_addr.sa_data;</div><div class='del'>-</div><div class='del'>-    if (if_name == NULL)</div><div class='del'>-	return -1;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Send DL_INFO_REQ to the driver to solicit its MAC address</div><div class='del'>-     */</div><div class='del'>-    if (!get_hw_addr_dlpi(if_name, &amp;s_eth_addr)) {</div><div class='del'>-	error("could not obtain hardware address for %s", if_name);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memcpy(addr, eth_addr-&gt;ether_addr_octet, 6);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2) &amp;&amp; defined(INET6)</div><div class='del'>-/*</div><div class='del'>- * slifname - Sets interface ppa and flags</div><div class='del'>- *</div><div class='del'>- * in addition to the comments stated in sifppa(), IFF_IPV6 bit must</div><div class='del'>- * be set in order to declare this as an IPv6 interface</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-slifname(fd, ppa)</div><div class='del'>-    int fd;</div><div class='del'>-    int ppa;</div><div class='del'>-{</div><div class='del'>-    struct  lifreq lifr;</div><div class='del'>-    int	    ret;</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    ret = ioctl(fd, SIOCGLIFFLAGS, &amp;lifr);</div><div class='del'>-    if (ret &lt; 0)</div><div class='del'>-	goto slifname_done;</div><div class='del'>-</div><div class='del'>-    lifr.lifr_flags |= IFF_IPV6;</div><div class='del'>-    lifr.lifr_flags &amp;= ~(IFF_BROADCAST | IFF_IPV4);</div><div class='del'>-    lifr.lifr_ppa = ppa;</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-</div><div class='del'>-    ret = ioctl(fd, SIOCSLIFNAME, &amp;lifr);</div><div class='del'>-</div><div class='del'>-slifname_done:</div><div class='del'>-    return ret;</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ether_to_eui64 - Convert 48-bit Ethernet address into 64-bit EUI</div><div class='del'>- *</div><div class='del'>- * walks the list of valid ethernet interfaces, and convert the first</div><div class='del'>- * found 48-bit MAC address into EUI 64. caller also assumes that</div><div class='del'>- * the system has a properly configured Ethernet interface for this</div><div class='del'>- * function to return non-zero.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ether_to_eui64(eui64_t *p_eui64)</div><div class='del'>-{</div><div class='del'>-    struct sockaddr s_eth_addr;</div><div class='del'>-    struct ether_addr *eth_addr = (struct ether_addr *)&amp;s_eth_addr.sa_data;</div><div class='del'>-    char *if_name;</div><div class='del'>-</div><div class='del'>-    if ((if_name = get_first_ethernet()) == NULL) {</div><div class='del'>-	error("no persistent id can be found");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>- </div><div class='del'>-    /*</div><div class='del'>-     * Send DL_INFO_REQ to the driver to solicit its MAC address</div><div class='del'>-     */</div><div class='del'>-    if (!get_hw_addr_dlpi(if_name, &amp;s_eth_addr)) {</div><div class='del'>-	error("could not obtain hardware address for %s", if_name);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * And convert the EUI-48 into EUI-64, per RFC 2472 [sec 4.1]</div><div class='del'>-     */</div><div class='del'>-    p_eui64-&gt;e8[0] = (eth_addr-&gt;ether_addr_octet[0] &amp; 0xFF) | 0x02;</div><div class='del'>-    p_eui64-&gt;e8[1] = (eth_addr-&gt;ether_addr_octet[1] &amp; 0xFF);</div><div class='del'>-    p_eui64-&gt;e8[2] = (eth_addr-&gt;ether_addr_octet[2] &amp; 0xFF);</div><div class='del'>-    p_eui64-&gt;e8[3] = 0xFF;</div><div class='del'>-    p_eui64-&gt;e8[4] = 0xFE;</div><div class='del'>-    p_eui64-&gt;e8[5] = (eth_addr-&gt;ether_addr_octet[3] &amp; 0xFF);</div><div class='del'>-    p_eui64-&gt;e8[6] = (eth_addr-&gt;ether_addr_octet[4] &amp; 0xFF);</div><div class='del'>-    p_eui64-&gt;e8[7] = (eth_addr-&gt;ether_addr_octet[5] &amp; 0xFF);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-#endif /* defined(SOL2) &amp;&amp; defined(INET6) */</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_init - System-dependent initialization.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_init()</div><div class='del'>-{</div><div class='del'>-    int ifd, x;</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    int i6fd;</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-#if !defined(SOL2)</div><div class='del'>-    struct {</div><div class='del'>-	union DL_primitives prim;</div><div class='del'>-	char space[64];</div><div class='del'>-    } reply;</div><div class='del'>-#endif /* !defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    ipfd = open(mux_dev_name, O_RDWR, 0);</div><div class='del'>-    if (ipfd &lt; 0)</div><div class='del'>-	fatal("Couldn't open IP device: %m");</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    ip6fd = open(UDP6_DEV_NAME, O_RDWR, 0);</div><div class='del'>-    if (ip6fd &lt; 0)</div><div class='del'>-	fatal("Couldn't open IP device (2): %m");</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    if (default_device &amp;&amp; !notty)</div><div class='del'>-	tty_sid = getsid((pid_t)0);</div><div class='del'>-</div><div class='del'>-    pppfd = open(PPP_DEV_NAME, O_RDWR | O_NONBLOCK, 0);</div><div class='del'>-    if (pppfd &lt; 0)</div><div class='del'>-	fatal("Can't open %s: %m", PPP_DEV_NAME);</div><div class='del'>-    if (kdebugflag &amp; 1) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_DRIVER;</div><div class='del'>-	strioctl(pppfd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Assign a new PPA and get its unit number. */</div><div class='del'>-    if (strioctl(pppfd, PPPIO_NEWPPA, &amp;ifunit, 0, sizeof(int)) &lt; 0)</div><div class='del'>-	fatal("Can't create new PPP interface: %m");</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    /*</div><div class='del'>-     * Since sys_init() is called prior to ifname being set in main(),</div><div class='del'>-     * we need to get the ifname now, otherwise slifname(), and others,</div><div class='del'>-     * will fail, or maybe, I should move them to a later point ?</div><div class='del'>-     * &lt;adi.masputra@sun.com&gt;</div><div class='del'>-     */</div><div class='del'>-    sprintf(ifname, PPP_DRV_NAME "%d", ifunit);</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-    /*</div><div class='del'>-     * Open the ppp device again and link it under the ip multiplexor.</div><div class='del'>-     * IP will assign a unit number which hopefully is the same as ifunit.</div><div class='del'>-     * I don't know any way to be certain they will be the same. :-(</div><div class='del'>-     */</div><div class='del'>-    ifd = open(PPP_DEV_NAME, O_RDWR, 0);</div><div class='del'>-    if (ifd &lt; 0)</div><div class='del'>-	fatal("Can't open %s (2): %m", PPP_DEV_NAME);</div><div class='del'>-    if (kdebugflag &amp; 1) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_DRIVER;</div><div class='del'>-	strioctl(ifd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    i6fd = open(PPP_DEV_NAME, O_RDWR, 0);</div><div class='del'>-    if (i6fd &lt; 0) {</div><div class='del'>-	close(ifd);</div><div class='del'>-	fatal("Can't open %s (3): %m", PPP_DEV_NAME);</div><div class='del'>-    }</div><div class='del'>-    if (kdebugflag &amp; 1) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_DRIVER;</div><div class='del'>-	strioctl(i6fd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    if (ioctl(ifd, I_PUSH, IP_MOD_NAME) &lt; 0) {</div><div class='del'>-	close(ifd);</div><div class='del'>-#if defined(INET6)</div><div class='del'>-	close(i6fd);</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-	fatal("Can't push IP module: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Assign ppa according to the unit number returned by ppp device</div><div class='del'>-     * after plumbing is completed above.</div><div class='del'>-     */</div><div class='del'>-    if (sifppa(ifd, ifunit) &lt; 0) {</div><div class='del'>-        close (ifd);</div><div class='del'>-#if defined(INET6)</div><div class='del'>-	close(i6fd);</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-        fatal("Can't set ppa for unit %d: %m", ifunit);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(INET6)</div><div class='del'>-    /*</div><div class='del'>-     * An IPv6 interface is created anyway, even when the user does not </div><div class='del'>-     * explicitly enable it. Note that the interface will be marked</div><div class='del'>-     * IPv6 during slifname().</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(i6fd, I_PUSH, IP_MOD_NAME) &lt; 0) {</div><div class='del'>-	close(ifd);</div><div class='del'>-	close(i6fd);</div><div class='del'>-	fatal("Can't push IP module (2): %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Assign ppa according to the unit number returned by ppp device</div><div class='del'>-     * after plumbing is completed above. In addition, mark the interface</div><div class='del'>-     * as an IPv6 interface.</div><div class='del'>-     */</div><div class='del'>-    if (slifname(i6fd, ifunit) &lt; 0) {</div><div class='del'>-	close(ifd);</div><div class='del'>-	close(i6fd);</div><div class='del'>-	fatal("Can't set ifname for unit %d: %m", ifunit);</div><div class='del'>-    }</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-</div><div class='del'>-    ipmuxid = ioctl(ipfd, I_PLINK, ifd);</div><div class='del'>-    close(ifd);</div><div class='del'>-    if (ipmuxid &lt; 0) {</div><div class='del'>-#if defined(INET6)</div><div class='del'>-	close(i6fd);</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-	fatal("Can't I_PLINK PPP device to IP: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    sprintf(ifr.ifr_name, "%s", ifname);</div><div class='del'>-    ifr.ifr_ip_muxid = ipmuxid;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * In Sol 8 and later, STREAMS dynamic module plumbing feature exists.</div><div class='del'>-     * This is so that an arbitrary module can be inserted, or deleted, </div><div class='del'>-     * between ip module and the device driver without tearing down the </div><div class='del'>-     * existing stream. Such feature requires the mux ids, which is set </div><div class='del'>-     * by SIOCSIFMUXID (or SIOCLSIFMUXID).</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFMUXID, &amp;ifr) &lt; 0) {</div><div class='del'>-	ioctl(ipfd, I_PUNLINK, ipmuxid);</div><div class='del'>-#if defined(INET6)</div><div class='del'>-	close(i6fd);</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-	fatal("SIOCSIFMUXID: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#else /* else if !defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    if (dlpi_attach(ifd, ifunit) &lt; 0 ||</div><div class='del'>-	dlpi_get_reply(ifd, &amp;reply.prim, DL_OK_ACK, sizeof(reply)) &lt; 0) {</div><div class='del'>-	close(ifd);</div><div class='del'>-	fatal("Can't attach to ppp%d: %m", ifunit);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ipmuxid = ioctl(ipfd, I_LINK, ifd);</div><div class='del'>-    close(ifd);</div><div class='del'>-    if (ipmuxid &lt; 0)</div><div class='del'>-	fatal("Can't link PPP device to IP: %m");</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    ip6muxid = ioctl(ip6fd, I_PLINK, i6fd);</div><div class='del'>-    close(i6fd);</div><div class='del'>-    if (ip6muxid &lt; 0) {</div><div class='del'>-	ioctl(ipfd, I_PUNLINK, ipmuxid);</div><div class='del'>-	fatal("Can't I_PLINK PPP device to IP (2): %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    sprintf(lifr.lifr_name, "%s", ifname);</div><div class='del'>-    lifr.lifr_ip_muxid = ip6muxid;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Let IP know of the mux id [see comment for SIOCSIFMUXID above]</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(ip6fd, SIOCSLIFMUXID, &amp;lifr) &lt; 0) {</div><div class='del'>-	ioctl(ipfd, I_PUNLINK, ipmuxid);</div><div class='del'>-	ioctl(ip6fd, I_PUNLINK, ip6muxid);</div><div class='del'>-	fatal("Can't link PPP device to IP (2): %m");</div><div class='del'>-    }</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if !defined(SOL2)</div><div class='del'>-    /* Set the interface name for the link. */</div><div class='del'>-    slprintf(ifr.ifr_name, sizeof(ifr.ifr_name), PPP_DRV_NAME "%d", ifunit);</div><div class='del'>-    ifr.ifr_metric = ipmuxid;</div><div class='del'>-    if (strioctl(ipfd, SIOCSIFNAME, (char *)&amp;ifr, sizeof ifr, 0) &lt; 0)</div><div class='del'>-	fatal("Can't set interface name %s: %m", ifr.ifr_name);</div><div class='del'>-#endif /* !defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    n_pollfds = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_cleanup - restore any system state we modified before exiting:</div><div class='del'>- * mark the interface down, delete default route and/or proxy arp entry.</div><div class='del'>- * This should call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_cleanup()</div><div class='del'>-{</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-#if defined(INET6)</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-</div><div class='del'>-#if defined(SOL2) &amp;&amp; defined(INET6)</div><div class='del'>-    if (if6_is_up)</div><div class='del'>-	sif6down(0);</div><div class='del'>-#endif /* defined(SOL2) &amp;&amp; defined(INET6) */</div><div class='del'>-    if (if_is_up)</div><div class='del'>-	sifdown(0);</div><div class='del'>-    if (default_route_gateway)</div><div class='del'>-	cifdefaultroute(0, default_route_gateway, default_route_gateway);</div><div class='del'>-    if (proxy_arp_addr)</div><div class='del'>-	cifproxyarp(0, proxy_arp_addr);</div><div class='del'>-#if defined(SOL2)</div><div class='del'>-    /*</div><div class='del'>-     * Make sure we ask ip what the muxid, because 'ifconfig modlist' will</div><div class='del'>-     * unlink and re-link the modules, causing the muxid to change.</div><div class='del'>-     */</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    sprintf(ifr.ifr_name, "%s", ifname);</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("SIOCGIFFLAGS: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFMUXID, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("SIOCGIFMUXID: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ipmuxid = ifr.ifr_ip_muxid;</div><div class='del'>-     </div><div class='del'>-    if (ioctl(ipfd, I_PUNLINK, ipmuxid) &lt; 0) {</div><div class='del'>-	error("Can't I_PUNLINK PPP from IP: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-#if defined(INET6)</div><div class='del'>-    /*</div><div class='del'>-     * Make sure we ask ip what the muxid, because 'ifconfig modlist' will</div><div class='del'>-     * unlink and re-link the modules, causing the muxid to change.</div><div class='del'>-     */</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    sprintf(lifr.lifr_name, "%s", ifname);</div><div class='del'>-    if (ioctl(ip6fd, SIOCGLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	error("SIOCGLIFFLAGS: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ioctl(ip6fd, SIOCGLIFMUXID, &amp;lifr) &lt; 0) {</div><div class='del'>-	error("SIOCGLIFMUXID: %m");</div><div class='del'>-	return;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    ip6muxid = lifr.lifr_ip_muxid;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ip6fd, I_PUNLINK, ip6muxid) &lt; 0) {</div><div class='del'>-	error("Can't I_PUNLINK PPP from IP (2): %m");</div><div class='del'>-    }</div><div class='del'>-#endif /* defined(INET6) */</div><div class='del'>-#endif /* defined(SOL2) */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_close - Clean up in a child process before execing.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_close()</div><div class='del'>-{</div><div class='del'>-    close(ipfd);</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    close(ip6fd);</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-    if (pppfd &gt;= 0)</div><div class='del'>-	close(pppfd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_check_options - check the options that the user specified</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sys_check_options()</div><div class='del'>-{</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * daemon - Detach us from controlling terminal session.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-daemon(nochdir, noclose)</div><div class='del'>-    int nochdir, noclose;</div><div class='del'>-{</div><div class='del'>-    int pid;</div><div class='del'>-</div><div class='del'>-    if ((pid = fork()) &lt; 0)</div><div class='del'>-	return -1;</div><div class='del'>-    if (pid != 0)</div><div class='del'>-	exit(0);		/* parent dies */</div><div class='del'>-    setsid();</div><div class='del'>-    if (!nochdir)</div><div class='del'>-	chdir("/");</div><div class='del'>-    if (!noclose) {</div><div class='del'>-	fclose(stdin);		/* don't need stdin, stdout, stderr */</div><div class='del'>-	fclose(stdout);</div><div class='del'>-	fclose(stderr);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_available - check whether the system has any ppp interfaces</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ppp_available()</div><div class='del'>-{</div><div class='del'>-    struct stat buf;</div><div class='del'>-</div><div class='del'>-    return stat(PPP_DEV_NAME, &amp;buf) &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * any_compressions - see if compression is enabled or not</div><div class='del'>- *</div><div class='del'>- * In the STREAMS implementation of kernel-portion pppd,</div><div class='del'>- * the comp STREAMS module performs the ACFC, PFC, as well</div><div class='del'>- * CCP and VJ compressions. However, if the user has explicitly</div><div class='del'>- * declare to not enable them from the command line, there is</div><div class='del'>- * no point of having the comp module be pushed on the stream.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-any_compressions()</div><div class='del'>-{</div><div class='del'>-    if ((!lcp_wantoptions[0].neg_accompression) &amp;&amp;</div><div class='del'>-	(!lcp_wantoptions[0].neg_pcompression) &amp;&amp;</div><div class='del'>-	(!ccp_protent.enabled_flag) &amp;&amp;</div><div class='del'>-	(!ipcp_wantoptions[0].neg_vj)) {</div><div class='del'>-	    return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * tty_establish_ppp - Turn the serial port into a ppp interface.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-tty_establish_ppp(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    /* Pop any existing modules off the tty stream. */</div><div class='del'>-    for (i = 0;; ++i)</div><div class='del'>-	if (ioctl(fd, I_LOOK, tty_modules[i]) &lt; 0</div><div class='del'>-	    || strcmp(tty_modules[i], "ptem") == 0</div><div class='del'>-	    || ioctl(fd, I_POP, 0) &lt; 0)</div><div class='del'>-	    break;</div><div class='del'>-    tty_nmodules = i;</div><div class='del'>-</div><div class='del'>-    /* Push the async hdlc module and the compressor module. */</div><div class='del'>-    tty_npushed = 0;</div><div class='del'>-</div><div class='del'>-    if(!sync_serial) {</div><div class='del'>-        if (ioctl(fd, I_PUSH, AHDLC_MOD_NAME) &lt; 0) {</div><div class='del'>-            error("Couldn't push PPP Async HDLC module: %m");</div><div class='del'>-	    return -1;</div><div class='del'>-        }</div><div class='del'>-        ++tty_npushed;</div><div class='del'>-    }</div><div class='del'>-    if (kdebugflag &amp; 4) {</div><div class='del'>-	i = PPPDBG_LOG + PPPDBG_AHDLC;</div><div class='del'>-	strioctl(pppfd, PPPIO_DEBUG, &amp;i, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-    /*</div><div class='del'>-     * There's no need to push comp module if we don't intend</div><div class='del'>-     * to compress anything</div><div class='del'>-     */</div><div class='del'>-    if (any_compressions()) { </div><div class='del'>-        if (ioctl(fd, I_PUSH, COMP_MOD_NAME) &lt; 0)</div><div class='del'>-	    error("Couldn't push PPP compression module: %m");</div><div class='del'>-	else</div><div class='del'>-	    ++tty_npushed;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (kdebugflag &amp; 2) {</div><div class='del'>-	i = PPPDBG_LOG; </div><div class='del'>-	if (any_compressions())</div><div class='del'>-	    i += PPPDBG_COMP;</div><div class='del'>-	strioctl(pppfd, PPPIO_DEBUG, &amp;i, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Link the serial port under the PPP multiplexor. */</div><div class='del'>-    if ((fdmuxid = ioctl(pppfd, I_LINK, fd)) &lt; 0) {</div><div class='del'>-	error("Can't link tty to PPP mux: %m");</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return pppfd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * tty_disestablish_ppp - Restore the serial port to normal operation.</div><div class='del'>- * It attempts to reconstruct the stream with the previously popped</div><div class='del'>- * modules.  This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-tty_disestablish_ppp(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (fdmuxid &gt;= 0) {</div><div class='del'>-	if (ioctl(pppfd, I_UNLINK, fdmuxid) &lt; 0) {</div><div class='del'>-	    if (!hungup)</div><div class='del'>-		error("Can't unlink tty from PPP mux: %m");</div><div class='del'>-	}</div><div class='del'>-	fdmuxid = -1;</div><div class='del'>-</div><div class='del'>-	if (!hungup) {</div><div class='del'>-	    while (tty_npushed &gt; 0 &amp;&amp; ioctl(fd, I_POP, 0) &gt;= 0)</div><div class='del'>-		--tty_npushed;</div><div class='del'>-	    for (i = tty_nmodules - 1; i &gt;= 0; --i)</div><div class='del'>-		if (ioctl(fd, I_PUSH, tty_modules[i]) &lt; 0)</div><div class='del'>-		    error("Couldn't restore tty module %s: %m",</div><div class='del'>-			   tty_modules[i]);</div><div class='del'>-	}</div><div class='del'>-	if (hungup &amp;&amp; default_device &amp;&amp; tty_sid &gt; 0) {</div><div class='del'>-	    /*</div><div class='del'>-	     * If we have received a hangup, we need to send a SIGHUP</div><div class='del'>-	     * to the terminal's controlling process.  The reason is</div><div class='del'>-	     * that the original stream head for the terminal hasn't</div><div class='del'>-	     * seen the M_HANGUP message (it went up through the ppp</div><div class='del'>-	     * driver to the stream head for our fd to /dev/ppp).</div><div class='del'>-	     */</div><div class='del'>-	    kill(tty_sid, SIGHUP);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Check whether the link seems not to be 8-bit clean.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-clean_check()</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    char *s;</div><div class='del'>-</div><div class='del'>-    if (strioctl(pppfd, PPPIO_GCLEAN, &amp;x, 0, sizeof(x)) &lt; 0)</div><div class='del'>-	return;</div><div class='del'>-    s = NULL;</div><div class='del'>-    switch (~x) {</div><div class='del'>-    case RCV_B7_0:</div><div class='del'>-	s = "bit 7 set to 1";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_B7_1:</div><div class='del'>-	s = "bit 7 set to 0";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_EVNP:</div><div class='del'>-	s = "odd parity";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_ODDP:</div><div class='del'>-	s = "even parity";</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    if (s != NULL) {</div><div class='del'>-	warn("Serial link is not 8-bit clean:");</div><div class='del'>-	warn("All received characters had %s", s);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * List of valid speeds.</div><div class='del'>- */</div><div class='del'>-struct speed {</div><div class='del'>-    int speed_int, speed_val;</div><div class='del'>-} speeds[] = {</div><div class='del'>-#ifdef B50</div><div class='del'>-    { 50, B50 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B75</div><div class='del'>-    { 75, B75 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B110</div><div class='del'>-    { 110, B110 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B134</div><div class='del'>-    { 134, B134 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B150</div><div class='del'>-    { 150, B150 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B200</div><div class='del'>-    { 200, B200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B300</div><div class='del'>-    { 300, B300 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B600</div><div class='del'>-    { 600, B600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1200</div><div class='del'>-    { 1200, B1200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1800</div><div class='del'>-    { 1800, B1800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2000</div><div class='del'>-    { 2000, B2000 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2400</div><div class='del'>-    { 2400, B2400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B3600</div><div class='del'>-    { 3600, B3600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B4800</div><div class='del'>-    { 4800, B4800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B7200</div><div class='del'>-    { 7200, B7200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B9600</div><div class='del'>-    { 9600, B9600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B19200</div><div class='del'>-    { 19200, B19200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B38400</div><div class='del'>-    { 38400, B38400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTA</div><div class='del'>-    { 19200, EXTA },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTB</div><div class='del'>-    { 38400, EXTB },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B57600</div><div class='del'>-    { 57600, B57600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B76800</div><div class='del'>-    { 76800, B76800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B115200</div><div class='del'>-    { 115200, B115200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B153600</div><div class='del'>-    { 153600, B153600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B230400</div><div class='del'>-    { 230400, B230400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B307200</div><div class='del'>-    { 307200, B307200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B460800</div><div class='del'>-    { 460800, B460800 },</div><div class='del'>-#endif</div><div class='del'>-    { 0, 0 }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Translate from bits/second to a speed_t.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-translate_speed(bps)</div><div class='del'>-    int bps;</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (bps == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    for (speedp = speeds; speedp-&gt;speed_int; speedp++)</div><div class='del'>-	if (bps == speedp-&gt;speed_int)</div><div class='del'>-	    return speedp-&gt;speed_val;</div><div class='del'>-    warn("speed %d not supported", bps);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Translate from a speed_t to bits/second.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-baud_rate_of(speed)</div><div class='del'>-    int speed;</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (speed == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    for (speedp = speeds; speedp-&gt;speed_int; speedp++)</div><div class='del'>-	if (speed == speedp-&gt;speed_val)</div><div class='del'>-	    return speedp-&gt;speed_int;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,</div><div class='del'>- * at the requested speed, etc.  If `local' is true, set CLOCAL</div><div class='del'>- * regardless of whether the modem option was specified.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-set_up_tty(fd, local)</div><div class='del'>-    int fd, local;</div><div class='del'>-{</div><div class='del'>-    int speed;</div><div class='del'>-    struct termios tios;</div><div class='del'>-#if !defined (CRTSCTS)</div><div class='del'>-    struct termiox tiox;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (!sync_serial &amp;&amp; tcgetattr(fd, &amp;tios) &lt; 0)</div><div class='del'>-	fatal("tcgetattr: %m");</div><div class='del'>-</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-    termiox_ok = 1;</div><div class='del'>-    if (!sync_serial &amp;&amp; ioctl (fd, TCGETX, &amp;tiox) &lt; 0) {</div><div class='del'>-	termiox_ok = 0;</div><div class='del'>-	if (errno != ENOTTY)</div><div class='del'>-	    error("TCGETX: %m");</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    if (!restore_term) {</div><div class='del'>-	inittermios = tios;</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-	inittermiox = tiox;</div><div class='del'>-#endif</div><div class='del'>-	if (!sync_serial)</div><div class='del'>-	    ioctl(fd, TIOCGWINSZ, &amp;wsinfo);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    tios.c_cflag &amp;= ~(CSIZE | CSTOPB | PARENB | CLOCAL);</div><div class='del'>-#ifdef CRTSCTS</div><div class='del'>-    if (crtscts &gt; 0)</div><div class='del'>-	tios.c_cflag |= CRTSCTS;</div><div class='del'>-    else if (crtscts &lt; 0)</div><div class='del'>-	tios.c_cflag &amp;= ~CRTSCTS;</div><div class='del'>-#else</div><div class='del'>-    if (crtscts != 0 &amp;&amp; !termiox_ok) {</div><div class='del'>-	error("Can't set RTS/CTS flow control");</div><div class='del'>-    } else if (crtscts &gt; 0) {</div><div class='del'>-	tiox.x_hflag |= RTSXOFF|CTSXON;</div><div class='del'>-    } else if (crtscts &lt; 0) {</div><div class='del'>-	tiox.x_hflag &amp;= ~(RTSXOFF|CTSXON);</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    tios.c_cflag |= CS8 | CREAD | HUPCL;</div><div class='del'>-    if (local || !modem)</div><div class='del'>-	tios.c_cflag |= CLOCAL;</div><div class='del'>-    tios.c_iflag = IGNBRK | IGNPAR;</div><div class='del'>-    tios.c_oflag = 0;</div><div class='del'>-    tios.c_lflag = 0;</div><div class='del'>-    tios.c_cc[VMIN] = 1;</div><div class='del'>-    tios.c_cc[VTIME] = 0;</div><div class='del'>-</div><div class='del'>-    if (crtscts == -2) {</div><div class='del'>-	tios.c_iflag |= IXON | IXOFF;</div><div class='del'>-	tios.c_cc[VSTOP] = 0x13;	/* DC3 = XOFF = ^S */</div><div class='del'>-	tios.c_cc[VSTART] = 0x11;	/* DC1 = XON  = ^Q */</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    speed = translate_speed(inspeed);</div><div class='del'>-    if (speed) {</div><div class='del'>-	cfsetospeed(&amp;tios, speed);</div><div class='del'>-	cfsetispeed(&amp;tios, speed);</div><div class='del'>-    } else {</div><div class='del'>-	speed = cfgetospeed(&amp;tios);</div><div class='del'>-	/*</div><div class='del'>-	 * We can't proceed if the serial port speed is 0,</div><div class='del'>-	 * since that implies that the serial port is disabled.</div><div class='del'>-	 */</div><div class='del'>-	if ((speed == B0) &amp;&amp; !sync_serial)</div><div class='del'>-	    fatal("Baud rate for %s is 0; need explicit baud rate", devnam);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (!sync_serial &amp;&amp; tcsetattr(fd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	fatal("tcsetattr: %m");</div><div class='del'>-</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-    if (!sync_serial &amp;&amp; termiox_ok &amp;&amp; ioctl (fd, TCSETXF, &amp;tiox) &lt; 0){</div><div class='del'>-	error("TCSETXF: %m");</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    baud_rate = inspeed = baud_rate_of(speed);</div><div class='del'>-    if (!sync_serial)</div><div class='del'>-	restore_term = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * restore_tty - restore the terminal to the saved settings.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-restore_tty(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    if (restore_term) {</div><div class='del'>-	if (!default_device) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Turn off echoing, because otherwise we can get into</div><div class='del'>-	     * a loop with the tty and the modem echoing to each other.</div><div class='del'>-	     * We presume we are the sole user of this tty device, so</div><div class='del'>-	     * when we close it, it will revert to its defaults anyway.</div><div class='del'>-	     */</div><div class='del'>-	    inittermios.c_lflag &amp;= ~(ECHO | ECHONL);</div><div class='del'>-	}</div><div class='del'>-	if (!sync_serial &amp;&amp; tcsetattr(fd, TCSAFLUSH, &amp;inittermios) &lt; 0)</div><div class='del'>-	    if (!hungup &amp;&amp; errno != ENXIO)</div><div class='del'>-		warn("tcsetattr: %m");</div><div class='del'>-#ifndef CRTSCTS</div><div class='del'>-	if (!sync_serial &amp;&amp; ioctl (fd, TCSETXF, &amp;inittermiox) &lt; 0){</div><div class='del'>-	    if (!hungup &amp;&amp; errno != ENXIO)</div><div class='del'>-		error("TCSETXF: %m");</div><div class='del'>-	}</div><div class='del'>-#endif</div><div class='del'>-	if (!sync_serial)</div><div class='del'>-	    ioctl(fd, TIOCSWINSZ, &amp;wsinfo);</div><div class='del'>-	restore_term = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setdtr - control the DTR line on the serial port.</div><div class='del'>- * This is called from die(), so it shouldn't call die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-setdtr(fd, on)</div><div class='del'>-int fd, on;</div><div class='del'>-{</div><div class='del'>-    int modembits = TIOCM_DTR;</div><div class='del'>-</div><div class='del'>-    ioctl(fd, (on? TIOCMBIS: TIOCMBIC), &amp;modembits);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * open_loopback - open the device we use for getting packets</div><div class='del'>- * in demand mode.  Under Solaris 2, we use our existing fd</div><div class='del'>- * to the ppp driver.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-open_ppp_loopback()</div><div class='del'>-{</div><div class='del'>-    return pppfd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * output - Output PPP packet.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-output(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    struct strbuf data;</div><div class='del'>-    int retries;</div><div class='del'>-    struct pollfd pfd;</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	dbglog("sent %P", p, len);</div><div class='del'>-</div><div class='del'>-    data.len = len;</div><div class='del'>-    data.buf = (caddr_t) p;</div><div class='del'>-    retries = 4;</div><div class='del'>-    while (putmsg(pppfd, NULL, &amp;data, 0) &lt; 0) {</div><div class='del'>-	if (--retries &lt; 0 || (errno != EWOULDBLOCK &amp;&amp; errno != EAGAIN)) {</div><div class='del'>-	    if (errno != ENXIO)</div><div class='del'>-		error("Couldn't send packet: %m");</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	pfd.fd = pppfd;</div><div class='del'>-	pfd.events = POLLOUT;</div><div class='del'>-	poll(&amp;pfd, 1, 250);	/* wait for up to 0.25 seconds */</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * wait_input - wait until there is data available,</div><div class='del'>- * for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_input(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    int t;</div><div class='del'>-</div><div class='del'>-    t = timo == NULL? -1: timo-&gt;tv_sec * 1000 + timo-&gt;tv_usec / 1000;</div><div class='del'>-    if (poll(pollfds, n_pollfds, t) &lt; 0 &amp;&amp; errno != EINTR)</div><div class='del'>-	fatal("poll: %m");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_fd - add an fd to the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void add_fd(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt; n_pollfds; ++n)</div><div class='del'>-	if (pollfds[n].fd == fd)</div><div class='del'>-	    return;</div><div class='del'>-    if (n_pollfds &lt; MAX_POLLFDS) {</div><div class='del'>-	pollfds[n_pollfds].fd = fd;</div><div class='del'>-	pollfds[n_pollfds].events = POLLIN | POLLPRI | POLLHUP;</div><div class='del'>-	++n_pollfds;</div><div class='del'>-    } else</div><div class='del'>-	error("Too many inputs!");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * remove_fd - remove an fd from the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void remove_fd(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt; n_pollfds; ++n) {</div><div class='del'>-	if (pollfds[n].fd == fd) {</div><div class='del'>-	    while (++n &lt; n_pollfds)</div><div class='del'>-		pollfds[n-1] = pollfds[n];</div><div class='del'>-	    --n_pollfds;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * wait_loop_output - wait until there is data available on the</div><div class='del'>- * loopback, for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_loop_output(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    wait_input(timo);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * wait_time - wait for a given length of time or until a</div><div class='del'>- * signal is received.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_time(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    n = select(0, NULL, NULL, NULL, timo);</div><div class='del'>-    if (n &lt; 0 &amp;&amp; errno != EINTR)</div><div class='del'>-	fatal("select: %m");</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * read_packet - get a PPP packet from the serial device.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-read_packet(buf)</div><div class='del'>-    u_char *buf;</div><div class='del'>-{</div><div class='del'>-    struct strbuf ctrl, data;</div><div class='del'>-    int flags, len;</div><div class='del'>-    unsigned char ctrlbuf[sizeof(union DL_primitives) + 64];</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-	data.maxlen = PPP_MRU + PPP_HDRLEN;</div><div class='del'>-	data.buf = (caddr_t) buf;</div><div class='del'>-	ctrl.maxlen = sizeof(ctrlbuf);</div><div class='del'>-	ctrl.buf = (caddr_t) ctrlbuf;</div><div class='del'>-	flags = 0;</div><div class='del'>-	len = getmsg(pppfd, &amp;ctrl, &amp;data, &amp;flags);</div><div class='del'>-	if (len &lt; 0) {</div><div class='del'>-	    if (errno == EAGAIN || errno == EINTR)</div><div class='del'>-		return -1;</div><div class='del'>-	    fatal("Error reading packet: %m");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ctrl.len &lt;= 0)</div><div class='del'>-	    return data.len;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Got a M_PROTO or M_PCPROTO message.  Interpret it</div><div class='del'>-	 * as a DLPI primitive??</div><div class='del'>-	 */</div><div class='del'>-	if (debug)</div><div class='del'>-	    dbglog("got dlpi prim 0x%x, len=%d",</div><div class='del'>-		   ((union DL_primitives *)ctrlbuf)-&gt;dl_primitive, ctrl.len);</div><div class='del'>-</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_loop_output - get outgoing packets from the ppp device,</div><div class='del'>- * and detect when we want to bring the real link up.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_loop_output()</div><div class='del'>-{</div><div class='del'>-    int len;</div><div class='del'>-    int rv = 0;</div><div class='del'>-</div><div class='del'>-    while ((len = read_packet(inpacket_buf)) &gt; 0) {</div><div class='del'>-	if (loop_frame(inpacket_buf, len))</div><div class='del'>-	    rv = 1;</div><div class='del'>-    }</div><div class='del'>-    return rv;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * netif_set_mtu - set the MTU on the PPP network interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-netif_set_mtu(unit, mtu)</div><div class='del'>-    int unit, mtu;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2)</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-    int	fd;</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    ifr.ifr_metric = link_mtu;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFMTU, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP MTU (%s): %m", ifr.ifr_name);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-#if defined(INET6) &amp;&amp; defined(SOL2) </div><div class='del'>-    fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0)</div><div class='del'>-	error("Couldn't open IPv6 socket: %m");</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    lifr.lifr_mtu = link_mtu;</div><div class='del'>-    if (ioctl(fd, SIOCSLIFMTU, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	error("Couldn't set IPv6 MTU (%s): %m", ifr.ifr_name);</div><div class='del'>-    }</div><div class='del'>-    close(fd);</div><div class='del'>-#endif /* defined(INET6) &amp;&amp; defined(SOL2) */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * tty_send_config - configure the transmit characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-tty_send_config(mtu, asyncmap, pcomp, accomp)</div><div class='del'>-    int mtu;</div><div class='del'>-    u_int32_t asyncmap;</div><div class='del'>-    int pcomp, accomp;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    link_mtu = mtu;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_MTU, &amp;mtu, sizeof(mtu), 0) &lt; 0) {</div><div class='del'>-	if (hungup &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return;</div><div class='del'>-	error("Couldn't set MTU: %m");</div><div class='del'>-    }</div><div class='del'>-    if (fdmuxid &gt;= 0) {</div><div class='del'>-	if (!sync_serial) {</div><div class='del'>-	    if (strioctl(pppfd, PPPIO_XACCM, &amp;asyncmap, sizeof(asyncmap), 0) &lt; 0) {</div><div class='del'>-		error("Couldn't set transmit ACCM: %m");</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	cf[0] = (pcomp? COMP_PROT: 0) + (accomp? COMP_AC: 0);</div><div class='del'>-	cf[1] = COMP_PROT | COMP_AC;</div><div class='del'>-	if (any_compressions() &amp;&amp;</div><div class='del'>-	    strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	    error("Couldn't set prot/AC compression: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_set_xaccm - set the extended transmit ACCM for the interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-tty_set_xaccm(accm)</div><div class='del'>-    ext_accm accm;</div><div class='del'>-{</div><div class='del'>-    if (sync_serial)</div><div class='del'>-	return;</div><div class='del'>-</div><div class='del'>-    if (fdmuxid &gt;= 0</div><div class='del'>-	&amp;&amp; strioctl(pppfd, PPPIO_XACCM, accm, sizeof(ext_accm), 0) &lt; 0) {</div><div class='del'>-	if (!hungup || errno != ENXIO)</div><div class='del'>-	    warn("Couldn't set extended ACCM: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_recv_config - configure the receive-side characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-tty_recv_config(mru, asyncmap, pcomp, accomp)</div><div class='del'>-    int mru;</div><div class='del'>-    u_int32_t asyncmap;</div><div class='del'>-    int pcomp, accomp;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    link_mru = mru;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_MRU, &amp;mru, sizeof(mru), 0) &lt; 0) {</div><div class='del'>-	if (hungup &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return;</div><div class='del'>-	error("Couldn't set MRU: %m");</div><div class='del'>-    }</div><div class='del'>-    if (fdmuxid &gt;= 0) {</div><div class='del'>-	if (!sync_serial) {</div><div class='del'>-	    if (strioctl(pppfd, PPPIO_RACCM, &amp;asyncmap, sizeof(asyncmap), 0) &lt; 0) {</div><div class='del'>-		error("Couldn't set receive ACCM: %m");</div><div class='del'>-	    }</div><div class='del'>-	}</div><div class='del'>-	cf[0] = (pcomp? DECOMP_PROT: 0) + (accomp? DECOMP_AC: 0);</div><div class='del'>-	cf[1] = DECOMP_PROT | DECOMP_AC;</div><div class='del'>-	if (any_compressions() &amp;&amp;</div><div class='del'>-	    strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	    error("Couldn't set prot/AC decompression: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_test - ask kernel whether a given compression method</div><div class='del'>- * is acceptable for use.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ccp_test(unit, opt_ptr, opt_len, for_transmit)</div><div class='del'>-    int unit, opt_len, for_transmit;</div><div class='del'>-    u_char *opt_ptr;</div><div class='del'>-{</div><div class='del'>-    if (strioctl(pppfd, (for_transmit? PPPIO_XCOMP: PPPIO_RCOMP),</div><div class='del'>-		 opt_ptr, opt_len, 0) &gt;= 0)</div><div class='del'>-	return 1;</div><div class='del'>-    return (errno == ENOSR)? 0: -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_flags_set - inform kernel about the current state of CCP.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ccp_flags_set(unit, isopen, isup)</div><div class='del'>-    int unit, isopen, isup;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    cf[0] = (isopen? CCP_ISOPEN: 0) + (isup? CCP_ISUP: 0);</div><div class='del'>-    cf[1] = CCP_ISOPEN | CCP_ISUP | CCP_ERROR | CCP_FATALERROR;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (!hungup || errno != ENXIO)</div><div class='del'>-	    error("Couldn't set kernel CCP state: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_idle_time - return how long the link has been idle.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_idle_time(u, ip)</div><div class='del'>-    int u;</div><div class='del'>-    struct ppp_idle *ip;</div><div class='del'>-{</div><div class='del'>-    return strioctl(pppfd, PPPIO_GIDLE, ip, 0, sizeof(struct ppp_idle)) &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_ppp_stats - return statistics for the link.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_ppp_stats(u, stats)</div><div class='del'>-    int u;</div><div class='del'>-    struct pppd_stats *stats;</div><div class='del'>-{</div><div class='del'>-    struct ppp_stats s;</div><div class='del'>-</div><div class='del'>-    if (!sync_serial &amp;&amp; </div><div class='del'>-	strioctl(pppfd, PPPIO_GETSTAT, &amp;s, 0, sizeof(s)) &lt; 0) {</div><div class='del'>-	error("Couldn't get link statistics: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    stats-&gt;bytes_in = s.p.ppp_ibytes;</div><div class='del'>-    stats-&gt;bytes_out = s.p.ppp_obytes;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * set_filters - transfer the pass and active filters to the kernel.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-set_filters(pass, active)</div><div class='del'>-    struct bpf_program *pass, *active;</div><div class='del'>-{</div><div class='del'>-    int ret = 1;</div><div class='del'>-</div><div class='del'>-    if (pass-&gt;bf_len &gt; 0) {</div><div class='del'>-	if (strioctl(pppfd, PPPIO_PASSFILT, pass,</div><div class='del'>-		     sizeof(struct bpf_program), 0) &lt; 0) {</div><div class='del'>-	    error("Couldn't set pass-filter in kernel: %m");</div><div class='del'>-	    ret = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if (active-&gt;bf_len &gt; 0) {</div><div class='del'>-	if (strioctl(pppfd, PPPIO_ACTIVEFILT, active,</div><div class='del'>-		     sizeof(struct bpf_program), 0) &lt; 0) {</div><div class='del'>-	    error("Couldn't set active-filter in kernel: %m");</div><div class='del'>-	    ret = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_fatal_error - returns 1 if decompression was disabled as a</div><div class='del'>- * result of an error detected after decompression of a packet,</div><div class='del'>- * 0 otherwise.  This is necessary because of patent nonsense.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ccp_fatal_error(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    cf[0] = cf[1] = 0;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (errno != ENXIO &amp;&amp; errno != EINVAL)</div><div class='del'>-	    error("Couldn't get compression flags: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return cf[0] &amp; CCP_FATALERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifvjcomp - config tcp header compression</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifvjcomp(u, vjcomp, xcidcomp, xmaxcid)</div><div class='del'>-    int u, vjcomp, xcidcomp, xmaxcid;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-    char maxcid[2];</div><div class='del'>-</div><div class='del'>-    if (vjcomp) {</div><div class='del'>-	maxcid[0] = xcidcomp;</div><div class='del'>-	maxcid[1] = 15;		/* XXX should be rmaxcid */</div><div class='del'>-	if (strioctl(pppfd, PPPIO_VJINIT, maxcid, sizeof(maxcid), 0) &lt; 0) {</div><div class='del'>-	    error("Couldn't initialize VJ compression: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    cf[0] = (vjcomp? COMP_VJC + DECOMP_VJC: 0)	/* XXX this is wrong */</div><div class='del'>-	+ (xcidcomp? COMP_VJCCID + DECOMP_VJCCID: 0);</div><div class='del'>-    cf[1] = COMP_VJC + DECOMP_VJC + COMP_VJCCID + DECOMP_VJCCID;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (vjcomp)</div><div class='del'>-	    error("Couldn't enable VJ compression: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifup - Config the interface up and enable IP packets to pass.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifup(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface up (get): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_flags |= IFF_UP;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface up (set): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if_is_up = 1;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifdown - Config the interface down and disable IP.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifdown(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    if (ipmuxid &lt; 0)</div><div class='del'>-	return 1;</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface down (get): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_flags &amp;= ~IFF_UP;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface down (set): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if_is_up = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifnpmode - Set the mode for handling packets for a given NP.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifnpmode(u, proto, mode)</div><div class='del'>-    int u;</div><div class='del'>-    int proto;</div><div class='del'>-    enum NPmode mode;</div><div class='del'>-{</div><div class='del'>-    int npi[2];</div><div class='del'>-</div><div class='del'>-    npi[0] = proto;</div><div class='del'>-    npi[1] = (int) mode;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_NPMODE, &amp;npi, 2 * sizeof(int), 0) &lt; 0) {</div><div class='del'>-	error("ioctl(set NP %d mode to %d): %m", proto, mode);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if defined(SOL2) &amp;&amp; defined(INET6)</div><div class='del'>-/*</div><div class='del'>- * sif6up - Config the IPv6 interface up and enable IPv6 packets to pass.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sif6up(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-    int fd;</div><div class='del'>-</div><div class='del'>-    fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0) {</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    if (ioctl(fd, SIOCGLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    lifr.lifr_flags |= IFF_UP;</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    if (ioctl(fd, SIOCSLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if6_is_up = 1;</div><div class='del'>-    close(fd);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifdown - Config the IPv6 interface down and disable IPv6.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sif6down(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-    int fd;</div><div class='del'>-</div><div class='del'>-    fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    if (ioctl(fd, SIOCGLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    lifr.lifr_flags &amp;= ~IFF_UP;</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    if (ioctl(fd, SIOCGLIFFLAGS, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if6_is_up = 0;</div><div class='del'>-    close(fd);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sif6addr - Config the interface with an IPv6 link-local address</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sif6addr(u, o, h)</div><div class='del'>-    int u;</div><div class='del'>-    eui64_t o, h;</div><div class='del'>-{</div><div class='del'>-    struct lifreq lifr;</div><div class='del'>-    struct sockaddr_storage laddr;</div><div class='del'>-    struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&amp;laddr;</div><div class='del'>-    int fd;</div><div class='del'>-</div><div class='del'>-    fd = socket(AF_INET6, SOCK_DGRAM, 0);</div><div class='del'>-    if (fd &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Do this because /dev/ppp responds to DL_PHYS_ADDR_REQ with</div><div class='del'>-     * zero values, hence the interface token came to be zero too,</div><div class='del'>-     * and without this, in.ndpd will complain</div><div class='del'>-     */</div><div class='del'>-    IN6_LLTOKEN_FROM_EUI64(lifr, sin6, o);</div><div class='del'>-    if (ioctl(fd, SIOCSLIFTOKEN, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Set the interface address and destination address</div><div class='del'>-     */</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(lifr, sin6, o);</div><div class='del'>-    if (ioctl(fd, SIOCSLIFADDR, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    memset(&amp;lifr, 0, sizeof(lifr));</div><div class='del'>-    strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));</div><div class='del'>-    IN6_LLADDR_FROM_EUI64(lifr, sin6, h);</div><div class='del'>-    if (ioctl(fd, SIOCSLIFDSTADDR, &amp;lifr) &lt; 0) {</div><div class='del'>-	close(fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cif6addr - Remove the IPv6 address from interface</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cif6addr(u, o, h)</div><div class='del'>-    int u;</div><div class='del'>-    eui64_t o, h;</div><div class='del'>-{</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#endif /* defined(SOL2) &amp;&amp; defined(INET6) */</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-#define INET_ADDR(x)	(((struct sockaddr_in *) &amp;(x))-&gt;sin_addr.s_addr)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifaddr - Config the interface IP addresses and netmask.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifaddr(u, o, h, m)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t o, h, m;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-    int ret = 1;</div><div class='del'>-</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    ifr.ifr_addr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_addr) = m;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFNETMASK, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP netmask: %m");</div><div class='del'>-	ret = 0;</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_addr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_addr) = o;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFADDR, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set local IP address: %m");</div><div class='del'>-	ret = 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * On some systems, we have to explicitly set the point-to-point</div><div class='del'>-     * flag bit before we can set a destination address.</div><div class='del'>-     */</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifr) &gt;= 0</div><div class='del'>-	&amp;&amp; (ifr.ifr_flags &amp; IFF_POINTOPOINT) == 0) {</div><div class='del'>-	ifr.ifr_flags |= IFF_POINTOPOINT;</div><div class='del'>-	if (ioctl(ipfd, SIOCSIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	    error("Couldn't mark interface pt-to-pt: %m");</div><div class='del'>-	    ret = 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_dstaddr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_dstaddr) = h;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFDSTADDR, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set remote IP address: %m");</div><div class='del'>-	ret = 0;</div><div class='del'>-    }</div><div class='del'>-#if 0	/* now done in ppp_send_config */</div><div class='del'>-    ifr.ifr_metric = link_mtu;</div><div class='del'>-    if (ioctl(ipfd, SIOCSIFMTU, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP MTU: %m");</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    remote_addr = h;</div><div class='del'>-    return ret;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifaddr - Clear the interface IP addresses, and delete routes</div><div class='del'>- * through the interface if possible.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifaddr(u, o, h)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t o, h;</div><div class='del'>-{</div><div class='del'>-#if defined(__USLC__)		/* was: #if 0 */</div><div class='del'>-    cifroute(unit, ouraddr, hisaddr);</div><div class='del'>-    if (ipmuxid &gt;= 0) {</div><div class='del'>-	notice("Removing ppp interface unit");</div><div class='del'>-	if (ioctl(ipfd, I_UNLINK, ipmuxid) &lt; 0) {</div><div class='del'>-	    error("Can't remove ppp interface unit: %m");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-	ipmuxid = -1;</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    remote_addr = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifdefaultroute - assign a default route through the address given.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifdefaultroute(u, l, g)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t l, g;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-#if defined(__USLC__)</div><div class='del'>-    g = l;			/* use the local address as gateway */</div><div class='del'>-#endif</div><div class='del'>-    memset(&amp;rt, 0, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = 0;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = g;</div><div class='del'>-    rt.rt_flags = RTF_GATEWAY;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ipfd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	error("Can't add default route: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = g;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifdefaultroute - delete a default route through the address given.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifdefaultroute(u, l, g)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t l, g;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-#if defined(__USLC__)</div><div class='del'>-    g = l;			/* use the local address as gateway */</div><div class='del'>-#endif</div><div class='del'>-    memset(&amp;rt, 0, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = 0;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = g;</div><div class='del'>-    rt.rt_flags = RTF_GATEWAY;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ipfd, SIOCDELRT, &amp;rt) &lt; 0) {</div><div class='del'>-	error("Can't delete default route: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifproxyarp - Make a proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifproxyarp(unit, hisaddr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t hisaddr;</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    memset(&amp;arpreq, 0, sizeof(arpreq));</div><div class='del'>-    if (!get_ether_addr(hisaddr, &amp;arpreq.arp_ha))</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    arpreq.arp_pa.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(arpreq.arp_pa) = hisaddr;</div><div class='del'>-    arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-    if (ioctl(ipfd, SIOCSARP, (caddr_t) &amp;arpreq) &lt; 0) {</div><div class='del'>-	error("Couldn't set proxy ARP entry: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    proxy_arp_addr = hisaddr;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifproxyarp - Delete the proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifproxyarp(unit, hisaddr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t hisaddr;</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    memset(&amp;arpreq, 0, sizeof(arpreq));</div><div class='del'>-    arpreq.arp_pa.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(arpreq.arp_pa) = hisaddr;</div><div class='del'>-    if (ioctl(ipfd, SIOCDARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	error("Couldn't delete proxy ARP entry: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    proxy_arp_addr = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_ether_addr - get the hardware address of an interface on the</div><div class='del'>- * the same subnet as ipaddr.</div><div class='del'>- */</div><div class='del'>-#define MAX_IFS		32</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-get_ether_addr(ipaddr, hwaddr)</div><div class='del'>-    u_int32_t ipaddr;</div><div class='del'>-    struct sockaddr *hwaddr;</div><div class='del'>-{</div><div class='del'>-    struct ifreq *ifr, *ifend, ifreq;</div><div class='del'>-    int nif;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    u_int32_t ina, mask;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Scan through the system's network interfaces.</div><div class='del'>-     */</div><div class='del'>-#ifdef SIOCGIFNUM</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFNUM, &amp;nif) &lt; 0)</div><div class='del'>-#endif</div><div class='del'>-	nif = MAX_IFS;</div><div class='del'>-    ifc.ifc_len = nif * sizeof(struct ifreq);</div><div class='del'>-    ifc.ifc_buf = (caddr_t) malloc(ifc.ifc_len);</div><div class='del'>-    if (ifc.ifc_buf == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	warn("Couldn't get system interface list: %m");</div><div class='del'>-	free(ifc.ifc_buf);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ++ifr) {</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family != AF_INET)</div><div class='del'>-	    continue;</div><div class='del'>-	/*</div><div class='del'>-	 * Check that the interface is up, and not point-to-point or loopback.</div><div class='del'>-	 */</div><div class='del'>-	strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-	if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	if ((ifreq.ifr_flags &amp;</div><div class='del'>-	     (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT|IFF_LOOPBACK|IFF_NOARP))</div><div class='del'>-	    != (IFF_UP|IFF_BROADCAST))</div><div class='del'>-	    continue;</div><div class='del'>-	/*</div><div class='del'>-	 * Get its netmask and check that it's on the right subnet.</div><div class='del'>-	 */</div><div class='del'>-	if (ioctl(ipfd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	ina = INET_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	mask = INET_ADDR(ifreq.ifr_addr);</div><div class='del'>-	if ((ipaddr &amp; mask) == (ina &amp; mask))</div><div class='del'>-	    break;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ifr &gt;= ifend) {</div><div class='del'>-	warn("No suitable interface found for proxy ARP");</div><div class='del'>-	free(ifc.ifc_buf);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    info("found interface %s for proxy ARP", ifr-&gt;ifr_name);</div><div class='del'>-    if (!get_hw_addr(ifr-&gt;ifr_name, ina, hwaddr)) {</div><div class='del'>-	error("Couldn't get hardware address for %s", ifr-&gt;ifr_name);</div><div class='del'>-	free(ifc.ifc_buf);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    free(ifc.ifc_buf);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_hw_addr_dlpi - obtain the hardware address using DLPI</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-get_hw_addr_dlpi(name, hwaddr)</div><div class='del'>-    char *name;</div><div class='del'>-    struct sockaddr *hwaddr;</div><div class='del'>-{</div><div class='del'>-    char *p, *q;</div><div class='del'>-    int unit, iffd, adrlen;</div><div class='del'>-    unsigned char *adrp;</div><div class='del'>-    char ifdev[24];</div><div class='del'>-    struct {</div><div class='del'>-	union DL_primitives prim;</div><div class='del'>-	char space[64];</div><div class='del'>-    } reply;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We have to open the device and ask it for its hardware address.</div><div class='del'>-     * First split apart the device name and unit.</div><div class='del'>-     */</div><div class='del'>-    slprintf(ifdev, sizeof(ifdev), "/dev/%s", name);</div><div class='del'>-    for (q = ifdev + strlen(ifdev); --q &gt;= ifdev; )</div><div class='del'>-	if (!isdigit(*q))</div><div class='del'>-	    break;</div><div class='del'>-    unit = atoi(q+1);</div><div class='del'>-    q[1] = 0;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Open the device and do a DLPI attach and phys_addr_req.</div><div class='del'>-     */</div><div class='del'>-    iffd = open(ifdev, O_RDWR);</div><div class='del'>-    if (iffd &lt; 0) {</div><div class='del'>-	error("Can't open %s: %m", ifdev);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (dlpi_attach(iffd, unit) &lt; 0</div><div class='del'>-	|| dlpi_get_reply(iffd, &amp;reply.prim, DL_OK_ACK, sizeof(reply)) &lt; 0</div><div class='del'>-	|| dlpi_info_req(iffd) &lt; 0</div><div class='del'>-	|| dlpi_get_reply(iffd, &amp;reply.prim, DL_INFO_ACK, sizeof(reply)) &lt; 0) {</div><div class='del'>-	close(iffd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    adrlen = reply.prim.info_ack.dl_addr_length;</div><div class='del'>-    adrp = (unsigned char *)&amp;reply + reply.prim.info_ack.dl_addr_offset;</div><div class='del'>-</div><div class='del'>-#if DL_CURRENT_VERSION &gt;= 2</div><div class='del'>-    if (reply.prim.info_ack.dl_sap_length &lt; 0)</div><div class='del'>-	adrlen += reply.prim.info_ack.dl_sap_length;</div><div class='del'>-    else</div><div class='del'>-	adrp += reply.prim.info_ack.dl_sap_length;</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-    hwaddr-&gt;sa_family = AF_UNSPEC;</div><div class='del'>-    memcpy(hwaddr-&gt;sa_data, adrp, adrlen);</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-/*</div><div class='del'>- * get_hw_addr - obtain the hardware address for a named interface.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-get_hw_addr(name, ina, hwaddr)</div><div class='del'>-    char *name;</div><div class='del'>-    u_int32_t ina;</div><div class='del'>-    struct sockaddr *hwaddr;</div><div class='del'>-{</div><div class='del'>-    /* New way - get the address by doing an arp request. */</div><div class='del'>-    int s;</div><div class='del'>-    struct arpreq req;</div><div class='del'>-</div><div class='del'>-    s = socket(AF_INET, SOCK_DGRAM, 0);</div><div class='del'>-    if (s &lt; 0)</div><div class='del'>-	return 0;</div><div class='del'>-    memset(&amp;req, 0, sizeof(req));</div><div class='del'>-    req.arp_pa.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(req.arp_pa) = ina;</div><div class='del'>-    if (ioctl(s, SIOCGARP, &amp;req) &lt; 0) {</div><div class='del'>-	error("Couldn't get ARP entry for %s: %m", ip_ntoa(ina));</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    *hwaddr = req.arp_ha;</div><div class='del'>-    hwaddr-&gt;sa_family = AF_UNSPEC;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-dlpi_attach(fd, ppa)</div><div class='del'>-    int fd, ppa;</div><div class='del'>-{</div><div class='del'>-    dl_attach_req_t req;</div><div class='del'>-    struct strbuf buf;</div><div class='del'>-</div><div class='del'>-    req.dl_primitive = DL_ATTACH_REQ;</div><div class='del'>-    req.dl_ppa = ppa;</div><div class='del'>-    buf.len = sizeof(req);</div><div class='del'>-    buf.buf = (void *) &amp;req;</div><div class='del'>-    return putmsg(fd, &amp;buf, NULL, RS_HIPRI);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-dlpi_info_req(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    dl_info_req_t req;</div><div class='del'>-    struct strbuf buf;</div><div class='del'>-</div><div class='del'>-    req.dl_primitive = DL_INFO_REQ;</div><div class='del'>-    buf.len = sizeof(req);</div><div class='del'>-    buf.buf = (void *) &amp;req;</div><div class='del'>-    return putmsg(fd, &amp;buf, NULL, RS_HIPRI);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-dlpi_get_reply(fd, reply, expected_prim, maxlen)</div><div class='del'>-    union DL_primitives *reply;</div><div class='del'>-    int fd, expected_prim, maxlen;</div><div class='del'>-{</div><div class='del'>-    struct strbuf buf;</div><div class='del'>-    int flags, n;</div><div class='del'>-    struct pollfd pfd;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Use poll to wait for a message with a timeout.</div><div class='del'>-     */</div><div class='del'>-    pfd.fd = fd;</div><div class='del'>-    pfd.events = POLLIN | POLLPRI;</div><div class='del'>-    do {</div><div class='del'>-	n = poll(&amp;pfd, 1, 1000);</div><div class='del'>-    } while (n == -1 &amp;&amp; errno == EINTR);</div><div class='del'>-    if (n &lt;= 0)</div><div class='del'>-	return -1;</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Get the reply.</div><div class='del'>-     */</div><div class='del'>-    buf.maxlen = maxlen;</div><div class='del'>-    buf.buf = (void *) reply;</div><div class='del'>-    flags = 0;</div><div class='del'>-    if (getmsg(fd, &amp;buf, NULL, &amp;flags) &lt; 0)</div><div class='del'>-	return -1;</div><div class='del'>-</div><div class='del'>-    if (buf.len &lt; sizeof(ulong)) {</div><div class='del'>-	if (debug)</div><div class='del'>-	    dbglog("dlpi response short (len=%d)\n", buf.len);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (reply-&gt;dl_primitive == expected_prim)</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    if (debug) {</div><div class='del'>-	if (reply-&gt;dl_primitive == DL_ERROR_ACK) {</div><div class='del'>-	    dbglog("dlpi error %d (unix errno %d) for prim %x\n",</div><div class='del'>-		   reply-&gt;error_ack.dl_errno, reply-&gt;error_ack.dl_unix_errno,</div><div class='del'>-		   reply-&gt;error_ack.dl_error_primitive);</div><div class='del'>-	} else {</div><div class='del'>-	    dbglog("dlpi unexpected response prim %x\n",</div><div class='del'>-		   reply-&gt;dl_primitive);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return user specified netmask, modified by any mask we might determine</div><div class='del'>- * for address `addr' (in network byte order).</div><div class='del'>- * Here we scan through the system's list of interfaces, looking for</div><div class='del'>- * any non-point-to-point interfaces which might appear to be on the same</div><div class='del'>- * network as `addr'.  If we find any, we OR in their netmask to the</div><div class='del'>- * user-specified netmask.</div><div class='del'>- */</div><div class='del'>-u_int32_t</div><div class='del'>-GetMask(addr)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask, nmask, ina;</div><div class='del'>-    struct ifreq *ifr, *ifend, ifreq;</div><div class='del'>-    int nif;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-</div><div class='del'>-    addr = ntohl(addr);</div><div class='del'>-    if (IN_CLASSA(addr))	/* determine network mask for address class */</div><div class='del'>-	nmask = IN_CLASSA_NET;</div><div class='del'>-    else if (IN_CLASSB(addr))</div><div class='del'>-	nmask = IN_CLASSB_NET;</div><div class='del'>-    else</div><div class='del'>-	nmask = IN_CLASSC_NET;</div><div class='del'>-    /* class D nets are disallowed by bad_ip_adrs */</div><div class='del'>-    mask = netmask | htonl(nmask);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Scan through the system's network interfaces.</div><div class='del'>-     */</div><div class='del'>-#ifdef SIOCGIFNUM</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFNUM, &amp;nif) &lt; 0)</div><div class='del'>-#endif</div><div class='del'>-	nif = MAX_IFS;</div><div class='del'>-    ifc.ifc_len = nif * sizeof(struct ifreq);</div><div class='del'>-    ifc.ifc_buf = (caddr_t) malloc(ifc.ifc_len);</div><div class='del'>-    if (ifc.ifc_buf == 0)</div><div class='del'>-	return mask;</div><div class='del'>-    if (ioctl(ipfd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	warn("Couldn't get system interface list: %m");</div><div class='del'>-	free(ifc.ifc_buf);</div><div class='del'>-	return mask;</div><div class='del'>-    }</div><div class='del'>-    ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ++ifr) {</div><div class='del'>-	/*</div><div class='del'>-	 * Check the interface's internet address.</div><div class='del'>-	 */</div><div class='del'>-	if (ifr-&gt;ifr_addr.sa_family != AF_INET)</div><div class='del'>-	    continue;</div><div class='del'>-	ina = INET_ADDR(ifr-&gt;ifr_addr);</div><div class='del'>-	if ((ntohl(ina) &amp; nmask) != (addr &amp; nmask))</div><div class='del'>-	    continue;</div><div class='del'>-	/*</div><div class='del'>-	 * Check that the interface is up, and not point-to-point or loopback.</div><div class='del'>-	 */</div><div class='del'>-	strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-	if (ioctl(ipfd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	if ((ifreq.ifr_flags &amp; (IFF_UP|IFF_POINTOPOINT|IFF_LOOPBACK))</div><div class='del'>-	    != IFF_UP)</div><div class='del'>-	    continue;</div><div class='del'>-	/*</div><div class='del'>-	 * Get its netmask and OR it into our mask.</div><div class='del'>-	 */</div><div class='del'>-	if (ioctl(ipfd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-	    continue;</div><div class='del'>-	mask |= INET_ADDR(ifreq.ifr_addr);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    free(ifc.ifc_buf);</div><div class='del'>-    return mask;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * logwtmp - write an accounting record to the /var/adm/wtmp file.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-logwtmp(line, name, host)</div><div class='del'>-    const char *line, *name, *host;</div><div class='del'>-{</div><div class='del'>-    static struct utmpx utmpx;</div><div class='del'>-</div><div class='del'>-    if (name[0] != 0) {</div><div class='del'>-	/* logging in */</div><div class='del'>-	strncpy(utmpx.ut_user, name, sizeof(utmpx.ut_user));</div><div class='del'>-	strncpy(utmpx.ut_id, ifname, sizeof(utmpx.ut_id));</div><div class='del'>-	strncpy(utmpx.ut_line, line, sizeof(utmpx.ut_line));</div><div class='del'>-	utmpx.ut_pid = getpid();</div><div class='del'>-	utmpx.ut_type = USER_PROCESS;</div><div class='del'>-    } else {</div><div class='del'>-	utmpx.ut_type = DEAD_PROCESS;</div><div class='del'>-    }</div><div class='del'>-    gettimeofday(&amp;utmpx.ut_tv, NULL);</div><div class='del'>-    updwtmpx("/var/adm/wtmpx", &amp;utmpx);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_host_seed - return the serial number of this machine.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_host_seed()</div><div class='del'>-{</div><div class='del'>-    char buf[32];</div><div class='del'>-</div><div class='del'>-    if (sysinfo(SI_HW_SERIAL, buf, sizeof(buf)) &lt; 0) {</div><div class='del'>-	error("sysinfo: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return (int) strtoul(buf, NULL, 16);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-strioctl(fd, cmd, ptr, ilen, olen)</div><div class='del'>-    int fd, cmd, ilen, olen;</div><div class='del'>-    void *ptr;</div><div class='del'>-{</div><div class='del'>-    struct strioctl str;</div><div class='del'>-</div><div class='del'>-    str.ic_cmd = cmd;</div><div class='del'>-    str.ic_timout = 0;</div><div class='del'>-    str.ic_len = ilen;</div><div class='del'>-    str.ic_dp = ptr;</div><div class='del'>-    if (ioctl(fd, I_STR, &amp;str) == -1)</div><div class='del'>-	return -1;</div><div class='del'>-    if (str.ic_len != olen)</div><div class='del'>-	dbglog("strioctl: expected %d bytes, got %d for cmd %x\n",</div><div class='del'>-	       olen, str.ic_len, cmd);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * lock - create a lock file for the named lock device</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define LOCK_PREFIX	"/var/spool/locks/LK."</div><div class='del'>-static char lock_file[40];	/* name of lock file created */</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-lock(dev)</div><div class='del'>-    char *dev;</div><div class='del'>-{</div><div class='del'>-    int n, fd, pid;</div><div class='del'>-    struct stat sbuf;</div><div class='del'>-    char ascii_pid[12];</div><div class='del'>-</div><div class='del'>-    if (stat(dev, &amp;sbuf) &lt; 0) {</div><div class='del'>-	error("Can't get device number for %s: %m", dev);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    if ((sbuf.st_mode &amp; S_IFMT) != S_IFCHR) {</div><div class='del'>-	error("Can't lock %s: not a character device", dev);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-    slprintf(lock_file, sizeof(lock_file), "%s%03d.%03d.%03d",</div><div class='del'>-	     LOCK_PREFIX, major(sbuf.st_dev),</div><div class='del'>-	     major(sbuf.st_rdev), minor(sbuf.st_rdev));</div><div class='del'>-</div><div class='del'>-    while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) &lt; 0) {</div><div class='del'>-	if (errno == EEXIST</div><div class='del'>-	    &amp;&amp; (fd = open(lock_file, O_RDONLY, 0)) &gt;= 0) {</div><div class='del'>-	    /* Read the lock file to find out who has the device locked */</div><div class='del'>-	    n = read(fd, ascii_pid, 11);</div><div class='del'>-	    if (n &lt;= 0) {</div><div class='del'>-		error("Can't read pid from lock file %s", lock_file);</div><div class='del'>-		close(fd);</div><div class='del'>-	    } else {</div><div class='del'>-		ascii_pid[n] = 0;</div><div class='del'>-		pid = atoi(ascii_pid);</div><div class='del'>-		if (pid &gt; 0 &amp;&amp; kill(pid, 0) == -1 &amp;&amp; errno == ESRCH) {</div><div class='del'>-		    /* pid no longer exists - remove the lock file */</div><div class='del'>-		    if (unlink(lock_file) == 0) {</div><div class='del'>-			close(fd);</div><div class='del'>-			notice("Removed stale lock on %s (pid %d)",</div><div class='del'>-			       dev, pid);</div><div class='del'>-			continue;</div><div class='del'>-		    } else</div><div class='del'>-			warn("Couldn't remove stale lock on %s",</div><div class='del'>-			       dev);</div><div class='del'>-		} else</div><div class='del'>-		    notice("Device %s is locked by pid %d",</div><div class='del'>-			   dev, pid);</div><div class='del'>-	    }</div><div class='del'>-	    close(fd);</div><div class='del'>-	} else</div><div class='del'>-	    error("Can't create lock file %s: %m", lock_file);</div><div class='del'>-	lock_file[0] = 0;</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    slprintf(ascii_pid, sizeof(ascii_pid), "%10d\n", getpid());</div><div class='del'>-    write(fd, ascii_pid, 11);</div><div class='del'>-</div><div class='del'>-    close(fd);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * unlock - remove our lockfile</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-unlock()</div><div class='del'>-{</div><div class='del'>-    if (lock_file[0]) {</div><div class='del'>-	unlink(lock_file);</div><div class='del'>-	lock_file[0] = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifroute - delete a route through the addresses given.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifroute(u, our, his)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t our, his;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    memset(&amp;rt, 0, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = his;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = our;</div><div class='del'>-    rt.rt_flags = RTF_HOST;</div><div class='del'>-</div><div class='del'>-    if (ioctl(ipfd, SIOCDELRT, &amp;rt) &lt; 0) {</div><div class='del'>-	error("Can't delete route: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_route_to - determine if the system has a route to the specified</div><div class='del'>- * IP address.  Returns 0 if not, 1 if so, -1 if we can't tell.</div><div class='del'>- * `addr' is in network byte order.</div><div class='del'>- * For demand mode to work properly, we have to ignore routes</div><div class='del'>- * through our own interface.</div><div class='del'>- */</div><div class='del'>-#ifndef T_CURRENT		/* needed for Solaris 2.5 */</div><div class='del'>-#define T_CURRENT	MI_T_CURRENT</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-int</div><div class='del'>-have_route_to(addr)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-#ifdef SOL2</div><div class='del'>-    int fd, r, flags, i;</div><div class='del'>-    struct {</div><div class='del'>-	struct T_optmgmt_req req;</div><div class='del'>-	struct opthdr hdr;</div><div class='del'>-    } req;</div><div class='del'>-    union {</div><div class='del'>-	struct T_optmgmt_ack ack;</div><div class='del'>-	unsigned char space[64];</div><div class='del'>-    } ack;</div><div class='del'>-    struct opthdr *rh;</div><div class='del'>-    struct strbuf cbuf, dbuf;</div><div class='del'>-    int nroutes;</div><div class='del'>-    mib2_ipRouteEntry_t routes[8];</div><div class='del'>-    mib2_ipRouteEntry_t *rp;</div><div class='del'>-</div><div class='del'>-    fd = open(mux_dev_name, O_RDWR);</div><div class='del'>-    if (fd &lt; 0) {</div><div class='del'>-	warn("have_route_to: couldn't open %s: %m", mux_dev_name);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    req.req.PRIM_type = T_OPTMGMT_REQ;</div><div class='del'>-    req.req.OPT_offset = (char *) &amp;req.hdr - (char *) &amp;req;</div><div class='del'>-    req.req.OPT_length = sizeof(req.hdr);</div><div class='del'>-    req.req.MGMT_flags = T_CURRENT;</div><div class='del'>-</div><div class='del'>-    req.hdr.level = MIB2_IP;</div><div class='del'>-    req.hdr.name = 0;</div><div class='del'>-    req.hdr.len = 0;</div><div class='del'>-</div><div class='del'>-    cbuf.buf = (char *) &amp;req;</div><div class='del'>-    cbuf.len = sizeof(req);</div><div class='del'>-</div><div class='del'>-    if (putmsg(fd, &amp;cbuf, NULL, 0) == -1) {</div><div class='del'>-	warn("have_route_to: putmsg: %m");</div><div class='del'>-	close(fd);</div><div class='del'>-	return -1;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-	cbuf.buf = (char *) &amp;ack;</div><div class='del'>-	cbuf.maxlen = sizeof(ack);</div><div class='del'>-	dbuf.buf = (char *) routes;</div><div class='del'>-	dbuf.maxlen = sizeof(routes);</div><div class='del'>-	flags = 0;</div><div class='del'>-	r = getmsg(fd, &amp;cbuf, &amp;dbuf, &amp;flags);</div><div class='del'>-	if (r == -1) {</div><div class='del'>-	    warn("have_route_to: getmsg: %m");</div><div class='del'>-	    close(fd);</div><div class='del'>-	    return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (cbuf.len &lt; sizeof(struct T_optmgmt_ack)</div><div class='del'>-	    || ack.ack.PRIM_type != T_OPTMGMT_ACK</div><div class='del'>-	    || ack.ack.MGMT_flags != T_SUCCESS</div><div class='del'>-	    || ack.ack.OPT_length &lt; sizeof(struct opthdr)) {</div><div class='del'>-	    dbglog("have_route_to: bad message len=%d prim=%d",</div><div class='del'>-		   cbuf.len, ack.ack.PRIM_type);</div><div class='del'>-	    close(fd);</div><div class='del'>-	    return -1;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	rh = (struct opthdr *) ((char *)&amp;ack + ack.ack.OPT_offset);</div><div class='del'>-	if (rh-&gt;level == 0 &amp;&amp; rh-&gt;name == 0)</div><div class='del'>-	    break;</div><div class='del'>-	if (rh-&gt;level != MIB2_IP || rh-&gt;name != MIB2_IP_21) {</div><div class='del'>-	    while (r == MOREDATA)</div><div class='del'>-		r = getmsg(fd, NULL, &amp;dbuf, &amp;flags);</div><div class='del'>-	    continue;</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	for (;;) {</div><div class='del'>-	    nroutes = dbuf.len / sizeof(mib2_ipRouteEntry_t);</div><div class='del'>-	    for (rp = routes, i = 0; i &lt; nroutes; ++i, ++rp) {</div><div class='del'>-		if (rp-&gt;ipRouteMask != ~0) {</div><div class='del'>-		    dbglog("have_route_to: dest=%x gw=%x mask=%x\n",</div><div class='del'>-			   rp-&gt;ipRouteDest, rp-&gt;ipRouteNextHop,</div><div class='del'>-			   rp-&gt;ipRouteMask);</div><div class='del'>-		    if (((addr ^ rp-&gt;ipRouteDest) &amp; rp-&gt;ipRouteMask) == 0</div><div class='del'>-			&amp;&amp; rp-&gt;ipRouteNextHop != remote_addr)</div><div class='del'>-			return 1;</div><div class='del'>-		}</div><div class='del'>-	    }</div><div class='del'>-	    if (r == 0)</div><div class='del'>-		break;</div><div class='del'>-	    r = getmsg(fd, NULL, &amp;dbuf, &amp;flags);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    close(fd);</div><div class='del'>-    return 0;</div><div class='del'>-#else</div><div class='del'>-    return -1;</div><div class='del'>-#endif /* SOL2 */</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_pty - get a pty master/slave pair and chown the slave side to</div><div class='del'>- * the uid given.  Assumes slave_name points to MAXPATHLEN bytes of space.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_pty(master_fdp, slave_fdp, slave_name, uid)</div><div class='del'>-    int *master_fdp;</div><div class='del'>-    int *slave_fdp;</div><div class='del'>-    char *slave_name;</div><div class='del'>-    int uid;</div><div class='del'>-{</div><div class='del'>-    int mfd, sfd;</div><div class='del'>-    char *pty_name;</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-    mfd = open("/dev/ptmx", O_RDWR);</div><div class='del'>-    if (mfd &lt; 0) {</div><div class='del'>-	error("Couldn't open pty master: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    pty_name = ptsname(mfd);</div><div class='del'>-    if (pty_name == NULL) {</div><div class='del'>-	error("Couldn't get name of pty slave");</div><div class='del'>-	close(mfd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (chown(pty_name, uid, -1) &lt; 0)</div><div class='del'>-	warn("Couldn't change owner of pty slave: %m");</div><div class='del'>-    if (chmod(pty_name, S_IRUSR | S_IWUSR) &lt; 0)</div><div class='del'>-	warn("Couldn't change permissions on pty slave: %m");</div><div class='del'>-    if (unlockpt(mfd) &lt; 0)</div><div class='del'>-	warn("Couldn't unlock pty slave: %m");</div><div class='del'>-</div><div class='del'>-    sfd = open(pty_name, O_RDWR);</div><div class='del'>-    if (sfd &lt; 0) {</div><div class='del'>-	error("Couldn't open pty slave %s: %m", pty_name);</div><div class='del'>-	close(mfd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if (ioctl(sfd, I_PUSH, "ptem") &lt; 0)</div><div class='del'>-	warn("Couldn't push ptem module on pty slave: %m");</div><div class='del'>-</div><div class='del'>-    dbglog("Using %s", pty_name);</div><div class='del'>-    strlcpy(slave_name, pty_name, MAXPATHLEN);</div><div class='del'>-    *master_fdp = mfd;</div><div class='del'>-    *slave_fdp = sfd;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='head'>diff --git a/mdk-stage1/ppp/pppd/sys-sunos4.c b/mdk-stage1/ppp/pppd/sys-sunos4.c<br/>deleted file mode 100644<br/>index 3344948e9..000000000<br/>--- a/<a href='/software/drakx/tree/mdk-stage1/ppp/pppd/sys-sunos4.c?h=V1_1_9_54mdk&amp;id=327bd24f8e4291bd1882de1990dd7339f781a9cb'>mdk-stage1/ppp/pppd/sys-sunos4.c</a><br/>+++ /dev/null</div><div class='hunk'>@@ -1,1559 +0,0 @@</div><div class='del'>-/*</div><div class='del'>- * System-dependent procedures for pppd under SunOS 4.</div><div class='del'>- *</div><div class='del'>- * Copyright (c) 1994 The Australian National University.</div><div class='del'>- * All rights reserved.</div><div class='del'>- *</div><div class='del'>- * Permission to use, copy, modify, and distribute this software and its</div><div class='del'>- * documentation is hereby granted, provided that the above copyright</div><div class='del'>- * notice appears in all copies.  This software is provided without any</div><div class='del'>- * warranty, express or implied. The Australian National University</div><div class='del'>- * makes no representations about the suitability of this software for</div><div class='del'>- * any purpose.</div><div class='del'>- *</div><div class='del'>- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY</div><div class='del'>- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES</div><div class='del'>- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY</div><div class='del'>- * OF SUCH DAMAGE.</div><div class='del'>- *</div><div class='del'>- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,</div><div class='del'>- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</div><div class='del'>- * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS</div><div class='del'>- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO</div><div class='del'>- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,</div><div class='del'>- * OR MODIFICATIONS.</div><div class='del'>- */</div><div class='del'>-</div><div class='del'>-#define RCSID	"$Id$"</div><div class='del'>-</div><div class='del'>-#include &lt;stdio.h&gt;</div><div class='del'>-#include &lt;stddef.h&gt;</div><div class='del'>-#include &lt;stdlib.h&gt;</div><div class='del'>-#include &lt;string.h&gt;</div><div class='del'>-#include &lt;ctype.h&gt;</div><div class='del'>-#include &lt;errno.h&gt;</div><div class='del'>-#include &lt;fcntl.h&gt;</div><div class='del'>-#include &lt;unistd.h&gt;</div><div class='del'>-#include &lt;termios.h&gt;</div><div class='del'>-#include &lt;signal.h&gt;</div><div class='del'>-#include &lt;malloc.h&gt;</div><div class='del'>-#include &lt;utmp.h&gt;</div><div class='del'>-#include &lt;sys/types.h&gt;</div><div class='del'>-#include &lt;sys/param.h&gt;</div><div class='del'>-#include &lt;sys/socket.h&gt;</div><div class='del'>-#include &lt;sys/sockio.h&gt;</div><div class='del'>-#include &lt;sys/stream.h&gt;</div><div class='del'>-#include &lt;sys/stropts.h&gt;</div><div class='del'>-#include &lt;sys/stat.h&gt;</div><div class='del'>-#include &lt;sys/time.h&gt;</div><div class='del'>-#include &lt;sys/poll.h&gt;</div><div class='del'>-#include &lt;net/if.h&gt;</div><div class='del'>-#include &lt;net/if_arp.h&gt;</div><div class='del'>-#include &lt;net/nit_if.h&gt;</div><div class='del'>-#include &lt;net/route.h&gt;</div><div class='del'>-#include &lt;net/ppp_defs.h&gt;</div><div class='del'>-#include &lt;net/pppio.h&gt;</div><div class='del'>-#include &lt;netinet/in.h&gt;</div><div class='del'>-</div><div class='del'>-#include "pppd.h"</div><div class='del'>-</div><div class='del'>-#if defined(sun) &amp;&amp; defined(sparc)</div><div class='del'>-#include &lt;alloca.h&gt;</div><div class='del'>-#ifndef __GNUC__</div><div class='del'>-extern void *alloca();</div><div class='del'>-#endif</div><div class='del'>-#endif /*sparc*/</div><div class='del'>-</div><div class='del'>-static const char rcsid[] = RCSID;</div><div class='del'>-</div><div class='del'>-static int	pppfd;</div><div class='del'>-static int	fdmuxid = -1;</div><div class='del'>-static int	iffd;</div><div class='del'>-static int	sockfd;</div><div class='del'>-</div><div class='del'>-static int	restore_term;</div><div class='del'>-static struct termios inittermios;</div><div class='del'>-static struct winsize wsinfo;	/* Initial window size info */</div><div class='del'>-static pid_t	parent_pid;	/* PID of our parent */</div><div class='del'>-</div><div class='del'>-extern u_char	inpacket_buf[];	/* borrowed from main.c */</div><div class='del'>-</div><div class='del'>-#define MAX_POLLFDS	32</div><div class='del'>-static struct pollfd pollfds[MAX_POLLFDS];</div><div class='del'>-static int n_pollfds;</div><div class='del'>-</div><div class='del'>-static int	link_mtu, link_mru;</div><div class='del'>-</div><div class='del'>-#define NMODULES	32</div><div class='del'>-static int	tty_nmodules;</div><div class='del'>-static char	tty_modules[NMODULES][FMNAMESZ+1];</div><div class='del'>-</div><div class='del'>-static int	if_is_up;	/* Interface has been marked up */</div><div class='del'>-static u_int32_t ifaddrs[2];	/* local and remote addresses */</div><div class='del'>-static u_int32_t default_route_gateway;	/* Gateway for default route added */</div><div class='del'>-static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */</div><div class='del'>-</div><div class='del'>-/* Prototypes for procedures local to this file. */</div><div class='del'>-static int translate_speed __P((int));</div><div class='del'>-static int baud_rate_of __P((int));</div><div class='del'>-static int get_ether_addr __P((u_int32_t, struct sockaddr *));</div><div class='del'>-static int strioctl __P((int, int, void *, int, int));</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_init - System-dependent initialization.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_init()</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-</div><div class='del'>-    /* Get an internet socket for doing socket ioctl's on. */</div><div class='del'>-    if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) &lt; 0)</div><div class='del'>-	fatal("Couldn't create IP socket: %m");</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * We may want to send a SIGHUP to the session leader associated</div><div class='del'>-     * with our controlling terminal later.  Because SunOS doesn't</div><div class='del'>-     * have getsid(), we make do with sending the signal to our</div><div class='del'>-     * parent process.</div><div class='del'>-     */</div><div class='del'>-    parent_pid = getppid();</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Open the ppp device.</div><div class='del'>-     */</div><div class='del'>-    pppfd = open("/dev/ppp", O_RDWR | O_NONBLOCK, 0);</div><div class='del'>-    if (pppfd &lt; 0)</div><div class='del'>-	fatal("Can't open /dev/ppp: %m");</div><div class='del'>-    if (kdebugflag) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_DRIVER;</div><div class='del'>-	strioctl(pppfd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* Assign a new PPA and get its unit number. */</div><div class='del'>-    if (strioctl(pppfd, PPPIO_NEWPPA, &amp;ifunit, 0, sizeof(int)) &lt; 0)</div><div class='del'>-	fatal("Can't create new PPP interface: %m");</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Open the ppp device again and push the if_ppp module on it.</div><div class='del'>-     */</div><div class='del'>-    iffd = open("/dev/ppp", O_RDWR, 0);</div><div class='del'>-    if (iffd &lt; 0)</div><div class='del'>-	fatal("Can't open /dev/ppp (2): %m");</div><div class='del'>-    if (kdebugflag) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_DRIVER;</div><div class='del'>-	strioctl(iffd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-    if (strioctl(iffd, PPPIO_ATTACH, &amp;ifunit, sizeof(int), 0) &lt; 0)</div><div class='del'>-	fatal("Couldn't attach ppp interface to device: %m");</div><div class='del'>-    if (ioctl(iffd, I_PUSH, "if_ppp") &lt; 0)</div><div class='del'>-	fatal("Can't push ppp interface module: %m");</div><div class='del'>-    if (kdebugflag) {</div><div class='del'>-	x = PPPDBG_LOG + PPPDBG_IF;</div><div class='del'>-	strioctl(iffd, PPPIO_DEBUG, &amp;x, sizeof(int), 0);</div><div class='del'>-    }</div><div class='del'>-    if (strioctl(iffd, PPPIO_NEWPPA, &amp;ifunit, sizeof(int), 0) &lt; 0)</div><div class='del'>-	fatal("Couldn't create ppp interface unit: %m");</div><div class='del'>-    x = PPP_IP;</div><div class='del'>-    if (strioctl(iffd, PPPIO_BIND, &amp;x, sizeof(int), 0) &lt; 0)</div><div class='del'>-	fatal("Couldn't bind ppp interface to IP SAP: %m");</div><div class='del'>-</div><div class='del'>-    n_pollfds = 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_cleanup - restore any system state we modified before exiting:</div><div class='del'>- * mark the interface down, delete default route and/or proxy arp entry.</div><div class='del'>- * This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_cleanup()</div><div class='del'>-{</div><div class='del'>-    if (if_is_up)</div><div class='del'>-	sifdown(0);</div><div class='del'>-    if (ifaddrs[0])</div><div class='del'>-	cifaddr(0, ifaddrs[0], ifaddrs[1]);</div><div class='del'>-    if (default_route_gateway)</div><div class='del'>-	cifdefaultroute(0, 0, default_route_gateway);</div><div class='del'>-    if (proxy_arp_addr)</div><div class='del'>-	cifproxyarp(0, proxy_arp_addr);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_close - Clean up in a child process before execing.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-sys_close()</div><div class='del'>-{</div><div class='del'>-    close(iffd);</div><div class='del'>-    close(pppfd);</div><div class='del'>-    close(sockfd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sys_check_options - check the options that the user specified</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sys_check_options()</div><div class='del'>-{</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * daemon - Detach us from controlling terminal session.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-daemon(nochdir, noclose)</div><div class='del'>-    int nochdir, noclose;</div><div class='del'>-{</div><div class='del'>-    int pid;</div><div class='del'>-</div><div class='del'>-    if ((pid = fork()) &lt; 0)</div><div class='del'>-	return -1;</div><div class='del'>-    if (pid != 0)</div><div class='del'>-	exit(0);		/* parent dies */</div><div class='del'>-    setsid();</div><div class='del'>-    if (!nochdir)</div><div class='del'>-	chdir("/");</div><div class='del'>-    if (!noclose) {</div><div class='del'>-	fclose(stdin);		/* don't need stdin, stdout, stderr */</div><div class='del'>-	fclose(stdout);</div><div class='del'>-	fclose(stderr);</div><div class='del'>-    }</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_available - check whether the system has any ppp interfaces</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ppp_available()</div><div class='del'>-{</div><div class='del'>-    struct stat buf;</div><div class='del'>-</div><div class='del'>-    return stat("/dev/ppp", &amp;buf) &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * tty_establish_ppp - Turn the serial port into a ppp interface.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-tty_establish_ppp(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    /* Pop any existing modules off the tty stream. */</div><div class='del'>-    for (i = 0;; ++i)</div><div class='del'>-	if (ioctl(fd, I_LOOK, tty_modules[i]) &lt; 0</div><div class='del'>-	    || ioctl(fd, I_POP, 0) &lt; 0)</div><div class='del'>-	    break;</div><div class='del'>-    tty_nmodules = i;</div><div class='del'>-</div><div class='del'>-    /* Push the async hdlc module and the compressor module. */</div><div class='del'>-    if (ioctl(fd, I_PUSH, "ppp_ahdl") &lt; 0)</div><div class='del'>-	fatal("Couldn't push PPP Async HDLC module: %m");</div><div class='del'>-    if (ioctl(fd, I_PUSH, "ppp_comp") &lt; 0)</div><div class='del'>-	error("Couldn't push PPP compression module: %m");</div><div class='del'>-</div><div class='del'>-    /* Link the serial port under the PPP multiplexor. */</div><div class='del'>-    if ((fdmuxid = ioctl(pppfd, I_LINK, fd)) &lt; 0)</div><div class='del'>-	fatal("Can't link tty to PPP mux: %m");</div><div class='del'>-</div><div class='del'>-    return pppfd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * disestablish_ppp - Restore the serial port to normal operation.</div><div class='del'>- * It attempts to reconstruct the stream with the previously popped</div><div class='del'>- * modules.  This shouldn't call die() because it's called from die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-tty_disestablish_ppp(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int i;</div><div class='del'>-</div><div class='del'>-    if (fdmuxid &gt;= 0) {</div><div class='del'>-	if (ioctl(pppfd, I_UNLINK, fdmuxid) &lt; 0) {</div><div class='del'>-	    if (!hungup)</div><div class='del'>-		error("Can't unlink tty from PPP mux: %m");</div><div class='del'>-	}</div><div class='del'>-	fdmuxid = -1;</div><div class='del'>-</div><div class='del'>-	if (!hungup) {</div><div class='del'>-	    while (ioctl(fd, I_POP, 0) &gt;= 0)</div><div class='del'>-		;</div><div class='del'>-	    for (i = tty_nmodules - 1; i &gt;= 0; --i)</div><div class='del'>-		if (ioctl(fd, I_PUSH, tty_modules[i]) &lt; 0)</div><div class='del'>-		    error("Couldn't restore tty module %s: %m",</div><div class='del'>-			   tty_modules[i]);</div><div class='del'>-	}</div><div class='del'>-	if (hungup &amp;&amp; default_device &amp;&amp; parent_pid &gt; 0) {</div><div class='del'>-	    /*</div><div class='del'>-	     * If we have received a hangup, we need to send a SIGHUP</div><div class='del'>-	     * to the terminal's controlling process.  The reason is</div><div class='del'>-	     * that the original stream head for the terminal hasn't</div><div class='del'>-	     * seen the M_HANGUP message (it went up through the ppp</div><div class='del'>-	     * driver to the stream head for our fd to /dev/ppp).</div><div class='del'>-	     * Actually we send the signal to the process that invoked</div><div class='del'>-	     * pppd, since SunOS doesn't have getsid().</div><div class='del'>-	     */</div><div class='del'>-	    kill(parent_pid, SIGHUP);</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Check whether the link seems not to be 8-bit clean.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-clean_check()</div><div class='del'>-{</div><div class='del'>-    int x;</div><div class='del'>-    char *s;</div><div class='del'>-</div><div class='del'>-    if (strioctl(pppfd, PPPIO_GCLEAN, &amp;x, 0, sizeof(x)) &lt; 0)</div><div class='del'>-	return;</div><div class='del'>-    s = NULL;</div><div class='del'>-    switch (~x) {</div><div class='del'>-    case RCV_B7_0:</div><div class='del'>-	s = "bit 7 set to 1";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_B7_1:</div><div class='del'>-	s = "bit 7 set to 0";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_EVNP:</div><div class='del'>-	s = "odd parity";</div><div class='del'>-	break;</div><div class='del'>-    case RCV_ODDP:</div><div class='del'>-	s = "even parity";</div><div class='del'>-	break;</div><div class='del'>-    }</div><div class='del'>-    if (s != NULL) {</div><div class='del'>-	warn("Serial link is not 8-bit clean:");</div><div class='del'>-	warn("All received characters had %s", s);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * List of valid speeds.</div><div class='del'>- */</div><div class='del'>-struct speed {</div><div class='del'>-    int speed_int, speed_val;</div><div class='del'>-} speeds[] = {</div><div class='del'>-#ifdef B50</div><div class='del'>-    { 50, B50 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B75</div><div class='del'>-    { 75, B75 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B110</div><div class='del'>-    { 110, B110 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B134</div><div class='del'>-    { 134, B134 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B150</div><div class='del'>-    { 150, B150 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B200</div><div class='del'>-    { 200, B200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B300</div><div class='del'>-    { 300, B300 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B600</div><div class='del'>-    { 600, B600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1200</div><div class='del'>-    { 1200, B1200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B1800</div><div class='del'>-    { 1800, B1800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2000</div><div class='del'>-    { 2000, B2000 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B2400</div><div class='del'>-    { 2400, B2400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B3600</div><div class='del'>-    { 3600, B3600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B4800</div><div class='del'>-    { 4800, B4800 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B7200</div><div class='del'>-    { 7200, B7200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B9600</div><div class='del'>-    { 9600, B9600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B19200</div><div class='del'>-    { 19200, B19200 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B38400</div><div class='del'>-    { 38400, B38400 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTA</div><div class='del'>-    { 19200, EXTA },</div><div class='del'>-#endif</div><div class='del'>-#ifdef EXTB</div><div class='del'>-    { 38400, EXTB },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B57600</div><div class='del'>-    { 57600, B57600 },</div><div class='del'>-#endif</div><div class='del'>-#ifdef B115200</div><div class='del'>-    { 115200, B115200 },</div><div class='del'>-#endif</div><div class='del'>-    { 0, 0 }</div><div class='del'>-};</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Translate from bits/second to a speed_t.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-translate_speed(bps)</div><div class='del'>-    int bps;</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (bps == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    for (speedp = speeds; speedp-&gt;speed_int; speedp++)</div><div class='del'>-	if (bps == speedp-&gt;speed_int)</div><div class='del'>-	    return speedp-&gt;speed_val;</div><div class='del'>-    warn("speed %d not supported", bps);</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Translate from a speed_t to bits/second.</div><div class='del'>- */</div><div class='del'>-static int</div><div class='del'>-baud_rate_of(speed)</div><div class='del'>-    int speed;</div><div class='del'>-{</div><div class='del'>-    struct speed *speedp;</div><div class='del'>-</div><div class='del'>-    if (speed == 0)</div><div class='del'>-	return 0;</div><div class='del'>-    for (speedp = speeds; speedp-&gt;speed_int; speedp++)</div><div class='del'>-	if (speed == speedp-&gt;speed_val)</div><div class='del'>-	    return speedp-&gt;speed_int;</div><div class='del'>-    return 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,</div><div class='del'>- * at the requested speed, etc.  If `local' is true, set CLOCAL</div><div class='del'>- * regardless of whether the modem option was specified.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-set_up_tty(fd, local)</div><div class='del'>-    int fd, local;</div><div class='del'>-{</div><div class='del'>-    int speed;</div><div class='del'>-    struct termios tios;</div><div class='del'>-</div><div class='del'>-    if (tcgetattr(fd, &amp;tios) &lt; 0)</div><div class='del'>-	fatal("tcgetattr: %m");</div><div class='del'>-</div><div class='del'>-    if (!restore_term) {</div><div class='del'>-	inittermios = tios;</div><div class='del'>-	ioctl(fd, TIOCGWINSZ, &amp;wsinfo);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    tios.c_cflag &amp;= ~(CSIZE | CSTOPB | PARENB | CLOCAL);</div><div class='del'>-    if (crtscts &gt; 0)</div><div class='del'>-	tios.c_cflag |= CRTSCTS;</div><div class='del'>-    else if (crtscts &lt; 0)</div><div class='del'>-	tios.c_cflag &amp;= ~CRTSCTS;</div><div class='del'>-</div><div class='del'>-    tios.c_cflag |= CS8 | CREAD | HUPCL;</div><div class='del'>-    if (local || !modem)</div><div class='del'>-	tios.c_cflag |= CLOCAL;</div><div class='del'>-    tios.c_iflag = IGNBRK | IGNPAR;</div><div class='del'>-    tios.c_oflag = 0;</div><div class='del'>-    tios.c_lflag = 0;</div><div class='del'>-    tios.c_cc[VMIN] = 1;</div><div class='del'>-    tios.c_cc[VTIME] = 0;</div><div class='del'>-</div><div class='del'>-    if (crtscts == -2) {</div><div class='del'>-	tios.c_iflag |= IXON | IXOFF;</div><div class='del'>-	tios.c_cc[VSTOP] = 0x13;	/* DC3 = XOFF = ^S */</div><div class='del'>-	tios.c_cc[VSTART] = 0x11;	/* DC1 = XON  = ^Q */</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    speed = translate_speed(inspeed);</div><div class='del'>-    if (speed) {</div><div class='del'>-	cfsetospeed(&amp;tios, speed);</div><div class='del'>-	cfsetispeed(&amp;tios, speed);</div><div class='del'>-    } else {</div><div class='del'>-	speed = cfgetospeed(&amp;tios);</div><div class='del'>-	/*</div><div class='del'>-	 * We can't proceed if the serial port speed is 0,</div><div class='del'>-	 * since that implies that the serial port is disabled.</div><div class='del'>-	 */</div><div class='del'>-	if (speed == B0)</div><div class='del'>-	    fatal("Baud rate for %s is 0; need explicit baud rate", devnam);</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (tcsetattr(fd, TCSAFLUSH, &amp;tios) &lt; 0)</div><div class='del'>-	fatal("tcsetattr: %m");</div><div class='del'>-</div><div class='del'>-    baud_rate = inspeed = baud_rate_of(speed);</div><div class='del'>-    restore_term = 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * restore_tty - restore the terminal to the saved settings.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-restore_tty(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    if (restore_term) {</div><div class='del'>-	if (!default_device) {</div><div class='del'>-	    /*</div><div class='del'>-	     * Turn off echoing, because otherwise we can get into</div><div class='del'>-	     * a loop with the tty and the modem echoing to each other.</div><div class='del'>-	     * We presume we are the sole user of this tty device, so</div><div class='del'>-	     * when we close it, it will revert to its defaults anyway.</div><div class='del'>-	     */</div><div class='del'>-	    inittermios.c_lflag &amp;= ~(ECHO | ECHONL);</div><div class='del'>-	}</div><div class='del'>-	if (tcsetattr(fd, TCSAFLUSH, &amp;inittermios) &lt; 0)</div><div class='del'>-	    if (!hungup &amp;&amp; errno != ENXIO)</div><div class='del'>-		warn("tcsetattr: %m");</div><div class='del'>-	ioctl(fd, TIOCSWINSZ, &amp;wsinfo);</div><div class='del'>-	restore_term = 0;</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * setdtr - control the DTR line on the serial port.</div><div class='del'>- * This is called from die(), so it shouldn't call die().</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-setdtr(fd, on)</div><div class='del'>-int fd, on;</div><div class='del'>-{</div><div class='del'>-    int modembits = TIOCM_DTR;</div><div class='del'>-</div><div class='del'>-    ioctl(fd, (on? TIOCMBIS: TIOCMBIC), &amp;modembits);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * open_loopback - open the device we use for getting packets</div><div class='del'>- * in demand mode.  Under SunOS, we use our existing fd</div><div class='del'>- * to the ppp driver.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-open_ppp_loopback()</div><div class='del'>-{</div><div class='del'>-    return pppfd;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * output - Output PPP packet.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-output(unit, p, len)</div><div class='del'>-    int unit;</div><div class='del'>-    u_char *p;</div><div class='del'>-    int len;</div><div class='del'>-{</div><div class='del'>-    struct strbuf data;</div><div class='del'>-    int retries;</div><div class='del'>-    struct pollfd pfd;</div><div class='del'>-</div><div class='del'>-    if (debug)</div><div class='del'>-	dbglog("sent %P", p, len);</div><div class='del'>-</div><div class='del'>-    data.len = len;</div><div class='del'>-    data.buf = (caddr_t) p;</div><div class='del'>-    retries = 4;</div><div class='del'>-    while (putmsg(pppfd, NULL, &amp;data, 0) &lt; 0) {</div><div class='del'>-	if (--retries &lt; 0 || (errno != EWOULDBLOCK &amp;&amp; errno != EAGAIN)) {</div><div class='del'>-	    if (errno != ENXIO)</div><div class='del'>-		error("Couldn't send packet: %m");</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-	pfd.fd = pppfd;</div><div class='del'>-	pfd.events = POLLOUT;</div><div class='del'>-	poll(&amp;pfd, 1, 250);	/* wait for up to 0.25 seconds */</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * wait_input - wait until there is data available,</div><div class='del'>- * for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_input(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    int t;</div><div class='del'>-</div><div class='del'>-    t = timo == NULL? -1: timo-&gt;tv_sec * 1000 + timo-&gt;tv_usec / 1000;</div><div class='del'>-    if (poll(pollfds, n_pollfds, t) &lt; 0 &amp;&amp; errno != EINTR) {</div><div class='del'>-	if (errno != EAGAIN)</div><div class='del'>-	    fatal("poll: %m");</div><div class='del'>-	/* we can get EAGAIN on a heavily loaded system,</div><div class='del'>-	 * just wait a short time and try again. */</div><div class='del'>-	usleep(50000);</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * add_fd - add an fd to the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void add_fd(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt; n_pollfds; ++n)</div><div class='del'>-	if (pollfds[n].fd == fd)</div><div class='del'>-	    return;</div><div class='del'>-    if (n_pollfds &lt; MAX_POLLFDS) {</div><div class='del'>-	pollfds[n_pollfds].fd = fd;</div><div class='del'>-	pollfds[n_pollfds].events = POLLIN | POLLPRI | POLLHUP;</div><div class='del'>-	++n_pollfds;</div><div class='del'>-    } else</div><div class='del'>-	error("Too many inputs!");</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * remove_fd - remove an fd from the set that wait_input waits for.</div><div class='del'>- */</div><div class='del'>-void remove_fd(fd)</div><div class='del'>-    int fd;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    for (n = 0; n &lt; n_pollfds; ++n) {</div><div class='del'>-	if (pollfds[n].fd == fd) {</div><div class='del'>-	    while (++n &lt; n_pollfds)</div><div class='del'>-		pollfds[n-1] = pollfds[n];</div><div class='del'>-	    --n_pollfds;</div><div class='del'>-	    break;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#if 0</div><div class='del'>-/*</div><div class='del'>- * wait_loop_output - wait until there is data available on the</div><div class='del'>- * loopback, for the length of time specified by *timo (indefinite</div><div class='del'>- * if timo is NULL).</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_loop_output(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    wait_input(timo);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * wait_time - wait for a given length of time or until a</div><div class='del'>- * signal is received.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-wait_time(timo)</div><div class='del'>-    struct timeval *timo;</div><div class='del'>-{</div><div class='del'>-    int n;</div><div class='del'>-</div><div class='del'>-    n = select(0, NULL, NULL, NULL, timo);</div><div class='del'>-    if (n &lt; 0 &amp;&amp; errno != EINTR)</div><div class='del'>-	fatal("select: %m");</div><div class='del'>-}</div><div class='del'>-#endif</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * read_packet - get a PPP packet from the serial device.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-read_packet(buf)</div><div class='del'>-    u_char *buf;</div><div class='del'>-{</div><div class='del'>-    struct strbuf ctrl, data;</div><div class='del'>-    int flags, len;</div><div class='del'>-    unsigned char ctrlbuf[64];</div><div class='del'>-</div><div class='del'>-    for (;;) {</div><div class='del'>-	data.maxlen = PPP_MRU + PPP_HDRLEN;</div><div class='del'>-	data.buf = (caddr_t) buf;</div><div class='del'>-	ctrl.maxlen = sizeof(ctrlbuf);</div><div class='del'>-	ctrl.buf = (caddr_t) ctrlbuf;</div><div class='del'>-	flags = 0;</div><div class='del'>-	len = getmsg(pppfd, &amp;ctrl, &amp;data, &amp;flags);</div><div class='del'>-	if (len &lt; 0) {</div><div class='del'>-	    if (errno == EAGAIN || errno == EINTR)</div><div class='del'>-		return -1;</div><div class='del'>-	    fatal("Error reading packet: %m");</div><div class='del'>-	}</div><div class='del'>-</div><div class='del'>-	if (ctrl.len &lt;= 0)</div><div class='del'>-	    return data.len;</div><div class='del'>-</div><div class='del'>-	/*</div><div class='del'>-	 * Got a M_PROTO or M_PCPROTO message.  Huh?</div><div class='del'>-	 */</div><div class='del'>-	if (debug)</div><div class='del'>-	    dbglog("got ctrl msg len=%d", ctrl.len);</div><div class='del'>-</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_loop_output - get outgoing packets from the ppp device,</div><div class='del'>- * and detect when we want to bring the real link up.</div><div class='del'>- * Return value is 1 if we need to bring up the link, 0 otherwise.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_loop_output()</div><div class='del'>-{</div><div class='del'>-    int len;</div><div class='del'>-    int rv = 0;</div><div class='del'>-</div><div class='del'>-    while ((len = read_packet(inpacket_buf)) &gt; 0) {</div><div class='del'>-	if (loop_frame(inpacket_buf, len))</div><div class='del'>-	    rv = 1;</div><div class='del'>-    }</div><div class='del'>-    return rv;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_send_config - configure the transmit characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ppp_send_config(unit, mtu, asyncmap, pcomp, accomp)</div><div class='del'>-    int unit, mtu;</div><div class='del'>-    u_int32_t asyncmap;</div><div class='del'>-    int pcomp, accomp;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    link_mtu = mtu;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_MTU, &amp;mtu, sizeof(mtu), 0) &lt; 0) {</div><div class='del'>-	if (hungup &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return;</div><div class='del'>-	error("Couldn't set MTU: %m");</div><div class='del'>-    }</div><div class='del'>-    if (strioctl(pppfd, PPPIO_XACCM, &amp;asyncmap, sizeof(asyncmap), 0) &lt; 0) {</div><div class='del'>-	error("Couldn't set transmit ACCM: %m");</div><div class='del'>-    }</div><div class='del'>-    cf[0] = (pcomp? COMP_PROT: 0) + (accomp? COMP_AC: 0);</div><div class='del'>-    cf[1] = COMP_PROT | COMP_AC;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	error("Couldn't set prot/AC compression: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /* set mtu for ip as well */</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    ifr.ifr_metric = link_mtu;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFMTU, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP MTU: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_set_xaccm - set the extended transmit ACCM for the interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ppp_set_xaccm(unit, accm)</div><div class='del'>-    int unit;</div><div class='del'>-    ext_accm accm;</div><div class='del'>-{</div><div class='del'>-    if (strioctl(pppfd, PPPIO_XACCM, accm, sizeof(ext_accm), 0) &lt; 0) {</div><div class='del'>-	if (!hungup || errno != ENXIO)</div><div class='del'>-	    warn("Couldn't set extended ACCM: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ppp_recv_config - configure the receive-side characteristics of</div><div class='del'>- * the ppp interface.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ppp_recv_config(unit, mru, asyncmap, pcomp, accomp)</div><div class='del'>-    int unit, mru;</div><div class='del'>-    u_int32_t asyncmap;</div><div class='del'>-    int pcomp, accomp;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    link_mru = mru;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_MRU, &amp;mru, sizeof(mru), 0) &lt; 0) {</div><div class='del'>-	if (hungup &amp;&amp; errno == ENXIO)</div><div class='del'>-	    return;</div><div class='del'>-	error("Couldn't set MRU: %m");</div><div class='del'>-    }</div><div class='del'>-    if (strioctl(pppfd, PPPIO_RACCM, &amp;asyncmap, sizeof(asyncmap), 0) &lt; 0) {</div><div class='del'>-	error("Couldn't set receive ACCM: %m");</div><div class='del'>-    }</div><div class='del'>-    cf[0] = (pcomp? DECOMP_PROT: 0) + (accomp? DECOMP_AC: 0);</div><div class='del'>-    cf[1] = DECOMP_PROT | DECOMP_AC;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	error("Couldn't set prot/AC decompression: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_test - ask kernel whether a given compression method</div><div class='del'>- * is acceptable for use.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ccp_test(unit, opt_ptr, opt_len, for_transmit)</div><div class='del'>-    int unit, opt_len, for_transmit;</div><div class='del'>-    u_char *opt_ptr;</div><div class='del'>-{</div><div class='del'>-    if (strioctl(pppfd, (for_transmit? PPPIO_XCOMP: PPPIO_RCOMP),</div><div class='del'>-		 opt_ptr, opt_len, 0) &gt;= 0)</div><div class='del'>-	return 1;</div><div class='del'>-    return (errno == ENOSR)? 0: -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_flags_set - inform kernel about the current state of CCP.</div><div class='del'>- */</div><div class='del'>-void</div><div class='del'>-ccp_flags_set(unit, isopen, isup)</div><div class='del'>-    int unit, isopen, isup;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    cf[0] = (isopen? CCP_ISOPEN: 0) + (isup? CCP_ISUP: 0);</div><div class='del'>-    cf[1] = CCP_ISOPEN | CCP_ISUP | CCP_ERROR | CCP_FATALERROR;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (!hungup || errno != ENXIO)</div><div class='del'>-	    error("Couldn't set kernel CCP state: %m");</div><div class='del'>-    }</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_idle_time - return how long the link has been idle.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_idle_time(u, ip)</div><div class='del'>-    int u;</div><div class='del'>-    struct ppp_idle *ip;</div><div class='del'>-{</div><div class='del'>-    return strioctl(pppfd, PPPIO_GIDLE, ip, 0, sizeof(struct ppp_idle)) &gt;= 0;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_ppp_stats - return statistics for the link.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-get_ppp_stats(u, stats)</div><div class='del'>-    int u;</div><div class='del'>-    struct pppd_stats *stats;</div><div class='del'>-{</div><div class='del'>-    struct ppp_stats s;</div><div class='del'>-</div><div class='del'>-    if (strioctl(pppfd, PPPIO_GETSTAT, &amp;s, 0, sizeof(s)) &lt; 0) {</div><div class='del'>-	error("Couldn't get link statistics: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    stats-&gt;bytes_in = s.p.ppp_ibytes;</div><div class='del'>-    stats-&gt;bytes_out = s.p.ppp_obytes;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * ccp_fatal_error - returns 1 if decompression was disabled as a</div><div class='del'>- * result of an error detected after decompression of a packet,</div><div class='del'>- * 0 otherwise.  This is necessary because of patent nonsense.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-ccp_fatal_error(unit)</div><div class='del'>-    int unit;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-</div><div class='del'>-    cf[0] = cf[1] = 0;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (errno != ENXIO &amp;&amp; errno != EINVAL)</div><div class='del'>-	    error("Couldn't get compression flags: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return cf[0] &amp; CCP_FATALERROR;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifvjcomp - config tcp header compression</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifvjcomp(u, vjcomp, xcidcomp, xmaxcid)</div><div class='del'>-    int u, vjcomp, xcidcomp, xmaxcid;</div><div class='del'>-{</div><div class='del'>-    int cf[2];</div><div class='del'>-    char maxcid[2];</div><div class='del'>-</div><div class='del'>-    if (vjcomp) {</div><div class='del'>-	maxcid[0] = xcidcomp;</div><div class='del'>-	maxcid[1] = 15;		/* XXX should be rmaxcid */</div><div class='del'>-	if (strioctl(pppfd, PPPIO_VJINIT, maxcid, sizeof(maxcid), 0) &lt; 0) {</div><div class='del'>-	    error("Couldn't initialize VJ compression: %m");</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    cf[0] = (vjcomp? COMP_VJC + DECOMP_VJC: 0)	/* XXX this is wrong */</div><div class='del'>-	+ (xcidcomp? COMP_VJCCID + DECOMP_VJCCID: 0);</div><div class='del'>-    cf[1] = COMP_VJC + DECOMP_VJC + COMP_VJCCID + DECOMP_VJCCID;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_CFLAGS, cf, sizeof(cf), sizeof(int)) &lt; 0) {</div><div class='del'>-	if (vjcomp)</div><div class='del'>-	    error("Couldn't enable VJ compression: %m");</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifup - Config the interface up and enable IP packets to pass.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifup(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sockfd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface up (get): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_flags |= IFF_UP;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface up (set): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if_is_up = 1;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifdown - Config the interface down and disable IP.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifdown(u)</div><div class='del'>-    int u;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    if (ioctl(sockfd, SIOCGIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't mark interface down (get): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    if ((ifr.ifr_flags &amp; IFF_UP) != 0) {</div><div class='del'>-	ifr.ifr_flags &amp;= ~IFF_UP;</div><div class='del'>-	if (ioctl(sockfd, SIOCSIFFLAGS, &amp;ifr) &lt; 0) {</div><div class='del'>-	    error("Couldn't mark interface down (set): %m");</div><div class='del'>-	    return 0;</div><div class='del'>-	}</div><div class='del'>-    }</div><div class='del'>-    if_is_up = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifnpmode - Set the mode for handling packets for a given NP.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifnpmode(u, proto, mode)</div><div class='del'>-    int u;</div><div class='del'>-    int proto;</div><div class='del'>-    enum NPmode mode;</div><div class='del'>-{</div><div class='del'>-    int npi[2];</div><div class='del'>-</div><div class='del'>-    npi[0] = proto;</div><div class='del'>-    npi[1] = (int) mode;</div><div class='del'>-    if (strioctl(pppfd, PPPIO_NPMODE, npi, 2 * sizeof(int), 0) &lt; 0) {</div><div class='del'>-	error("ioctl(set NP %d mode to %d): %m", proto, mode);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define INET_ADDR(x)	(((struct sockaddr_in *) &amp;(x))-&gt;sin_addr.s_addr)</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifaddr - Config the interface IP addresses and netmask.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifaddr(u, o, h, m)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t o, h, m;</div><div class='del'>-{</div><div class='del'>-    struct ifreq ifr;</div><div class='del'>-</div><div class='del'>-    memset(&amp;ifr, 0, sizeof(ifr));</div><div class='del'>-    strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));</div><div class='del'>-    ifr.ifr_addr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_addr) = m;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFNETMASK, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP netmask: %m");</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_addr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_addr) = o;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFADDR, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set local IP address: %m");</div><div class='del'>-    }</div><div class='del'>-    ifr.ifr_dstaddr.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(ifr.ifr_dstaddr) = h;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFDSTADDR, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set remote IP address: %m");</div><div class='del'>-    }</div><div class='del'>-#if 0	/* now done in ppp_send_config */</div><div class='del'>-    ifr.ifr_metric = link_mtu;</div><div class='del'>-    if (ioctl(sockfd, SIOCSIFMTU, &amp;ifr) &lt; 0) {</div><div class='del'>-	error("Couldn't set IP MTU: %m");</div><div class='del'>-    }</div><div class='del'>-#endif</div><div class='del'>-    ifaddrs[0] = o;</div><div class='del'>-    ifaddrs[1] = h;</div><div class='del'>-</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifaddr - Clear the interface IP addresses, and delete routes</div><div class='del'>- * through the interface if possible.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifaddr(u, o, h)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t o, h;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    bzero(&amp;rt, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = h;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = o;</div><div class='del'>-    rt.rt_flags = RTF_HOST;</div><div class='del'>-    if (ioctl(sockfd, SIOCDELRT, &amp;rt) &lt; 0)</div><div class='del'>-	error("Couldn't delete route through interface: %m");</div><div class='del'>-    ifaddrs[0] = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifdefaultroute - assign a default route through the address given.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifdefaultroute(u, l, g)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t l, g;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    bzero(&amp;rt, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = 0;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = g;</div><div class='del'>-    rt.rt_flags = RTF_GATEWAY;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sockfd, SIOCADDRT, &amp;rt) &lt; 0) {</div><div class='del'>-	error("Can't add default route: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = g;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifdefaultroute - delete a default route through the address given.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifdefaultroute(u, l, g)</div><div class='del'>-    int u;</div><div class='del'>-    u_int32_t l, g;</div><div class='del'>-{</div><div class='del'>-    struct rtentry rt;</div><div class='del'>-</div><div class='del'>-    bzero(&amp;rt, sizeof(rt));</div><div class='del'>-    rt.rt_dst.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_dst) = 0;</div><div class='del'>-    rt.rt_gateway.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(rt.rt_gateway) = g;</div><div class='del'>-    rt.rt_flags = RTF_GATEWAY;</div><div class='del'>-</div><div class='del'>-    if (ioctl(sockfd, SIOCDELRT, &amp;rt) &lt; 0) {</div><div class='del'>-	error("Can't delete default route: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    default_route_gateway = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * sifproxyarp - Make a proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-sifproxyarp(unit, hisaddr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t hisaddr;</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    bzero(&amp;arpreq, sizeof(arpreq));</div><div class='del'>-    if (!get_ether_addr(hisaddr, &amp;arpreq.arp_ha))</div><div class='del'>-	return 0;</div><div class='del'>-</div><div class='del'>-    arpreq.arp_pa.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(arpreq.arp_pa) = hisaddr;</div><div class='del'>-    arpreq.arp_flags = ATF_PERM | ATF_PUBL;</div><div class='del'>-    if (ioctl(sockfd, SIOCSARP, (caddr_t) &amp;arpreq) &lt; 0) {</div><div class='del'>-	error("Couldn't set proxy ARP entry: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    proxy_arp_addr = hisaddr;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * cifproxyarp - Delete the proxy ARP entry for the peer.</div><div class='del'>- */</div><div class='del'>-int</div><div class='del'>-cifproxyarp(unit, hisaddr)</div><div class='del'>-    int unit;</div><div class='del'>-    u_int32_t hisaddr;</div><div class='del'>-{</div><div class='del'>-    struct arpreq arpreq;</div><div class='del'>-</div><div class='del'>-    bzero(&amp;arpreq, sizeof(arpreq));</div><div class='del'>-    arpreq.arp_pa.sa_family = AF_INET;</div><div class='del'>-    INET_ADDR(arpreq.arp_pa) = hisaddr;</div><div class='del'>-    if (ioctl(sockfd, SIOCDARP, (caddr_t)&amp;arpreq) &lt; 0) {</div><div class='del'>-	error("Couldn't delete proxy ARP entry: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    proxy_arp_addr = 0;</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * get_ether_addr - get the hardware address of an interface on the</div><div class='del'>- * the same subnet as ipaddr.</div><div class='del'>- */</div><div class='del'>-#define MAX_IFS		32</div><div class='del'>-</div><div class='del'>-static int</div><div class='del'>-get_ether_addr(ipaddr, hwaddr)</div><div class='del'>-    u_int32_t ipaddr;</div><div class='del'>-    struct sockaddr *hwaddr;</div><div class='del'>-{</div><div class='del'>-    struct ifreq *ifr, *ifend;</div><div class='del'>-    u_int32_t ina, mask;</div><div class='del'>-    struct ifreq ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-    struct ifreq ifs[MAX_IFS];</div><div class='del'>-    int nit_fd;</div><div class='del'>-</div><div class='del'>-    ifc.ifc_len = sizeof(ifs);</div><div class='del'>-    ifc.ifc_req = ifs;</div><div class='del'>-    if (ioctl(sockfd, SIOCGIFCONF, &amp;ifc) &lt; 0) {</div><div class='del'>-	error("ioctl(SIOCGIFCONF): %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Scan through looking for an interface with an Internet</div><div class='del'>-     * address on the same subnet as `ipaddr'.</div><div class='del'>-     */</div><div class='del'>-    ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);</div><div class='del'>-    for (ifr = ifc.ifc_req; ifr &lt; ifend; ifr = (struct ifreq *)</div><div class='del'>-	    ((char *)&amp;ifr-&gt;ifr_addr + sizeof(struct sockaddr))) {</div><div class='del'>-        if (ifr-&gt;ifr_addr.sa_family == AF_INET) {</div><div class='del'>-</div><div class='del'>-            /*</div><div class='del'>-             * Check that the interface is up, and not point-to-point</div><div class='del'>-             * or loopback.</div><div class='del'>-             */</div><div class='del'>-            strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-            if (ioctl(sockfd, SIOCGIFFLAGS, &amp;ifreq) &lt; 0)</div><div class='del'>-                continue;</div><div class='del'>-            if ((ifreq.ifr_flags &amp;</div><div class='del'>-                 (IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT|IFF_LOOPBACK|IFF_NOARP))</div><div class='del'>-                 != (IFF_UP|IFF_BROADCAST))</div><div class='del'>-                continue;</div><div class='del'>-</div><div class='del'>-            /*</div><div class='del'>-             * Get its netmask and check that it's on the right subnet.</div><div class='del'>-             */</div><div class='del'>-            if (ioctl(sockfd, SIOCGIFNETMASK, &amp;ifreq) &lt; 0)</div><div class='del'>-                continue;</div><div class='del'>-            ina = ((struct sockaddr_in *) &amp;ifr-&gt;ifr_addr)-&gt;sin_addr.s_addr;</div><div class='del'>-            mask = ((struct sockaddr_in *) &amp;ifreq.ifr_addr)-&gt;sin_addr.s_addr;</div><div class='del'>-            if ((ipaddr &amp; mask) != (ina &amp; mask))</div><div class='del'>-                continue;</div><div class='del'>-</div><div class='del'>-            break;</div><div class='del'>-        }</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    if (ifr &gt;= ifend)</div><div class='del'>-	return 0;</div><div class='del'>-    info("found interface %s for proxy arp", ifr-&gt;ifr_name);</div><div class='del'>-</div><div class='del'>-    /*</div><div class='del'>-     * Grab the physical address for this interface.</div><div class='del'>-     */</div><div class='del'>-    if ((nit_fd = open("/dev/nit", O_RDONLY)) &lt; 0) {</div><div class='del'>-	error("Couldn't open /dev/nit: %m");</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-    strlcpy(ifreq.ifr_name, ifr-&gt;ifr_name, sizeof(ifreq.ifr_name));</div><div class='del'>-    if (ioctl(nit_fd, NIOCBIND, &amp;ifreq) &lt; 0</div><div class='del'>-	|| ioctl(nit_fd, SIOCGIFADDR, &amp;ifreq) &lt; 0) {</div><div class='del'>-	error("Couldn't get hardware address for %s: %m",</div><div class='del'>-	       ifreq.ifr_name);</div><div class='del'>-	close(nit_fd);</div><div class='del'>-	return 0;</div><div class='del'>-    }</div><div class='del'>-</div><div class='del'>-    hwaddr-&gt;sa_family = AF_UNSPEC;</div><div class='del'>-    memcpy(hwaddr-&gt;sa_data, ifreq.ifr_addr.sa_data, 6);</div><div class='del'>-    close(nit_fd);</div><div class='del'>-    return 1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * have_route_to - determine if the system has any route to</div><div class='del'>- * a given IP address.</div><div class='del'>- * For demand mode to work properly, we have to ignore routes</div><div class='del'>- * through our own interface.</div><div class='del'>- */</div><div class='del'>-int have_route_to(addr)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-    return -1;</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-#define	WTMPFILE	"/usr/adm/wtmp"</div><div class='del'>-</div><div class='del'>-void</div><div class='del'>-logwtmp(line, name, host)</div><div class='del'>-    const char *line, *name, *host;</div><div class='del'>-{</div><div class='del'>-    int fd;</div><div class='del'>-    struct stat buf;</div><div class='del'>-    struct utmp ut;</div><div class='del'>-</div><div class='del'>-    if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) &lt; 0)</div><div class='del'>-	return;</div><div class='del'>-    if (!fstat(fd, &amp;buf)) {</div><div class='del'>-	strncpy(ut.ut_line, line, sizeof(ut.ut_line));</div><div class='del'>-	strncpy(ut.ut_name, name, sizeof(ut.ut_name));</div><div class='del'>-	strncpy(ut.ut_host, host, sizeof(ut.ut_host));</div><div class='del'>-	(void)time(&amp;ut.ut_time);</div><div class='del'>-	if (write(fd, (char *)&amp;ut, sizeof(struct utmp)) != sizeof(struct utmp))</div><div class='del'>-	    (void)ftruncate(fd, buf.st_size);</div><div class='del'>-    }</div><div class='del'>-    close(fd);</div><div class='del'>-}</div><div class='del'>-</div><div class='del'>-/*</div><div class='del'>- * Return user specified netmask, modified by any mask we might determine</div><div class='del'>- * for address `addr' (in network byte order).</div><div class='del'>- * Here we scan through the system's list of interfaces, looking for</div><div class='del'>- * any non-point-to-point interfaces which might appear to be on the same</div><div class='del'>- * network as `addr'.  If we find any, we OR in their netmask to the</div><div class='del'>- * user-specified netmask.</div><div class='del'>- */</div><div class='del'>-u_int32_t</div><div class='del'>-GetMask(addr)</div><div class='del'>-    u_int32_t addr;</div><div class='del'>-{</div><div class='del'>-    u_int32_t mask, nmask, ina;</div><div class='del'>-    struct ifreq *ifr, *ifend, ifreq;</div><div class='del'>-    struct ifconf ifc;</div><div class='del'>-</div><div class='del'>-    addr = ntohl(addr);</div><div class='del'>-    if (IN_CLASSA(addr))	/* determine network mask for address class */</div><div class='del'>-	nmask = IN_CLASSA_NET;</div><div class='del'>-    else if (IN_CLASSB(addr))</div><div class='del'>-	nmask = IN_CLASSB_NET;</div>